Merge "Disable the change reply button until the server config has loaded"
This commit is contained in:
@@ -268,6 +268,7 @@ limitations under the License.
|
||||
<gr-button
|
||||
class="reply"
|
||||
secondary
|
||||
disabled="[[_replyDisabled]]"
|
||||
on-tap="_handleReplyTap">[[_replyButtonLabel]]</gr-button>
|
||||
<gr-change-actions id="actions"
|
||||
change="[[_change]]"
|
||||
|
||||
@@ -111,6 +111,11 @@
|
||||
type: Boolean,
|
||||
computed: '_computeDescriptionReadOnly(_loggedIn, _change, _account)',
|
||||
},
|
||||
_replyDisabled: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
computed: '_computeReplyDisabled(serverConfig)',
|
||||
},
|
||||
},
|
||||
|
||||
behaviors: [
|
||||
@@ -919,5 +924,7 @@
|
||||
_computeDescriptionReadOnly: function(loggedIn, change, account) {
|
||||
return !(loggedIn && (account._account_id === change.owner._account_id));
|
||||
},
|
||||
|
||||
_computeReplyDisabled: function() { return false; }
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -781,5 +781,11 @@ limitations under the License.
|
||||
assert.equal(element.$.replyDialog.quote, '> quote text\n\n');
|
||||
});
|
||||
});
|
||||
|
||||
test('reply button is disabled until server config is loaded', function() {
|
||||
assert.isTrue(element._replyDisabled);
|
||||
element.serverConfig = {};
|
||||
assert.isFalse(element._replyDisabled);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user