Changeset 1511
- Timestamp:
- Feb 9, 2011, 8:55:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy
r1505 r1511 152 152 } 153 153 on("refresh") { 154 if (params.savepropertymapping) println "saved properties" 154 155 flow.importer_fuzzymatching="true" 155 156 success() … … 270 271 } 271 272 } 273 274 def propertiesManager = { 275 render (view:"common/_propertiesManager") 276 } 272 277 273 278 /** -
trunk/grails-app/taglib/dbnp/importer/ImporterTagLib.groovy
r1505 r1511 18 18 import org.dbnp.gdt.* 19 19 20 import org.dbnp.gdt.* 21 20 22 import org.apache.poi.ss.usermodel.Cell 21 23 import org.apache.poi.ss.usermodel.DataFormatter -
trunk/grails-app/views/importer/common/_on_page.gsp
r1505 r1511 44 44 }); 45 45 46 // attach event to apply fuzzy matching 46 47 $('#fuzzymatchselect').click(function() { 47 48 refreshFlow() 49 }); 50 51 $('#savepropertiesbutton').click(function() { 52 var width = 800 53 var height = 400 54 55 // get all properties 56 //$('select[name^=columnproperty.index.]').each ( function() { 57 //} 58 59 $('<iframe frameborder="0" src="' + baseUrl + "/importer/propertiesManager" + '" sanbox="allow-same-origin" seamless />').dialog({ 60 title : "Properties manager", 61 autoOpen : true, 62 width : width, 63 height : height, 64 modal : true, 65 position : 'center', 66 buttons : { 67 Close : function() { $(this).dialog('close'); } 68 }, 69 close : function() { 70 //onClose(this); 71 refreshFlow() 72 } 73 }).width(width - 10).height(height) 74 48 75 }); 49 76 … … 55 82 $(this).val($('option:first', this).val()); 56 83 }); 84 }); 85 86 // attach change event function to prevent duplicate selection of properties 87 $('select[name^=columnproperty.index.]').each ( function() { 88 $(this).bind('change', function(e) { 89 //console.log($(this).val()) 90 var selection = $(this) 91 92 $('select[name^=columnproperty.index.] option:selected').each ( function() { 93 var selector = $(this) 94 95 if (selection.attr('id') != selector.parent().attr('id') && (selection.val()!="dontimport")) 96 if ($(this).val() == selection.val()) { 97 selection.val($('option:first', selection).val()); 98 99 alert("Property is already set for an other column, please choose a different property.") 100 return false 101 } 102 }); 103 }); 57 104 }); 58 105 } -
trunk/grails-app/views/importer/common/_properties_horizontal.gsp
r1505 r1511 14 14 */ 15 15 %> 16 <script type="text/javascript">17 16 18 // for each select field on the page19 $(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 false36 }37 });38 39 });40 41 });42 43 44 45 });46 </script>47 17 <!-- saveproperties action was defined in the form --> 48 18 <table> … … 52 22 <tr><td colspan="3"><h4>${stdentity.name}</h4></td></tr> 53 23 <tr> 54 <td class="header" width="25px"><input id="clearselect" type="button" value="Clear" name="clearselect"> 55 <input id="fuzzymatchselect" type="button" value="Match" name="fuzzymatchselect"> 24 <td class="header" width="25px"> 25 <input class="buttonsmall" id="clearselect" type="button" value="Clear" name="clearselect"> 26 <input class="buttonsmall" id="fuzzymatchselect" type="button" value="Match" name="fuzzymatchselect"> 27 <!-- <input class="buttonsmall" id="savepropertiesbutton" type="button" value="Save" name="savepropertiesbutton"> --> 56 28 </td> 57 29 <g:each var="selentity" in="${importer_selectedentities}"> -
trunk/web-app/css/importer.css
r1286 r1511 20 20 .selectsmall { 21 21 font-size: 10px; 22 } 23 24 .buttonsmall { 25 font-size: 10px; 22 26 } 23 27
Note: See TracChangeset
for help on using the changeset viewer.