Merge "PolyGerrit: Add "Signed-off-by Footer" option to user preferences"
This commit is contained in:
@@ -190,6 +190,18 @@ limitations under the License.
|
||||
on-change="_handlePublishCommentsOnPushChanged">
|
||||
</span>
|
||||
</section>
|
||||
<section>
|
||||
<span class="title">
|
||||
Insert Signed-off-by Footer For Inline Edit Changes
|
||||
</span>
|
||||
<span class="value">
|
||||
<input
|
||||
id="insertSignedOff"
|
||||
type="checkbox"
|
||||
checked$="[[_localPrefs.signed_off_by]]"
|
||||
on-change="_handleInsertSignedOff">
|
||||
</span>
|
||||
</section>
|
||||
<gr-button
|
||||
id="savePrefs"
|
||||
on-tap="_handleSavePreferences"
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
'diff_view',
|
||||
'expand_inline_diffs',
|
||||
'publish_comments_on_push',
|
||||
'signed_off_by',
|
||||
'email_format',
|
||||
];
|
||||
|
||||
@@ -254,6 +255,10 @@
|
||||
this.$.publishCommentsOnPush.checked);
|
||||
},
|
||||
|
||||
_handleInsertSignedOff() {
|
||||
this.set('_localPrefs.signed_off_by', this.$.insertSignedOff.checked);
|
||||
},
|
||||
|
||||
_handleMenuChanged() {
|
||||
if (this._isLoading()) { return; }
|
||||
this._menuChanged = true;
|
||||
|
||||
@@ -51,7 +51,7 @@ limitations under the License.
|
||||
let titleEl;
|
||||
for (let i = 0; i < sections.length; i++) {
|
||||
titleEl = sections[i].querySelector('.title');
|
||||
if (titleEl.textContent === title) {
|
||||
if (titleEl.textContent.trim() === title) {
|
||||
return sections[i].querySelector('.value');
|
||||
}
|
||||
}
|
||||
@@ -172,6 +172,9 @@ limitations under the License.
|
||||
.firstElementChild.checked, false);
|
||||
assert.equal(valueOf('Publish comments on push', 'preferences')
|
||||
.firstElementChild.checked, false);
|
||||
assert.equal(valueOf(
|
||||
'Insert Signed-off-by Footer For Inline Edit Changes', 'preferences')
|
||||
.firstElementChild.checked, false);
|
||||
|
||||
assert.isFalse(element._prefsChanged);
|
||||
assert.isFalse(element._menuChanged);
|
||||
|
||||
Reference in New Issue
Block a user