source: trunk/www/admin/extensions/settings.jsp @ 5601

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

References #1592: Unified installation procedure for plug-ins, extensions and more...
References #1593: Extension system for the core API

Started to move the web client extensions into the core registry. So far the extensions are loaded at startup, but there is no support for adding more at runtime. The administrative interface is a bit of a mess right now, since a lot of the metadata that we used to get from the registration process is not yet available.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 3.1 KB
Line 
1<%-- $Id: settings.jsp 5601 2011-04-01 13:03:15Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2005 Nicklas Nordborg
4  Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg
5  Copyright (C) 2007 Martin Svensson
6
7  This file is part of BASE - BioArray Software Environment.
8  Available at http://base.thep.lu.se/
9
10  BASE is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License
12  as published by the Free Software Foundation; either version 3
13  of the License, or (at your option) any later version.
14
15  BASE is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU General Public License for more details.
19
20  You should have received a copy of the GNU General Public License
21  along with BASE. If not, see <http://www.gnu.org/licenses/>.
22  ------------------------------------------------------------------
23
24  @author Nicklas
25  @version 2.0
26--%>
27<%@ page pageEncoding="UTF-8" session="false"
28  import="net.sf.basedb.core.SessionControl"
29  import="net.sf.basedb.core.DbControl"
30  import="net.sf.basedb.core.Item"
31  import="net.sf.basedb.core.Permission"
32  import="net.sf.basedb.clients.web.Base"
33  import="net.sf.basedb.clients.web.WebException"
34  import="net.sf.basedb.util.Values"
35  import="net.sf.basedb.clients.web.util.HTML"
36  import="net.sf.basedb.util.extensions.ExtensionPoint"
37  import="net.sf.basedb.util.extensions.Extension"
38  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
39%>
40<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
41<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
42<%
43final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
44final String ID = sc.getId();
45final float scale = Base.getScale(sc);
46DbControl dc = null;
47try
48{
49  dc = sc.newDbControl();
50  ExtensionsControl ec = ExtensionsControl.get(dc);
51  ec.checkPermission(Permission.WRITE);
52  %>
53  <base:page type="popup" title="Extension settings">
54  <base:head scripts="tabcontrol.js" styles="tabcontrol.css">
55    <script language="JavaScript">
56   
57    // Submit the form
58    function saveSettings()
59    {
60      var frm = document.forms['settings'];
61      if (TabControl.validateActiveTab('main'))
62      {
63        frm.submit();
64      }
65    }
66    </script>
67  </base:head>
68  <base:body>
69  <p>
70
71  <form action="index.jsp?ID=<%=ID%>" method="post" name="settings" onsubmit="return false;">
72  <input type=hidden name="cmd" value="SaveSettings">
73 
74  <h3 class="docked">Extension settings <base:help tabcontrol="main" /></h3>
75  <t:tabcontrol id="main" 
76    contentstyle="<%="height: "+(int)(scale*240)+"px;"%>" position="bottom" remember="false">
77 
78  <t:tab id="all" title="Settings" helpid="extensions.settings">
79    <table class="form" cellspacing=0>
80    </table>
81  </t:tab>
82  </t:tabcontrol>
83
84  <p>
85  <div align=center>
86    <table align="center">
87    <tr>
88      <td width="50%"><base:button onclick="saveSettings();" title="Save" /></td>
89      <td width="50%"><base:button onclick="window.close();" title="Cancel" /></td>
90    </tr>
91    </table>
92
93  </div>
94  </form>
95  </base:body>
96  </base:page>
97  <%
98}
99finally
100{
101  if (dc != null) dc.close();
102}
103%>
Note: See TracBrowser for help on using the repository browser.