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

Side by Side Diff: Tools/GardeningServer/ui/ct-tree-select.html

Issue 728023004: Remove GardeningServer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6
7 <polymer-element name="ct-tree-select" attributes="tree treeList">
8 <template>
9 <select id='treeSelect' on-change="{{ _updateTree }}" value="{{ tree }}">
10 <template repeat="{{ s in treeList.trees }}">
11 <option value="{{ s.name }}">{{ s.displayName }}</option>
12 </template>
13 </select>
14 </template>
15 <script>
16 (function() {
17 Polymer({
18 publish: {
19 tree: {
20 reflect: true,
21 },
22 },
23
24 _updateTree: function(event) {
25 this.asyncFire('navigate', {
26 url: event.target.value
27 });
28 },
29
30 treeChanged: function() {
31 if (!this.tree.length)
32 return;
33
34 // Enforce the tree list, so we don't show a blank select value.
35 var option = this.$.treeSelect.querySelector('option[value="' + this.tre e + '"]');
36 if (!option) {
37 // URL is incorrect. Replace with the root so we use the default tree.
38 this.asyncFire('navigate', {
39 url: '/',
40 replaceState: true
41 });
42 }
43 },
44 });
45 })();
46 </script>
47 </polymer-element>
OLDNEW
« no previous file with comments | « Tools/GardeningServer/ui/ct-test-output.html ('k') | Tools/GardeningServer/ui/ct-tree-status.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698