Skip to content
Snippets Groups Projects
Commit 0493c5b7 authored by Jared Hancock's avatar Jared Hancock
Browse files

Connect the redactor editor to the autolock

Previously the richtext editor introduced the loss of the collision
avoidance feature.
parent bbbaba3d
Branches
Tags
No related merge requests found
......@@ -64,6 +64,11 @@ RedactorPlugins.draft = {
setupDraftUpdate: function(data) {
this.$box.parent().find('.draft-saved').show();
// Slight workaround. Signal the 'keyup' event normally signaled
// from typing in the <textarea>
if ($.autoLock && this.opts.draft_namespace == 'ticket.response')
$.autoLock.handleEvent();
if (typeof data != 'object')
data = $.parseJSON(data);
......
......@@ -200,6 +200,7 @@ var autoLock = {
type: 'POST',
url: 'ajax.php/tickets/'+autoLock.tid+'/lock/'+autoLock.lockId+'/release',
data: 'delete',
async: false,
cache: false,
success: function(){
......@@ -257,7 +258,8 @@ var autoLock = {
clearTimeout(autoLock.timerId);
autoLock.timerId=setTimeout(function () { autoLock.monitorEvents() },30000);
}
}
};
$.autoLock = autoLock;
/*
UI & form events
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment