From 448f93632a089d4f100cc4df303cbe85e1775193 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Mon, 13 Oct 2008 08:38:42 +0000 Subject: [PATCH] "Repository: repository_get_client(), thumbnail view fixed, MDL-13766" --- repository/javascript.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/repository/javascript.php b/repository/javascript.php index dcbad5053ca..94d021c7d17 100644 --- a/repository/javascript.php +++ b/repository/javascript.php @@ -338,7 +338,13 @@ _client.loading = function(type, name) { } _client.rename = function(oldname, url, icon, repo_id) { var tree = document.getElementById('treediv-$suffix'); - tree.style.display = 'none'; + if(tree){ + tree.style.display = 'none'; + } + var thumbnail = document.getElementById('fp-grid-panel-$suffix'); + if(thumbnail){ + thumbnail.style.display = 'none'; + } var header = document.getElementById('repo-tb-$suffix'); header.style.display = 'none'; var footer = document.getElementById('fp-footer-$suffix'); @@ -468,7 +474,9 @@ _client.print_footer = function() { } _client.viewthumb = function(ds) { _client.viewmode = 1; - var panel = new YAHOO.util.Element('panel-$suffix'); + var container = document.getElementById('panel-$suffix'); + var panel = document.createElement('DIV'); + panel.id = 'fp-grid-panel-$suffix'; _client.viewbar.check(1); var list = null; var args = arguments.length; @@ -503,7 +511,7 @@ _client.viewthumb = function(ds) { title.className = 'label'; el.appendChild(frame); el.appendChild(title); - panel.get('element').appendChild(el); + panel.appendChild(el); if(list[k].children) { var folder = new YAHOO.util.Element(link.id); folder.ds = list[k].children; @@ -543,6 +551,7 @@ _client.viewthumb = function(ds) { } count++; } + container.appendChild(panel); _client.print_footer(); } _client.buildtree = function(node, level) {