dont show errors when not renaming an album

This commit is contained in:
Robin Appelman 2012-01-20 19:28:57 +01:00
parent 9dcdf517f5
commit b5ae924031
1 changed files with 3 additions and 2 deletions

View File

@ -88,6 +88,9 @@ function galleryRemove(albumName) {
function galleryRename(name) {
var result = window.prompt(t('gallery',"Input new gallery name"), name);
if(result=='' || result==name){
return;
}
if (result) {
if (Albums.find(result)) {
alert("Album named '" + result + "' already exists");
@ -101,8 +104,6 @@ function galleryRename(name) {
}
});
} else {
alert(t('gallery',"Album name can't be empty"))
}
}