Changeset 21 for trunk/web-app
- Timestamp:
- Mar 22, 2011, 3:04:40 PM (11 years ago)
- Location:
- trunk/web-app/js
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web-app/js/assay.show.enterTagsDialog.js
r9 r21 1 $(function() {2 $( "#enterTagsDialog" ).tabbedDialog({3 height: 450,4 width: 750,5 modal: true,6 autoOpen: false,7 buttons: {8 "Save": function() {9 var $tabs = $('#enterTagsDialog').tabs();10 var selectedTab = $tabs.tabs('option', 'selected' );11 12 if( selectedTab == 0 ) { // Tab 'manual input' selected13 $( 'form[name=updateTagsManually]' ).submit();14 } else if( selectedTab == 1 ) { // Tab 'excel input' selected15 // Check whether we are in step 1 (uploading a file) or step 2 (matching columns)16 // Step 1 has a form[name=uploadExcel], step 2 has a form[name=matchColumns]17 if( $( 'form[name=uploadExcel]' ).length == 1 ) {18 // Step 1: save shouldn't be used. The upload is handled in the onUpload handler of19 // the upload object. See also handleTagExcel method20 return;21 } else {22 $( 'form[name=matchColumns]' ).submit();23 }24 }25 },26 "Close": function() { $(this).dialog( "close" ) }27 }28 });29 });30 31 function showEnterTagsDialog() {32 $( "#enterTagsDialog" ).dialog( "open" );33 }34 35 1 /** 36 2 * Handles the file upload of an excel file with tag data -
trunk/web-app/js/run.show.enterTagsDialog.js
r9 r21 1 $(function() {2 $( "#enterTagsDialog" ).tabbedDialog({3 height: 450,4 width: 750,5 modal: true,6 autoOpen: false,7 buttons: {8 "Save": function() {9 var $tabs = $('#enterTagsDialog').tabs();10 var selectedTab = $tabs.tabs('option', 'selected' );11 12 if( selectedTab == 0 ) { // Tab 'manual input' selected13 $( 'form[name=updateTagsManually]' ).submit();14 } else if( selectedTab == 1 ) { // Tab 'excel input' selected15 // Check whether we are in step 1 (uploading a file) or step 2 (matching columns)16 // Step 1 has a form[name=uploadExcel], step 2 has a form[name=matchColumns]17 if( $( 'form[name=uploadExcel]' ).length == 1 ) {18 // Step 1: save shouldn't be used. The upload is handled in the onUpload handler of19 // the upload object. See also handleTagExcel method20 return;21 } else {22 $( 'form[name=matchColumns]' ).submit();23 }24 }25 },26 "Close": function() { $(this).dialog( "close" ) }27 }28 });29 });30 31 function showEnterTagsDialog() {32 $( "#enterTagsDialog" ).dialog( "open" );33 }34 35 1 /** 36 2 * Handles the file upload of an excel file with tag data
Note: See TracChangeset
for help on using the changeset viewer.