Author: tyrell
Date: Tue Feb 12 19:50:10 2008
New Revision: 13663

Log:

Fixing IE issue reported in MASHUP-678

Modified:
   trunk/mashup/java/modules/www/js/mashup-utils.js
   trunk/mashup/java/modules/www/taskbar.jsp

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    Tue Feb 12 19:50:10 2008
@@ -66,13 +66,25 @@
  */
 WSO2.MashupUtils.generateMashupFromXml = function(xmlDataContent) {
 
-    var mashupId = 
xmlDataContent.getElementsByTagName("serviceId")[0].firstChild.nodeValue;
-    var mashupTitle = 
xmlDataContent.getElementsByTagName("name")[0].firstChild.nodeValue;
-    var mashupDesc = 
xmlDataContent.getElementsByTagName("description")[0].firstChild.nodeValue;
-    var mashupEprs = xmlDataContent.getElementsByTagName("eprs");
-    var mashupOperartions = xmlDataContent.getElementsByTagName("operations");
-    var mashupStatus = 
xmlDataContent.getElementsByTagName("active")[0].firstChild.nodeValue;
-    var mashupServiceType = 
xmlDataContent.getElementsByTagName("serviceType")[0].firstChild.nodeValue;
+    var browser = WSRequest.util._getBrowser();
+    if (browser == "ie" || browser == "ie7") {
+        var mashupId = 
xmlDataContent.getElementsByTagName("ax25:serviceId")[0].firstChild.nodeValue;
+        var mashupTitle = 
xmlDataContent.getElementsByTagName("ax25:name")[0].firstChild.nodeValue;
+        var mashupDesc = 
xmlDataContent.getElementsByTagName("ax25:description")[0].firstChild.nodeValue;
+        var mashupEprs = xmlDataContent.getElementsByTagName("ax25:eprs");
+        var mashupOperartions = 
xmlDataContent.getElementsByTagName("ax25:operations");
+        var mashupStatus = 
xmlDataContent.getElementsByTagName("ax25:active")[0].firstChild.nodeValue;
+        var mashupServiceType = 
xmlDataContent.getElementsByTagName("ax25:serviceType")[0].firstChild.nodeValue;
+    } else {
+        mashupId = 
xmlDataContent.getElementsByTagName("serviceId")[0].firstChild.nodeValue;
+        mashupTitle = 
xmlDataContent.getElementsByTagName("name")[0].firstChild.nodeValue;
+        mashupDesc = 
xmlDataContent.getElementsByTagName("description")[0].firstChild.nodeValue;
+        mashupEprs = xmlDataContent.getElementsByTagName("eprs");
+        mashupOperartions = xmlDataContent.getElementsByTagName("operations");
+        mashupStatus = 
xmlDataContent.getElementsByTagName("active")[0].firstChild.nodeValue;
+        mashupServiceType = 
xmlDataContent.getElementsByTagName("serviceType")[0].firstChild.nodeValue;
+    }
+
 
     return new wso2.mashup.Mashup(mashupId, mashupTitle, mashupDesc, 
mashupEprs, mashupOperartions, mashupStatus, mashupServiceType);
 };
@@ -272,7 +284,7 @@
     cmdSubmit.setAttribute("onclick", 
"WSO2.MashupUtils.makeServiceNameValidationRequest('" +
                                       userName + "');");
     cmdSubmit.setAttribute("style", "float: right;");
-    parent.appendChild(cmdSubmit);    
+    parent.appendChild(cmdSubmit);
 
     YAHOO.util.Event.onContentReady('doc3', function() {
         // Instantiate the Dialog
@@ -536,7 +548,7 @@
                        '</table>' +
                        '</form>';
 
-    WSO2.MashupUtils.dialog("Download " + serviceName, downloadForm, 500, 
100,'txtUserName');
+    WSO2.MashupUtils.dialog("Download " + serviceName, downloadForm, 500, 100, 
'txtUserName');
 
 };
 
@@ -714,4 +726,4 @@
     //Cleaning up the dom
     
document.getElementById('lyrDialog').parentNode.removeChild(document.getElementById('lyrDialog'));
     
document.getElementById('dialogMask').parentNode.removeChild(document.getElementById('dialogMask'));
-}
\ No newline at end of file
+};

Modified: trunk/mashup/java/modules/www/taskbar.jsp
==============================================================================
--- trunk/mashup/java/modules/www/taskbar.jsp   (original)
+++ trunk/mashup/java/modules/www/taskbar.jsp   Tue Feb 12 19:50:10 2008
@@ -76,7 +76,7 @@
 <ul>
 <!--Will be available only to users with Admin priviledges OR who are Authors 
of the current Mashup, if there is a Mashup service set by the parent page.-->
 <% if (((RegistryUtils.isAdminRole(registry)) ||
-        (author != null && author.equals(currentUser))) &&
+        (author != null && author.equalsIgnoreCase(currentUser))) &&
         (paramMashupServiceName != null)) { %>
 <li id="service-status">
     Service status not available
@@ -175,7 +175,17 @@
     }
 
     function listServiceDataCallback() {
-        var xmlBodyContent = 
this.req.responseXML.getElementsByTagName("return")[0];
+        var xmlBodyContent;
+
+        var browser = WSRequest.util._getBrowser();
+        if (browser == "ie" || browser == "ie7") {
+            xmlBodyContent =
+            this.req.responseXML.getElementsByTagName("ns:return")[0];
+        } else {
+            xmlBodyContent =
+            this.req.responseXML.getElementsByTagName("return")[0];
+        }
+
         var serviceMashupObject = 
WSO2.MashupUtils.generateMashupFromXml(xmlBodyContent);
 
         if (serviceMashupObject.getServiceStatus() == "true") {
@@ -264,7 +274,7 @@
         <a href="/services/<%=author%>/<%=paramMashup%>?download">Download 
this mashup</a>
     </li>
     <%
-}%>      
+}%>
 </ul>
 
 <%}%>

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

Reply via email to