1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-27 15:08:20 +01:00

Maniphest - fix a bug when selecting all tasks and then dragging them around

Summary: Fixes T4006.

Test Plan: clicked "select all" and dragged around tasks. Noted the task remained selected as I re-ordered, thus keeping hte count accurate. Verified when I hit "batch edit" the right tasks showed up.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4006

Differential Revision: https://secure.phabricator.com/D7566
This commit is contained in:
Bob Trahan 2013-11-11 16:08:23 -08:00
parent 819bd7f03b
commit b354ef7aa9
2 changed files with 16 additions and 1 deletions

View file

@ -41,6 +41,18 @@ JX.behavior('maniphest-batch-selector', function(config) {
update();
};
var redraw = function (task) {
var selected = is_selected(task);
change(task, selected);
};
JX.Stratcom.listen(
'subpriority-changed',
null,
function (e) {
e.kill();
var data = e.getData();
redraw(data.task);
});
// Change all tasks to some state (used by "select all" / "clear selection"
// buttons).

View file

@ -57,8 +57,11 @@ JX.behavior('maniphest-subpriority-editor', function(config) {
var nodes = JX.$H(r.tasks).getFragment().firstChild;
var task = JX.DOM.find(nodes, 'li', 'maniphest-task');
JX.DOM.replace(node, task);
draggable.unlock();
JX.Stratcom.invoke(
'subpriority-changed',
null,
{ 'task' : task });
};
new JX.Workflow(config.uri, data)