Changeset 1479 for trunk/grails-app
- Timestamp:
- Feb 2, 2011, 4:21:13 PM (10 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r1469 r1479 133 133 def mostsimilar = ImporterService.mostSimilar(matchvalue, options) 134 134 135 def res = "<select style=\"font-size:10px\" name=\"${name}.index.${columnIndex}\">"135 def res = "<select style=\"font-size:10px\" id=\"${name}.index.${columnIndex}\" name=\"${name}.index.${columnIndex}\">" 136 136 137 137 res += "<option value=\"dontimport\">Don't import</option>" -
trunk/grails-app/views/importer/common/_on_page.gsp
r1467 r1479 81 81 } 82 82 83 84 83 /** 85 84 * Update one select based on another select -
trunk/grails-app/views/importer/common/_properties_horizontal.gsp
r1456 r1479 15 15 %> 16 16 <script type="text/javascript"> 17 17 18 // for each select field on the page 18 19 $(document).ready(function() { 20 21 $('select[name^=columnproperty.index.]').each ( function() { 22 23 $(this).bind('change', function(e) { 24 //console.log($(this).val()) 25 var selection = $(this) 26 27 $('select[name^=columnproperty.index.] option:selected').each ( function() { 28 var selector = $(this) 29 30 if (selection.attr('id') != selector.parent().attr('id') && (selection.val()!="dontimport")) 31 if ($(this).val() == selection.val()) { 32 selection.val($('option:first', selection).val()); 33 34 alert("Property is already set for an other column, please choose a different property.") 35 return false 36 } 37 }); 38 39 }); 40 41 }); 19 42 20 43 $('#clearselect').click(function() { … … 27 50 28 51 }); 52 29 53 30 54 });
Note: See TracChangeset
for help on using the changeset viewer.