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

Side by Side Diff: chrome/browser/resources/md_policy/policy_group.js

Issue 1371073003: Display material design policies grouped by tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extracting PolicyUi + Renaming. Created 5 years, 2 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 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview
7 * 'policy-group' is an MD element, that contains a description of a group
8 * and all policies that are tagged with the groups name. Policies with multiple
9 * tags will appear in multiple groups.
10 *
11 * Example:
12 *
13 * <policy-group risk-tag="Privacy and Security"></policy-group>
14 *
15 * would render a paper card with the title 'Privacy and Security'.
16 * New Policies are added with |addPolicy|.
17 *
18 * @group Chrome Policy Elements
19 * @element policy-group
20 */
21
22 PolicyGroup = Polymer({
23 is: 'policy-group',
24
25 /** @override */
26 factoryImpl: function(riskTag) {
stevenjb 2015/10/07 17:09:32 @param for riskTag Also, declare (and type) riskTa
fhorschig 2015/10/08 09:35:45 Done.
27 this.riskTag = riskTag;
28 },
29
30 /**
31 * Creates a new DOM element for the given policy.
32 * @param {string} policy Name of the policy.
33 */
34 addPolicy: function(policy) {
35 // TODO(fhorschig): Create policy paper-items with possibility to (un)fold.
36 var node = document.createElement('p');
37 node.textContent = policy;
38 this.$.content.appendChild(node);
39 },
40 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698