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

Side by Side Diff: ui/webui/resources/cr_elements/policy/README.md

Issue 2744923002: cr-policy-indicator element for non-preference-based indicators (Closed)
Patch Set: alphabetize Created 3 years, 9 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 # Policy indicators 1 # Policy indicators
2 2
3 Settings that can't be controlled by the current user often show an icon and a 3 Settings that can't be controlled by the current user often show an icon and a
4 tooltip explaining why. This happens when a setting is: 4 tooltip explaining why. This happens when a setting is:
5 5
6 * enforced by user policy, or different from a policy's "recommended" value 6 * enforced by user policy, or different from a policy's "recommended" value
7 * overridden by an extension 7 * overridden by an extension
8 * or (on Chrome OS): 8 * or (on Chrome OS):
9 * enforced/recommended by device policy (for enrolled devices) 9 * enforced/recommended by device policy (for enrolled devices)
10 * set by the device owner (for non-enrolled devices) 10 * set by the device owner (for non-enrolled devices)
11 * controlled by the primary user (for multiple profile sessions) 11 * controlled by the primary user (for multiple profile sessions)
12 12
13 ## Indicator UI 13 ## Indicator UI
14 14
15 The badge icons are sourced from [cr_elements/icons.html] by default. 15 The badge icons are sourced from [cr_elements/icons.html] by default.
16 16
17 Indicators show a tooltip with explanatory text on hover if `CrPolicyStrings` 17 Indicators show a tooltip with explanatory text on hover if `CrPolicyStrings`
18 is set; see [settings_ui.js] for an example from MD Settings. 18 is set; see [settings_ui.js] for an example from MD Settings.
19 19
20 ## Using an indicator 20 ## Using an indicator
21 21
22 Elements like `<cr-policy-pref-indicator>` and `<cr-policy-network-indicator>` 22 Elements like `<cr-policy-indicator>` and `<cr-policy-pref-indicator>` are
23 are provided to be reused in WebUI pages: 23 provided to be reused in WebUI pages:
24 24
25 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator> 25 <cr-policy-indicator indicator-type="userPolicy"></cr-policy-indicator>
26 26
27 Example: [settings-checkbox]. 27 Example: [settings-checkbox].
28 28
29 For one-off or composed elements, `CrPolicyIndicatorBehavior` provides some 29 For one-off or composed elements, `CrPolicyIndicatorBehavior` provides some
30 configurable properties and calculates dependent properties, such as the 30 configurable properties and calculates dependent properties, such as the
31 tooltip, icon, and visibility of the indicator. 31 tooltip, icon, and visibility of the indicator.
32 32
33 Example: [cr_policy_pref_indicator.js] overrides `indicatorType` and 33 Example: [cr_policy_pref_indicator.js] overrides `indicatorType` and
34 `indicatorTooltip`. [cr_policy_pref_indicator.html] displays the computed 34 `indicatorTooltip`. [cr_policy_pref_indicator.html] displays the computed
35 properties from `CrPolicyIndicatorBehavior`. 35 properties from `CrPolicyIndicatorBehavior`.
36 36
37 37
38 [cr_elements/icons.html]: ../icons.html 38 [cr_elements/icons.html]: ../icons.html
39 [settings_ui.js]: /chrome/browser/resources/settings/settings_ui/settings_ui.js 39 [settings_ui.js]: /chrome/browser/resources/settings/settings_ui/settings_ui.js
40 [settings-checkbox]: /chrome/browser/resources/settings/controls/settings_checkb ox.html 40 [settings-checkbox]: /chrome/browser/resources/settings/controls/settings_checkb ox.html
41 [cr_policy_pref_indicator.js]: cr_policy_pref_indicator.js 41 [cr_policy_pref_indicator.js]: cr_policy_pref_indicator.js
42 [cr_policy_pref_indicator.html]: cr_policy_pref_indicator.html 42 [cr_policy_pref_indicator.html]: cr_policy_pref_indicator.html
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698