Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14396550
D21645.id51513.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D21645.id51513.diff
View Options
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' => 'ab3502fe',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => 'ffb69e3d',
- 'differential.pkg.js' => 'd1150814',
+ 'differential.pkg.js' => '5e0c7197',
'diffusion.pkg.css' => '42c75c37',
'diffusion.pkg.js' => '78c9885d',
'maniphest.pkg.css' => '35995d6d',
@@ -385,7 +385,8 @@
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
'rsrc/js/application/diff/DiffChangeset.js' => 'd7d3ba75',
'rsrc/js/application/diff/DiffChangesetList.js' => 'cc2c5de5',
- 'rsrc/js/application/diff/DiffInline.js' => '511a1315',
+ 'rsrc/js/application/diff/DiffInline.js' => '09e0c6e5',
+ 'rsrc/js/application/diff/DiffInlineContentState.js' => 'cb9e5396',
'rsrc/js/application/diff/DiffPathView.js' => '8207abf9',
'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b',
'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd',
@@ -787,7 +788,8 @@
'phabricator-dashboard-css' => '5a205b9d',
'phabricator-diff-changeset' => 'd7d3ba75',
'phabricator-diff-changeset-list' => 'cc2c5de5',
- 'phabricator-diff-inline' => '511a1315',
+ 'phabricator-diff-inline' => '09e0c6e5',
+ 'phabricator-diff-inline-content-state' => 'cb9e5396',
'phabricator-diff-path-view' => '8207abf9',
'phabricator-diff-tree-view' => '5d83623b',
'phabricator-drag-and-drop-file-upload' => '4370900d',
@@ -998,6 +1000,10 @@
'herald-rule-editor',
'javelin-behavior',
),
+ '09e0c6e5' => array(
+ 'javelin-dom',
+ 'phabricator-diff-inline-content-state',
+ ),
'0ad8d31f' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1399,9 +1405,6 @@
'javelin-stratcom',
'javelin-dom',
),
- '511a1315' => array(
- 'javelin-dom',
- ),
'5202e831' => array(
'javelin-install',
'javelin-dom',
@@ -2086,6 +2089,9 @@
'javelin-workflow',
'javelin-json',
),
+ 'cb9e5396' => array(
+ 'javelin-dom',
+ ),
'cc2c5de5' => array(
'javelin-install',
'phuix-button-view',
@@ -2441,6 +2447,7 @@
'javelin-behavior-phabricator-object-selector',
'javelin-behavior-repository-crossreference',
'javelin-behavior-aphront-more',
+ 'phabricator-diff-inline-content-state',
'phabricator-diff-inline',
'phabricator-diff-changeset',
'phabricator-diff-changeset-list',
diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php
--- a/resources/celerity/packages.php
+++ b/resources/celerity/packages.php
@@ -212,6 +212,7 @@
'javelin-behavior-aphront-more',
+ 'phabricator-diff-inline-content-state',
'phabricator-diff-inline',
'phabricator-diff-changeset',
'phabricator-diff-changeset-list',
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
@@ -1,12 +1,14 @@
/**
* @provides phabricator-diff-inline
* @requires javelin-dom
+ * phabricator-diff-inline-content-state
* @javelin
*/
JX.install('DiffInline', {
construct : function() {
+ this._activeContentState = new JX.DiffInlineContentState();
},
members: {
@@ -53,6 +55,8 @@
_isSelected: false,
_canSuggestEdit: false,
+ _activeContentState: null,
+
bindToRow: function(row) {
this._row = row;
@@ -785,8 +789,13 @@
this.triggerDraft();
},
+ _getActiveContentState: function() {
+ return this._activeContentState;
+ },
+
setHasSuggestion: function(has_suggestion) {
- this._hasSuggestion = has_suggestion;
+ var state = this._getActiveContentState();
+ state.setHasSuggestion(has_suggestion);
var button = this._getSuggestionButton();
var pht = this.getChangeset().getChangesetList().getTranslations();
@@ -806,7 +815,7 @@
},
getHasSuggestion: function() {
- return this._hasSuggestion;
+ return this._getActiveContentState().getHasSuggestion();
},
save: function() {
@@ -920,7 +929,7 @@
state.suggestionText = node.value;
}
- state.hasSuggestion = this.getHasSuggestion();
+ state.hasSuggestion = this._getActiveContentState().getHasSuggestion();
return state;
},
diff --git a/webroot/rsrc/js/application/diff/DiffInlineContentState.js b/webroot/rsrc/js/application/diff/DiffInlineContentState.js
new file mode 100644
--- /dev/null
+++ b/webroot/rsrc/js/application/diff/DiffInlineContentState.js
@@ -0,0 +1,22 @@
+/**
+ * @provides phabricator-diff-inline-content-state
+ * @requires javelin-dom
+ * @javelin
+ */
+
+JX.install('DiffInlineContentState', {
+
+ construct : function() {
+
+ },
+
+ properties: {
+ text: null,
+ suggestionText: null,
+ hasSuggestion: false
+ },
+
+ members: {
+ }
+
+});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 7:45 AM (12 h, 52 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6920889
Default Alt Text
D21645.id51513.diff (5 KB)
Attached To
Mode
D21645: Make inline "ContentState" a client object, and track "hasSuggestion" on it
Attached
Detach File
Event Timeline
Log In to Comment