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

Unified Diff: appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html

Issue 1315693002: SoM: upgrade Polymer from 0.5 to 1.0 Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: get bower_components from polymer_1.0.4 Created 5 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
Index: appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
diff --git a/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html b/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
index e9ac9028b6cd551d4c427a12bb9b9714e93f3690..2c710c360e742f63f36617cd549ef0fe53d0ddd4 100644
--- a/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
+++ b/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
@@ -2,18 +2,15 @@
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
--->
-
-<link rel="import" href="../model/ct-builder-list.html">
+--><html><head><link rel="import" href="../model/ct-builder-list.html">
<link rel="import" href="ct-button.html">
<link rel="import" href="../bower_components/paper-dialog/paper-action-dialog.html">
<link rel="import" href="../bower_components/paper-dialog/paper-dialog-transition.html">
<link rel="import" href="../bower_components/paper-input/paper-input.html">
<link rel="import" href="../bower_components/pushstate-anchor/pushstate-anchor.html">
-<polymer-element name="ct-failure-card-buttons" attributes="group bug">
- <template>
- <style>
+<dom-module id="ct-failure-card-buttons">
+ <style>
:host {
display: flex;
}
@@ -33,70 +30,75 @@ found in the LICENSE file.
padding: 6px 22px;
}
</style>
- <a is="pushstate-anchor" href="{{ group.examineUrl }}" id="examineLink">Examine</a>
- <template if="{{ !group.isSnoozed }}">
- <ct-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></ct-button>
+ <template>
+ <a is="pushstate-anchor" id="examineLink" href$="{{ group.examineUrl }}">Examine</a>
+ <template is="dom-if" if="{{ !group.isSnoozed }}">
+ <ct-button id="snooze" on-tap=" snooze " label="Snooze"></ct-button>
</template>
- <template if="{{ group.isSnoozed }}">
- <ct-button id="snooze" on-tap="{{ unsnooze }}" label="Unsnooze"></ct-button>
+ <template is="dom-if" if="{{ group.isSnoozed }}">
+ <ct-button id="snooze" on-tap=" unsnooze " label="Unsnooze"></ct-button>
</template>
- <ct-button id="link-bug" on-tap="{{ linkBug }}" label="Link Bug"></ct-button>
+ <ct-button id="link-bug" on-tap=" linkBug " label="Link Bug"></ct-button>
<paper-action-dialog heading="Enter bug number" transition="paper-transition-center" id="bugDialog">
- <paper-input label="Bug# or URL" floatingLabel autofocus id="bug"></paper-input>
- <div><a id="fileBugLink" target="_blank" on-click="{{ fileBugClicked }}">
- <template if="{{ !_fileBugClicked }}">
+ <paper-input label="Bug# or URL" always-float-label="" autofocus="" id="bug"></paper-input>
+ <div><a id="fileBugLink" target="_blank" on-click=" fileBugClicked ">
+ <template is="dom-if" if="{{ !_fileBugClicked }}">
File bug
</template>
</a></div>
- <template if="{{ _fileBugClicked }}">
+ <template is="dom-if" if="{{ _fileBugClicked }}">
<div id="bugReminder">
Remember to enter the new bug number above!
</div>
</template>
- <ct-button on-tap="{{ removeBug }}" dismissive role="button" id="dialogRemoveBug" label="Remove bug link"></ct-button>
- <ct-button on-tap="{{ saveBug }}" affirmative role="button" id="dialogOk" label="OK"></ct-button>
+ <ct-button on-tap=" removeBug " dismissive="" role="button" id="dialogRemoveBug" label="Remove bug link"></ct-button>
+ <ct-button on-tap=" saveBug " affirmative="" role="button" id="dialogOk" label="OK"></ct-button>
</paper-action-dialog>
</template>
<script>
Polymer({
- group: null,
- _fileBugClicked: false,
-
- snooze: function() {
+ is: 'ct-failure-card-buttons',
+ properties: {
+ _fileBugClicked: {
+ type: Boolean,
+ value: false
+ },
+ bug: { notify: true },
+ group: {
+ value: null,
+ notify: true
+ }
+ },
+ snooze: function () {
this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
ga('send', 'event', 'snooze', 'click');
},
-
- unsnooze: function() {
+ unsnooze: function () {
this.group.unsnooze();
ga('send', 'event', 'unsnooze', 'click');
},
-
- linkBug: function() {
+ linkBug: function () {
this.$.bug.value = this.group.bug;
this._fileBugClicked = false;
this.$.fileBugLink.href = this.group.data.fileBugLink();
this.$.bugDialog.toggle();
ga('send', 'event', 'linkBug', 'click');
},
-
- saveBug: function() {
+ saveBug: function () {
this.group.setBug(this.$.bug.value);
this.$.bugDialog.toggle();
ga('send', 'event', 'saveBug', 'click');
},
-
- removeBug: function() {
+ removeBug: function () {
this.group.clearBug();
this.$.bugDialog.toggle();
ga('send', 'event', 'removeBug', 'click');
},
-
- fileBugClicked: function() {
+ fileBugClicked: function () {
this._fileBugClicked = true;
ga('send', 'event', 'fileBug', 'click');
- },
+ }
});
</script>
-</polymer-element>
+</dom-module>
« no previous file with comments | « appengine/sheriff_o_matic/ui/ct-embedded-flakiness-dashboard.html ('k') | appengine/sheriff_o_matic/ui/ct-health.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698