mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
closes #327 - icrease tree render speed 3 times.
This commit is contained in:
+3
-2
@@ -144,6 +144,7 @@
|
||||
<script>
|
||||
$().ready(function() {
|
||||
$('#finder').elfinder({
|
||||
type : 'post',
|
||||
// url : 'php/connector.php',
|
||||
url : 'php/connector.php',
|
||||
// transport : new elFinderSupportVer1(),
|
||||
@@ -168,11 +169,11 @@
|
||||
// onlyMimes : ['image', 'text/plain']
|
||||
// sync : 20000,
|
||||
lang : 'ru',
|
||||
customData : {answer : 42}
|
||||
customData : {answer : 42},
|
||||
// requestType : 'POST',
|
||||
// rememberLastDir : false,
|
||||
// ui : ['tree', 'toolbar'],
|
||||
// ui : ['toolbar', 'places', 'tree', 'path', 'stat'],
|
||||
// ui : ['toolbar', 'path', 'stat'],
|
||||
// commands : [],
|
||||
// commandsOptions : {
|
||||
// edit : {
|
||||
|
||||
+8
-4
@@ -243,9 +243,10 @@ $.fn.elfindertree = function(fm, opts) {
|
||||
updateTree = function(dirs) {
|
||||
var length = dirs.length,
|
||||
orphans = [],
|
||||
i, dir, html, parent, sibling;
|
||||
i = dirs.length,
|
||||
dir, html, parent, sibling;
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
while (i--) {
|
||||
dir = dirs[i];
|
||||
|
||||
if (tree.find('#'+fm.navHash2Id(dir.hash)).length) {
|
||||
@@ -267,8 +268,11 @@ $.fn.elfindertree = function(fm, opts) {
|
||||
if (orphans.length && orphans.length < length) {
|
||||
return updateTree(orphans);
|
||||
}
|
||||
|
||||
updateDroppable();
|
||||
|
||||
setTimeout(function() {
|
||||
updateDroppable();
|
||||
}, 10);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -255,6 +255,7 @@ $opts = array(
|
||||
'tmbBgColor' => 'transparent',
|
||||
'accessControl' => 'access',
|
||||
'acceptedName' => '/^[^\.].*$/',
|
||||
// 'tmbSize' => 128,
|
||||
'attributes' => array(
|
||||
array(
|
||||
'pattern' => '/\.js$/',
|
||||
|
||||
@@ -535,7 +535,7 @@ class elFinder {
|
||||
return array('error' => $this->error(self::ERROR_OPEN, $hash, self::ERROR_PERM_DENIED));
|
||||
}
|
||||
|
||||
$files = array();
|
||||
$files = array($cwd);
|
||||
|
||||
// get folders trees
|
||||
if ($args['tree']) {
|
||||
|
||||
Reference in New Issue
Block a user