| 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>
|
|
|