Commit 23e1aae3 authored by dpapad's avatar dpapad Committed by Commit bot

MD Settings: Adjusting reset-page dialogs styling to match latest mocks.

Refactor both dialogs such that CSS styles can be shared
between them (see reset_page_dialog.css).

BUG=546840

Review URL: https://codereview.chromium.org/1482573002

Cr-Commit-Position: refs/heads/master@{#363044}
parent 541795c1
......@@ -5,18 +5,26 @@
<link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dialog.html">
<dom-module id="settings-powerwash-dialog">
<link rel="import" type="css" href="reset_page_dialog.css">
<template>
<paper-dialog modal id="dialog">
<h2 i18n-content="powerwashDialogTitle"></h2>
<div i18n-content="powerwashDialogBody"></div>
<div class="layout center horizontal" id="buttonContainer">
<paper-button i18n-content="learnMore"
on-tap="onLearnMoreTap_" id="learnMore"></paper-button>
<div class="layout center buttons flex-1">
<paper-button on-tap="onCancelTap_" id="cancel"
i18n-content="cancel"></paper-button>
<paper-button on-tap="onRestartTap_" id="powerwash"
i18n-content="powerwashDialogButton"></paper-button>
<div id="dialog-content">
<div class="dialog-title"
i18n-content="powerwashDialogTitle"></div>
<div class="dialog-body">
<div class="explanation"
i18n-content="powerwashDialogExplanation"></div>
<div class="button-container">
<paper-button i18n-content="learnMore"
on-tap="onLearnMoreTap_" id="learnMore"></paper-button>
<div class="action-buttons">
<paper-button class="cancel-button" on-tap="onCancelTap_"
id="cancel" i18n-content="cancel"></paper-button>
<paper-button class="action-button" id="powerwash"
on-tap="onRestartTap_" i18n-content="powerwashDialogButton">
</paper-button>
</div>
</div>
</div>
</div>
</paper-dialog>
......
/* Copyright 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
#dialog-content {
-webkit-padding-end: 0;
-webkit-padding-start: 0;
margin-top: 0;
}
.dialog-title {
border-bottom: 1px solid gainsboro;
font-size: 1.13em;
padding-bottom: 14px;
padding-top: 14px;
}
.dialog-body {
font-size: 1em;
margin: 20px 0;
}
.dialog-title,
.dialog-body {
-webkit-padding-end: 24px;
-webkit-padding-start: 24px;
}
.button-container {
display: flex;
}
.action-button {
-webkit-margin-start: 10px;
background-color: rgb(66, 133, 244);
color: white;
font-weight: 500;
}
.cancel-button {
color: rgb(66, 133, 244);
font-weight: 500;
}
paper-button {
margin: 0;
}
.explanation {
margin-bottom: 35px;
}
.action-buttons {
display: flex;
flex: 1;
justify-content: flex-end;
}
......@@ -7,25 +7,9 @@
width: 500px;
}
#reset {
-webkit-margin-start: 10px;
-webkit-padding-end: 15px;
-webkit-padding-start: 15px;
background-color: rgb(120, 120, 120);
color: white;
}
#learnMore,
#cancel {
#learnMore {
color: rgb(94, 94, 94);
}
#explanation {
margin: 10px 0;
}
#buttonContainer {
margin: 15px 0;
font-weight: 500;
}
#feedbackBar {
......
......@@ -6,21 +6,25 @@
<link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html">
<dom-module id="settings-reset-profile-dialog">
<link rel="import" type="css" href="reset_page_dialog.css">
<link rel="import" type="css" href="reset_profile_dialog.css">
<template>
<paper-dialog modal id="dialog">
<div>
<h2 i18n-content="resetPageTitle"></h2>
<div i18n-content="resetPageExplanation" id="explanation"></div>
<div class="layout center horizontal" id="buttonContainer">
<paper-button on-tap="onLearnMoreTap_" id="learnMore"
i18n-content="learnMore"></paper-button>
<div class="layout center buttons flex-1">
<paper-spinner id="resetSpinner"></paper-spinner>
<paper-button on-tap="onCancelTap_" id="cancel"
i18n-content="cancel"></paper-button>
<paper-button i18n-content="resetPageCommit" on-tap="onResetTap_"
id="reset"></paper-button>
<div id="dialog-content">
<div class="dialog-title"
i18n-content="resetPageTitle"></div>
<div class="dialog-body">
<div class="explanation" i18n-content="resetPageExplanation"></div>
<div class="button-container">
<paper-button on-tap="onLearnMoreTap_" id="learnMore"
i18n-content="learnMore"></paper-button>
<div class="action-buttons">
<paper-spinner id="resetSpinner"></paper-spinner>
<paper-button class="cancel-button" on-tap="onCancelTap_"
id="cancel" i18n-content="cancel"></paper-button>
<paper-button class="action-button" i18n-content="resetPageCommit"
on-tap="onResetTap_" id="reset"></paper-button>
</div>
</div>
</div>
</div>
......
......@@ -232,6 +232,9 @@
<structure name="IDR_SETTINGS_POWERWASH_DIALOG_JS"
file="reset_page/powerwash_dialog.js"
type="chrome_html" />
<structure name="IDR_SETTINGS_RESET_PAGE_DIALOG_CSS"
file="reset_page/reset_page_dialog.css"
type="chrome_html" />
<structure name="IDR_SETTINGS_RESET_PAGE_HTML"
file="reset_page/reset_page.html"
type="chrome_html"
......
......@@ -272,7 +272,7 @@ void AddResetStrings(content::WebUIDataSource* html_source) {
html_source->AddLocalizedString(
"powerwashDialogTitle", IDS_OPTIONS_FACTORY_RESET_HEADING);
html_source->AddLocalizedString(
"powerwashDialogBody", IDS_OPTIONS_FACTORY_RESET_WARNING);
"powerwashDialogExplanation", IDS_OPTIONS_FACTORY_RESET_WARNING);
html_source->AddLocalizedString(
"powerwashDialogButton", IDS_RELAUNCH_BUTTON);
html_source->AddLocalizedString(
......
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