Commit b905d3c5 authored by Tobias Reich's avatar Tobias Reich
Browse files

Added callback to upload.show function

parent 6c983eb0
...@@ -7,11 +7,13 @@ ...@@ -7,11 +7,13 @@
upload = { upload = {
show: function(title, files) { show: function(title, files, callback) {
upload.close(true); upload.close(true);
$("body").append(build.uploadModal(title, files)); $("body").append(build.uploadModal(title, files));
if (callback!=null&&callback!=undefined) callback();
}, },
setIcon: function(icon) { setIcon: function(icon) {
...@@ -195,9 +197,9 @@ upload = { ...@@ -195,9 +197,9 @@ upload = {
supported: true supported: true
} }
upload.show("Importing URL", files); upload.show("Importing URL", files, function() {
$(".upload_message .rows .row:nth-child(1) .status").html("Importing");
//$(".upload_message .rows .row:nth-child(1) .status").html("Importing"); });
params = "importUrl&url=" + escape(encodeURI(link)) + "&albumID=" + albumID; params = "importUrl&url=" + escape(encodeURI(link)) + "&albumID=" + albumID;
lychee.api(params, function(data) { lychee.api(params, function(data) {
...@@ -296,7 +298,9 @@ upload = { ...@@ -296,7 +298,9 @@ upload = {
// Remove last comma // Remove last comma
links = links.substr(0, links.length-1); links = links.substr(0, links.length-1);
upload.show("Importing from Dropbox", files); upload.show("Importing from Dropbox", files, function() {
$(".upload_message .rows .row .status").html("Importing");
});
params = "importUrl&url=" + escape(links) + "&albumID=" + albumID; params = "importUrl&url=" + escape(links) + "&albumID=" + albumID;
lychee.api(params, function(data) { lychee.api(params, function(data) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment