Removed the "add" button from the LFA upload dialog.

master
Pacman Ghost 4 years ago
parent 0f82a696f3
commit 5dffc5f056
  1. 7
      vasl_templates/webapp/static/lfa-upload.js
  2. 4
      vasl_templates/webapp/tests/test_lfa.py

@ -93,9 +93,6 @@ window.on_analyze_vlog = function()
create: function() {
// initialize the dialog
init_dialog( $(this), "OK", false ) ;
var $btnPane = $( ".ui-dialog.lfa-upload .ui-dialog-buttonpane" ) ;
var $btn = $( "<button class='add'> <img src='" + gImagesBaseUrl+"/sortable-add.png'> Add </button>" ) ;
$btnPane.prepend( $btn ) ;
},
open: function() {
// initialize the dialog
@ -110,8 +107,6 @@ window.on_analyze_vlog = function()
beforeStop: onDragEnd,
} ).empty() ;
initExternalDragDrop() ;
var $addBtn = $( ".ui-dialog.lfa-upload button.add" ) ;
gEventHandlers.addHandler( $addBtn, "click", onAddFile ) ;
gEventHandlers.addHandler( $gLogFilesToUpload, "click", onAddFile ) ;
gEventHandlers.addHandler( $dlg.find(".hint"), "click", onAddFile ) ;
updateUi() ;
@ -187,7 +182,7 @@ function addFileToUploadList( fname, vlog_data )
$gLogFilesToUpload.append( $item ) ;
updateUi() ;
// add click handler to remove the file from the list
// add click handlers to remove the file from the list
gEventHandlers.addHandler( $item.children( ".delete" ), "click", function() {
gDisableClickToAddTimestamp = new Date() ;
removeFileFromUploadList( $(this).parent() ) ;

@ -558,14 +558,14 @@ def _analyze_vlogs( fnames ):
dlg = wait_for_elem( 2, ".ui-dialog.lfa-upload" )
# add each log file
for fname in fnames:
for fno,fname in enumerate(fnames):
fname = os.path.join( os.path.split(__file__)[0], "fixtures/analyze-vlog/"+fname )
vlog_data = open( fname, "rb" ).read()
set_stored_msg( "_vlog-persistence_", "{}|{}".format(
os.path.split( fname )[1],
base64.b64encode( vlog_data ).decode( "utf-8" )
) )
find_child( "button.add", dlg ).click()
find_child( "#lfa-upload .{}".format( "hint" if fno == 0 else "files" ), dlg ).click()
wait_for( 2, lambda: get_stored_msg( "_vlog-persistence_" ) == "" )
# start the analysis

Loading…
Cancel
Save