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

Side by Side Diff: tracing/tracing/ui/base/list_and_associated_view.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase 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
« no previous file with comments | « tracing/tracing/ui/base/line_chart_test.html ('k') | tracing/tracing/ui/base/list_view.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 Copyright (c) 2014 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="stylesheet" href="/tracing/ui/base/list_and_associated_view.css"> 8 <link rel="stylesheet" href="/tracing/ui/base/list_and_associated_view.css">
9 9
10 <link rel="import" href="/tracing/ui/base/list_view.html"> 10 <link rel="import" href="/tracing/ui/base/list_view.html">
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 for (var i = 0; i < this.list_.length; i++) { 92 for (var i = 0; i < this.list_.length; i++) {
93 var itemEl; 93 var itemEl;
94 if (i >= this.listView_.children.length) { 94 if (i >= this.listView_.children.length) {
95 itemEl = document.createElement('div'); 95 itemEl = document.createElement('div');
96 Polymer.dom(this.listView_).appendChild(itemEl); 96 Polymer.dom(this.listView_).appendChild(itemEl);
97 } else { 97 } else {
98 itemEl = this.listView_.children[i]; 98 itemEl = this.listView_.children[i];
99 } 99 }
100 itemEl.item = this.list_[i]; 100 itemEl.item = this.list_[i];
101 var getter = this.list_[i].__lookupGetter__(this.listProperty_); 101 var getter = this.list_[i].__lookupGetter__(this.listProperty_);
102 if (getter) 102 if (getter) {
103 Polymer.dom(itemEl).textContent = getter.call(this.list_[i]); 103 Polymer.dom(itemEl).textContent = getter.call(this.list_[i]);
104 else 104 } else {
105 Polymer.dom(itemEl).textContent = this.list_[i][this.listProperty_]; 105 Polymer.dom(itemEl).textContent = this.list_[i][this.listProperty_];
106 }
106 } 107 }
107 108
108 if (this.children[1] === this.placeholder_) { 109 if (this.children[1] === this.placeholder_) {
109 this.replaceChild(this.view_, 110 this.replaceChild(this.view_,
110 this.children[1]); 111 this.children[1]);
111 } 112 }
112 if (this.listView_.children.length && 113 if (this.listView_.children.length &&
113 !this.listView_.selectedElement) 114 !this.listView_.selectedElement) {
114 this.listView_.selectedElement = this.listView_.children[0]; 115 this.listView_.selectedElement = this.listView_.children[0];
116 }
115 }, 117 },
116 118
117 onSelectionChanged_: function(e) { 119 onSelectionChanged_: function(e) {
118 var setter = this.view_.__lookupSetter__(this.viewProperty_); 120 var setter = this.view_.__lookupSetter__(this.viewProperty_);
119 if (!setter) { 121 if (!setter) {
120 var prop = this.viewProperty_; 122 var prop = this.viewProperty_;
121 setter = function(value) { this[prop] = value; }; 123 setter = function(value) { this[prop] = value; };
122 } 124 }
123 if (this.listView_.selectedElement) { 125 if (this.listView_.selectedElement) {
124 setter.call(this.view_, 126 setter.call(this.view_,
125 this.listView_.selectedElement.item); 127 this.listView_.selectedElement.item);
126 } else { 128 } else {
127 setter.call(this.view_, 129 setter.call(this.view_,
128 undefined); 130 undefined);
129 } 131 }
130 } 132 }
131 }; 133 };
132 134
133 return { 135 return {
134 ListAndAssociatedView, 136 ListAndAssociatedView,
135 }; 137 };
136 }); 138 });
137 </script> 139 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/base/line_chart_test.html ('k') | tracing/tracing/ui/base/list_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698