<a href="#" class="edit-start-btn"><%= gettext('edit') %></a> -
<a href="#" class="remove-btn"><%= gettext('remove') %></a>
</div>
+ <div class="deleteDialog">
+ <div><%= gettext('Delete this comment?') %></div>
+ <div>
+ <button class="btn btn-mini deleteDialog-confirm"><%= gettext('Delete') %></button>
+ <button class="btn btn-mini deleteDialog-cancel"><%= gettext('Cancel') %></button>
+ </div>
+ </div>
</div>
this.contentElement = this.dom.find('.content');
this.editElement = this.dom.find('.edit');
+ this.deleteDialogElement = this.dom.find('.deleteDialog');
this.dom.find('.remove-btn').on('click', function() {
+ this.deleteDialogElement.show();
+ }.bind(this));
+
+ this.dom.find('.deleteDialog-confirm').on('click', function() {
this.node.document.transaction(function() {
this.node.detach();
}.bind(this), {
});
}.bind(this));
+ this.dom.find('.deleteDialog-cancel').on('click', function() {
+ this.deleteDialogElement.hide();
+ }.bind(this));
+
this.dom.find('.edit-start-btn').on('click', function() {
this.startEditing();
}.bind(this));