* Add queryResult.
This commit is contained in:
@@ -18,7 +18,7 @@ $(function()
|
||||
if(result) window.location.href = url;
|
||||
});
|
||||
|
||||
initPager(pageID, recPerPage, recTotal);
|
||||
initPager(pageID, recPerPage, recTotal, fieldCount);
|
||||
|
||||
$('.first-page,.left-page,.last-page,.right-page').click(function()
|
||||
{
|
||||
@@ -69,8 +69,9 @@ function queryTableData()
|
||||
$('#datas').empty();
|
||||
$('#datas').append(resp.html);
|
||||
|
||||
recTotal = resp.recTotal;
|
||||
initPager(pageID, recPerPage, recTotal);
|
||||
recTotal = resp.recTotal;
|
||||
fieldCount = resp.fieldCount;
|
||||
initPager(pageID, recPerPage, recTotal, fieldCount);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,7 +84,7 @@ function queryTableData()
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function initPager(pageID, recPerPage, recTotal)
|
||||
function initPager(pageID, recPerPage, recTotal, fieldCount)
|
||||
{
|
||||
var pageID = parseInt(pageID);
|
||||
var recPerPage = parseInt(recPerPage);
|
||||
@@ -112,5 +113,7 @@ function initPager(pageID, recPerPage, recTotal)
|
||||
$('.first-page,.left-page,.last-page,.right-page').removeClass('disabled');
|
||||
if(pageID == 1) $('.first-page,.left-page').addClass('disabled');
|
||||
if(pageID == pageTotal) $('.last-page,.right-page').addClass('disabled');
|
||||
|
||||
$('#queryResult').html(queryResult.replace('%s', recTotal).replace('%s', fieldCount));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
<?php js::set('table', $selectedTable);?>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('dataview', $dataview);?>
|
||||
<?php js::set('fieldCount', count($fields));?>
|
||||
<?php js::set('warningDesign', $lang->dataview->error->warningDesign);?>
|
||||
<?php js::set('queryResult', $lang->dataview->queryResult);?>
|
||||
|
||||
<?php js::set('pageID', 1);?>
|
||||
<?php js::set('recPerPage', 25);?>
|
||||
@@ -163,6 +165,7 @@
|
||||
<a class='pager-item' data-page='1' href='javascript:;'><i class='icon icon-last-page'></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
<span style="float:left;line-height:28px" id="queryResult"></span>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user