aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2014-03-31 21:38:54 +0200
committerBart Visscher <bartv@thisnet.nl>2014-03-31 21:38:54 +0200
commit6b061c236dd5730837b567f2c39a19af1617d33c (patch)
tree27de0d46deae2987ea398f2f2aee4e26786c6f48 /apps/files/js/filelist.js
parent8951328a87c16e5ebfe4d3e5c392347db1e54f92 (diff)
parentab696edba685cd6d2a64c2e48907f03197aae53f (diff)
downloadnextcloud-server-6b061c236dd5730837b567f2c39a19af1617d33c.tar.gz
nextcloud-server-6b061c236dd5730837b567f2c39a19af1617d33c.zip
Merge branch 'master' into type-hinting
Conflicts: lib/private/image.php lib/private/l10n.php lib/private/request.php lib/private/share/mailnotifications.php lib/private/template/base.php
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 550c10dba3e..cda4e823a73 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -71,7 +71,7 @@ window.FileList={
});
// filename td
td = $('<td></td>').attr({
- "class": "filename",
+ "class": "filename svg",
"style": 'background-image:url('+iconurl+'); background-size: 32px;'
});
var rand = Math.random().toString(16).slice(2);
@@ -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();
});