aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-12-18 16:37:27 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-01-02 16:17:30 +0100
commit740b6623aad0b69e7f16348ad3d4a098a0a9e598 (patch)
tree7eccf8d0a0f5640a318d6308afe4f6a51b68fa01 /apps
parent32c2b0d50eac5669f64bdbf9256939d1ad046304 (diff)
downloadnextcloud-server-740b6623aad0b69e7f16348ad3d4a098a0a9e598.tar.gz
nextcloud-server-740b6623aad0b69e7f16348ad3d4a098a0a9e598.zip
show notification when renaming a file to ''
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 96dd0323d29..cf86cc60979 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -151,6 +151,10 @@ var FileList={
var newname=input.val();
if (Files.containsInvalidCharacters(newname)) {
return false;
+ } else if (newname.length == 0) {
+ $('#notification').text(t('files', "Name cannot be empty."));
+ $('#notification').fadeIn();
+ return false;
}
if (newname != name) {
if (FileList.checkName(name, newname, false)) {