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

Side by Side Diff: chrome/browser/resources/settings/downloads_page/downloads_page.html

Issue 2669073002: MD Settings: Allow controlled-button to be used with icons. (Closed)
Patch Set: have the parent row of the controlled-button disable/enable based on controlled-button state Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/html/polymer.html"> 1 <link rel="import" href="chrome://resources/html/polymer.html">
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe s/iron-flex-layout.html"> 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe s/iron-flex-layout.html">
3 <link rel="import" href="../controls/controlled_button.html"> 3 <link rel="import" href="../controls/controlled_button.html">
4 <link rel="import" href="../controls/settings_toggle_button.html"> 4 <link rel="import" href="../controls/settings_toggle_button.html">
5 <link rel="import" href="../settings_shared_css.html"> 5 <link rel="import" href="../settings_shared_css.html">
6 6
7 <dom-module id="settings-downloads-page"> 7 <dom-module id="settings-downloads-page">
8 <template> 8 <template>
9 <style include="settings-shared"></style> 9 <style include="settings-shared">
10 <div class="settings-box first two-line"> 10 .settings-box[disabled] {
11 pointer-events: none;
12 }
13 </style>
14 <div class="settings-box first two-line" on-tap="selectDownloadLocation_"
15 disabled$="[[isControlled_]]" actionable>
11 <div class="start"> 16 <div class="start">
12 <div>$i18n{downloadLocation}</div> 17 <div>$i18n{downloadLocation}</div>
13 <div class="secondary"> 18 <div class="secondary">
14 <if expr="not chromeos"> 19 <if expr="not chromeos">
15 [[prefs.download.default_directory.value]] 20 [[prefs.download.default_directory.value]]
16 </if> 21 </if>
17 <if expr="chromeos"> 22 <if expr="chromeos">
18 [[getDownloadLocation_(prefs.download.default_directory.value)]] 23 [[getDownloadLocation_(prefs.download.default_directory.value)]]
19 </if> 24 </if>
20 </div> 25 </div>
21 </div> 26 </div>
22 <div class="secondary-action"> 27 <controlled-button id="changeDownloadsPath" icon-class="icon-external"
23 <controlled-button class="secondary-button" id="changeDownloadsPath" 28 pref="[[prefs.download.default_directory]]" end-justified
24 on-tap="selectDownloadLocation_" 29 controlled="{{isControlled_}}">
25 pref="[[prefs.download.default_directory]]" 30 </controlled-button>
26 end-justified>
27 $i18n{changeDownloadLocation}
28 </controlled-button>
29 </div>
30 </div> 31 </div>
31 <div class="settings-box block"> 32 <div class="settings-box block">
32 <settings-toggle-button 33 <settings-toggle-button
33 pref="{{prefs.download.prompt_for_download}}" 34 pref="{{prefs.download.prompt_for_download}}"
34 label="$i18n{promptForDownload}"> 35 label="$i18n{promptForDownload}">
35 </settings-toggle-button> 36 </settings-toggle-button>
36 <if expr="chromeos"> 37 <if expr="chromeos">
37 <settings-toggle-button 38 <settings-toggle-button
38 pref="{{prefs.gdata.disabled}}" 39 pref="{{prefs.gdata.disabled}}"
39 label="$i18n{disconnectGoogleDriveAccount}" 40 label="$i18n{disconnectGoogleDriveAccount}"
40 hidden="[[!pageVisibility.googleDrive]]"> 41 hidden="[[!pageVisibility.googleDrive]]">
41 </settings-toggle-button> 42 </settings-toggle-button>
42 </if> 43 </if>
43 </div> 44 </div>
44 </template> 45 </template>
45 <script src="downloads_page.js"></script> 46 <script src="downloads_page.js"></script>
46 </dom-module> 47 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698