Author: channa Date: Fri Jul 18 04:15:20 2008 New Revision: 19574 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19574
Log: Modified the sharing success dialog's link when InfoCards are used, where the users script directory is not known, by directing the user to the server's home page to access the mashup from the list. MASHUP-980. Modified: trunk/mashup/java/modules/www/js/mashup-utils.js Modified: trunk/mashup/java/modules/www/js/mashup-utils.js URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/js/mashup-utils.js?rev=19574&r1=19573&r2=19574&view=diff ============================================================================== --- trunk/mashup/java/modules/www/js/mashup-utils.js (original) +++ trunk/mashup/java/modules/www/js/mashup-utils.js Fri Jul 18 04:15:20 2008 @@ -248,11 +248,16 @@ var position = eval(len - 1); var lastChar = destAddress.substring(position, len); var mashupUrl; - if (lastChar == "/") { + + if (lastChar != "/") { + destAddress = destAddress + '/'; + } + + // When shared via infocard, the destination server's username and therefore script-dir is not known. + if (destUsername != "") { mashupUrl = destAddress + SERVICE_PATH + '/' + destUsername + '/' + mashupName; } else { - mashupUrl = - destAddress + '/' + SERVICE_PATH + '/' + destUsername + '/' + mashupName; + mashupUrl = destAddress; } var strShareSuccess = '<table align="center" border="0">' + _______________________________________________ Mashup-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev
