Skip to content
Snippets Groups Projects
Commit 7855484a authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #119 from greezybacon/issue/resurrect-locking


Connect the redactor editor to the auto lock

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 6742fe6f 0493c5b7
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