Author: tyrell
Date: Wed Jul  9 01:22:44 2008
New Revision: 19015
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19015

Log:
Fixing MASHUP-854

Modified:
   trunk/mashup/java/modules/www/js/services.js

Modified: trunk/mashup/java/modules/www/js/services.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/js/services.js?rev=19015&r1=19014&r2=19015&view=diff
==============================================================================
--- trunk/mashup/java/modules/www/js/services.js        (original)
+++ trunk/mashup/java/modules/www/js/services.js        Wed Jul  9 01:22:44 2008
@@ -21,12 +21,12 @@
 var lastChar = ROOT_CONTEXT.substring(position, len);
 var path;
 if (lastChar == "/") {
-   path = ROOT_CONTEXT + SERVICE_PATH;
+    path = ROOT_CONTEXT + SERVICE_PATH;
 } else {
-   path = ROOT_CONTEXT + "/" + SERVICE_PATH;
+    path = ROOT_CONTEXT + "/" + SERVICE_PATH;
 }
 var mashupServerURL = self.location.protocol + "//" + self.location.hostname + 
":" +
-                self.location.port + path;
+                      self.location.port + path;
 
 if (typeof wso2 == "undefined") {
     /**
@@ -297,7 +297,8 @@
  * @param {callback} params    Parameters to be set in the callback
  */
 wso2.mashup.services.shareService =
-function (serviceName, destinationAddress, username, password, 
overwriteExisting, migrateTags, localUserName, callback, params,
+function (serviceName, destinationAddress, username, password, 
overwriteExisting, migrateTags,
+          localUserName, callback, params,
           errorCallback, mode, basicAuthUsername, basicAuthPassword) {
 
     var callURL = mashupServerURL + "/" + "ServiceSharingHelper" + "/" ;
@@ -339,7 +340,8 @@
  * @param {callback} params    Parameters to be set in the callback
  */
 wso2.mashup.services.shareServiceIC =
-function (serviceName, destinationAddress, infocardtoken, overwriteExisting, 
migrateTags, callback, params,
+function (serviceName, destinationAddress, infocardtoken, overwriteExisting, 
migrateTags, callback,
+          params,
           errorCallback, mode, basicAuthUsername, basicAuthPassword) {
 
     var callURL = mashupServerURL + "/" + "ServiceSharingHelper" + "/" ;
@@ -508,7 +510,8 @@
  * @param {Array} params
  * @param {callback} callback
  */
-wso2.mashup.services.enableServiceTransport = function (serviceName, 
transportName, params, callback) {
+wso2.mashup.services.enableServiceTransport =
+function (serviceName, transportName, params, callback) {
     var callURL = mashupServerURL + "/" + "MashupAdminService" + "/" ;
 
     var body_xml = '<req:enableServiceTransport 
xmlns:req="http://service.admin.mashup.wso2.org/xsd";>\n' +
@@ -526,7 +529,8 @@
  * @param {Array} params
  * @param {callback} callback
  */
-wso2.mashup.services.disableServiceTransport = function (serviceName, 
transportName, params, callback) {
+wso2.mashup.services.disableServiceTransport =
+function (serviceName, transportName, params, callback) {
     var callURL = mashupServerURL + "/" + "MashupAdminService" + "/" ;
 
     var body_xml = '<req:disableServiceTransport 
xmlns:req="http://service.admin.mashup.wso2.org/xsd";>\n' +
@@ -634,18 +638,17 @@
 
     var error = this.req.error;
     if (!error) {
-        wso2.wsf.Util.alertMessage("Console has received an error. Please 
refer" +
-                                   " to system admin for more details.");
+        WSO2.MashupUtils.dialog("An error occured", "Console has received an 
error. Please refer to system admin for more details.", 200, 50, null);
     } else if (error.reason.indexOf("Access Denied. Please login first") > -1) 
{
-        wso2.wsf.Util.alertMessage("Your session has expired.");
+        WSO2.MashupUtils.dialog("An error occured", "Your session has 
expired.", 200, 50, null);
         //Envoking force logout
-        wso2.mashup.handleLogout();
+        //wso2.mashup.handleLogout();
     } else if (typeof (error.detail.indexOf) != "undefined" &&
                error.detail.indexOf("NS_ERROR_NOT_AVAILABLE") > -1) {
-        wso2.wsf.Util.alertMessage("Your session has expired.");
+        WSO2.MashupUtils.dialog("An error occured", "Your session has 
expired.", 200, 50, null);
         //Envoking force logout
-        wso2.mashup.handleLogout();
+        //wso2.mashup.handleLogout();
     } else {
-        wso2.wsf.Util.alertMessage(error.reason);        
+        WSO2.MashupUtils.dialog("An error occured", error.reason, 200, 50, 
null);
     }
 };

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

Reply via email to