mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +00:00
more functions to handle clipboard operations
This commit is contained in:
parent
91dcc5cf1d
commit
5f3f52db79
|
@ -208,10 +208,10 @@ $(document).ready( function() {
|
||||||
$.get('../op/op.Ajax.php',
|
$.get('../op/op.Ajax.php',
|
||||||
{ command: 'addtoclipboard', type: type, id: id },
|
{ command: 'addtoclipboard', type: type, id: id },
|
||||||
function(data) {
|
function(data) {
|
||||||
if(data.success) {
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
$('#menu-clipboard ul').remove();
|
if(data.success) {
|
||||||
$(data).appendTo('#menu-clipboard');
|
$("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard')
|
||||||
|
$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard')
|
||||||
noty({
|
noty({
|
||||||
text: attr_msg,
|
text: attr_msg,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
@ -220,6 +220,51 @@ $(document).ready( function() {
|
||||||
theme: 'defaultTheme',
|
theme: 'defaultTheme',
|
||||||
timeout: 1500,
|
timeout: 1500,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
noty({
|
||||||
|
text: data.message,
|
||||||
|
type: 'error',
|
||||||
|
dismissQueue: true,
|
||||||
|
layout: 'topRight',
|
||||||
|
theme: 'defaultTheme',
|
||||||
|
timeout: 3500,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'json'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('body').on('click', 'a.removefromclipboard', 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: 'removefromclipboard', type: type, id: id },
|
||||||
|
function(data) {
|
||||||
|
console.log(data);
|
||||||
|
if(data.success) {
|
||||||
|
$("#main-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=mainclipboard')
|
||||||
|
$("#menu-clipboard").html('Loading').load('../op/op.Ajax.php?command=view&view=menuclipboard')
|
||||||
|
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'
|
'json'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user