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.
7 <link rel="import" href="../model/ct-builder-list.html">
8 <link rel="import" href="ct-button.html">
9 <link rel="import" href="../bower_components/paper-dialog/paper-dialog.html">
10 <link rel="import" href="../bower_components/paper-dialog/paper-dialog-transition.html">
11 <link rel="import" href="../bower_components/paper-input/paper-input.html">
13 <polymer-element name="ct-failure-card-buttons" attributes="group bug">
26 <ct-button id="examine" on-tap="{{ examine }}" label="Examine"></ct-button>
27 <template if="{{ !group.isSnoozed }}">
28 <ct-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></ct-button>
30 <template if="{{ group.isSnoozed }}">
31 <ct-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></ct-button>
33 <ct-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></ct-button>
35 <paper-dialog heading="Enter bug number" transition="paper-transition-center" id="bugDialog">
36 <paper-input label="Bug# or URL" floatingLabel autofocus id="bug"></paper-input>
37 <ct-button label="Remove bug link" on-tap="{{ removeBug }}" dismissive id="dialogRemoveBug"></ct-button>
38 <ct-button label="OK" on-tap="{{ saveBug }}" affirmative id="dialogOk"></ct-button>
46 this.fire('ct-examine-failures', this.group);
50 this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
53 unsnooze: function() {
54 this.group.unsnooze();
58 this.$.bug.value = this.group.bug;
59 this.$.bugDialog.toggle();
63 this.group.setBug(this.$.bug.value);
66 removeBug: function() {
67 this.group.clearBug();