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

Side by Side Diff: Tools/GardeningServer/ui/ct-failure-card-buttons.html

Issue 565523002: [Sheriff-o-matic] Refactor cards and get rid of ct-failure-cards (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix includes. Created 6 years, 3 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 | 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 <link rel="import" href="../model/ct-builder-list.html">
8 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html">
9 <link rel="import" href="../bower_components/paper-dialog/paper-dialog-transitio n.html">
10 <link rel="import" href="../bower_components/paper-input/paper-input.html">
11
12 <polymer-element name="ct-failure-card-buttons" attributes="group bug">
13 <template>
14 <style>
15 :host {
16 display: flex;
17 flex-direction: column;
18 }
19
20 /* FIXME: All this paper-button styling should go in a cr-button component so that
21 we can use buttons in different places and have them all look the same. */
22 paper-button {
23 -webkit-user-select: none;
24 background: #f5f5f5;
25 border-radius: 2px;
26 border: 1px solid #dcdcdc;
27 color: #444;
28 padding: 0 16px;
29 margin-bottom: 5px;
30 text-align: center;
31 }
32
33 paper-button:focus {
34 border: 1px solid #4d90fe;
35 outline: none;
36 }
37
38 paper-button:active {
39 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
40 }
41
42 paper-button:active, paper-button:hover {
43 background: #f8f8f8;
44 border-color: #c6c6c6;
45 box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
46 color: #222;
47 }
48 </style>
49 <paper-button id="examine" on-tap="{{ examine }}" label="Examine"></paper- button>
ojan 2014/09/11 01:50:04 INdentation
50 <template if="{{ !group.isSnoozed }}">
51 <paper-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></paper-b utton>
52 </template>
53 <template if="{{ group.isSnoozed }}">
54 <paper-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></pap er-button>
55 </template>
56 <paper-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></pape r-button>
57 <template if="{{ group.bug !== undefined }}">
58 <div>
59 <a href="{{ group.bug }}">
60 {{ group.bugLabel }}</a>
61 </div>
62 </template>
63
64 <paper-dialog heading="Enter bug number" transition="paper-transition-cent er" id="bugDialog">
65 <paper-input label="Bug# or URL" floatingLabel autofocus id="bug"></pape r-input>
66 <paper-button label="Remove bug link" on-tap="{{ removeBug }}" dismissiv e id="dialogRemoveBug"></paper-button>
67 <paper-button label="OK" on-tap="{{ saveBug }}" affirmative id="dialogOk "></paper-button>
68 </paper-dialog>
69 </template>
70 <script>
71 Polymer({
72 group: null,
73
74 examine: function() {
75 this.fire('ct-examine-failures', this.group);
76 },
77
78 snooze: function() {
79 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
80 },
81
82 unsnooze: function() {
83 this.group.unsnooze();
84 },
85
86 linkBug: function() {
87 this.$.bug.value = this.group.bug;
88 this.$.bugDialog.toggle();
89 },
90
91 saveBug: function() {
92 this.group.setBug(this.$.bug.value);
93 },
94
95 removeBug: function() {
96 this.group.clearBug();
97 },
98 });
99 </script>
100 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698