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

Unified Diff: Tools/GardeningServer/ui/ct-commit-list.html

Issue 441393002: Collapse commit list by default in sheriff-o-matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/test/ct-commit-list-tests.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 59c95931b4ee8b05b9025420d7491e0b50fd4327..287946a6797003523ee515f42f8889fb0ccb159a 100644
--- a/Tools/GardeningServer/ui/ct-commit-list.html
+++ b/Tools/GardeningServer/ui/ct-commit-list.html
@@ -5,6 +5,7 @@ found in the LICENSE file.
-->
<link rel="import" href="ct-commit.html">
+<link rel="import" href="../bower_components/paper-button/paper-button.html">
<polymer-element name="ct-commit-list" attributes="commitList">
<template>
@@ -12,19 +13,46 @@ found in the LICENSE file.
:host {
display: block;
}
+ paper-icon-button {
+ vertical-align: middle;
+ }
+ .repository-info {
+ display: block;
+ }
</style>
<template repeat="{{ repository in commitList | _repositories }}">
- <template repeat="{{ commit in repository.commits }}">
- <ct-commit data="{{ commit }}"></ct-commit>
- </template>
+ <div class="repository-info">
+ {{ repository.name }} {{ repository.range }}
+ <paper-icon-button icon="unfold-more"
+ on-click="{{ _toggle }}" repository="{{ repository.name }}"></paper-icon-button>
+ <template if="{{ repository.expanded }}">
+ <template repeat="{{ commit in repository.commits }}">
+ <ct-commit data="{{ commit }}"></ct-commit>
+ </template>
+ </template>
+ </div>
</template>
</template>
<script>
Polymer({
+ repositories: undefined,
+
+ created: function() {
+ this.repositories = [];
+ },
+
_repositories: function() {
- if (!this.commitList)
- return [];
- return this.commitList.repositories();
+ if (this.commitList)
+ this.repositories = this.commitList.repositories();
+ return this.repositories;
+ },
+
+ _toggle: function(event, detail, sender, target) {
+ var repo = sender.getAttribute('repository');
+ var r = this.repositories.find(function(item) {
+ return item.name === repo;
+ });
+ r.expanded = !r.expanded;
}
});
</script>
« no previous file with comments | « no previous file | Tools/GardeningServer/ui/test/ct-commit-list-tests.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698