]> source.dussan.org Git - nextcloud-server.git/commitdiff
dont show errors when not renaming an album
authorRobin Appelman <icewind@owncloud.com>
Fri, 20 Jan 2012 18:28:57 +0000 (19:28 +0100)
committerRobin Appelman <icewind@owncloud.com>
Fri, 20 Jan 2012 18:28:57 +0000 (19:28 +0100)
apps/gallery/js/album_cover.js

index 0e791689a1a45033cf008262617c95359afc9667..b871c3d89b5550bb7406d0a679a275ec03aa1816 100644 (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"))
   }
 }