[FIX] website: popUndo doesn't exist

The function popUndo doesn't exist in summernote.
But this function exists in our RTE.
The edition of a comment in the website forum uses summernote and
then it crashes when using popUndo.
In the forum, when writing a reply, if you highlighted a text
and I clicked on the link icon to hyperlink the text, neither
the OK button nor the cross button closed the popup.
This commit solved this bug.
In our RTE, the function popUndo is never used then it can be deleted.

opw:644486
This commit is contained in:
Goffin Simon
2015-07-13 10:30:39 +02:00
parent 4a2aee45be
commit 1f79dedfa8
@@ -371,12 +371,10 @@ define(['summernote/summernote'], function () {
linkInfo.range.select();
$editable.data('range', linkInfo.range);
def.resolve(linkInfo);
$editable.data('NoteHistory').popUndo();
$('.note-popover .note-link-popover').show();
});
editor.on("cancel", this, function () {
def.reject();
$editable.data('NoteHistory').popUndo();
});
return def;
};
@@ -856,11 +854,6 @@ define(['summernote/summernote'], function () {
return aUndo.length > pos+1;
};
this.popUndo = function () {
pos--;
aUndo.pop();
};
var last;
this.recordUndo = function ($editable, event, internal_history) {
if (!internal_history) {