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

Unified Diff: status/res/imp/input-list-sk.html

Issue 1051173003: Add controls to buildbot dashboard (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Simplify promise Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « status/res/imp/buildbot-dash-sk.html ('k') | status/templates/buildbot_dash.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: status/res/imp/input-list-sk.html
diff --git a/status/res/imp/input-list-sk.html b/status/res/imp/input-list-sk.html
new file mode 100644
index 0000000000000000000000000000000000000000..b052e627e7ce4aaaf5d0fd09d6e8e6936f25c0dc
--- /dev/null
+++ b/status/res/imp/input-list-sk.html
@@ -0,0 +1,78 @@
+<!--
+ The common.js file must be included before this file.
+
+ This in an HTML Import-able file that contains the definition
+ of the following elements:
+
+ <input-list-sk>
+
+ To use this file import it:
+
+ <link href="/res/imp/input-list-sk.html" rel="import" />
+
+ Usage:
+
+ <input-list-sk></input-list-sk>
+
+ Properties:
+ values: array of strings; the values of the inputs.
+-->
+<polymer-element name="input-list-sk">
+ <template>
+ <style>
+ #container {
+ margin: 5px;
+ padding: 10px;
+ border: 1px solid #eeeeee;
+ font-size: 12px;
+ }
+ h2 {
+ font-size: 16px;
+ }
+ core-icon-button /deep/ core-icon[role=img] {
+ width: 14px;
+ height: 14px;
+ }
+ .filter {
+ font-style: italic;
+ }
+ </style>
+ <div id="container" vertical layout>
+ <h2>{{heading}}</h2>
+ <template repeat="{{value, i in values}}">
+ <div horizontal layout center>
+ <span class="filter" flex>{{value}}</span>
+ <core-icon-button icon="close" index="{{i}}" on-click="{{deleteValue}}"></core-icon-button>
+ </div>
+ </template>
+ <paper-input id="new" label="Enter a pattern" on-change="{{addValue}}"></paper-input>
+ </div>
+ </template>
+ <script>
+ Polymer({
+ publish: {
+ heading: {
+ value: null,
+ reflect: true,
+ },
+ values: {
+ value: [],
+ reflect: true,
+ },
+ },
+
+ addValue: function() {
+ if (this.$.new.value && this.$.new.value != "") {
+ this.values.push(this.$.new.value);
+ }
+ this.$.new.value = "";
+ this.fire("change");
+ },
+
+ deleteValue: function(e, detail, sender) {
+ this.values.splice(sender.getAttribute("index"), 1);
+ this.fire("change");
+ },
+ });
+ </script>
+</polymer-element>
« no previous file with comments | « status/res/imp/buildbot-dash-sk.html ('k') | status/templates/buildbot_dash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698