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