source: trunk/grails-app/views/importer/common/_properties_horizontal.gsp @ 1444

Last change on this file since 1444 was 1444, checked in by work@…, 10 years ago
  • changed the view to use the static variable from gdt instead of doing a dynamic function call
  • Property svn:keywords set to Rev Author Date
File size: 2.1 KB
Line 
1<%@ page import="nl.grails.plugins.gdt.GdtService" %>
2<%
3        /**
4         * Properties template which shows entities and allows to assign properties to columns
5         *
6         * @author Tjeerd Abma
7         * @since 20100210
8         * @package importer
9         *
10         * Revision information:
11         * $Rev: 1444 $
12         * $Author: work@osx.eu $
13         * $Date: 2011-01-26 21:10:21 +0000 (wo, 26 jan 2011) $
14         */
15%>
16<script type="text/javascript">
17// for each select field on the page
18$(document).ready(function() {
19
20$('#clearselect').click(function() {
21
22  // for each select field on the page
23  $("select").each( function(){
24    // set its value to its first option
25    $(this).val($('option:first', this).val());
26  });
27
28});
29
30});
31</script>
32<!-- saveproperties action was defined in the form -->
33    <table>
34          <g:each var="stdentity" in ="${GdtService.cachedEntities}">
35              <% if (importer_selectedentities.any { it.name.toLowerCase() == stdentity.entity.toLowerCase() } && stdentity.entity!="") { %>
36           
37              <tr><td colspan="3"><h4>${stdentity.name}</h4></td></tr>
38                <tr>
39            <td class="header" width="25px"><input id="clearselect" type="button" value="clear" name="clearselect"></td>
40            <g:each var="selentity" in="${importer_selectedentities}">
41              <g:if test="${selentity.name.toLowerCase()==stdentity.entity.toLowerCase()}">
42                            <td class="header" width="200px">
43                                <b>${importer_header[selentity.columnindex.toInteger()].name}</b>
44                  <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}"/>
45                            </td>                                       
46              </g:if>
47            </g:each>
48                </tr>
49
50        <g:each var="row" in="${session.importer_datamatrix}">
51                <tr>
52                  <td class="datamatrix">                   
53                  </td>
54                    <g:each var="cell" in="${row}">
55                        <td class="datamatrix">
56                            <g:if test="${cell.toString()==''}">.</g:if>
57                            <g:else><importer:displayCell cell="${cell}"/></g:else>
58                        </td>
59                    </g:each>
60                </tr>
61                </g:each>
62
63          <% }  %> <!-- end of JSP if-->
64          </g:each>
65    </table>
Note: See TracBrowser for help on using the repository browser.