mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
callback can be passed to sendFileToServer()
This commit is contained in:
parent
7a76470c07
commit
679fb1a349
|
@ -545,7 +545,7 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
maxFileSizeMsg = msg;
|
||||
}
|
||||
|
||||
function sendFileToServer(formData,status) {
|
||||
function sendFileToServer(formData,status,callback) {
|
||||
var uploadURL = ajaxurl; //Upload URL
|
||||
var extraData ={}; //Extra Data.
|
||||
var jqXHR=$.ajax({
|
||||
|
@ -584,6 +584,9 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
timeout: 1500,
|
||||
});
|
||||
status.statusbar.after($('<a href="../out/out.EditDocument.php?documentid=' + data.data + '" class="btn btn-mini btn-primary">' + editBtnLabel + '</a>'));
|
||||
if(callback) {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
noty({
|
||||
text: data.message,
|
||||
|
@ -665,7 +668,10 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
statusbar.parent().show();
|
||||
var status = new createStatusbar(statusbar);
|
||||
status.setFileNameSize(files[i].name,files[i].size);
|
||||
sendFileToServer(fd,status);
|
||||
sendFileToServer(fd,status,function(){
|
||||
if(target_id == seeddms_folder)
|
||||
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
|
||||
});
|
||||
} else {
|
||||
noty({
|
||||
text: maxFileSizeMsg + '<br /><em>' + files[i].name + ' (' + files[i].size + ' Bytes)</em>',
|
||||
|
@ -1149,7 +1155,6 @@ $(document).ready(function() { /* {{{ */
|
|||
|
||||
var updateDropFolder = function() {
|
||||
$('#menu-dropfolder > div.ajax').trigger('update', {folderid: seeddms_folder});
|
||||
console.log(seeddms_folder);
|
||||
timeOutId = setTimeout(updateDropFolder, 60000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user