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

Unified Diff: appengine/sheriff_o_matic/ui/ct-tree-select.html

Issue 1315693002: SoM: upgrade Polymer from 0.5 to 1.0 Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: get bower_components from polymer_1.0.4 Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: appengine/sheriff_o_matic/ui/ct-tree-select.html
diff --git a/appengine/sheriff_o_matic/ui/ct-tree-select.html b/appengine/sheriff_o_matic/ui/ct-tree-select.html
index e53242d81d6703c90bc3c0a8160d2f1515fcc1d8..8a3663832af8685ef0c519c720c45afb9a61617b 100644
--- a/appengine/sheriff_o_matic/ui/ct-tree-select.html
+++ b/appengine/sheriff_o_matic/ui/ct-tree-select.html
@@ -2,46 +2,43 @@
Copyright 2014 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.
--->
-
-<polymer-element name="ct-tree-select" attributes="tree treeList">
+--><html><head><dom-module id="ct-tree-select">
<template>
- <select id='treeSelect' on-change="{{ _updateTree }}" value="{{ tree }}">
- <template repeat="{{ s in treeList.trees }}">
+ <select id="treeSelect" on-change=" _updateTree " value="{{ tree ::input}}">
+ <template is="dom-repeat" items="{{treeList.trees}}" as="s">
<option value="{{ s.name }}">{{ s.displayName }}</option>
</template>
</select>
</template>
<script>
- (function() {
- Polymer({
- publish: {
- tree: {
- reflect: true,
+ (function () {
+ Polymer({
+ is: 'ct-tree-select',
+ properties: {
+ tree: {
+ notify: true,
+ observer: 'treeChanged',
+ reflectToAttribute: true
+ },
+ treeList: { notify: true }
},
- },
-
- _updateTree: function(event) {
- this.asyncFire('navigate', {
- url: event.target.value
- });
- },
-
- treeChanged: function() {
- if (!this.tree.length)
- return;
-
- // Enforce the tree list, so we don't show a blank select value.
- var option = this.$.treeSelect.querySelector('option[value="' + this.tree + '"]');
- if (!option) {
- // URL is incorrect. Replace with the root so we use the default tree.
- this.asyncFire('navigate', {
- url: '/',
- replaceState: true
- });
+ _updateTree: function (event) {
+ this.asyncFire('navigate', { url: event.target.value });
+ },
+ treeChanged: function () {
+ if (!this.tree.length)
+ return;
+ // Enforce the tree list, so we don't show a blank select value.
+ var option = this.$.treeSelect.querySelector('option[value="' + this.tree + '"]');
+ if (!option) {
+ // URL is incorrect. Replace with the root so we use the default tree.
+ this.asyncFire('navigate', {
+ url: '/',
+ replaceState: true
+ });
+ }
}
- },
- });
- })();
+ });
+ }());
</script>
-</polymer-element>
+</dom-module>

Powered by Google App Engine
This is Rietveld 408576698