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

Unified Diff: appengine/chromium_rietveld/new_static/components/cr-patchset-title-dialog.html

Issue 873593007: Add the ability to delete patchsets. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix |sending| Created 5 years, 11 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/chromium_rietveld/new_static/components/cr-patchset-title-dialog.html
diff --git a/appengine/chromium_rietveld/new_static/components/cr-patchset-title-dialog.html b/appengine/chromium_rietveld/new_static/components/cr-patchset-title-dialog.html
deleted file mode 100644
index 35ef4b199eefdc2619a19fc41871e9f4201126de..0000000000000000000000000000000000000000
--- a/appengine/chromium_rietveld/new_static/components/cr-patchset-title-dialog.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!-- Copyright (c) 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="cr-butterbar.html">
-<link rel="import" href="cr-button.html">
-<link rel="import" href="cr-dialog.html">
-<link rel="import" href="cr-toolbar.html">
-
-<polymer-element name="cr-patchset-title-dialog" attributes="patchset">
- <template>
- <link rel="stylesheet" href="common.css">
- <link rel="stylesheet" href="forms.css">
-
- <dialog is="cr-dialog" id="dialog" on-cancel="{{ cancel }}">
- <cr-butterbar message="{{ butterbarMessage }}"></cr-butterbar>
-
- <h1>Edit patchset {{ patchset.sequence }}</h1>
-
- <fieldset class="form-fields" disabled?="{{ disabled }}">
- <div class="form-row">
- <label class="form-label" for="title">Title</label>
- <div class="form-field">
- <input type="text" id="title" value="{{ title }}" autocomplete="off">
- </div>
- </div>
- </fieldset>
-
- <cr-toolbar>
- <cr-button primary on-tap="{{ save }}">Save</cr-button>
- <cr-button on-tap="{{ cancel }}">Cancel</cr-button>
- </cr-toolbar>
- </dialog>
- </template>
- <script>
- Polymer("cr-patchset-title-dialog", {
- created: function() {
- this.patchset = null;
- this.commit = true;
- this.butterbarMessage = "";
- this.sending = false;
- this.title = "";
- },
- cancel: function(event) {
- this.close();
- },
- reset: function() {
- this.sending = false;
- this.butterbarMessage = "";
- this.commit = true;
- this.title = this.patchset ? this.patchset.title : "";
- },
- close: function() {
- this.reset();
- this.$.dialog.close();
- },
- save: function() {
- this.sending = true;
- this.butterbarMessage = "Saving...";
- this.patchset.setTitle(this.title)
- .then(this.saveSuccess.bind(this))
- .catch(this.saveFailure.bind(this));
- },
- saveSuccess: function() {
- this.close();
- },
- saveFailure: function(error) {
- // TODO(esprehn): We should show an better error message.
- this.sending = false;
- this.butterbarMessage = "Error: " + error.message;
- },
- showModal: function() {
- if (!this.patchset)
- return;
- this.reset();
- this.$.dialog.showModal();
- },
- });
- </script>
-</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698