Changeset 5069 for trunk/www/admin/protocols/view_protocol.jsp
- Timestamp:
- Aug 20, 2009, 10:53:16 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/admin/protocols/view_protocol.jsp
r5042 r5069 49 49 import="net.sf.basedb.core.query.Hql" 50 50 import="net.sf.basedb.clients.web.Base" 51 import="net.sf.basedb.clients.web.ChangeHistoryUtil" 51 52 import="net.sf.basedb.clients.web.PermissionUtil" 52 53 import="net.sf.basedb.clients.web.util.HTML" … … 78 79 final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); 79 80 final int itemId = cc.getId(); 81 final String tab = Values.getString(request.getParameter("tab"), "properties"); 80 82 final float scale = Base.getScale(sc); 81 83 final DbControl dc = sc.newDbControl(); … … 140 142 Main.openPopup('index.jsp?ID=<%=ID%>&cmd='+cmd+'&item_id=<%=itemId%>', 'RunPlugin'+cmd, 740, 540); 141 143 } 144 function switchTab(tabControlId, tabId) 145 { 146 if (TabControl.isActive(tabControlId, tabId)) return; 147 if (tabId == 'history' && tabId != '<%=tab%>') 148 { 149 location.href = 'index.jsp?ID=<%=ID%>&cmd=ViewItem&item_id=<%=itemId%>&tab='+tabId; 150 } 151 else 152 { 153 TabControl.setActiveTab(tabControlId, tabId); 154 } 155 } 142 156 </script> 143 157 </base:head> … … 149 163 </p:path> 150 164 151 <t:tabcontrol id="main" active=" properties">165 <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false"> 152 166 <t:tab id="properties" title="Properties"> 153 167 … … 455 469 </div> 456 470 </t:tab> 457 471 <t:tab id="history" title="Change history" 472 tooltip="Displays a log of all modifications made to this item" 473 visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> 474 <% 475 if ("history".equals(tab)) 476 { 477 %> 478 <jsp:include page="../../common/history/frameset.jsp"> 479 <jsp:param name="source_type" value="<%=itemType.name()%>" /> 480 <jsp:param name="source_id" value="<%=itemId%>" /> 481 <jsp:param name="ID" value="<%=ID%>" /> 482 </jsp:include> 483 <% 484 } 485 %> 486 </t:tab> 458 487 </t:tabcontrol> 459 488
Note: See TracChangeset
for help on using the changeset viewer.