diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -16,7 +16,7 @@ 'diffusion.pkg.css' => '42c75c37', 'diffusion.pkg.js' => '91192d85', 'maniphest.pkg.css' => '35995d6d', - 'maniphest.pkg.js' => '286955ae', + 'maniphest.pkg.js' => 'c9308721', 'rsrc/audio/basic/alert.mp3' => '17889334', 'rsrc/audio/basic/bing.mp3' => 'a817a0c3', 'rsrc/audio/basic/pock.mp3' => '0fa843d0', @@ -395,10 +395,9 @@ 'rsrc/js/application/herald/HeraldRuleEditor.js' => '27daef73', 'rsrc/js/application/herald/PathTypeahead.js' => 'ad486db3', 'rsrc/js/application/herald/herald-rule-editor.js' => '0922e81d', - 'rsrc/js/application/maniphest/behavior-batch-selector.js' => 'cffd39b4', + 'rsrc/js/application/maniphest/behavior-batch-selector.js' => '139ef688', 'rsrc/js/application/maniphest/behavior-line-chart.js' => 'c8147a20', 'rsrc/js/application/maniphest/behavior-list-edit.js' => 'c687e867', - 'rsrc/js/application/maniphest/behavior-subpriorityeditor.js' => '8400307c', 'rsrc/js/application/owners/OwnersPathEditor.js' => '2a8b62d9', 'rsrc/js/application/owners/owners-path-editor.js' => 'ff688a7a', 'rsrc/js/application/passphrase/passphrase-credential-control.js' => '48fe33d0', @@ -619,9 +618,8 @@ 'javelin-behavior-lightbox-attachments' => 'c7e748bf', 'javelin-behavior-line-chart' => 'c8147a20', 'javelin-behavior-linked-container' => '74446546', - 'javelin-behavior-maniphest-batch-selector' => 'cffd39b4', + 'javelin-behavior-maniphest-batch-selector' => '139ef688', 'javelin-behavior-maniphest-list-editor' => 'c687e867', - 'javelin-behavior-maniphest-subpriority-editor' => '8400307c', 'javelin-behavior-owners-path-editor' => 'ff688a7a', 'javelin-behavior-passphrase-credential-control' => '48fe33d0', 'javelin-behavior-phabricator-active-nav' => '7353f43d', @@ -998,6 +996,12 @@ 'javelin-uri', 'phabricator-keyboard-shortcut', ), + '139ef688' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-util', + ), '1c850a26' => array( 'javelin-install', 'javelin-util', @@ -1539,13 +1543,6 @@ 'javelin-dom', 'javelin-vector', ), - '8400307c' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-workflow', - 'phabricator-draggable-list', - ), '8437c663' => array( 'javelin-install', 'javelin-dom', @@ -1970,12 +1967,6 @@ 'javelin-dom', 'javelin-stratcom', ), - 'cffd39b4' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-util', - ), 'd0a85a85' => array( 'javelin-dom', 'javelin-util', @@ -2362,7 +2353,6 @@ ), 'maniphest.pkg.js' => array( 'javelin-behavior-maniphest-batch-selector', - 'javelin-behavior-maniphest-subpriority-editor', 'javelin-behavior-maniphest-list-editor', ), ), diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -218,7 +218,6 @@ ), 'maniphest.pkg.js' => array( 'javelin-behavior-maniphest-batch-selector', - 'javelin-behavior-maniphest-subpriority-editor', 'javelin-behavior-maniphest-list-editor', ), ); diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1709,7 +1709,6 @@ 'ManiphestStatusEmailCommand' => 'applications/maniphest/command/ManiphestStatusEmailCommand.php', 'ManiphestStatusSearchConduitAPIMethod' => 'applications/maniphest/conduit/ManiphestStatusSearchConduitAPIMethod.php', 'ManiphestStatusesConfigType' => 'applications/maniphest/config/ManiphestStatusesConfigType.php', - 'ManiphestSubpriorityController' => 'applications/maniphest/controller/ManiphestSubpriorityController.php', 'ManiphestSubtypesConfigType' => 'applications/maniphest/config/ManiphestSubtypesConfigType.php', 'ManiphestTask' => 'applications/maniphest/storage/ManiphestTask.php', 'ManiphestTaskAssignHeraldAction' => 'applications/maniphest/herald/ManiphestTaskAssignHeraldAction.php', @@ -7406,7 +7405,6 @@ 'ManiphestStatusEmailCommand' => 'ManiphestEmailCommand', 'ManiphestStatusSearchConduitAPIMethod' => 'ManiphestConduitAPIMethod', 'ManiphestStatusesConfigType' => 'PhabricatorJSONConfigType', - 'ManiphestSubpriorityController' => 'ManiphestController', 'ManiphestSubtypesConfigType' => 'PhabricatorJSONConfigType', 'ManiphestTask' => array( 'ManiphestDAO', diff --git a/src/applications/maniphest/application/PhabricatorManiphestApplication.php b/src/applications/maniphest/application/PhabricatorManiphestApplication.php --- a/src/applications/maniphest/application/PhabricatorManiphestApplication.php +++ b/src/applications/maniphest/application/PhabricatorManiphestApplication.php @@ -54,7 +54,6 @@ => 'ManiphestTaskEditController', 'subtask/(?P[1-9]\d*)/' => 'ManiphestTaskSubtaskController', ), - 'subpriority/' => 'ManiphestSubpriorityController', 'graph/(?P[1-9]\d*)/' => 'ManiphestTaskGraphController', ), ); diff --git a/src/applications/maniphest/controller/ManiphestController.php b/src/applications/maniphest/controller/ManiphestController.php --- a/src/applications/maniphest/controller/ManiphestController.php +++ b/src/applications/maniphest/controller/ManiphestController.php @@ -53,7 +53,6 @@ $view = id(new ManiphestTaskListView()) ->setUser($user) - ->setShowSubpriorityControls(!$request->getStr('ungrippable')) ->setShowBatchControls(true) ->setHandles($handles) ->setTasks(array($task)); diff --git a/src/applications/maniphest/controller/ManiphestSubpriorityController.php b/src/applications/maniphest/controller/ManiphestSubpriorityController.php deleted file mode 100644 --- a/src/applications/maniphest/controller/ManiphestSubpriorityController.php +++ /dev/null @@ -1,70 +0,0 @@ -getViewer(); - - if (!$request->validateCSRF()) { - return new Aphront403Response(); - } - - $task = id(new ManiphestTaskQuery()) - ->setViewer($viewer) - ->withIDs(array($request->getInt('task'))) - ->needProjectPHIDs(true) - ->requireCapabilities( - array( - PhabricatorPolicyCapability::CAN_VIEW, - PhabricatorPolicyCapability::CAN_EDIT, - )) - ->executeOne(); - if (!$task) { - return new Aphront404Response(); - } - - if ($request->getInt('after')) { - $after_task = id(new ManiphestTaskQuery()) - ->setViewer($viewer) - ->withIDs(array($request->getInt('after'))) - ->executeOne(); - if (!$after_task) { - return new Aphront404Response(); - } - list($pri, $sub) = ManiphestTransactionEditor::getAdjacentSubpriority( - $after_task, - $is_after = true); - } else { - list($pri, $sub) = ManiphestTransactionEditor::getEdgeSubpriority( - $request->getInt('priority'), - $is_end = false); - } - - $keyword_map = ManiphestTaskPriority::getTaskPriorityKeywordsMap(); - $keyword = head(idx($keyword_map, $pri)); - - $xactions = array(); - - $xactions[] = id(new ManiphestTransaction()) - ->setTransactionType(ManiphestTaskPriorityTransaction::TRANSACTIONTYPE) - ->setNewValue($keyword); - - $xactions[] = id(new ManiphestTransaction()) - ->setTransactionType(ManiphestTaskSubpriorityTransaction::TRANSACTIONTYPE) - ->setNewValue($sub); - - $editor = id(new ManiphestTransactionEditor()) - ->setActor($viewer) - ->setContinueOnMissingFields(true) - ->setContinueOnNoEffect(true) - ->setContentSourceFromRequest($request); - - $editor->applyTransactions($task, $xactions); - - return id(new AphrontAjaxResponse())->setContent( - array( - 'tasks' => $this->renderSingleTask($task), - )); - } - -} diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -5,7 +5,6 @@ public function handleRequest(AphrontRequest $request) { return id(new ManiphestEditEngine()) ->setController($this) - ->addContextParameter('ungrippable') ->addContextParameter('responseType') ->addContextParameter('columnPHID') ->addContextParameter('order') diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -366,10 +366,8 @@ $viewer = $this->requireViewer(); if ($this->isPanelContext()) { - $can_edit_priority = false; $can_bulk_edit = false; } else { - $can_edit_priority = true; $can_bulk_edit = PhabricatorPolicyFilter::hasCapability( $viewer, $this->getApplication(), @@ -380,7 +378,6 @@ ->setUser($viewer) ->setTasks($tasks) ->setSavedQuery($saved) - ->setCanEditPriority($can_edit_priority) ->setCanBatchEdit($can_bulk_edit) ->setShowBatchControls($this->showBatchControls); diff --git a/src/applications/maniphest/view/ManiphestTaskListView.php b/src/applications/maniphest/view/ManiphestTaskListView.php --- a/src/applications/maniphest/view/ManiphestTaskListView.php +++ b/src/applications/maniphest/view/ManiphestTaskListView.php @@ -5,7 +5,6 @@ private $tasks; private $handles; private $showBatchControls; - private $showSubpriorityControls; private $noDataString; public function setTasks(array $tasks) { @@ -25,11 +24,6 @@ return $this; } - public function setShowSubpriorityControls($show_subpriority_controls) { - $this->showSubpriorityControls = $show_subpriority_controls; - return $this; - } - public function setNoDataString($text) { $this->noDataString = $text; return $this; @@ -102,10 +96,7 @@ phabricator_datetime($task->getDateModified(), $this->getUser())); } - if ($this->showSubpriorityControls) { - $item->setGrippable(true); - } - if ($this->showSubpriorityControls || $this->showBatchControls) { + if ($this->showBatchControls) { $item->addSigil('maniphest-task'); } @@ -134,9 +125,6 @@ if ($this->showBatchControls) { $href = new PhutilURI('/maniphest/task/edit/'.$task->getID().'/'); - if (!$this->showSubpriorityControls) { - $href->replaceQueryParam('ungrippable', 'true'); - } $item->addAction( id(new PHUIListItemView()) ->setIcon('fa-pencil') diff --git a/src/applications/maniphest/view/ManiphestTaskResultListView.php b/src/applications/maniphest/view/ManiphestTaskResultListView.php --- a/src/applications/maniphest/view/ManiphestTaskResultListView.php +++ b/src/applications/maniphest/view/ManiphestTaskResultListView.php @@ -4,7 +4,6 @@ private $tasks; private $savedQuery; - private $canEditPriority; private $canBatchEdit; private $showBatchControls; @@ -18,11 +17,6 @@ return $this; } - public function setCanEditPriority($can_edit_priority) { - $this->canEditPriority = $can_edit_priority; - return $this; - } - public function setCanBatchEdit($can_batch_edit) { $this->canBatchEdit = $can_batch_edit; return $this; @@ -54,28 +48,12 @@ $group_parameter, $handles); - $can_edit_priority = $this->canEditPriority; - - $can_drag = ($order_parameter == 'priority') && - ($can_edit_priority) && - ($group_parameter == 'none' || $group_parameter == 'priority'); - - if (!$viewer->isLoggedIn()) { - // TODO: (T7131) Eventually, we conceivably need to make each task - // draggable individually, since the user may be able to edit some but - // not others. - $can_drag = false; - } - $result = array(); $lists = array(); foreach ($groups as $group => $list) { $task_list = new ManiphestTaskListView(); $task_list->setShowBatchControls($this->showBatchControls); - if ($can_drag) { - $task_list->setShowSubpriorityControls(true); - } $task_list->setUser($viewer); $task_list->setTasks($list); $task_list->setHandles($handles); @@ -91,14 +69,6 @@ } - if ($can_drag) { - Javelin::initBehavior( - 'maniphest-subpriority-editor', - array( - 'uri' => '/maniphest/subpriority/', - )); - } - return array( $lists, $this->showBatchControls ? $this->renderBatchEditor($query) : null, diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php --- a/src/view/phui/PHUIObjectItemView.php +++ b/src/view/phui/PHUIObjectItemView.php @@ -414,25 +414,17 @@ )); } - // Wrap the header content in a with the "slippery" sigil. This - // prevents us from beginning a drag if you click the text (like "T123"), - // but not if you click the white space after the header. $header = phutil_tag( 'div', array( 'class' => 'phui-oi-name', ), - javelin_tag( - 'span', - array( - 'sigil' => 'slippery', - ), - array( - $this->headIcons, - $header_name, - $header_link, - $description_tag, - ))); + array( + $this->headIcons, + $header_name, + $header_link, + $description_tag, + )); $icons = array(); if ($this->icons) { diff --git a/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js b/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js --- a/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js +++ b/webroot/rsrc/js/application/maniphest/behavior-batch-selector.js @@ -41,19 +41,6 @@ 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). diff --git a/webroot/rsrc/js/application/maniphest/behavior-subpriorityeditor.js b/webroot/rsrc/js/application/maniphest/behavior-subpriorityeditor.js deleted file mode 100644 --- a/webroot/rsrc/js/application/maniphest/behavior-subpriorityeditor.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @provides javelin-behavior-maniphest-subpriority-editor - * @requires javelin-behavior - * javelin-dom - * javelin-stratcom - * javelin-workflow - * phabricator-draggable-list - */ - -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, 'div', 'task-group'); - return tasks.concat(heads); - }) - .setGhostHandler(function(ghost, target) { - if (!target) { - // The user is trying to drag a task above the first group header; - // don't permit that since it doesn't make sense. - return false; - } - - if (target.nextSibling) { - if (JX.DOM.isType(target, 'div')) { - target.nextSibling.insertBefore(ghost, target.nextSibling.firstChild); - } else { - target.parentNode.insertBefore(ghost, target.nextSibling); - } - } else { - target.parentNode.appendChild(ghost); - } - }); - - draggable.listen('shouldBeginDrag', function(e) { - if (e.getNode('slippery') || e.getNode('maniphest-edit-task')) { - JX.Stratcom.context().kill(); - } - }); - - draggable.listen('didDrop', function(node, after) { - var data = { - task: JX.Stratcom.getData(node).taskID - }; - - if (JX.DOM.isType(after, 'div')) { - data.priority = JX.Stratcom.getData(after).priority; - } else { - data.after = JX.Stratcom.getData(after).taskID; - } - - draggable.lock(); - JX.DOM.alterClass(node, 'drag-sending', true); - - var onresponse = function(r) { - 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) - .setHandler(onresponse) - .start(); - }); - -});