diff --git a/CHANGE-LOG b/CHANGE-LOG
index d926d12..f3e55e3 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -1,4 +1,4 @@
-v1.33 2014-12-28 文档优化、示例优化、BUG修复
+v1.33 2014-02-04 文档优化、示例优化、bug修复
1,修复grid使用hover样式后分页时遮罩颜色异常问题;
2,去掉grid.paging.little.css及grid.paging.little.js,简化为使用参数pagingLittleToolbar控制显示分页的little或正常样式;
@@ -12,6 +12,9 @@ v1.33 2014-12-28 文档优化、示例优化、BUG修复
10,扩展增加表格列属性w_num以用于显示行号,值为line、total_line,分别表示当前页的数据行号、所有记录的数据行号;
11,修改表格渲染数据支持返回非最后一页数据行数不等于pageSize的异常情况;
12,中文化主要的文档示例;
+13,修复配置参数pageSizeForGrid只能增加分页大小不能减少的bug;
+14,增加参数pageIncorrectTurnAlert以控制翻页翻尽时再点击按钮是否弹出提示框,默认true;
+15,简化示例,网站文档优化;
diff --git a/README.md b/README.md
index 34d1bf6..2899760 100644
--- a/README.md
+++ b/README.md
@@ -12,9 +12,9 @@ QQ群交流:254754154
示例:导航一
导航二
-版本:1.32
+版本:1.33
协议:Apache Licence 2
- 更新日期:2015-01-26
+ 更新日期:2015-02-04
文档:HTML
PDF
@@ -22,7 +22,7 @@ QQ群交流:254754154
依赖:jQuery 1.4.4 ~~ jQuery 1.11.2
-支持浏览器:IE6+、Chrome、Firefox等
+支持:IE6+、Chrome、Firefox等
#####首先给出典型效果图示#####
1,内置多套皮肤(点击下面对应皮肤图片可查看示例页面),并可非常容易的自定义皮肤(参考Custom Blue Style )
@@ -57,63 +57,63 @@ QQ群交流:254754154
Default Style
-
+
ExtJS Gray Style
-
+
ExtJS Blue Style
-
+
ExtJS Access Style
-
+
FlexiGrid Gray Style
-
+
Dhtmlx Sky Blue Style
-
+
Pure Gray Style
-
+
jqGrid Style
-
+
EasyUI Style
-
+
Bootstrap Style
-
+
Custom Blue Style
-
+
@@ -128,36 +128,36 @@ QQ群交流:254754154
With jqPagination
-
+
With jquery_pagination
-
+
With jPaginate
-
+
With jPages
-
+
With smartpaginator
-
+
With jPaginator
-
+
@@ -239,18 +239,18 @@ Merged Files: 目录builds/merged,合并经常一起使用的css、js,合并
#####1,Example Index #####
-![Example Index](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-01_examples_index-01.png)
+![Example Index](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-01_examples_index-01.png)
-![Example Index](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-01_examples_index-02.png)
+![Example Index](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-01_examples_index-02.png)
#####2,Simple Grid #####
-![Simple Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-02_simple_grid.png)
+![Simple Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-02_simple_grid.png)
引用文件:
- <link rel="stylesheet" href="../../builds/merged/grid.simple.min.css"/>
+ <link rel="stylesheet" href="../../builds/merged/bsgrid.all.min.css"/>
<script type="text/javascript" src="../../plugins/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../builds/js/lang/grid.zh-CN.min.js"></script>
- <script type="text/javascript" src="../../builds/merged/grid.simple.min.js"></script>
+ <script type="text/javascript" src="../../builds/merged/bsgrid.all.min.js"></script>
实现代码:
<table id="searchTable">
<tr>
@@ -281,7 +281,7 @@ Merged Files: 目录builds/merged,合并经常一起使用的css、js,合并
#####3,Simple en Grid #####
-![Simple en Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-03_simple_en_grid.png)
+![Simple en Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-03_simple_en_grid.png)
1,插件语言本地化文件:grid.en.min.js、grid.zh-CN.min.js、grid.zh-TW.min.js
@@ -295,7 +295,7 @@ Merged Files: 目录builds/merged,合并经常一起使用的css、js,合并
##### Simple Grid With Images #####
-![Simple Grid With Images](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-03_simple_grid_with_images.png)
+![Simple Grid With Images](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-03_simple_grid_with_images.png)
数据支持扩展渲染,th使用w_render属性,值是js方法名:
<th w_render="renderImg" width="5%;">IMAGES</th>
@@ -307,7 +307,7 @@ renderImg方法:
#####4,Simple XML Data Grid #####
-![Simple XML Data Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-04_simple_XML_data_grid.png)
+![Simple XML Data Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-04_simple_XML_data_grid.png)
默认的是json格式,换加载XML格式数据:
方式1,全局修改加载数据格式:
@@ -334,7 +334,7 @@ renderImg方法:
#####5,No Pagation #####
支持展示后台的全部数据,分页工具条变为如下只显示总数的样式:
-![No Pagation](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-05_no_pagation.png)
+![No Pagation](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-05_no_pagation.png)
实现代码:将pageAll设置为true即可,后台数据格式与分页后台数据格式一致
$.fn.bsgrid.init('searchTable', {
@@ -347,7 +347,7 @@ renderImg方法:
#####6,No Diaplay Blank Rows #####
设置是否显示无数据的行,下图示例展示的是分页行大小是25,但只显示了20条数据,无数据行没有显示:
-![No Diaplay Blank Rows](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-06_no_diaplay_blank_rows.png)
+![No Diaplay Blank Rows](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-06_no_diaplay_blank_rows.png)
实现代码:修改全局参数displayBlankRows,默认值为true
$.fn.bsgrid.defaults.displayBlankRows = false;
@@ -356,7 +356,7 @@ renderImg方法:
#####7,No Data #####
无数据时的提示:
-![No Data](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-07_no_data.png)
+![No Data](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-07_no_data.png)
注意此提示仅当$.fn.bsgrid.defaults.displayBlankRows = false;时才会显示,为true时显示的是空行。
说明:属性displayPagingToolbarOnlyMultiPages与displayBlankRows互不影响。
@@ -364,7 +364,7 @@ renderImg方法:
#####8,Grid With Checkbox #####
-![Grid With Checkbox](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-08_grid_with_checkbox.png)
+![Grid With Checkbox](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-08_grid_with_checkbox.png)
##### With Custom Checkbox #####
@@ -424,7 +424,7 @@ renderImg方法:
#####9,Grid With Little Paging #####
似ExtJS、EasyUI类分页工具条:
-![Grid With Little Paging](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-09_grid_with_little_paging.png)
+![Grid With Little Paging](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-09_grid_with_little_paging.png)
参看示例源码,仅需要设置参数pagingLittleToolbar值为true即可,默认值为false。
@@ -434,12 +434,12 @@ renderImg方法:
此处为了演示分页,后台使用jsp页面模拟分页数据,可以完整的展示排序,分页。
-![Standard Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-10_standard_grid.png)
+![Standard Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-10_standard_grid.png)
#####11,Multi Grid #####
支持一个页面显示多个grid:
-![Multi Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-11_multi_grid.png)
+![Multi Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-11_multi_grid.png)
##### Multi Extend Grid #####
@@ -449,7 +449,7 @@ renderImg方法:
#####12,Export Grid #####
bsgrid并不是提供导出Grid的页面数据功能,而是进行导出参数的组织:
-![Export Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-12_export_grid.png)
+![Export Grid](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-12_export_grid.png)
简单的grid导出参数URL类似如下:
http://bsgrid.oschina.mopaas.com/examples/grid/export.html?exportFileName=Export%2520Example&dataNames=XH%252CID%252CCHAR%252CTEXT%252CDATE%252CTIME%252CNUM&dataIndexs=XH,ID,CHAR,TEXT,DATE,TIME,NUM&dataLengths=50,50,150,300,150,150,50&dataAligns=center,center,left,left,center,center,center¶m1=param1¶m2=param2
@@ -486,7 +486,7 @@ http://bsgrid.oschina.mopaas.com/examples/grid/export.html?exportFileName=Export
特别注意:
JS原生的alert、confirm、prompt方法是阻塞的,而使用artDialog覆盖的alert、confirm、prompt方法是非阻塞的,artDialog覆盖的方法是用回调方式实现阻塞的等待执行代码效果,详细可参看示例:[Pop with ArtDialog](http://bsgrid.oschina.mopaas.com/examples/artDialog/pop.html)
-![Grid with ArtDialog](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-13_grid_with_artDialog.png)
+![Grid with ArtDialog](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-13_grid_with_artDialog.png)
需要额外引用的文件:
<link rel="stylesheet" href="../../plugins/artDialog/skins/blue.css"/>
@@ -506,4 +506,4 @@ artDialog需要引用的文件:artDialog/skins/blue.css、artDialog/jquery.art
#####14,Grid And Form with ArtDialog #####
结合ArtDialog使用,可以完成一个很好看的CRUD功能,详细可查看示例及示例源码:
-![Grid with ArtDialog](https://github.com/baishui2004/jquery.bsgrid/raw/v1.32/documention/images/jquery.bsgrid-14_grid_and_form_with_artDialog.png)
\ No newline at end of file
+![Grid with ArtDialog](https://github.com/baishui2004/jquery.bsgrid/raw/v1.33/documention/images/jquery.bsgrid-14_grid_and_form_with_artDialog.png)
\ No newline at end of file
diff --git a/builds/js/common.min.js b/builds/js/common.min.js
index 15ebff6..3696f22 100644
--- a/builds/js/common.min.js
+++ b/builds/js/common.min.js
@@ -1,5 +1,5 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
diff --git a/builds/js/export.min.js b/builds/js/export.min.js
index c03ffb0..64b6f17 100644
--- a/builds/js/export.min.js
+++ b/builds/js/export.min.js
@@ -1,5 +1,5 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
diff --git a/builds/js/form.min.js b/builds/js/form.min.js
index 03f04ce..005296c 100644
--- a/builds/js/form.min.js
+++ b/builds/js/form.min.js
@@ -1,5 +1,5 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
diff --git a/builds/js/grid.extend.min.js b/builds/js/grid.extend.min.js
index 64f28cc..04b6d9a 100644
--- a/builds/js/grid.extend.min.js
+++ b/builds/js/grid.extend.min.js
@@ -1,5 +1,5 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
diff --git a/builds/js/grid.min.js b/builds/js/grid.min.js
index 6046dcd..773aac7 100644
--- a/builds/js/grid.min.js
+++ b/builds/js/grid.min.js
@@ -1,6 +1,6 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
-(function($){$.fn.bsgrid={defaults:{dataType:"json",localData:false,url:"",otherParames:false,autoLoad:true,pageAll:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],multiSort:false,displayBlankRows:true,lineWrap:false,stripeRows:false,changeColorIfRowSelected:true,pagingLittleToolbar:false,pagingToolbarAlign:"right",pagingBtnClass:"pagingBtn",displayPagingToolbarOnlyMultiPages:false,isProcessLockScreen:true,longLengthAotoSubAndTip:true,colsProperties:{align:"center",maxLength:40,indexAttr:"w_index",sortAttr:"w_sort",alignAttr:"w_align",lengthAttr:"w_length",renderAttr:"w_render",hiddenAttr:"w_hidden",tipAttr:"w_tip"},requestParamsName:{pageSize:"pageSize",curPage:"curPage",sortName:"sortName",sortOrder:"sortOrder"},beforeSend:function(options,XMLHttpRequest){},complete:function(options,XMLHttpRequest,textStatus){},extend:{initGridMethods:{},beforeRenderGridMethods:{},renderPerRowMethods:{},renderPerColumnMethods:{},afterRenderGridMethods:{}},additionalBeforeRenderGrid:function(parseSuccess,gridData,options){},additionalRenderPerRow:function(record,rowIndex,trObj,options){},additionalRenderPerColumn:function(record,rowIndex,colIndex,tdObj,trObj,options){},additionalAfterRenderGrid:function(parseSuccess,gridData,options){}},gridObjs:{},init:function(gridId,settings){if(!$("#"+gridId).hasClass("bsgrid")){$("#"+gridId).addClass("bsgrid")}var options={settings:$.extend(true,{},$.fn.bsgrid.defaults,settings),gridId:gridId,noPagingationId:gridId+"_no_pagination",pagingOutTabId:gridId+"_pt_outTab",pagingId:gridId+"_pt",sortName:"",sortOrder:"",otherParames:settings.otherParames,totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};options.settings.dataType=options.settings.dataType.toLowerCase();if(options.settings.pageSizeSelect){if($.inArray(options.settings.pageSize,options.settings.pageSizeForGrid)==-1){options.settings.pageSizeForGrid.push(options.settings.pageSize)}options.settings.pageSizeForGrid.sort(function(a,b){return a-b})}var gridObj={options:options,getPageCondition:function(curPage){return $.fn.bsgrid.getPageCondition(curPage,options)},page:function(curPage){$.fn.bsgrid.page(curPage,options)},loadGridData:function(dataType,gridData){$.fn.bsgrid.loadGridData(dataType,gridData,options)},getSelectedRow:function(){return $.fn.bsgrid.getSelectedRow(options)},selectRow:function(row){return $.fn.bsgrid.selectRow(row,options)},unSelectRow:function(){return $.fn.bsgrid.unSelectRow(options)},getRowRecord:function(rowObj){return $.fn.bsgrid.getRowRecord(rowObj)},getRecord:function(row){return $.fn.bsgrid.getRecord(row,options)},getRecordIndexValue:function(record,index){return $.fn.bsgrid.getRecordIndexValue(record,index,options)},getColumnValue:function(row,index){return $.fn.bsgrid.getColumnValue(row,index,options)},sort:function(obj){$.fn.bsgrid.sort(obj,options)},getGridHeaderObject:function(){return $.fn.bsgrid.getGridHeaderObject(options)},getColumnAttr:function(colIndex,attrName){return $.fn.bsgrid.getColumnAttr(colIndex,attrName,options)},appendHeaderSort:function(){$.fn.bsgrid.appendHeaderSort(options)},setGridBlankBody:function(){$.fn.bsgrid.setGridBlankBody(options)},createPagingOutTab:function(){$.fn.bsgrid.createPagingOutTab(options)},clearGridBodyData:function(){$.fn.bsgrid.clearGridBodyData(options)},getCurPage:function(){return $.fn.bsgrid.getCurPage(options)},refreshPage:function(){$.fn.bsgrid.refreshPage(options)},firstPage:function(){$.fn.bsgrid.firstPage(options)},prevPage:function(){$.fn.bsgrid.prevPage(options)},nextPage:function(){$.fn.bsgrid.nextPage(options)},lastPage:function(){$.fn.bsgrid.lastPage(options)},gotoPage:function(goPage){$.fn.bsgrid.gotoPage(options,goPage)},initPaging:function(){return $.fn.bsgrid.initPaging(options)},setPagingValues:function(){$.fn.bsgrid.setPagingValues(options)}};$.fn.bsgrid.gridObjs[gridId]=gridObj;if(options.settings.pageAll||options.settings.pageSize<1){options.settings.pageAll=true;options.settings.pageSize=0}if($("#"+gridId).find("thead").length==0){$("#"+gridId).prepend(" ");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
\ No newline at end of file
+(function($){$.fn.bsgrid={defaults:{dataType:"json",localData:false,url:"",otherParames:false,autoLoad:true,pageAll:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pageIncorrectTurnAlert:true,multiSort:false,displayBlankRows:true,lineWrap:false,stripeRows:false,changeColorIfRowSelected:true,pagingLittleToolbar:false,pagingToolbarAlign:"right",pagingBtnClass:"pagingBtn",displayPagingToolbarOnlyMultiPages:false,isProcessLockScreen:true,longLengthAotoSubAndTip:true,colsProperties:{align:"center",maxLength:40,indexAttr:"w_index",sortAttr:"w_sort",alignAttr:"w_align",lengthAttr:"w_length",renderAttr:"w_render",hiddenAttr:"w_hidden",tipAttr:"w_tip"},requestParamsName:{pageSize:"pageSize",curPage:"curPage",sortName:"sortName",sortOrder:"sortOrder"},beforeSend:function(options,XMLHttpRequest){},complete:function(options,XMLHttpRequest,textStatus){},extend:{initGridMethods:{},beforeRenderGridMethods:{},renderPerRowMethods:{},renderPerColumnMethods:{},afterRenderGridMethods:{}},additionalBeforeRenderGrid:function(parseSuccess,gridData,options){},additionalRenderPerRow:function(record,rowIndex,trObj,options){},additionalRenderPerColumn:function(record,rowIndex,colIndex,tdObj,trObj,options){},additionalAfterRenderGrid:function(parseSuccess,gridData,options){}},gridObjs:{},init:function(gridId,settings){if(!$("#"+gridId).hasClass("bsgrid")){$("#"+gridId).addClass("bsgrid")}var options={settings:$.extend(true,{},$.fn.bsgrid.defaults,settings),gridId:gridId,noPagingationId:gridId+"_no_pagination",pagingOutTabId:gridId+"_pt_outTab",pagingId:gridId+"_pt",sortName:"",sortOrder:"",otherParames:settings.otherParames,totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};if(settings.pageSizeForGrid!=undefined){options.settings.pageSizeForGrid=settings.pageSizeForGrid}options.settings.dataType=options.settings.dataType.toLowerCase();if(options.settings.pageSizeSelect){if($.inArray(options.settings.pageSize,options.settings.pageSizeForGrid)==-1){options.settings.pageSizeForGrid.push(options.settings.pageSize)}options.settings.pageSizeForGrid.sort(function(a,b){return a-b})}var gridObj={options:options,getPageCondition:function(curPage){return $.fn.bsgrid.getPageCondition(curPage,options)},page:function(curPage){$.fn.bsgrid.page(curPage,options)},loadGridData:function(dataType,gridData){$.fn.bsgrid.loadGridData(dataType,gridData,options)},getSelectedRow:function(){return $.fn.bsgrid.getSelectedRow(options)},selectRow:function(row){return $.fn.bsgrid.selectRow(row,options)},unSelectRow:function(){return $.fn.bsgrid.unSelectRow(options)},getRowRecord:function(rowObj){return $.fn.bsgrid.getRowRecord(rowObj)},getRecord:function(row){return $.fn.bsgrid.getRecord(row,options)},getRecordIndexValue:function(record,index){return $.fn.bsgrid.getRecordIndexValue(record,index,options)},getColumnValue:function(row,index){return $.fn.bsgrid.getColumnValue(row,index,options)},sort:function(obj){$.fn.bsgrid.sort(obj,options)},getGridHeaderObject:function(){return $.fn.bsgrid.getGridHeaderObject(options)},getColumnAttr:function(colIndex,attrName){return $.fn.bsgrid.getColumnAttr(colIndex,attrName,options)},appendHeaderSort:function(){$.fn.bsgrid.appendHeaderSort(options)},setGridBlankBody:function(){$.fn.bsgrid.setGridBlankBody(options)},createPagingOutTab:function(){$.fn.bsgrid.createPagingOutTab(options)},clearGridBodyData:function(){$.fn.bsgrid.clearGridBodyData(options)},getCurPage:function(){return $.fn.bsgrid.getCurPage(options)},refreshPage:function(){$.fn.bsgrid.refreshPage(options)},firstPage:function(){$.fn.bsgrid.firstPage(options)},prevPage:function(){$.fn.bsgrid.prevPage(options)},nextPage:function(){$.fn.bsgrid.nextPage(options)},lastPage:function(){$.fn.bsgrid.lastPage(options)},gotoPage:function(goPage){$.fn.bsgrid.gotoPage(options,goPage)},initPaging:function(){return $.fn.bsgrid.initPaging(options)},setPagingValues:function(){$.fn.bsgrid.setPagingValues(options)}};$.fn.bsgrid.gridObjs[gridId]=gridObj;if(options.settings.pageAll||options.settings.pageSize<1){options.settings.pageAll=true;options.settings.pageSize=0}if($("#"+gridId).find("thead").length==0){$("#"+gridId).prepend(" ");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));curPage=Math.max(curPage,1);if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pageIncorrectTurnAlert:options.settings.pageIncorrectTurnAlert,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
\ No newline at end of file
diff --git a/builds/js/grid.paging.min.js b/builds/js/grid.paging.min.js
index 1a2d0f7..12a11f6 100644
--- a/builds/js/grid.paging.min.js
+++ b/builds/js/grid.paging.min.js
@@ -1,6 +1,6 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
-(function(a){a.fn.bsgrid_paging={defaults:{loopback:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pagingLittleToolbar:false,pagingBtnClass:"pagingBtn"},pagingObjs:{},init:function(h,g){var d={settings:a.extend(true,{},a.fn.bsgrid_paging.defaults,g),pagingId:h,totalRowsId:h+"_totalRows",totalPagesId:h+"_totalPages",curPageId:h+"_curPage",gotoPageInputId:h+"_gotoPageInput",gotoPageId:h+"_gotoPage",refreshPageId:h+"_refreshPage",pageSizeId:h+"_pageSize",firstPageId:h+"_firstPage",prevPageId:h+"_prevPage",nextPageId:h+"_nextPage",lastPageId:h+"_lastPage",startRowId:h+"_startRow",endRowId:h+"_endRow",totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};var b={options:d,page:function(i){a.fn.bsgrid_paging.page(i,d)},getCurPage:function(){return a.fn.bsgrid_paging.getCurPage(d)},refreshPage:function(){a.fn.bsgrid_paging.refreshPage(d)},firstPage:function(){a.fn.bsgrid_paging.firstPage(d)},prevPage:function(){a.fn.bsgrid_paging.prevPage(d)},nextPage:function(){a.fn.bsgrid_paging.nextPage(d)},lastPage:function(){a.fn.bsgrid_paging.lastPage(d)},gotoPage:function(i){a.fn.bsgrid_paging.gotoPage(d,i)},createPagingToolbar:function(){return a.fn.bsgrid_paging.createPagingToolbar(d)},setPagingToolbarEvents:function(){a.fn.bsgrid_paging.setPagingToolbarEvents(d)},dynamicChangePagingButtonStyle:function(){a.fn.bsgrid_paging.dynamicChangePagingButtonStyle(d)},setPagingValues:function(j,i){a.fn.bsgrid_paging.setPagingValues(j,i,d)}};a.fn.bsgrid_paging.pagingObjs[h]=b;a("#"+h).append(b.createPagingToolbar());if(d.settings.pageSizeSelect){if(a.inArray(d.settings.pageSize,d.settings.pageSizeForGrid)==-1){d.settings.pageSizeForGrid.push(d.settings.pageSize)}d.settings.pageSizeForGrid.sort(function(j,i){return j-i});var f=new StringBuilder();for(var e=0;e'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){alert(a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{alert(a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{alert(a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){alert(a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*b'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},incorrectTurnAlert:function(b,c){if(b.settings.pageIncorrectTurnAlert){alert(c)}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){i=Math.max(i,1);var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*bthis.length){return false}else{return this.substr(0,a.length)==a}};String.prototype.endWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}else{return this.substring(this.length-a.length)==a}};String.prototype.replaceAll=function(a,b){return this.replace(new RegExp(a,"gm"),b)};function StringBuilder(){if(arguments.length){this.append.apply(this,arguments)}}StringBuilder.prototype=function(){var c=Array.prototype.join,d=Array.prototype.slice,a=/\{(\d+)\}/g,b=function(){return c.call(this,"")};return{constructor:StringBuilder,length:0,append:Array.prototype.push,appendFormat:function(e){var g=0,f=d.call(arguments,1);this.append(a.test(e)?e.replace(a,function(h,j){return f[j]}):e.replace(/\?/g,function(){return f[g++]}));return this},size:function(){return this.toString().length},toString:b,valueOf:b}}();
$.bsgrid={param:function(c,b){if(b==undefined){b=false}if(!b){return $.param(c)}var d=new StringBuilder();if(c instanceof Array){$.each(c,function(f,e){d.append("&"+e.name+"=");d.append(encodeURIComponent(encodeURIComponent(e.value)))})}else{for(var a in c){d.append("&"+a+"=");d.append(encodeURIComponent(encodeURIComponent(c[a])))}}return d.length>0?d.toString().substring(1):""},getKeysString:function(c,a){if(a==undefined){a=","}var d=new StringBuilder();if(c instanceof Array){$.each(c,function(f,e){if((d.toString()+a).indexOf(a+e.name+a)==-1){d.append(a+e.name)}})}else{for(var b in c){d.append(a+b)}}return d.length>0?d.toString().substring(1):""},forcePushPropertyInObject:function(b,a,c){if(b.hasOwnProperty(a)){b[a+"_f"]=c}else{b[a]=c}},adaptAttrOrProp:function(b,d,c){var a=parseInt($.fn.jquery.substring(0,$.fn.jquery.indexOf(".",2)).replace(".",""));if(c==undefined){if(a>=16){return b.prop(d)}else{return b.attr(d)}}else{if(a>=16){b.prop(d,c)}else{b.attr(d,c)}}}};
-(function(a){a.fn.bsgrid_paging={defaults:{loopback:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pagingLittleToolbar:false,pagingBtnClass:"pagingBtn"},pagingObjs:{},init:function(h,g){var d={settings:a.extend(true,{},a.fn.bsgrid_paging.defaults,g),pagingId:h,totalRowsId:h+"_totalRows",totalPagesId:h+"_totalPages",curPageId:h+"_curPage",gotoPageInputId:h+"_gotoPageInput",gotoPageId:h+"_gotoPage",refreshPageId:h+"_refreshPage",pageSizeId:h+"_pageSize",firstPageId:h+"_firstPage",prevPageId:h+"_prevPage",nextPageId:h+"_nextPage",lastPageId:h+"_lastPage",startRowId:h+"_startRow",endRowId:h+"_endRow",totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};var b={options:d,page:function(i){a.fn.bsgrid_paging.page(i,d)},getCurPage:function(){return a.fn.bsgrid_paging.getCurPage(d)},refreshPage:function(){a.fn.bsgrid_paging.refreshPage(d)},firstPage:function(){a.fn.bsgrid_paging.firstPage(d)},prevPage:function(){a.fn.bsgrid_paging.prevPage(d)},nextPage:function(){a.fn.bsgrid_paging.nextPage(d)},lastPage:function(){a.fn.bsgrid_paging.lastPage(d)},gotoPage:function(i){a.fn.bsgrid_paging.gotoPage(d,i)},createPagingToolbar:function(){return a.fn.bsgrid_paging.createPagingToolbar(d)},setPagingToolbarEvents:function(){a.fn.bsgrid_paging.setPagingToolbarEvents(d)},dynamicChangePagingButtonStyle:function(){a.fn.bsgrid_paging.dynamicChangePagingButtonStyle(d)},setPagingValues:function(j,i){a.fn.bsgrid_paging.setPagingValues(j,i,d)}};a.fn.bsgrid_paging.pagingObjs[h]=b;a("#"+h).append(b.createPagingToolbar());if(d.settings.pageSizeSelect){if(a.inArray(d.settings.pageSize,d.settings.pageSizeForGrid)==-1){d.settings.pageSizeForGrid.push(d.settings.pageSize)}d.settings.pageSizeForGrid.sort(function(j,i){return j-i});var f=new StringBuilder();for(var e=0;e'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){alert(a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{alert(a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{alert(a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){alert(a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*b");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
+(function(a){a.fn.bsgrid_paging={defaults:{loopback:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pageIncorrectTurnAlert:true,pagingLittleToolbar:false,pagingBtnClass:"pagingBtn"},pagingObjs:{},init:function(h,g){var d={settings:a.extend(true,{},a.fn.bsgrid_paging.defaults,g),pagingId:h,totalRowsId:h+"_totalRows",totalPagesId:h+"_totalPages",curPageId:h+"_curPage",gotoPageInputId:h+"_gotoPageInput",gotoPageId:h+"_gotoPage",refreshPageId:h+"_refreshPage",pageSizeId:h+"_pageSize",firstPageId:h+"_firstPage",prevPageId:h+"_prevPage",nextPageId:h+"_nextPage",lastPageId:h+"_lastPage",startRowId:h+"_startRow",endRowId:h+"_endRow",totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};if(g.pageSizeForGrid!=undefined){d.settings.pageSizeForGrid=g.pageSizeForGrid}var b={options:d,page:function(i){a.fn.bsgrid_paging.page(i,d)},getCurPage:function(){return a.fn.bsgrid_paging.getCurPage(d)},refreshPage:function(){a.fn.bsgrid_paging.refreshPage(d)},firstPage:function(){a.fn.bsgrid_paging.firstPage(d)},prevPage:function(){a.fn.bsgrid_paging.prevPage(d)},nextPage:function(){a.fn.bsgrid_paging.nextPage(d)},lastPage:function(){a.fn.bsgrid_paging.lastPage(d)},gotoPage:function(i){a.fn.bsgrid_paging.gotoPage(d,i)},createPagingToolbar:function(){return a.fn.bsgrid_paging.createPagingToolbar(d)},setPagingToolbarEvents:function(){a.fn.bsgrid_paging.setPagingToolbarEvents(d)},dynamicChangePagingButtonStyle:function(){a.fn.bsgrid_paging.dynamicChangePagingButtonStyle(d)},setPagingValues:function(j,i){a.fn.bsgrid_paging.setPagingValues(j,i,d)}};a.fn.bsgrid_paging.pagingObjs[h]=b;a("#"+h).append(b.createPagingToolbar());if(d.settings.pageSizeSelect){if(a.inArray(d.settings.pageSize,d.settings.pageSizeForGrid)==-1){d.settings.pageSizeForGrid.push(d.settings.pageSize)}d.settings.pageSizeForGrid.sort(function(j,i){return j-i});var f=new StringBuilder();for(var e=0;e'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},incorrectTurnAlert:function(b,c){if(b.settings.pageIncorrectTurnAlert){alert(c)}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){i=Math.max(i,1);var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*b");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));curPage=Math.max(curPage,1);if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pageIncorrectTurnAlert:options.settings.pageIncorrectTurnAlert,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
(function(a){a.fn.bsgrid.defaults.extend.settings={supportGridEdit:false,supportGridEditTriggerEvent:"rowClick",supportColumnMove:false,searchConditionsContainerId:"",fixedGridHeader:false,fixedGridHeight:"320px"};a.fn.bsgrid.defaults.colsProperties.lineNumberAttr="w_num";a.fn.bsgrid.defaults.colsProperties.checkAttr="w_check";a.fn.bsgrid.defaults.colsProperties.editAttr="w_edit";a.fn.bsgrid.defaults.colsProperties.aggAttr="w_agg";a.fn.bsgrid.extendInitGrid={};a.fn.bsgrid.extendBeforeRenderGrid={};a.fn.bsgrid.extendRenderPerRow={};a.fn.bsgrid.extendRenderPerColumn={};a.fn.bsgrid.extendAfterRenderGrid={};a.fn.bsgrid.extendOtherMethods={};a.fn.bsgrid.extendOtherMethods.fixedHeader=function(b,c){if(a.trim(a("#"+c.gridId+"_fixedDiv").data("fixedGridLock"))=="lock"){return}a("#"+c.gridId+"_fixedDiv").data("fixedGridLock","lock");var e=a("#"+c.gridId+" thead tr").length;if(!b){e=e/2;a("#"+c.gridId+" thead tr:lt("+e+")").remove()}var d=f(c.settings.extend.settings.fixedGridHeight);if(d');a("#"+b+"_fixedDiv").data("fixedGridLock","");a("#"+b+"_fixedDiv").css({padding:0,"border-width":0,width:"98%","overflow-y":"auto","margin-bottom":"-1px"});a("#"+b).css({width:"auto"});a("#"+b+"_pt_outTab").css({"border-top-width":"1px"});a.fn.bsgrid.extendOtherMethods.fixedHeader(true,c);a(window).resize(function(){a.fn.bsgrid.extendOtherMethods.fixedHeader(false,c)})});a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"fixedHeader",function(d,c,b){if(b.settings.extend.settings.fixedGridHeader){a.fn.bsgrid.extendOtherMethods.fixedHeader(false,b)}});a.fn.bsgrid.extendInitGrid.bindExtendMethods=function(b,c){var d=a.fn.bsgrid.getGridObj(b);d.getCheckedRowsIndexs=function(){return a.fn.bsgrid.defaults.extend.getCheckedRowsIndexs(c)};d.getCheckedRowsRecords=function(){return a.fn.bsgrid.defaults.extend.getCheckedRowsRecords(c)};d.activeGridEditMode=function(){return a.fn.bsgrid.defaults.extend.activeGridEditMode(c)};d.getChangedRowsIndexs=function(){return a.fn.bsgrid.defaults.extend.getChangedRowsIndexs(c)};d.getChangedRowsOldRecords=function(){return a.fn.bsgrid.defaults.extend.getChangedRowsOldRecords(c)};d.getRowsChangedColumnsValue=function(){return a.fn.bsgrid.defaults.extend.getRowsChangedColumnsValue(c)}};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.initGridMethods,"bindExtendMethods",a.fn.bsgrid.extendInitGrid.bindExtendMethods);a.fn.bsgrid.extendInitGrid.initGridCheck=function(b,c){a.fn.bsgrid.getGridHeaderObject(c).each(function(e){var d=a.trim(a(this).attr(c.settings.colsProperties.checkAttr));if(d=="true"){if(a.trim(a(this).html())==""){a(this).html(' ')}a(this).find("input[type=checkbox]").change(function(){var f=a.bsgrid.adaptAttrOrProp(a(this),"checked")?true:false;a.bsgrid.adaptAttrOrProp(a("#"+b+" tbody tr td:nth-child("+(e+1)+")>input[type=checkbox]"),"checked",f)})}})};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.initGridMethods,"initGridCheck",a.fn.bsgrid.extendInitGrid.initGridCheck);a.fn.bsgrid.extendInitGrid.initSearchConditions=function(b,c){if(a.trim(c.settings.extend.settings.searchConditionsContainerId)==""){return}var e=new StringBuilder();e.append('');var f={};a.fn.bsgrid.getGridHeaderObject(c).each(function(){var g=a.trim(a(this).attr(c.settings.colsProperties.indexAttr));var h=a.trim(a(this).text());if(g!=""&&h!=""&&a.trim(f[g])==""){f[g]=h}});for(var d in f){e.append(''+f[d]+" ")}e.append(" ");e.append(" ");e.append(' ');a("#"+c.settings.extend.settings.searchConditionsContainerId).html(e.toString());a("#"+c.settings.extend.settings.searchConditionsContainerId+" select.bsgrid_conditions_select").change(function(){a(this).next("input.bsgrid_conditions_input").attr("name",a(this).val())}).trigger("change")};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.initGridMethods,"initSearchConditions",a.fn.bsgrid.extendInitGrid.initSearchConditions);a.fn.bsgrid.extendInitGrid.initColumnMove=function(c,d){if(!d.settings.extend.settings.supportColumnMove||a("#"+d.gridId+" thead tr").length!=1){return}a("#"+d.gridId).css({"table-layout":"fixed"});var e=a.fn.bsgrid.getGridHeaderObject(d);var b=e.length;e.each(function(g){var h=this;a(h).mousedown(function(){f(h,g,b)});a(h).mousemove(function(){var q=a(h).offset().left;var n=0,o=0;if(g!=b-1){n=a(h).next();o=n.offset().left}var p=h;if(g!=b-1&&event.clientX-o>-10){p=n}if((g!=0&&event.clientX-q<10)||(g!=b-1&&event.clientX-o>-10)){a(h).css({cursor:"e-resize"});if(a.trim(a(h).data("ex_mousedown"))!="mousedown"){return}var l=a(p).width();var m=l-event.clientX+a(p).offset().left;var k=a(p).prev().width();var i=k+event.clientX-a(p).offset().left;if(parseInt(m)>19&&parseInt(i)>19){a(p).width(m).prev().width(i)}}else{a(p).css({cursor:"default"});j(h,g,b)}});a(h).mouseup(function(){j(h,g,b)});a(h).mouseout(function(){var i=a(h).offset();if(i.top>event.clientY||i.top+a(h).height() '}}return false};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.renderPerColumnMethods,"renderCheck",a.fn.bsgrid.extendRenderPerColumn.renderCheck);a.fn.bsgrid.extendRenderPerColumn.renderForm=function(d,g,j,c,f,k){if(k.settings.extend.settings.supportGridEdit&&g '}else{if(i=="text"||i=="hidden"||i=="password"||i=="radio"||i=="button"){return h+' '}else{if(i=="textarea"){return h+'"}}}}return false};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.renderPerColumnMethods,"renderForm",a.fn.bsgrid.extendRenderPerColumn.renderForm);a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"renderLineNumber",function(d,c,b){a.fn.bsgrid.getGridHeaderObject(b).each(function(f){var e=a.trim(a(this).attr(b.settings.colsProperties.lineNumberAttr));if(e=="line"||e=="total_line"){a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+") td:nth-child("+(f+1)+")").each(function(g){a(this).html((e=="line")?(g+1):(g+b.startRow))})}})});a.fn.bsgrid.extendAfterRenderGrid.addCheckChangedEvent=function(d,c,b){a.fn.bsgrid.getGridHeaderObject(b).each(function(f){var e=a.trim(a(this).attr(b.settings.colsProperties.checkAttr));if(e=="true"){var h=a(this).find("input[type=checkbox]");var g=a("#"+b.gridId+" tbody tr td:nth-child("+(f+1)+")>input[type=checkbox]");g.change(function(){var i=a.bsgrid.adaptAttrOrProp(h,"checked")?true:false;if(!i&&g.filter(":checked").length==g.length){a.bsgrid.adaptAttrOrProp(h,"checked",true)}else{if(i&&g.filter(":checked").length!=g.length){a.bsgrid.adaptAttrOrProp(h,"checked",false)}}})}})};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"addCheckChangedEvent",a.fn.bsgrid.extendAfterRenderGrid.addCheckChangedEvent);a.fn.bsgrid.extendAfterRenderGrid.addGridEditEvent=function(e,c,b){if(!b.settings.extend.settings.supportGridEdit){return}a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+")").each(function(f){var g=this;a(g).find("td").each(function(i){var l=a.fn.bsgrid.getGridObj(b.gridId);var h=l.getColumnAttr(i,b.settings.colsProperties.indexAttr);var j=l.getColumnAttr(i,b.settings.colsProperties.editAttr);var k=l.getColumnValue(f,h);if(j!=""){a(this).find(".bsgrid_editgrid_checkbox, .bsgrid_editgrid_edit").change(function(){if(a.trim(a(this).val())!=k){a(this).addClass("bsgrid_editgrid_change")}else{a(this).removeClass("bsgrid_editgrid_change")}a(g).data("change",a(g).find(".bsgrid_editgrid_change").length)})}});if(b.settings.extend.settings.supportGridEditTriggerEvent==""){a(this).find(".bsgrid_editgrid_hidden").each(function(){d(this)})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="rowClick"){a(this).click(function(){a(this).find(".bsgrid_editgrid_hidden").each(function(){d(this)})})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="rowDoubleClick"){a(this).dblclick(function(){a(this).find(".bsgrid_editgrid_hidden").each(function(){d(this)})})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="cellClick"){a(this).find(".bsgrid_editgrid_hidden").each(function(){var h=this;a(h).parent("td").click(function(){d(h)})})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="cellDoubleClick"){a(this).find(".bsgrid_editgrid_hidden").each(function(){var h=this;a(h).parent("td").dblclick(function(){d(h)})})}}}}}});function d(f){var g=a(f).removeClass("bsgrid_editgrid_hidden").clone(true);a(f).parent("td").html(g)}};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"addGridEditEvent",a.fn.bsgrid.extendAfterRenderGrid.addGridEditEvent);a.fn.bsgrid.extendAfterRenderGrid.aggregation=function(f,c,b){var d=b.settings.colsProperties.aggAttr;if(a("#"+b.gridId+" tfoot td["+d+"!='']").length==0){return}var e=a.fn.bsgrid.getGridObj(b.gridId);a("#"+b.gridId+" tfoot tr td["+d+"!='']").each(function(){var g=a.trim(a(this).attr(d));if(g.length!=0){var h=g.split(",");var l=h[0].toLocaleLowerCase();var j=h.length>1?h[1]:"";var k=null;if(l=="count"){k=b.curPageRowsNum}else{if(l=="countnotnone"||l=="sum"||l=="avg"||l=="max"||l=="min"||l=="concat"){if(l=="countnotnone"){k=0}var i=new StringBuilder();a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+")").each(function(m){var n=e.getColumnValue(m,j);if(n==""){}else{if(l=="countnotnone"){k=(k==null?0:k)+1}else{if(l=="sum"||l=="avg"){if(!isNaN(n)){k=(k==null?0:k)+parseFloat(n)}}else{if(l=="max"||l=="min"){if(!isNaN(n)&&(k==null||(l=="max"&&parseFloat(n)>k)||(l=="min"&&parseFloat(n)input:checked").length==1){c[c.length]=d}});return c};a.fn.bsgrid.defaults.extend.getCheckedRowsRecords=function(c){var b=[];a.each(a.fn.bsgrid.defaults.extend.getCheckedRowsIndexs(c),function(d,e){b[b.length]=a.fn.bsgrid.getRecord(e,c)});return b};a.fn.bsgrid.defaults.extend.activeGridEditMode=function(b){if(!b.settings.extend.settings.supportGridEdit){return}a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+") td .bsgrid_editgrid_hidden").each(function(){var c=a(this).removeClass("bsgrid_editgrid_hidden").clone(true);a(this).parent("td").html(c)})};a.fn.bsgrid.defaults.extend.getChangedRowsIndexs=function(b){var c=[];a("#"+b.gridId+" tbody tr").each(function(d){var e=a.trim(a(this).data("change"));if(!isNaN(e)&&parseInt(e)>0){c[c.length]=d}});return c};a.fn.bsgrid.defaults.extend.getChangedRowsOldRecords=function(c){var b=[];a.each(a.fn.bsgrid.defaults.extend.getChangedRowsIndexs(c),function(d,e){b[b.length]=a.fn.bsgrid.getRecord(e,c)});return b};a.fn.bsgrid.defaults.extend.getRowsChangedColumnsValue=function(c){var b={};var d=a.fn.bsgrid.getGridObj(c.gridId);a.each(a.fn.bsgrid.defaults.extend.getChangedRowsIndexs(c),function(e,f){b["row_"+f]={};a("#"+c.gridId+" tbody tr:eq("+f+") td").each(function(h){if(a(this).find(".bsgrid_editgrid_change").length>0){var g=d.getColumnAttr(h,c.settings.colsProperties.indexAttr);b["row_"+f][g]=a(this).find(".bsgrid_editgrid_change").val()}})});return b}})(jQuery);
(function(a){a.bsgrid_export={defaults:{url:"",exportFileName:"export",colsProperties:{width:100,align:"center",exportAttr:"w_export",indexAttr:"w_index",widthAttr:"width",alignAttr:"w_align"},colWidthPercentmultiplier:14,requestParamsName:{exportFileName:"exportFileName",colNames:"dataNames",colIndexs:"dataIndexs",colWidths:"dataLengths",colAligns:"dataAligns"}},doExport:function(g,l,c){if(l==undefined){l={}}var b={};if(c==undefined){c={}}a.extend(true,b,a.bsgrid_export.defaults,c);var n="",f="",m="",h="";for(var e=0;e ');var d=a(this).get(0).attributes;for(var e=0;e')})},showForm:function(b,c){b.formType=c;this.showOrHideRequireSpan(b,c);this.showOrHideAssistForms(b,c);this.showOrHideTag(b,c);if(c.startWith("view")){a(".formInput :input:not(:button,:submit,:reset)",b.jqueryObj).css({"border-width":"0"}).attr("readOnly","readOnly")}else{if(c.startWith("add")){a(".formInput :input:not(:button,:submit,:reset)",b.jqueryObj).css({border:"solid 1px #abadb3"}).removeAttr("readOnly")}else{if(c.startWith("edit")){a(".formInput :input:not(:button,:submit,:reset)",b.jqueryObj).css({border:"solid 1px #abadb3"}).removeAttr("readOnly");a(".formInput :input["+c+"Able=false]",b.jqueryObj).css({"border-width":"0"}).attr("readOnly","readOnly")}}}},showOrHideRequireSpan:function(b,c){if(c.startWith("view")){a(".formLabel span.require",b.jqueryObj).hide()}else{if(c.startWith("edit")){a(".formLabel:has(span.require) ~ .formInput:has(:input["+c+"Able=false])",b.jqueryObj).prev().find("span.require").hide()}else{a(".formLabel span.require",b.jqueryObj).show()}}},showOrHideAssistForms:function(b,c){a(".formInput select",b.jqueryObj).each(function(){var e=(c.startWith("view")||(c.startWith("edit")&&a(this).attr(c+"Able")=="false"))?"block":"none";a(this).prev("input").css("display",e).val(a(this).find("option:selected").text());var d=e=="block"?"none":"block";a(this).css("display",d)});a(".formInput textarea",b.jqueryObj).each(function(){var e=(c.startWith("view")||(c.startWith("edit")&&a(this).attr(c+"Able")=="false"))?"block":"none";a(this).prev("div").css("display",e).html(a(this).val());var d=e=="block"?"none":"block";a(this).css("display",d)})},showOrHideTag:function(b,c){a("*",b.jqueryObj).each(function(){var d=a.trim(a(this).attr("showType"));if(d!=""){if((c.startWith("view")||c.startWith("add")||c.startWith("edit"))&&(","+d+",").indexOf(","+c+",")>-1){a(this).show()}else{a(this).hide()}}})}}})(jQuery);
diff --git a/builds/merged/form.all.min.js b/builds/merged/form.all.min.js
index 6ba73cd..bb848ee 100644
--- a/builds/merged/form.all.min.js
+++ b/builds/merged/form.all.min.js
@@ -1,5 +1,5 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
diff --git a/builds/merged/grid.all.min.js b/builds/merged/grid.all.min.js
index b6b181a..b775153 100644
--- a/builds/merged/grid.all.min.js
+++ b/builds/merged/grid.all.min.js
@@ -1,12 +1,12 @@
/**
-* jQuery.bsgrid v1.32 by @Baishui2004
+* jQuery.bsgrid v1.33 by @Baishui2004
* Copyright 2014 Apache v2 License
* https://github.com/baishui2004/jquery.bsgrid
*/
String.prototype.startWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}else{return this.substr(0,a.length)==a}};String.prototype.endWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}else{return this.substring(this.length-a.length)==a}};String.prototype.replaceAll=function(a,b){return this.replace(new RegExp(a,"gm"),b)};function StringBuilder(){if(arguments.length){this.append.apply(this,arguments)}}StringBuilder.prototype=function(){var c=Array.prototype.join,d=Array.prototype.slice,a=/\{(\d+)\}/g,b=function(){return c.call(this,"")};return{constructor:StringBuilder,length:0,append:Array.prototype.push,appendFormat:function(e){var g=0,f=d.call(arguments,1);this.append(a.test(e)?e.replace(a,function(h,j){return f[j]}):e.replace(/\?/g,function(){return f[g++]}));return this},size:function(){return this.toString().length},toString:b,valueOf:b}}();
$.bsgrid={param:function(c,b){if(b==undefined){b=false}if(!b){return $.param(c)}var d=new StringBuilder();if(c instanceof Array){$.each(c,function(f,e){d.append("&"+e.name+"=");d.append(encodeURIComponent(encodeURIComponent(e.value)))})}else{for(var a in c){d.append("&"+a+"=");d.append(encodeURIComponent(encodeURIComponent(c[a])))}}return d.length>0?d.toString().substring(1):""},getKeysString:function(c,a){if(a==undefined){a=","}var d=new StringBuilder();if(c instanceof Array){$.each(c,function(f,e){if((d.toString()+a).indexOf(a+e.name+a)==-1){d.append(a+e.name)}})}else{for(var b in c){d.append(a+b)}}return d.length>0?d.toString().substring(1):""},forcePushPropertyInObject:function(b,a,c){if(b.hasOwnProperty(a)){b[a+"_f"]=c}else{b[a]=c}},adaptAttrOrProp:function(b,d,c){var a=parseInt($.fn.jquery.substring(0,$.fn.jquery.indexOf(".",2)).replace(".",""));if(c==undefined){if(a>=16){return b.prop(d)}else{return b.attr(d)}}else{if(a>=16){b.prop(d,c)}else{b.attr(d,c)}}}};
-(function(a){a.fn.bsgrid_paging={defaults:{loopback:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pagingLittleToolbar:false,pagingBtnClass:"pagingBtn"},pagingObjs:{},init:function(h,g){var d={settings:a.extend(true,{},a.fn.bsgrid_paging.defaults,g),pagingId:h,totalRowsId:h+"_totalRows",totalPagesId:h+"_totalPages",curPageId:h+"_curPage",gotoPageInputId:h+"_gotoPageInput",gotoPageId:h+"_gotoPage",refreshPageId:h+"_refreshPage",pageSizeId:h+"_pageSize",firstPageId:h+"_firstPage",prevPageId:h+"_prevPage",nextPageId:h+"_nextPage",lastPageId:h+"_lastPage",startRowId:h+"_startRow",endRowId:h+"_endRow",totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};var b={options:d,page:function(i){a.fn.bsgrid_paging.page(i,d)},getCurPage:function(){return a.fn.bsgrid_paging.getCurPage(d)},refreshPage:function(){a.fn.bsgrid_paging.refreshPage(d)},firstPage:function(){a.fn.bsgrid_paging.firstPage(d)},prevPage:function(){a.fn.bsgrid_paging.prevPage(d)},nextPage:function(){a.fn.bsgrid_paging.nextPage(d)},lastPage:function(){a.fn.bsgrid_paging.lastPage(d)},gotoPage:function(i){a.fn.bsgrid_paging.gotoPage(d,i)},createPagingToolbar:function(){return a.fn.bsgrid_paging.createPagingToolbar(d)},setPagingToolbarEvents:function(){a.fn.bsgrid_paging.setPagingToolbarEvents(d)},dynamicChangePagingButtonStyle:function(){a.fn.bsgrid_paging.dynamicChangePagingButtonStyle(d)},setPagingValues:function(j,i){a.fn.bsgrid_paging.setPagingValues(j,i,d)}};a.fn.bsgrid_paging.pagingObjs[h]=b;a("#"+h).append(b.createPagingToolbar());if(d.settings.pageSizeSelect){if(a.inArray(d.settings.pageSize,d.settings.pageSizeForGrid)==-1){d.settings.pageSizeForGrid.push(d.settings.pageSize)}d.settings.pageSizeForGrid.sort(function(j,i){return j-i});var f=new StringBuilder();for(var e=0;e'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){alert(a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{alert(a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{alert(a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){alert(a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*b");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
+(function(a){a.fn.bsgrid_paging={defaults:{loopback:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pageIncorrectTurnAlert:true,pagingLittleToolbar:false,pagingBtnClass:"pagingBtn"},pagingObjs:{},init:function(h,g){var d={settings:a.extend(true,{},a.fn.bsgrid_paging.defaults,g),pagingId:h,totalRowsId:h+"_totalRows",totalPagesId:h+"_totalPages",curPageId:h+"_curPage",gotoPageInputId:h+"_gotoPageInput",gotoPageId:h+"_gotoPage",refreshPageId:h+"_refreshPage",pageSizeId:h+"_pageSize",firstPageId:h+"_firstPage",prevPageId:h+"_prevPage",nextPageId:h+"_nextPage",lastPageId:h+"_lastPage",startRowId:h+"_startRow",endRowId:h+"_endRow",totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};if(g.pageSizeForGrid!=undefined){d.settings.pageSizeForGrid=g.pageSizeForGrid}var b={options:d,page:function(i){a.fn.bsgrid_paging.page(i,d)},getCurPage:function(){return a.fn.bsgrid_paging.getCurPage(d)},refreshPage:function(){a.fn.bsgrid_paging.refreshPage(d)},firstPage:function(){a.fn.bsgrid_paging.firstPage(d)},prevPage:function(){a.fn.bsgrid_paging.prevPage(d)},nextPage:function(){a.fn.bsgrid_paging.nextPage(d)},lastPage:function(){a.fn.bsgrid_paging.lastPage(d)},gotoPage:function(i){a.fn.bsgrid_paging.gotoPage(d,i)},createPagingToolbar:function(){return a.fn.bsgrid_paging.createPagingToolbar(d)},setPagingToolbarEvents:function(){a.fn.bsgrid_paging.setPagingToolbarEvents(d)},dynamicChangePagingButtonStyle:function(){a.fn.bsgrid_paging.dynamicChangePagingButtonStyle(d)},setPagingValues:function(j,i){a.fn.bsgrid_paging.setPagingValues(j,i,d)}};a.fn.bsgrid_paging.pagingObjs[h]=b;a("#"+h).append(b.createPagingToolbar());if(d.settings.pageSizeSelect){if(a.inArray(d.settings.pageSize,d.settings.pageSizeForGrid)==-1){d.settings.pageSizeForGrid.push(d.settings.pageSize)}d.settings.pageSizeForGrid.sort(function(j,i){return j-i});var f=new StringBuilder();for(var e=0;e'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},incorrectTurnAlert:function(b,c){if(b.settings.pageIncorrectTurnAlert){alert(c)}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){i=Math.max(i,1);var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*b");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));curPage=Math.max(curPage,1);if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pageIncorrectTurnAlert:options.settings.pageIncorrectTurnAlert,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
(function(a){a.fn.bsgrid.defaults.extend.settings={supportGridEdit:false,supportGridEditTriggerEvent:"rowClick",supportColumnMove:false,searchConditionsContainerId:"",fixedGridHeader:false,fixedGridHeight:"320px"};a.fn.bsgrid.defaults.colsProperties.lineNumberAttr="w_num";a.fn.bsgrid.defaults.colsProperties.checkAttr="w_check";a.fn.bsgrid.defaults.colsProperties.editAttr="w_edit";a.fn.bsgrid.defaults.colsProperties.aggAttr="w_agg";a.fn.bsgrid.extendInitGrid={};a.fn.bsgrid.extendBeforeRenderGrid={};a.fn.bsgrid.extendRenderPerRow={};a.fn.bsgrid.extendRenderPerColumn={};a.fn.bsgrid.extendAfterRenderGrid={};a.fn.bsgrid.extendOtherMethods={};a.fn.bsgrid.extendOtherMethods.fixedHeader=function(b,c){if(a.trim(a("#"+c.gridId+"_fixedDiv").data("fixedGridLock"))=="lock"){return}a("#"+c.gridId+"_fixedDiv").data("fixedGridLock","lock");var e=a("#"+c.gridId+" thead tr").length;if(!b){e=e/2;a("#"+c.gridId+" thead tr:lt("+e+")").remove()}var d=f(c.settings.extend.settings.fixedGridHeight);if(d');a("#"+b+"_fixedDiv").data("fixedGridLock","");a("#"+b+"_fixedDiv").css({padding:0,"border-width":0,width:"98%","overflow-y":"auto","margin-bottom":"-1px"});a("#"+b).css({width:"auto"});a("#"+b+"_pt_outTab").css({"border-top-width":"1px"});a.fn.bsgrid.extendOtherMethods.fixedHeader(true,c);a(window).resize(function(){a.fn.bsgrid.extendOtherMethods.fixedHeader(false,c)})});a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"fixedHeader",function(d,c,b){if(b.settings.extend.settings.fixedGridHeader){a.fn.bsgrid.extendOtherMethods.fixedHeader(false,b)}});a.fn.bsgrid.extendInitGrid.bindExtendMethods=function(b,c){var d=a.fn.bsgrid.getGridObj(b);d.getCheckedRowsIndexs=function(){return a.fn.bsgrid.defaults.extend.getCheckedRowsIndexs(c)};d.getCheckedRowsRecords=function(){return a.fn.bsgrid.defaults.extend.getCheckedRowsRecords(c)};d.activeGridEditMode=function(){return a.fn.bsgrid.defaults.extend.activeGridEditMode(c)};d.getChangedRowsIndexs=function(){return a.fn.bsgrid.defaults.extend.getChangedRowsIndexs(c)};d.getChangedRowsOldRecords=function(){return a.fn.bsgrid.defaults.extend.getChangedRowsOldRecords(c)};d.getRowsChangedColumnsValue=function(){return a.fn.bsgrid.defaults.extend.getRowsChangedColumnsValue(c)}};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.initGridMethods,"bindExtendMethods",a.fn.bsgrid.extendInitGrid.bindExtendMethods);a.fn.bsgrid.extendInitGrid.initGridCheck=function(b,c){a.fn.bsgrid.getGridHeaderObject(c).each(function(e){var d=a.trim(a(this).attr(c.settings.colsProperties.checkAttr));if(d=="true"){if(a.trim(a(this).html())==""){a(this).html(' ')}a(this).find("input[type=checkbox]").change(function(){var f=a.bsgrid.adaptAttrOrProp(a(this),"checked")?true:false;a.bsgrid.adaptAttrOrProp(a("#"+b+" tbody tr td:nth-child("+(e+1)+")>input[type=checkbox]"),"checked",f)})}})};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.initGridMethods,"initGridCheck",a.fn.bsgrid.extendInitGrid.initGridCheck);a.fn.bsgrid.extendInitGrid.initSearchConditions=function(b,c){if(a.trim(c.settings.extend.settings.searchConditionsContainerId)==""){return}var e=new StringBuilder();e.append('');var f={};a.fn.bsgrid.getGridHeaderObject(c).each(function(){var g=a.trim(a(this).attr(c.settings.colsProperties.indexAttr));var h=a.trim(a(this).text());if(g!=""&&h!=""&&a.trim(f[g])==""){f[g]=h}});for(var d in f){e.append(''+f[d]+" ")}e.append(" ");e.append(" ");e.append(' ');a("#"+c.settings.extend.settings.searchConditionsContainerId).html(e.toString());a("#"+c.settings.extend.settings.searchConditionsContainerId+" select.bsgrid_conditions_select").change(function(){a(this).next("input.bsgrid_conditions_input").attr("name",a(this).val())}).trigger("change")};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.initGridMethods,"initSearchConditions",a.fn.bsgrid.extendInitGrid.initSearchConditions);a.fn.bsgrid.extendInitGrid.initColumnMove=function(c,d){if(!d.settings.extend.settings.supportColumnMove||a("#"+d.gridId+" thead tr").length!=1){return}a("#"+d.gridId).css({"table-layout":"fixed"});var e=a.fn.bsgrid.getGridHeaderObject(d);var b=e.length;e.each(function(g){var h=this;a(h).mousedown(function(){f(h,g,b)});a(h).mousemove(function(){var q=a(h).offset().left;var n=0,o=0;if(g!=b-1){n=a(h).next();o=n.offset().left}var p=h;if(g!=b-1&&event.clientX-o>-10){p=n}if((g!=0&&event.clientX-q<10)||(g!=b-1&&event.clientX-o>-10)){a(h).css({cursor:"e-resize"});if(a.trim(a(h).data("ex_mousedown"))!="mousedown"){return}var l=a(p).width();var m=l-event.clientX+a(p).offset().left;var k=a(p).prev().width();var i=k+event.clientX-a(p).offset().left;if(parseInt(m)>19&&parseInt(i)>19){a(p).width(m).prev().width(i)}}else{a(p).css({cursor:"default"});j(h,g,b)}});a(h).mouseup(function(){j(h,g,b)});a(h).mouseout(function(){var i=a(h).offset();if(i.top>event.clientY||i.top+a(h).height() '}}return false};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.renderPerColumnMethods,"renderCheck",a.fn.bsgrid.extendRenderPerColumn.renderCheck);a.fn.bsgrid.extendRenderPerColumn.renderForm=function(d,g,j,c,f,k){if(k.settings.extend.settings.supportGridEdit&&g '}else{if(i=="text"||i=="hidden"||i=="password"||i=="radio"||i=="button"){return h+' '}else{if(i=="textarea"){return h+'"}}}}return false};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.renderPerColumnMethods,"renderForm",a.fn.bsgrid.extendRenderPerColumn.renderForm);a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"renderLineNumber",function(d,c,b){a.fn.bsgrid.getGridHeaderObject(b).each(function(f){var e=a.trim(a(this).attr(b.settings.colsProperties.lineNumberAttr));if(e=="line"||e=="total_line"){a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+") td:nth-child("+(f+1)+")").each(function(g){a(this).html((e=="line")?(g+1):(g+b.startRow))})}})});a.fn.bsgrid.extendAfterRenderGrid.addCheckChangedEvent=function(d,c,b){a.fn.bsgrid.getGridHeaderObject(b).each(function(f){var e=a.trim(a(this).attr(b.settings.colsProperties.checkAttr));if(e=="true"){var h=a(this).find("input[type=checkbox]");var g=a("#"+b.gridId+" tbody tr td:nth-child("+(f+1)+")>input[type=checkbox]");g.change(function(){var i=a.bsgrid.adaptAttrOrProp(h,"checked")?true:false;if(!i&&g.filter(":checked").length==g.length){a.bsgrid.adaptAttrOrProp(h,"checked",true)}else{if(i&&g.filter(":checked").length!=g.length){a.bsgrid.adaptAttrOrProp(h,"checked",false)}}})}})};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"addCheckChangedEvent",a.fn.bsgrid.extendAfterRenderGrid.addCheckChangedEvent);a.fn.bsgrid.extendAfterRenderGrid.addGridEditEvent=function(e,c,b){if(!b.settings.extend.settings.supportGridEdit){return}a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+")").each(function(f){var g=this;a(g).find("td").each(function(i){var l=a.fn.bsgrid.getGridObj(b.gridId);var h=l.getColumnAttr(i,b.settings.colsProperties.indexAttr);var j=l.getColumnAttr(i,b.settings.colsProperties.editAttr);var k=l.getColumnValue(f,h);if(j!=""){a(this).find(".bsgrid_editgrid_checkbox, .bsgrid_editgrid_edit").change(function(){if(a.trim(a(this).val())!=k){a(this).addClass("bsgrid_editgrid_change")}else{a(this).removeClass("bsgrid_editgrid_change")}a(g).data("change",a(g).find(".bsgrid_editgrid_change").length)})}});if(b.settings.extend.settings.supportGridEditTriggerEvent==""){a(this).find(".bsgrid_editgrid_hidden").each(function(){d(this)})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="rowClick"){a(this).click(function(){a(this).find(".bsgrid_editgrid_hidden").each(function(){d(this)})})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="rowDoubleClick"){a(this).dblclick(function(){a(this).find(".bsgrid_editgrid_hidden").each(function(){d(this)})})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="cellClick"){a(this).find(".bsgrid_editgrid_hidden").each(function(){var h=this;a(h).parent("td").click(function(){d(h)})})}else{if(b.settings.extend.settings.supportGridEditTriggerEvent=="cellDoubleClick"){a(this).find(".bsgrid_editgrid_hidden").each(function(){var h=this;a(h).parent("td").dblclick(function(){d(h)})})}}}}}});function d(f){var g=a(f).removeClass("bsgrid_editgrid_hidden").clone(true);a(f).parent("td").html(g)}};a.bsgrid.forcePushPropertyInObject(a.fn.bsgrid.defaults.extend.afterRenderGridMethods,"addGridEditEvent",a.fn.bsgrid.extendAfterRenderGrid.addGridEditEvent);a.fn.bsgrid.extendAfterRenderGrid.aggregation=function(f,c,b){var d=b.settings.colsProperties.aggAttr;if(a("#"+b.gridId+" tfoot td["+d+"!='']").length==0){return}var e=a.fn.bsgrid.getGridObj(b.gridId);a("#"+b.gridId+" tfoot tr td["+d+"!='']").each(function(){var g=a.trim(a(this).attr(d));if(g.length!=0){var h=g.split(",");var l=h[0].toLocaleLowerCase();var j=h.length>1?h[1]:"";var k=null;if(l=="count"){k=b.curPageRowsNum}else{if(l=="countnotnone"||l=="sum"||l=="avg"||l=="max"||l=="min"||l=="concat"){if(l=="countnotnone"){k=0}var i=new StringBuilder();a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+")").each(function(m){var n=e.getColumnValue(m,j);if(n==""){}else{if(l=="countnotnone"){k=(k==null?0:k)+1}else{if(l=="sum"||l=="avg"){if(!isNaN(n)){k=(k==null?0:k)+parseFloat(n)}}else{if(l=="max"||l=="min"){if(!isNaN(n)&&(k==null||(l=="max"&&parseFloat(n)>k)||(l=="min"&&parseFloat(n)input:checked").length==1){c[c.length]=d}});return c};a.fn.bsgrid.defaults.extend.getCheckedRowsRecords=function(c){var b=[];a.each(a.fn.bsgrid.defaults.extend.getCheckedRowsIndexs(c),function(d,e){b[b.length]=a.fn.bsgrid.getRecord(e,c)});return b};a.fn.bsgrid.defaults.extend.activeGridEditMode=function(b){if(!b.settings.extend.settings.supportGridEdit){return}a("#"+b.gridId+" tbody tr:lt("+b.curPageRowsNum+") td .bsgrid_editgrid_hidden").each(function(){var c=a(this).removeClass("bsgrid_editgrid_hidden").clone(true);a(this).parent("td").html(c)})};a.fn.bsgrid.defaults.extend.getChangedRowsIndexs=function(b){var c=[];a("#"+b.gridId+" tbody tr").each(function(d){var e=a.trim(a(this).data("change"));if(!isNaN(e)&&parseInt(e)>0){c[c.length]=d}});return c};a.fn.bsgrid.defaults.extend.getChangedRowsOldRecords=function(c){var b=[];a.each(a.fn.bsgrid.defaults.extend.getChangedRowsIndexs(c),function(d,e){b[b.length]=a.fn.bsgrid.getRecord(e,c)});return b};a.fn.bsgrid.defaults.extend.getRowsChangedColumnsValue=function(c){var b={};var d=a.fn.bsgrid.getGridObj(c.gridId);a.each(a.fn.bsgrid.defaults.extend.getChangedRowsIndexs(c),function(e,f){b["row_"+f]={};a("#"+c.gridId+" tbody tr:eq("+f+") td").each(function(h){if(a(this).find(".bsgrid_editgrid_change").length>0){var g=d.getColumnAttr(h,c.settings.colsProperties.indexAttr);b["row_"+f][g]=a(this).find(".bsgrid_editgrid_change").val()}})});return b}})(jQuery);
(function(a){a.bsgrid_export={defaults:{url:"",exportFileName:"export",colsProperties:{width:100,align:"center",exportAttr:"w_export",indexAttr:"w_index",widthAttr:"width",alignAttr:"w_align"},colWidthPercentmultiplier:14,requestParamsName:{exportFileName:"exportFileName",colNames:"dataNames",colIndexs:"dataIndexs",colWidths:"dataLengths",colAligns:"dataAligns"}},doExport:function(g,l,c){if(l==undefined){l={}}var b={};if(c==undefined){c={}}a.extend(true,b,a.bsgrid_export.defaults,c);var n="",f="",m="",h="";for(var e=0;ethis.length){return false}else{return this.substr(0,a.length)==a}};String.prototype.endWith=function(a){if(a==null||a==""||this.length==0||a.length>this.length){return false}else{return this.substring(this.length-a.length)==a}};String.prototype.replaceAll=function(a,b){return this.replace(new RegExp(a,"gm"),b)};function StringBuilder(){if(arguments.length){this.append.apply(this,arguments)}}StringBuilder.prototype=function(){var c=Array.prototype.join,d=Array.prototype.slice,a=/\{(\d+)\}/g,b=function(){return c.call(this,"")};return{constructor:StringBuilder,length:0,append:Array.prototype.push,appendFormat:function(e){var g=0,f=d.call(arguments,1);this.append(a.test(e)?e.replace(a,function(h,j){return f[j]}):e.replace(/\?/g,function(){return f[g++]}));return this},size:function(){return this.toString().length},toString:b,valueOf:b}}();
-(function(a){a.fn.bsgrid_paging={defaults:{loopback:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pagingLittleToolbar:false,pagingBtnClass:"pagingBtn"},pagingObjs:{},init:function(h,g){var d={settings:a.extend(true,{},a.fn.bsgrid_paging.defaults,g),pagingId:h,totalRowsId:h+"_totalRows",totalPagesId:h+"_totalPages",curPageId:h+"_curPage",gotoPageInputId:h+"_gotoPageInput",gotoPageId:h+"_gotoPage",refreshPageId:h+"_refreshPage",pageSizeId:h+"_pageSize",firstPageId:h+"_firstPage",prevPageId:h+"_prevPage",nextPageId:h+"_nextPage",lastPageId:h+"_lastPage",startRowId:h+"_startRow",endRowId:h+"_endRow",totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};var b={options:d,page:function(i){a.fn.bsgrid_paging.page(i,d)},getCurPage:function(){return a.fn.bsgrid_paging.getCurPage(d)},refreshPage:function(){a.fn.bsgrid_paging.refreshPage(d)},firstPage:function(){a.fn.bsgrid_paging.firstPage(d)},prevPage:function(){a.fn.bsgrid_paging.prevPage(d)},nextPage:function(){a.fn.bsgrid_paging.nextPage(d)},lastPage:function(){a.fn.bsgrid_paging.lastPage(d)},gotoPage:function(i){a.fn.bsgrid_paging.gotoPage(d,i)},createPagingToolbar:function(){return a.fn.bsgrid_paging.createPagingToolbar(d)},setPagingToolbarEvents:function(){a.fn.bsgrid_paging.setPagingToolbarEvents(d)},dynamicChangePagingButtonStyle:function(){a.fn.bsgrid_paging.dynamicChangePagingButtonStyle(d)},setPagingValues:function(j,i){a.fn.bsgrid_paging.setPagingValues(j,i,d)}};a.fn.bsgrid_paging.pagingObjs[h]=b;a("#"+h).append(b.createPagingToolbar());if(d.settings.pageSizeSelect){if(a.inArray(d.settings.pageSize,d.settings.pageSizeForGrid)==-1){d.settings.pageSizeForGrid.push(d.settings.pageSize)}d.settings.pageSizeForGrid.sort(function(j,i){return j-i});var f=new StringBuilder();for(var e=0;e'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){alert(a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{alert(a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{alert(a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){alert(a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*b");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
+(function(a){a.fn.bsgrid_paging={defaults:{loopback:false,pageSize:20,pageSizeSelect:false,pageSizeForGrid:[5,10,20,25,50,100,200,500],pageIncorrectTurnAlert:true,pagingLittleToolbar:false,pagingBtnClass:"pagingBtn"},pagingObjs:{},init:function(h,g){var d={settings:a.extend(true,{},a.fn.bsgrid_paging.defaults,g),pagingId:h,totalRowsId:h+"_totalRows",totalPagesId:h+"_totalPages",curPageId:h+"_curPage",gotoPageInputId:h+"_gotoPageInput",gotoPageId:h+"_gotoPage",refreshPageId:h+"_refreshPage",pageSizeId:h+"_pageSize",firstPageId:h+"_firstPage",prevPageId:h+"_prevPage",nextPageId:h+"_nextPage",lastPageId:h+"_lastPage",startRowId:h+"_startRow",endRowId:h+"_endRow",totalRows:0,totalPages:0,curPage:1,curPageRowsNum:0,startRow:0,endRow:0};if(g.pageSizeForGrid!=undefined){d.settings.pageSizeForGrid=g.pageSizeForGrid}var b={options:d,page:function(i){a.fn.bsgrid_paging.page(i,d)},getCurPage:function(){return a.fn.bsgrid_paging.getCurPage(d)},refreshPage:function(){a.fn.bsgrid_paging.refreshPage(d)},firstPage:function(){a.fn.bsgrid_paging.firstPage(d)},prevPage:function(){a.fn.bsgrid_paging.prevPage(d)},nextPage:function(){a.fn.bsgrid_paging.nextPage(d)},lastPage:function(){a.fn.bsgrid_paging.lastPage(d)},gotoPage:function(i){a.fn.bsgrid_paging.gotoPage(d,i)},createPagingToolbar:function(){return a.fn.bsgrid_paging.createPagingToolbar(d)},setPagingToolbarEvents:function(){a.fn.bsgrid_paging.setPagingToolbarEvents(d)},dynamicChangePagingButtonStyle:function(){a.fn.bsgrid_paging.dynamicChangePagingButtonStyle(d)},setPagingValues:function(j,i){a.fn.bsgrid_paging.setPagingValues(j,i,d)}};a.fn.bsgrid_paging.pagingObjs[h]=b;a("#"+h).append(b.createPagingToolbar());if(d.settings.pageSizeSelect){if(a.inArray(d.settings.pageSize,d.settings.pageSizeForGrid)==-1){d.settings.pageSizeForGrid.push(d.settings.pageSize)}d.settings.pageSizeForGrid.sort(function(j,i){return j-i});var f=new StringBuilder();for(var e=0;e'+c+"")}a("#"+d.pageSizeId).html(f.toString()).val(d.settings.pageSize)}b.setPagingToolbarEvents();return b},getPagingObj:function(c){var b=a.fn.bsgrid_paging.pagingObjs[c];return b?b:null},page:function(c,b){var d=a.fn.bsgrid.getGridObj(b.settings.gridId);d.options.settings.pageSize=b.settings.pageSize;a.fn.bsgrid.page(c,d.options)},getCurPage:function(b){var c=a("#"+b.curPageId).html();return c==""?1:c},refreshPage:function(b){a.fn.bsgrid_paging.page(a.fn.bsgrid_paging.getCurPage(b),b)},firstPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}a.fn.bsgrid_paging.page(1,b)},prevPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c<=1){if(b.settings.loopback&&b.totalPages>0){a.fn.bsgrid_paging.page(b.totalPages,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isFirstPage);return}}a.fn.bsgrid_paging.page(parseInt(c)-1,b)},nextPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){if(b.settings.loopback&&c>0){a.fn.bsgrid_paging.page(1,b);return}else{a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}}a.fn.bsgrid_paging.page(parseInt(c)+1,b)},lastPage:function(b){var c=a.fn.bsgrid_paging.getCurPage(b);if(c>=b.totalPages){a.fn.bsgrid_paging.incorrectTurnAlert(b,a.bsgridLanguage.isLastPage);return}a.fn.bsgrid_paging.page(b.totalPages,b)},gotoPage:function(b,c){if(c==undefined){c=a("#"+b.gotoPageInputId).val()}if(a.trim(c)==""||isNaN(c)){alert(a.bsgridLanguage.needInteger)}else{if(parseInt(c)<1||parseInt(c)>b.totalPages){alert(a.bsgridLanguage.needRange(1,b.totalPages))}else{a("#"+b.gotoPageInputId).val(c);a.fn.bsgrid_paging.page(parseInt(c),b)}}},incorrectTurnAlert:function(b,c){if(b.settings.pageIncorrectTurnAlert){alert(c)}},createPagingToolbar:function(b){var e=new StringBuilder();var c=b.settings.pagingLittleToolbar;e.append('");return e.toString()},setPagingToolbarEvents:function(b){if(b.settings.pageSizeSelect){a("#"+b.pageSizeId).change(function(){b.settings.pageSize=parseInt(a(this).val());a(this).trigger("blur");a.fn.bsgrid_paging.page(1,b)})}a("#"+b.firstPageId).click(function(){a.fn.bsgrid_paging.firstPage(b)});a("#"+b.prevPageId).click(function(){a.fn.bsgrid_paging.prevPage(b)});a("#"+b.nextPageId).click(function(){a.fn.bsgrid_paging.nextPage(b)});a("#"+b.lastPageId).click(function(){a.fn.bsgrid_paging.lastPage(b)});a("#"+b.gotoPageInputId).keyup(function(c){if(c.which==13){a.fn.bsgrid_paging.gotoPage(b)}});a("#"+b.gotoPageId).click(function(){a.fn.bsgrid_paging.gotoPage(b)});a("#"+b.refreshPageId).click(function(){a.fn.bsgrid_paging.refreshPage(b)})},dynamicChangePagingButtonStyle:function(b){var c="disabledCls";if(b.curPage<=1){a("#"+b.firstPageId).addClass(c);a("#"+b.prevPageId).addClass(c)}else{a("#"+b.firstPageId).removeClass(c);a("#"+b.prevPageId).removeClass(c)}if(b.curPage>=b.totalPages){a("#"+b.nextPageId).addClass(c);a("#"+b.lastPageId).addClass(c)}else{a("#"+b.nextPageId).removeClass(c);a("#"+b.lastPageId).removeClass(c)}},setPagingValues:function(i,g,f){i=Math.max(i,1);var b=f.settings.pageSize;var h=parseInt(g/b);h=parseInt((g%b==0)?h:h+1);var e=(i*b");$("#"+gridId).find("tr:lt("+($("#"+gridId+" tr").length-$("#"+gridId+" tfoot tr").length)+")").appendTo($("#"+gridId+" thead"))}if($("#"+gridId).find("tbody").length==0){$("#"+gridId+" thead").after(" ")}if($("#"+gridId).find("tfoot").length==0){$("#"+gridId).append(' ')}gridObj.appendHeaderSort();gridObj.createPagingOutTab();if(!options.settings.pageAll){gridObj.pagingObj=gridObj.initPaging()}if(options.settings.isProcessLockScreen){$.fn.bsgrid.addLockScreen(options)}if(options.settings.autoLoad){setTimeout(function(){gridObj.page(1)},10)}else{gridObj.setGridBlankBody()}for(var key in options.settings.extend.initGridMethods){options.settings.extend.initGridMethods[key](gridId,options)}return gridObj},getGridObj:function(gridId){var obj=$.fn.bsgrid.gridObjs[gridId];return obj?obj:null},parseData:{success:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.success(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.success(gridData)}}return false},totalRows:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.totalRows(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.totalRows(gridData)}}return false},curPage:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.curPage(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.curPage(gridData)}}return false},data:function(type,gridData){if(type=="json"){return $.fn.bsgrid.parseJsonData.data(gridData)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.data(gridData)}}return false},getDataLen:function(type,gridData){if(type=="json"||type=="xml"){return $.fn.bsgrid.parseData.data(type,gridData).length}return 0},getRecord:function(type,data,row){if(type=="json"){return $.fn.bsgrid.parseJsonData.getRecord(data,row)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getRecord(data,row)}}return false},getColumnValue:function(type,record,index){if(type=="json"){return $.fn.bsgrid.parseJsonData.getColumnValue(record,index)}else{if(type=="xml"){return $.fn.bsgrid.parseXmlData.getColumnValue(record,index)}}return false}},parseJsonData:{success:function(json){return json.success},totalRows:function(json){return json.totalRows},curPage:function(json){return json.curPage},data:function(json){return json.data},getRecord:function(data,row){return data[row]},getColumnValue:function(record,index){return $.trim(record[index])}},parseXmlData:{success:function(xml){return $.trim($(xml).find("gridData success").text())=="true"},totalRows:function(xml){return parseInt($(xml).find("gridData totalRows").text())},curPage:function(xml){return parseInt($(xml).find("gridData curPage").text())},data:function(xml){return $(xml).find("gridData data row")},getRecord:function(data,row){return data.eq(row)},getColumnValue:function(record,index){return $.trim(record.find(index).text())}},getPageCondition:function(curPage,options){var params=new StringBuilder();if(options.otherParames==false){}else{if(options.otherParames instanceof Array){$.each(options.otherParames,function(i,objVal){params.append("&"+objVal.name+"="+objVal.value)})}else{for(var key in options.otherParames){params.append("&"+key+"="+options.otherParames[key])}}}var condition=params.length==0?"":params.toString().substring(1);condition+=(condition.length==0?"":"&")+options.settings.requestParamsName.pageSize+"="+options.settings.pageSize+"&"+options.settings.requestParamsName.curPage+"="+curPage+"&"+options.settings.requestParamsName.sortName+"="+options.sortName+"&"+options.settings.requestParamsName.sortOrder+"="+options.sortOrder;return condition},page:function(curPage,options){if($.trim(curPage)==""||isNaN(curPage)){alert($.bsgridLanguage.needInteger);return}var dataType=options.settings.dataType;if(options.settings.localData!=false){if(dataType=="json"){$.fn.bsgrid.loadGridData(dataType,options.settings.localData,options)}else{if(dataType=="xml"){$.fn.bsgrid.loadGridData(dataType,""+options.settings.localData+" ",options)}}return}$.ajax({type:"post",url:options.settings.url,data:$.fn.bsgrid.getPageCondition(curPage,options),dataType:dataType,beforeSend:function(XMLHttpRequest){if(options.settings.isProcessLockScreen){$.fn.bsgrid.lockScreen(options)}options.settings.beforeSend(options,XMLHttpRequest)},complete:function(XMLHttpRequest,textStatus){options.settings.complete(options,XMLHttpRequest,textStatus);if(options.settings.isProcessLockScreen){$.fn.bsgrid.unlockScreen(options)}},success:function(gridData,textStatus){$.fn.bsgrid.loadGridData(dataType,gridData,options)},error:function(XMLHttpRequest,textStatus,errorThrown){alert($.bsgridLanguage.errorForSendOrRequestData)}})},loadGridData:function(dataType,gridData,options){var parseSuccess=$.fn.bsgrid.parseData.success(dataType,gridData);for(var key in options.settings.extend.beforeRenderGridMethods){options.settings.extend.beforeRenderGridMethods[key](parseSuccess,gridData,options)}options.settings.additionalBeforeRenderGrid(parseSuccess,gridData,options);if(parseSuccess){var totalRows=parseInt($.fn.bsgrid.parseData.totalRows(dataType,gridData));var curPage=parseInt($.fn.bsgrid.parseData.curPage(dataType,gridData));curPage=Math.max(curPage,1);if(options.settings.pageAll){curPage=1;options.settings.pageSize=totalRows;$("#"+options.noPagingationId).html(totalRows)}var pageSize=options.settings.pageSize;var curPageRowsNum=$.fn.bsgrid.parseData.getDataLen(dataType,gridData);curPageRowsNum=curPageRowsNum>pageSize?pageSize:curPageRowsNum;var totalPages=parseInt(totalRows/pageSize);totalPages=parseInt((totalRows%pageSize==0)?totalPages:totalPages+1);var startRow=(curPage-1)*pageSize+1;var endRow=(curPage-1)*pageSize+curPageRowsNum;startRow=curPageRowsNum<=0?0:startRow;endRow=curPageRowsNum<=0?0:endRow;options.totalRows=totalRows;options.totalPages=totalPages;options.curPage=curPage;options.curPageRowsNum=curPageRowsNum;options.startRow=startRow;options.endRow=endRow;if(!options.settings.pageAll){$.fn.bsgrid.setPagingValues(options)}if(options.settings.displayPagingToolbarOnlyMultiPages&&totalPages<=1){$("#"+options.pagingId).hide();$("#"+options.pagingOutTabId).hide()}else{$("#"+options.pagingOutTabId).show();$("#"+options.pagingId).show()}$.fn.bsgrid.setGridBlankBody(options);if(curPageRowsNum==0){return}var headerTh=$.fn.bsgrid.getGridHeaderObject(options);var data=$.fn.bsgrid.parseData.data(dataType,gridData);var dataLen=data.length;$.fn.bsgrid.addRowsClickEvent(options);$("#"+options.gridId+" tbody tr").each(function(i){var trObj=$(this);var record=null;if(i1?sortInfoArray[1]:"";var sortHtml=' ';$(this).append(sortHtml).find(".sort").click(function(){$.fn.bsgrid.sort($(this).parent("th"),options)})}})},setGridBlankBody:function(options){$("#"+options.gridId+" tbody tr").remove();var header=$.fn.bsgrid.getGridHeaderObject(options);var rowSb="";if(options.settings.pageSize>0){var alignAttr=options.settings.colsProperties.alignAttr;var hiddenAttr=options.settings.colsProperties.hiddenAttr;var trSb=new StringBuilder();trSb.append("");for(var hi=0;hi")}trSb.append(" ");rowSb=trSb.toString()}var rowsSb=new StringBuilder();var curPageRowsNum=options.settings.pageSize;if(!options.settings.displayBlankRows){curPageRowsNum=options.endRow-options.startRow+1;curPageRowsNum=options.endRow>0?curPageRowsNum:0}if(curPageRowsNum==0){rowsSb.append(''+$.bsgridLanguage.noDataToDisplay+" ")}else{for(var pi=0;pi');if(options.settings.pageAll){pagingOutTabSb.append($.bsgridLanguage.noPagingation(options.noPagingationId)+" ")}pagingOutTabSb.append(" ");$("#"+options.gridId).after(pagingOutTabSb.toString())},clearGridBodyData:function(options){$("#"+options.gridId+" tbody tr td").html(" ")},addLockScreen:function(options){if($(".bsgrid.lockscreen").length==0){var lockScreenHtml=new StringBuilder();lockScreenHtml.append('');lockScreenHtml.append("
");lockScreenHtml.append('');lockScreenHtml.append('
'+$.bsgridLanguage.loadingDataMessage+"
");lockScreenHtml.append("
");$("body").append(lockScreenHtml.toString())}},lockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))+1);if($(".bsgrid.lockscreen").css("display")=="none"){$(".bsgrid.lockscreen").show();$(".bsgrid.loading_div").show()}},unlockScreen:function(options){$(".bsgrid.lockscreen").attr("times",parseInt($(".bsgrid.lockscreen").attr("times"))-1);if($(".bsgrid.lockscreen").attr("times")=="0"){setTimeout(function(){$(".bsgrid.lockscreen").hide();$(".bsgrid.loading_div").hide()},100)}},columnTip:function(obj,value,record){$(obj).attr("title",value)},longLengthSubAndTip:function(obj,value,maxLen,record){if(value.length>maxLen&&$(value).text().length==0){$(obj).html(value.substring(0,maxLen-3)+"...");$.fn.bsgrid.columnTip(obj,value,record)}else{$(obj).html(value)}},getCurPage:function(options){return $.fn.bsgrid.getGridObj(options.gridId).pagingObj.getCurPage()},refreshPage:function(options){if(!options.settings.pageAll){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.refreshPage()}else{$.fn.bsgrid.page(1,options)}},firstPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.firstPage()},prevPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.prevPage()},nextPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.nextPage()},lastPage:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.lastPage()},gotoPage:function(options,goPage){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.gotoPage(goPage)},initPaging:function(options){$("#"+options.pagingOutTabId+" td").attr("id",options.pagingId);return $.fn.bsgrid_paging.init(options.pagingId,{gridId:options.gridId,pageSize:options.settings.pageSize,pageSizeSelect:options.settings.pageSizeSelect,pageSizeForGrid:options.settings.pageSizeForGrid,pageIncorrectTurnAlert:options.settings.pageIncorrectTurnAlert,pagingLittleToolbar:options.settings.pagingLittleToolbar,pagingBtnClass:options.settings.pagingBtnClass})},setPagingValues:function(options){$.fn.bsgrid.getGridObj(options.gridId).pagingObj.setPagingValues(options.curPage,options.totalRows)}}})(jQuery);
diff --git a/documention/README.md.html b/documention/README.md.html
index 065ab00..4dd34b8 100644
--- a/documention/README.md.html
+++ b/documention/README.md.html
@@ -289,7 +289,7 @@
max-width: 100%
}
-
+
jQuery.bsgrid 简单易用的jQuery Grid插件
@@ -302,9 +302,9 @@ jQuery.bsgrid 简单易用的jQuery Grid插件
示例:导航一
导航二
-版本:1.32
+版本:1.33
协议:Apache Licence 2
- 更新日期:2015-01-26
+ 更新日期:2015-02-04
文档:HTML
PDF
@@ -312,7 +312,7 @@ jQuery.bsgrid 简单易用的jQuery Grid插件
依赖:jQuery 1.4.4 ~~ jQuery 1.11.2
-支持浏览器:IE6+、Chrome、Firefox等
+支持:IE6+、Chrome、Firefox等
首先给出典型效果图示
1,内置多套皮肤(点击下面对应皮肤图片可查看示例页面),并可非常容易的自定义皮肤(参考Custom Blue Style )
@@ -346,63 +346,63 @@
首先给出典型效果图示
Default Style
-
+
ExtJS Gray Style
-
+
ExtJS Blue Style
-
+
ExtJS Access Style
-
+
FlexiGrid Gray Style
-
+
Dhtmlx Sky Blue Style
-
+
Pure Gray Style
-
+
jqGrid Style
-
+
EasyUI Style
-
+
Bootstrap Style
-
+
Custom Blue Style
-
+
@@ -417,36 +417,36 @@ 首先给出典型效果图示
With jqPagination
-
+
With jquery_pagination
-
+
With jPaginate
-
+
With jPages
-
+
With smartpaginator
-
+
With jPaginator
-
+
@@ -522,17 +522,17 @@
bsgrid示例目录
-
+
-
+
-
+
引用文件:
- <link rel="stylesheet" href="../../builds/merged/grid.simple.min.css"/>
+ <link rel="stylesheet" href="../../builds/merged/bsgrid.all.min.css"/>
<script type="text/javascript" src="../../plugins/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../builds/js/lang/grid.zh-CN.min.js"></script>
- <script type="text/javascript" src="../../builds/merged/grid.simple.min.js"></script>
+ <script type="text/javascript" src="../../builds/merged/bsgrid.all.min.js"></script>
实现代码:
<table id="searchTable">
<tr>
@@ -562,7 +562,7 @@
</script>
-
+
1,插件语言本地化文件:grid.en.min.js、grid.zh-CN.min.js、grid.zh-TW.min.js
@@ -575,7 +575,7 @@
}
-
+
数据支持扩展渲染,th使用w_render属性,值是js方法名:
<th w_render="renderImg" width="5%;">IMAGES</th>
@@ -586,7 +586,7 @@
}
-
+
默认的是json格式,换加载XML格式数据:
方式1,全局修改加载数据格式:
@@ -610,7 +610,7 @@
支持展示后台的全部数据,分页工具条变为如下只显示总数的样式:
-
+
实现代码:将pageAll设置为true即可,后台数据格式与分页后台数据格式一致
$.fn.bsgrid.init('searchTable', {
@@ -622,7 +622,7 @@
设置是否显示无数据的行,下图示例展示的是分页行大小是25,但只显示了20条数据,无数据行没有显示:
-
+
实现代码:修改全局参数displayBlankRows,默认值为true
$.fn.bsgrid.defaults.displayBlankRows = false;
@@ -630,14 +630,14 @@
无数据时的提示:
-
+
注意此提示仅当$.fn.bsgrid.defaults.displayBlankRows = false;时才会显示,为true时显示的是空行。
说明:属性displayPagingToolbarOnlyMultiPages与displayBlankRows互不影响。
-
+
示例页面:With Custom Checkbox
@@ -685,7 +685,7 @@
似ExtJS、EasyUI类分页工具条:
-
+
参看示例源码,仅需要设置参数pagingLittleToolbar值为true即可,默认值为false。
@@ -694,11 +694,11 @@
此处为了演示分页,后台使用jsp页面模拟分页数据,可以完整的展示排序,分页。
-
+
支持一个页面显示多个grid:
-
+
示例页面:Multi Extend Grid
@@ -706,7 +706,7 @@
bsgrid并不是提供导出Grid的页面数据功能,而是进行导出参数的组织:
-
+
简单的grid导出参数URL类似如下:
http://bsgrid.oschina.mopaas.com/examples/grid/export.html?exportFileName=Export%2520Example&dataNames=XH%252CID%252CCHAR%252CTEXT%252CDATE%252CTIME%252CNUM&dataIndexs=XH,ID,CHAR,TEXT,DATE,TIME,NUM&dataLengths=50,50,150,300,150,150,50&dataAligns=center,center,left,left,center,center,center¶m1=param1¶m2=param2
@@ -742,7 +742,7 @@
特别注意:
JS原生的alert、confirm、prompt方法是阻塞的,而使用artDialog覆盖的alert、confirm、prompt方法是非阻塞的,artDialog覆盖的方法是用回调方式实现阻塞的等待执行代码效果,详细可参看示例:Pop with ArtDialog
-
+
需要额外引用的文件:
<link rel="stylesheet" href="../../plugins/artDialog/skins/blue.css"/>
@@ -761,7 +761,7 @@
结合ArtDialog使用,可以完成一个很好看的CRUD功能,详细可查看示例及示例源码:
-
+