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">
|
on-change="_handlePublishCommentsOnPushChanged">
|
||||||
</span>
|
</span>
|
||||||
</section>
|
</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
|
<gr-button
|
||||||
id="savePrefs"
|
id="savePrefs"
|
||||||
on-tap="_handleSavePreferences"
|
on-tap="_handleSavePreferences"
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
'diff_view',
|
'diff_view',
|
||||||
'expand_inline_diffs',
|
'expand_inline_diffs',
|
||||||
'publish_comments_on_push',
|
'publish_comments_on_push',
|
||||||
|
'signed_off_by',
|
||||||
'email_format',
|
'email_format',
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -254,6 +255,10 @@
|
|||||||
this.$.publishCommentsOnPush.checked);
|
this.$.publishCommentsOnPush.checked);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_handleInsertSignedOff() {
|
||||||
|
this.set('_localPrefs.signed_off_by', this.$.insertSignedOff.checked);
|
||||||
|
},
|
||||||
|
|
||||||
_handleMenuChanged() {
|
_handleMenuChanged() {
|
||||||
if (this._isLoading()) { return; }
|
if (this._isLoading()) { return; }
|
||||||
this._menuChanged = true;
|
this._menuChanged = true;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ limitations under the License.
|
|||||||
let titleEl;
|
let titleEl;
|
||||||
for (let i = 0; i < sections.length; i++) {
|
for (let i = 0; i < sections.length; i++) {
|
||||||
titleEl = sections[i].querySelector('.title');
|
titleEl = sections[i].querySelector('.title');
|
||||||
if (titleEl.textContent === title) {
|
if (titleEl.textContent.trim() === title) {
|
||||||
return sections[i].querySelector('.value');
|
return sections[i].querySelector('.value');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,6 +172,9 @@ limitations under the License.
|
|||||||
.firstElementChild.checked, false);
|
.firstElementChild.checked, false);
|
||||||
assert.equal(valueOf('Publish comments on push', 'preferences')
|
assert.equal(valueOf('Publish comments on push', 'preferences')
|
||||||
.firstElementChild.checked, false);
|
.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._prefsChanged);
|
||||||
assert.isFalse(element._menuChanged);
|
assert.isFalse(element._menuChanged);
|
||||||
|
|||||||
Reference in New Issue
Block a user