closes #327 - icrease tree render speed 3 times.

This commit is contained in:
Dmitry (dio) Levashov
2012-07-07 18:52:54 +04:00
parent 04b0186ddc
commit 79da4e27d0
4 changed files with 13 additions and 7 deletions
+3 -2
View File
@@ -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
View File
@@ -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);
},
/**
+1
View File
@@ -255,6 +255,7 @@ $opts = array(
'tmbBgColor' => 'transparent',
'accessControl' => 'access',
'acceptedName' => '/^[^\.].*$/',
// 'tmbSize' => 128,
'attributes' => array(
array(
'pattern' => '/\.js$/',
+1 -1
View File
@@ -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']) {