modal.show('Delete Album',"Are you sure you want to delete the album '" +albumTitle+"' and all of the photos it contains? This action can't be undone!",buttons);
msg ="<p>Are you sure you want to delete the album '" +albumTitle+"' and all of the photos it contains? This action can't be undone!</p>";
}else{
buttons[0][0]='Delete Albums and Photos';
buttons[1][0]='Keep Albums';
action.title='Delete Albums and Photos';
cancel.title='Keep Albums';
modal.show('Delete Albums',"Are you sure you want to delete all " +albumIDs.length+" selected albums and all of the photos they contain? This action can't be undone!",buttons);
msg ="<p>Are you sure you want to delete all " +albumIDs.length+" selected albums and all of the photos they contain? This action can't be undone!</p>";
if(albumIDs.length===1)modal.show('Set Title',"Enter a new title for this album: <input class='text' type='text' maxlength='30' placeholder='Title' value='"+oldTitle+"'>",buttons);
elsemodal.show('Set Titles',"Enter a title for all "+albumIDs.length+" selected album: <input class='text' type='text' maxlength='30' placeholder='Title' value='"+oldTitle+"'>",buttons);
}elseloadingBar.show('error','Link to short or too long. Please try another one!');
}elseloadingBar.show('error','Link to short or too long. Please try another one!');
}],
['Cancel',function(){}]
];
}
modal.show('Import from Link',"Please enter the direct link to a photo to import it: <input class='text' type='text' placeholder='http://' value='http://'>",buttons);
basicModal.show({
body:"<p>Please enter the direct link to a photo to import it: <input class='text' data-name='link' type='text' placeholder='http://' value='http://'></p>",
buttons:{
action:{
title:'Import',
fn:action
},
cancel:{
title:'Cancel',
fn:basicModal.close
}
}
});
},
server:function(){
varalbumID=album.getID(),
params,
buttons,
files=[],
path;
action;
if(albumID===false)albumID=0;
buttons=[
['Import',function(){
action=function(data){
path=$('.message input.text').val();
varparams,
files=[];
files[0]={
name:path,
supported:true
};
files[0]={
name:data.path,
supported:true
};
upload.show('Importing from server',files,function(){
modal.show('Import from Server',"This action will import all photos, folders and sub-folders which are located in the following directory. The <b>original files will be deleted</b> after the import when possible. <input class='text' type='text' maxlength='100' placeholder='Absolute path to directory' value='"+lychee.location+"uploads/import/'>",buttons);
basicModal.show({
body:"<p>This action will import all photos, folders and sub-folders which are located in the following directory. The <b>original files will be deleted</b> after the import when possible. <input class='text' data-name='path' type='text' maxlength='100' placeholder='Absolute path to directory' value='"+lychee.location+"uploads/import/'></p>",