| OLD | NEW |
| 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/paper-checkbox/paper-ch
eckbox.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.html
"> | 3 <link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.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="settings-checkbox"> | 9 <dom-module id="settings-checkbox"> |
| 10 <link rel="import" type="css" href="chrome://resources/cr_elements/shared.css"
> | 10 <link rel="import" type="css" href="chrome://resources/cr_elements/shared.css"
> |
| 11 <template> | 11 <template> |
| 12 <style include="settings-shared"> | 12 <style include="settings-shared"> |
| 13 :host { | 13 :host { |
| 14 align-items: center; | 14 align-items: center; |
| 15 display: flex; | 15 display: flex; |
| 16 min-height: var(--settings-row-min-height); | 16 min-height: var(--settings-row-min-height); |
| 17 } | 17 } |
| 18 | 18 |
| 19 .secondary:not(:empty) { | 19 .secondary:not(:empty) { |
| 20 @apply(--settings-secondary); | 20 @apply(--settings-secondary); |
| 21 } | 21 } |
| 22 | 22 |
| 23 #nonexistent { | |
| 24 /* HACK(michaelpg): Inform Polymer that this mixin can set "display". */ | |
| 25 --settings-secondary-unchecked: { | |
| 26 display: block; | |
| 27 }; | |
| 28 } | |
| 29 | |
| 30 paper-checkbox:not([checked]) .secondary { | 23 paper-checkbox:not([checked]) .secondary { |
| 31 @apply(--settings-secondary-unchecked); | 24 @apply(--settings-secondary-unchecked); |
| 32 } | 25 } |
| 33 | 26 |
| 34 cr-policy-pref-indicator { | 27 cr-policy-pref-indicator { |
| 35 -webkit-margin-start: var(--checkbox-spacing); | 28 -webkit-margin-start: var(--checkbox-spacing); |
| 36 } | 29 } |
| 37 </style> | 30 </style> |
| 38 <cr-events id="events"></cr-events> | 31 <cr-events id="events"></cr-events> |
| 39 | 32 |
| 40 <div class="layout horizontal center"> | 33 <div class="layout horizontal center"> |
| 41 <paper-checkbox id="checkbox" checked="{{checked}}" | 34 <paper-checkbox id="checkbox" checked="{{checked}}" |
| 42 disabled="[[checkboxDisabled_(disabled, pref)]]"> | 35 disabled="[[checkboxDisabled_(disabled, pref)]]"> |
| 43 <div>[[label]]</div> | 36 <div>[[label]]</div> |
| 44 <div class="secondary">[[subLabel]]</div> | 37 <div class="secondary">[[subLabel]]</div> |
| 45 </paper-checkbox> | 38 </paper-checkbox> |
| 46 <template is="dom-if" if="[[pref.policySource]]"> | 39 <template is="dom-if" if="[[pref.policySource]]"> |
| 47 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> | 40 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> |
| 48 </template> | 41 </template> |
| 49 </div> | 42 </div> |
| 50 </template> | 43 </template> |
| 51 <script src="settings_checkbox.js"></script> | 44 <script src="settings_checkbox.js"></script> |
| 52 </dom-module> | 45 </dom-module> |
| OLD | NEW |