mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Make "Add Action..." add actions at the bottom instead of the top
Summary: Ref T9132. Shhh this never happened shhhhhhh. Test Plan: Selected multiple actions, saw them add at the bottom. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9132 Differential Revision: https://secure.phabricator.com/D14664
This commit is contained in:
parent
6bfb101aff
commit
8bbea6d41c
3 changed files with 23 additions and 16 deletions
|
@ -427,7 +427,7 @@ return array(
|
|||
'rsrc/js/application/repository/repository-crossreference.js' => 'e5339c43',
|
||||
'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08',
|
||||
'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => '887ad43f',
|
||||
'rsrc/js/application/transactions/behavior-comment-actions.js' => 'f2c64202',
|
||||
'rsrc/js/application/transactions/behavior-comment-actions.js' => 'dd5cae21',
|
||||
'rsrc/js/application/transactions/behavior-reorder-fields.js' => 'b59e1e96',
|
||||
'rsrc/js/application/transactions/behavior-show-older-transactions.js' => 'dbbf48b6',
|
||||
'rsrc/js/application/transactions/behavior-transaction-comment-form.js' => 'b23b49e6',
|
||||
|
@ -571,7 +571,7 @@ return array(
|
|||
'javelin-behavior-audit-preview' => 'd835b03a',
|
||||
'javelin-behavior-bulk-job-reload' => 'edf8a145',
|
||||
'javelin-behavior-choose-control' => '6153c708',
|
||||
'javelin-behavior-comment-actions' => 'f2c64202',
|
||||
'javelin-behavior-comment-actions' => 'dd5cae21',
|
||||
'javelin-behavior-config-reorder-fields' => 'b6993408',
|
||||
'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a',
|
||||
'javelin-behavior-conpherence-menu' => '1d45c74d',
|
||||
|
@ -1867,6 +1867,14 @@ return array(
|
|||
'javelin-dom',
|
||||
'phabricator-busy',
|
||||
),
|
||||
'dd5cae21' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'javelin-dom',
|
||||
'phuix-form-control-view',
|
||||
'phuix-icon-view',
|
||||
),
|
||||
'de2e896f' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1968,14 +1976,6 @@ return array(
|
|||
'javelin-workflow',
|
||||
'javelin-json',
|
||||
),
|
||||
'f2c64202' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'javelin-dom',
|
||||
'phuix-form-control-view',
|
||||
'phuix-icon-view',
|
||||
),
|
||||
'f36e01af' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-behavior-device',
|
||||
|
|
|
@ -227,6 +227,7 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
|
|||
|
||||
$action_id = celerity_generate_unique_node_id();
|
||||
$input_id = celerity_generate_unique_node_id();
|
||||
$place_id = celerity_generate_unique_node_id();
|
||||
|
||||
$form->appendChild(
|
||||
phutil_tag(
|
||||
|
@ -243,12 +244,22 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
|
|||
->setID($action_id)
|
||||
->setOptions($options));
|
||||
|
||||
// This is an empty placeholder node so we know where to insert the
|
||||
// new actions.
|
||||
$form->appendChild(
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'id' => $place_id,
|
||||
)));
|
||||
|
||||
Javelin::initBehavior(
|
||||
'comment-actions',
|
||||
array(
|
||||
'actionID' => $action_id,
|
||||
'inputID' => $input_id,
|
||||
'formID' => $this->getFormID(),
|
||||
'placeID' => $place_id,
|
||||
'actions' => $action_map,
|
||||
));
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ JX.behavior('comment-actions', function(config) {
|
|||
var action_node = JX.$(config.actionID);
|
||||
var form_node = JX.$(config.formID);
|
||||
var input_node = JX.$(config.inputID);
|
||||
var place_node = JX.$(config.placeID);
|
||||
|
||||
var rows = {};
|
||||
|
||||
|
@ -73,12 +74,7 @@ JX.behavior('comment-actions', function(config) {
|
|||
option.disabled = false;
|
||||
});
|
||||
|
||||
// TODO: Grotesque.
|
||||
action_node
|
||||
.parentNode
|
||||
.parentNode
|
||||
.parentNode
|
||||
.insertBefore(node, action_node.parentNode.parentNode.nextSibling);
|
||||
place_node.parentNode.insertBefore(node, place_node);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue