mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +01:00
[Redesign] Fix Maniphest subpriority editing
Summary: Ref T8099, Fixes T8338. This allows re-ordering of Maniphest Tasks in the redesign. Somehow seems more fragile, but I couldn't break anything with it. Test Plan: Try ordering into first position after header, last position, changing priority outright, everything I can drag. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T8099, T8338 Differential Revision: https://secure.phabricator.com/D13487
This commit is contained in:
parent
f83bbeaf5c
commit
2c922ca230
3 changed files with 14 additions and 14 deletions
|
@ -15,7 +15,7 @@ return array(
|
|||
'diffusion.pkg.css' => '385e85b3',
|
||||
'diffusion.pkg.js' => '0115b37c',
|
||||
'maniphest.pkg.css' => '4845691a',
|
||||
'maniphest.pkg.js' => '2f4f52c2',
|
||||
'maniphest.pkg.js' => '3ec6a6d5',
|
||||
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
|
||||
'rsrc/css/aphront/dark-console.css' => '6378ef3d',
|
||||
'rsrc/css/aphront/dialog-view.css' => 'fe58b18d',
|
||||
|
@ -378,7 +378,7 @@ return array(
|
|||
'rsrc/js/application/maniphest/behavior-batch-selector.js' => '7b98d7c5',
|
||||
'rsrc/js/application/maniphest/behavior-line-chart.js' => '88f0c5b3',
|
||||
'rsrc/js/application/maniphest/behavior-list-edit.js' => 'a9f88de2',
|
||||
'rsrc/js/application/maniphest/behavior-subpriorityeditor.js' => '84845b5b',
|
||||
'rsrc/js/application/maniphest/behavior-subpriorityeditor.js' => '71237763',
|
||||
'rsrc/js/application/maniphest/behavior-transaction-controls.js' => '44168bad',
|
||||
'rsrc/js/application/maniphest/behavior-transaction-expand.js' => '5fefb143',
|
||||
'rsrc/js/application/maniphest/behavior-transaction-preview.js' => '4c95d29e',
|
||||
|
@ -590,7 +590,7 @@ return array(
|
|||
'javelin-behavior-maniphest-batch-editor' => '782ab6e7',
|
||||
'javelin-behavior-maniphest-batch-selector' => '7b98d7c5',
|
||||
'javelin-behavior-maniphest-list-editor' => 'a9f88de2',
|
||||
'javelin-behavior-maniphest-subpriority-editor' => '84845b5b',
|
||||
'javelin-behavior-maniphest-subpriority-editor' => '71237763',
|
||||
'javelin-behavior-maniphest-transaction-controls' => '44168bad',
|
||||
'javelin-behavior-maniphest-transaction-expand' => '5fefb143',
|
||||
'javelin-behavior-maniphest-transaction-preview' => '4c95d29e',
|
||||
|
@ -1359,6 +1359,13 @@ return array(
|
|||
'javelin-vector',
|
||||
'javelin-util',
|
||||
),
|
||||
71237763 => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'phabricator-draggable-list',
|
||||
),
|
||||
'7319e029' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1448,13 +1455,6 @@ return array(
|
|||
'javelin-behavior',
|
||||
'javelin-scrollbar',
|
||||
),
|
||||
'84845b5b' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'phabricator-draggable-list',
|
||||
),
|
||||
'85ea0626' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
|
|
|
@ -86,7 +86,7 @@ final class ManiphestTaskResultListView extends ManiphestView {
|
|||
|
||||
$lists[] = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->appendChild($task_list);
|
||||
->setObjectList($task_list);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ JX.behavior('maniphest-subpriority-editor', function(config) {
|
|||
var draggable = new JX.DraggableList('maniphest-task')
|
||||
.setFindItemsHandler(function() {
|
||||
var tasks = JX.DOM.scry(document.body, 'li', 'maniphest-task');
|
||||
var heads = JX.DOM.scry(document.body, 'h1', 'task-group');
|
||||
var heads = JX.DOM.scry(document.body, 'div', 'task-group');
|
||||
return tasks.concat(heads);
|
||||
})
|
||||
.setGhostHandler(function(ghost, target) {
|
||||
|
@ -23,7 +23,7 @@ JX.behavior('maniphest-subpriority-editor', function(config) {
|
|||
}
|
||||
|
||||
if (target.nextSibling) {
|
||||
if (JX.DOM.isType(target, 'h1')) {
|
||||
if (JX.DOM.isType(target, 'div')) {
|
||||
target.nextSibling.insertBefore(ghost, target.nextSibling.firstChild);
|
||||
} else {
|
||||
target.parentNode.insertBefore(ghost, target.nextSibling);
|
||||
|
@ -44,7 +44,7 @@ JX.behavior('maniphest-subpriority-editor', function(config) {
|
|||
task: JX.Stratcom.getData(node).taskID
|
||||
};
|
||||
|
||||
if (JX.DOM.isType(after, 'h1')) {
|
||||
if (JX.DOM.isType(after, 'div')) {
|
||||
data.priority = JX.Stratcom.getData(after).priority;
|
||||
} else {
|
||||
data.after = JX.Stratcom.getData(after).taskID;
|
||||
|
|
Loading…
Reference in a new issue