source: trunk/grails-app/views/termEditor/pages/terms.gsp @ 588

Last change on this file since 588 was 588, checked in by duh, 12 years ago
  • general improvements to the termEditor

-- feedback is more clear (resolves feature request #120)
-- separated info / error and feedback info boxes
-- improved the layout
-- ontology-chooser now allows instance options to
--- show/hide a div element (usefull for buttons to show only when an autocomplete option was selected)
--- show a spinner when searching

  • general web application improvement to capture F4 page refreshes, backspace browser navigation events and accidental submits when pressing 'enter' in an input box
  • Property svn:keywords set to Date Author Rev
File size: 2.1 KB
Line 
1<%
2        /**
3         * Term Editor overview template
4         *
5         * @author Jeroen Wesbeek
6         * @since 20100422
7         * @package wizard
8         * @see dbnp.studycapturing.TermEditorController
9         *
10         * Revision information:
11         * $Rev: 588 $
12         * $Author: duh $
13         * $Date: 2010-06-18 14:41:55 +0000 (vr, 18 jun 2010) $
14         */
15%>
16<%@ page contentType="text/html;charset=UTF-8" %>
17<html>
18 <head>
19  <meta name="layout" content="dialog"/>
20  <style type="text/css">
21#termForm {
22        display: block;
23}
24#termForm #label {
25    color:#006DBA;
26    font-size:14px;
27    font-weight:normal;
28    display: inline-block;
29    zoom: 1; /* IE 6 & 7 hack */
30    *display: inline; /* IE 6 & 7 hack */
31}
32#termForm #term {
33    display: inline-block;
34    zoom: 1; /* IE 6 & 7 hack */
35    *display: inline; /* IE 6 & 7 hack */
36}
37#termForm #button {
38    display: inline-block;
39    zoom: 1; /* IE 6 & 7 hack */
40    *display: inline; /* IE 6 & 7 hack */
41}
42  </style>
43<g:if env="production">
44  <script type="text/javascript" src="${resource(dir: 'js', file: 'ontology-chooser.min.js')}"></script>
45</g:if><g:else>
46  <script type="text/javascript" src="${resource(dir: 'js', file: 'ontology-chooser.js')}"></script>
47</g:else>
48 </head>
49 <body>
50
51        <g:if test="${errors}">
52                <span class="info">
53                        <span class="error">Oops!</span>
54                        <g:each in="${errors}" var="error">
55                                ${error}<br/>
56                        </g:each>
57                </span>
58        </g:if>
59        <g:elseif test="${message}">
60                <span class="info">
61                        <span class="known">Success</span>
62                        ${message}
63                </span>
64        </g:elseif>
65        <g:else>
66                <span class="info">
67                        <span class="title">Add a term</span>
68                        Use the search box below to find the term you would like to add.
69                </span>
70        </g:else>
71
72        <div id="termForm">
73        <g:form action="pages" name="wizardForm" id="wizardForm">
74                <div id="label">search term: </div>
75                <div id="term"><g:textField name="term" rel="ontology-${ontologies}" /></div>
76                <div id="button" style="inline-block;"><g:submitButton name="add" value="Add term" /></div>
77        </g:form>
78        </div>
79
80        <script type="text/javascript">
81                $(document).ready(function() {
82                // initialize the ontology chooser
83                new OntologyChooser().init({showHide: $('div#button')});
84                });
85        </script>
86
87 </body>
88</html>
Note: See TracBrowser for help on using the repository browser.