Author: tyrell
Date: Fri Dec  7 11:00:01 2007
New Revision: 10715

Log:

Enabling/Disabling service sharing depending on the service status.

Modified:
   trunk/mashup/java/modules/www/org/mashup.jsp

Modified: trunk/mashup/java/modules/www/org/mashup.jsp
==============================================================================
--- trunk/mashup/java/modules/www/org/mashup.jsp        (original)
+++ trunk/mashup/java/modules/www/org/mashup.jsp        Fri Dec  7 11:00:01 2007
@@ -490,16 +490,22 @@
 
                             if (serviceState) {
                                 
document.getElementById("service-status").innerHTML =
-                                "Service started. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", false, 
handleServiceStartStopCallback)'>Stop</a>]"
+                                "Service started. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", false, 
handleServiceStartStopCallback)'>Stop</a>]";
                                 //Enabling service editing
                                 
document.getElementById("edit-service").innerHTML =
-                                '<a href="#" 
onclick="wso2.mashup.services.getServiceDataForEditor(\'<%=mashup%>\', 
wso2.mashup.populateServiceEditor);">Edit this service</a>'
+                                '<a href="#" 
onclick="wso2.mashup.services.getServiceDataForEditor(\'<%=mashup%>\', 
wso2.mashup.populateServiceEditor);">Edit this service</a>';
+                                //Enabling service sharing
+                                
document.getElementById("share-mashup").innerHTML =
+                                ' <a href="#" 
onclick="WSO2.MashupUtils.showMashupSharingDialog(\'<%=mashup%>\');">Share this 
service</a>';
                             } else {
                                 
document.getElementById("service-status").innerHTML =
-                                "Service stopped. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", true, 
handleServiceStartStopCallback)'>Start</a>]"
+                                "Service stopped. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", true, 
handleServiceStartStopCallback)'>Start</a>]";
                                 //Disabling service editing
                                 
document.getElementById("edit-service").innerHTML =
-                                "Service editing is not available"
+                                "Service editing is not available";
+                                //Disabling service sharing
+                                
document.getElementById("share-mashup").innerHTML =
+                                "Service sharing is not available"
                             }
                         }
 
@@ -509,16 +515,22 @@
 
                             if (serviceMashupObject.getServiceStatus() == 
"true") {
                                 
document.getElementById("service-status").innerHTML =
-                                "Service started. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", false, 
handleServiceStartStopCallback)'>Stop</a>]"
+                                "Service started. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", false, 
handleServiceStartStopCallback)'>Stop</a>]";
                                 //Enabling service editing
                                 
document.getElementById("edit-service").innerHTML =
-                                '<a href="#" 
onclick="wso2.mashup.services.getServiceDataForEditor(\'<%=mashup%>\', 
wso2.mashup.populateServiceEditor);">Edit this service</a>'
+                                '<a href="#" 
onclick="wso2.mashup.services.getServiceDataForEditor(\'<%=mashup%>\', 
wso2.mashup.populateServiceEditor);">Edit this service</a>';
+                                //Enabling service sharing
+                                
document.getElementById("share-mashup").innerHTML =
+                                ' <a href="#" 
onclick="WSO2.MashupUtils.showMashupSharingDialog(\'<%=mashup%>\');">Share this 
service</a>';
                             } else {
                                 
document.getElementById("service-status").innerHTML =
-                                "Service stopped. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", true, 
handleServiceStartStopCallback)'>Start</a>]"
+                                "Service stopped. [<a href='#' 
onclick='WSO2.MashupUtils.handleServiceStartStop(\"<%=mashup%>\", true, 
handleServiceStartStopCallback)'>Start</a>]";
                                 //Disabling service editing
                                 
document.getElementById("edit-service").innerHTML =
-                                "Service editing is not available"
+                                "Service editing is not available";
+                                //Disabling service sharing
+                                
document.getElementById("share-mashup").innerHTML =
+                                "Service sharing is not available"
                             }
                         }
 
@@ -529,10 +541,8 @@
                         <a href="#" 
onclick="WSO2.MashupUtils.showCreateMashupDialog();">Create a
                             new service</a>
                     </li>
-                    <li>
-                        <a href="#"
-                           
onclick="WSO2.MashupUtils.showMashupSharingDialog('<%=mashup%>');">Share
-                            this service</a>
+                    <li id="share-mashup">
+                        Service sharing is not available
                     </li>
                     <!--Will be available only to users with Admin priviledges 
OR who are Authors of the current Mashup-->
                     <% if ((RegistryUtils.isAdminRole(registry)) ||

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to