From f3bee77c210487615f1f6c186c47d3010e9312d7 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Thu, 25 Aug 2016 15:22:57 +0200 Subject: [PATCH] Refix tree and fileslist --- .../src/plugins/gui.ajax/res/js/ui/prototype/class.FilesList.js | 2 +- core/src/plugins/gui.ajax/res/js/vendor/webfx/xtree.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/plugins/gui.ajax/res/js/ui/prototype/class.FilesList.js b/core/src/plugins/gui.ajax/res/js/ui/prototype/class.FilesList.js index 8d71c00f9f..b8be9080fa 100644 --- a/core/src/plugins/gui.ajax/res/js/ui/prototype/class.FilesList.js +++ b/core/src/plugins/gui.ajax/res/js/ui/prototype/class.FilesList.js @@ -2284,7 +2284,7 @@ Class.create("FilesList", SelectableElements, { elList.each(function(element){ try{ - var image_element = element.IMAGE_ELEMENT || element.down('img'); + var image_element = element.IMAGE_ELEMENT /*|| element.down('img')*/; var label_element = element.LABEL_ELEMENT || element.down('.thumbLabel'); }catch(e){ return; diff --git a/core/src/plugins/gui.ajax/res/js/vendor/webfx/xtree.js b/core/src/plugins/gui.ajax/res/js/vendor/webfx/xtree.js index ac93b1e623..5ca87ef9ce 100644 --- a/core/src/plugins/gui.ajax/res/js/vendor/webfx/xtree.js +++ b/core/src/plugins/gui.ajax/res/js/vendor/webfx/xtree.js @@ -221,6 +221,7 @@ WebFXTreeAbstractNode.prototype.add = function (node, bNoIdent) { } $(this.id + '-cont').insert(node.toString()); var addedBloc = $(this.id + '-cont').down('#' + node.id); + var addedCont = $(this.id + '-cont').down('#' + node.id + '-cont'); if(this.childNodes.length > 2 && node.ajxpNode){ var sorted = Object.keys(this.childrenPathes).sort(function(a,b){ return a.toLowerCase().localeCompare(b.toLowerCase()); @@ -230,6 +231,7 @@ WebFXTreeAbstractNode.prototype.add = function (node, bNoIdent) { var nextId = this.childrenPathes[sorted[sortedIndex + 1]]; if($(this.id + '-cont').down('#' + nextId)){ $(this.id + '-cont').down('#' + nextId).insert({before: addedBloc}); + if(addedCont) addedBloc.insert({after: addedCont}); } } }