mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
add click function to a.addtoclipboard
It takes that attributes rel and msg from the anchor tag and calls the ajax function 'addtoclipboard'. The returned html replaces the current menu item for the clipboard
This commit is contained in:
parent
a2a85e1e69
commit
a80b332813
|
@ -116,6 +116,30 @@ $(document).ready( function() {
|
|||
return '<i class="icon-folder-close-alt"></i> ' + strarr[1];
|
||||
}
|
||||
});
|
||||
|
||||
$('a.addtoclipboard').click(function(ev){
|
||||
ev.preventDefault();
|
||||
attr_rel = $(ev.currentTarget).attr('rel');
|
||||
attr_msg = $(ev.currentTarget).attr('msg');
|
||||
type = attr_rel.substring(0, 1) == 'F' ? 'folder' : 'document';
|
||||
id = attr_rel.substring(1);
|
||||
$.get('../op/op.Ajax.php',
|
||||
{ command: 'addtoclipboard', type: type, id: id },
|
||||
function(data) {
|
||||
console.log(data);
|
||||
$('#menu-clipboard ul').remove();
|
||||
$(data).appendTo('#menu-clipboard');
|
||||
noty({
|
||||
text: attr_msg,
|
||||
type: 'success',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
function allowDrop(ev) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user