Chromium Code Reviews| Index: Tools/GardeningServer/ui/ct-commit-list.html |
| diff --git a/Tools/GardeningServer/ui/ct-commit-list.html b/Tools/GardeningServer/ui/ct-commit-list.html |
| index e3510110285caa6cde74b620a5be6894ec5ec005..371477b43b58b9ae3268c6a1015c18e1bebcc1ce 100644 |
| --- a/Tools/GardeningServer/ui/ct-commit-list.html |
| +++ b/Tools/GardeningServer/ui/ct-commit-list.html |
| @@ -5,18 +5,40 @@ found in the LICENSE file. |
| --> |
| <link rel="import" href="ct-commit.html"> |
| -<link rel="import" href="ct-commit-data.html"> |
| -<polymer-element name="ct-commit-list" attributes="first last" noscript> |
| +<polymer-element name="ct-commit-list" attributes="first last commits" noscript> |
| <template> |
| <style> |
| :host { |
| display: block; |
| } |
| </style> |
| - <ct-commit-data first="{{first}}" last="{{last}}" data="{{commitData}}"></ct-commit-data> |
| - <template repeat="{{commit in commitData}}"> |
| - <ct-commit data="{{commit}}"></ct-commit> |
| + <template repeat="{{revision in _revisions}}"> |
| + <template if="{{commits[revision]}}"> |
| + <ct-commit data="{{commits[revision]}}"></ct-commit> |
| + </template> |
| </template> |
| </template> |
| + <script> |
| + Polymer({ |
| + commits: {}, |
| + first: 0, |
| + last: 0, |
| + _revisions: [], |
| + |
| + observe: { |
| + first: '_update', |
| + last: '_update', |
| + }, |
| + |
| + _update: function() { |
| + if (!this.first || !this.last) |
| + return; |
| + |
| + this._revisions = []; |
| + for (var i = this.first; i <= this.last; i++) |
| + this._revisions.push(i); |
|
abarth-chromium
2014/07/21 06:36:27
There's no better way in sugar to do this? Looks
ojan
2014/07/21 19:58:04
Heh. I felt silly writing this code. I'm not sure
esprehn
2014/07/21 20:11:07
every returns an array, ex Number.range(2, 8).ever
|
| + }, |
| + }); |
| + </script> |
| </polymer-element> |