Update v1.0.6.5
This commit is contained in:
1
vendor/bestmomo/filemanager/public/filemanager/.gitignore
vendored
Normal file
1
vendor/bestmomo/filemanager/public/filemanager/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
scripts/filemanager.config.js
|
||||
@@ -165,11 +165,12 @@ Error Handling
|
||||
--------------
|
||||
Every response should include two keys specific to error handling: Error, and Code. If an error occurs in your script, you may populate these keys with whatever values you feel are most appropriate. If there is no error, Error should remain empty or null, and Code should be empty, null, or zero (0). Do not use zero for any actual errors. The following example would be an appropriate response if the connector uses an external file for configuration (recommended), but that file cannot be found:
|
||||
|
||||
{
|
||||
"Error": "Configuration file missing.",
|
||||
"Code": -1
|
||||
}
|
||||
|
||||
```json
|
||||
{
|
||||
"Error": "Configuration file missing.",
|
||||
"Code": -1
|
||||
}
|
||||
```
|
||||
|
||||
Methods
|
||||
-------
|
||||
@@ -185,23 +186,25 @@ Example Request:
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Path": "/UserFiles/Image/logo.png",
|
||||
"Filename": "logo.png",
|
||||
"File Type": "png",
|
||||
"Preview": "/UserFiles/Image/logo.png",
|
||||
"Protected": 0,
|
||||
"Properties": {
|
||||
"Date Created": null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height": 14,
|
||||
"Width": 14,
|
||||
"Size": 384
|
||||
},
|
||||
"Error": "",
|
||||
"Code": 0
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Path": "/UserFiles/Image/logo.png",
|
||||
"Filename": "logo.png",
|
||||
"File Type": "png",
|
||||
"Preview": "/UserFiles/Image/logo.png",
|
||||
"Protected": 0,
|
||||
"Properties": {
|
||||
"Date Created": null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height": 14,
|
||||
"Width": 14,
|
||||
"Size": 384
|
||||
},
|
||||
"Error": "",
|
||||
"Code": 0
|
||||
}
|
||||
```
|
||||
|
||||
The keys are as follows:
|
||||
|
||||
@@ -245,57 +248,59 @@ Example Request:
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"/UserFiles/Image/logo.png": {
|
||||
"Path": "/UserFiles/Image/logo.png",
|
||||
"Filename": "logo.png",
|
||||
"File Type": "png",
|
||||
"Preview": "/UserFiles/Image/logo.png",
|
||||
"Protected": 0,
|
||||
"Properties": {
|
||||
"Date Created": null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height": 14,
|
||||
"Width": 14,
|
||||
"Size": 384
|
||||
},
|
||||
"Error": "",
|
||||
"Code": 0
|
||||
},
|
||||
"/UserFiles/Image/icon.png": {
|
||||
"Path": "/UserFiles/Image/icon.png",
|
||||
"Filename": "icon.png",
|
||||
"File Type": "png",
|
||||
"Preview": "/UserFiles/Image/icon.png",
|
||||
"Properties": {
|
||||
"Date Created": null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height": 14,
|
||||
"Width": 14,
|
||||
"Size": 384
|
||||
},
|
||||
"Error": "",
|
||||
"Code": 0
|
||||
},
|
||||
"/UserFiles/folder/":{
|
||||
"Path":"/UserFiles/folder/",
|
||||
"Filename":"folder",
|
||||
"File Type":"dir",
|
||||
"Preview":"images\/fileicons\/_Open.png",
|
||||
"Properties": {
|
||||
"Date Created":null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height":null,
|
||||
"Width":null,
|
||||
"Size":null
|
||||
},
|
||||
"Error":"",
|
||||
"Code":0
|
||||
}
|
||||
}
|
||||
```json
|
||||
{
|
||||
"/UserFiles/Image/logo.png": {
|
||||
"Path": "/UserFiles/Image/logo.png",
|
||||
"Filename": "logo.png",
|
||||
"File Type": "png",
|
||||
"Preview": "/UserFiles/Image/logo.png",
|
||||
"Protected": 0,
|
||||
"Properties": {
|
||||
"Date Created": null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height": 14,
|
||||
"Width": 14,
|
||||
"Size": 384
|
||||
},
|
||||
"Error": "",
|
||||
"Code": 0
|
||||
},
|
||||
"/UserFiles/Image/icon.png": {
|
||||
"Path": "/UserFiles/Image/icon.png",
|
||||
"Filename": "icon.png",
|
||||
"File Type": "png",
|
||||
"Preview": "/UserFiles/Image/icon.png",
|
||||
"Properties": {
|
||||
"Date Created": null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height": 14,
|
||||
"Width": 14,
|
||||
"Size": 384
|
||||
},
|
||||
"Error": "",
|
||||
"Code": 0
|
||||
},
|
||||
"/UserFiles/folder/":{
|
||||
"Path":"/UserFiles/folder/",
|
||||
"Filename":"folder",
|
||||
"File Type":"dir",
|
||||
"Preview":"images\/fileicons\/_Open.png",
|
||||
"Properties": {
|
||||
"Date Created":null,
|
||||
"Date Modified": "02/09/2007 14:01:06",
|
||||
"filemtime": 1360237058,
|
||||
"Height":null,
|
||||
"Width":null,
|
||||
"Size":null
|
||||
},
|
||||
"Error":"",
|
||||
"Code":0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Each key in the array is the path to an individual item, and the value is the file object for that item.
|
||||
|
||||
@@ -310,14 +315,16 @@ Example Request:
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Old Path": "/a_folder_renamed/thisisareallylongincrediblylongfilenamefortesting.txt",
|
||||
"Old Name": "thisisareallylongincrediblylongfilenamefortesting.txt",
|
||||
"New Path": "/a_folder_renamed/a_renamed_file",
|
||||
"New Name": "a_renamed_file"
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Old Path": "/a_folder_renamed/thisisareallylongincrediblylongfilenamefortesting.txt",
|
||||
"Old Name": "thisisareallylongincrediblylongfilenamefortesting.txt",
|
||||
"New Path": "/a_folder_renamed/a_renamed_file",
|
||||
"New Name": "a_renamed_file"
|
||||
}
|
||||
```
|
||||
|
||||
move
|
||||
------
|
||||
@@ -329,14 +336,16 @@ Example Request: Move file
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Old Path": "/uploads/images/original/Image/",
|
||||
"Old Name": "logo.png",
|
||||
"New Path": "/uploads/images/moved/",
|
||||
"New Name": "logo.png"
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Old Path": "/uploads/images/original/Image/",
|
||||
"Old Name": "logo.png",
|
||||
"New Path": "/uploads/images/moved/",
|
||||
"New Name": "logo.png"
|
||||
}
|
||||
```
|
||||
|
||||
Example Request: Move directory to not existing directory (will be created)
|
||||
|
||||
@@ -344,15 +353,16 @@ Example Request: Move directory to not existing directory (will be created)
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Old Path": "/uploads/images/original/",
|
||||
"Old Name": "Image",
|
||||
"New Path": "/uploads/new_dir/",
|
||||
"New Name": "Image"
|
||||
}
|
||||
|
||||
```json
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Old Path": "/uploads/images/original/",
|
||||
"Old Name": "Image",
|
||||
"New Path": "/uploads/new_dir/",
|
||||
"New Name": "Image"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -366,38 +376,43 @@ Example Request:
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Path": "/UserFiles/Image/logo.png"
|
||||
}
|
||||
|
||||
```json
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Path": "/UserFiles/Image/logo.png"
|
||||
}
|
||||
```
|
||||
|
||||
add
|
||||
---
|
||||
The `add` method adds the uploaded file to the specified path. Unlike the other methods, this method must return its JSON response wrapped in an HTML <textarea>, so the MIME type of the response is text/html instead of text/plain. The upload form in the File Manager passes the current path as a POST param along with the uploaded file. The response includes the path as well as the name used to store the file. The uploaded file's name should be safe to use as a path component in a URL, so URL-encoded at a minimum.
|
||||
The `add` method adds the uploaded file to the specified path. Unlike the other methods, this method must return its JSON response wrapped in an HTML `<textarea>`, so the MIME type of the response is text/html instead of text/plain. The upload form in the File Manager passes the current path as a POST param along with the uploaded file. The response includes the path as well as the name used to store the file. The uploaded file's name should be safe to use as a path component in a URL, so URL-encoded at a minimum.
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Path": "/UserFiles/Image/",
|
||||
"Name": "new_logo.png",
|
||||
"Error": "No error",
|
||||
"Code": 0
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Path": "/UserFiles/Image/",
|
||||
"Name": "new_logo.png",
|
||||
"Error": "No error",
|
||||
"Code": 0
|
||||
}
|
||||
```
|
||||
|
||||
replace
|
||||
---
|
||||
The `replace` method allow the user to replace a specific file whatever the new filename - at least, the new file should have the same extension the original has. The old file is automatically overwritten. Unlike the other methods, this method must return its JSON response wrapped in an HTML <textarea>, so the MIME type of the response is text/html instead of text/plain. The *dynamic* upload form in the File Manager passes the current file path as a POST param along with the uploaded file. The response includes the path as well as the name used to store the file.
|
||||
The `replace` method allow the user to replace a specific file whatever the new filename - at least, the new file should have the same extension the original has. The old file is automatically overwritten. Unlike the other methods, this method must return its JSON response wrapped in an HTML `<textarea>`, so the MIME type of the response is text/html instead of text/plain. The *dynamic* upload form in the File Manager passes the current file path as a POST param along with the uploaded file. The response includes the path as well as the name used to store the file.
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Path": "/UserFiles/Image/",
|
||||
"Name": "new_logo.png",
|
||||
"Error": "No error",
|
||||
"Code": 0
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Path": "/UserFiles/Image/",
|
||||
"Name": "new_logo.png",
|
||||
"Error": "No error",
|
||||
"Code": 0
|
||||
}
|
||||
```
|
||||
|
||||
editfile
|
||||
--------
|
||||
@@ -406,27 +421,31 @@ The `editfile` method returns the content of a given file (passed as parameter).
|
||||
Example request:
|
||||
|
||||
[path to connector]?mode=editfile&path=/UserFiles/MyFolder/myfile.txt
|
||||
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Path": "/UserFiles/MyFolder/myfile.txt",
|
||||
"Content": "Content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\r\n\Phasellus eu erat lorem.\r\n\r\n\Bye!"
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Path": "/UserFiles/MyFolder/myfile.txt",
|
||||
"Content": "Content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\r\n\Phasellus eu erat lorem.\r\n\r\n\Bye!"
|
||||
}
|
||||
```
|
||||
|
||||
savefile
|
||||
--------
|
||||
The `save` method will overwrite the content of the current file. The edit form in the File Manager passes the mode (as `savefile`), path of the current file and the content as POST parameters.
|
||||
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Path": "/UserFiles/MyFolder/myfile.txt"
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Error": "No error",
|
||||
"Code": 0,
|
||||
"Path": "/UserFiles/MyFolder/myfile.txt"
|
||||
}
|
||||
```
|
||||
|
||||
preview
|
||||
--------
|
||||
@@ -444,15 +463,17 @@ The `addfolder` method creates a new directory on the server within the given pa
|
||||
Example Request:
|
||||
|
||||
[path to connector]?mode=addfolder&path=/UserFiles/&name=new%20logo.png
|
||||
|
||||
|
||||
Example Response:
|
||||
|
||||
{
|
||||
"Parent": "/UserFiles/",
|
||||
"Name": "new_logo.png",
|
||||
"Error": "No error",
|
||||
"Code": 0
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Parent": "/UserFiles/",
|
||||
"Name": "new_logo.png",
|
||||
"Error": "No error",
|
||||
"Code": 0
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
download
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
From version 2.3.0 to 2.4.0
|
||||
---------------------------
|
||||
- handle better language ISO 4 Letters | #428
|
||||
- encode path on requests | #429
|
||||
- catalan translation updated | #440
|
||||
- security fix : Path Traversal Vulnerability | #453
|
||||
|
||||
|
||||
From version 2.2.0 to 2.3.0
|
||||
---------------------------
|
||||
- PDF viewer added | #377 & #319
|
||||
|
||||
@@ -31,7 +31,8 @@ $app['session']->driver()->setId($id);
|
||||
$app['session']->driver()->start();
|
||||
|
||||
// Folder path
|
||||
$folderPath = $app->basePath() . '/public/'.config('filemanager.folder_path');
|
||||
$folderPath = $app->publicPath() . '/'. config('filemanager.folder_path');
|
||||
$folderPath = str_replace('\\', '/', $folderPath);
|
||||
|
||||
// Check if user in authentified
|
||||
if(!$app['auth']->check())
|
||||
|
||||
@@ -410,7 +410,7 @@ class Filemanager {
|
||||
$new_file = $this->getFullPath($path . '/' . $this->get['new']). $suffix;
|
||||
$old_file = $this->getFullPath($this->get['old']) . $suffix;
|
||||
|
||||
if(!$this->has_permission('rename') || !$this->is_valid_path($old_file)) {
|
||||
if(!$this->has_permission('rename') || !$this->is_valid_path($old_file) || !$this->is_valid_path($new_file)) {
|
||||
$this->error("No way.");
|
||||
}
|
||||
|
||||
@@ -446,7 +446,17 @@ class Filemanager {
|
||||
} else {
|
||||
$this->error(sprintf($this->lang('ERROR_RENAMING_FILE'),$filename,$this->get['new']));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For image only - rename thumbnail if original image was successfully renamed
|
||||
if(!is_dir($new_file) && $this->is_image($new_file)) {
|
||||
$new_thumbnail = $this->get_thumbnail_path($new_file);
|
||||
$old_thumbnail = $this->get_thumbnail_path($old_file);
|
||||
if(file_exists($old_thumbnail)) {
|
||||
rename($old_thumbnail, $new_thumbnail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$array = array(
|
||||
'Error'=>"",
|
||||
'Code'=>0,
|
||||
@@ -924,6 +934,9 @@ class Filemanager {
|
||||
public function preview($thumbnail) {
|
||||
|
||||
$current_path = $this->getFullPath();
|
||||
|
||||
if(!$this->is_valid_path($current_path)) $this->error("No way.");
|
||||
|
||||
|
||||
if(isset($this->get['path']) && file_exists($current_path)) {
|
||||
|
||||
@@ -1189,10 +1202,20 @@ private function is_valid_path($path) {
|
||||
|
||||
// return $this->startsWith($givenpath, $rootpath);
|
||||
|
||||
$this->__log('substr path_to_files : ' . substr(realpath($path) . DIRECTORY_SEPARATOR, 0, strlen($this->path_to_files)));
|
||||
$this->__log('path_to_files : ' . realpath($this->path_to_files) . DIRECTORY_SEPARATOR);
|
||||
|
||||
return (substr(realpath($path) . DIRECTORY_SEPARATOR, 0, strlen(realpath($this->path_to_files))) . DIRECTORY_SEPARATOR) == (realpath($this->path_to_files) . DIRECTORY_SEPARATOR);
|
||||
// handle better symlinks & network path
|
||||
$patt = array('/\\\\+/','/\/+/');
|
||||
$repl = array('\\\\','/');
|
||||
|
||||
$substrpath = substr(realpath($path) . DIRECTORY_SEPARATOR, 0, strlen($this->path_to_files)) . DIRECTORY_SEPARATOR;
|
||||
$substrpath = preg_replace($patt,$repl,$substrpath); // removing double slash
|
||||
|
||||
$rpath = realpath($this->path_to_files) . DIRECTORY_SEPARATOR;
|
||||
$rpath = preg_replace($patt,$repl,$rpath); // removing double slash
|
||||
|
||||
$this->__log('substr path : ' . $substrpath);
|
||||
$this->__log('real path : ' . $rpath);
|
||||
|
||||
return ($substrpath == $rpath);
|
||||
|
||||
|
||||
}
|
||||
@@ -1530,4 +1553,4 @@ public function expandPath($path, $clean = false)
|
||||
return implode('/', $fullPath);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
@@ -19,7 +19,7 @@
|
||||
"dateFormat": "d M Y H:i",
|
||||
"serverRoot": false,
|
||||
"fileRoot": "/",
|
||||
"baseUrl": "/filemanager/",
|
||||
"baseUrl": "/",
|
||||
"logger": false,
|
||||
"capabilities": ["select", "download", "rename", "delete", "replace"],
|
||||
"plugins": []
|
||||
|
||||
@@ -158,14 +158,15 @@ $.prompt.setDefaults({
|
||||
// Forces columns to fill the layout vertically.
|
||||
// Called on initial page load and on resize.
|
||||
var setDimensions = function(){
|
||||
var bheight = 53;
|
||||
|
||||
var bheight = 53,
|
||||
$uploader = $('#uploader');
|
||||
|
||||
if($.urlParam('CKEditorCleanUpFuncNum')) bheight +=60;
|
||||
|
||||
var newH = $(window).height() - $('#uploader').height() - bheight;
|
||||
var newH = $(window).height() - $uploader.height() - $uploader.offset().top - bheight;
|
||||
$('#splitter, #filetree, #fileinfo, .vsplitbar').height(newH);
|
||||
var newW = $('#splitter').width() - $('div.vsplitbar').width() - $('#filetree').width();
|
||||
$('#fileinfo').width(newW);
|
||||
$('#fileinfo').width(newW);
|
||||
};
|
||||
|
||||
// Display Min Path
|
||||
@@ -730,7 +731,7 @@ var renameItem = function(data) {
|
||||
}
|
||||
|
||||
var oldPath = data['Path'];
|
||||
var connectString = fileConnector + '?mode=rename&old=' + data['Path'] + '&new=' + givenName + '&config=' + userconfig;
|
||||
var connectString = fileConnector + '?mode=rename&old=' + encodeURIComponent(data['Path']) + '&new=' + encodeURIComponent(givenName) + '&config=' + userconfig;
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
@@ -1221,7 +1222,7 @@ function getContextMenuOptions(elem) {
|
||||
// Binds contextual menus to items in list and grid views.
|
||||
var setMenus = function(action, path) {
|
||||
var d = new Date(); // to prevent IE cache issues
|
||||
$.getJSON(fileConnector + '?mode=getinfo&path=' + path + '&config=' + userconfig + '&time=' + d.getMilliseconds(), function(data){
|
||||
$.getJSON(fileConnector + '?mode=getinfo&path=' + encodeURIComponent(path) + '&config=' + userconfig + '&time=' + d.getMilliseconds(), function(data){
|
||||
if($('#fileinfo').data('view') == 'grid'){
|
||||
var item = $('#fileinfo').find('img[data-path="' + data['Path'] + '"]').parent();
|
||||
} else {
|
||||
|
||||
@@ -9,7 +9,7 @@ if(!a("#"+g).length){var b=a("#itemOptions").clone().attr("id",g);c.hasClass("ca
|
||||
null;"user"==("undefined"===typeof c?"user":c)?0!=a.urlParam("config")?(c="./scripts/"+a.urlParam("config"),userconfig=a.urlParam("config")):(c="./scripts/filemanager.config.js",userconfig="filemanager.config.js"):c="./scripts/filemanager.config.js.default";a.ajax({async:!1,url:c,dataType:"json",cache:!1,success:function(a){g=a}});return g},R=v("default"),f=v();null!==f&&delete f.version;f=a.extend({},R,f);if(f.options.logger)var A=(new Date).getTime();HEAD_included_files=[];loadCSS=function(c){if(-1==
|
||||
a.inArray(c,HEAD_included_files)){var g=a("<link rel='stylesheet' type='text/css' href='"+c+"'>");a("head").append(g);HEAD_included_files.push(c)}};loadJS=function(c){if(-1==a.inArray(c,HEAD_included_files)){var g=a("<script type='text/javascript' src='"+c+"'>");a("head").append(g);HEAD_included_files.push(c)}};smartPath=function(a,g){var b=a.split("/"),b="/"+b[b.length-2]+"/",d=g.indexOf(b);rvalue=-1==d?a+g:a+g.substring(d+b.length);f.options.logger&&console.log("url : "+a+" - path : "+g+" - separator : "+
|
||||
b+" - pos : "+d+" - returned value : "+rvalue);return rvalue};var k=f.options.fileConnector||"connectors/"+f.options.lang+"/filemanager."+f.options.lang,n=f.options.capabilities||"select download rename move delete replace".split(" ");0!=a.urlParam("langCode")&&(I("scripts/languages/"+a.urlParam("langCode")+".js")?f.options.culture=a.urlParam("langCode"):(v=a.urlParam("langCode").substring(0,2),I("scripts/languages/"+v+".js")&&(f.options.culture=v)));var b=[];a.ajax({url:"scripts/languages/"+f.options.culture+
|
||||
".js",async:!1,dataType:"json",success:function(a){b=a}});a.prompt.setDefaults({overlayspeed:"fast",show:"fadeIn",opacity:.4,persistent:!1});var x=function(){var c=53;a.urlParam("CKEditorCleanUpFuncNum")&&(c+=60);c=a(window).height()-a("#uploader").height()-c;a("#splitter, #filetree, #fileinfo, .vsplitbar").height(c);c=a("#splitter").width()-a("div.vsplitbar").width()-a("#filetree").width();a("#fileinfo").width(c)},y=function(a,g){g="undefined"===typeof g?!0:!1;if(0==f.options.showFullPath){if("function"===
|
||||
".js",async:!1,dataType:"json",success:function(a){b=a}});a.prompt.setDefaults({overlayspeed:"fast",show:"fadeIn",opacity:.4,persistent:!1});var x=function(){var c=53,g=a("#uploader");a.urlParam("CKEditorCleanUpFuncNum")&&(c+=60);c=a(window).height()-g.height()-g.offset().top-c;a("#splitter, #filetree, #fileinfo, .vsplitbar").height(c);c=a("#splitter").width()-a("div.vsplitbar").width()-a("#filetree").width();a("#fileinfo").width(c)},y=function(a,g){g="undefined"===typeof g?!0:!1;if(0==f.options.showFullPath){if("function"===
|
||||
typeof displayPathDecorator)return displayPathDecorator(a.replace(fileRoot,"/"));a=a.replace(fileRoot,"/");if(50<a.length&&!0===g){var b=a.split("/");a="/"+b[1]+"/"+b[2]+"/(...)/"+b[b.length-2]+"/"}}return a},B=function(c){"grid"==c?(a("#grid").addClass("ON"),a("#list").removeClass("ON")):(a("#list").addClass("ON"),a("#grid").removeClass("ON"))},C=function(a){var b="",b="\u0160\u0161\u0110\u0111\u017d\u017e\u010c\u010d\u0106\u0107\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u0150\u00d8\u00d9\u00da\u00db\u00dc\u00dd\u00de\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f0\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u0151\u00f8\u00f9\u00fa\u00fb\u00fc\u00fd\u00fd\u00fe\u00ff\u0154\u0155 '/".split(""),
|
||||
e="S s Dj dj Z z C c C c A A A A A A A C E E E E I I I I N O O O O O O O U U U U Y B Ss a a a a a a a c e e e e i i i i o n o o o o o o o u u u u y y b y R r _ _ ".split(" ");a=String(a);for(i=0;i<b.length;i++)a=a.replace(RegExp(b[i],"g"),e[i]);b=a;f.options.chars_only_latin&&(b=b.replace(/[^_a-zA-Z0-9]/g,""));return b=b.replace(/[_]+/g,"_")},S=function(a){filename="";-1!=a.lastIndexOf(".")?(filename=C(a.substr(0,a.lastIndexOf("."))),filename+="."+a.split(".").pop()):filename=C(a);return filename},
|
||||
J=function(a){a=parseFloat(a);for(var g=0,f=[b.bytes,b.kb,b.mb,b.gb];;){if(1024>a)return a=Math.round(100*a)/100,a+f[g];a/=1024;g+=1}},K=function(c){a("#fileinfo").html("<h1>"+c+"</h1>");a("#newfile").attr("disabled","disabled");a("#upload").attr("disabled","disabled");a("#newfolder").attr("disabled","disabled")},L=function(c){c=q(c);return""==c&&1==f.security.allowNoExtension||"DISALLOW_ALL"==f.security.uploadPolicy&&-1!=a.inArray(c,f.security.uploadRestrictions)||"ALLOW_ALL"==f.security.uploadPolicy&&
|
||||
@@ -24,22 +24,22 @@ k+"?mode=download&path="+encodeURIComponent(c.Path)+"&config="+userconfig}).show
|
||||
g,"undefined"!=typeof c.ImageDialog&&(c.ImageDialog.getImageData&&c.ImageDialog.getImageData(),c.ImageDialog.showPreviewImage&&c.ImageDialog.showPreviewImage(g)),tinyMCEPopup.close()):(a.urlParam("field_name")?(parent.document.getElementById(a.urlParam("field_name")).value=g,"undefined"!==typeof parent.tinyMCE&&parent.tinyMCE.activeEditor.windowManager.close(),"undefined"!==typeof parent.$.fn.colorbox&&parent.$.fn.colorbox.close()):a.urlParam("CKEditor")?window.opener?window.opener.CKEDITOR.tools.callFunction(a.urlParam("CKEditorFuncNum"),
|
||||
g):(parent.CKEDITOR.tools.callFunction(a.urlParam("CKEditorFuncNum"),g),parent.CKEDITOR.tools.callFunction(a.urlParam("CKEditorCleanUpFuncNum"))):""!=c.Properties.Width?window.opener.SetUrl(g,c.Properties.Width,c.Properties.Height):window.opener.SetUrl(g),window.opener&&window.close()):a.prompt(b.fck_select_integration)},M=function(c){var g="",e=f.security.allowChangeExtensions?c.Filename:T(c.Filename),e=b.new_filename+' : <input id="rname" name="rname" type="text" value="'+e+'" />',d={};d[b.rename]=
|
||||
!0;d[b.cancel]=!1;a.prompt(e,{callback:function(d,e){if(1!=d)return!1;rname=e.children("#rname").val();if(""!=rname){var h=rname;if(!f.security.allowChangeExtensions){var h=S(rname),l=q(c.Filename);0<l.length&&(h=h+"."+l)}if("/"!=c.Path.charAt(c.Path.length-1)&&!L(h))return h="<p>"+b.INVALID_FILE_TYPE+"</p>","DISALLOW_ALL"==f.security.uploadPolicy&&(h+="<p>"+b.ALLOWED_FILE_TYPE+f.security.uploadRestrictions.join(", ")+".</p>"),"ALLOW_ALL"==f.security.uploadPolicy&&(h+="<p>"+b.DISALLOWED_FILE_TYPE+
|
||||
f.security.uploadRestrictions.join(", ")+".</p>"),a("#filepath").val(""),a.prompt(h),!1;a.ajax({type:"GET",url:k+"?mode=rename&old="+c.Path+"&new="+h+"&config="+userconfig,dataType:"json",async:!1,success:function(d){if(0==d.Code){var e=d["New Path"],t=d["New Name"],h=d["Old Path"],p=a("#filetree").find('a[data-path="'+h+'"]'),l=p.parent().parent().prev("a");p.attr("data-path",e).text(t);0==l.length?u():l.click().click();p=a("#preview h1").attr("title");"undefined"!=typeof p&&p==h&&a("#preview h1").text(t);
|
||||
"grid"==a("#fileinfo").data("view")?(a('#fileinfo img[data-path="'+h+'"]').parent().next("p").text(t),a('#fileinfo img[data-path="'+h+'"]').attr("data-path",e)):(a('#fileinfo td[data-path="'+h+'"]').text(t),a('#fileinfo td[data-path="'+h+'"]').attr("data-path",e));a("#preview h1").html(t);c.Path=e;c.Filename=t;a("#fileinfo").find("button#rename, button#delete, button#download").unbind();Q(c);f.options.showConfirmation&&a.prompt(b.successful_rename)}else a.prompt(d.Error);g=d["New Name"]}})}},buttons:d});
|
||||
return g},O=function(c){a("#fileR").bind("change",function(){a(this).closest("form#toolbar").submit()});a("#toolbar").attr("action",k);a("#toolbar").attr("method","post");a("#toolbar").ajaxForm({target:"#uploadresponse",beforeSubmit:function(g,e,d){g=a("#fileR",e).val();if(""==g)return!1;if(q(g)!=c["File Type"])return a.prompt(b.ERROR_REPLACING_FILE+" ."+q(c.Filename)),!1;a("#replace").attr("disabled",!0);a("#upload span").addClass("loading").text(b.loading_data);if("undefined"!==typeof FileReader&&
|
||||
"auto"!=typeof f.upload.fileSizeLimit&&a("#fileR",e).get(0).files[0].size>1048576*f.upload.fileSizeLimit)return a.prompt("<p>"+b.file_too_big+"</p><p>"+b.file_size_limit+f.upload.fileSizeLimit+" "+b.mb+".</p>"),a("#upload").removeAttr("disabled").find("span").removeClass("loading").text(b.upload),!1},error:function(c,f,d){a("#upload").removeAttr("disabled").find("span").removeClass("loading").text(b.upload);a.prompt(b.ERROR_UPLOADING_FILE)},success:function(c){c=jQuery.parseJSON(a("#uploadresponse").find("textarea").text());
|
||||
0==c.Code?(c=c.Path+"/"+c.Name,F(c),a("#preview").find("img").hide().fadeIn("slow"),a("ul.jqueryFileTree").find('li a[data-path="'+c+'"]').parent().hide().fadeIn("slow"),f.options.showConfirmation&&a.prompt(b.successful_replace)):a.prompt(c.Error);a("#replace").removeAttr("disabled");a("#upload span").removeClass("loading").text(b.upload)}});a("#newfilepath").val(c.Path);a("#fileR").click()},N=function(c){var g="",e=b.move+' : <input id="rname" name="rname" type="text" value="" />',e=e+('<div class="prompt-info">'+
|
||||
b.help_move+"</div>"),d={};d[b.move]=!0;d[b.cancel]=!1;a.prompt(e,{callback:function(d,e){if(1!=d)return!1;rname=e.children("#rname").val();if(""!=rname){var h=rname,h=k+"?mode=move&old="+encodeURIComponent(c.Path)+"&new="+encodeURIComponent(h)+"&root="+encodeURIComponent(fileRoot)+"&config="+userconfig;a.ajax({type:"GET",url:h,dataType:"json",async:!1,success:function(d){if(0==d.Code){var c=d["New Path"],e=d["New Name"];fullexpandedFolder=c;u();m(c);f.options.showConfirmation&&a.prompt(b.successful_moved)}else a.prompt(d.Error);
|
||||
g=c+e}})}},buttons:d});return g},P=function(c){var g=!1,e=b.confirmation_delete,d={};d[b.yes]=!0;d[b.no]=!1;a.prompt(e,{callback:function(d,e){if(1!=d)return!1;var h=new Date,h=k+"?mode=delete&path="+encodeURIComponent(c.Path)+"&time="+h.getMilliseconds()+"&config="+userconfig,l=c.Path.split("/").reverse().slice(1).reverse().join("/")+"/";a.ajax({type:"GET",url:h,dataType:"json",async:!1,success:function(d){0==d.Code?(aa(d.Path),d=d.Path.substring(0,d.Path.length-1),d=d.substr(0,d.lastIndexOf("/")+
|
||||
1),a("#uploader h1").text(b.current_folder+y(d)).attr("title",y(d,!1)).attr("data-path",d),g=!0,f.options.showConfirmation&&a.prompt(b.successful_delete),a("#filetree").find('a[data-path="'+l+'/"]').click().click()):(g=!1,a.prompt(d.Error))}})},buttons:d});return g},ba=function(c){isEdited=!1;a("#fileinfo").find("div#tools").append(' <a id="edit-file" href="#" title="'+b.edit+'"><span>'+b.edit+"</span></a>");a("#edit-file").click(function(){a(this).hide();var g=new Date,g=k+"?mode=editfile&path="+
|
||||
encodeURIComponent(c.Path)+"&config="+userconfig+"&time="+g.getMilliseconds();a.ajax({type:"GET",url:g,dataType:"json",async:!1,success:function(e){0==e.Code?(e='<form id="edit-form">'+('<textarea id="edit-content" name="content">'+e.Content+"</textarea>"),e=e+'<input type="hidden" name="mode" value="savefile" />'+('<input type="hidden" name="path" value="'+c.Path+'" />'),e+='<button id="edit-cancel" class="edition" type="button">'+b.quit_editor+"</button>",e+='<button id="edit-save" class="edition" type="button">'+
|
||||
b.save+"</button>",e+="</form>",a("#preview").find("img").hide(),a("#preview").prepend(e).hide().fadeIn(),a("#edit-cancel").click(function(){a("#preview").find("form#edit-form").hide();a("#preview").find("img").fadeIn();a("#edit-file").show()}),a("#edit-save").click(function(){var d=codeMirrorEditor.getValue();a("textarea#edit-content").val(d);d=a("#edit-form").serializeArray();a.ajax({type:"POST",url:k+"?config="+userconfig,dataType:"json",data:d,async:!1,success:function(d){0==d.Code?(isEdited=
|
||||
!0,a.prompt(b.successful_edit)):(isEdited=!1,a.prompt(d.Error))}})}),codeMirrorEditor=instantiateCodeMirror(q(c.Path),f)):(isEdited=!1,a.prompt(e.Error),a(this).show())}})});return isEdited},aa=function(b){a("#filetree").find('a[data-path="'+b+'"]').parent().fadeOut("slow",function(){a(this).remove()});if(a("#uploader h1").attr("data-path")==b){var f=b.split("/").slice(0,length-2).join("/")+"/";m(f)}"grid"==a("#fileinfo").data("view")?a('#contents img[data-path="'+b+'"]').parent().parent().fadeOut("slow",
|
||||
function(){a(this).remove()}):a("table#contents").find('td[data-path="'+b+'"]').parent().fadeOut("slow",function(){a(this).remove()});a("#preview").length&&m(b.substr(0,b.lastIndexOf("/")+1))},Y=function(c,g){var e='<li class="directory collapsed"><a data-path="'+c+g+'/" href="#">'+g+'</a><ul class="jqueryFileTree" style="display: block;"></ul></li>',d=a("#filetree").find('a[data-path="'+c+'"]');c!=fileRoot?d.next("ul").prepend(e).prev("a").click().click():(a("#filetree ul.jqueryFileTree").prepend(e),
|
||||
a("#filetree").find('li a[data-path="'+c+g+'/"]').attr("class","cap_rename cap_delete").click(function(){m(c+g+"/")}).each(function(){a(this).contextMenu({menu:w(a(this))},function(d,b,c){b=a(b).attr("data-path");z(d,b)})}));f.options.showConfirmation&&a.prompt(b.successful_added_folder)},H=function(b){b.lastIndexOf("/")==b.length-1?(m(b),a("#filetree").find('a[data-path="'+b+'"]').click()):F(b)},z=function(b,f){var e=new Date;a.getJSON(k+"?mode=getinfo&path="+f+"&config="+userconfig+"&time="+e.getMilliseconds(),
|
||||
function(d){"grid"==a("#fileinfo").data("view")?a("#fileinfo").find('img[data-path="'+d.Path+'"]').parent():a("#fileinfo").find('td[data-path="'+d.Path+'"]').parent();switch(b){case "select":E(d);break;case "download":window.location=k+"?mode=download&path="+d.Path+"&config="+userconfig+"&time="+e.getMilliseconds();break;case "rename":M(d);break;case "replace":O(d);break;case "move":N(d);break;case "delete":P(d)}})},F=function(c){a(".contextMenu").hide();var g=c.substr(0,c.lastIndexOf("/")+1);D(g);
|
||||
var e;e='<div id="preview"><img /><div id="main-title"><h1></h1><div id="tools"></div></div><dl></dl></div><form id="toolbar">'+('<button id="parentfolder">'+b.parentfolder+"</button>");-1!=a.inArray("select",n)&&(a.urlParam("CKEditor")||window.opener||window.tinyMCEPopup||a.urlParam("field_name"))&&(e+='<button id="select" name="select" type="button" value="Select">'+b.select+"</button>");-1!=a.inArray("download",n)&&(e+='<button id="download" name="download" type="button" value="Download">'+b.download+
|
||||
"</button>");-1!=a.inArray("rename",n)&&1!=f.options.browseOnly&&(e+='<button id="rename" name="rename" type="button" value="Rename">'+b.rename+"</button>");-1!=a.inArray("move",n)&&1!=f.options.browseOnly&&(e+='<button id="move" name="move" type="button" value="Move">'+b.move+"</button>");-1!=a.inArray("delete",n)&&1!=f.options.browseOnly&&(e+='<button id="delete" name="delete" type="button" value="Delete">'+b.del+"</button>");-1!=a.inArray("replace",n)&&1!=f.options.browseOnly&&(e+='<button id="replace" name="replace" type="button" value="Replace">'+
|
||||
f.security.uploadRestrictions.join(", ")+".</p>"),a("#filepath").val(""),a.prompt(h),!1;h=k+"?mode=rename&old="+encodeURIComponent(c.Path)+"&new="+encodeURIComponent(h)+"&config="+userconfig;a.ajax({type:"GET",url:h,dataType:"json",async:!1,success:function(d){if(0==d.Code){var e=d["New Path"],t=d["New Name"],h=d["Old Path"],p=a("#filetree").find('a[data-path="'+h+'"]'),l=p.parent().parent().prev("a");p.attr("data-path",e).text(t);0==l.length?u():l.click().click();p=a("#preview h1").attr("title");
|
||||
"undefined"!=typeof p&&p==h&&a("#preview h1").text(t);"grid"==a("#fileinfo").data("view")?(a('#fileinfo img[data-path="'+h+'"]').parent().next("p").text(t),a('#fileinfo img[data-path="'+h+'"]').attr("data-path",e)):(a('#fileinfo td[data-path="'+h+'"]').text(t),a('#fileinfo td[data-path="'+h+'"]').attr("data-path",e));a("#preview h1").html(t);c.Path=e;c.Filename=t;a("#fileinfo").find("button#rename, button#delete, button#download").unbind();Q(c);f.options.showConfirmation&&a.prompt(b.successful_rename)}else a.prompt(d.Error);
|
||||
g=d["New Name"]}})}},buttons:d});return g},O=function(c){a("#fileR").bind("change",function(){a(this).closest("form#toolbar").submit()});a("#toolbar").attr("action",k);a("#toolbar").attr("method","post");a("#toolbar").ajaxForm({target:"#uploadresponse",beforeSubmit:function(g,e,d){g=a("#fileR",e).val();if(""==g)return!1;if(q(g)!=c["File Type"])return a.prompt(b.ERROR_REPLACING_FILE+" ."+q(c.Filename)),!1;a("#replace").attr("disabled",!0);a("#upload span").addClass("loading").text(b.loading_data);
|
||||
if("undefined"!==typeof FileReader&&"auto"!=typeof f.upload.fileSizeLimit&&a("#fileR",e).get(0).files[0].size>1048576*f.upload.fileSizeLimit)return a.prompt("<p>"+b.file_too_big+"</p><p>"+b.file_size_limit+f.upload.fileSizeLimit+" "+b.mb+".</p>"),a("#upload").removeAttr("disabled").find("span").removeClass("loading").text(b.upload),!1},error:function(c,f,d){a("#upload").removeAttr("disabled").find("span").removeClass("loading").text(b.upload);a.prompt(b.ERROR_UPLOADING_FILE)},success:function(c){c=
|
||||
jQuery.parseJSON(a("#uploadresponse").find("textarea").text());0==c.Code?(c=c.Path+"/"+c.Name,F(c),a("#preview").find("img").hide().fadeIn("slow"),a("ul.jqueryFileTree").find('li a[data-path="'+c+'"]').parent().hide().fadeIn("slow"),f.options.showConfirmation&&a.prompt(b.successful_replace)):a.prompt(c.Error);a("#replace").removeAttr("disabled");a("#upload span").removeClass("loading").text(b.upload)}});a("#newfilepath").val(c.Path);a("#fileR").click()},N=function(c){var g="",e=b.move+' : <input id="rname" name="rname" type="text" value="" />',
|
||||
e=e+('<div class="prompt-info">'+b.help_move+"</div>"),d={};d[b.move]=!0;d[b.cancel]=!1;a.prompt(e,{callback:function(d,e){if(1!=d)return!1;rname=e.children("#rname").val();if(""!=rname){var h=rname,h=k+"?mode=move&old="+encodeURIComponent(c.Path)+"&new="+encodeURIComponent(h)+"&root="+encodeURIComponent(fileRoot)+"&config="+userconfig;a.ajax({type:"GET",url:h,dataType:"json",async:!1,success:function(d){if(0==d.Code){var c=d["New Path"],e=d["New Name"];fullexpandedFolder=c;u();m(c);f.options.showConfirmation&&
|
||||
a.prompt(b.successful_moved)}else a.prompt(d.Error);g=c+e}})}},buttons:d});return g},P=function(c){var g=!1,e=b.confirmation_delete,d={};d[b.yes]=!0;d[b.no]=!1;a.prompt(e,{callback:function(d,e){if(1!=d)return!1;var h=new Date,h=k+"?mode=delete&path="+encodeURIComponent(c.Path)+"&time="+h.getMilliseconds()+"&config="+userconfig,l=c.Path.split("/").reverse().slice(1).reverse().join("/")+"/";a.ajax({type:"GET",url:h,dataType:"json",async:!1,success:function(d){0==d.Code?(aa(d.Path),d=d.Path.substring(0,
|
||||
d.Path.length-1),d=d.substr(0,d.lastIndexOf("/")+1),a("#uploader h1").text(b.current_folder+y(d)).attr("title",y(d,!1)).attr("data-path",d),g=!0,f.options.showConfirmation&&a.prompt(b.successful_delete),a("#filetree").find('a[data-path="'+l+'/"]').click().click()):(g=!1,a.prompt(d.Error))}})},buttons:d});return g},ba=function(c){isEdited=!1;a("#fileinfo").find("div#tools").append(' <a id="edit-file" href="#" title="'+b.edit+'"><span>'+b.edit+"</span></a>");a("#edit-file").click(function(){a(this).hide();
|
||||
var g=new Date,g=k+"?mode=editfile&path="+encodeURIComponent(c.Path)+"&config="+userconfig+"&time="+g.getMilliseconds();a.ajax({type:"GET",url:g,dataType:"json",async:!1,success:function(e){0==e.Code?(e='<form id="edit-form">'+('<textarea id="edit-content" name="content">'+e.Content+"</textarea>"),e=e+'<input type="hidden" name="mode" value="savefile" />'+('<input type="hidden" name="path" value="'+c.Path+'" />'),e+='<button id="edit-cancel" class="edition" type="button">'+b.quit_editor+"</button>",
|
||||
e+='<button id="edit-save" class="edition" type="button">'+b.save+"</button>",e+="</form>",a("#preview").find("img").hide(),a("#preview").prepend(e).hide().fadeIn(),a("#edit-cancel").click(function(){a("#preview").find("form#edit-form").hide();a("#preview").find("img").fadeIn();a("#edit-file").show()}),a("#edit-save").click(function(){var d=codeMirrorEditor.getValue();a("textarea#edit-content").val(d);d=a("#edit-form").serializeArray();a.ajax({type:"POST",url:k+"?config="+userconfig,dataType:"json",
|
||||
data:d,async:!1,success:function(d){0==d.Code?(isEdited=!0,a.prompt(b.successful_edit)):(isEdited=!1,a.prompt(d.Error))}})}),codeMirrorEditor=instantiateCodeMirror(q(c.Path),f)):(isEdited=!1,a.prompt(e.Error),a(this).show())}})});return isEdited},aa=function(b){a("#filetree").find('a[data-path="'+b+'"]').parent().fadeOut("slow",function(){a(this).remove()});if(a("#uploader h1").attr("data-path")==b){var f=b.split("/").slice(0,length-2).join("/")+"/";m(f)}"grid"==a("#fileinfo").data("view")?a('#contents img[data-path="'+
|
||||
b+'"]').parent().parent().fadeOut("slow",function(){a(this).remove()}):a("table#contents").find('td[data-path="'+b+'"]').parent().fadeOut("slow",function(){a(this).remove()});a("#preview").length&&m(b.substr(0,b.lastIndexOf("/")+1))},Y=function(c,g){var e='<li class="directory collapsed"><a data-path="'+c+g+'/" href="#">'+g+'</a><ul class="jqueryFileTree" style="display: block;"></ul></li>',d=a("#filetree").find('a[data-path="'+c+'"]');c!=fileRoot?d.next("ul").prepend(e).prev("a").click().click():
|
||||
(a("#filetree ul.jqueryFileTree").prepend(e),a("#filetree").find('li a[data-path="'+c+g+'/"]').attr("class","cap_rename cap_delete").click(function(){m(c+g+"/")}).each(function(){a(this).contextMenu({menu:w(a(this))},function(d,b,c){b=a(b).attr("data-path");z(d,b)})}));f.options.showConfirmation&&a.prompt(b.successful_added_folder)},H=function(b){b.lastIndexOf("/")==b.length-1?(m(b),a("#filetree").find('a[data-path="'+b+'"]').click()):F(b)},z=function(b,f){var e=new Date;a.getJSON(k+"?mode=getinfo&path="+
|
||||
encodeURIComponent(f)+"&config="+userconfig+"&time="+e.getMilliseconds(),function(d){"grid"==a("#fileinfo").data("view")?a("#fileinfo").find('img[data-path="'+d.Path+'"]').parent():a("#fileinfo").find('td[data-path="'+d.Path+'"]').parent();switch(b){case "select":E(d);break;case "download":window.location=k+"?mode=download&path="+d.Path+"&config="+userconfig+"&time="+e.getMilliseconds();break;case "rename":M(d);break;case "replace":O(d);break;case "move":N(d);break;case "delete":P(d)}})},F=function(c){a(".contextMenu").hide();
|
||||
var g=c.substr(0,c.lastIndexOf("/")+1);D(g);var e;e='<div id="preview"><img /><div id="main-title"><h1></h1><div id="tools"></div></div><dl></dl></div><form id="toolbar">'+('<button id="parentfolder">'+b.parentfolder+"</button>");-1!=a.inArray("select",n)&&(a.urlParam("CKEditor")||window.opener||window.tinyMCEPopup||a.urlParam("field_name"))&&(e+='<button id="select" name="select" type="button" value="Select">'+b.select+"</button>");-1!=a.inArray("download",n)&&(e+='<button id="download" name="download" type="button" value="Download">'+
|
||||
b.download+"</button>");-1!=a.inArray("rename",n)&&1!=f.options.browseOnly&&(e+='<button id="rename" name="rename" type="button" value="Rename">'+b.rename+"</button>");-1!=a.inArray("move",n)&&1!=f.options.browseOnly&&(e+='<button id="move" name="move" type="button" value="Move">'+b.move+"</button>");-1!=a.inArray("delete",n)&&1!=f.options.browseOnly&&(e+='<button id="delete" name="delete" type="button" value="Delete">'+b.del+"</button>");-1!=a.inArray("replace",n)&&1!=f.options.browseOnly&&(e+='<button id="replace" name="replace" type="button" value="Replace">'+
|
||||
b.replace+"</button>",e+='<div class="hidden-file-input"><input id="fileR" name="fileR" type="file" /></div>',e+='<input id="mode" name="mode" type="hidden" value="replace" /> ',e+='<input id="newfilepath" name="newfilepath" type="hidden" />');e+="</form>";0<a("#fileinfo .mCSB_container").length?a("#fileinfo .mCSB_container").html(e):a("#fileinfo").html(e);a("#parentfolder").click(function(){m(g)});e=new Date;a.getJSON(k+"?mode=getinfo&path="+encodeURIComponent(c)+"&config="+userconfig+"&time="+e.getMilliseconds(),
|
||||
function(d){if(0==d.Code){a("#fileinfo").find("h1").text(d.Filename).attr("title",c);a("#fileinfo").find("img").attr("src",d.Preview);var e;e=-1!=a.inArray(q(d.Filename),f.videos.videosExt)?!0:!1;e&&1==f.videos.showVideoPlayer&&U(d);e=-1!=a.inArray(q(d.Filename),f.audios.audiosExt)?!0:!1;e&&1==f.audios.showAudioPlayer&&V(d);e=-1!=a.inArray(q(d.Filename),f.pdfs.pdfsExt)?!0:!1;e&&1==f.pdfs.showPdfReader&&W(d);e=-1!=a.inArray(q(d.Filename),f.edit.editExt)?!0:!1;e&&1==f.edit.enabled&&0==d.Protected&&
|
||||
ba(d);e=new Date;var g=!1!==f.options.baseUrl?smartPath(baseUrl,d.Path.replace(fileRoot,"")):d.Path;0==d.Protected&&(a("#fileinfo").find("div#tools").append(' <a id="copy-button" data-clipboard-text="'+g+'" title="'+b.copy_to_clipboard+'" href="#"><span>'+b.copy_to_clipboard+"</span></a>"),loadJS("./scripts/zeroclipboard/copy.js?d"+e.getMilliseconds()),a("#copy-button").click(function(){a("#fileinfo").find("div#tools").append('<span id="copied">'+b.copied+"</span>");a("#copied").delay(500).fadeOut(1E3,
|
||||
|
||||
91
vendor/bestmomo/filemanager/public/filemanager/scripts/languages/ar.js
vendored
Normal file
91
vendor/bestmomo/filemanager/public/filemanager/scripts/languages/ar.js
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"ALLOWED_FILE_TYPE": "فقط الملفات الاتية هي المسموحة : ",
|
||||
"AUTHORIZATION_REQUIRED": "غير مصرح لك باستخدام مدير الملفات.",
|
||||
"DIRECTORY_ALREADY_EXISTS": "المجلد '%s' موجود مسبقا.",
|
||||
"DIRECTORY_NOT_EXIST": "المجلد %s غير موجود.",
|
||||
"DISALLOWED_FILE_TYPE": "الملفات الاتية غير مسموحة : ",
|
||||
"ERROR_CREATING_ZIP": "خطا في انشاء الملف المضغوط",
|
||||
"ERROR_OPENING_FILE": "خطا في فتح الملف.",
|
||||
"ERROR_RENAMING_DIRECTORY": " حدث خطا اثناء تعديل اسم المجلد من %s الى %s.",
|
||||
"ERROR_RENAMING_FILE": " حدث خطا اثناء تعديل اسم الملف من %s الى %s.",
|
||||
"ERROR_REPLACING_FILE": "يرجى تقديم ملف يحمل الاختصار الاتي :",
|
||||
"ERROR_SAVING_FILE": "خطاء اثناء حفظ الملف.",
|
||||
"ERROR_UPLOADING_FILE": "خطاء اثناء رفع الملف.",
|
||||
"ERROR_WRITING_PERM": "لم تقم بكتابة التصاريح على هذا الملف.",
|
||||
"FILE_ALREADY_EXISTS": "الملف '%s' موجود مسبقاً.",
|
||||
"FILE_DOES_NOT_EXIST": "الملف %s غير موجود.",
|
||||
"INVALID_ACTION": "عملية غير صحيحة.",
|
||||
"INVALID_DIRECTORY_OR_FILE": "ملف اومجلد غير صحيح.",
|
||||
"INVALID_FILE_TYPE": "نوع الملف غير مسموح به.",
|
||||
"INVALID_FILE_UPLOAD": "الملف المحمل خطىء.",
|
||||
"INVALID_VAR": "متغير خطىء %s.",
|
||||
"LANGUAGE_FILE_NOT_FOUND": "ملف اللغة غير موجود.",
|
||||
"MODE_ERROR": "حالة خطئة.",
|
||||
"NOT_ALLOWED": "غير مصرح لك باتمام العملية",
|
||||
"NOT_ALLOWED_SYSTEM": "صلاحيات النظام لا تجيز لك اتمام هذه العملية",
|
||||
"UNABLE_TO_CREATE_DIRECTORY": "لم اتمكن من انشاء المجلد %s.",
|
||||
"UNABLE_TO_OPEN_DIRECTORY": "غير ممكن فتح المجلد %s.",
|
||||
"UPLOAD_FILES_SMALLER_THAN": "يرجى فقط رفع ملفات مشابهة ل %s.",
|
||||
"UPLOAD_IMAGES_ONLY": "يرجى رفع صور فقط, nباقي الملفات غير مسموحة",
|
||||
"UPLOAD_IMAGES_TYPE_JPEG_GIF_PNG": "يرجى رفع ملفات من نوع JPEG, GIF او PNG.",
|
||||
"browse": "تصفح...",
|
||||
"bytes": " بايتس",
|
||||
"cancel": "الغاء",
|
||||
"close": "اقفال",
|
||||
"confirmation_delete": "هل انت متاكد من انك تود خذف هذا الملف ؟",
|
||||
"copied": "تم نسخ الرابط !",
|
||||
"copy_to_clipboard": "تم نسخ الرابط الى الكليببورد",
|
||||
"could_not_retrieve_folder": "لا يمكن احذار محتويات المجلد.",
|
||||
"create_folder": "انشاء مجلد",
|
||||
"created": "تم الانشاء",
|
||||
"current_folder": "المجلد الحالي: ",
|
||||
"default_foldername": "مجلداتي",
|
||||
"del": "حذف",
|
||||
"dimensions": "تجاهل",
|
||||
"download": "تنزيل",
|
||||
"dz_dictDefaultMessage": "ضع الملفات هنا للتحميل",
|
||||
"dz_dictFallbackMessage": "متصفحك لا يدعم خاصية تحميل الملفات عن طريق الدراج دروب",
|
||||
"dz_dictInvalidFileType": "لا يمكنك تحميل ملفات من هذا النوع.",
|
||||
"dz_dictMaxFilesExceeded": "يمكنك فقط تحميل %s من الملفات",
|
||||
"edit": "تحرير الملف",
|
||||
"fck_select_integration": "الفنكشن المحددة تعمل فقط مع FCKEditor.",
|
||||
"file_size_limit": "الحجم المسموح (لكل ملف) هو ",
|
||||
"file_too_big": "الملف اكبر من المسموح.",
|
||||
"gb": "جيجابيت",
|
||||
"grid_view": "انتقال لمشاهدة مصغرات.",
|
||||
"help_move": "استعمال '../' ممنوع. يمكنك الوصول للمجلد الجذر عن طريق'/'.",
|
||||
"items": "ملفات",
|
||||
"kb": "كيلوبيت",
|
||||
"list_view": "انتقال لوضع مشاهدة القوائم.",
|
||||
"loading_data": "جاري نقل البيانات ...",
|
||||
"mb": "ميجا بايت",
|
||||
"modified": "معدل",
|
||||
"move": "انقل الى ...",
|
||||
"name": "الاسم",
|
||||
"new_filename": "اختر اسم جديد للملف",
|
||||
"new_folder": "مجلد جديد",
|
||||
"no": "لا",
|
||||
"no_foldername": "لم تقم بتزود اسم المجلد.",
|
||||
"parentfolder": "المجلد الام",
|
||||
"prompt_foldername": "اكتب اسم المجلد الجديد",
|
||||
"quit_editor": "اخرج من المحرر",
|
||||
"rename": "اعادة تسمية",
|
||||
"replace": "استبدال الملف",
|
||||
"save": "حفظ",
|
||||
"search": "بحث",
|
||||
"search_reset": "اعادة",
|
||||
"select": "اختيار",
|
||||
"select_from_left": "اختار ملفات من اليسار.",
|
||||
"size": "الحجم",
|
||||
"successful_added_file": "تم اضافة الملف/ الملفات الجديدة بنجاح.",
|
||||
"successful_added_folder": "تم اضافة المجلد الجديد بنجاح.",
|
||||
"successful_delete": "تم الحذف.",
|
||||
"successful_edit": "تم التحديث بنجاح.",
|
||||
"successful_moved": "تم النقل بنجاح ",
|
||||
"successful_rename": "تمت اعادة التسمية بنجاح .",
|
||||
"successful_replace": "تم استبدال الملف بنجاح.",
|
||||
"support_fm": "مدير الملفات برنامج مجاني يرجى دعمه !",
|
||||
"upload": "رفع",
|
||||
"version": "الاصدار",
|
||||
"yes": "نعم"
|
||||
}
|
||||
@@ -1,28 +1,28 @@
|
||||
{
|
||||
"ALLOWED_FILE_TYPE": "Only following files are allowed : ",
|
||||
"ALLOWED_FILE_TYPE": "Només els següents arxius són permesos : ",
|
||||
"AUTHORIZATION_REQUIRED": "No estàs autoritzat a fer ser servir l'administrador d'arxius.",
|
||||
"DIRECTORY_ALREADY_EXISTS": "La carpeta '%s' ja existeix.",
|
||||
"DIRECTORY_NOT_EXIST": "La carpeta %s no existeix.",
|
||||
"DISALLOWED_FILE_TYPE": "Following files are not allowed : ",
|
||||
"ERROR_CREATING_ZIP": "Error creating Zip archive",
|
||||
"ERROR_OPENING_FILE": "Error opening file.",
|
||||
"DISALLOWED_FILE_TYPE": "Els següents arxius no són permesos : ",
|
||||
"ERROR_CREATING_ZIP": "Error creant l'arxiu Zip",
|
||||
"ERROR_OPENING_FILE": "Error obrint l'arxiu.",
|
||||
"ERROR_RENAMING_DIRECTORY": "Error al canviar el nom de la carpeta %s a %s.",
|
||||
"ERROR_RENAMING_FILE": "Error al canviar el nom de l'arxiu %s a %s.",
|
||||
"ERROR_REPLACING_FILE": "Please, provide a file having the following extension :",
|
||||
"ERROR_SAVING_FILE": "Error saving file.",
|
||||
"ERROR_UPLOADING_FILE": "Error uploading file.",
|
||||
"ERROR_WRITING_PERM": "You don't have write permissions on that file.",
|
||||
"FILE_ALREADY_EXISTS": "The file '%s' already exists.",
|
||||
"FILE_DOES_NOT_EXIST": "L'arxiu %s no existeix.",
|
||||
"ERROR_REPLACING_FILE": "Si us plau, proporciona un arxiu amb la següent extensió :",
|
||||
"ERROR_SAVING_FILE": "Error guardant arxiu.",
|
||||
"ERROR_UPLOADING_FILE": "Error pujant arxiu.",
|
||||
"ERROR_WRITING_PERM": "No tens permisos per modificar aquest arxiu.",
|
||||
"FILE_ALREADY_EXISTS": "L'arxiu '%s' ja exists.",
|
||||
"FILE_DOES_NOT_EXIST": "L'arxiu '%s' no existeix.",
|
||||
"INVALID_ACTION": "Acció invàlida.",
|
||||
"INVALID_DIRECTORY_OR_FILE": "Carpeta o arxiu invàlid.",
|
||||
"INVALID_FILE_TYPE": "File type is not allowed.",
|
||||
"INVALID_FILE_TYPE": "Aquest tipus d'arxiu no és permés.",
|
||||
"INVALID_FILE_UPLOAD": "Transferencia d'arxiu invàlida.",
|
||||
"INVALID_VAR": "Variable %s invàlida.",
|
||||
"LANGUAGE_FILE_NOT_FOUND": "No s'ha trobat l'arxiu d'idioma.",
|
||||
"MODE_ERROR": "Error de mode.",
|
||||
"NOT_ALLOWED": "You are not allowed to process this action",
|
||||
"NOT_ALLOWED_SYSTEM": "System permissions do not allow you to perform this action",
|
||||
"NOT_ALLOWED": "No pots dur a terme aquesta acció",
|
||||
"NOT_ALLOWED_SYSTEM": "Els permisos del sistemta no et permeten dur a terme aquesta acció",
|
||||
"UNABLE_TO_CREATE_DIRECTORY": "Impossible crear la carpeta %s.",
|
||||
"UNABLE_TO_OPEN_DIRECTORY": "No s'ha pogut obrir la carpeta %s.",
|
||||
"UPLOAD_FILES_SMALLER_THAN": "Si us plau, Pugeu només arxius amb tamany inferior a %s.",
|
||||
@@ -31,10 +31,10 @@
|
||||
"browse": "Browse...",
|
||||
"bytes": " bytes",
|
||||
"cancel": "Cancel·lar",
|
||||
"close": "Close",
|
||||
"close": "Tancar",
|
||||
"confirmation_delete": "Estàs segur de voler eliminar aquest arxiu?",
|
||||
"copied": "URL copied !",
|
||||
"copy_to_clipboard": "Copy to Clipboard",
|
||||
"copied": "URL copiada !",
|
||||
"copy_to_clipboard": "Copiar al portapapers",
|
||||
"could_not_retrieve_folder": "No s'ha pogut recuperar el contingut de la carpeta.",
|
||||
"create_folder": "Crear una carpeta",
|
||||
"created": "Creat",
|
||||
@@ -43,14 +43,14 @@
|
||||
"del": "Eliminar",
|
||||
"dimensions": "Dimensions",
|
||||
"download": "Descarregar",
|
||||
"dz_dictDefaultMessage": "Drop files here to upload",
|
||||
"dz_dictDefaultMessage": "Arrossega aquí els fitxers per pujar-los",
|
||||
"dz_dictFallbackMessage": "Your browser does not support drag'n'drop file uploads.",
|
||||
"dz_dictInvalidFileType": "You can't upload files of this type.",
|
||||
"dz_dictMaxFilesExceeded": "Only %s simultaneous uploads are allowed.",
|
||||
"dz_dictInvalidFileType": "No pots pujar arxius d'aquest tipus.",
|
||||
"dz_dictMaxFilesExceeded": "Només es permet pujar %s simultàneament.",
|
||||
"edit": "Edit file",
|
||||
"fck_select_integration": "La funció 'Seleccionar' només es far servir des de FCKEditor.",
|
||||
"file_size_limit": "The file size limit is : ",
|
||||
"file_too_big": "The file is too big.",
|
||||
"file_size_limit": "El tamany màxim dels arxius és de : ",
|
||||
"file_too_big": "L'arxiu és massa gran.",
|
||||
"gb": "gb",
|
||||
"grid_view": "Canviar a vista de quadricular.",
|
||||
"help_move": "The use of '../' is forbidden. You can access root folder by using '/'.",
|
||||
@@ -70,22 +70,22 @@
|
||||
"prompt_foldername": "Introdueix el nom de la nova carpeta",
|
||||
"quit_editor": "Quit editor",
|
||||
"rename": "Canviar el nom",
|
||||
"replace": "Replace file",
|
||||
"replace": "Substituir arxiu",
|
||||
"save": "Save",
|
||||
"search": "Search",
|
||||
"search": "Buscar",
|
||||
"search_reset": "Reset",
|
||||
"select": "Seleccionar",
|
||||
"select_from_left": "Selecciona un element de l'esquerra.",
|
||||
"size": "Tamany",
|
||||
"successful_added_file": "Nou arxiu afegit satisfactòriament.",
|
||||
"successful_added_folder": "Nova carpeta afegida satisfactòriament.",
|
||||
"successful_delete": "Eliminació amb èxit.",
|
||||
"successful_edit": "Content update successful.",
|
||||
"successful_moved": "Move successful.",
|
||||
"successful_rename": "Canvi de nom amb èxit.",
|
||||
"successful_replace": "File replacement successful.",
|
||||
"successful_added_file": "Arxiu afegit.",
|
||||
"successful_added_folder": "Carpeta creada.",
|
||||
"successful_delete": "Arxiu eliminat.",
|
||||
"successful_edit": "Arxiu actualitzat.",
|
||||
"successful_moved": "Arxiu mogut.",
|
||||
"successful_rename": "Nom modificat.",
|
||||
"successful_replace": "Arxiu substituit.",
|
||||
"support_fm": "Filemanager is a free software, please support !",
|
||||
"upload": "Pujar arxiu",
|
||||
"version": "version",
|
||||
"version": "versió",
|
||||
"yes": "Sí"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user