Changeset 1908 for trunk/web-app
- Timestamp:
- Jun 1, 2011, 4:05:21 PM (10 years ago)
- Location:
- trunk/web-app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web-app/css/buttons.css
r1686 r1908 49 49 background-image: url(../plugins/famfamfam-1.0.1/images/icons/brick_go.png); 50 50 } 51 .options a.refineSearch { 52 background-image: url(../plugins/famfamfam-1.0.1/images/icons/magnifier.png); 53 } 51 54 .options a.excel { 52 55 background-image: url(../plugins/famfamfam-1.0.1/images/icons/page_excel.png); -
trunk/web-app/js/advancedQuery.js
r1879 r1908 154 154 } 155 155 156 157 156 /** 158 157 * Shows a criterium on the screen … … 204 203 205 204 function createInSearchElement( fieldname, fieldvalue ) { 206 var a = $( '<a class="' + fieldname + '" href="' + baseUrl + '/advancedQuery/show/' + fieldvalue+ '"></a>')207 a.text( "Search " + fieldvalue);205 var a = $( '<a class="' + fieldname + '" href="' + fieldvalue.url + '"></a>') 206 a.text( fieldvalue.description ); 208 207 209 208 var inputField = $( '<input type="hidden" name="criteria.' + criteriumId + '.' + fieldname + '" />' ); 210 inputField.val( fieldvalue );209 inputField.val( fieldvalue.id ); 211 210 212 211 a.append( inputField ); -
trunk/web-app/js/advancedQueryResults.js
r1798 r1908 58 58 } 59 59 60 function performAction( form, action, module, url ) { 60 /** 61 * Submits the form with selected elements to a given URL 62 * 63 * @param form JQuery object representing the form to be submitted 64 * @param action Name of the action to perform 65 * @param module Name of the module to perform the action on 66 * @param url Url to post the form to 67 * @param allIfNothingSelected If set to true, the action will be performed on all elements if none is selected 68 */ 69 function performAction( form, action, module, url, allIfNothingSelected ) { 61 70 // Make sure the data from the paginated table is submitted 62 71 // This is performed with javascript, because otherwise … … 66 75 if( url == undefined ) 67 76 url = '/advancedQuery/performAction'; 77 78 if( allIfNothingSelected == undefined ) 79 allIfNothingSelected = false; 68 80 69 81 // First remove all previously created inputs, in order to avoid any collissions … … 84 96 85 97 if( !checked ) { 86 alert( "Please pick at least one result to perform this action on." ); 87 return; 98 if( allIfNothingSelected ) { 99 // Submit all search results, instead of nothing 100 $('input', oTable.fnGetNodes()).each(function(idx,el) { 101 var $el = $(el); 102 if( $el.attr( 'name' ) == "uuid" ) { 103 checked = true; 104 form.append( $( '<input type="hidden" name="tokens" value="' + $el.attr( 'value' ) + '" class="created" />' ) ); 105 } 106 }) 107 } else { 108 alert( "Please pick at least one result to perform this action on." ); 109 return; 110 } 88 111 } 89 112
Note: See TracChangeset
for help on using the changeset viewer.