add click function for a.lock-document-btn

This commit is contained in:
Uwe Steinmann 2014-06-06 13:59:42 +02:00
parent 9d2674e9e4
commit 65b82832bc

View File

@ -271,6 +271,40 @@ $(document).ready( function() {
);
});
$('body').on('click', 'a.lock-document-btn', function(ev){
ev.preventDefault();
attr_rel = $(ev.currentTarget).attr('rel');
attr_msg = $(ev.currentTarget).attr('msg');
id = attr_rel;
$.get('../op/op.Ajax.php',
{ command: 'tooglelockdocument', id: id },
function(data) {
console.log(data);
if(data.success) {
$("#table-row-document-"+id).html('Loading').load('../op/op.Ajax.php?command=view&view=documentlistrow&id='+id)
noty({
text: attr_msg,
type: 'success',
dismissQueue: true,
layout: 'topRight',
theme: 'defaultTheme',
timeout: 1500,
});
} else {
noty({
text: data.message,
type: 'error',
dismissQueue: true,
layout: 'topRight',
theme: 'defaultTheme',
timeout: 3500,
});
}
},
'json'
);
});
$('a.movefolder').click(function(ev){
ev.preventDefault();
attr_source = $(ev.currentTarget).attr('source');