diff --git a/phpgwapi/js/egw_action/egw_action_dragdrop.js b/phpgwapi/js/egw_action/egw_action_dragdrop.js index 909e1ea7b1..a811fb0de5 100644 --- a/phpgwapi/js/egw_action/egw_action_dragdrop.js +++ b/phpgwapi/js/egw_action/egw_action_dragdrop.js @@ -107,7 +107,9 @@ function egwDragActionImplementation() "start": function(e) { return ai.helper != null; }, - "containment": $("body"), + // Solves problem with scroll position changing in the grid + // component + "refreshPositions": true, "scroll": false } ); diff --git a/phpgwapi/js/egw_action/egw_grid_view.js b/phpgwapi/js/egw_action/egw_grid_view.js index 890aa4f35e..35b2c69e64 100644 --- a/phpgwapi/js/egw_action/egw_grid_view.js +++ b/phpgwapi/js/egw_action/egw_grid_view.js @@ -1316,6 +1316,7 @@ function egwGridViewRow_aoiSetup() this.aoi._state = EGW_AO_STATE_NORMAL; this.aoi.row = this; this.aoi.doSetState = egwGridViewRow_aoiSetState; + this.aoi.doTriggerEvent = egwGridViewRow_aoiTriggerEvent; this.aoi.getDOMNode = egwGridViewRow_aoiGetDOMNode; } @@ -1335,6 +1336,19 @@ function egwGridViewRow_aoiGetDOMNode() return this.row.parentNode ? this.row.parentNode.context : null; } +function egwGridViewRow_aoiTriggerEvent(_event, _data) +{ + if (_event == EGW_AI_DRAG_OVER) + { + this.row.parentNode.addClass("draggedOver"); + } + + if (_event == EGW_AI_DRAG_OUT) + { + this.row.parentNode.removeClass("draggedOver"); + } +} + /** * Returns the actionObjectInterface object of this grid item. */ @@ -1825,4 +1839,3 @@ function egwGridViewFullRow_doSetViewArea() } - diff --git a/phpgwapi/js/egw_action/test/grid.css b/phpgwapi/js/egw_action/test/grid.css index 6fba7a6c87..8540ebdc16 100644 --- a/phpgwapi/js/egw_action/test/grid.css +++ b/phpgwapi/js/egw_action/test/grid.css @@ -30,6 +30,10 @@ body, td, th { background-color: #b7c3ff; } +.egwGridView_grid tr.draggedOver td { + background-color: #ffd09c !important; +} + /*.egwGridView_grid tr.selected.odd td { background-color: #9dadff; }*/