Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6703)

Unified Diff: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js

Issue 2172823002: Submit button does not show up on md-settings anymore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebased. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
diff --git a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
index 54846ba3961c0d4cd01abaf0046312a21d1fa9b8..9b9ba5dad8b5dc2ba8c528ddea38566061751d5e 100644
--- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
+++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
@@ -39,6 +39,14 @@ Polymer({
value: false
},
+ /**
+ * Whether or not the keyboard's submit button should be shown.
+ */
+ enableSubmitButton: {
+ type: Boolean,
+ value: false
+ },
+
/** The value stored in the keyboard's input element. */
value: {
type: String,
@@ -121,34 +129,38 @@ Polymer({
/**
* Changes the color of the submit button if PIN is ready.
* @param {string} value
+ * @private
*/
- computeSubmitClass_: function(value) {
+ getSubmitClass_: function(value) {
return value.length > 0 ? 'ready-background' : '';
},
/**
* Computes whether the input type for the pin input should be password or
* numerical.
+ * @param {boolean} enablePassword
* @private
*/
- computeInputType_: function(enablePassword) {
+ getInputType_: function(enablePassword) {
return enablePassword ? 'password' : 'number';
},
/**
* Computes the value of the pin input placeholder.
+ * @param {boolean} enablePassword
* @private
*/
- computeInputPlaceholder_: function(enablePassword) {
+ getInputPlaceholder_: function(enablePassword) {
return enablePassword ? this.i18n('pinKeyboardPlaceholderPinPassword') :
this.i18n('pinKeyboardPlaceholderPin');
},
/**
* Computes the direction of the pin input.
+ * @param {string} password
* @private
*/
- computeInputClass_: function(password) {
+ getInputClass_: function(password) {
// +password will convert a string to a number or to NaN if that's not
// possible. Number.isInteger will verify the value is not a NaN and that it
// does not contain decimals.
@@ -159,5 +171,14 @@ Polymer({
// (just numbers), if the document direction is rtl.
var enableRtl = (document.dir == 'rtl') && !Number.isInteger(+password);
return enableRtl ? 'input-non-pin' : '';
+ },
+
+ /**
+ * Computes if the submit button is visible.
+ * @param {boolean} submitEnabled
+ * @private
+ */
+ getSubmitHiddenClass_: function(submitEnabled) {
+ return submitEnabled ? '' : 'submit-button-hidden';
}
});
« no previous file with comments | « chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.html ('k') | ui/login/account_picker/user_pod_template.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698