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

Unified Diff: appengine/chromium_rietveld/new_static/components/cr-patchset-header.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-header.html
diff --git a/appengine/chromium_rietveld/new_static/components/cr-patchset-header.html b/appengine/chromium_rietveld/new_static/components/cr-patchset-header.html
index a1be5a5ce120b34dff4211805e872c8fc6970237..a94acaba62e0607b809955c4504ee483db16ba0b 100644
--- a/appengine/chromium_rietveld/new_static/components/cr-patchset-header.html
+++ b/appengine/chromium_rietveld/new_static/components/cr-patchset-header.html
@@ -2,7 +2,7 @@
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-patchset-title-dialog.html">
+<link rel="import" href="cr-patchset-edit-dialog.html">
<polymer-element name="cr-patchset-header" attributes="patchset">
<template>
@@ -31,11 +31,6 @@ found in the LICENSE file. -->
<div class="patchset-title">
Patch {{ patchset.sequence }}<template if="{{ patchset.title }}">: {{ patchset.title }}</template>
</div>
- <div class="patchset-actions">
- <template if="{{ userIsOwner }}">
- <cr-action on-tap="{{ showEditTitleDialog }}">Edit</cr-action>
- </template>
- </div>
<div class="patchset-comments">
{{ patchset.messageCount - patchset.draftCount | pluralize("comment") }}
<template if="{{ patchset.draftCount }}">
@@ -44,6 +39,11 @@ found in the LICENSE file. -->
</template>
</div>
<div class="patchset-date">{{ patchset.created | formatDate }}</div>
+ <div class="patchset-actions">
+ <template if="{{ userIsOwner }}">
+ <cr-action on-tap="{{ showEditDialog }}">Edit</cr-action>
+ </template>
+ </div>
</template>
<script>
Polymer("cr-patchset-header", {
@@ -64,15 +64,20 @@ found in the LICENSE file. -->
return "";
return date.relative();
},
- showEditTitleDialog: function(event) {
+ showEditDialog: function(event) {
// Don't collapse the patchset.
event.stopPropagation();
- var dialog = document.createElement("cr-patchset-title-dialog");
+ var dialog = document.createElement("cr-patchset-edit-dialog");
dialog.patchset = this.patchset;
dialog.addEventListener("close", function() {
dialog.remove();
});
- document.body.appendChild(dialog);
+ // TODO(esprehn): This is a hack, we need to be a child of the
+ // issue to dispatch a "refresh-issue" event. Instead we should
+ // stop using that event and use a real data model API that
+ // components interact with like <cr-datasource>.
+ var dialogs = document.querySelector("html /deep/ cr-issue::shadow #dialogs");
+ dialogs.appendChild(dialog);
dialog.showModal();
},
});

Powered by Google App Engine
This is Rietveld 408576698