summaryrefslogtreecommitdiffstats
path: root/polygerrit-ui/app/elements/change
diff options
context:
space:
mode:
Diffstat (limited to 'polygerrit-ui/app/elements/change')
-rw-r--r--polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.html1
-rw-r--r--polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html3
-rw-r--r--polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.html12
-rw-r--r--polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js10
4 files changed, 16 insertions, 10 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.html b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.html
index 4f5bf94795..456b4a2b3f 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.html
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.html
@@ -24,7 +24,6 @@ limitations under the License.
<link rel="import" href="../../core/gr-navigation/gr-navigation.html">
<link rel="import" href="../../core/gr-reporting/gr-reporting.html">
<link rel="import" href="../../diff/gr-comment-api/gr-comment-api.html">
-<link rel="import" href="../../diff/gr-diff-preferences/gr-diff-preferences.html">
<link rel="import" href="../../edit/gr-edit-constants.html">
<link rel="import" href="../../plugins/gr-endpoint-decorator/gr-endpoint-decorator.html">
<link rel="import" href="../../plugins/gr-endpoint-param/gr-endpoint-param.html">
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html
index f6acef68a1..267e21a3b4 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.html
@@ -283,7 +283,8 @@ limitations under the License.
});
test(', should open diff preferences', () => {
- const stub = sandbox.stub(element.$.fileList.$.diffPreferences, 'open');
+ const stub = sandbox.stub(
+ element.$.fileList.$.diffPreferencesDialog, 'open');
MockInteractions.pressAndReleaseKeyOn(element, 188, null, ',');
assert.isTrue(stub.called);
});
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.html b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.html
index 4852cb393e..84de48f413 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.html
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.html
@@ -23,8 +23,9 @@ limitations under the License.
<link rel="import" href="../../../styles/shared-styles.html">
<link rel="import" href="../../core/gr-navigation/gr-navigation.html">
<link rel="import" href="../../core/gr-reporting/gr-reporting.html">
-<link rel="import" href="../../diff/gr-diff-host/gr-diff-host.html">
<link rel="import" href="../../diff/gr-diff-cursor/gr-diff-cursor.html">
+<link rel="import" href="../../diff/gr-diff-host/gr-diff-host.html">
+<link rel="import" href="../../diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.html">
<link rel="import" href="../../edit/gr-edit-file-controls/gr-edit-file-controls.html">
<link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-cursor-manager/gr-cursor-manager.html">
@@ -465,10 +466,11 @@ limitations under the License.
</gr-button><!--
--></gr-tooltip-content>
</div>
- <gr-diff-preferences
- id="diffPreferences"
- prefs="{{diffPrefs}}"
- local-prefs="{{_localPrefs}}"></gr-diff-preferences>
+ <gr-diff-preferences-dialog
+ id="diffPreferencesDialog"
+ diff-prefs="{{diffPrefs}}"
+ on-reload-diff-preference="_handleReloadingDiffPreference">
+ </gr-diff-preferences-dialog>
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
<gr-storage id="storage"></gr-storage>
<gr-diff-cursor id="diffCursor"></gr-diff-cursor>
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js
index b3e4a70aa7..fba7b1be81 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js
@@ -125,7 +125,6 @@
},
/** @type {?} */
_userPrefs: Object,
- _localPrefs: Object,
_showInlineDiffs: Boolean,
numFilesShown: {
type: Number,
@@ -269,7 +268,6 @@
});
}));
- this._localPrefs = this.$.storage.getPreferences();
promises.push(this._getDiffPreferences().then(prefs => {
this.diffPrefs = prefs;
}));
@@ -297,7 +295,7 @@
},
openDiffPrefs() {
- this.$.diffPreferences.open();
+ this.$.diffPreferencesDialog.open();
},
_calculatePatchChange(files) {
@@ -1255,5 +1253,11 @@
return 'Mark as reviewed (shortcut: r)';
},
+
+ _handleReloadingDiffPreference() {
+ this._getDiffPreferences().then(prefs => {
+ this.diffPrefs = prefs;
+ });
+ },
});
})();