From a67af354cdc5a64d3fd6656ead0d07b0d4ab7f14 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Fri, 29 Aug 2008 08:26:38 +0000 Subject: [PATCH] MDL-16266, add thumbnail on rename page. --- repository/lib.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/repository/lib.php b/repository/lib.php index 80c8bc4a272..c2883d33643 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -844,13 +844,16 @@ _client.loading = function(){ content.innerHTML = '$strloading'; panel.get('element').appendChild(content); } -_client.rename = function(oldname, url){ +_client.rename = function(oldname, url, icon){ var panel = new YAHOO.util.Element('panel-$suffix'); var html = '
'; + html += '

'; html += '

'; html += '

'; + /** html += '

'; html += '

'; + */ html += '

'; html += '$strback '; html += ''; @@ -949,8 +952,9 @@ _client.viewthumb = function(ds){ var el = new YAHOO.util.Element(link.id); el.title = list[k].title; el.value = list[k].source; + el.icon = list[k].thumbnail; el.on('click', function(){ - repository_client_$suffix.rename(this.title, this.value); + repository_client_$suffix.rename(this.title, this.value, this.icon); }); } count++; @@ -966,6 +970,7 @@ _client.buildtree = function(node, level){ context:tmpNode.labelElId, text:info.title}); tmpNode.filename = node.title; tmpNode.value = node.source; + tmpNode.icon = node.thumbnail; if(node.children){ tmpNode.isLeaf = false; if (node.path) { @@ -979,7 +984,7 @@ _client.buildtree = function(node, level){ } else { tmpNode.isLeaf = true; tmpNode.onLabelClick = function() { - repository_client_$suffix.rename(this.filename, this.value); + repository_client_$suffix.rename(this.filename, this.value, this.icon); } } }