Author: jonathan Date: Mon Jun 2 14:47:11 2008 New Revision: 17799 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=17799
Log: Improved (?) organization and consistent styling of mashup page. Modified: trunk/mashup/java/modules/www/css/styles.css trunk/mashup/java/modules/www/mashup.jsp Modified: trunk/mashup/java/modules/www/css/styles.css URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/css/styles.css?rev=17799&r1=17798&r2=17799&view=diff ============================================================================== --- trunk/mashup/java/modules/www/css/styles.css (original) +++ trunk/mashup/java/modules/www/css/styles.css Mon Jun 2 14:47:11 2008 @@ -611,6 +611,14 @@ font-size: 12px;; } +.transport-enabled { + color:green; +} + +.transport-disabled { + color:red; +} + #editFullName_input_text { height: 1.25em; width: 60%; @@ -777,11 +785,9 @@ } .link-cloud a { - text-decoration: none; } .link-cloud a:hover { - text-decoration: underline; } .link-cloud .link-cloud1 { @@ -804,6 +810,10 @@ font-size: 15pt; } +#addtag { + margin-top:.25em +} + pre { width: 490; white-space: pre; /* CSS2 */ Modified: trunk/mashup/java/modules/www/mashup.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/mashup.jsp?rev=17799&r1=17798&r2=17799&view=diff ============================================================================== --- trunk/mashup/java/modules/www/mashup.jsp (original) +++ trunk/mashup/java/modules/www/mashup.jsp Mon Jun 2 14:47:11 2008 @@ -287,8 +287,8 @@ if (response == "true") { var element = document.getElementById(this.params[0]); element.innerHTML = ""; - element.innerHTML = document.getElementById(this.params[0]).innerHTML = '<font color="green"><b>' + this.params[1] + '</b> transport is enabled for this Mashup.</font> [ <a href="#" onclick="disableTransport(\'' + this.params[2] + '\', \'' + this.params[1] + '\', \'' + this.params[0] + '\');">Disable</a> ]'; - }else{ + element.innerHTML = document.getElementById(this.params[0]).innerHTML = '<b>' + this.params[1] + '</b> transport is <span class="transport-enabled">enabled</span> for this service. [<a href="#" onclick="disableTransport(\'' + this.params[2] + '\', \'' + this.params[1] + '\', \'' + this.params[0] + '\');">Disable</a>]'; + } else{ wso2.wsf.Util.alertMessage("Sorry!! Failed to enable transport. Please try again."); } } @@ -316,8 +316,8 @@ if (response == "true") { var element = document.getElementById(this.params[0]); element.innerHTML = ""; - element.innerHTML = document.getElementById(this.params[0]).innerHTML = '<font color="orange"><b>' + this.params[1] + '</b> transport is disabled for this Mashup.</font> [ <a href="#" onclick="enableTransport(\'' + this.params[2] + '\', \'' + this.params[1] + '\', \'' + this.params[0] + '\');">Enable</a> ]'; - }else{ + element.innerHTML = document.getElementById(this.params[0]).innerHTML = '<b>' + this.params[1] + '</b> transport is <span class="transport-disabled">disabled</span> for this service. [<a href="#" onclick="enableTransport(\'' + this.params[2] + '\', \'' + this.params[1] + '\', \'' + this.params[0] + '\');">Enable</a>]'; + } else{ wso2.wsf.Util.alertMessage("Sorry!! Failed to disable transport. Please try again."); } } @@ -373,6 +373,17 @@ </tr> <tr> <td class="mashup_label"> + <nobr>rating:</nobr> + </td> + <td> + <div class="mashup_details"> + <% String id = "rating"; %> + <%@ include file="rating.jsp" %> + </div> + </td> +</tr> +<tr> + <td class="mashup_label"> <nobr>description:</nobr> </td> <td> @@ -396,15 +407,54 @@ </div> </td> </tr> + <tr> <td class="mashup_label"> - <nobr>rating:</nobr> + <nobr>tags:</nobr> </td> - <td> - <div class="mashup_details"> - <% String id = "rating"; %> - <%@ include file="rating.jsp" %> - </div> + <td id="tags_area"> + <div class="link-cloud" id="taglist"> + + <% org.wso2.registry.Tag[] tags = userRegistry.getTags(resource.getPath()); + + if (tags.length == 0) { %> + -none- + <% } + for (int i = 0; i < tags.length; i++) { + Tag tag = tags[i]; + String name = tag.getTagName(); + boolean canDelete = (author.equals(currentUser)); + + if (!canDelete) { + QueryResults isTagger = RegistryUtils.doQuery(userRegistry, + "User has permission to delete?", + MashupConstants.USER_TAGS_QUERY_PATH, + new String[] { path, + name, + currentUser }, + MashupConstants.MAX_RESULTS_COUNT); + canDelete = !(isTagger.getResults().isEmpty()); + } %> + <a class="link-cloud2" href="search.jsp?query=mashups&for=<%=name%>&tags=true"><%=name%></a><% + if (canDelete) { + %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="removeTag('<%=name%>')"/></span><% + } else if (RegistryUtils.isAdminRole(userRegistry)) { + %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="WSO2.MashupUtils.showTagDeletionDialog('<%=name%>')"/></span><% + } + if (i < tags.length - 1) out.print(","); %> <% + } %> + </div> + <% if (RegistryUtils.isLoggedIn(userRegistry)) { %> + <div id="addtag"> + <div> + <input type="hidden" value="<%=path%>" id="addtag_path"/> + <input type="hidden" value="<%=currentUser%>" id="addtag_tagger"/> + <input type="text" size="30" value="" id="addtag_tag" onkeydown="checkEnter(event)"/> + <input type="submit" id="addtag_submit" value="Tag" onClick="addTag()"/> + <span class="hint">(separate tags with commas)</span> + </div> + </div> + <% } %> </td> </tr> <tr> @@ -416,13 +466,13 @@ <td> <div class="mashup_details"> <ul> - <li id="custom_ui_link">A HTML interface is not available for this service</li> + <li id="custom_ui_link">A HTML interface is not available for this service.</li> <!--Checking whether a custom UI is available for this Mashup--> <script type="text/javascript"> function customUiCallback() { document.getElementById("custom_ui_link").innerHTML = - 'View the <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>/" target="_blank">HTML Interface</a> to the service' + 'View the <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>/" target="_blank">HTML Interface</a> to the service.' } isCustomUiAvailable('<%=mashupServerURL%><%=author%>/<%= mashup %>', customUiCallback); @@ -430,19 +480,25 @@ <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?tryit" title="?tryit" target="_blank">Try</a> the - service + service. </li> <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?gadget" title="?gadget" target="_blank">Try</a> the - service as a Google Gadget + service as a Google Gadget. </li> <li>Read <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?doc" title="?doc" target="_blank">API - documentation</a> + documentation</a>. </li> <li>View the <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?source&content-type=text/plain" - title="?source" target="_blank">source code</a></li> + title="?source" target="_blank">source code</a>.</li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=html">Source code template</a> + for an HTML interface for this service. + </li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=googlegadget">Source code template</a> + for a Google Gadget for this service. + </li> </ul> </div> @@ -476,76 +532,19 @@ <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?stub&lang=e4x&localhost=true&content-type=text/plain">Javascript (E4X) stub using "localhost" endpoints</a> - optimum for a Mashup hosted on this server </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=html">Source code template</a> - for an HTML interface for this service - </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=googlegadget">Source code template</a> - for a Google Gadget for this service - </li> </ul> </div> </td> </tr> -<tr> - <td class="mashup_label"> - <nobr>tags:</nobr> - </td> - <td id="tags_area"> - <div class="link-cloud" id="taglist"> - - <% org.wso2.registry.Tag[] tags = userRegistry.getTags(resource.getPath()); - - if (tags.length == 0) { %> - -none- - <% } - for (int i = 0; i < tags.length; i++) { - Tag tag = tags[i]; - String name = tag.getTagName(); - boolean canDelete = (author.equals(currentUser)); - - if (!canDelete) { - QueryResults isTagger = RegistryUtils.doQuery(userRegistry, - "User has permission to delete?", - MashupConstants.USER_TAGS_QUERY_PATH, - new String[] { path, - name, - currentUser }, - MashupConstants.MAX_RESULTS_COUNT); - canDelete = !(isTagger.getResults().isEmpty()); - } %> - <a class="link-cloud2" href="search.jsp?query=mashups&for=<%=name%>&tags=true"><%=name%></a><% - if (canDelete) { - %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="removeTag('<%=name%>')"/></span><% - } else if (RegistryUtils.isAdminRole(userRegistry)) { - %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="WSO2.MashupUtils.showTagDeletionDialog('<%=name%>')"/></span><% - } - if (i < tags.length - 1) out.print(","); %> <% - } %> - </div> - <% if (RegistryUtils.isLoggedIn(userRegistry)) { %> - <br> - - <div> - - <input type="hidden" value="<%=path%>" id="addtag_path"/> - <input type="hidden" value="<%=currentUser%>" id="addtag_tagger"/> - <input type="text" size="40" value="" id="addtag_tag" onkeydown="checkEnter(event)"/> - <input type="submit" id="addtag_submit" value="Tag" onClick="addTag()"/> - </div> - <div class="hint">(separate tags with commas)</div> - <% } %> - <br/> - -</tr> <% //Service transports handling will only be available to the service author and admins if((author.equals(currentUser)) || (RegistryUtils.isAdminRole(userRegistry))){%> <tr> <td class="mashup_label"> - <nobr>Transports:</nobr> + <nobr>configuration:</nobr> </td> <td id="transports_area"> - <div> + <div class="mashup_details"> <ul> <% Iterator availableTransports = MashupUtils.getAvailableAxisTransports().values().iterator(); @@ -557,7 +556,7 @@ %> <li> <div id="transport_<%=transportCount%>"> - <font color="green"><b><%=(currentTransport).getName()%></b> transport is enabled for this Mashup.</font> [ <a href="#" onclick="disableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Disable</a> ] + <b><%=(currentTransport).getName()%></b> transport is <span class="transport-enabled">enabled</span> for this service. [<a href="#" onclick="disableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Disable</a>] </div> </li> <% @@ -565,7 +564,7 @@ %> <li> <div id="transport_<%=transportCount%>"> - <font color="orange"><b><%=(currentTransport).getName()%></b> transport is disabled for this Mashup.</font> [ <a href="#" onclick="enableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Enable</a> ] + <b><%=(currentTransport).getName()%></b> transport is <span class="transport-disabled">disabled</span> for this service. [<a href="#" onclick="enableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Enable</a>] </div> </li> <% @@ -573,6 +572,7 @@ transportCount++; } %> + <li>(Security configuration details to go here.)</li> </ul> </div> </td> @@ -633,7 +633,7 @@ </tbody> </table> -</div> +</div> <br/> _______________________________________________ Mashup-dev mailing list [email protected] http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
