Changeset 4840
- Timestamp:
- Mar 24, 2009, 3:55:03 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/src/docbook/userdoc/webclient.xml
r4771 r4840 2238 2238 function you can get an overview of all hybridizations, 2239 2239 extracts, samples, annotations, raw data sets, etc. that are 2240 related to a given item. The overview includes a lot of checks2241 th at validates the data for missing or possiblyincorrect information.2240 related to a given item. In the overview you can validate 2241 the data to find possibly missing or incorrect information. 2242 2242 </para> 2243 2243 … … 2270 2270 <listitem> 2271 2271 <para> 2272 To the left is a tree displaying all items 2273 that are related to the current item. 2272 To the left is a tree displaying items that are related 2273 to the current item. The tree is loaded gradually when 2274 you click your way through the sublevels. 2275 The only exception is when a validation has been done, 2276 in this case the whole tree is loaded through the validation-process. 2274 2277 </para> 2275 2278 </listitem> … … 2279 2282 The lower right shows a list of warnings and error 2280 2283 messages that was found when validating the data. 2284 This section is empty if no validation has been done. 2285 Click on <guibutton>Validate</guibutton> to validate the data. 2281 2286 <nohelp> 2282 In the example you can see that we have failed to2283 specify a value for the <guilabel>Temperature</guilabel>2284 protocol parameter for one of the samples.2285 </nohelp> 2287 In the example you can see that we failed to assign biosource to sample 2288 <guilabel>Sample A.ref</guilabel> and 2289 protocol and hardware to array batch <guilabel>Affymetrix batch A</guilabel>. 2290 </nohelp> 2286 2291 </para> 2287 2292 </listitem> … … 2290 2295 <para> 2291 2296 The upper right shows information about the 2292 currently selected item in the tree. This part also 2293 contains more information errors or warnings for this 2294 item. It may also present you with one or more suggestions 2297 currently selected item in the tree. This part will also 2298 contain more information about errors or warnings for this 2299 item, but only if a validation has been done. 2300 It may also present you with one or more suggestions 2295 2301 about how to fix the problem and with a link that 2296 2302 takes you to the most probable location where you can fix … … 2577 2583 title="How to fix validation failures"> 2578 2584 2579 <para> 2585 <para> 2580 2586 The overview includes a function that allows 2581 2587 you to quickly fix most of the problems found during the -
trunk/www/common/overview/ajax.jsp
r4830 r4840 30 30 import="net.sf.basedb.clients.web.Base" 31 31 import="net.sf.basedb.clients.web.WebException" 32 import="net.sf.basedb.clients.web.util.HTML"33 32 %> 34 33 <% … … 46 45 dc = sc.newDbControl(); 47 46 GenericOverview overview = OverviewUtil.getCurrentOverview(sc); 48 Node parent = overview.getNode( "N"+nodeId);47 Node parent = overview.getNode(nodeId); 49 48 overview.expand(dc, parent, false); 50 49 overview.updateFailureCountOnNodes(); 51 50 if (parent != null && parent.numChildren() > 0) 52 51 { 53 String parentIconSuffix = "";54 String parentTooltip = "";55 int errors = parent.getNumErrors();56 int warnings = parent.getNumWarnings();57 if (errors > 0)58 {59 parentIconSuffix = "Error";60 parentTooltip = errors + " error(s) on this item";61 }62 else if (warnings > 0)63 {64 parentIconSuffix = "Warning";65 parentTooltip = warnings + " warning(s) on this item";66 }67 52 for (Node n : parent.getChildren()) 68 53 { … … 77 62 folderIcon = "Annotation"; 78 63 } 79 String tooltip = "";80 64 int numChildren = n.getChildren() == null ? 81 65 0 : n.getChildren().size(); 82 66 %>begin 83 67 id <%=n.getId()%> 84 title <%=HTML.javaScriptEncode(n.getTitle()) + (n.getNodeType() == Node.Type.FOLDER ? " (" + numChildren + ")" : "")%> 85 hashCode <%=n.hashCode()%> 68 title <%=n.getTitle() + (n.getNodeType() == Node.Type.FOLDER ? " (" + numChildren + ")" : "")%> 86 69 folderIcon <%=folderIcon %> 87 parentIconSuffix <%=parentIconSuffix%>88 tooltip <%=HTML.javaScriptEncode(tooltip)%>89 parentTooltip <%=HTML.javaScriptEncode(parentTooltip)%>90 70 end 91 71 <% -
trunk/www/common/overview/failures.jsp
r4767 r4840 58 58 GenericOverview overview = OverviewUtil.getCurrentOverview(sc); 59 59 ValidationOptions options = overview.getValidationOptions(); 60 60 Boolean showFailures = Values.getBoolean(request.getParameter("show_failures"), false); 61 61 List<Failure> failures = overview.getFailures(); 62 62 if (failures == null) failures = new LinkedList<Failure>(); … … 130 130 <base:body> 131 131 <div class="summary"> 132 <b> 132 <b> 133 <% 134 if (showFailures) 135 { 136 %> 133 137 <%=errors.size() %> error(s), 134 138 <%=warnings.size()%> warning(s) 135 </b> 139 <% 140 } 141 else 142 { 143 %> 144 <i>Item-tree not validated</i> 145 <% 146 } 147 %> 148 </b> 136 149 </div> 137 <br>138 <div class="joust">139 <table border="0" cellspacing="0" cellpadding="0" width="100%">140 150 <% 141 int index = 0; 142 Iterator<Failure> all = new NestedIterator<Failure>(errors, warnings); 143 while (all.hasNext()) 144 { 145 Failure failure = all.next(); 146 Validator validator = failure.getValidator(); 147 Severity severity = options.getSeverity(validator); 148 if (severity != Severity.IGNORE) 151 if(showFailures) 152 { 153 %> 154 <br> 155 <div class="joust"> 156 <table border="0" cellspacing="0" cellpadding="0" width="100%"> 157 <% 158 int index = 0; 159 Iterator<Failure> all = new NestedIterator<Failure>(errors, warnings); 160 while (all.hasNext()) 149 161 { 150 index++; 151 String failureId = "F" + System.identityHashCode(failure); 152 Node node = failure.getNode(); 153 BasicItem item = node.getItem(); 154 String onClick = ""; 155 String tooltip = ""; 156 if (item == null) 162 Failure failure = all.next(); 163 Validator validator = failure.getValidator(); 164 Severity severity = options.getSeverity(validator); 165 if (severity != Severity.IGNORE) 157 166 { 158 tooltip = "Get more information about this failure"; 159 onClick = "failureOnClick(event, '"+failureId+"', '" + node.getId() + "')"; 167 index++; 168 String failureId = "F" + System.identityHashCode(failure); 169 Node node = failure.getNode(); 170 BasicItem item = node.getItem(); 171 String onClick = ""; 172 String tooltip = ""; 173 if (item == null) 174 { 175 tooltip = "Get more information about this failure"; 176 onClick = "failureOnClick(event, '"+failureId+"', '" + node.getId() + "')"; 177 } 178 else 179 { 180 tooltip = "Get more information about this failure (use CTRL, ALT or SHIFT to edit the item)"; 181 onClick = "failureOnClick(event, '"+failureId+"', '" + node.getId() + 182 "', '" + item.getType().name() + "', " + item.getId() + ")"; 183 } 184 %> 185 <tr id="<%=failureId%>" class="menuitem failure" 186 onclick="<%=onClick%>" 187 onmouseover="Main.addClass(this, 'hover')" 188 onmouseout="Main.removeClass(this, 'hover')" 189 title="<%=tooltip%>" 190 > 191 <td width="20px" class="index text"><%=index%></td> 192 <td width="20px" class="text"><base:icon image="<%=severity == Severity.ERROR ? "error.gif" : "warning.gif"%>" /></td> 193 <td class="text"><%=HTML.encodeTags(failure.getMessage()) %></td> 194 <td class="text"><%=HTML.encodeTags(node.getTitle()) %></td> 195 </tr> 196 <% 160 197 } 161 else162 {163 tooltip = "Get more information about this failure (use CTRL, ALT or SHIFT to edit the item)";164 onClick = "failureOnClick(event, '"+failureId+"', '" + node.getId() +165 "', '" + item.getType().name() + "', " + item.getId() + ")";166 }167 %>168 <tr id="<%=failureId%>" class="menuitem failure"169 onclick="<%=onClick%>"170 onmouseover="Main.addClass(this, 'hover')"171 onmouseout="Main.removeClass(this, 'hover')"172 title="<%=tooltip%>"173 >174 <td width="20px" class="index text"><%=index%></td>175 <td width="20px" class="text"><base:icon image="<%=severity == Severity.ERROR ? "error.gif" : "warning.gif"%>" /></td>176 <td class="text"><%=HTML.encodeTags(failure.getMessage()) %></td>177 <td class="text"><%=HTML.encodeTags(node.getTitle()) %></td>178 </tr>179 <%180 198 } 199 %> 200 </table> 201 </div> 202 <% 181 203 } 182 204 %> 183 </table>184 </div>185 205 </base:body> 186 206 </base:page> -
trunk/www/common/overview/frameset.jsp
r4765 r4840 35 35 final SessionControl sc = Base.getExistingSessionControl(pageContext, true); 36 36 final String ID = sc.getId(); 37 final String showFailures = request.getParameter("show_failures"); 37 38 %> 38 39 <base:page type="frameset" title=""> … … 40 41 <frameset cols="300,*" frameborder="yes" border="5"> 41 42 <frame name="tree" 42 src="tree.jsp?ID=<%=ID%> "43 src="tree.jsp?ID=<%=ID%>&show_failures=<%=showFailures%>" 43 44 scrolling="auto" marginwidth="0" marginheight="4" frameborder="1" 44 45 > 45 46 <frameset rows="*,200" framborder="yes" border="5"> 46 47 <frame name="info" 47 src="info.jsp?ID=<%=ID%> "48 src="info.jsp?ID=<%=ID%>&show_failures=<%=showFailures%>" 48 49 scrolling="auto" marginwidth="0" marginheight="4" frameborder="1" 49 50 > 50 51 <frame name="failures" 51 src="failures.jsp?ID=<%=ID%> "52 src="failures.jsp?ID=<%=ID%>&show_failures=<%=showFailures%>" 52 53 scrolling="auto" marginwidth="0" marginheight="4" frameborder="1" 53 54 > -
trunk/www/common/overview/index.jsp
r4823 r4840 68 68 overview.updateFailureCountOnNodes(); 69 69 dc.close(); 70 redirect = "frameset.jsp?ID="+ID ;70 redirect = "frameset.jsp?ID="+ID+"&show_failures="+false; 71 71 } 72 else if (" Revalidate".equals(cmd))72 else if ("Validate".equals(cmd)) 73 73 { 74 74 final Item itemType = Item.valueOf(request.getParameter("item_type")); … … 82 82 overview.updateFailureCountOnNodes(); 83 83 dc.close(); 84 redirect = "frameset.jsp?ID="+ID+"&item_type="+itemType.name()+"&item_id="+itemId ;84 redirect = "frameset.jsp?ID="+ID+"&item_type="+itemType.name()+"&item_id="+itemId+"&show_failures="+true; 85 85 } 86 86 else if ("SaveValidationOptions".equals(cmd)) -
trunk/www/common/overview/info.jsp
r4767 r4840 101 101 ValidationOptions options = overview.getValidationOptions(); 102 102 String nodeId = request.getParameter("nodeId"); 103 Boolean showFailures = Values.getBoolean(request.getParameter("show_failures"), false); 103 104 Node node = overview.getNode(nodeId); 104 105 if (node == null) node = overview.getRootNode(); … … 262 263 <tr> 263 264 <td class="prompt">Errors (children)</td> 264 <td><%=node.getNumErrors()+node.getChildErrors()%> (<%=node.getChildErrors()%>)</td> 265 <% 266 if (showFailures) 267 { 268 %> 269 <td><%=node.getNumErrors()+node.getChildErrors()%> (<%=node.getChildErrors()%>)</td> 270 <% 271 } 272 else 273 { 274 %> 275 <td><i>- n/a -</i></td> 276 <% 277 } 278 %> 265 279 </tr> 266 280 <tr> 267 281 <td class="prompt">Warnings (children)</td> 268 <td><%=node.getNumWarnings()+node.getChildWarnings()%> (<%=node.getChildWarnings()%>)</td> 282 <% 283 if (showFailures) 284 { 285 %> 286 <td><%=node.getNumWarnings()+node.getChildWarnings()%> (<%=node.getChildWarnings()%>)</td> 287 <% 288 } 289 else 290 { 291 %> 292 <td><i>- n/a -</i></td> 293 <% 294 } 295 %> 269 296 </tr> 270 297 <% … … 466 493 </table> 467 494 <% 468 } 469 %> 470 <h4>Failure details</h4> 471 <table> 472 <% 473 int numFailures = 0; 474 for (Failure failure : failures) 475 { 476 Validator validator = failure.getValidator(); 477 Severity severity = options.getSeverity(validator); 478 if (failure.getNode() == node && severity != Severity.IGNORE) 479 { 480 numFailures++; 481 List<Fix> fixes = failure.getFixes(); 482 %> 483 <tr> 484 <td><base:icon image="<%=severity == Severity.ERROR ? 485 "error.gif" : "warning.gif"%>" /></td> 486 <td><b><%=HTML.encodeTags(failure.getMessage())%></b></td> 487 </tr> 488 <tr> 489 <td style="border-bottom: 1px dotted #999999;"></td> 490 <td style="border-bottom: 1px dotted #999999;"> 491 <%=HTML.encodeTags(validator.getDescription())%><br> 492 <% 493 if (fixes != null && fixes.size() > 0) 494 { 495 for (Fix fix : fixes) 496 { 497 if (fix == null) continue; 498 BasicItem fixItem = fix.getItem(); 499 if (fixItem.hasPermission(Permission.WRITE)) 495 } 496 if (showFailures) 497 { 498 %> 499 <h4>Failure details</h4> 500 <table> 501 <% 502 int numFailures = 0; 503 for (Failure failure : failures) 504 { 505 Validator validator = failure.getValidator(); 506 Severity severity = options.getSeverity(validator); 507 if (failure.getNode() == node && severity != Severity.IGNORE) 508 { 509 numFailures++; 510 List<Fix> fixes = failure.getFixes(); 511 %> 512 <tr> 513 <td><base:icon image="<%=severity == Severity.ERROR ? 514 "error.gif" : "warning.gif"%>" /></td> 515 <td><b><%=HTML.encodeTags(failure.getMessage())%></b></td> 516 </tr> 517 <tr> 518 <td style="border-bottom: 1px dotted #999999;"></td> 519 <td style="border-bottom: 1px dotted #999999;"> 520 <%=HTML.encodeTags(validator.getDescription())%><br> 521 <% 522 if (fixes != null && fixes.size() > 0) 523 { 524 for (Fix fix : fixes) 500 525 { 501 String fixIt = ""; 502 if (fix.isAnnotationFix()) 526 if (fix == null) continue; 527 BasicItem fixItem = fix.getItem(); 528 if (fixItem.hasPermission(Permission.WRITE)) 503 529 { 504 AnnotationType at = fix.getAnnotationType();505 if (fix.is FromInherited())530 String fixIt = ""; 531 if (fix.isAnnotationFix()) 506 532 { 507 fixIt = "editInheritedAnnotation('" + fixItem.getType().name() + "', " + 508 fixItem.getId() + ", " + at.getId() + ")"; 533 AnnotationType at = fix.getAnnotationType(); 534 if (fix.isFromInherited()) 535 { 536 fixIt = "editInheritedAnnotation('" + fixItem.getType().name() + "', " + 537 fixItem.getId() + ", " + at.getId() + ")"; 538 } 539 else 540 { 541 fixIt = "editAnnotation('" + fixItem.getType().name() + "', " + 542 fixItem.getId() + ", " + at.getId() + ")"; 543 } 544 } 545 else if (fix.isDataFileFix()) 546 { 547 FileSetMember member = fix.getFileSetMember(); 548 fixIt = "editDataFile('" + fixItem.getType().name() + "', " + 549 fixItem.getId() + ")"; 509 550 } 510 551 else 511 552 { 512 fixIt = "edit Annotation('" + fixItem.getType().name() + "', " +513 fixItem.getId() + " , " + at.getId() + ")";553 fixIt = "editItem('" + fixItem.getType().name() + "', " + 554 fixItem.getId() + ")"; 514 555 } 556 %> 557 <base:icon image="fixit.png" 558 style="padding-bottom: 4px;" /><a href="javascript:<%=fixIt%>" 559 title="Edit this item to fix the problem"><%=HTML.encodeTags(fix.getMessage())%></a><br> 560 <% 515 561 } 516 else if (fix.isDataFileFix())517 {518 FileSetMember member = fix.getFileSetMember();519 fixIt = "editDataFile('" + fixItem.getType().name() + "', " +520 fixItem.getId() + ")";521 }522 else523 {524 fixIt = "editItem('" + fixItem.getType().name() + "', " +525 fixItem.getId() + ")";526 }527 %>528 <base:icon image="fixit.png"529 style="padding-bottom: 4px;" /><a href="javascript:<%=fixIt%>"530 title="Edit this item to fix the problem"><%=HTML.encodeTags(fix.getMessage())%></a><br>531 <%532 562 } 533 563 } 534 } 535 %> 536 </td> 537 </tr> 564 %> 565 </td> 566 </tr> 567 <% 568 } 569 } 570 %> 571 </table> 572 <% 573 if (numFailures == 0) 574 { 575 %> 576 No validation failures on this item 538 577 <% 539 } 540 } 541 %> 542 </table> 543 <% 544 if (numFailures == 0) 545 { 546 %> 547 No validation failures on this item 548 <% 578 } 549 579 } 550 580 %> -
trunk/www/common/overview/overview.jsp
r4830 r4840 96 96 frames['overview']['tree'].closeAll(); 97 97 } 98 function revalidate()99 { 98 function validate() 99 { 100 100 var url = '<%=root%>/common/overview/index.jsp?ID=<%=ID%>'; 101 url += '&cmd= Revalidate';101 url += '&cmd=Validate'; 102 102 url += '&item_type=<%=itemType.name()%>'; 103 103 url += '&item_id=<%=itemId%>'; … … 118 118 </script> 119 119 <tbl:toolbar> 120 <tbl:button image="joust/plusonly.gif" title="Expand all" 121 onclick="expandAll()" tooltip="Expand entire tree"/> 122 <tbl:button image="joust/minusonly.gif" title="Collapse all" 123 onclick="collapseAll()" tooltip="Collapse entire tree" /> 124 <tbl:button image="refresh.gif" title="Validate" 125 onclick="revalidate()" tooltip="Validate the whole tree" /> 120 121 <tbl:button image="validate.gif" title="Validate" 122 onclick="validate()" tooltip="Load and validate entire tree" /> 126 123 <tbl:button image="configure.png" title="Validation options…" 127 124 onclick="validationOptions()" tooltip="Change validation options" /> -
trunk/www/common/overview/tree.jsp
r4830 r4840 40 40 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> 41 41 <%! 42 String generateSubTree(Node startNode, String ID )42 String generateSubTree(Node startNode, String ID, boolean showFailures) 43 43 { 44 44 StringBuilder sb = new StringBuilder(); … … 53 53 54 54 String folderIcon = child.getNodeType() == Node.Type.FOLDER ? "Folder" : "Item"; 55 String tooltip = ""; 55 56 if (child.getItemType() == Item.ANNOTATIONTYPE && startNode.getItemType() == Item.PROTOCOL) 56 57 { … … 61 62 folderIcon = "Annotation"; 62 63 } 63 if (errors > 0) 64 { 65 folderIcon += "Error"; 66 } 67 else if (warnings > 0) 68 { 69 folderIcon += "Warning"; 70 } 71 else if (childErrors > 0) 72 { 73 folderIcon += "ChildError"; 74 } 75 else if (childWarnings > 0) 76 { 77 folderIcon += "ChildWarning"; 78 } 79 String tooltip = ""; 80 if (warnings > 0 && errors > 0) 81 { 82 tooltip += errors + " error(s); " + warnings + " warning(s) on this item"; 83 } 84 else if (errors > 0) 85 { 86 tooltip += errors + " error(s) on this item"; 87 } 88 else if (warnings > 0) 89 { 90 tooltip += warnings + " warning(s) on this item"; 91 } 92 if (childErrors > 0 && childWarnings > 0) 93 { 94 if (tooltip.length() > 0) tooltip += "; "; 95 tooltip += childErrors + " error(s); " + childWarnings + " warning(s) on child items"; 96 } 97 else if (childErrors > 0) 98 { 99 if (tooltip.length() > 0) tooltip += "; "; 100 tooltip += childErrors + " error(s) on child items"; 101 } 102 else if (childWarnings > 0) 103 { 104 if (tooltip.length() > 0) tooltip += "; "; 105 tooltip += childWarnings + " warning(s) on child items"; 64 65 if (showFailures) 66 { 67 if (errors > 0) 68 { 69 folderIcon += "Error"; 70 } 71 else if (warnings > 0) 72 { 73 folderIcon += "Warning"; 74 } 75 else if (childErrors > 0) 76 { 77 folderIcon += "ChildError"; 78 } 79 else if (childWarnings > 0) 80 { 81 folderIcon += "ChildWarning"; 82 } 83 if (warnings > 0 && errors > 0) 84 { 85 tooltip += errors + " error(s); " + warnings + " warning(s) on this item"; 86 } 87 else if (errors > 0) 88 { 89 tooltip += errors + " error(s) on this item"; 90 } 91 else if (warnings > 0) 92 { 93 tooltip += warnings + " warning(s) on this item"; 94 } 95 if (childErrors > 0 && childWarnings > 0) 96 { 97 if (tooltip.length() > 0) tooltip += "; "; 98 tooltip += childErrors + " error(s); " + childWarnings + " warning(s) on child items"; 99 } 100 else if (childErrors > 0) 101 { 102 if (tooltip.length() > 0) tooltip += "; "; 103 tooltip += childErrors + " error(s) on child items"; 104 } 105 else if (childWarnings > 0) 106 { 107 if (tooltip.length() > 0) tooltip += "; "; 108 tooltip += childWarnings + " warning(s) on child items"; 109 } 106 110 } 107 111 int numChildren = child.getChildren() == null ? … … 112 116 sb.append(child.getNodeType() == Node.Type.FOLDER ? " (" + numChildren + ")" : "").append("',"); 113 117 sb.append("'showInfo(\"").append(child.getId()).append("\")','").append(HTML.javaScriptEncode(tooltip)).append("', '").append(child.getId()).append("',"); 114 sb.append("'lazyInitSubNode( ").append(child.hashCode()).append(")')\n");115 sb.append(generateSubTree(child, ID ));118 sb.append("'lazyInitSubNode(\"").append(child.getId()).append("\")')\n"); 119 sb.append(generateSubTree(child, ID, showFailures)); 116 120 } 117 121 return sb.toString(); … … 126 130 { 127 131 GenericOverview overview = OverviewUtil.getCurrentOverview(sc); 128 132 Boolean showFailures = Values.getBoolean(request.getParameter("show_failures"), false); 129 133 Nameable rootItem = (Nameable)overview.getRootItem(); 130 134 Node rootNode = overview.getRootNode(); 131 135 String rootIcon = "Home"; 132 if (rootNode.getNumErrors() > 0 || rootNode.getChildErrors() > 0) 133 { 134 rootIcon = "Error"; 135 } 136 else if (rootNode.getNumWarnings() > 0 || rootNode.getChildWarnings() > 0) 137 { 138 rootIcon = "Warning"; 136 if (showFailures) 137 { 138 if (rootNode.getNumErrors() > 0 || rootNode.getChildErrors() > 0) 139 { 140 rootIcon = "Error"; 141 } 142 else if (rootNode.getNumWarnings() > 0 || rootNode.getChildWarnings() > 0) 143 { 144 rootIcon = "Warning"; 145 } 139 146 } 140 147 %> … … 190 197 IconStore.addIcon('AnnotatioChildnErrorSelected', path + 'annotationchilderrorselected.gif', 18, 16); 191 198 var node<%=rootNode.hashCode()%> = JoustMenu.addMenuItem(-1, '<%=rootIcon%>', '<%=HTML.javaScriptEncode(rootItem.getName())%>', 'showInfo("<%=rootNode.getId()%>")', '', '<%=rootNode.getId()%>'); 192 <%=generateSubTree(rootNode, ID )%>199 <%=generateSubTree(rootNode, ID, showFailures)%> 193 200 JoustMenu.menuItems[node<%=rootNode.hashCode()%>].isOpen = true; 194 201 JoustMenu.draw('joust'); … … 208 215 function showInfo(nodeId) 209 216 { 210 parent.frames['info'].location.href = 'info.jsp?ID=<%=ID%>&nodeId='+nodeId ;217 parent.frames['info'].location.href = 'info.jsp?ID=<%=ID%>&nodeId='+nodeId+'&show_failures=<%=showFailures%>'; 211 218 } 212 219 … … 229 236 function lazyInitSubNode(nodeId) 230 237 { 231 var parentMenu = JoustMenu.menuItems[ 'N' +nodeId];238 var parentMenu = JoustMenu.menuItems[nodeId]; 232 239 JoustMenu.changeCursorOnMenuItem(parentMenu.index, 'progress'); 233 240 var request = Ajax.getXmlHttpRequest(); … … 246 253 { 247 254 var id = kv['id']; 248 var folderIcon = kv['folderIcon']; 249 var parentIconSuffix = kv['parentIconSuffix']; 250 var tooltip = kv['tooltip'] ? kv['tooltip'] : ''; 251 var parentTooltip = kv['parentTooltip'] ? kv['parentTooltip'] : ''; 255 var folderIcon = kv['folderIcon']; 252 256 numAdded++; 253 257 var node = JoustMenu.addLazyChildItem( 254 parentMenu.index, folderIcon, kv['title'], 'showInfo(\''+id+'\')', 255 tooltip , id, 'lazyInitSubNode('+kv['hashCode']+')'); 256 257 if (parentIconSuffix) 258 { 259 updateParentMenu(parentMenu, parentIconSuffix, parentTooltip); 260 JoustMenu.menuItems['0'].iconName = parentIconSuffix; 261 reloadSiblingFrames(); 262 } 258 parentMenu.index, folderIcon, Main.trimString(kv['title']), 'showInfo(\''+id+'\')', 259 '' , id, 'lazyInitSubNode(\''+id+'\')'); 263 260 } 264 261 else … … 271 268 JoustMenu.changeCursorOnMenuItem(parentMenu.index, 'pointer'); 272 269 return numAdded > 0; 273 }274 275 function reloadSiblingFrames()276 {277 parent.frames.failures.location.reload();278 parent.frames.info.location.reload();279 }280 281 function updateParentMenu(menuItem, iconSuffix, tooltip)282 {283 menuItem.tooltip = tooltip;284 var currentIcon = menuItem.iconName;285 if (currentIcon.indexOf('Error') < 0 && currentIcon.indexOf('Warning') < 0)286 {287 menuItem.iconName += iconSuffix;288 }289 else if (iconSuffix == 'Error')290 {291 menuItem.iconName = currentIcon.replace(/ChildError/, iconSuffix);292 menuItem.iconName = currentIcon.replace(/ChildWarning/, iconSuffix);293 menuItem.iconName = currentIcon.replace(/Warning/, iconSuffix);294 }295 else if (iconSuffix == 'Warning')296 {297 menuItem.iconName = currentIcon.replace(/ChildError/, iconSuffix);298 menuItem.iconName = currentIcon.replace(/ChildWarning/, iconSuffix);299 }300 updateIconRecursively(menuItem.parentItemIndex, 'Child'+iconSuffix);301 }302 303 function updateIconRecursively(itemIndex, newIconSuffix)304 {305 var item = JoustMenu.menuItems[itemIndex];306 var currentIcon = item.iconName;307 if (currentIcon.indexOf('Error') < 0 && currentIcon.indexOf('Warning') < 0)308 {309 item.iconName += newIconSuffix;310 }311 else if (newIconSuffix == 'ChildError')312 {313 item.iconName = currentIcon.replace(/ChildWarning/, newIconSuffix);314 }315 if (item.parentItemIndex > 0)316 {317 updateIconRecursively(item.parentItemIndex, newIconSuffix);318 }319 270 } 320 271
Note: See TracChangeset
for help on using the changeset viewer.