reload elFinder with news folders and files

Added by ric rica 10 months ago

exp:

what i need:

on a list, i have the number 500, so, if i click in the 500, the elFinder will open in a folder callded 500 ( the folder i create using some php's) with the stuff's inside and go's on...
if i click in the number 600, the elFinder will open in a 600 folder and show files...

first time work perfect, but the problem is when i open the second time, the elFinder dos not reload.

exp: click in the 500, 500 folder appears, but if in try to open the 600, the elFinder stay static, dosent refresh/reload with the new files/folders

i try somthing that i found on the web, but the closest i can get was this:

$(".butShowCont").live("click", function(){
$("#container").fadeIn(); // show the container
var number = $(this).closest('.someClass').prev().find('.someNumber').html(); // get the number and pass using GET
var f = $('#container').elfinder({
url : 'js/elfinder/connectors/php/connector.php?number='+number+'', // get usgin URL
lang : 'en',
docked : true
});
// found this, but dosent work, he made the reload but the files keep the same, dos not change if i click in a diferent number.
f[0].elfinder.ui.exec('reload');
});

thanks.

Replies (4)

RE: reload elFinder with news folders and files - Added by Troex Nevelin 10 months ago

The problem is that you try to create elfinder on the same node for the second time. You need to create new container (#container) for new elFinder

RE: reload elFinder with news folders and files - Added by ric rica 10 months ago

thanks for the answer

can u set for me a example ?

thanks

RE: reload elFinder with news folders and files - Added by Troex Nevelin 10 months ago

$('#container').elfinder... should be changed to $('<div></div>').elfinder

RE: reload elFinder with news folders and files - Added by ric rica 10 months ago

Hi,

made the change but nothing happens now

my code:

i'm using the version 1.2 (current download) dont know if this maybe change somthing about this.

$(".butAnexarDoc").live("click", function(){
// create the elfinder
var f = $('<div></div>').elfinder({
url : 'js/elfinder/connectors/php/connector.php',
lang : 'en',
docked : true
});
// open
f.elfinder('open');
});

(1-4/4)