source: trunk/www/common/overview/overview.jsp @ 6242

Last change on this file since 6242 was 6242, checked in by Nicklas Nordborg, 9 years ago

References #1729 and #1730. Implement lazy loading of 'Item overview' as a tab activation event instead of a page reload.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 4.2 KB
Line 
1<%-- $Id: overview.jsp 6242 2013-02-25 09:10:44Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2009 Nicklas Nordborg
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<%@ page pageEncoding="UTF-8" session="false"
24  import="net.sf.basedb.core.SessionControl"
25  import="net.sf.basedb.core.DbControl"
26  import="net.sf.basedb.core.Item"
27  import="net.sf.basedb.core.BasicItem"
28  import="net.sf.basedb.core.Permission"
29  import="net.sf.basedb.core.ItemContext"
30  import="net.sf.basedb.core.Project"
31  import="net.sf.basedb.util.Values"
32  import="net.sf.basedb.clients.web.Base"
33  import="net.sf.basedb.clients.web.util.HTML"
34  import="net.sf.basedb.util.overview.GenericOverview"
35  import="net.sf.basedb.util.overview.OverviewUtil"
36  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
37  import="net.sf.basedb.clients.web.extensions.JspContext"
38  import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer"
39  import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil"
40  import="net.sf.basedb.util.extensions.ExtensionsInvoker"
41%>
42<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
43<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
44<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
45<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
46<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
47<%
48final Item itemType = Item.valueOf(request.getParameter("item_type"));
49final int itemId = Values.getInt(request.getParameter("item_id"));
50final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType);
51final String ID = sc.getId();
52final String root = request.getContextPath();
53final DbControl dc = sc.newDbControl();
54try
55{
56  BasicItem item = itemType.getById(dc, itemId);
57  JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, null, item);
58  ExtensionsInvoker invoker = ExtensionsControl.useExtensions(jspContext, 
59    "net.sf.basedb.clients.web.toolbar.item.overview");
60  final String showFailures = request.getParameter("show_failures");
61  %>
62  <base:page type="include">
63  <base:body>
64    <div id="overview-data" class="datacontainer"
65      data-item-type="<%=itemType.name() %>"
66      data-item-id="<%=itemId %>"
67    ></div>
68    <script type="text/javascript" charset="UTF-8" src="<%=root%>/common/overview/overview.js"></script>
69    <ext:scripts context="<%=jspContext%>" />
70    <ext:stylesheets context="<%=jspContext%>" />
71      <tbl:toolbar subclass="absolutefull" style="height: 1.75em;">
72        <tbl:button image="refresh.png" title="Reset"
73          id="btnResetOverview"
74          tooltip="Unload all cached items and restart from the root item again."
75        />
76        <tbl:button image="validate.png" title="Validate" 
77          id="btnValidateOverview"
78          tooltip="Load and validate entire tree" 
79        />
80        <tbl:button image="configure.png" title="Validation options&hellip;" 
81          id="btnOverviewValidationOptions"
82          tooltip="Change validation options"
83        />
84        <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 
85          wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/>
86        <tbl:button 
87          image="help.png"
88          subclass="auto-init"
89          data-auto-init="help"
90          data-help-id="item.overview"
91          title="Help&hellip;"
92          tooltip="Get help about this page"
93        />
94      </tbl:toolbar>
95      <div class="absolutefull topborder" style="top: 1.75em;"><iframe 
96        name="overview" id="idOverview"
97        src="<%=root%>/common/overview/wait.jsp" 
98        class="absolutefull" style="width: 100%; height: 100%;"></iframe></div>
99
100  </base:body>
101  </base:page>
102  <%
103}
104finally
105{
106  if (dc != null) dc.close();
107}
108%>
Note: See TracBrowser for help on using the repository browser.