| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/html/assert.html"> | 1 <link rel="import" href="chrome://resources/html/assert.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 2 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_be
havior.html"> | 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_be
havior.html"> |
| 5 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in
dicator.html"> | 5 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in
dicator.html"> |
| 6 <link rel="import" href="/controls/pref_control_behavior.html"> | 6 <link rel="import" href="/controls/pref_control_behavior.html"> |
| 7 <link rel="import" href="/settings_shared_css.html"> | 7 <link rel="import" href="/settings_shared_css.html"> |
| 8 | 8 |
| 9 <dom-module id="controlled-button"> | 9 <dom-module id="controlled-button"> |
| 10 <template> | 10 <template> |
| 11 <style include="settings-shared"> | 11 <style include="settings-shared"> |
| 12 :host { | 12 :host { |
| 13 align-items: center; | 13 align-items: center; |
| 14 display: flex; | 14 display: flex; |
| 15 } | 15 } |
| 16 | 16 |
| 17 :host([controlled_]) { | 17 :host([controlled_]) { |
| 18 /* Disable pointer events for this whole element, as outer on-tap gets | 18 /* Disable pointer events for this whole element, as outer on-tap gets |
| 19 * triggered when clicking/tapping anywhere in :host. */ | 19 * triggered when clicking/tapping anywhere in :host. */ |
| 20 pointer-events: none; | 20 pointer-events: none; |
| 21 } | 21 } |
| 22 | 22 |
| 23 cr-policy-pref-indicator { | 23 cr-policy-pref-indicator { |
| 24 -webkit-margin-start: var(--checkbox-spacing); | 24 -webkit-margin-start: var(--settings-checkbox-spacing); |
| 25 /* Enable pointer events for the indicator so :hover works. Disable | 25 /* Enable pointer events for the indicator so :hover works. Disable |
| 26 * clicks/taps via onIndicatorTap_ so outer on-tap doesn't trigger. */ | 26 * clicks/taps via onIndicatorTap_ so outer on-tap doesn't trigger. */ |
| 27 pointer-events: all; | 27 pointer-events: all; |
| 28 } | 28 } |
| 29 </style> | 29 </style> |
| 30 | 30 |
| 31 <paper-button disabled="[[controlled_]]"> | 31 <paper-button disabled="[[controlled_]]"> |
| 32 <content></content> | 32 <content></content> |
| 33 </paper-button> | 33 </paper-button> |
| 34 | 34 |
| 35 <template is="dom-if" if="[[controlled_]]"> | 35 <template is="dom-if" if="[[controlled_]]"> |
| 36 <cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_"> | 36 <cr-policy-pref-indicator pref="[[pref]]" on-tap="onIndicatorTap_"> |
| 37 </cr-policy-pref-indicator> | 37 </cr-policy-pref-indicator> |
| 38 </template> | 38 </template> |
| 39 | 39 |
| 40 </template> | 40 </template> |
| 41 <script src="/controls/controlled_button.js"></script> | 41 <script src="/controls/controlled_button.js"></script> |
| 42 </dom-module> | 42 </dom-module> |
| OLD | NEW |