Page MenuHomePhabricator

D21187.id50454.diff
No OneTemporary

D21187.id50454.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -13,7 +13,7 @@
'core.pkg.js' => '49814bac',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => '73cf6fb1',
- 'differential.pkg.js' => 'b289f75d',
+ 'differential.pkg.js' => '792d5b09',
'diffusion.pkg.css' => '42c75c37',
'diffusion.pkg.js' => 'a98c0bf7',
'maniphest.pkg.css' => '35995d6d',
@@ -381,7 +381,7 @@
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
'rsrc/js/application/diff/DiffChangeset.js' => '9a713ba5',
'rsrc/js/application/diff/DiffChangesetList.js' => '10726e6a',
- 'rsrc/js/application/diff/DiffInline.js' => '7b0bdd6d',
+ 'rsrc/js/application/diff/DiffInline.js' => '29f3aed1',
'rsrc/js/application/diff/DiffPathView.js' => '8207abf9',
'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b',
'rsrc/js/application/diff/behavior-preview-link.js' => 'f51e9c17',
@@ -778,7 +778,7 @@
'phabricator-dashboard-css' => '5a205b9d',
'phabricator-diff-changeset' => '9a713ba5',
'phabricator-diff-changeset-list' => '10726e6a',
- 'phabricator-diff-inline' => '7b0bdd6d',
+ 'phabricator-diff-inline' => '29f3aed1',
'phabricator-diff-path-view' => '8207abf9',
'phabricator-diff-tree-view' => '5d83623b',
'phabricator-drag-and-drop-file-upload' => '4370900d',
@@ -1158,6 +1158,9 @@
'javelin-stratcom',
'javelin-behavior',
),
+ '29f3aed1' => array(
+ 'javelin-dom',
+ ),
'2a8b62d9' => array(
'multirow-row-manager',
'javelin-install',
@@ -1622,9 +1625,6 @@
'phabricator-drag-and-drop-file-upload',
'phabricator-textareautils',
),
- '7b0bdd6d' => array(
- 'javelin-dom',
- ),
'7b139193' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php
--- a/src/infrastructure/diff/PhabricatorInlineCommentController.php
+++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php
@@ -215,6 +215,19 @@
$view = $this->buildScaffoldForView($edit_dialog);
return $this->newInlineResponse($inline, $view);
+ case 'cancel':
+ $inline = $this->loadCommentForEdit($this->getCommentID());
+
+ $inline->setIsEditing(false);
+
+ $content = $inline->getContent();
+ if (!strlen($content)) {
+ $this->deleteComment($inline);
+ } else {
+ $this->saveComment($inline);
+ }
+
+ return $this->buildEmptyResponse();
case 'new':
case 'reply':
default:
diff --git a/webroot/rsrc/js/application/diff/DiffInline.js b/webroot/rsrc/js/application/diff/DiffInline.js
--- a/webroot/rsrc/js/application/diff/DiffInline.js
+++ b/webroot/rsrc/js/application/diff/DiffInline.js
@@ -647,12 +647,26 @@
}
this.setEditing(false);
-
this.setInvisible(false);
+ this.setLoading(true);
+
+ var uri = this._getInlineURI();
+ var data = this._newRequestData('cancel');
+ var handler = JX.bind(this, this._onCancelResponse);
+
+ this.setLoading(true);
+
+ new JX.Request(uri, handler)
+ .setData(data)
+ .send();
this._didUpdate(true);
},
+ _onCancelResponse: function(response) {
+ this.setLoading(false);
+ },
+
_readText: function(row) {
var textarea;
try {

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 4:35 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7385697
Default Alt Text
D21187.id50454.diff (3 KB)

Event Timeline