Ticket #259 修改了heihe view中ajax分页模板
This commit is contained in:
parent
c1c799b9a1
commit
94768c5986
|
@ -645,7 +645,7 @@ class DataController extends Zend_Controller_Action
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
$paginator->setItemCountPerPage(5);
|
$paginator->setItemCountPerPage(5);
|
||||||
$paginator->setView($this->view);
|
$paginator->setView($this->view);
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('data/pagination_ajax.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('data/pagination_literature.phtml');
|
||||||
$this->config = Zend_Registry::get('config');
|
$this->config = Zend_Registry::get('config');
|
||||||
if ($paginator)
|
if ($paginator)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php if ($this->pageCount): ?>
|
||||||
|
<div class="paginationControl">
|
||||||
|
<!-- Previous page link -->
|
||||||
|
<?php if (isset($this->previous)): ?>
|
||||||
|
<a href="javascript:void(0);" onclick="literature(<?php echo $this->previous;?>)">< Previous</a>
|
||||||
|
<?php else: ?>
|
||||||
|
<span class="disabled">< Previous</span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<!-- Numbered page links -->
|
||||||
|
<?php foreach ($this->pagesInRange as $page): ?>
|
||||||
|
<?php if ($page != $this->current): ?>
|
||||||
|
<a href="javascript:void(0);" onclick="literature(<?php echo $page;?>)"><?= $page; ?></a>
|
||||||
|
<?php else: ?>
|
||||||
|
<span class="current"><?= $page; ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<!-- Next page link -->
|
||||||
|
<?php if (isset($this->next)): ?>
|
||||||
|
<a href="javascript:void(0);" onclick="literature(<?php echo $this->next;?>)">Next ></a>
|
||||||
|
<?php else: ?>
|
||||||
|
<span class="disabled">Next ></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
|
@ -347,7 +347,7 @@ function literature(page){
|
||||||
type:"GET",
|
type:"GET",
|
||||||
url:"/data/literature/uuid/<?= $md->uuid; ?>",
|
url:"/data/literature/uuid/<?= $md->uuid; ?>",
|
||||||
data:'page='+page,
|
data:'page='+page,
|
||||||
success:function(html){$('#literature').html('<ul>'+html+'</ul>');$('#literature .paginationControl a').attr('onclick',$('#literature .paginationControl a').attr('onclick').replace(/ajaxpage/i,"literature"));},
|
success:function(html){$('#literature').html('<ul>'+html+'</ul>');},
|
||||||
beforeSend:function(){$('#literature').html('<img src="/images/loading.gif" />加载中');}
|
beforeSend:function(){$('#literature').html('<img src="/images/loading.gif" />加载中');}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue