[mapguide-commits] r4267 - trunk/MgDev/Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Sep 28 11:13:53 EDT 2009
Author: chrisclaydon
Date: 2009-09-28 11:13:53 -0400 (Mon, 28 Sep 2009)
New Revision: 4267
Modified:
trunk/MgDev/Web/src/viewerfiles/contextmenu.js
trunk/MgDev/Web/src/viewerfiles/tasklist.templ
Log:
Re #292,#295 - Fix Chrome issues. Submitted on behalf of Buddy Hu.
Modified: trunk/MgDev/Web/src/viewerfiles/contextmenu.js
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/contextmenu.js 2009-09-27 06:53:43 UTC (rev 4266)
+++ trunk/MgDev/Web/src/viewerfiles/contextmenu.js 2009-09-28 15:13:53 UTC (rev 4267)
@@ -66,7 +66,7 @@
var menuObj = this.menuObj;
if(menuObj != null)
{
- var name = (firefox || safari3plus) ? this.attributes["name"].nodeValue: this.name;
+ var name = (chrome || firefox || safari3plus) ? this.attributes["name"].nodeValue : this.name;
if(name.indexOf("Sub:") == 0)
{
var subMenu = menuObj.subMenus[name.substr(4)];
@@ -105,7 +105,7 @@
catch(e) {}
}
- var enabled = (firefox || safari3plus) ? this.attributes["state"].nodeValue: this.state;
+ var enabled = (chrome || firefox || safari3plus) ? this.attributes["state"].nodeValue : this.state;
if(!enabled || enabled == "false")
return true;
}
@@ -133,10 +133,10 @@
}
catch(e) {}
}
- var name = (firefox || safari3plus) ? this.attributes["name"].nodeValue: this.name;
+ var name = (chrome || firefox || safari3plus) ? this.attributes["name"].nodeValue : this.name;
if(name.indexOf("Sub:") != 0)
{
- var enabled = (firefox || safari3plus) ? this.attributes["state"].nodeValue: this.state;
+ var enabled = (chrome || firefox || safari3plus) ? this.attributes["state"].nodeValue : this.state;
if(!enabled || enabled == "false")
return true;
}
@@ -279,9 +279,9 @@
var menuObj = tgt == null? null: tgt.menuObj;
if(menuObj != null)
{
- var state = (firefox || safari3plus) ? tgt.attributes["state"].nodeValue: tgt.state;
+ var state = (chrome || firefox || safari3plus) ? tgt.attributes["state"].nodeValue : tgt.state;
if(!(!state || state == "false"))
- executeOption(menuObj, (firefox || safari3plus) ? tgt.attributes["name"].nodeValue: tgt.name);
+ executeOption(menuObj, (chrome || firefox || safari3plus) ? tgt.attributes["name"].nodeValue : tgt.name);
return true;
}
else
@@ -377,10 +377,10 @@
if(obj == null)
break;
- var name = (firefox || safari3plus) ? obj.attributes["name"].nodeValue: obj.name;
+ var name = (chrome || firefox || safari3plus) ? obj.attributes["name"].nodeValue : obj.name;
if(name.indexOf("Sub:") != 0)
{
- var state = (firefox || safari3plus) ? obj.attributes["state"].nodeValue: obj.state;
+ var state = (chrome || firefox || safari3plus) ? obj.attributes["state"].nodeValue : obj.state;
var enabled = true;
if(menuObj.owner)
{
@@ -399,7 +399,7 @@
obj.style.color = enabled? "black": "#b4b4b4";
var iconElt = document.getElementById("PMI" + name);
if(iconElt)
- iconElt.src = enabled? ((firefox || safari3plus) ? obj.attributes["icon"].nodeValue: obj.icon): ((firefox || safari3plus) ? obj.attributes["icond"].nodeValue: obj.icond);
+ iconElt.src = enabled ? ((chrome || firefox || safari3plus) ? obj.attributes["icon"].nodeValue : obj.icon) : ((chrome || firefox || safari3plus) ? obj.attributes["icond"].nodeValue : obj.icond);
}
}
Modified: trunk/MgDev/Web/src/viewerfiles/tasklist.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/tasklist.templ 2009-09-27 06:53:43 UTC (rev 4266)
+++ trunk/MgDev/Web/src/viewerfiles/tasklist.templ 2009-09-28 15:13:53 UTC (rev 4267)
@@ -116,14 +116,14 @@
var bgcolor = "#dcdcdc";
var color = "black";
- var name = (firefox || safari3plus) ? obj.attributes["name"].nodeValue: obj.name;
+ var name = (chrome || firefox || safari3plus) ? obj.attributes["name"].nodeValue: obj.name;
try
{
owner.OnCommandSelected(name);
}
catch(e) {}
- var enabled = ((firefox || safari3plus) ? obj.attributes["state"].nodeValue: obj.state) != "false";
+ var enabled = ((chrome || firefox || safari3plus) ? obj.attributes["state"].nodeValue: obj.state) != "false";
if(!enabled)
{
bgcolor = "#f0f0f0";
@@ -150,7 +150,7 @@
owner.OnCommandSelected(-1);
} catch(e) {}
- var enabled = ((firefox || safari3plus) ? obj.attributes["state"].nodeValue: obj.state) != "false";
+ var enabled = ((chrome || firefox || safari3plus) ? obj.attributes["state"].nodeValue: obj.state) != "false";
if(!enabled)
{
bgcolor = "#f0f0f0";
@@ -239,7 +239,7 @@
function OnClickItem(obj)
{
- var name = (firefox || safari3plus) ? obj.attributes["name"].nodeValue: obj.name;
+ var name = (chrome || firefox || safari3plus) ? obj.attributes["name"].nodeValue: obj.name;
try
{
owner.ExecuteCommand(name);
More information about the mapguide-commits
mailing list