summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authormichaelpg <michaelpg@chromium.org>2016-01-14 18:05:57 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-15 02:06:49 +0000
commit8712ac26e190402ec12dbeafecb3f85d7dac0c91 (patch)
tree3874a8fa6420d350c54647cd690c91c7041f139e /ui
parent802055326d37d01a38c8a38517a9d8a84eb2468a (diff)
downloadchromium_src-8712ac26e190402ec12dbeafecb3f85d7dac0c91.zip
chromium_src-8712ac26e190402ec12dbeafecb3f85d7dac0c91.tar.gz
chromium_src-8712ac26e190402ec12dbeafecb3f85d7dac0c91.tar.bz2
Replace cr-collapse with iron-collapse
There's no advantage to wrapping iron-collapse AFAICT. BUG=none R=stevenjb@chromium.org Review URL: https://codereview.chromium.org/1574393004 Cr-Commit-Position: refs/heads/master@{#369652}
Diffstat (limited to 'ui')
-rw-r--r--ui/webui/resources/cr_elements/cr_collapse/cr_collapse.css7
-rw-r--r--ui/webui/resources/cr_elements/cr_collapse/cr_collapse.html11
-rw-r--r--ui/webui/resources/cr_elements/cr_collapse/cr_collapse.js53
-rw-r--r--ui/webui/resources/cr_elements/cr_collapse/demo.html21
-rw-r--r--ui/webui/resources/cr_elements/cr_collapse/demo.js9
-rw-r--r--ui/webui/resources/cr_elements/demo_element.html27
-rw-r--r--ui/webui/resources/cr_elements/network/cr_network_list.html6
-rw-r--r--ui/webui/resources/cr_elements_resources.grdp9
8 files changed, 5 insertions, 138 deletions
diff --git a/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.css b/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.css
deleted file mode 100644
index 809ed285..0000000
--- a/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Copyright 2015 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file. */
-
-:host {
- display: block;
-}
diff --git a/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.html b/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.html
deleted file mode 100644
index 4e4222d..0000000
--- a/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-collapse.html">
-
-<dom-module id="cr-collapse">
- <link rel="import" type="css" href="cr_collapse.css">
- <template>
- <iron-collapse id="collapse" opened="{{opened}}">
- <content></content>
- </iron-collapse>
- </template>
- <script src="cr_collapse.js"></script>
-</dom-module>
diff --git a/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.js b/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.js
deleted file mode 100644
index 2ad4942..0000000
--- a/ui/webui/resources/cr_elements/cr_collapse/cr_collapse.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-/**
- * @fileoverview
- * `cr-collapse` creates a collapsible block of content. By default, the content
- * will be collapsed. Use `opened` or `toggle()` to show/hide the content.
- * `cr-collapse` adjusts the height/width of the collapsible element to
- * show/hide the content. So avoid putting padding/margin/border on the
- * collapsible directly, and instead put a `div` inside and style that.
- *
- * Example:
- * <style>
- * #collapse-content {
- * padding: 15px;
- * }
- * </style>
- * <button on-click="{{toggle}}">toggle collapse</button>
- * <cr-collapse id="collapse">
- * <div id="collapse-content">
- * Content goes here...
- * </div>
- * </cr-collapse>
- *
- * ...
- *
- * toggle: function() {
- * this.$.collapse.toggle();
- * }
- *
- * @element cr-collapse
- */
-Polymer({
- is: 'cr-collapse',
-
- properties: {
- /**
- * Set opened to `true` to show the collapse element and to `false` to hide
- * it.
- */
- opened: {
- type: Boolean,
- value: false,
- reflectToAttribute: true,
- notify: true
- },
- },
-
- toggle: function() {
- this.$.collapse.toggle();
- },
-});
diff --git a/ui/webui/resources/cr_elements/cr_collapse/demo.html b/ui/webui/resources/cr_elements/cr_collapse/demo.html
deleted file mode 100644
index 06851cf..0000000
--- a/ui/webui/resources/cr_elements/cr_collapse/demo.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<html>
-<head>
- <link href="cr_collapse.html" rel="import">
- <style>
- #collapse-content {
- padding: 15px;
- }
- </style>
-</head>
-<body unresolved>
- <h2>cr-collapse:</h2>
- <button>toggle collapse</button>
- <cr-collapse id="collapse">
- <div id="collapse-content">
- Content goes here...
- </div>
- </cr-collapse>
- <div>Some more text</div>
- <script src="demo.js"></script>
-</body>
-</html>
diff --git a/ui/webui/resources/cr_elements/cr_collapse/demo.js b/ui/webui/resources/cr_elements/cr_collapse/demo.js
deleted file mode 100644
index ffc1965..0000000
--- a/ui/webui/resources/cr_elements/cr_collapse/demo.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-var button = document.querySelector('button');
-var collapse = document.querySelector('#collapse');
-button.addEventListener('click', function() {
- collapse.toggle();
-});
diff --git a/ui/webui/resources/cr_elements/demo_element.html b/ui/webui/resources/cr_elements/demo_element.html
index d9c2bc3..440d82e 100644
--- a/ui/webui/resources/cr_elements/demo_element.html
+++ b/ui/webui/resources/cr_elements/demo_element.html
@@ -2,39 +2,16 @@
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-checkbox.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_collapse/cr_collapse.html">
<link rel="import" href="chrome://resources/cr_elements/cr_expand_button/cr_expand_button.html">
<link rel="import" href="chrome://resources/cr_elements/network/cr_network_icon.html">
<dom-module id="cr-demo-element">
<link rel="import" type="css" href="demo_element.css">
<template>
- <h3>cr-collapse</h3>
- <div class="layout vertical">
- <cr-expand-button expanded="{{collapseOpened}}">
- Collapse 1
- </cr-expand-button>
- <cr-collapse opened="[[collapseOpened]]">
- <div class="layout vertical">
- <span>Collapsable Section 1</span>
- <paper-checkbox>Advanced option 1</paper-checkbox>
- <paper-checkbox>Advanced option 2</paper-checkbox>
- </div>
- </cr-collapse>
- <paper-button toggles active="{{collapseOpened2}}">
- Collapse 2
- </paper-button>
- <cr-collapse opened="[[collapseOpened2]]">
- <div class="layout vertical">
- <span>Collapsable Section 2</span>
- </div>
- </cr-collapse>
- </div>
-
<cr-expand-button toggles expanded="{{networkOpened}}">
<span class="heading">cr-network-*</span>
</cr-expand-button>
- <cr-collapse opened="[[networkOpened]]">
+ <iron-collapse opened="[[networkOpened]]">
<div class="layout vertical">
<h3>cr-network-icon</h3>
<div class="layout vertical">
@@ -54,7 +31,7 @@
</div>
</div>
</div>
- </cr-collapse>
+ </iron-collapse>
</template>
<script src="demo_element.js"></script>
diff --git a/ui/webui/resources/cr_elements/network/cr_network_list.html b/ui/webui/resources/cr_elements/network/cr_network_list.html
index 4c7226c..7f28786 100644
--- a/ui/webui/resources/cr_elements/network/cr_network_list.html
+++ b/ui/webui/resources/cr_elements/network/cr_network_list.html
@@ -1,13 +1,13 @@
<link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html">
+<link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-collapse.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
-<link rel="import" href="chrome://resources/cr_elements/cr_collapse/cr_collapse.html">
<link rel="import" href="chrome://resources/cr_elements/network/cr_network_list_item.html">
<link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.html">
<dom-module id="cr-network-list">
<link rel="import" type="css" href="cr_network_list.css">
<template>
- <cr-collapse opened="{{opened}}">
+ <iron-collapse opened="{{opened}}">
<div id="container" class="layout vertical flex">
<template is="dom-repeat" items="[[networks]]">
<cr-network-list-item network-state="[[item]]"
@@ -15,7 +15,7 @@
</cr-network-list-item>
</template>
</div>
- </cr-collapse>
+ </iron-collapse>
</template>
<script src="cr_network_list.js"></script>
</dom-module>
diff --git a/ui/webui/resources/cr_elements_resources.grdp b/ui/webui/resources/cr_elements_resources.grdp
index 74434b8..66b5084 100644
--- a/ui/webui/resources/cr_elements_resources.grdp
+++ b/ui/webui/resources/cr_elements_resources.grdp
@@ -18,15 +18,6 @@
file="../../webui/resources/cr_elements/demo_page.html"
type="chrome_html" />
</if>
- <structure name="IDR_CR_ELEMENTS_CR_COLLAPSE_CSS"
- file="../../webui/resources/cr_elements/cr_collapse/cr_collapse.css"
- type="chrome_html" />
- <structure name="IDR_CR_ELEMENTS_CR_COLLAPSE_HTML"
- file="../../webui/resources/cr_elements/cr_collapse/cr_collapse.html"
- type="chrome_html" />
- <structure name="IDR_CR_ELEMENTS_CR_COLLAPSE_JS"
- file="../../webui/resources/cr_elements/cr_collapse/cr_collapse.js"
- type="chrome_html" />
<structure name="IDR_CR_ELEMENTS_CR_EVENTS_HTML"
file="../../webui/resources/cr_elements/cr_events/cr_events.html"
type="chrome_html" />