From 4ebc072262677ccf9baac99ee563b393d2ef01fa Mon Sep 17 00:00:00 2001 From: haneul Date: Mon, 30 Nov 2009 05:40:00 +0000 Subject: [PATCH] #18510611 , #18516093 : fixed a bug occurred when there exists one file && added .. to parent dir. git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7000 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/tpl/js/config.js | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/modules/admin/tpl/js/config.js b/modules/admin/tpl/js/config.js index d0cd2ef1a..2d8451d95 100644 --- a/modules/admin/tpl/js/config.js +++ b/modules/admin/tpl/js/config.js @@ -1,24 +1,28 @@ function completeGetFtpInfo(ret_obj) { - var e = jQuery("#ftplist").empty(); var list = ""; + if(!jQuery.isArray(ret_obj['list']['item'])) + { + ret_obj['list']['item'] = [ret_obj['list']['item']]; + } + + if(pwd != "/") + { + arr = pwd.split("/"); + arr.pop(); + arr.pop(); + arr.push(""); + target = arr.join("/"); + list = list + "
  • ../
  • "; + } + for(var i=0;i"+v+""; + continue; } else if( v == "./") { @@ -29,6 +33,7 @@ function completeGetFtpInfo(ret_obj) list = list + "
  • "+v+"
  • "; } } + list = ""; e.append(jQuery(list)); }