1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Merge pull request #1617 from benthomasson/network_ui_toolbox_drag_fix

Fixes dragging devices out of the inventory toolbox
This commit is contained in:
Ben Thomasson 2018-04-30 13:59:17 -04:00 committed by GitHub
commit 90813c9be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,8 +234,19 @@ _Start.prototype.start.transitions = ['Ready'];
_Move.prototype.onMouseUp = function (controller) {
controller.changeState(Dropping);
var i = 0;
var toolbox = controller.toolbox;
if (controller.scope.mouseX < controller.toolbox.width) {
for(i = 0; i < toolbox.items.length; i++) {
toolbox.items[i].selected = false;
}
toolbox.selected_item = null;
controller.changeState(Ready);
} else {
controller.changeState(Dropping);
}
};
_Move.prototype.onMouseUp.transitions = ['Dropping'];