From: PiX64 <pi...@us...> - 2011-01-26 02:17:49
|
Update of /cvsroot/sageplugins/webapp/WebContent/m In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv4356/WebContent/m Modified Files: menu.jsp Log Message: Modified menu to include web remote links for all connected devices. Index: menu.jsp =================================================================== RCS file: /cvsroot/sageplugins/webapp/WebContent/m/menu.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** menu.jsp 5 Nov 2010 03:08:01 -0000 1.5 --- menu.jsp 26 Jan 2011 02:17:42 -0000 1.6 *************** *** 10,13 **** --- 10,14 ---- <%@ page import="org.json.*"%> <%@ page import="org.mortbay.log.*" %> + <%@ taglib prefix="sageglbl" tagdir="/WEB-INF/tags/sage/api/global" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> *************** *** 62,65 **** --- 63,92 ---- <div class="menu section"><b><%= menuName.toString() %></b></div> <% + //************Custom code for web remote sub menus************* + if (menuName.equals("Web Remote")){%> + <sageglbl:GetUIContextNames var="contexts"/> + <sageglbl:GetConnectedClients var="connectedClients"/> + <table cellpadding="0" cellspacing="0"> + <c:forEach var="context" items="${contexts}"> + <c:set var="contextName" value="<%= sagex.webserver.UIContextTranslator.doTranslate(pageContext.getAttribute("context").toString()) %>"/> + <tr> + <td class="menuimage"></td> + <td class="menuitem"> + <a href="webremote.jsp?context=${context}">${contextName}</a> + </td> + </tr> + </c:forEach> + <c:forEach var="client" items="${connectedClients}"> + <tr> + <c:set var="clientName" value= "<%= sagex.webserver.UIContextTranslator.doTranslate(pageContext.getAttribute("client").toString()) %>"/> + <td class="menuimage"></td> + <td class="menuitem"> + <a href="webremote.jsp?context=${client}">${clientName}</a> + </td> + </tr> + </c:forEach> + </table> + <%} + //************End custom code for web remote sub menus******************* JSONArray items = menu.optJSONArray("items"); //if (menu.length() >= 4) *************** *** 89,92 **** --- 116,120 ---- request.setAttribute("menuItemImage", JSONObject.NULL.equals(menuItemImage) ? null : menuItemImage); %> + <tr> <td class="menuimage"><c:if test="${!empty menuItemImage}"><img src="${menuItemImage}"/></c:if></td> *************** *** 96,99 **** --- 124,128 ---- } %> + </table> <% *************** *** 101,105 **** } %> ! </div> --- 130,134 ---- } %> ! </div> |