Author: tyrell Date: Thu Jun 5 08:32:39 2008 New Revision: 18032 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18032
Log: Adding a header, which contains user data and sign out handling. Added: trunk/mashup/java/modules/dashboard/header.jsp trunk/mashup/java/modules/dashboard/images/ trunk/mashup/java/modules/dashboard/images/wso2_mashup_logo.gif (contents, props changed) Modified: trunk/mashup/java/modules/dashboard/directory.jsp trunk/mashup/java/modules/dashboard/index.jsp trunk/mashup/java/modules/dashboard/javascript/gadgets.js trunk/mashup/java/modules/dashboard/login_validator.jsp Modified: trunk/mashup/java/modules/dashboard/directory.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/dashboard/directory.jsp?rev=18032&r1=18031&r2=18032&view=diff ============================================================================== --- trunk/mashup/java/modules/dashboard/directory.jsp (original) +++ trunk/mashup/java/modules/dashboard/directory.jsp Thu Jun 5 08:32:39 2008 @@ -69,8 +69,10 @@ </script> </head> <body> -<h2><%= bundle.getString("main.title")%> - Customize <%=RegistryUtils - .getFullName(request, currentUser)%>s Dashboard</h2> +<%@ include file="header.jsp" %> +<br/> +<div align="left" style="font-size: 30px;"><%= bundle.getString("main.title")%> - Customize <%=RegistryUtils + .getFullName(request, currentUser)%>s Dashboard</div> <h4>You can add Google Gadgets from remote servers or select from Mashups available in this server.</h4> Added: trunk/mashup/java/modules/dashboard/header.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/dashboard/header.jsp?pathrev=18032 ============================================================================== --- (empty file) +++ trunk/mashup/java/modules/dashboard/header.jsp Thu Jun 5 08:32:39 2008 @@ -0,0 +1,37 @@ +<%-- + * Copyright 2006,2007 WSO2, Inc. http://www.wso2.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--%> + +<div align="right"> + + <div align="right" width="100%" style="padding: 0pt 0pt 4px; font-size: 84%;" id="user-data"> + <img src="images/wso2_mashup_logo.gif" alt="mashup logo" align="left"/> + <nobr> + <b><%=RegistryUtils.getFullName(request, currentUser)%> [<%=currentUser%>] + <% + if (!RegistryUtils.isLoggedIn(userRegistry)) { + %> + <a href="../signin.jsp">Sign In</a> + <% + } + %> + </b> | <a + href="../index.jsp">Classic Home</a> | <a href="../user.jsp?name=<%=currentUser%>">My + Account</a> | <a + href="../signout.jsp?bounceback=dashboard/index.jsp?signout=true">Sign out</a> + </nobr> + </div> + +</div> \ No newline at end of file Added: trunk/mashup/java/modules/dashboard/images/wso2_mashup_logo.gif URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/dashboard/images/wso2_mashup_logo.gif?pathrev=18032 ============================================================================== Binary file. No diff available. Modified: trunk/mashup/java/modules/dashboard/index.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/dashboard/index.jsp?rev=18032&r1=18031&r2=18032&view=diff ============================================================================== --- trunk/mashup/java/modules/dashboard/index.jsp (original) +++ trunk/mashup/java/modules/dashboard/index.jsp Thu Jun 5 08:32:39 2008 @@ -126,7 +126,19 @@ </script> </head> <body onLoad="wso2.dashboard.init();wso2.dashboard.renderGadgets()"> -<h2><%= bundle.getString("main.title")%> - Dashboard [<%=currentUser%>]</h2> +<%@ include file="header.jsp" %> +<br/> + +<div align="left" style="font-size: 30px;"><%= bundle.getString("main.title")%> - Dashboard</div> +<div> + <% + if (RegistryUtils.isLoggedIn(userRegistry)) { + %> + [<a href="directory.jsp">Add Gadgets</a>] + <% + } + %> +</div> <div id="widgets"> <% Modified: trunk/mashup/java/modules/dashboard/javascript/gadgets.js URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/dashboard/javascript/gadgets.js?rev=18032&r1=18031&r2=18032&view=diff ============================================================================== --- trunk/mashup/java/modules/dashboard/javascript/gadgets.js (original) +++ trunk/mashup/java/modules/dashboard/javascript/gadgets.js Thu Jun 5 08:32:39 2008 @@ -485,7 +485,7 @@ gadgets.IfrGadget.prototype.cssClassTitleButton = 'gadgets-gadget-title-button'; gadgets.IfrGadget.prototype.cssClassGadgetContent = 'gadgets-gadget-content'; gadgets.IfrGadget.prototype.rpcToken = (0x7FFFFFFF * Math.random()) | 0; -gadgets.IfrGadget.prototype.rpcRelay = '../rpc_relay.html'; +gadgets.IfrGadget.prototype.rpcRelay = 'rpc_relay.html'; gadgets.IfrGadget.prototype.getTitleBarContent = function(continuation) { continuation('<div id="' + this.cssClassTitleBar + '-' + this.id + Modified: trunk/mashup/java/modules/dashboard/login_validator.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/dashboard/login_validator.jsp?rev=18032&r1=18031&r2=18032&view=diff ============================================================================== --- trunk/mashup/java/modules/dashboard/login_validator.jsp (original) +++ trunk/mashup/java/modules/dashboard/login_validator.jsp Thu Jun 5 08:32:39 2008 @@ -9,6 +9,15 @@ <%@ page import="java.util.ResourceBundle" %> <% + String signout = request.getParameter("signout"); + + if(signout != null){ + if(signout.equalsIgnoreCase("true")){ + request.getSession().setAttribute(MashupConstants.USER_REGISTRY, null); + response.sendRedirect("index.jsp"); + } + } + ResourceBundle bundle = ResourceBundle.getBundle("UI"); ServerManager serverManager = ServerManager.getInstance(); _______________________________________________ Mashup-dev mailing list [email protected] http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
