From: dongsheng Date: Fri, 11 Jul 2008 06:15:21 +0000 (+0000) Subject: MDL-15350 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9dd6ef3b98f19612b34884bfaa0826fe3bee138a;p=moodle.git MDL-15350 1. Improve UI, could select repository files, view files in thumbnail and list view without new http traffic 2. Paging flickr 3. Fix undefined varible in boxnet plugin 4. Cache http request --- diff --git a/repository/ajax.php b/repository/ajax.php index 86a25da21b..4aa8b2dd4e 100644 --- a/repository/ajax.php +++ b/repository/ajax.php @@ -1,18 +1,13 @@ - - - - -Ajax picker demo page +$itempic = $CFG->pixpath.'/i/item.gif'; +$meta = << body { margin:0; @@ -25,9 +20,23 @@ body { background-color: transparent; } #panel{padding:0;margin:0; text-align:left;} -#list{} +#list{line-height: 1.5em} +#list li{ +background: url($itempic) no-repeat 0 2px; +padding-left: 24px +} +#list a{ +padding: 3px +} +#list li a:hover{ +background: gray; +color:white; +} .t{width:80px; float:left;text-align:center;} +.t div{width: 80px; height: 36px; overflow: hidden} img{margin:0;padding:0;border:0} +#paging{margin:10px 5px; clear:both} +#paging a{padding: 4px; border: 1px solid gray} @@ -49,128 +58,142 @@ img{margin:0;padding:0;border:0} - - -
+ +EOD; +print_header('', '', '', '', $meta, false); +?> +
+
+ +
+
+
+
+ - - +$v){ $list[] = array('title'=>$v, 'size'=>0, 'date'=>'', - 'url'=>'http://box.net/api/1.0/download/'.$this->options['auth_token'].'/'.$fileids[$n], + 'source'=>'http://box.net/api/1.0/download/'.$this->options['auth_token'].'/'.$fileids[$n], 'thumbnail'=>$CFG->pixpath.'/i/files.gif'); } $this->listing = $list; @@ -115,7 +115,7 @@ class repository_boxnet extends repository{ // in box.net, so we need print a login link in this // function instead a login screen. - if($this->ticket && ($this->options['auth_token'] == '')){ + if($this->ticket && empty($this->options['auth_token'])) { $str = ''; $str .= '
'; $str .= ''; diff --git a/repository/picker.php b/repository/picker.php index bb22923f16..7b04e1409e 100644 --- a/repository/picker.php +++ b/repository/picker.php @@ -1,4 +1,10 @@ dirroot.'/repository/'.$repository->repositorytype.'/repository +

This page is deprecated, please access ajax.php.