bigthumb viewer

This commit is contained in:
Li Jianxuan 2013-04-13 07:45:04 +00:00
parent 70a237d338
commit 905622102d
1 changed files with 66 additions and 53 deletions

View File

@ -9,6 +9,7 @@ $this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/tag">关键词浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
$this->theme->AppendPlus($this,'colorbox');
?>
<div id='row-fluid'>
<?= $this->partial('data/tools.phtml'); ?>
@ -20,7 +21,11 @@ $this->breadcrumb()->setSeparator(' > ');
<hr />
<?php foreach($this->metadata as $md) : ?>
<div class="mditem">
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<div class="thumb">
<a href="javascript:void(0);" class="gallery" rel="/service/bigthumb/uuid/<?= $md['uuid'] ?>">
<img src="/service/thumb/id/<?php echo $md['id'];?>" />
</a>
</div>
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
</h2>
@ -51,3 +56,11 @@ foreach($this->keywords as $cg) :
</ul>
</fieldset></div>
<?php endif; ?>
<script>
$('a.gallery').bind('click',function(){
$.colorbox({
photo:$(this).attr('rel'),
});
});
</script>