forked from saurabh/orbit4-5
import bugs removed for no data
This commit is contained in:
parent
e558b916fe
commit
eaf5fbbc8e
|
@ -226,7 +226,12 @@
|
|||
}).done(function(data){
|
||||
if(data.success){
|
||||
pagesData = data.pages;
|
||||
importPage(0);
|
||||
if(pagesData.length > 0){
|
||||
importPage(0);
|
||||
}else{
|
||||
$("#import-progress .bar").css('width','100%');
|
||||
$("#import-progress-text").html("No pages to import.");
|
||||
}
|
||||
}
|
||||
}).fail(function(){
|
||||
$("#import-progress-text").html("Importing failed, click on start to try again.");
|
||||
|
@ -294,7 +299,12 @@
|
|||
}).done(function(data){
|
||||
$("#import-progress-text").html("Importing Images...<br/>");
|
||||
gallery_data = data.images;
|
||||
importImagesForAlbums(0);
|
||||
f(gallery_data.length > 0){
|
||||
importImagesForAlbums(0);
|
||||
}else{
|
||||
$("#import-progress .bar").css('width','100%');
|
||||
$("#import-progress-text").html("No images to import.");
|
||||
}
|
||||
}).fail(function(){
|
||||
$("#import-progress-text").html("Importing failed, click on start to try again.");
|
||||
$("#alert-msg").text("There was an unknown error");
|
||||
|
@ -348,9 +358,13 @@
|
|||
if(data.success == true){
|
||||
$("#import-progress-text").html("Now importing Members.<br/>");
|
||||
total_members = parseInt(data.total_users);
|
||||
maximum_member_pages = Math.ceil(total_members / number_of_members_to_import) - 1;
|
||||
importMembers(0);
|
||||
|
||||
if(total_members > 0){
|
||||
maximum_member_pages = Math.ceil(total_members / number_of_members_to_import) - 1;
|
||||
importMembers(0);
|
||||
}else{
|
||||
$("#import-progress .bar").css('width','100%');
|
||||
$("#import-progress-text").html("No users to import.");
|
||||
}
|
||||
}
|
||||
}).fail(function(){
|
||||
$("#import-progress-text").html("Importing failed, click on start to try again.");
|
||||
|
|
Loading…
Reference in New Issue