Ignore:
Timestamp:
Feb 8, 2011, 3:53:49 PM (10 years ago)
Author:
t.w.abma@…
Message:
  • fuzzy matching and don't import improved in the properties step of the importer wizard, by default properties are not matched against the Excel fields, but one can now manually apply fuzzy matching
  • added initial fields to ImportMapping? domain
Location:
trunk/grails-app/views/importer/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/importer/common/_on_page.gsp

    r1489 r1505  
    4343                        return false;
    4444                });
     45
     46         $('#fuzzymatchselect').click(function() {
     47            refreshFlow()
     48          });
     49
     50          // attach function to clear button to reset all selects to "don't import"
     51          $('#clearselect').click(function() {
     52            // for each select field on the page
     53            $("select").each( function(){
     54            // set its value to its first option
     55            $(this).val($('option:first', this).val());
     56            });
     57          });
    4558        }
    4659
  • trunk/grails-app/views/importer/common/_properties_horizontal.gsp

    r1480 r1505  
    4141});
    4242
    43 $('#clearselect').click(function() {
    44 
    45   // for each select field on the page
    46   $("select").each( function(){
    47     // set its value to its first option
    48     $(this).val($('option:first', this).val());
    49   });
    50 
    51 });
    5243
    5344
    5445});
    5546</script>
    56 <!-- saveproperties action was defined in the form --> 
     47<!-- saveproperties action was defined in the form -->
    5748    <table>
    5849          <g:each var="stdentity" in ="${GdtService.cachedEntities}">
     
    6152              <tr><td colspan="3"><h4>${stdentity.name}</h4></td></tr>
    6253                <tr>
    63             <td class="header" width="25px"><input id="clearselect" type="button" value="clear" name="clearselect"></td>
     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">
     56            </td>
    6457            <g:each var="selentity" in="${importer_selectedentities}">
    6558              <g:if test="${selentity.name.toLowerCase()==stdentity.entity.toLowerCase()}">
    6659                            <td class="header" width="200px">
    6760                                <b>${importer_header[selentity.columnindex.toInteger()].name}</b>
    68                   <importer:propertyChooser name="columnproperty" mappingcolumn="${importer_header[selentity.columnindex.toInteger()]}" matchvalue="${importer_header[selentity.columnindex.toInteger()].name}" template_id="${importer_template_id}" allfieldtypes="true"/>
     61                  <importer:propertyChooser name="columnproperty" mappingcolumn="${importer_header[selentity.columnindex.toInteger()]}" matchvalue="${importer_header[selentity.columnindex.toInteger()].name}" fuzzymatching="${importer_fuzzymatching}" template_id="${importer_template_id}" allfieldtypes="true"/>
    6962                            </td>                                       
    7063              </g:if>
Note: See TracChangeset for help on using the changeset viewer.