mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 04:42:40 +01:00
Remove unused drag and drop Conpherence code
Summary: Ref T11730. Removes unused code since this is now it's own page. Test Plan: rebuild maps, grep for javelin code, classnames Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T11730 Differential Revision: https://secure.phabricator.com/D16700
This commit is contained in:
parent
86a00ee4ab
commit
d3487b6371
5 changed files with 1 additions and 91 deletions
|
@ -8,7 +8,7 @@
|
|||
return array(
|
||||
'names' => array(
|
||||
'conpherence.pkg.css' => '4601645d',
|
||||
'conpherence.pkg.js' => '11f3e07e',
|
||||
'conpherence.pkg.js' => '44dd69f5',
|
||||
'core.pkg.css' => '7ca260a3',
|
||||
'core.pkg.js' => '30185d95',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
|
@ -437,7 +437,6 @@ return array(
|
|||
'rsrc/js/application/calendar/behavior-recurring-edit.js' => '5f1c4d5f',
|
||||
'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408',
|
||||
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2',
|
||||
'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'c5238acb',
|
||||
'rsrc/js/application/conpherence/behavior-menu.js' => '9eb55204',
|
||||
'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8',
|
||||
|
@ -665,7 +664,6 @@ return array(
|
|||
'javelin-behavior-choose-control' => '327a00d1',
|
||||
'javelin-behavior-comment-actions' => '0300eae6',
|
||||
'javelin-behavior-config-reorder-fields' => 'b6993408',
|
||||
'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a',
|
||||
'javelin-behavior-conpherence-menu' => '9eb55204',
|
||||
'javelin-behavior-conpherence-participant-pane' => '8604caa8',
|
||||
'javelin-behavior-conpherence-pontificate' => 'f2e58483',
|
||||
|
@ -2010,12 +2008,6 @@ return array(
|
|||
'javelin-util',
|
||||
'phabricator-notification-css',
|
||||
),
|
||||
'cf86d16a' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-workflow',
|
||||
'phabricator-drag-and-drop-file-upload',
|
||||
),
|
||||
'cfd23f37' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
|
@ -2305,7 +2297,6 @@ return array(
|
|||
'conpherence-header-pane-css',
|
||||
),
|
||||
'conpherence.pkg.js' => array(
|
||||
'javelin-behavior-conpherence-drag-and-drop-photo',
|
||||
'javelin-behavior-conpherence-menu',
|
||||
'javelin-behavior-conpherence-participant-pane',
|
||||
'javelin-behavior-conpherence-pontificate',
|
||||
|
|
|
@ -162,7 +162,6 @@ return array(
|
|||
'conpherence-header-pane-css',
|
||||
),
|
||||
'conpherence.pkg.js' => array(
|
||||
'javelin-behavior-conpherence-drag-and-drop-photo',
|
||||
'javelin-behavior-conpherence-menu',
|
||||
'javelin-behavior-conpherence-participant-pane',
|
||||
'javelin-behavior-conpherence-pontificate',
|
||||
|
|
|
@ -291,7 +291,6 @@ phutil_register_library_map(array(
|
|||
'ConpherenceDAO' => 'applications/conpherence/storage/ConpherenceDAO.php',
|
||||
'ConpherenceDurableColumnView' => 'applications/conpherence/view/ConpherenceDurableColumnView.php',
|
||||
'ConpherenceEditor' => 'applications/conpherence/editor/ConpherenceEditor.php',
|
||||
'ConpherenceFormDragAndDropUploadControl' => 'applications/conpherence/view/ConpherenceFormDragAndDropUploadControl.php',
|
||||
'ConpherenceFulltextQuery' => 'applications/conpherence/query/ConpherenceFulltextQuery.php',
|
||||
'ConpherenceIndex' => 'applications/conpherence/storage/ConpherenceIndex.php',
|
||||
'ConpherenceLayoutView' => 'applications/conpherence/view/ConpherenceLayoutView.php',
|
||||
|
@ -4808,7 +4807,6 @@ phutil_register_library_map(array(
|
|||
'ConpherenceDAO' => 'PhabricatorLiskDAO',
|
||||
'ConpherenceDurableColumnView' => 'AphrontTagView',
|
||||
'ConpherenceEditor' => 'PhabricatorApplicationTransactionEditor',
|
||||
'ConpherenceFormDragAndDropUploadControl' => 'AphrontFormControl',
|
||||
'ConpherenceFulltextQuery' => 'PhabricatorOffsetPagedQuery',
|
||||
'ConpherenceIndex' => 'ConpherenceDAO',
|
||||
'ConpherenceLayoutView' => 'AphrontTagView',
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class ConpherenceFormDragAndDropUploadControl extends AphrontFormControl {
|
||||
|
||||
private $dropID;
|
||||
|
||||
public function setDropID($drop_id) {
|
||||
$this->dropID = $drop_id;
|
||||
return $this;
|
||||
}
|
||||
public function getDropID() {
|
||||
return $this->dropID;
|
||||
}
|
||||
|
||||
protected function getCustomControlClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function renderInput() {
|
||||
|
||||
$drop_id = celerity_generate_unique_node_id();
|
||||
Javelin::initBehavior('conpherence-drag-and-drop-photo',
|
||||
array(
|
||||
'target' => $drop_id,
|
||||
'form_pane' => 'conpherence-form',
|
||||
'upload_uri' => '/file/dropupload/',
|
||||
'activated_class' => 'conpherence-dialogue-upload-photo',
|
||||
));
|
||||
require_celerity_resource('conpherence-update-css');
|
||||
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'id' => $drop_id,
|
||||
'class' => 'conpherence-dialogue-drag-photo',
|
||||
),
|
||||
pht('Drag and drop an image here to upload it.'));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/**
|
||||
* @provides javelin-behavior-conpherence-drag-and-drop-photo
|
||||
* @requires javelin-behavior
|
||||
* javelin-dom
|
||||
* javelin-workflow
|
||||
* phabricator-drag-and-drop-file-upload
|
||||
*/
|
||||
|
||||
JX.behavior('conpherence-drag-and-drop-photo', function(config) {
|
||||
|
||||
var target = JX.$(config.target);
|
||||
var form_pane = JX.$(config.form_pane);
|
||||
|
||||
function onupload(f) {
|
||||
var data = {
|
||||
'file_id' : f.getID(),
|
||||
'action' : 'metadata'
|
||||
};
|
||||
|
||||
var form = JX.DOM.find(form_pane, 'form');
|
||||
var workflow = JX.Workflow.newFromForm(form, data);
|
||||
workflow.start();
|
||||
}
|
||||
|
||||
if (JX.PhabricatorDragAndDropFileUpload.isSupported()) {
|
||||
var drop = new JX.PhabricatorDragAndDropFileUpload(target)
|
||||
.setURI(config.upload_uri);
|
||||
drop.listen('didBeginDrag', function() {
|
||||
JX.DOM.alterClass(target, config.activated_class, true);
|
||||
});
|
||||
drop.listen('didEndDrag', function() {
|
||||
JX.DOM.alterClass(target, config.activated_class, false);
|
||||
});
|
||||
drop.listen('didUpload', onupload);
|
||||
drop.start();
|
||||
}
|
||||
|
||||
});
|
Loading…
Reference in a new issue