1 | <% |
---|
2 | /** |
---|
3 | * Properties template which shows entities and allows to assign properties to columns |
---|
4 | * |
---|
5 | * @author Tjeerd Abma |
---|
6 | * @since 20100210 |
---|
7 | * @package importer |
---|
8 | * |
---|
9 | * Revision information: |
---|
10 | * $Rev: 1443 $ |
---|
11 | * $Author: work@osx.eu $ |
---|
12 | * $Date: 2011-01-26 20:47:40 +0000 (wo, 26 jan 2011) $ |
---|
13 | */ |
---|
14 | %> |
---|
15 | <script type="text/javascript"> |
---|
16 | // for each select field on the page |
---|
17 | $(document).ready(function() { |
---|
18 | |
---|
19 | $('#clearselect').click(function() { |
---|
20 | |
---|
21 | // for each select field on the page |
---|
22 | $("select").each( function(){ |
---|
23 | // set its value to its first option |
---|
24 | $(this).val($('option:first', this).val()); |
---|
25 | }); |
---|
26 | |
---|
27 | }); |
---|
28 | |
---|
29 | }); |
---|
30 | </script> |
---|
31 | <!-- saveproperties action was defined in the form --> |
---|
32 | <table> |
---|
33 | <g:each var="stdentity" in ="${importer_importableentities}"> |
---|
34 | <% if (importer_selectedentities.any { it.name.toLowerCase() == stdentity.entity.toLowerCase() } && stdentity.entity!="") { %> |
---|
35 | |
---|
36 | <tr><td colspan="3"><h4>${stdentity.name}</h4></td></tr> |
---|
37 | <tr> |
---|
38 | <td class="header" width="25px"><input id="clearselect" type="button" value="clear" name="clearselect"></td> |
---|
39 | <g:each var="selentity" in="${importer_selectedentities}"> |
---|
40 | <g:if test="${selentity.name.toLowerCase()==stdentity.entity.toLowerCase()}"> |
---|
41 | <td class="header" width="200px"> |
---|
42 | <b>${importer_header[selentity.columnindex.toInteger()].name}</b> |
---|
43 | <importer:propertyChooser name="columnproperty" mappingcolumn="${importer_header[selentity.columnindex.toInteger()]}" matchvalue="${importer_header[selentity.columnindex.toInteger()].name}" template_id="${importer_template_id}" allfieldtypes="${importer_allfieldtypes}"/> |
---|
44 | </td> |
---|
45 | </g:if> |
---|
46 | </g:each> |
---|
47 | </tr> |
---|
48 | |
---|
49 | <g:each var="row" in="${session.importer_datamatrix}"> |
---|
50 | <tr> |
---|
51 | <td class="datamatrix"> |
---|
52 | </td> |
---|
53 | <g:each var="cell" in="${row}"> |
---|
54 | <td class="datamatrix"> |
---|
55 | <g:if test="${cell.toString()==''}">.</g:if> |
---|
56 | <g:else><importer:displayCell cell="${cell}"/></g:else> |
---|
57 | </td> |
---|
58 | </g:each> |
---|
59 | </tr> |
---|
60 | </g:each> |
---|
61 | |
---|
62 | <% } %> <!-- end of JSP if--> |
---|
63 | </g:each> |
---|
64 | </table> |
---|