Skip to content

Commit

Permalink
closes Studio-42#336
Browse files Browse the repository at this point in the history
  • Loading branch information
dio-el-claire committed Jul 9, 2012
1 parent 6881034 commit 5ef993e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 48 deletions.
19 changes: 2 additions & 17 deletions js/ui/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,30 +220,15 @@ $.fn.elfindertree = function(fm, opts) {
* @param Object new directory
* @return jQuery
*/
findSibling_ = function(subtree, dir) {
var node = subtree.children(':first'),
info;

while (node.length) {
if ((info = fm.file(fm.navId2Hash(node.children('[id]').attr('id'))))
&& dir.name.localeCompare(info.name) < 0) {
return node;
}
node = node.next();
}
return $('');
},

findSibling = function(subtree, dir) {
var node = subtree.children(':first'),
info;

while (node.length) {
info = fm.file(fm.navId2Hash(node.children('[id]').attr('id')));
// console.log(dir.name, info.name, dir.name.localeCompare(info.name))

if ((info = fm.file(fm.navId2Hash(node.children('[id]').attr('id'))))
&& dir.name.localeCompare(info.name) < 0) {
&& dir.name.toLowerCase().localeCompare(info.name.toLowerCase()) < 0) {
return node;
}
node = node.next();
Expand Down Expand Up @@ -275,7 +260,7 @@ $.fn.elfindertree = function(fm, opts) {
if (dir.phash && (sibling = findSibling(parent, dir)).length) {
sibling.before(html);
} else {
parent.append(html);
parent[dir.phash ? 'append' : 'prepend'](html);
}
} else {
orphans.push(dir);
Expand Down
62 changes: 31 additions & 31 deletions php/connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,37 +270,37 @@ function validName($name) {
)
// 'uploadDeny' => array('application', 'text/xml')
),
// array(
// 'driver' => 'LocalFileSystem',
// 'path' => '../files2/',
// // 'URL' => dirname($_SERVER['PHP_SELF']) . '/../files2/',
// 'alias' => 'File system',
// 'mimeDetect' => 'internal',
// 'tmbPath' => '.tmb',
// 'utf8fix' => true,
// 'tmbCrop' => false,
// 'startPath' => '../files/test',
// // 'separator' => ':',
// 'attributes' => array(
// array(
// 'pattern' => '~/\.~',
// // 'pattern' => '/^\/\./',
// 'read' => false,
// 'write' => false,
// 'hidden' => true,
// 'locked' => false
// ),
// array(
// 'pattern' => '~/replace/.+png$~',
// // 'pattern' => '/^\/\./',
// 'read' => false,
// 'write' => false,
// // 'hidden' => true,
// 'locked' => true
// )
// ),
// // 'defaults' => array('read' => false, 'write' => true)
// ),
array(
'driver' => 'LocalFileSystem',
'path' => '../files2/',
// 'URL' => dirname($_SERVER['PHP_SELF']) . '/../files2/',
'alias' => 'File system',
'mimeDetect' => 'internal',
'tmbPath' => '.tmb',
'utf8fix' => true,
'tmbCrop' => false,
'startPath' => '../files/test',
// 'separator' => ':',
'attributes' => array(
array(
'pattern' => '~/\.~',
// 'pattern' => '/^\/\./',
'read' => false,
'write' => false,
'hidden' => true,
'locked' => false
),
array(
'pattern' => '~/replace/.+png$~',
// 'pattern' => '/^\/\./',
'read' => false,
'write' => false,
// 'hidden' => true,
'locked' => true
)
),
// 'defaults' => array('read' => false, 'write' => true)
),

// array(
// 'driver' => 'FTP',
Expand Down

0 comments on commit 5ef993e

Please sign in to comment.