/** * bootstable 表格插件 * caratename:雨中磐石(rainrock) * caratetime:2014-04-06 21:40:00 * email:admin@rockoa.com * homepage:www.rockoa.com */ (function ($) { function bootstable(element, options){ var obj = element; var can = options; var rand = js.getrand(); var me = this; this.data = can.data; this.count = 0; this.page = 1; this.changedata = {}; this.changeid = 0; this.bool = false; this.where = can.where; this.highorderstr = ''; this.otherparams = {}; this.loadci = 0; this.options= can; this.init = function(){ this.tablename=can.tablename; can.tablename=jm.encrypt(can.tablename); this._init(); this._create(); if(can.autoLoad){ this._loaddata(1); } if(can.fanye)this._fanye(); }; this.getData= function(fid){ var a = this.data; if(fid)a= this.json[fid]; if(!isNaN(fid))a= this.data[fid]; return a; }; this.getCount= function(){ return this.count; }; this.getJson= function(){ return this.json; }; this._init = function(){ var sas = can.modedir; if(!sas)sas='index:'; sas = sas.split(':'); if(can.url=='')can.url = js.getajaxurl('publicstore', sas[0], sas[1]); if(can.cellurl=='')can.cellurl = js.getajaxurl('publicsavevalue', sas[0], sas[1]); this.setColumns(can.columns); s='
'; obj.html(s); $('#tablebody_'+rand+'').scroll(function(){ me._scrollTopla($(this)); }); if(can.tree)window['stabletree'+rand+'']=function(j,o1){me.stabletree(j,o1)} }; this.setColumns=function(cols){ can.columns=cols;var a,i; for(i=0; i'; if(can.checked)s+=' | '; for(i=0;i |
---|