use colorbox

This commit is contained in:
wlx 2011-11-07 02:20:41 +00:00
parent 74e48cc25c
commit ea17ac8556
1 changed files with 10 additions and 6 deletions

View File

@ -4,12 +4,14 @@
$this->headTitle('全部浏览'); $this->headTitle('全部浏览');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css'); $this->headLink()->appendStylesheet('/css/water.css');
$this->headScript()->appendFile('/js/pubfunc.js');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>'); $this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/heihe">数字黑河</a>'); $this->breadcrumb('<a href="/heihe">数字黑河</a>');
$this->breadcrumb('缩略图浏览'); $this->breadcrumb('缩略图浏览');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/colorbox.css');
?> ?>
<div id='sidebar'> <div id='sidebar'>
<div id='leftnavi'> <div id='leftnavi'>
@ -29,13 +31,15 @@ $this->breadcrumb()->setSeparator(' > ');
<div class="thumbtitle"> <div class="thumbtitle">
<a href="/heihe/view/uuid/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']); ?> </a> <a href="/heihe/view/uuid/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']); ?> </a>
</div> </div>
<a class="colorbox" href="/service/bigthumb/id/<?php echo $md['id'];?>" title="<?php echo $this->escape($md['title']); ?>">
<img src="/service/thumb/id/<?php echo $md['id'];?>" alt="<?php echo $this->escape($md['title']);?>" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>" <img src="/service/thumb/id/<?php echo $md['id'];?>" alt="<?php echo $this->escape($md['title']);?>" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>" />
onclick="fnCreate('<?php echo $thumburl; ?>')" /> </a>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<hr style="clear:left;"/> <hr style="clear:left;"/>
<?php echo $this->page->getNavigation(); ?> <?php echo $this->page->getNavigation(); ?>
</div> </div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){$(".colorbox").colorbox({rel:"colorbox",photo:"true",transition:"fade"});});
</script>