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

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: Fixed patch set 1 errors. 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..dddc25459f85a8a2cb3fb71a4a865d6f43a0e5a3 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,6 +129,7 @@ Polymer({
/**
* Changes the color of the submit button if PIN is ready.
* @param {string} value
+ * @private
*/
computeSubmitClass_: function(value) {
return value.length > 0 ? 'ready-background' : '';
@@ -129,6 +138,7 @@ Polymer({
/**
* Computes whether the input type for the pin input should be password or
* numerical.
+ * @param {bool} enablePassword
jdufault 2016/07/29 19:12:13 boolean for all of these
sammiequon 2016/07/29 19:44:49 Done.
* @private
*/
computeInputType_: function(enablePassword) {
@@ -137,6 +147,7 @@ Polymer({
/**
* Computes the value of the pin input placeholder.
+ * @param {bool} enablePassword
* @private
*/
computeInputPlaceholder_: function(enablePassword) {
@@ -146,6 +157,7 @@ Polymer({
/**
* Computes the direction of the pin input.
+ * @param {string} password
* @private
*/
computeInputClass_: function(password) {
@@ -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 {bool} submitEnabled
+ * @private
+ */
+ computeSubmitHiddenClass_: function(submitEnabled) {
+ return submitEnabled ? '' : 'submit-button-hidden';
}
});

Powered by Google App Engine
This is Rietveld 408576698