mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Send on enter in Conpherence chat column
Summary: Ref T7538. We can figure out whether to backport this to main Conpherence later and/or remove buttons, etc., but this behavior seems pretty clearly good. Test Plan: - Pressed enter (sent message). - Pressed shift+enter (newline). Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T7538 Differential Revision: https://secure.phabricator.com/D12085
This commit is contained in:
parent
8414c0ab3e
commit
e6f1c34a47
2 changed files with 30 additions and 15 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => 'a4b1b2ae',
|
||||
'core.pkg.css' => 'a7f3dc55',
|
||||
'core.pkg.js' => '31bc6546',
|
||||
'darkconsole.pkg.js' => '8ab24e01',
|
||||
'differential.pkg.css' => '1940be3f',
|
||||
|
@ -21,7 +21,7 @@ return array(
|
|||
'rsrc/css/aphront/dialog-view.css' => 'd2e76b88',
|
||||
'rsrc/css/aphront/lightbox-attachment.css' => '7acac05d',
|
||||
'rsrc/css/aphront/list-filter-view.css' => '2ae43867',
|
||||
'rsrc/css/aphront/multi-column.css' => '41a848c0',
|
||||
'rsrc/css/aphront/multi-column.css' => 'fd18389d',
|
||||
'rsrc/css/aphront/notification.css' => '9c279160',
|
||||
'rsrc/css/aphront/pager-view.css' => '2e3539af',
|
||||
'rsrc/css/aphront/panel-view.css' => '8427b78d',
|
||||
|
@ -353,7 +353,7 @@ return array(
|
|||
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
|
||||
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
|
||||
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '0324970d',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'a3ba7034',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => '217c5ea5',
|
||||
'rsrc/js/application/conpherence/behavior-menu.js' => 'c4151295',
|
||||
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
|
||||
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
|
||||
|
@ -501,7 +501,7 @@ return array(
|
|||
'aphront-dark-console-css' => '6378ef3d',
|
||||
'aphront-dialog-view-css' => 'd2e76b88',
|
||||
'aphront-list-filter-view-css' => '2ae43867',
|
||||
'aphront-multi-column-view-css' => '41a848c0',
|
||||
'aphront-multi-column-view-css' => 'fd18389d',
|
||||
'aphront-pager-view-css' => '2e3539af',
|
||||
'aphront-panel-view-css' => '8427b78d',
|
||||
'aphront-table-view-css' => 'b22b7216',
|
||||
|
@ -583,7 +583,7 @@ return array(
|
|||
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
|
||||
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
|
||||
'javelin-behavior-doorkeeper-tag' => 'e5822781',
|
||||
'javelin-behavior-durable-column' => 'a3ba7034',
|
||||
'javelin-behavior-durable-column' => '217c5ea5',
|
||||
'javelin-behavior-error-log' => '6882e80a',
|
||||
'javelin-behavior-fancy-datepicker' => 'c51ae228',
|
||||
'javelin-behavior-global-drag-and-drop' => 'bbdf75ca',
|
||||
|
@ -973,6 +973,16 @@ return array(
|
|||
'phabricator-phtize',
|
||||
'changeset-view-manager',
|
||||
),
|
||||
'217c5ea5' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-behavior-device',
|
||||
'javelin-scrollbar',
|
||||
'javelin-quicksand',
|
||||
'phabricator-keyboard-shortcut',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'21ba5861' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1608,16 +1618,6 @@ return array(
|
|||
'javelin-vector',
|
||||
'javelin-magical-init',
|
||||
),
|
||||
'a3ba7034' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-behavior-device',
|
||||
'javelin-scrollbar',
|
||||
'javelin-quicksand',
|
||||
'phabricator-keyboard-shortcut',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'a48aa699' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
|
|
@ -281,6 +281,21 @@ JX.behavior('durable-column', function(config, statics) {
|
|||
'conpherence-message-form',
|
||||
_sendMessage);
|
||||
|
||||
// Send on enter if the shift key is not held.
|
||||
JX.Stratcom.listen(
|
||||
'keydown',
|
||||
'conpherence-message-form',
|
||||
function(e) {
|
||||
if (e.getSpecialKey() != 'return') {
|
||||
return;
|
||||
}
|
||||
var raw = e.getRawEvent();
|
||||
if (raw.shiftKey) {
|
||||
return;
|
||||
}
|
||||
_sendMessage(e);
|
||||
});
|
||||
|
||||
JX.Stratcom.listen(
|
||||
['keydown'],
|
||||
'conpherence-durable-column-textarea',
|
||||
|
|
Loading…
Reference in a new issue