fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: gutter comments - delete comment confirmation dialog
[fnpeditor.git]
/
src
/
editor
/
modules
/
documentCanvas
/
canvas
/
comments
/
comments.js
diff --git
a/src/editor/modules/documentCanvas/canvas/comments/comments.js
b/src/editor/modules/documentCanvas/canvas/comments/comments.js
index
692c0b7
..
632616b
100644
(file)
--- a/
src/editor/modules/documentCanvas/canvas/comments/comments.js
+++ b/
src/editor/modules/documentCanvas/canvas/comments/comments.js
@@
-158,8
+158,13
@@
var CommentView = function(commentNode) {
this.contentElement = this.dom.find('.content');
this.editElement = this.dom.find('.edit');
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.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), {
this.node.document.transaction(function() {
this.node.detach();
}.bind(this), {
@@
-169,6
+174,10
@@
var CommentView = function(commentNode) {
});
}.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));
this.dom.find('.edit-start-btn').on('click', function() {
this.startEditing();
}.bind(this));