Author: jonathan
Date: Tue Jan 22 20:13:36 2008
New Revision: 12716
Log:
Reordered and regrouped task bars.
Styled in rounded boxes.
Added:
trunk/mashup/java/modules/www/images/box2-bot.jpg (contents, props changed)
trunk/mashup/java/modules/www/images/box2-leftbot.jpg (contents, props
changed)
trunk/mashup/java/modules/www/images/box2-lefttop.jpg (contents, props
changed)
trunk/mashup/java/modules/www/images/box2-rightbot.jpg (contents, props
changed)
trunk/mashup/java/modules/www/images/box2-righttop.jpg (contents, props
changed)
trunk/mashup/java/modules/www/images/box2-top.jpg (contents, props changed)
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
trunk/mashup/java/modules/www/css/styles.css
trunk/mashup/java/modules/www/taskbar.jsp
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
==============================================================================
---
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
(original)
+++
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
Tue Jan 22 20:13:36 2008
@@ -144,7 +144,7 @@
return false;
}
- public static boolean isAdminRole(Registry registry) throws
RegistryException {
+ public static boolean signisAdminRole(Registry registry) throws
RegistryException {
if (registry instanceof SecureRegistry) {
SecureRegistry secureRegistry = (SecureRegistry) registry;
Modified: trunk/mashup/java/modules/www/css/styles.css
==============================================================================
--- trunk/mashup/java/modules/www/css/styles.css (original)
+++ trunk/mashup/java/modules/www/css/styles.css Tue Jan 22 20:13:36 2008
@@ -42,7 +42,7 @@
}
ul {
- margin-top: 0px;
+ margin: 0px;
padding-left: 1.3em;
}
@@ -186,6 +186,38 @@
margin: 1em;
}
+div.rbroundbox { margin-bottom:.5em;}
+div.rbTitle { background: url(../images/box2-top.jpg) repeat-x top left;
+ margin: 0px 14px 0px 14px;
+ padding:4px .3em 0px .3em;
+ font-weight: bold;
+ color: white; /*#1E6DCC;*/
+ height: 35px;
+ }
+div.rbtop div.bg { background: url(../images/box2-lefttop.jpg) no-repeat top
left; }
+div.rbtop { background: url(../images/box2-righttop.jpg) no-repeat top
right; }
+div.rbtop div.bg, div.rbtop {
+ width:100%;
+ height: 35px;
+}
+
+div.rbFooter { background: url(../images/box2-bot.jpg) repeat-x bottom left;
+ margin: 0px 10px 0px 14px;
+ height: 11px;
+ }
+div.rbbot div.bg { background: url(../images/box2-leftbot.jpg) no-repeat
bottom left; }
+div.rbbot { background: url(../images/box2-rightbot.jpg) no-repeat bottom
right; }
+
+div.rbbot div.bg, div.rbbot {
+ width: 100%;
+ height: 11px;
+}
+div.rbcontent { border-left:solid 2px #ced8bf;
+ border-right:solid 2px #ced8bf;
+ padding: 0 14px;
+ }
+div.rbcontent li {padding-bottom: .2em}
+
div.querypane {
margin-bottom: 1.5em;
}
@@ -213,26 +245,6 @@
width: 35px;
}
-.box {
- border: 1px solid #E8E8E8;
- font-size: 8pt;
-}
-
-.box span {
- color: #1E6DCC;
-}
-
-.box th {
- background-color: #E8E8E8;
- text-align: left;
- padding: 3px;
- padding-left: 7px;
- font-size: 9pt;
- font-weight: normal;
- color: #1E6DCC;
-
-}
-
.data {
font-size: 8pt;
margin-left:24px;
@@ -374,6 +386,7 @@
color: white;
padding: 8px;
background-color: #96A64B;
+ clear:both;
}
.rating {
Added: trunk/mashup/java/modules/www/images/box2-bot.jpg
==============================================================================
Binary file. No diff available.
Added: trunk/mashup/java/modules/www/images/box2-leftbot.jpg
==============================================================================
Binary file. No diff available.
Added: trunk/mashup/java/modules/www/images/box2-lefttop.jpg
==============================================================================
Binary file. No diff available.
Added: trunk/mashup/java/modules/www/images/box2-rightbot.jpg
==============================================================================
Binary file. No diff available.
Added: trunk/mashup/java/modules/www/images/box2-righttop.jpg
==============================================================================
Binary file. No diff available.
Added: trunk/mashup/java/modules/www/images/box2-top.jpg
==============================================================================
Binary file. No diff available.
Modified: trunk/mashup/java/modules/www/taskbar.jsp
==============================================================================
--- trunk/mashup/java/modules/www/taskbar.jsp (original)
+++ trunk/mashup/java/modules/www/taskbar.jsp Tue Jan 22 20:13:36 2008
@@ -63,15 +63,13 @@
}
%>
-<table width="100%" border="0" class="box" cellspacing="0" cellpadding="3">
-<tr>
- <th>Tasks</th>
-</tr>
+<div class="rbroundbox">
+ <div class="rbtop"><div class="bg"><div class="rbTitle">Management
tasks</div></div></div>
+ <div class="rbcontent">
+
<!--Tasks will be available only to logged in users-->
<%
if (RegistryUtils.isLoggedIn(registry)) { %>
-<tr>
-<td>
<ul>
<!--Will be available only to users with Admin priviledges OR who are Authors
of the current Mashup, if there is a Mashup service set by the parent page.-->
<% if (((RegistryUtils.isAdminRole(registry)) ||
@@ -84,6 +82,57 @@
Service editing is not available
</li>
+
+<script type="text/javascript">
+ function deleteServiceCallback() {
+ window.location = "index.jsp";
+ }
+
+ function deleteService() {
+ var confirmation = confirm("You are about to permanently delete the
'<%=paramMashupServiceName%>' service. Are you sure?")
+
+ if (confirmation) {
+ wso2.mashup.services.deleteService('<%=paramMashupServiceName%>',
deleteServiceCallback);
+ }
+ }
+
+ function redeployServiceCallback() {
+ var response ;
+
+ var browser = WSRequest.util._getBrowser();
+ if (browser == "ie" || browser == "ie7") {
+ response =
+
this.req.responseXML.getElementsByTagName("ns:return")[0].firstChild.nodeValue;
+ } else {
+ response =
+
this.req.responseXML.getElementsByTagName("return")[0].firstChild.nodeValue;
+ }
+
+ if (response == "true") {
+ alert("Successfully re deployed the service");
+ } else {
+ alert("Re deployment failed.");
+ }
+ }
+
+ function redeployService() {
+ var confirmation = confirm("You are about to re-deploy the
'<%=paramMashupServiceName%>' service. Are you sure?")
+
+ if (confirmation) {
+
wso2.mashup.services.reDeployService('<%=paramMashupServiceName%>',
redeployServiceCallback);
+ }
+ }
+</script>
+<li id="redeploy-service">
+ <a href="#"
+ onclick="redeployService();">Re deploy this service</a>
+</li>
+
+<li id="delete-service">
+ <a href="#"
+ onclick="deleteService();">Delete this service</a>
+</li>
+
<script type="text/javascript">
//Getting the Current status of the service
function handleServiceStartStopCallback() {
@@ -98,7 +147,7 @@
'<a href="editor.jsp?action=edit&mashup=<%=paramPath%>">Edit this
service</a>';
//Enabling service sharing
document.getElementById("share-mashup").innerHTML =
- ' <a href="#"
onclick="WSO2.MashupUtils.showMashupSharingDialog(\'<%=paramMashupServiceName%>\');">Share
this service</a>';
+ ' <a href="#"
onclick="WSO2.MashupUtils.showMashupSharingDialog(\'<%=paramMashupServiceName%>\');">Share
this mashup</a>';
//Enabling service deletion
var delElem = document.getElementById("delete-service");
if (!(delElem == "undefined")) {
@@ -134,7 +183,7 @@
'<a href="editor.jsp?action=edit&mashup=<%=paramPath%>">Edit this
service</a>';
//Enabling service sharing
document.getElementById("share-mashup").innerHTML =
- ' <a href="#"
onclick="WSO2.MashupUtils.showMashupSharingDialog(\'<%=paramMashupServiceName%>\');">Share
this service</a>';
+ ' <a href="#"
onclick="WSO2.MashupUtils.showMashupSharingDialog(\'<%=paramMashupServiceName%>\');">Share
this mashup</a>';
//Enabling service deletion
var delElem = document.getElementById("delete-service");
if (!(delElem == "undefined")) {
@@ -163,57 +212,8 @@
<li id="share-mashup">
Service sharing is not available
</li>
-<script type="text/javascript">
- function deleteServiceCallback() {
- window.location = "index.jsp";
- }
-
- function deleteService() {
- var confirmation = confirm("You are about to permanently delete the
'<%=paramMashupServiceName%>' service. Are you sure?")
- if (confirmation) {
- wso2.mashup.services.deleteService('<%=paramMashupServiceName%>',
deleteServiceCallback);
- }
- }
-
- function redeployServiceCallback() {
- var response ;
-
- var browser = WSRequest.util._getBrowser();
- if (browser == "ie" || browser == "ie7") {
- response =
-
this.req.responseXML.getElementsByTagName("ns:return")[0].firstChild.nodeValue;
- } else {
- response =
-
this.req.responseXML.getElementsByTagName("return")[0].firstChild.nodeValue;
- }
-
- if (response == "true") {
- alert("Successfully re deployed the service");
- } else {
- alert("Re deployment failed.");
- }
- }
-
- function redeployService() {
- var confirmation = confirm("You are about to re-deploy the
'<%=paramMashupServiceName%>' service. Are you sure?")
-
- if (confirmation) {
-
wso2.mashup.services.reDeployService('<%=paramMashupServiceName%>',
redeployServiceCallback);
- }
- }
-</script>
-<li id="redeploy-service">
- <a href="#"
- onclick="redeployService();">Re deploy this service</a>
-</li>
-
-<li id="delete-service">
- <a href="#"
- onclick="deleteService();">Delete this service</a>
-</li>
-
-<li>
+<li style="margin-bottom:.7em">
<a href="#"
onclick="WSO2.MashupUtils.showMashupDownloadingDialog('<%=paramMashupServiceName%>');">Download
this mashup</a>
@@ -221,7 +221,9 @@
<%
}
%>
+</ul>
+<ul>
<li>
<a href="#"
onclick="WSO2.MashupUtils.showCreateMashupDialog('<%=currentUser%>');">Create a
new service</a>
@@ -237,8 +239,34 @@
<!--<li>
<a href="#">Use the data service assistant</a>
</li>-->
-<!--Will only be available for administrators -->
+
+
+<% String linkedName = request.getParameter("name");
+ if (RegistryUtils.getCurrentUser(registry).equals(linkedName)) { %>
+<li>
+ Register your <a href="infocard.jsp">infocard</a>
+</li>
+<% } %>
+<!--
+<li>
+ <a href="#">Add virtual directory**</a>
+</li>
+-->
+</ul>
+<%} else {%>
+<a href="signin.jsp?bounceback=<%=thisPage%>">Sign in</a> to create or manage
a mashup</td>
+<%}%>
+ </div>
+ <div class="rbbot"><div class="bg"><div class="rbFooter"></div></div></div>
+</div>
+
+
<% if (RegistryUtils.isAdminRole(registry)) { %>
+<div class="rbroundbox">
+ <div class="rbtop"><div class="bg"><div class="rbTitle">Administrative
tasks</div></div></div>
+ <div class="rbcontent">
+<!--Will only be available for administrators -->
+<ul>
<li>
<a href="add_user.jsp?firstcall=true">Add User</a>
</li>
@@ -255,32 +283,16 @@
<li>
<a href="log_reader.jsp">View Server Log</a>
</li>
-<% } %>
-
-<% String linkedName = request.getParameter("name");
- if (RegistryUtils.getCurrentUser(registry).equals(linkedName)) { %>
-<li>
- Register your <a href="infocard.jsp">infocard</a>
-</li>
-<% } %>
-<!--
-<li>
- <a href="#">Add virtual directory**</a>
-</li>
--->
</ul>
-</td>
-</tr>
-<%} else {%>
-<tr>
- <td><a href="signin.jsp?bounceback=<%=thisPage%>">Sign in</a> to perform
tasks</td>
-</tr>
+
+ </div>
+ <div class="rbbot"><div class="bg"><div class="rbFooter"></div></div></div>
+</div>
<%}%>
-<tr>
- <th>Resources</th>
-</tr>
-<tr>
- <td>
+
+<div class="rbroundbox">
+ <div class="rbtop"><div class="bg"><div
class="rbTitle">Resources</div></div></div>
+ <div class="rbcontent">
<ul>
<li>
<a href="../about.jsp">About the <%=
bundle.getString("main.title")%></a>
@@ -301,8 +313,8 @@
<a href="https://wso2.org/jira/browse/MASHUP">File a bug</a>
</li>
</ul>
- </td>
-</tr>
-</table>
+ </div>
+ <div class="rbbot"><div class="bg"><div class="rbFooter"></div></div></div>
+</div>
<div id="announcements"></div>
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev