source: trunk/www/common/progress_reporter.jsp @ 6607

Last change on this file since 6607 was 6607, checked in by Nicklas Nordborg, 8 years ago

References #1890: Improve skinnability of BASE

Minor adjustmen to most of the common utility pages.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 2.8 KB
Line 
1<%-- $Id: progress_reporter.jsp 6607 2014-11-19 14:52:20Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2007 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  Display a progress reporter
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.SimpleProgressReporter"
30  import="net.sf.basedb.util.Values"
31  import="net.sf.basedb.clients.web.Base"
32%>
33<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
34<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %>
35<%
36  String title = Values.getString(request.getParameter("title"));
37  String progressName = request.getParameter("progress");
38  SessionControl sc = Base.getExistingSessionControl(pageContext, true);
39 
40  SimpleProgressReporter progress = (SimpleProgressReporter)sc.getSessionSetting("progress." + progressName);
41  String message = null;
42  int percentDone = 0;
43  if (progress != null)
44  {
45    message = progress.getMessage();
46    percentDone = progress.getPercent();
47  }
48  if (message == null)
49  {
50    message = "Please wait...";
51  }
52  if (percentDone >= 100)
53  {
54    sc.setSessionSetting("progress." + progressName, null);
55  }
56%>
57<base:page type="popup" title="<%=title%>">
58<base:head styles="progressbar.css" scripts="~progress_reporter.js" />
59<base:body data-percent-done="<%=percentDone %>">
60  <h1><%=title%></h1>
61  <div class="content">
62 
63    <table class="fullcc bg-filled-50 bottomborder"><tr><td>
64      <table class="progressbar" style="margin: auto;">
65      <tr>
66      <td>
67        <table class="bar" style="width: 200px;">
68        <tr>
69          <%if (percentDone > 0) {%><td style="width: <%=percentDone%>%;" class="percentDone">&nbsp;</td><%}%>
70          <%if (percentDone < 100) {%><td style="width: <%=100-percentDone%>%;" class="percentRemain">&nbsp;</td><%}%>
71        </tr>
72        </table>
73      </td>
74        <td id="percentText"><%=percentDone%>%</td>
75      </tr>
76      </table>
77      <%=message %>
78      <br><br>
79     
80      <div align="center">
81      <i>Closing this window will NOT abort the process</i>
82      </div>
83    </td></tr></table>
84  </div>
85
86  <base:buttongroup subclass="dialogbuttons">
87    <base:button id="close" title="Close" />
88  </base:buttongroup>
89
90</base:body>
91</base:page>
Note: See TracBrowser for help on using the repository browser.