Commit f58a0ada authored by Scott Chen's avatar Scott Chen Committed by Commit Bot

WebUI[MD-refresh]: switches remaining paper-input in Settings to cr-input.

Bug: 832177
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Iae1036e0a8975f65a37ff9ccc7b6084b4a6d45ef
Reviewed-on: https://chromium-review.googlesource.com/1081243
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564968}
parent b98fe1d8
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="../settings_vars_css.html"> <link rel="import" href="../settings_vars_css.html">
<link rel="import" href="smb_browser_proxy.html"> <link rel="import" href="smb_browser_proxy.html">
...@@ -10,33 +11,31 @@ ...@@ -10,33 +11,31 @@
<dom-module id="settings-add-smb-share-dialog"> <dom-module id="settings-add-smb-share-dialog">
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
paper-input { cr-input {
--cr-input-error-display: none;
width: var(--settings-input-max-width); width: var(--settings-input-max-width);
} }
cr-input:not(:last-child) {
margin-bottom: var(--cr-form-field-bottom-spacing);
}
</style> </style>
<cr-dialog id="dialog"> <cr-dialog id="dialog">
<div slot="title">$i18n{addSmbShare}</div> <div slot="title">$i18n{addSmbShare}</div>
<div slot="body" spellcheck="false"> <div slot="body" spellcheck="false">
<paper-input always-float-label id="address" <cr-input id="address" label="$i18n{smbShareUrl}" value="{{mountUrl_}}"
label="$i18n{smbShareUrl}"
value="{{mountUrl_}}"
autofocus> autofocus>
</paper-input> </cr-input>
<paper-input always-float-label id="name" <cr-input id="name" label="$i18n{smbShareName}" value="{{mountName_}}"
label="$i18n{smbShareName}" maxlength="64">
value="{{mountName_}}" </cr-input>
maxlength=64> <cr-input id="username" label="$i18n{smbShareUsername}"
</paper-input>
<paper-input always-float-label id="username"
label="$i18n{smbShareUsername}"
value="{{username_}}"> value="{{username_}}">
</paper-input> </cr-input>
<paper-input always-float-label id="password" <cr-input id="password" type="password" label="$i18n{smbSharePassword}"
type="password"
label="$i18n{smbSharePassword}"
value="{{password_}}"> value="{{password_}}">
</paper-input> </cr-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="cancel_" id="cancel"> <paper-button class="cancel-button" on-click="cancel_" id="cancel">
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
cr-input { cr-input {
width: var(--settings-input-max-width);
--cr-input-error-display: none; --cr-input-error-display: none;
} }
...@@ -23,6 +22,18 @@ ...@@ -23,6 +22,18 @@
margin-bottom: var(--cr-form-field-bottom-spacing); margin-bottom: var(--cr-form-field-bottom-spacing);
} }
#websiteInput,
#usernameInput {
width: var(--settings-input-max-width);
}
#passwordInput {
--cr-input-width: var(--settings-input-max-width);
--cr-input-row-container: {
justify-content: initial;
}
}
paper-icon-button-light { paper-icon-button-light {
-webkit-margin-start: 2px; -webkit-margin-start: 2px;
background-size: 24px; /* Other buttons are sized by --cr-icon-size. */ background-size: 24px; /* Other buttons are sized by --cr-icon-size. */
......
...@@ -171,7 +171,7 @@ js_library("password_prompt_dialog") { ...@@ -171,7 +171,7 @@ js_library("password_prompt_dialog") {
deps = [ deps = [
":lock_screen_constants", ":lock_screen_constants",
"..:route", "..:route",
"//third_party/polymer/v1_0/components-chromium/paper-input:paper-input-extracted", "//ui/webui/resources/cr_elements/cr_input:cr_input",
] ]
externs_list = [ "$externs_path/quick_unlock_private.js" ] externs_list = [ "$externs_path/quick_unlock_private.js" ]
extra_sources = [ "$interfaces_path/quick_unlock_private_interface.js" ] extra_sources = [ "$interfaces_path/quick_unlock_private_interface.js" ]
...@@ -228,8 +228,8 @@ js_library("sync_page") { ...@@ -228,8 +228,8 @@ js_library("sync_page") {
"..:page_visibility", "..:page_visibility",
"..:route", "..:route",
"../settings_page:settings_animated_pages", "../settings_page:settings_animated_pages",
"//third_party/polymer/v1_0/components-chromium/paper-input:paper-input-extracted",
"//ui/webui/resources/cr_elements/cr_expand_button:cr_expand_button", "//ui/webui/resources/cr_elements/cr_expand_button:cr_expand_button",
"//ui/webui/resources/cr_elements/cr_input:cr_input",
"//ui/webui/resources/js:assert", "//ui/webui/resources/js:assert",
"//ui/webui/resources/js:load_time_data", "//ui/webui/resources/js:load_time_data",
"//ui/webui/resources/js:util", "//ui/webui/resources/js:util",
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/html/assert.html"> <link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html"> <link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html">
...@@ -9,7 +10,6 @@ ...@@ -9,7 +10,6 @@
<link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripple.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripple.html">
<link rel="import" href="fingerprint_browser_proxy.html"> <link rel="import" href="fingerprint_browser_proxy.html">
<link rel="import" href="setup_fingerprint_dialog.html"> <link rel="import" href="setup_fingerprint_dialog.html">
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
background-color: white; background-color: white;
} }
paper-input { cr-input {
--paper-input-container-color: transparent; --cr-input-error-display: none;
} }
paper-ripple { paper-ripple {
...@@ -52,9 +52,8 @@ ...@@ -52,9 +52,8 @@
<template> <template>
<div class="list-item"> <div class="list-item">
<paper-ripple noink></paper-ripple> <paper-ripple noink></paper-ripple>
<paper-input value="{{item}}" <cr-input value="{{item}}" on-change="onFingerprintLabelChanged_">
on-change="onFingerprintLabelChanged_"> </cr-input>
</paper-input>
<paper-icon-button-light class="icon-delete-gray"> <paper-icon-button-light class="icon-delete-gray">
<button on-click="onFingerprintDeleteTapped_"></button> <button on-click="onFingerprintDeleteTapped_"></button>
</paper-icon-button-light> </paper-icon-button-light>
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="lock_screen_constants.html"> <link rel="import" href="lock_screen_constants.html">
<link rel="import" href="lock_state_behavior.html"> <link rel="import" href="lock_state_behavior.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
...@@ -22,18 +22,16 @@ ...@@ -22,18 +22,16 @@
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{passwordPromptTitle}</div> <div slot="title">$i18n{passwordPromptTitle}</div>
<div slot="body"> <div slot="body">
<div class="settings-box first"> <div class="settings-box first">
[[selectPasswordPromptEnterPasswordString(hasPinLogin)]] [[selectPasswordPromptEnterPasswordString(hasPinLogin)]]
</div> </div>
<cr-input id="passwordInput" type="password"
<paper-input id="passwordInput" type="password" placeholder="$i18n{passwordPromptPasswordLabel}"
label="$i18n{passwordPromptPasswordLabel}" invalid="[[passwordInvalid_]]"
invalid="{{passwordInvalid_}}"
error-message="$i18n{passwordPromptInvalidPassword}" error-message="$i18n{passwordPromptInvalidPassword}"
value="{{inputValue_}}" value="{{inputValue_}}"
aria-disabled="false"> aria-disabled="false">
</paper-input> </cr-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_"> <paper-button class="cancel-button" on-click="onCancelTap_">
......
...@@ -128,9 +128,8 @@ Polymer({ ...@@ -128,9 +128,8 @@ Polymer({
// Select the whole password if user entered an incorrect password. // Select the whole password if user entered an incorrect password.
// Return focus to the password input if it lost focus while being // Return focus to the password input if it lost focus while being
// checked (user pressed confirm button). // checked (user pressed confirm button).
this.$.passwordInput.inputElement.inputElement.select(); this.$.passwordInput.inputElement.select();
if (!this.$.passwordInput.focused) this.$.passwordInput.focus();
this.$.passwordInput.focus();
return; return;
} }
......
...@@ -288,7 +288,7 @@ Polymer({ ...@@ -288,7 +288,7 @@ Polymer({
if (this.syncPrefs.passphraseRequired) { if (this.syncPrefs.passphraseRequired) {
// Wait for the dom-if templates to render and subpage to become visible. // Wait for the dom-if templates to render and subpage to become visible.
listenOnce(document, 'show-container', () => { listenOnce(document, 'show-container', () => {
const input = /** @type {!PaperInputElement} */ ( const input = /** @type {!CrInputElement} */ (
this.$$('#existingPassphraseInput')); this.$$('#existingPassphraseInput'));
input.focus(); input.focus();
}); });
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/html/assert.html"> <link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="../settings_vars_css.html"> <link rel="import" href="../settings_vars_css.html">
<dom-module id="settings-users-add-user-dialog"> <dom-module id="settings-users-add-user-dialog">
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
paper-input { cr-input {
width: var(--settings-input-max-width); width: var(--settings-input-max-width);
--paper-input-container-focus-color: var(--google-blue-500); --cr-input-error-display: none;
--paper-input-container-input: {
font-size: inherit;
};
} }
</style> </style>
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{addUsers}</div> <div slot="title">$i18n{addUsers}</div>
<div slot="body"> <div slot="body">
<paper-input id="addUserInput" label="$i18n{addUsersEmail}" autofocus <cr-input id="addUserInput" label="$i18n{addUsersEmail}" autofocus
on-input="validate_" invalid="[[!isValid_]]"> on-input="validate_" invalid="[[!isValid_]]">
</paper-input> </cr-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_"> <paper-button class="cancel-button" on-click="onCancelTap_">
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/html/md_select_css.html"> <link rel="import" href="chrome://resources/html/md_select_css.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html">
<link rel="import" href="../i18n_setup.html"> <link rel="import" href="../i18n_setup.html">
<link rel="import" href="cups_add_printer_dialog_util.html"> <link rel="import" href="cups_add_printer_dialog_util.html">
...@@ -108,24 +108,15 @@ ...@@ -108,24 +108,15 @@
<div slot="dialog-title">$i18n{addPrintersManuallyTitle}</div> <div slot="dialog-title">$i18n{addPrintersManuallyTitle}</div>
<div slot="dialog-body"> <div slot="dialog-body">
<div class="settings-box first two-line"> <div class="settings-box first two-line">
<div class="start"> <cr-input class="printer-name-input" autofocus
<div class="label">$i18n{printerName}</div> id="printerNameInput" value="{{newPrinter.printerName}}"
<div class="secondary"> label="$i18n{printerName}">
<paper-input class="printer-name-input" no-label-float autofocus </cr-input>
id="printerNameInput" value="{{newPrinter.printerName}}">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <cr-input id="printerAddressInput" label="$i18n{printerAddress}"
<div class="label">$i18n{printerAddress}</div> value="{{newPrinter.printerAddress}}">
<div class="secondary"> </cr-input>
<paper-input no-label-float id="printerAddressInput"
value="{{newPrinter.printerAddress}}">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
...@@ -146,14 +137,9 @@ ...@@ -146,14 +137,9 @@
</div> </div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <cr-input placeholder="ipp/print" label="$i18n{printerQueue}"
<div class="label">$i18n{printerQueue}</div> value="{{newPrinter.printerQueue}}">
<div class="secondary"> </cr-input>
<paper-input no-label-float label="ipp/print"
value="{{newPrinter.printerQueue}}">
</paper-input>
</div>
</div>
</div> </div>
</div> </div>
<div slot="dialog-buttons"> <div slot="dialog-buttons">
...@@ -208,20 +194,14 @@ ...@@ -208,20 +194,14 @@
</div> </div>
</div> </div>
<div class="settings-box two-line last"> <div class="settings-box two-line last">
<div class="start"> <cr-input class="browse-file-input" readonly value="[[newUserPPD_]]"
<div class="label">$i18n{selectDriver}</div> label="$i18n{selectDriver}" invalid="[[invalidPPD_]]"
<div class="secondary"> error-message="$i18n{selectDriverErrorMessage}">
<paper-input class="browse-file-input" no-label-float readonly <paper-button class="browse-button" on-click="onBrowseFile_"
value="[[newUserPPD_]]" slot="suffix">
error-message="$i18n{selectDriverErrorMessage}" $i18n{selectDriverButtonText}
invalid="[[invalidPPD_]]"> </paper-button>
<paper-button class="browse-button" slot="suffix" </cr-input>
on-click="onBrowseFile_">
$i18n{selectDriverButtonText}
</paper-button>
</paper-input>
</div>
</div>
</div> </div>
</div> </div>
<div slot="dialog-buttons"> <div slot="dialog-buttons">
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="cups_add_printer_dialog_util.html"> <link rel="import" href="cups_add_printer_dialog_util.html">
<link rel="import" href="cups_printer_shared_css.html"> <link rel="import" href="cups_printer_shared_css.html">
<link rel="import" href="cups_printers_browser_proxy.html"> <link rel="import" href="cups_printers_browser_proxy.html">
...@@ -10,33 +10,28 @@ ...@@ -10,33 +10,28 @@
<dom-module id="settings-cups-edit-printer-dialog"> <dom-module id="settings-cups-edit-printer-dialog">
<template> <template>
<style include="cups-printer-shared"> <style include="cups-printer-shared">
#existingUserPPD { /* This is needed to line up the existing PDD text with cr-input.
padding-top: 10px; TODO(scottchen): move away from using .settings-box just for margin,
and then remove this hacky alignment. */
.last {
align-items: start;
flex-direction: column;
} }
</style> </style>
<add-printer-dialog> <add-printer-dialog>
<div slot="dialog-title">$i18n{editPrinterDialogTitle}</div> <div slot="dialog-title">$i18n{editPrinterDialogTitle}</div>
<div slot="dialog-body"> <div slot="dialog-body">
<div class="settings-box first two-line"> <div class="settings-box first two-line">
<div class="start"> <cr-input class="printer-name-input" autofocus
<div class="label">$i18n{printerName}</div> value="{{activePrinter.printerName}}"
<div class="secondary"> label="$i18n{printerName}">
<paper-input class="printer-name-input" no-label-float autofocus </cr-input>
value="{{activePrinter.printerName}}">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <cr-input label="$i18n{printerAddress}"
<div class="label">$i18n{printerAddress}</div> value="{{activePrinter.printerAddress}}"
<div class="secondary"> disabled="[[!networkProtocolActive_]]">
<paper-input no-label-float </cr-input>
value="{{activePrinter.printerAddress}}"
disabled="[[!networkProtocolActive_]]">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
...@@ -75,25 +70,15 @@ ...@@ -75,25 +70,15 @@
</div> </div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <cr-input label="$i18n{printerQueue}"
<div class="label">$i18n{printerQueue}</div> value="{{activePrinter.printerQueue}}"
<div class="secondary"> disabled="[[!networkProtocolActive_]]">
<paper-input no-label-float </cr-input>
value="{{activePrinter.printerQueue}}"
disabled="[[!networkProtocolActive_]]">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <cr-input label="$i18n{printerURI}" readonly
<div class="label">$i18n{printerURI}</div> value="[[getPrinterURI_(activePrinter)]]">
<div class="secondary"> </cr-input>
<paper-input no-label-float disabled
value="[[getPrinterURI_(activePrinter)]]">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
...@@ -116,25 +101,20 @@ ...@@ -116,25 +101,20 @@
</div> </div>
</div> </div>
<div class="settings-box two-line last"> <div class="settings-box two-line last">
<div class="start"> <cr-input class="browse-file-input" readonly
<div class="label">$i18n{selectDriver}</div> value="[[newUserPPD_]]" label="$i18n{selectDriver}"
<div class="secondary"> error-message="$i18n{selectDriverErrorMessage}"
<paper-input class="browse-file-input" no-label-float readonly invalid="[[invalidPPD_]]">
value="[[newUserPPD_]]" <paper-button class="browse-button" on-click="onBrowseFile_"
error-message="$i18n{selectDriverErrorMessage}" slot="suffix">
invalid="[[invalidPPD_]]"> $i18n{selectDriverButtonText}
<paper-button class="browse-button" slot="suffix" </paper-button>
on-click="onBrowseFile_"> </cr-input>
$i18n{selectDriverButtonText} <template is="dom-if" if="[[existingUserPPDMessage_]]">
</paper-button> <div class="secondary" id="existingUserPPD">
</paper-input> [[existingUserPPDMessage_]]
</div> </div>
<template is="dom-if" if="[[existingUserPPDMessage_]]"> </template>
<div class="secondary" id="existingUserPPD">
[[existingUserPPDMessage_]]
</div>
</template>
</div>
</div> </div>
</div> </div>
<div slot="dialog-buttons"> <div slot="dialog-buttons">
......
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/md_select_css.html"> <link rel="import" href="chrome://resources/html/md_select_css.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="../settings_vars_css.html"> <link rel="import" href="../settings_vars_css.html">
...@@ -16,18 +19,21 @@ ...@@ -16,18 +19,21 @@
} }
[slot='dialog-body'] .settings-box .start .label { [slot='dialog-body'] .settings-box .start .label {
color: var(--google-grey-700); @apply --cr-form-field-label;
} }
[slot='dialog-body'] .settings-box paper-input { [slot='dialog-body'] .settings-box cr-input {
--paper-input-container-input: {
font-size: inherit;
};
width: 270px; width: 270px;
} }
/* The only input that has error-message are at the end, so we don't
need to allocate space for error-message under each input
for consistency. */
[slot='dialog-body'] .settings-box cr-input:not([error-message]) {
--cr-input-error-display: none;
}
[slot='dialog-body'] .settings-box .md-select { [slot='dialog-body'] .settings-box .md-select {
margin-top: 8px;
width: 270px; width: 270px;
} }
...@@ -36,25 +42,12 @@ ...@@ -36,25 +42,12 @@
} }
[slot='dialog-body'] .settings-box .browse-file-input { [slot='dialog-body'] .settings-box .browse-file-input {
--paper-input-container-input: { width: auto;
border: 1px solid lightgray; --cr-input-width: 270px;
font-size: inherit;
};
--paper-input-container-underline: {
display: none;
};
--paper-input-container-underline-focus: {
display: none;
};
--paper-input-suffix: {
font-size: inherit;
};
width: 340px;
} }
[slot='dialog-body'] .settings-box .browse-button { [slot='dialog-body'] .settings-box .browse-button {
-webkit-margin-start: 5px; -webkit-margin-start: 5px;
color: black;
} }
[slot='dialog-body'] .last { [slot='dialog-body'] .last {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../i18n_setup.html"> <link rel="import" href="../i18n_setup.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="constants.html"> <link rel="import" href="constants.html">
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{addSiteTitle}</div> <div slot="title">$i18n{addSiteTitle}</div>
<div slot="body"> <div slot="body">
<paper-input id="site" always-float-label label="$i18n{addSite}" <cr-input id="site" label="$i18n{addSite}"
placeholder="$i18n{addSiteExceptionPlaceholder}" placeholder="$i18n{addSiteExceptionPlaceholder}"
value="{{site_}}" on-input="validate_" value="{{site_}}" on-input="validate_"
error-message="$i18n{notValidWebAddress}" spellcheck="false" error-message="$i18n{notValidWebAddress}" spellcheck="false"
autofocus></paper-input> autofocus></cr-input>
<cr-checkbox id="incognito" <cr-checkbox id="incognito"
invisible$="[[!showIncognitoSessionOnly_]]"> invisible$="[[!showIncognitoSessionOnly_]]">
$i18n{incognitoSiteOnly} $i18n{incognitoSiteOnly}
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../i18n_setup.html"> <link rel="import" href="../i18n_setup.html">
<link rel="import" href="site_settings_prefs_browser_proxy.html"> <link rel="import" href="site_settings_prefs_browser_proxy.html">
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<cr-dialog id="dialog"> <cr-dialog id="dialog">
<div slot="title">$i18n{editSiteTitle}</div> <div slot="title">$i18n{editSiteTitle}</div>
<div slot="body"> <div slot="body">
<paper-input always-float-label label="$i18n{addSite}" <cr-input label="$i18n{addSite}" value="{{origin_}}"
placeholder="$i18n{addSiteExceptionPlaceholder}" value="{{origin_}}" placeholder="$i18n{addSiteExceptionPlaceholder}"
on-input="validate_" error-message="$i18n{notValidWebAddress}" on-input="validate_" error-message="$i18n{notValidWebAddress}"
invalid="[[invalid_]]" autofocus> invalid="[[invalid_]]" autofocus>
</paper-input> </cr-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_" <paper-button class="cancel-button" on-click="onCancelTap_"
......
...@@ -66,7 +66,7 @@ Polymer({ ...@@ -66,7 +66,7 @@ Polymer({
/** @private */ /** @private */
validate_: function() { validate_: function() {
if (this.$$('paper-input').value.trim() == '') { if (this.$$('cr-input').value.trim() == '') {
this.invalid_ = true; this.invalid_ = true;
return; return;
} }
......
...@@ -137,6 +137,8 @@ ...@@ -137,6 +137,8 @@
/* This will spread the input field and the suffix apart only if the /* This will spread the input field and the suffix apart only if the
host element width is intentionally set to something large. */ host element width is intentionally set to something large. */
justify-content: space-between; justify-content: space-between;
@apply --cr-input-row-container;
} }
</style> </style>
<div id="label" hidden="[[!label]]">[[label]]</div> <div id="label" hidden="[[!label]]">[[label]]</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment