mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Conpherence - finesse global upload vs conpherence durable column upload
Summary: Fixes T7539. We need to set the "with-column" css class on the document body to make things like the jx-mask style-able. Also, make the global upload control only do it for the standard phabrcator page and not the document body. Test Plan: dragged a file to conpherence column and it worked! uploaded a file to homepage with column open and it worked! uploaded a file to /file/ with column open and it worked! Reviewers: chad, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7539 Differential Revision: https://secure.phabricator.com/D12055
This commit is contained in:
parent
e2296a0ff7
commit
e137d0a0c5
5 changed files with 49 additions and 30 deletions
|
@ -8,7 +8,7 @@
|
|||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => 'efdeeb14',
|
||||
'core.pkg.js' => '5f50c01b',
|
||||
'core.pkg.js' => 'deae6907',
|
||||
'darkconsole.pkg.js' => '8ab24e01',
|
||||
'differential.pkg.css' => '1940be3f',
|
||||
'differential.pkg.js' => '53c1ccc2',
|
||||
|
@ -44,7 +44,7 @@ return array(
|
|||
'rsrc/css/application/config/config-welcome.css' => '6abd79be',
|
||||
'rsrc/css/application/config/setup-issue.css' => '22270af2',
|
||||
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2',
|
||||
'rsrc/css/application/conpherence/durable-column.css' => 'acefcb30',
|
||||
'rsrc/css/application/conpherence/durable-column.css' => 'ddd4e599',
|
||||
'rsrc/css/application/conpherence/menu.css' => 'c6ac5299',
|
||||
'rsrc/css/application/conpherence/message-pane.css' => '5930260a',
|
||||
'rsrc/css/application/conpherence/notification.css' => '04a6e10a',
|
||||
|
@ -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' => '9142e483',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'a3ba7034',
|
||||
'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',
|
||||
|
@ -464,7 +464,7 @@ return array(
|
|||
'rsrc/js/core/behavior-file-tree.js' => '88236f00',
|
||||
'rsrc/js/core/behavior-form.js' => '5c54cbf3',
|
||||
'rsrc/js/core/behavior-gesture.js' => '3ab51e2c',
|
||||
'rsrc/js/core/behavior-global-drag-and-drop.js' => '07f199d8',
|
||||
'rsrc/js/core/behavior-global-drag-and-drop.js' => '8c584f17',
|
||||
'rsrc/js/core/behavior-high-security-warning.js' => '8fc1c918',
|
||||
'rsrc/js/core/behavior-history-install.js' => '7ee2b591',
|
||||
'rsrc/js/core/behavior-hovercard.js' => 'f36e01af',
|
||||
|
@ -514,7 +514,7 @@ return array(
|
|||
'changeset-view-manager' => '88be0133',
|
||||
'config-options-css' => '7fedf08b',
|
||||
'config-welcome-css' => '6abd79be',
|
||||
'conpherence-durable-column-view' => 'acefcb30',
|
||||
'conpherence-durable-column-view' => 'ddd4e599',
|
||||
'conpherence-menu-css' => 'c6ac5299',
|
||||
'conpherence-message-pane-css' => '5930260a',
|
||||
'conpherence-notification-css' => '04a6e10a',
|
||||
|
@ -585,10 +585,10 @@ return array(
|
|||
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
|
||||
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
|
||||
'javelin-behavior-doorkeeper-tag' => 'e5822781',
|
||||
'javelin-behavior-durable-column' => '9142e483',
|
||||
'javelin-behavior-durable-column' => 'a3ba7034',
|
||||
'javelin-behavior-error-log' => '6882e80a',
|
||||
'javelin-behavior-fancy-datepicker' => 'c51ae228',
|
||||
'javelin-behavior-global-drag-and-drop' => '07f199d8',
|
||||
'javelin-behavior-global-drag-and-drop' => '8c584f17',
|
||||
'javelin-behavior-herald-rule-editor' => '7ebaeed3',
|
||||
'javelin-behavior-high-security-warning' => '8fc1c918',
|
||||
'javelin-behavior-history-install' => '7ee2b591',
|
||||
|
@ -872,13 +872,6 @@ return array(
|
|||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
),
|
||||
'07f199d8' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-uri',
|
||||
'javelin-mask',
|
||||
'phabricator-drag-and-drop-file-upload',
|
||||
),
|
||||
'08883e8b' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1523,6 +1516,13 @@ return array(
|
|||
'javelin-uri',
|
||||
'phabricator-file-upload',
|
||||
),
|
||||
'8c584f17' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-uri',
|
||||
'javelin-mask',
|
||||
'phabricator-drag-and-drop-file-upload',
|
||||
),
|
||||
'8ce821c5' => array(
|
||||
'phabricator-notification',
|
||||
'javelin-stratcom',
|
||||
|
@ -1546,16 +1546,6 @@ return array(
|
|||
'javelin-uri',
|
||||
'phabricator-notification',
|
||||
),
|
||||
'9142e483' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-behavior-device',
|
||||
'javelin-scrollbar',
|
||||
'javelin-quicksand',
|
||||
'phabricator-keyboard-shortcut',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'92eb531d' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1630,6 +1620,16 @@ 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',
|
||||
|
|
|
@ -376,15 +376,24 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
|||
$draft_value = $draft->getDraft();
|
||||
}
|
||||
|
||||
$textarea_id = celerity_generate_unique_node_id();
|
||||
$textarea = javelin_tag(
|
||||
'textarea',
|
||||
array(
|
||||
'id' => $textarea_id,
|
||||
'name' => 'text',
|
||||
'class' => 'conpherence-durable-column-textarea',
|
||||
'sigil' => 'conpherence-durable-column-textarea',
|
||||
'placeholder' => pht('Send a message...'),
|
||||
),
|
||||
$draft_value);
|
||||
Javelin::initBehavior(
|
||||
'aphront-drag-and-drop-textarea',
|
||||
array(
|
||||
'target' => $textarea_id,
|
||||
'activatedClass' => 'aphront-textarea-drag-and-drop',
|
||||
'uri' => '/file/dropupload/',
|
||||
));
|
||||
$id = $conpherence->getID();
|
||||
return phabricator_form(
|
||||
$this->getUser(),
|
||||
|
|
|
@ -2,10 +2,20 @@
|
|||
* @provides conpherence-durable-column-view
|
||||
*/
|
||||
|
||||
.with-durable-column {
|
||||
.with-durable-column .phabricator-standard-page {
|
||||
margin-right: 300px;
|
||||
}
|
||||
|
||||
.with-durable-column
|
||||
.phabricator-global-upload-instructions {
|
||||
font-size: 28px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.with-durable-column .global-upload-mask {
|
||||
right: 300px;
|
||||
}
|
||||
|
||||
.conpherence-durable-column {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
|
@ -28,7 +28,6 @@ JX.behavior('durable-column', function(config, statics) {
|
|||
var loadThreadID = null;
|
||||
var scrollbar = null;
|
||||
|
||||
var frame = JX.$('phabricator-standard-page');
|
||||
var quick = JX.$('phabricator-standard-page-body');
|
||||
|
||||
function _getColumnNode() {
|
||||
|
@ -49,7 +48,7 @@ JX.behavior('durable-column', function(config, statics) {
|
|||
}
|
||||
}
|
||||
show = !show;
|
||||
JX.DOM.alterClass(frame, 'with-durable-column', show);
|
||||
JX.DOM.alterClass(document.body, 'with-durable-column', show);
|
||||
var column = _getColumnNode();
|
||||
if (show) {
|
||||
JX.DOM.show(column);
|
||||
|
|
|
@ -20,17 +20,18 @@ JX.behavior('global-drag-and-drop', function(config) {
|
|||
JX.$(config.ifSupported).style.display = '';
|
||||
}
|
||||
|
||||
var drop = new JX.PhabricatorDragAndDropFileUpload(document.documentElement)
|
||||
var page = JX.$('phabricator-standard-page');
|
||||
var drop = new JX.PhabricatorDragAndDropFileUpload(page)
|
||||
.setURI(config.uploadURI)
|
||||
.setViewPolicy(config.viewPolicy);
|
||||
|
||||
drop.listen('didBeginDrag', function() {
|
||||
JX.Mask.show();
|
||||
JX.Mask.show('global-upload-mask');
|
||||
JX.DOM.show(JX.$(config.instructions));
|
||||
});
|
||||
|
||||
drop.listen('didEndDrag', function() {
|
||||
JX.Mask.hide();
|
||||
JX.Mask.hide('global-upload-mask');
|
||||
JX.DOM.hide(JX.$(config.instructions));
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue