Author: keith
Date: Fri Apr 4 09:04:52 2008
New Revision: 15580
Log:
UI updates for Mashup-644. Now we can decide weather we need to migrate
comments or not.
Modified:
trunk/mashup/java/modules/www/js/mashup-utils.js
trunk/mashup/java/modules/www/js/services.js
Modified: trunk/mashup/java/modules/www/js/mashup-utils.js
==============================================================================
--- trunk/mashup/java/modules/www/js/mashup-utils.js (original)
+++ trunk/mashup/java/modules/www/js/mashup-utils.js Fri Apr 4 09:04:52 2008
@@ -162,6 +162,7 @@
var strFrmService = '<table align="center" border="0">' +
'<tr><td nowrap height="25"><b>Destination Server
Address: </b></td><td><input name="txtDestAddress" type="text"
id="txtDestAddress" value="https://mooshup.com" size="50"/></td></tr>' +
'<tr><td nowrap height="25"><b>Overwrite if the
service already exists? </b></td><td><input name="chkOverwrite" type="checkbox"
id="chkOverwrite"/></td></tr>' +
+ '<tr><td nowrap height="25"><b>Migrate tags?
</b></td><td><input name="chkTags" type="checkbox" id="chkTags"/></td></tr>' +
'<tr><td height="25"><hr>Please enter your login
information for the destination server</td></tr>' +
'<tr><td nowrap height="25"><b>Destination Server
Username: </b></td><td><input name="txtDestUsername" type="text"
id="txtDestUsername" size="50"/></td></tr>' +
'<tr><td nowrap height="25"><b>Destination Server
Password: </b></td><td><input name="txtDestPassword" type="password"
id="txtDestPassword" size="50"/></td></tr>' +
@@ -241,6 +242,10 @@
if (document.getElementById("chkOverwrite").checked) {
overwriteExisting = "true";
}
+ var migrateTags = "false";
+ if (document.getElementById("chkTags").checked) {
+ migrateTags = "true";
+ }
if (WSO2.MashupUtils.isUrl(destAddress)) {
@@ -248,9 +253,9 @@
if (mode == "infocard") {
var infoCardToken = InformationCard.GetToken();
- wso2.mashup.services.shareServiceIC(serviceName, destAddress,
infoCardToken, overwriteExisting, submitServiceCallback, labelElement,
submitServiceError);
+ wso2.mashup.services.shareServiceIC(serviceName, destAddress,
infoCardToken, overwriteExisting, migrateTags, submitServiceCallback,
labelElement, submitServiceError);
} else {
- wso2.mashup.services.shareService(serviceName, destAddress,
destUsername, destPassword, overwriteExisting, submitServiceCallback,
labelElement, submitServiceError);
+ wso2.mashup.services.shareService(serviceName, destAddress,
destUsername, destPassword, overwriteExisting, migrateTags,
submitServiceCallback, labelElement, submitServiceError);
}
}
Modified: trunk/mashup/java/modules/www/js/services.js
==============================================================================
--- trunk/mashup/java/modules/www/js/services.js (original)
+++ trunk/mashup/java/modules/www/js/services.js Fri Apr 4 09:04:52 2008
@@ -288,7 +288,7 @@
* @param {callback} params Parameters to be set in the callback
*/
wso2.mashup.services.shareService =
-function (serviceName, destinationAddress, username, password,
overwriteExisting, callback, params,
+function (serviceName, destinationAddress, username, password,
overwriteExisting, migrateTags, callback, params,
errorCallback) {
var callURL = serverURL + "/" + "ServiceSharingHelper" + "/" ;
@@ -301,6 +301,8 @@
'</req:destinationServerAddress>\n' +
' <req:overwriteExisting>' + overwriteExisting +
'</req:overwriteExisting>\n' +
+ ' <req:migrateTags>' + migrateTags +
+ '</req:migrateTags>\n' +
' </req:shareServiceRequest>\n';
new wso2.wsf.WSRequest(callURL, "shareService", body_xml, callback,
params, errorCallback);
@@ -317,7 +319,7 @@
* @param {callback} params Parameters to be set in the callback
*/
wso2.mashup.services.shareServiceIC =
-function (serviceName, destinationAddress, infocardtoken, overwriteExisting,
callback, params,
+function (serviceName, destinationAddress, infocardtoken, overwriteExisting,
migrateTags, callback, params,
errorCallback) {
var callURL = serverURL + "/" + "ServiceSharingHelper" + "/" ;
@@ -332,6 +334,8 @@
'</req:destinationServerAddress>\n' +
' <req:overwriteExisting>' + overwriteExisting +
'</req:overwriteExisting>\n' +
+ ' <req:migrateTags>' + migrateTags +
+ '</req:migrateTags>\n' +
' </req:shareServiceICRequest>\n';
new wso2.wsf.WSRequest(callURL, "shareServiceIC", body_xml, callback,
params, errorCallback);
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev