aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-03-12 15:29:26 +0100
committerkondou <kondou@ts.unde.re>2014-03-12 15:29:26 +0100
commit1c82b4751ecb69ed1f0973b3cde0a255daaf9747 (patch)
treecc119884b60578201989135dede0fb73622f07bd /apps/files/js/filelist.js
parent3c11dc0006d5a3722b37bed274d8d19be219b6b2 (diff)
parentce790119aea4a1cec2e8d8e8b493fec00b87693f (diff)
downloadnextcloud-server-1c82b4751ecb69ed1f0973b3cde0a255daaf9747.tar.gz
nextcloud-server-1c82b4751ecb69ed1f0973b3cde0a255daaf9747.zip
Merge branch 'master' into hide_remove_image_avatar
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 550c10dba3e..503bf681139 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -137,7 +137,9 @@ window.FileList={
var download_url = null;
if (!param.download_url) {
- download_url = OC.Router.generate('download', { file: $('#dir').val()+'/'+name });
+ download_url = OC.generateUrl(
+ 'apps/files/download{file}',
+ { file: $('#dir').val()+'/'+name });
} else {
download_url = param.download_url;
}
@@ -419,15 +421,12 @@ window.FileList={
len = input.val().length;
}
input.selectRange(0, len);
-
var checkInput = function () {
var filename = input.val();
if (filename !== oldname) {
- if (!Files.isFileNameValid(filename)) {
- // Files.isFileNameValid(filename) throws an exception itself
- } else if($('#dir').val() === '/' && filename === 'Shared') {
- throw t('files','In the home folder \'Shared\' is a reserved filename');
- } else if (FileList.inList(filename)) {
+ // Files.isFileNameValid(filename) throws an exception itself
+ Files.isFileNameValid(filename, FileList.getCurrentDirectory());
+ if (FileList.inList(filename)) {
throw t('files', '{new_name} already exists', {new_name: filename});
}
}
@@ -1156,9 +1155,9 @@ $(document).ready(function() {
// need to initially switch the dir to the one from the hash (IE8)
FileList.changeDirectory(parseCurrentDirFromUrl(), false, true);
}
- }
- FileList.setCurrentDir(parseCurrentDirFromUrl(), false);
+ FileList.setCurrentDir(parseCurrentDirFromUrl(), false);
+ }
FileList.createFileSummary();
});