4745 |
10 Feb 09 |
nicklas |
1 |
<%-- $Id$ |
4745 |
10 Feb 09 |
nicklas |
2 |
------------------------------------------------------------------ |
4745 |
10 Feb 09 |
nicklas |
Copyright (C) 2009 Nicklas Nordborg |
4745 |
10 Feb 09 |
nicklas |
4 |
|
4745 |
10 Feb 09 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
4745 |
10 Feb 09 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
4745 |
10 Feb 09 |
nicklas |
7 |
|
4745 |
10 Feb 09 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
4745 |
10 Feb 09 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
4745 |
10 Feb 09 |
nicklas |
10 |
as published by the Free Software Foundation; either version 3 |
4745 |
10 Feb 09 |
nicklas |
11 |
of the License, or (at your option) any later version. |
4745 |
10 Feb 09 |
nicklas |
12 |
|
4745 |
10 Feb 09 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
4745 |
10 Feb 09 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
4745 |
10 Feb 09 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4745 |
10 Feb 09 |
nicklas |
16 |
GNU General Public License for more details. |
4745 |
10 Feb 09 |
nicklas |
17 |
|
4745 |
10 Feb 09 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
4745 |
10 Feb 09 |
nicklas |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
4745 |
10 Feb 09 |
nicklas |
20 |
------------------------------------------------------------------ |
4745 |
10 Feb 09 |
nicklas |
21 |
--%> |
5426 |
24 Sep 10 |
nicklas |
22 |
<%@ page pageEncoding="UTF-8" session="false" |
4745 |
10 Feb 09 |
nicklas |
23 |
import="net.sf.basedb.core.SessionControl" |
4745 |
10 Feb 09 |
nicklas |
24 |
import="net.sf.basedb.core.DbControl" |
4745 |
10 Feb 09 |
nicklas |
25 |
import="net.sf.basedb.core.Project" |
4745 |
10 Feb 09 |
nicklas |
26 |
import="net.sf.basedb.core.Item" |
4745 |
10 Feb 09 |
nicklas |
27 |
import="net.sf.basedb.core.BasicItem" |
5145 |
20 Oct 09 |
nicklas |
28 |
import="net.sf.basedb.core.Annotation" |
5145 |
20 Oct 09 |
nicklas |
29 |
import="net.sf.basedb.core.AnnotationType" |
5651 |
08 Jun 11 |
nicklas |
30 |
import="net.sf.basedb.core.ItemSubtype" |
4745 |
10 Feb 09 |
nicklas |
31 |
import="net.sf.basedb.core.Nameable" |
5651 |
08 Jun 11 |
nicklas |
32 |
import="net.sf.basedb.core.Subtypable" |
6041 |
02 Apr 12 |
nicklas |
33 |
import="net.sf.basedb.core.BioPlateType" |
6041 |
02 Apr 12 |
nicklas |
34 |
import="net.sf.basedb.core.BioPlate" |
7315 |
30 Mar 17 |
nicklas |
35 |
import="net.sf.basedb.core.RawDataType" |
7315 |
30 Mar 17 |
nicklas |
36 |
import="net.sf.basedb.core.RawBioAssay" |
4745 |
10 Feb 09 |
nicklas |
37 |
import="net.sf.basedb.core.ItemContext" |
4745 |
10 Feb 09 |
nicklas |
38 |
import="net.sf.basedb.core.Permission" |
4745 |
10 Feb 09 |
nicklas |
39 |
import="net.sf.basedb.clients.web.Base" |
4745 |
10 Feb 09 |
nicklas |
40 |
import="net.sf.basedb.clients.web.util.HTML" |
4745 |
10 Feb 09 |
nicklas |
41 |
import="net.sf.basedb.util.Values" |
4745 |
10 Feb 09 |
nicklas |
42 |
import="net.sf.basedb.util.overview.GenericOverview" |
4745 |
10 Feb 09 |
nicklas |
43 |
import="net.sf.basedb.util.overview.OverviewUtil" |
4745 |
10 Feb 09 |
nicklas |
44 |
import="net.sf.basedb.util.overview.Node" |
4745 |
10 Feb 09 |
nicklas |
45 |
import="net.sf.basedb.util.overview.ValidationOptions" |
6382 |
17 Dec 13 |
nicklas |
46 |
import="org.json.simple.JSONArray" |
6382 |
17 Dec 13 |
nicklas |
47 |
import="org.json.simple.JSONObject" |
7316 |
30 Mar 17 |
nicklas |
48 |
import="java.util.Arrays" |
7316 |
30 Mar 17 |
nicklas |
49 |
import="java.util.HashSet" |
7316 |
30 Mar 17 |
nicklas |
50 |
import="java.util.Set" |
7316 |
30 Mar 17 |
nicklas |
51 |
import="java.util.List" |
4745 |
10 Feb 09 |
nicklas |
52 |
%> |
4745 |
10 Feb 09 |
nicklas |
53 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
4745 |
10 Feb 09 |
nicklas |
54 |
<%! |
7316 |
30 Mar 17 |
nicklas |
55 |
Set<Item> collapsedChildNodes = new HashSet<Item>( |
7316 |
30 Mar 17 |
nicklas |
56 |
Arrays.asList(Item.SAMPLE, Item.EXTRACT, Item.PHYSICALBIOASSAY, Item.DERIVEDBIOASSAY, Item.RAWBIOASSAY) |
7316 |
30 Mar 17 |
nicklas |
57 |
); |
7316 |
30 Mar 17 |
nicklas |
58 |
|
6382 |
17 Dec 13 |
nicklas |
59 |
void generateSubTree(DbControl dc, Node startNode, JSONObject jsonParent, boolean showFailures) |
4745 |
10 Feb 09 |
nicklas |
60 |
{ |
6382 |
17 Dec 13 |
nicklas |
61 |
|
4745 |
10 Feb 09 |
nicklas |
62 |
List<Node> children = startNode.getChildren(); |
6382 |
17 Dec 13 |
nicklas |
63 |
if (children == null) return; |
6382 |
17 Dec 13 |
nicklas |
64 |
|
4745 |
10 Feb 09 |
nicklas |
65 |
for (Node child : children) |
4745 |
10 Feb 09 |
nicklas |
66 |
{ |
7316 |
30 Mar 17 |
nicklas |
67 |
if (child.getNodeType() == Node.Type.FOLDER && child.numChildren() == 1) |
7316 |
30 Mar 17 |
nicklas |
68 |
{ |
7316 |
30 Mar 17 |
nicklas |
69 |
Node child2 = child.getChildren().get(0); |
7316 |
30 Mar 17 |
nicklas |
70 |
if (collapsedChildNodes.contains(child2.getItemType())) child = child2; |
7316 |
30 Mar 17 |
nicklas |
71 |
} |
7316 |
30 Mar 17 |
nicklas |
72 |
|
4745 |
10 Feb 09 |
nicklas |
73 |
int errors = child.getNumErrors(); |
4745 |
10 Feb 09 |
nicklas |
74 |
int warnings = child.getNumWarnings(); |
4745 |
10 Feb 09 |
nicklas |
75 |
int childErrors = child.getChildErrors(); |
4745 |
10 Feb 09 |
nicklas |
76 |
int childWarnings = child.getChildWarnings(); |
4749 |
11 Feb 09 |
nicklas |
77 |
|
4749 |
11 Feb 09 |
nicklas |
78 |
String folderIcon = child.getNodeType() == Node.Type.FOLDER ? "Folder" : "Item"; |
4840 |
24 Mar 09 |
martin |
79 |
String tooltip = ""; |
5145 |
20 Oct 09 |
nicklas |
80 |
if (child.getItemType() == Item.ANNOTATIONTYPE) |
4749 |
11 Feb 09 |
nicklas |
81 |
{ |
5145 |
20 Oct 09 |
nicklas |
82 |
if (startNode.getItemType() == Item.PROTOCOL) |
5145 |
20 Oct 09 |
nicklas |
83 |
{ |
5145 |
20 Oct 09 |
nicklas |
84 |
folderIcon = "ProtocolParameter"; |
5145 |
20 Oct 09 |
nicklas |
85 |
} |
5145 |
20 Oct 09 |
nicklas |
86 |
else |
5145 |
20 Oct 09 |
nicklas |
87 |
{ |
5145 |
20 Oct 09 |
nicklas |
88 |
try |
5145 |
20 Oct 09 |
nicklas |
89 |
{ |
5145 |
20 Oct 09 |
nicklas |
90 |
AnnotationType at = (AnnotationType)child.getItem(dc); |
5145 |
20 Oct 09 |
nicklas |
91 |
if (at.isProtocolParameter()) folderIcon = "ProtocolParameter"; |
5145 |
20 Oct 09 |
nicklas |
92 |
} |
5145 |
20 Oct 09 |
nicklas |
93 |
catch (Throwable t) |
5145 |
20 Oct 09 |
nicklas |
94 |
{} |
5145 |
20 Oct 09 |
nicklas |
95 |
} |
4749 |
11 Feb 09 |
nicklas |
96 |
} |
4749 |
11 Feb 09 |
nicklas |
97 |
else if (child.getItemType() == Item.ANNOTATION) |
4749 |
11 Feb 09 |
nicklas |
98 |
{ |
4749 |
11 Feb 09 |
nicklas |
99 |
folderIcon = "Annotation"; |
5145 |
20 Oct 09 |
nicklas |
100 |
try |
5145 |
20 Oct 09 |
nicklas |
101 |
{ |
5145 |
20 Oct 09 |
nicklas |
102 |
AnnotationType at = ((Annotation)child.getItem(dc)).getAnnotationType(); |
5145 |
20 Oct 09 |
nicklas |
103 |
if (at.isProtocolParameter()) folderIcon = "ProtocolParameter"; |
5145 |
20 Oct 09 |
nicklas |
104 |
} |
5145 |
20 Oct 09 |
nicklas |
105 |
catch (Throwable t) |
5145 |
20 Oct 09 |
nicklas |
106 |
{} |
4749 |
11 Feb 09 |
nicklas |
107 |
} |
4840 |
24 Mar 09 |
martin |
108 |
|
4840 |
24 Mar 09 |
martin |
109 |
if (showFailures) |
4745 |
10 Feb 09 |
nicklas |
110 |
{ |
4840 |
24 Mar 09 |
martin |
111 |
if (errors > 0) |
4840 |
24 Mar 09 |
martin |
112 |
{ |
4840 |
24 Mar 09 |
martin |
113 |
folderIcon += "Error"; |
4840 |
24 Mar 09 |
martin |
114 |
} |
4840 |
24 Mar 09 |
martin |
115 |
else if (warnings > 0) |
4840 |
24 Mar 09 |
martin |
116 |
{ |
4840 |
24 Mar 09 |
martin |
117 |
folderIcon += "Warning"; |
4840 |
24 Mar 09 |
martin |
118 |
} |
4840 |
24 Mar 09 |
martin |
119 |
else if (childErrors > 0) |
4840 |
24 Mar 09 |
martin |
120 |
{ |
4840 |
24 Mar 09 |
martin |
121 |
folderIcon += "ChildError"; |
4840 |
24 Mar 09 |
martin |
122 |
} |
4840 |
24 Mar 09 |
martin |
123 |
else if (childWarnings > 0) |
4840 |
24 Mar 09 |
martin |
124 |
{ |
4840 |
24 Mar 09 |
martin |
125 |
folderIcon += "ChildWarning"; |
4840 |
24 Mar 09 |
martin |
126 |
} |
4840 |
24 Mar 09 |
martin |
127 |
if (warnings > 0 && errors > 0) |
4840 |
24 Mar 09 |
martin |
128 |
{ |
4840 |
24 Mar 09 |
martin |
129 |
tooltip += errors + " error(s); " + warnings + " warning(s) on this item"; |
4840 |
24 Mar 09 |
martin |
130 |
} |
4840 |
24 Mar 09 |
martin |
131 |
else if (errors > 0) |
4840 |
24 Mar 09 |
martin |
132 |
{ |
4840 |
24 Mar 09 |
martin |
133 |
tooltip += errors + " error(s) on this item"; |
4840 |
24 Mar 09 |
martin |
134 |
} |
4840 |
24 Mar 09 |
martin |
135 |
else if (warnings > 0) |
4840 |
24 Mar 09 |
martin |
136 |
{ |
4840 |
24 Mar 09 |
martin |
137 |
tooltip += warnings + " warning(s) on this item"; |
4840 |
24 Mar 09 |
martin |
138 |
} |
4840 |
24 Mar 09 |
martin |
139 |
if (childErrors > 0 && childWarnings > 0) |
4840 |
24 Mar 09 |
martin |
140 |
{ |
4840 |
24 Mar 09 |
martin |
141 |
if (tooltip.length() > 0) tooltip += "; "; |
4840 |
24 Mar 09 |
martin |
142 |
tooltip += childErrors + " error(s); " + childWarnings + " warning(s) on child items"; |
4840 |
24 Mar 09 |
martin |
143 |
} |
4840 |
24 Mar 09 |
martin |
144 |
else if (childErrors > 0) |
4840 |
24 Mar 09 |
martin |
145 |
{ |
4840 |
24 Mar 09 |
martin |
146 |
if (tooltip.length() > 0) tooltip += "; "; |
4840 |
24 Mar 09 |
martin |
147 |
tooltip += childErrors + " error(s) on child items"; |
4840 |
24 Mar 09 |
martin |
148 |
} |
4840 |
24 Mar 09 |
martin |
149 |
else if (childWarnings > 0) |
4840 |
24 Mar 09 |
martin |
150 |
{ |
4840 |
24 Mar 09 |
martin |
151 |
if (tooltip.length() > 0) tooltip += "; "; |
4840 |
24 Mar 09 |
martin |
152 |
tooltip += childWarnings + " warning(s) on child items"; |
4840 |
24 Mar 09 |
martin |
153 |
} |
4745 |
10 Feb 09 |
nicklas |
154 |
} |
5651 |
08 Jun 11 |
nicklas |
155 |
int numChildren = child.getChildren() == null ? 0 : child.getChildren().size(); |
5651 |
08 Jun 11 |
nicklas |
156 |
String subtitle = null; |
5651 |
08 Jun 11 |
nicklas |
157 |
if (child.getNodeType() == Node.Type.FOLDER) |
5651 |
08 Jun 11 |
nicklas |
158 |
{ |
5651 |
08 Jun 11 |
nicklas |
159 |
subtitle = child.getChildren() == null ? "0" : Integer.toString(child.getChildren().size()); |
5651 |
08 Jun 11 |
nicklas |
160 |
} |
5651 |
08 Jun 11 |
nicklas |
161 |
else if (child.getItem() instanceof Subtypable) |
5651 |
08 Jun 11 |
nicklas |
162 |
{ |
5651 |
08 Jun 11 |
nicklas |
163 |
try |
5651 |
08 Jun 11 |
nicklas |
164 |
{ |
5651 |
08 Jun 11 |
nicklas |
165 |
ItemSubtype subtype = ((Subtypable)child.getItem(dc)).getItemSubtype(); |
5651 |
08 Jun 11 |
nicklas |
166 |
if (subtype != null) subtitle = subtype.getName(); |
5651 |
08 Jun 11 |
nicklas |
167 |
} |
5651 |
08 Jun 11 |
nicklas |
168 |
catch (Throwable t) |
5651 |
08 Jun 11 |
nicklas |
169 |
{} |
5651 |
08 Jun 11 |
nicklas |
170 |
} |
6041 |
02 Apr 12 |
nicklas |
171 |
else if (child.getItem() instanceof BioPlate) |
6041 |
02 Apr 12 |
nicklas |
172 |
{ |
6041 |
02 Apr 12 |
nicklas |
173 |
try |
6041 |
02 Apr 12 |
nicklas |
174 |
{ |
6041 |
02 Apr 12 |
nicklas |
175 |
BioPlateType plateType = ((BioPlate)child.getItem(dc)).getBioPlateType(); |
6041 |
02 Apr 12 |
nicklas |
176 |
if (plateType != null) subtitle = plateType.getName(); |
6041 |
02 Apr 12 |
nicklas |
177 |
} |
6041 |
02 Apr 12 |
nicklas |
178 |
catch (Throwable t) |
6041 |
02 Apr 12 |
nicklas |
179 |
{} |
6041 |
02 Apr 12 |
nicklas |
180 |
} |
7315 |
30 Mar 17 |
nicklas |
181 |
else if (child.getItem() instanceof RawBioAssay) |
7315 |
30 Mar 17 |
nicklas |
182 |
{ |
7315 |
30 Mar 17 |
nicklas |
183 |
RawDataType rawDataType = ((RawBioAssay)child.getItem(dc)).getRawDataType(); |
7315 |
30 Mar 17 |
nicklas |
184 |
subtitle = rawDataType.getName(); |
7315 |
30 Mar 17 |
nicklas |
185 |
} |
5651 |
08 Jun 11 |
nicklas |
186 |
|
6382 |
17 Dec 13 |
nicklas |
187 |
String text = HTML.encodeTags(child.getTitle()) + (subtitle != null ? " <span class=\"subtitle\">(" + subtitle + ")</span>" : ""); |
6382 |
17 Dec 13 |
nicklas |
188 |
JSONObject jsonChild = newJoustEntry(jsonParent, folderIcon, text, child.getId()); |
6382 |
17 Dec 13 |
nicklas |
189 |
jsonChild.put("tooltip", tooltip); |
7347 |
28 Apr 17 |
nicklas |
190 |
jsonChild.put("className", child.getNodeType().name()); |
4864 |
30 Mar 09 |
nicklas |
191 |
if (!child.isChildrenLoaded()) |
4864 |
30 Mar 09 |
nicklas |
192 |
{ |
6382 |
17 Dec 13 |
nicklas |
193 |
jsonChild.put("isLazy", 1); |
4864 |
30 Mar 09 |
nicklas |
194 |
} |
6382 |
17 Dec 13 |
nicklas |
195 |
generateSubTree(dc, child, jsonChild, showFailures); |
6382 |
17 Dec 13 |
nicklas |
196 |
} |
6382 |
17 Dec 13 |
nicklas |
197 |
} |
6382 |
17 Dec 13 |
nicklas |
198 |
|
6382 |
17 Dec 13 |
nicklas |
199 |
|
6382 |
17 Dec 13 |
nicklas |
200 |
JSONObject newJoustEntry(JSONObject jsonParent, String icon, String text, String id) |
6382 |
17 Dec 13 |
nicklas |
201 |
{ |
6382 |
17 Dec 13 |
nicklas |
202 |
JSONObject jsonJoust = new JSONObject(); |
6382 |
17 Dec 13 |
nicklas |
203 |
jsonJoust.put("icon", icon); |
6382 |
17 Dec 13 |
nicklas |
204 |
jsonJoust.put("text", text); |
6382 |
17 Dec 13 |
nicklas |
205 |
jsonJoust.put("id", id); |
6382 |
17 Dec 13 |
nicklas |
206 |
if (jsonParent != null) |
6382 |
17 Dec 13 |
nicklas |
207 |
{ |
6382 |
17 Dec 13 |
nicklas |
208 |
JSONArray jsonChildren = (JSONArray)jsonParent.get("children"); |
6382 |
17 Dec 13 |
nicklas |
209 |
if (jsonChildren == null) |
4864 |
30 Mar 09 |
nicklas |
210 |
{ |
6382 |
17 Dec 13 |
nicklas |
211 |
jsonChildren = new JSONArray(); |
6382 |
17 Dec 13 |
nicklas |
212 |
jsonParent.put("children", jsonChildren); |
4864 |
30 Mar 09 |
nicklas |
213 |
} |
6382 |
17 Dec 13 |
nicklas |
214 |
jsonChildren.add(jsonJoust); |
4745 |
10 Feb 09 |
nicklas |
215 |
} |
6382 |
17 Dec 13 |
nicklas |
216 |
return jsonJoust; |
4745 |
10 Feb 09 |
nicklas |
217 |
} |
6382 |
17 Dec 13 |
nicklas |
218 |
|
4745 |
10 Feb 09 |
nicklas |
219 |
%> |
4745 |
10 Feb 09 |
nicklas |
220 |
<% |
4745 |
10 Feb 09 |
nicklas |
221 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
4745 |
10 Feb 09 |
nicklas |
222 |
final String ID = sc.getId(); |
4745 |
10 Feb 09 |
nicklas |
223 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
224 |
final DbControl dc = sc.newDbControl("Item overview - Tree"); |
4745 |
10 Feb 09 |
nicklas |
225 |
try |
4745 |
10 Feb 09 |
nicklas |
226 |
{ |
4767 |
17 Feb 09 |
nicklas |
227 |
GenericOverview overview = OverviewUtil.getCurrentOverview(sc); |
6382 |
17 Dec 13 |
nicklas |
228 |
boolean showFailures = Values.getBoolean(request.getParameter("show_failures"), false); |
4745 |
10 Feb 09 |
nicklas |
229 |
Node rootNode = overview.getRootNode(); |
5651 |
08 Jun 11 |
nicklas |
230 |
Nameable rootItem = (Nameable)rootNode.getItem(dc); |
5651 |
08 Jun 11 |
nicklas |
231 |
String subtitle = null; |
5651 |
08 Jun 11 |
nicklas |
232 |
if (rootItem instanceof Subtypable) |
5651 |
08 Jun 11 |
nicklas |
233 |
{ |
5651 |
08 Jun 11 |
nicklas |
234 |
try |
5651 |
08 Jun 11 |
nicklas |
235 |
{ |
5651 |
08 Jun 11 |
nicklas |
236 |
ItemSubtype subtype = ((Subtypable)rootItem).getItemSubtype(); |
5651 |
08 Jun 11 |
nicklas |
237 |
if (subtype != null) subtitle = subtype.getName(); |
5651 |
08 Jun 11 |
nicklas |
238 |
} |
5651 |
08 Jun 11 |
nicklas |
239 |
catch (Throwable t) |
5651 |
08 Jun 11 |
nicklas |
240 |
{} |
5651 |
08 Jun 11 |
nicklas |
241 |
} |
4745 |
10 Feb 09 |
nicklas |
242 |
String rootIcon = "Home"; |
4840 |
24 Mar 09 |
martin |
243 |
if (showFailures) |
4745 |
10 Feb 09 |
nicklas |
244 |
{ |
4840 |
24 Mar 09 |
martin |
245 |
if (rootNode.getNumErrors() > 0 || rootNode.getChildErrors() > 0) |
4840 |
24 Mar 09 |
martin |
246 |
{ |
4840 |
24 Mar 09 |
martin |
247 |
rootIcon = "Error"; |
4840 |
24 Mar 09 |
martin |
248 |
} |
4840 |
24 Mar 09 |
martin |
249 |
else if (rootNode.getNumWarnings() > 0 || rootNode.getChildWarnings() > 0) |
4840 |
24 Mar 09 |
martin |
250 |
{ |
4840 |
24 Mar 09 |
martin |
251 |
rootIcon = "Warning"; |
4840 |
24 Mar 09 |
martin |
252 |
} |
4745 |
10 Feb 09 |
nicklas |
253 |
} |
6382 |
17 Dec 13 |
nicklas |
254 |
|
6382 |
17 Dec 13 |
nicklas |
255 |
// Build the Joust menu tree |
6382 |
17 Dec 13 |
nicklas |
256 |
JSONArray jsonJoust = new JSONArray(); |
6382 |
17 Dec 13 |
nicklas |
257 |
JSONObject jsonRoot = newJoustEntry(null, rootIcon, HTML.encodeTags(rootItem.getName())+ (subtitle != null ? " <span class=\"subtitle\">(" + subtitle + ")</span>" : ""), rootNode.getId()); |
6382 |
17 Dec 13 |
nicklas |
258 |
jsonRoot.put("isOpen", 1); |
6382 |
17 Dec 13 |
nicklas |
259 |
jsonRoot.put("noOutlineIcon", 1); |
6382 |
17 Dec 13 |
nicklas |
260 |
|
6382 |
17 Dec 13 |
nicklas |
261 |
generateSubTree(dc, rootNode, jsonRoot, showFailures); |
6382 |
17 Dec 13 |
nicklas |
262 |
jsonJoust.add(jsonRoot); |
4745 |
10 Feb 09 |
nicklas |
263 |
%> |
5951 |
09 Feb 12 |
nicklas |
264 |
<base:page title="" type="iframe"> |
6388 |
07 Jan 14 |
nicklas |
265 |
<base:head scripts="joust-2.js,dragdrop.js,~tree.js" styles="joust-2.css"> |
5651 |
08 Jun 11 |
nicklas |
266 |
<style> |
5918 |
21 Dec 11 |
nicklas |
267 |
.subtitle |
5918 |
21 Dec 11 |
nicklas |
268 |
{ |
5918 |
21 Dec 11 |
nicklas |
269 |
font-size: 0.85em; |
5918 |
21 Dec 11 |
nicklas |
270 |
color: #666666; |
5651 |
08 Jun 11 |
nicklas |
271 |
} |
5918 |
21 Dec 11 |
nicklas |
272 |
.selected .subtitle |
5918 |
21 Dec 11 |
nicklas |
273 |
{ |
5918 |
21 Dec 11 |
nicklas |
274 |
color: #E8E8E8; |
5651 |
08 Jun 11 |
nicklas |
275 |
} |
7347 |
28 Apr 17 |
nicklas |
276 |
|
7347 |
28 Apr 17 |
nicklas |
277 |
/* The selected item and all children get a gray background */ |
7347 |
28 Apr 17 |
nicklas |
278 |
.selected, .selected + .children |
7347 |
28 Apr 17 |
nicklas |
279 |
{ |
7347 |
28 Apr 17 |
nicklas |
280 |
background-color: #F8F8F8; |
7347 |
28 Apr 17 |
nicklas |
281 |
} |
7347 |
28 Apr 17 |
nicklas |
282 |
|
7347 |
28 Apr 17 |
nicklas |
283 |
/* A slighly darker background when hovering */ |
7347 |
28 Apr 17 |
nicklas |
284 |
.joustitem:hover, .joustitem:hover + .children .joustitem |
7347 |
28 Apr 17 |
nicklas |
285 |
{ |
7347 |
28 Apr 17 |
nicklas |
286 |
background-color: #F0F0F0; |
7347 |
28 Apr 17 |
nicklas |
287 |
} |
7347 |
28 Apr 17 |
nicklas |
288 |
|
7347 |
28 Apr 17 |
nicklas |
289 |
/* First-level child items to the selected item get bold text */ |
7347 |
28 Apr 17 |
nicklas |
290 |
.selected + .children > .joustitem, .selected + .children > .children.FOLDER > .joustitem |
7347 |
28 Apr 17 |
nicklas |
291 |
{ |
7347 |
28 Apr 17 |
nicklas |
292 |
font-weight: bold; |
7347 |
28 Apr 17 |
nicklas |
293 |
} |
5651 |
08 Jun 11 |
nicklas |
294 |
</style> |
5651 |
08 Jun 11 |
nicklas |
295 |
|
4745 |
10 Feb 09 |
nicklas |
296 |
</base:head> |
6382 |
17 Dec 13 |
nicklas |
297 |
<base:body> |
6387 |
18 Dec 13 |
nicklas |
298 |
<div id="page-data" class="datacontainer" |
6382 |
17 Dec 13 |
nicklas |
299 |
data-show-failures="<%=showFailures ? 1 : 0 %>" |
6382 |
17 Dec 13 |
nicklas |
300 |
></div> |
6194 |
01 Nov 12 |
nicklas |
301 |
<div id="main" class="joust absolutefull auto-init" data-auto-init="drag-support"> |
6382 |
17 Dec 13 |
nicklas |
302 |
<div id="joust" class="joust absolutefull" |
6382 |
17 Dec 13 |
nicklas |
303 |
data-joust-tree="<%=HTML.encodeTags(jsonJoust.toJSONString()) %>" |
6382 |
17 Dec 13 |
nicklas |
304 |
style="overflow: auto;"> |
4745 |
10 Feb 09 |
nicklas |
305 |
</div> |
4745 |
10 Feb 09 |
nicklas |
306 |
</div> |
4745 |
10 Feb 09 |
nicklas |
307 |
</base:body> |
4745 |
10 Feb 09 |
nicklas |
308 |
</base:page> |
4745 |
10 Feb 09 |
nicklas |
309 |
<% |
4745 |
10 Feb 09 |
nicklas |
310 |
} |
4745 |
10 Feb 09 |
nicklas |
311 |
finally |
4745 |
10 Feb 09 |
nicklas |
312 |
{ |
4745 |
10 Feb 09 |
nicklas |
313 |
if (dc != null) dc.close(); |
4745 |
10 Feb 09 |
nicklas |
314 |
} |
4745 |
10 Feb 09 |
nicklas |
315 |
%> |