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

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

Issue 2696903005: Move common cr-policy-indicator behavior into CrPolicyIndicatorBehavior (Closed)
Patch Set: TODO and README update 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
(Empty)
1 # Policy indicators
2
3 Setting that can't be controlled by the current user often show an icon and a
dschuyler 2017/02/28 22:16:33 maybe s/Setting/Settings/ or s/Setting/A setting
michaelpg 2017/03/01 00:34:00 Done.
4 tooltip explaining why. This happens when a setting is:
5
6 * enforced by user policy, or different from a policy's "recommended" value
7 * overridden by an extension
8 * or (on Chrome OS):
9 * enforced/recommended by device policy (for enrolled devices)
10 * set by the device owner (for non-enrolled devices)
11 * controlled by the primary user (for multiple profile sessions)
12
13 ## Indicator UI
14
15 The badge icons are sourced from [cr_elements/icons.html] by default.
16
17 Indicators show a tooltip with explanatory text on hover, assuming
18 `CrPolicyStrings` is defined.
dschuyler 2017/02/28 22:16:33 maybe s/assuming/assuming an entry in/ (since CrPo
michaelpg 2017/03/01 00:34:00 No, the actual object needs to be defined -- we do
19
20 ## Using an indicator
21
22 Elements like `<cr-policy-pref-indicator>` and `<cr-policy-network-indicator>`
23 are provided to be reused in WebUI pages:
24
25 <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator>
26
27 Example: [settings-checkbox].
28
29 For one-off or composed elements, `CrPolicyIndicatorBehavior` provides some
30 configurable properties and calculates dependent properties, such as the
31 tooltip, icon, and visibility of the indicator.
32
33 Example: [cr_policy_pref_indicator.js] overrides `indicatorType` and
34 `indicatorTooltip`; [cr_policy_pref_indicator.html] displays the computed
35 properties from `CrPolicyIndicatorBehavior`.
36
37
38 [cr_elements/icons.html]: ../icons.html
39 [settings-checkbox]: /chrome/browser/resources/settings/controls/settings_checkb ox.html
40 [cr_policy_pref_indicator.js]: cr_policy_pref_indicator.js
41 [cr_policy_pref_indicator.html]: cr_policy_pref_indicator.html
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/date_time_page_tests.js ('k') | ui/webui/resources/cr_elements/policy/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698