Commit 81feb919 authored by xdai's avatar xdai Committed by Commit Bot

[CUPS] Remove sub-title from Cloud Print and add CUPS print info line.

Bug: 725999
Change-Id: I78948e0d82f88a4303877788ddf7db7df60e3654
Reviewed-on: https://chromium-review.googlesource.com/570808
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487313}
parent de4ffadb
...@@ -903,6 +903,9 @@ ...@@ -903,6 +903,9 @@
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTERS" desc="In Printing Settings, the title of the CUPS printers setting section."> <message name="IDS_SETTINGS_PRINTING_CUPS_PRINTERS" desc="In Printing Settings, the title of the CUPS printers setting section.">
Printers Printers
</message> </message>
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTERS_LEARN_MORE_LABEL" desc="Label for the link that teaches users how to use CUPS printing.">
Set up or manage CUPS printers.
</message>
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTERS_ADD_PRINTER" desc="In CUPS printing settings subpage, text for the link adding a new CUPS printer."> <message name="IDS_SETTINGS_PRINTING_CUPS_PRINTERS_ADD_PRINTER" desc="In CUPS printing settings subpage, text for the link adding a new CUPS printer.">
Add Printer Add Printer
</message> </message>
...@@ -913,7 +916,7 @@ ...@@ -913,7 +916,7 @@
Remove Remove
</message> </message>
<message name="IDS_SETTINGS_PRINTING_CUPS_SEARCH_LABEL" desc="The placeholder text in the printer search field."> <message name="IDS_SETTINGS_PRINTING_CUPS_SEARCH_LABEL" desc="The placeholder text in the printer search field.">
printer name Search printers
</message> </message>
<message name="IDS_SETTINGS_PRINTING_CUPS_ADD_PRINTERS_NEARBY_TITLE" desc="Text for the title of the dialog that is used to add nearby printers."> <message name="IDS_SETTINGS_PRINTING_CUPS_ADD_PRINTERS_NEARBY_TITLE" desc="Text for the title of the dialog that is used to add nearby printers.">
Add a nearby printer Add a nearby printer
...@@ -1027,9 +1030,6 @@ ...@@ -1027,9 +1030,6 @@
<message name="IDS_SETTINGS_PRINTING_CLOUD_PRINTERS" desc="In Printing Settings, the title of the google cloud printers setting section."> <message name="IDS_SETTINGS_PRINTING_CLOUD_PRINTERS" desc="In Printing Settings, the title of the google cloud printers setting section.">
Google Cloud Print Google Cloud Print
</message> </message>
<message name="IDS_SETTINGS_PRINTING_CLOUD_PRINTERS_DESCRIPTION" desc="In Printing Settings, the title description of the google cloud printers setting section.">
Set up cloud printing devices
</message>
<!-- Downloads Page --> <!-- Downloads Page -->
<message name="IDS_SETTINGS_DOWNLOADS" desc="Name of the settings page which displays download preferences."> <message name="IDS_SETTINGS_DOWNLOADS" desc="Name of the settings page which displays download preferences.">
......
...@@ -12,16 +12,17 @@ ...@@ -12,16 +12,17 @@
<dom-module id="settings-cups-printers"> <dom-module id="settings-cups-printers">
<template> <template>
<style include="settings-shared action-link"> <style include="settings-shared action-link">
.settings-box .start {
color: var(--paper-grey-600);
}
.settings-box .start .secondary { .settings-box .start .secondary {
color: var(--paper-grey-800); color: var(--paper-grey-800);
font-size: 92.31%; /* 12px / 13px */ font-size: 92.31%; /* 12px / 13px */
} }
.settings-box .primary-button { .settings-box .primary-button {
--paper-button-disabled: {
background: none;
color: black;
opacity: 0.26;
};
-webkit-margin-end: 0; -webkit-margin-end: 0;
-webkit-margin-start: auto; -webkit-margin-start: auto;
} }
...@@ -55,14 +56,19 @@ ...@@ -55,14 +56,19 @@
</style> </style>
<div class="settings-box first"> <div class="settings-box first">
<div class="start">
<span>$i18n{cupsPrintersLearnMoreLabel}</span>
<a href="$i18n{printingCUPSPrintLearnMoreUrl}" target="_blank">
$i18n{learnMore}
</a>
<div class="secondary" hidden="[[canAddPrinter_]]">
$i18n{requireNetworkMessage}
</div>
</div>
<paper-button class="primary-button" id="addPrinter" <paper-button class="primary-button" id="addPrinter"
on-tap="onAddPrinterTap_" hidden="[[!canAddPrinter_]]"> on-tap="onAddPrinterTap_" disabled="[[!canAddPrinter_]]">
$i18n{addCupsPrinter} $i18n{addCupsPrinter}
</paper-button> </paper-button>
<div class="start" hidden="[[canAddPrinter_]]">
<span>$i18n{addCupsPrinter}</span>
<div class="secondary">$i18n{requireNetworkMessage}</div>
</div>
</div> </div>
<settings-cups-add-printer-dialog id="addPrinterDialog" <settings-cups-add-printer-dialog id="addPrinterDialog"
......
...@@ -31,14 +31,9 @@ ...@@ -31,14 +31,9 @@
</div> </div>
</template> </template>
</if> </if>
<div id="cloudPrinters" class="settings-box two-line" <div id="cloudPrinters" class="settings-box"
on-tap="onTapCloudPrinters_" actionable> on-tap="onTapCloudPrinters_" actionable>
<div class="start"> <div class="start">$i18n{cloudPrintersTitle}</div>
$i18n{cloudPrintersTitle}
<div class="secondary" id="cloudPrintersSecondary">
$i18n{cloudPrintersTitleDescription}
</div>
</div>
<button class="subpage-arrow" is="paper-icon-button-light" <button class="subpage-arrow" is="paper-icon-button-light"
aria-label="$i18n{cloudPrintersTitle}" aria-label="$i18n{cloudPrintersTitle}"
aria-describedby="cloudPrintersSecondary"></button> aria-describedby="cloudPrintersSecondary"></button>
......
...@@ -1505,10 +1505,10 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) { ...@@ -1505,10 +1505,10 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) {
{"printingManageCloudPrintDevices", {"printingManageCloudPrintDevices",
IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES}, IDS_SETTINGS_PRINTING_MANAGE_CLOUD_PRINT_DEVICES},
{"cloudPrintersTitle", IDS_SETTINGS_PRINTING_CLOUD_PRINTERS}, {"cloudPrintersTitle", IDS_SETTINGS_PRINTING_CLOUD_PRINTERS},
{"cloudPrintersTitleDescription",
IDS_SETTINGS_PRINTING_CLOUD_PRINTERS_DESCRIPTION},
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
{"cupsPrintersTitle", IDS_SETTINGS_PRINTING_CUPS_PRINTERS}, {"cupsPrintersTitle", IDS_SETTINGS_PRINTING_CUPS_PRINTERS},
{"cupsPrintersLearnMoreLabel",
IDS_SETTINGS_PRINTING_CUPS_PRINTERS_LEARN_MORE_LABEL},
{"addCupsPrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_ADD_PRINTER}, {"addCupsPrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_ADD_PRINTER},
{"cupsPrinterDetails", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_DETAILS}, {"cupsPrinterDetails", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_DETAILS},
{"removePrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_REMOVE}, {"removePrinter", IDS_SETTINGS_PRINTING_CUPS_PRINTERS_REMOVE},
...@@ -1577,6 +1577,8 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) { ...@@ -1577,6 +1577,8 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) {
html_source->AddBoolean("showCupsPrintingFeatures", html_source->AddBoolean("showCupsPrintingFeatures",
!base::CommandLine::ForCurrentProcess()->HasSwitch( !base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kDisableNativeCups)); ::switches::kDisableNativeCups));
html_source->AddString("printingCUPSPrintLearnMoreUrl",
chrome::kCupsPrintLearnMoreURL);
#endif #endif
} }
......
...@@ -139,6 +139,8 @@ const char kChromeUIUserImageURL[] = "chrome://userimage/"; ...@@ -139,6 +139,8 @@ const char kChromeUIUserImageURL[] = "chrome://userimage/";
// TODO(xdai): Change it to chrome://settings/cupsPrinters after M56 since MD // TODO(xdai): Change it to chrome://settings/cupsPrinters after M56 since MD
// settings is going to launch in Chrome OS in M57. // settings is going to launch in Chrome OS in M57.
const char kChromeUIMdCupsSettingsURL[] = "chrome://md-settings/cupsPrinters"; const char kChromeUIMdCupsSettingsURL[] = "chrome://md-settings/cupsPrinters";
const char kCupsPrintLearnMoreURL[] =
"https://support.google.com/chromebook?p=chromebook_printing";
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
#if defined(OS_WIN) #if defined(OS_WIN)
......
...@@ -127,6 +127,7 @@ extern const char kChromeUISystemInfoURL[]; ...@@ -127,6 +127,7 @@ extern const char kChromeUISystemInfoURL[];
extern const char kChromeUITermsOemURL[]; extern const char kChromeUITermsOemURL[];
extern const char kChromeUIUserImageURL[]; extern const char kChromeUIUserImageURL[];
extern const char kChromeUIMdCupsSettingsURL[]; extern const char kChromeUIMdCupsSettingsURL[];
extern const char kCupsPrintLearnMoreURL[];
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
#if defined(OS_WIN) #if defined(OS_WIN)
......
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