source: trunk/www/lims/arrayslides/paste_multiple.jsp @ 5917

Last change on this file since 5917 was 5917, checked in by Nicklas Nordborg, 12 years ago

References #1655: GUI improvements

Edit dialogs for array lims.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 3.9 KB
Line 
1<%-- $Id: paste_multiple.jsp 5917 2011-12-19 11:28:45Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
4
5  This file is part of BASE - BioArray Software Environment.
6  Available at http://base.thep.lu.se/
7
8  BASE is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License
10  as published by the Free Software Foundation; either version 3
11  of the License, or (at your option) any later version.
12
13  BASE is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  GNU General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with BASE. If not, see <http://www.gnu.org/licenses/>.
20  ------------------------------------------------------------------
21
22
23  @author Nicklas
24  @version 2.0
25--%>
26<%@ page pageEncoding="UTF-8" session="false"
27  import="net.sf.basedb.core.SessionControl"
28  import="net.sf.basedb.core.DbControl"
29  import="net.sf.basedb.core.Item"
30  import="net.sf.basedb.core.ItemContext"
31  import="net.sf.basedb.core.SystemItems"
32  import="net.sf.basedb.core.Permission"
33  import="net.sf.basedb.core.Include"
34  import="net.sf.basedb.core.ArraySlide"
35  import="net.sf.basedb.core.ArrayBatch"
36  import="net.sf.basedb.core.ItemQuery"
37  import="net.sf.basedb.core.ItemResultList"
38  import="net.sf.basedb.core.PermissionDeniedException"
39  import="net.sf.basedb.core.BaseException"
40  import="net.sf.basedb.core.query.Orders"
41  import="net.sf.basedb.core.query.Hql"
42  import="net.sf.basedb.clients.web.Base"
43  import="net.sf.basedb.clients.web.util.HTML"
44  import="net.sf.basedb.util.Values"
45  import="java.util.List"
46  import="java.util.Set"
47  import="java.util.HashSet"
48  import="java.util.Date"
49%>
50<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
51<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
52<%
53final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
54final String ID = sc.getId();
55final float scale = Base.getScale(sc);
56String form = request.getParameter("form");
57String prefix = request.getParameter("prefix");
58String title = "Paste multiple";
59%>
60
61  <base:page type="popup" title="<%=title%>">
62  <base:head>
63    <script language="JavaScript">
64    // Validate the "ArraySlide" tab
65    function init()
66    {
67      var pfrm = window.opener.document.forms['<%=form%>'];
68      var frm = document.forms['paste'];
69      if (pfrm)
70      {
71        var i = 0;
72        var text = '';
73        while (pfrm['<%=prefix%>'+i])
74        {
75          text += pfrm['<%=prefix%>'+i].value + '\n';
76          i++;
77        }
78        frm['text'].value = text;
79      }
80    }
81
82    // Submit the form
83    function save()
84    {
85      var pfrm = window.opener.document.forms['<%=form%>'];
86      var frm = document.forms['paste'];
87      if (pfrm)
88      {
89        var text = frm['text'].value.split('\n');
90        for (var i = 0; i < text.length; ++i)
91        {
92          var field = '<%=prefix%>' + i;
93          if (pfrm[field]) pfrm[field].value = text[i];
94        }
95        // Clear any remaining fields
96        while (pfrm['<%=prefix%>'+i])
97        {
98          pfrm['<%=prefix%>'+i].value = '';
99          i++;
100        }
101      }
102      window.close();
103    }
104    </script>
105  </base:head>
106  <base:body onload="init()">
107    <h1><%=title%> <base:help helpid="arrayslide.createwizard.pastemultiple" /></h1>
108    <form name="paste" onsubmit="return false;">
109
110    <div class="content">
111      <table style="width: 100%; height: 100%;">
112      <tr>
113        <td class="padded filled">
114        <i>
115          Enter one name or barcode per line. Click <b>Save</b> to store the
116          result in the parent form.
117        </i>
118        </td>
119      </tr>
120      <tr>
121      <td style="height: 98%;">
122        <table class="fullcc input100"><tr><td>
123        <textarea class="autohight" rows="20"name="text"></textarea>
124        </td></tr></table>
125      </td>
126      </tr>
127      </table>
128    </div>
129    </form>
130
131    <base:buttongroup subclass="dialogbuttons">
132      <base:button onclick="save()" title="Save" />
133      <base:button onclick="window.close()" title="Cancel" />
134    </base:buttongroup>
135  </base:body>
136  </base:page>
Note: See TracBrowser for help on using the repository browser.