source: trunk/grails-app/views/importer/common/_missingproperties.gsp @ 1305

Last change on this file since 1305 was 1305, checked in by t.w.abma@…, 10 years ago
  • fixed minor bugs in the import wizard introduced by rewritten studywizard (JS/CSS code was still partly based on study wizard)
File size: 2.5 KB
Line 
1  <%
2        /**
3         * Missing properties template which shows missing properties
4         *
5         * @author Tjeerd Abma
6         * @since 20100623
7         * @package importer
8         *
9         * Revision information:
10         * $Rev: 1277 $
11         * $Author: t.w.abma@umcutrecht.nl $
12         * $Date: 2010-12-16 15:42:15 +0100 (Thu, 16 Dec 2010) $
13         */
14%>
15
16<link rel="stylesheet" href="${resource(dir: 'css', file: 'wizard.css')}"/>
17
18<script type="text/javascript" src="${resource(dir: 'js', file: 'table-editor.js')}"></script>
19<script type="text/javascript" src="${resource(dir: 'js', file: 'jquery.qtip-1.0.0-rc3.min.js')}"></script>
20<script type="text/javascript" src="${resource(dir: 'js', file: 'importer.js')}"></script>
21
22<g:if env="production">
23<script type="text/javascript" src="${resource(dir: 'js', file: 'SelectAddMore.min.js')}"></script>
24</g:if><g:else>
25<script type="text/javascript" src="${resource(dir: 'js', file: 'SelectAddMore.js')}"></script>
26</g:else>
27
28<script type="text/javascript">
29 $(document).ready(function() {
30        // mark error fields
31        <g:each in="${importer_failedcells}" var="record">
32          <g:each in="${record.importcells}" var="cell">
33          var element = $("select[name=entity_${cell.entityidentifier}_${cell.mappingcolumn.property}]");
34
35          element.addClass('error')
36          element.append( new Option("Invalid: ${cell.value}","#invalidterm", true, true) );
37 
38          </g:each>
39        </g:each>
40  });
41</script>
42 
43<g:if test="${importer_invalidentities}"><br/><br/>
44  <b>There are ${importer_invalidentities} entities which could not be validated, they are indicated by a red color, please correct them before continuing.</b>
45</g:if>
46
47<div class="wizard" id="wizard">
48    <div class="tableEditor">
49        <g:set var="showHeader" value="${true}"/>
50            <g:each status="index" var="table" in="${datamatrix}">
51                <g:each status="i" var="entity" in="${table}">
52                    <g:if test="${showHeader}">
53                        <g:set var="showHeader" value="${false}"/>
54                        <div class="header">
55                            <div class="firstColumn">#</div>
56                            <div class="firstColumn"></div>
57                                <wizard:templateColumnHeaders entity="${entity}" class="column" />
58                        </div>
59                        <input type="hidden" name="entity" value="${entity.getClass().getName()}">
60                    </g:if>
61                    <div class="row">
62                        <div class="firstColumn">#</div>
63                        <div class="firstColumn"></div>
64                        <wizard:templateColumns id="${entity.hashCode()}" entity="${entity}" template="${entity.template}" name="entity_${entity.getIdentifier()}" class="column" subject="${entity.hashCode()}" addDummy="true" />
65                    </div>
66                </g:each>
67            </g:each>
68    </div>
69    <div>
70        <br/>   
71    </div>
72</div>
Note: See TracBrowser for help on using the repository browser.