From 2e84fb63e20536dbf92253f381bfe26fd20bc2a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20St=C3=B6ckel?= Date: Sat, 28 May 2011 15:24:31 +0000 Subject: [PATCH] added clear function to egwActionObject, reverted change done by klaus leithoff in egw_action.js as it caused serveral problems, fixed problem with no actions being executable when all action objects were selected using the setSelectAll function, added iframeFix to egw_action_dragdrop.js, made draggedOver style working for all tables. --- phpgwapi/js/egw_action/egw_action.js | 15 +++++++++++++-- phpgwapi/js/egw_action/egw_action_dragdrop.js | 3 ++- phpgwapi/templates/idots/css/traditional.css | 3 ++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/phpgwapi/js/egw_action/egw_action.js b/phpgwapi/js/egw_action/egw_action.js index 1a0125815e..8907e9a32d 100644 --- a/phpgwapi/js/egw_action/egw_action.js +++ b/phpgwapi/js/egw_action/egw_action.js @@ -725,6 +725,15 @@ egwActionObject.prototype.insertObject = function(_index, _id, _iface, _flags) return obj; } +/** + * Deletes all children of the egwActionObject + */ +egwActionObject.prototype.clear = function() { + this.children = []; + this.selectedChildren = []; + this.focusedChild = null; +} + /** * Searches for the root object in the action object tree and returns it. */ @@ -816,7 +825,9 @@ egwActionObject.prototype.getAllSelected = function() if (!this.children[i].getAllSelected()) return false; } - if (this.children.length == 0) return false; +// This introduced various bugs inside the egwAction system and breaks the +// recursion abortion case of this function! +// if (this.children.length == 0) return false; return true; } @@ -1403,7 +1414,7 @@ egwActionObject.prototype._getLinks = function(_objs, _actionType) for (var i = 0; i < _objs.length; i++) { var obj = _objs[i]; - if (obj.triggerCallback()) + if (!egwBitIsSet(obj.flags, EGW_AO_FLAG_IS_CONTAINER) && obj.triggerCallback()) { testedSelected.push(obj); diff --git a/phpgwapi/js/egw_action/egw_action_dragdrop.js b/phpgwapi/js/egw_action/egw_action_dragdrop.js index bf008965b7..3b3a870880 100644 --- a/phpgwapi/js/egw_action/egw_action_dragdrop.js +++ b/phpgwapi/js/egw_action/egw_action_dragdrop.js @@ -125,7 +125,8 @@ function egwDragActionImplementation() // component "refreshPositions": true, "scroll": false, - "containment": "document" + "containment": "document", + "iframeFix": true } ); diff --git a/phpgwapi/templates/idots/css/traditional.css b/phpgwapi/templates/idots/css/traditional.css index 69aa33e4fd..a937a9d197 100755 --- a/phpgwapi/templates/idots/css/traditional.css +++ b/phpgwapi/templates/idots/css/traditional.css @@ -576,7 +576,8 @@ Preferences tabs background-color: #b7c3ff; } -.egwGridView_grid tr.draggedOver td { +tr.draggedOver td { +/*.egwGridView_grid tr.draggedOver td {*/ background-color: #ffd09c !important; }