resolved issues with for-in loop and ie

This commit is contained in:
Andreas Stöckel 2011-04-23 09:07:31 +00:00
parent 1f0826c391
commit fcaef1ee58
7 changed files with 14 additions and 14 deletions

View File

@ -1236,7 +1236,7 @@ egwActionObject.prototype.registerActions = function()
{ {
var groups = this.getActionImplementationGroups(); var groups = this.getActionImplementationGroups();
for (group in groups) for (var group in groups)
{ {
// Get the action implementation for each group // Get the action implementation for each group
if (typeof _egwActionClasses[group] != "undefined" && if (typeof _egwActionClasses[group] != "undefined" &&
@ -1405,7 +1405,7 @@ egwActionObject.prototype._getLinks = function(_objs, _actionType)
} }
// Check whether all objects supported the action // Check whether all objects supported the action
for (k in actionLinks) for (var k in actionLinks)
{ {
actionLinks[k].enabled = actionLinks[k].enabled && actionLinks[k].enabled = actionLinks[k].enabled &&
(actionLinks[k].cnt >= testedSelected.length) && (actionLinks[k].cnt >= testedSelected.length) &&

View File

@ -20,7 +20,7 @@
*/ */
function egwActionStoreJSON(_data, _obj, _setterOnly) function egwActionStoreJSON(_data, _obj, _setterOnly)
{ {
for (key in _data) for (var key in _data)
{ {
if (key.charAt(0) != '_') if (key.charAt(0) != '_')
{ {
@ -64,7 +64,7 @@ function egwBitIsSet(_set, _bit)
function egwObjectLength(_obj) function egwObjectLength(_obj)
{ {
var len = 0; var len = 0;
for (k in _obj) len++; for (var k in _obj) len++;
return len; return len;
} }

View File

@ -153,7 +153,7 @@ function egwDragActionImplementation()
this.selected = _selected; this.selected = _selected;
// Call the onExecute event of the first actionObject // Call the onExecute event of the first actionObject
for (k in _links) for (var k in _links)
{ {
if (_links[k].visible) if (_links[k].visible)
{ {
@ -297,7 +297,7 @@ function egwDropActionImplementation()
// Disable all links which only accept types which are not // Disable all links which only accept types which are not
// inside ddTypes // inside ddTypes
for (k in links) for (var k in links)
{ {
var accepted = links[k].actionObj.acceptedTypes; var accepted = links[k].actionObj.acceptedTypes;
@ -317,7 +317,7 @@ function egwDropActionImplementation()
// Check whether there is only one link // Check whether there is only one link
var cnt = 0; var cnt = 0;
var lnk = null; var lnk = null;
for (k in links) for (var k in links)
{ {
if (links[k].enabled && links[k].visible) if (links[k].enabled && links[k].visible)
{ {
@ -373,7 +373,7 @@ function egwDropActionImplementation()
{ {
// Accumulate the accepted types // Accumulate the accepted types
var accepted = []; var accepted = [];
for (k in _links) for (var k in _links)
{ {
for (var i = 0; i < _links[k].actionObj.acceptedTypes.length; i++) for (var i = 0; i < _links[k].actionObj.acceptedTypes.length; i++)
{ {

View File

@ -173,7 +173,7 @@ function egwPopupActionImplementation()
else else
{ {
var defaultAction = null; var defaultAction = null;
for (k in _links) for (var k in _links)
{ {
if (_links[k].actionObj["default"] && _links[k].enabled) if (_links[k].actionObj["default"] && _links[k].enabled)
{ {
@ -258,7 +258,7 @@ function egwPopupActionImplementation()
// Transform the link_groups object into an sorted array // Transform the link_groups object into an sorted array
var groups = []; var groups = [];
for (k in link_groups) for (var k in link_groups)
{ {
groups.push({"grp": k, "links": link_groups[k]}); groups.push({"grp": k, "links": link_groups[k]});
} }
@ -361,7 +361,7 @@ function egwPopupActionImplementation()
// Build a tree containing all actions // Build a tree containing all actions
var tree = {"root": []}; var tree = {"root": []};
for (k in _links) for (var k in _links)
{ {
_links[k].actionObj.appendToTree(tree); _links[k].actionObj.appendToTree(tree);
} }

View File

@ -165,7 +165,7 @@ egwGrid.prototype.selectcolsClick = function(_at)
{ {
// Create the user data column visibility set // Create the user data column visibility set
var set = {}; var set = {};
for (k in column_data) for (var k in column_data)
{ {
set[k] = { set[k] = {
"visible": column_data[k].visible "visible": column_data[k].visible

View File

@ -534,7 +534,7 @@ egwGridColumns.prototype.setColumnVisibilitySet = function(_set)
{ {
this._beginUpdate(); this._beginUpdate();
for (k in _set) for (var k in _set)
{ {
var col = this.getColumnById(k); var col = this.getColumnById(k);
if (col) if (col)

View File

@ -55,7 +55,7 @@ function _egwGenMenuStructure(_elements, _parent)
//Go through each key of the current object //Go through each key of the current object
var obj = _elements[i]; var obj = _elements[i];
var item = new egwMenuItem(_parent, null); var item = new egwMenuItem(_parent, null);
for (key in obj) for (var key in obj)
{ {
if (key == "children" && obj[key].constructor === Array) if (key == "children" && obj[key].constructor === Array)
{ {