Skip to content
Permalink
Browse files

FIX remove invlid E4X javascipt code

  • Loading branch information...
Eric HAUSWALD
Eric HAUSWALD committed Mar 7, 2013
1 parent 537900e commit 1f174d7fa306f6ec6998040880ea9042a5e5b71d
Showing with 8 additions and 84 deletions.
  1. +2 −40 lib/bindings/core/wDialog.xml
  2. +1 −19 lib/bindings/core/wModuleHeader.xml
  3. +5 −25 lib/bindings/widgets/cNavigation.xml
@@ -888,34 +888,7 @@
<parameter name="xmlHttp" />
<parameter name="callBackParameters" />
<body><![CDATA[
try
{
wCore.debug('onGetDialogTopicTreeSuccess');
var itemId = e4x.id.toString();
var treeitem = this.getElementByAnonId('item_' + itemId);
var treechildren = this.getElementByAnonId('children_' + itemId);
if (treechildren == null)
{
treechildren = this.getElementByAnonId('children_root');
}
var emptynode = true;
for each (var p in e4x.nodes..nodeitem)
{
emptynode = false;
this.appendNode(treechildren, p.@id, p.@label, p.@model);
}
if (emptynode && treeitem != null)
{
treeitem.setAttribute('container' , 'false');
treeitem.setAttribute('empty' , 'true');
}
}
catch (e)
{
wCore.error('onGetDialogTopicTreeSuccess', [e4x, xmlHttp, callBackParameters], e);
}
//Invalid E4X
]]></body>
</method>

@@ -966,18 +939,7 @@
<parameter name="xmlHttp" />
<parameter name="callBackParameters" />
<body><![CDATA[
try
{
for each (var p in e4x.nodes..nodeitem)
{
this.initialtopics.push(p.@id);
this.appendTopic(p.@id, p.@label, p.@model);
}
}
catch (e)
{
wCore.error('onGetDocumentArraySuccess', [e4x, xmlHttp, callBackParameters], e);
}
//Invalid E4X
]]></body>
</method>

@@ -146,25 +146,7 @@
<method name="onGetGlobalActionsSuccess">
<parameter name="e4x" />
<body><![CDATA[
//wCore.debug("wModuleHeader.onGetGlobalActionsSuccess");
if (e4x.globalAction.length() > 0)
{
var actions = [];
for (var i=0 ; i<e4x.globalAction.length() ; i++)
{
var actione4x = e4x.globalAction[i];
var action = {
id: actione4x.@name.toString(),
hasSeparator: actione4x.@hasSeparator.toString() == "true",
icon: actione4x.@icon.toString(),
label : actione4x.@label.toString()}
actions.push(action);
}
if (!this.mGlobalActions) {this.mGlobalActions = {init: true};}
this.mGlobalActions[this.mModuleName] = actions;
this.buildGlobalActionMenu(actions);
}
//Invalid E4X
]]></body>
</method>

@@ -208,28 +208,8 @@
<!-- DEPECATED METHODE FOR TEST -->
<method name="getSelectedComponents">
<body><![CDATA[
//Invalid E4X
var _selectedDocuments = new XML('<documents/>');
var index = 0;
for( var i = 0; i < this.mSelectedNodes.length; i++)
{
var node = this.mSelectedNodes[i];
if (node.itemData)
{
_selectedDocuments.document[index] = new XML('<document/>');
var dataIndex = 0;
for (var data in node.itemData)
{
if (data !== "columns" && node.itemData[data])
{
_selectedDocuments.document[index].component[dataIndex]
= new XML('<component name="' + data + '"><![CDATA[' + node.itemData[data] + ']]'+'></component>');
dataIndex++;
}
}
_selectedDocuments.document[index].@index = i;
index++;
}
}
return _selectedDocuments;
]]></body>
</method>
@@ -3225,7 +3205,7 @@
tooltiptext="${transui:m.uixul.bo.general.navigate-next-quick,ucf,attr}"/>
<xul:toolbarbutton anonid="navigationend" disabled="true" oncommand="navigateEnd()"
image="{IconsBase}/small/control-end.png"
tooltiptext="${transui:m.uixul.bo.general.navigate-end,ucf,attr}"/>
tooltiptext="${transui:m.uixul.bo.general.navigate-end,ucf,attr}"/>
<xul:toolbarspacer flex="1" />
<xul:toolbarbutton anonid="displaymode" disabled="true" collapsed="true" oncommand="changeDisplay()"
image="{IconsBase}/small/list-thumbnail.png"
@@ -3361,14 +3341,14 @@
var mode = this.mList.displayMode;
var newMode = (mode == 'detail') ? 'thumbnail' : 'detail';
this.mList.displayMode = newMode;
var tooltiptext = "${transui:m.uixul.bo.general.switch-to-detail,ucf,js}"
var tooltiptext = "${transui:m.uixul.bo.general.switch-to-detail,ucf,js}"
var image = "{IconsBase}/small/list-classic.png";
if (newMode == 'detail')
{
tooltiptext = "${transui:m.uixul.bo.general.switch-to-thumbnail,ucf,js}"
tooltiptext = "${transui:m.uixul.bo.general.switch-to-thumbnail,ucf,js}"
image = "{IconsBase}/small/list-thumbnail.png";
}
document.getAnonymousElementByAttribute(this, "anonid", "displaymode").setAttribute('tooltiptext', tooltiptext);
document.getAnonymousElementByAttribute(this, "anonid", "displaymode").setAttribute('tooltiptext', tooltiptext);
document.getAnonymousElementByAttribute(this, "anonid", "displaymode").setAttribute('image', image);
}
} catch (e) {wCore.error('changeDisplay', [], e);}

0 comments on commit 1f174d7

Please sign in to comment.
You can’t perform that action at this time.