source: trunk/www/filemanager/frameset.jsp @ 5938

Last change on this file since 5938 was 5938, checked in by Nicklas Nordborg, 10 years ago

References #1655: GUI improvements

  • Trashcan and file manager
  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 3.2 KB
Line 
1<%-- $Id: frameset.jsp 5938 2012-01-27 14:17:51Z nicklas $
2  ------------------------------------------------------------------
3  Copyright (C) 2006 Jari Häkkinen, 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  @author Nicklas
23  @version 2.0
24--%>
25<%@ page pageEncoding="UTF-8" session="false"
26  import="net.sf.basedb.core.SessionControl"
27  import="net.sf.basedb.core.DbControl"
28  import="net.sf.basedb.core.Permission"
29  import="net.sf.basedb.core.Item"
30  import="net.sf.basedb.core.File"
31  import="net.sf.basedb.core.SystemItems"
32  import="net.sf.basedb.core.Directory"
33  import="net.sf.basedb.clients.web.Base"
34  import="net.sf.basedb.util.Values"
35%>
36<%@ taglib
37  prefix="base" uri="/WEB-INF/base.tld"
38%>
39<%
40SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, Item.FILE);
41String ID = sc.getId();
42String mode = request.getParameter("mode");
43int fileId = Values.getInt(request.getParameter("file_id"));
44String fileSrc = "";
45String syncWithDirectory = "1";
46if (fileId != 0)
47{
48  DbControl dc = null;
49  try
50  {
51    dc = sc.newDbControl();
52    File f = File.getById(dc, fileId);
53    sc.getCurrentContext(Item.DIRECTORY).setId(f.getDirectory().getId());
54    fileSrc = "files/index.jsp?ID="+ ID + "&cmd=ViewItem&item_id=" + fileId;
55    syncWithDirectory = "0";
56  }
57  finally
58  {
59    if (dc != null) dc.close();
60  }
61}
62
63%>
64
65<base:page type="frameset" title="">
66  <base:head scripts="dragdrop.js">
67  <script>
68 
69  function repositionX(deltaX, deltaY)
70  {
71    var f1 = document.getElementById('f1');
72    var d1 = document.getElementById('d1');
73    var f2 = document.getElementById('f2');
74
75    f1.style.width = (parseInt(f1.style.width) +deltaX) + 'px';
76    d1.style.left = (parseInt(d1.style.left) + deltaX) + 'px';
77    f2.style.left = (parseInt(f2.style.left) + deltaX) + 'px';
78  }
79  </script>
80  </base:head>
81  <base:body>
82    <div class="absolutefull" onmousemove="DragDrop.drag(event)" onmouseup="DragDrop.endDrag(event)">
83      <div id="f1" class="absolutefull topborder" style="width: 244px;"><iframe name="directories" 
84          src="directories/list_directories.jsp?ID=<%=ID%>&mode=<%=mode%>&sync=<%=syncWithDirectory%>"
85          style="width: 100%; height: 100%;"
86        ></iframe></div>
87       
88      <div id="d1" class="absolutefull filled leftborder rightborder topborder" 
89        style="left: 244px; width: 4px; cursor: col-resize; z-index: 99;"
90        onmousedown="DragDrop.beginDrag(event, true, false, repositionX)" 
91        ></div>
92     
93      <div id="f2" class="absolutefull" style="left: 250px;"><iframe name="files"
94        src="<%=fileSrc%>"
95        style="width: 100%; height: 100%;"
96        ></iframe></div>
97      </div>
98    </div>
99  </base:body>
100</base:page>
101
Note: See TracBrowser for help on using the repository browser.