diff --git a/scripts/filemanager.config.default.json b/scripts/filemanager.config.default.json
index a2fabe71..e8f4e2cc 100644
--- a/scripts/filemanager.config.default.json
+++ b/scripts/filemanager.config.default.json
@@ -5,6 +5,7 @@
"lang": "php",
"theme": "flat-dark",
"defaultViewMode": "grid",
+ "localizeGUI": true,
"showFullPath": false,
"showTitleAttr": false,
"browseOnly": false,
@@ -12,7 +13,7 @@
"showThumbs": true,
"searchBox": true,
"listFiles": true,
- "fileSorting": "default",
+ "fileSorting": "NAME_ASC",
"folderPosition": "bottom",
"quickSelect": false,
"charsLatinOnly": true,
@@ -24,8 +25,8 @@
"fileConnector": false,
"fileRootSizeLimit": false,
"baseUrl": false,
+ "capabilities": ["select", "upload", "download", "rename", "move", "replace", "delete"],
"logger": false,
- "capabilities": ["upload", "select", "download", "rename", "move", "delete", "replace"],
"plugins": []
},
"security": {
@@ -81,13 +82,13 @@
"unallowed_dirs_REGEXP": "/^\\./"
},
"upload": {
+ "multiple": true,
"paramName": "files",
"chunkSize": false,
- "multiple": true,
- "number": 5,
+ "numberOfFiles": 5,
+ "fileSizeLimit": 16000000,
"overwrite": false,
- "imagesOnly": false,
- "fileSizeLimit": 16000000
+ "imagesOnly": false
},
"images": {
"imagesExt": [
diff --git a/scripts/filemanager.js b/scripts/filemanager.js
index 2a861c27..24584ce6 100644
--- a/scripts/filemanager.js
+++ b/scripts/filemanager.js
@@ -163,7 +163,7 @@ var loadedFolderData = {};
// Defines sort params
var chunks = [];
-if(config.options.fileSorting !== 'default') {
+if(config.options.fileSorting) {
chunks = config.options.fileSorting.toLowerCase().split('_');
}
var configSortField = chunks[0] || 'name';
@@ -2299,10 +2299,12 @@ $(function() {
}
// finalize the FileManager UI initialization with localized text
- $uploadButton.append(lg.upload);
- $('#newfolder').append(lg.new_folder);
- $('#grid').attr('title', lg.grid_view);
- $('#list').attr('title', lg.list_view);
+ if(config.options.localizeGUI === true) {
+ $uploadButton.append(lg.upload);
+ $('#newfolder').append(lg.new_folder);
+ $('#grid').attr('title', lg.grid_view);
+ $('#list').attr('title', lg.list_view);
+ }
/** Adding a close button triggering callback function if CKEditorCleanUpFuncNum passed */
if($.urlParam('CKEditorCleanUpFuncNum')) {
@@ -2413,7 +2415,7 @@ $(function() {
currentPath = getCurrentPath(),
templateContainer = loadTemplate('upload-container', {
folder: lg.current_folder + currentPath,
- info: lg.upload_files_number_limit.replace('%s', config.upload.number) + ' ' + lg.upload_file_size_limit + formatBytes(config.upload.fileSizeLimit, true),
+ info: lg.upload_files_number_limit.replace('%s', config.upload.numberOfFiles) + ' ' + lg.upload_file_size_limit + formatBytes(config.upload.fileSizeLimit, true),
lang: lg
});
@@ -2567,11 +2569,11 @@ $(function() {
},
// validation
// maxNumberOfFiles works only for single "add" call when "singleFileUploads" is set to "false"
- maxNumberOfFiles: config.upload.number,
+ maxNumberOfFiles: config.upload.numberOfFiles,
acceptFileTypes: allowedFileTypes,
- maxFileSize: (config.upload.fileSizeLimit != 'auto') ? config.upload.fileSizeLimit : 10000000, // 10 MB
+ maxFileSize: config.upload.fileSizeLimit,
messages: {
- maxNumberOfFiles: lg.upload_files_number_limit.replace("%s", config.upload.number),
+ maxNumberOfFiles: lg.upload_files_number_limit.replace("%s", config.upload.numberOfFiles),
acceptFileTypes: lg.upload_file_type_invalid,
maxFileSize: lg.upload_file_too_big + ' ' + lg.upload_file_size_limit + formatBytes(config.upload.fileSizeLimit, true)
},
@@ -2585,7 +2587,7 @@ $(function() {
var $items = $dropzone.children('.upload-item');
$.each(data.files, function (index, file) {
// skip selected files if total files number exceed "maxNumberOfFiles"
- if($items.length >= config.upload.number) {
+ if($items.length >= config.upload.numberOfFiles) {
return false;
}
// to display in item template
diff --git a/scripts/filemanager.min.js b/scripts/filemanager.min.js
index 30a745c1..5d131fff 100644
--- a/scripts/filemanager.min.js
+++ b/scripts/filemanager.min.js
@@ -1,2 +1,2 @@
-!function(a){function b(b,c){return-1===n.indexOf(c)?!1:"dir"==b["File Type"]&&"replace"==c?!1:"dir"==b["File Type"]&&"download"==c?f.security.allowFolderDownload===!0:"undefined"!=typeof b.Capabilities?a.inArray(c,b.Capabilities)>-1:!0}function c(c){var d={select:{name:x.select,className:"select"},download:{name:x.download,className:"download"},rename:{name:x.rename,className:"rename"},move:{name:x.move,className:"move"},replace:{name:x.replace,className:"replace"},separator1:"-----","delete":{name:x.del,className:"delete"}},e=c.data("itemdata");return b(e,"download")||delete d.download,b(e,"rename")&&f.options.browseOnly!==!0||delete d.rename,b(e,"delete")&&f.options.browseOnly!==!0||delete d["delete"],b(e,"move")&&f.options.browseOnly!==!0||delete d.move,b(e,"select")&&(window.opener||window.tinyMCEPopup||a.urlParam("field_name"))||delete d.select,delete d.replace,d}a.urlParam=function(a){var b=new RegExp("[\\?&]"+a+"=([^]*)").exec(window.location.href);return b?b[1]:0};var d=function(b){var c=null,d=".";if(b="undefined"==typeof b?"user":b,window._FMConfig&&window._FMConfig.pluginPath&&(d=window._FMConfig.pluginPath),"user"==b)if(0!=a.urlParam("config")){var e=d+"/scripts/"+a.urlParam("config");userconfig=a.urlParam("config")}else{var e=d+"/scripts/filemanager.config.json";userconfig="filemanager.config.json"}else var e=d+"/scripts/filemanager.config.default.json";return a.ajax({async:!1,url:e,dataType:"json",cache:!1,success:function(a){c=a}}),"default"==b&&(c.globals={pluginPath:d}),c},e=d("default"),f=d();null!==f&&delete f.version;var f=a.extend({},e,f);if(f.options.logger){(new Date).getTime()}var g,h=new Array,i=function(b){if(b=f.globals.pluginPath+b,-1==a.inArray(b,h)){var c=a("");a("head").append(c),h.push(b)}},j=function(b){if(b=f.globals.pluginPath+b,-1==a.inArray(b,h)){var c=a("