Gitlab CSE Unil

Commit 346841b5 authored by M. Chardon's avatar M. Chardon
Browse files

focus après poubelle

parent 5c6c36d9
...@@ -1071,7 +1071,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1071,7 +1071,7 @@ Y.extend(ANNOTATION, Y.Base, {
get_button_remove: function () { get_button_remove: function () {
var buttontrash = "<button id='" + this.divcartridge + "_buttonremove' style='display:none;margin-left:10px;'><img src='" + M.util.image_url('trash', 'assignfeedback_editpdfplus') + "' /></button>"; var buttontrash = "<button id='" + this.divcartridge + "_buttonremove' style='display:none;margin-left:10px;'><img src='" + M.util.image_url('trash', 'assignfeedback_editpdfplus') + "' /></button>";
var buttontrashdisplay = Y.Node.create(buttontrash); var buttontrashdisplay = Y.Node.create(buttontrash);
buttontrashdisplay.on('click', this.remove, this); buttontrashdisplay.on('click', this.remove_by_trash, this);
return buttontrashdisplay; return buttontrashdisplay;
}, },
get_input_question: function () { get_input_question: function () {
...@@ -1427,6 +1427,10 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1427,6 +1427,10 @@ Y.extend(ANNOTATION, Y.Base, {
} }
} }
}, },
remove_by_trash: function (e) {
this.cancel_edit();
this.remove(e);
},
/** /**
* Delete an annotation * Delete an annotation
* @protected * @protected
......
...@@ -1071,7 +1071,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1071,7 +1071,7 @@ Y.extend(ANNOTATION, Y.Base, {
get_button_remove: function () { get_button_remove: function () {
var buttontrash = "<button id='" + this.divcartridge + "_buttonremove' style='display:none;margin-left:10px;'><img src='" + M.util.image_url('trash', 'assignfeedback_editpdfplus') + "' /></button>"; var buttontrash = "<button id='" + this.divcartridge + "_buttonremove' style='display:none;margin-left:10px;'><img src='" + M.util.image_url('trash', 'assignfeedback_editpdfplus') + "' /></button>";
var buttontrashdisplay = Y.Node.create(buttontrash); var buttontrashdisplay = Y.Node.create(buttontrash);
buttontrashdisplay.on('click', this.remove, this); buttontrashdisplay.on('click', this.remove_by_trash, this);
return buttontrashdisplay; return buttontrashdisplay;
}, },
get_input_question: function () { get_input_question: function () {
...@@ -1426,6 +1426,10 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -1426,6 +1426,10 @@ Y.extend(ANNOTATION, Y.Base, {
} }
} }
}, },
remove_by_trash: function (e) {
this.cancel_edit();
this.remove(e);
},
/** /**
* Delete an annotation * Delete an annotation
* @protected * @protected
......
...@@ -524,7 +524,7 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -524,7 +524,7 @@ Y.extend(ANNOTATION, Y.Base, {
get_button_remove: function () { get_button_remove: function () {
var buttontrash = "<button id='" + this.divcartridge + "_buttonremove' style='display:none;margin-left:10px;'><img src='" + M.util.image_url('trash', 'assignfeedback_editpdfplus') + "' /></button>"; var buttontrash = "<button id='" + this.divcartridge + "_buttonremove' style='display:none;margin-left:10px;'><img src='" + M.util.image_url('trash', 'assignfeedback_editpdfplus') + "' /></button>";
var buttontrashdisplay = Y.Node.create(buttontrash); var buttontrashdisplay = Y.Node.create(buttontrash);
buttontrashdisplay.on('click', this.remove, this); buttontrashdisplay.on('click', this.remove_by_trash, this);
return buttontrashdisplay; return buttontrashdisplay;
}, },
get_input_question: function () { get_input_question: function () {
...@@ -880,6 +880,10 @@ Y.extend(ANNOTATION, Y.Base, { ...@@ -880,6 +880,10 @@ Y.extend(ANNOTATION, Y.Base, {
} }
} }
}, },
remove_by_trash: function (e) {
this.cancel_edit();
this.remove(e);
},
/** /**
* Delete an annotation * Delete an annotation
* @protected * @protected
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment