点击回首页
我的浏览记录 | | 帮助?
当前位置:
首页>> 企业网站>> MVC通用企业门户网站源码>> 源文件浏览
[商业版 299金币] WebForm,下载次数:33 次 | 关键字: mvc easyui 门户网站

源码截图

源码目录树

当前路径:PD.Web/Content/easyui/plugins/jquery.datagrid.js     /**
 * jQuery EasyUI 1.3.3
 * 
 * Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
 *
 * Licensed under the GPL or commercial licenses
 * To use it on other terms please contact us: info@jeasyui.com
 * http://www.gnu.org/licenses/gpl.txt
 * http://www.jeasyui.com/license_commercial.php
 *
 */
(function($){
var _1=0;
function _2(a,o){
for(var i=0,_3=a.length;i<_3;i++){
if(a[i]==o){
return i;
}
}
return -1;
};
function _4(a,o,id){
if(typeof o=="string"){
for(var i=0,_5=a.length;i<_5;i++){
if(a[i][o]==id){
a.splice(i,1);
return;
}
}
}else{
var _6=_2(a,o);
if(_6!=-1){
a.splice(_6,1);
}
}
};
function _7(a,o,r){
for(var i=0,_8=a.length;i<_8;i++){
if(a[i][o]==r[o]){
return;
}
}
a.push(r);
};
function _9(_a){
var cc=_a||$("head");
var _b=$.data(cc[0],"ss");
if(!_b){
_b=$.data(cc[0],"ss",{cache:{},dirty:[]});
}
return {add:function(_c){
var ss=["<style type=\"text/css\">"];
for(var i=0;i<_c.length;i++){
_b.cache[_c[i][0]]={width:_c[i][1]};
}
var _d=0;
for(var s in _b.cache){
var _e=_b.cache[s];
_e.index=_d++;
ss.push(s+"{width:"+_e.width+"}");
}
ss.push("</style>");
$(ss.join("\n")).appendTo(cc);
setTimeout(function(){
cc.children("style:not(:last)").remove();
},0);
},getRule:function(_f){
var _10=cc.children("style:last")[0];
var _11=_10.styleSheet?_10.styleSheet:(_10.sheet||document.styleSheets[document.styleSheets.length-1]);
var _12=_11.cssRules||_11.rules;
return _12[_f];
},set:function(_13,_14){
var _15=_b.cache[_13];
if(_15){
_15.width=_14;
var _16=this.getRule(_15.index);
if(_16){
_16.style["width"]=_14;
}
}
},remove:function(_17){
var tmp=[];
for(var s in _b.cache){
if(s.indexOf(_17)==-1){
tmp.push([s,_b.cache[s].width]);
}
}
_b.cache={};
this.add(tmp);
},dirty:function(_18){
if(_18){
_b.dirty.push(_18);
}
},clean:function(){
for(var i=0;i<_b.dirty.length;i++){
this.remove(_b.dirty[i]);
}
_b.dirty=[];
}};
};
function _19(_1a,_1b){
var _1c=$.data(_1a,"datagrid").options;
var _1d=$.data(_1a,"datagrid").panel;
if(_1b){
if(_1b.width){
_1c.width=_1b.width;
}
if(_1b.height){
_1c.height=_1b.height;
}
}
if(_1c.fit==true){
var p=_1d.panel("panel").parent();
_1c.width=p.width();
_1c.height=p.height();
}
_1d.panel("resize",{width:_1c.width,height:_1c.height});
};
function _1e(_1f){
var _20=$.data(_1f,"datagrid").options;
var dc=$.data(_1f,"datagrid").dc;
var _21=$.data(_1f,"datagrid").panel;
var _22=_21.width();
var _23=_21.height();
var _24=dc.view;
var _25=dc.view1;
var _26=dc.view2;
var _27=_25.children("div.datagrid-header");
var _28=_26.children("div.datagrid-header");
var _29=_27.find("table");
var _2a=_28.find("table");
_24.width(_22);
var _2b=_27.children("div.datagrid-header-inner").show();
_25.width(_2b.find("table").width());
if(!_20.showHeader){
_2b.hide();
}
_26.width(_22-_25._outerWidth());
_25.children("div.datagrid-header,div.datagrid-body,div.datagrid-footer").width(_25.width());
_26.children("div.datagrid-header,div.datagrid-body,div.datagrid-footer").width(_26.width());
var hh;
_27.css("height","");
_28.css("height","");
_29.css("height","");
_2a.css("height","");
hh=Math.max(_29.height(),_2a.height());
_29.height(hh);
_2a.height(hh);
_27.add(_28)._outerHeight(hh);
if(_20.height!="auto"){
var _2c=_23-_26.children("div.datagrid-header")._outerHeight()-_26.children("div.datagrid-footer")._outerHeight()-_21.children("div.datagrid-toolbar")._outerHeight();
_21.children("div.datagrid-pager").each(function(){
_2c-=$(this)._outerHeight();
});
dc.body1.add(dc.body2).children("table.datagrid-btable-frozen").css({position:"absolute",top:dc.header2._outerHeight()});
var _2d=dc.body2.children("table.datagrid-btable-frozen")._outerHeight();
_25.add(_26).children("div.datagrid-body").css({marginTop:_2d,height:(_2c-_2d)});
}
_24.height(_26.height());
};
function _2e(_2f,_30,_31){
var _32=$.data(_2f,"datagrid").data.rows;
var _33=$.data(_2f,"datagrid").options;
var dc=$.data(_2f,"datagrid").dc;
if(!dc.body1.is(":empty")&&(!_33.nowrap||_33.autoRowHeight||_31)){
if(_30!=undefined){
var tr1=_33.finder.getTr(_2f,_30,"body",1);
var tr2=_33.finder.getTr(_2f,_30,"body",2);
_34(tr1,tr2);
}else{
var tr1=_33.finder.getTr(_2f,0,"allbody",1);
var tr2=_33.finder.getTr(_2f,0,"allbody",2);
_34(tr1,tr2);
if(_33.showFooter){
var tr1=_33.finder.getTr(_2f,0,"allfooter",1);
var tr2=_33.finder.getTr(_2f,0,"allfooter",2);
_34(tr1,tr2);
}
}
}
_1e(_2f);
if(_33.height=="auto"){
var _35=dc.body1.parent();
var _36=dc.body2;
var _37=_38(_36);
var _39=_37.height;
if(_37.width>_36.width()){
_39+=18;
}
_35.height(_39);
_36.height(_39);
dc.view.height(dc.view2.height());
}
dc.body2.triggerHandler("scroll");
function _34(_3a,_3b){
for(var i=0;i<_3b.length;i++){
var tr1=$(_3a[i]);
var tr2=$(_3b[i]);
tr1.css("height","");
tr2.css("height","");
var _3c=Math.max(tr1.height(),tr2.height());
tr1.css("height",_3c);
tr2.css("height",_3c);
}
};
function _38(cc){
var _3d=0;
var _3e=0;
$(cc).children().each(function(){
var c=$(this);
if(c.is(":visible")){
_3e+=c._outerHeight();
if(_3d<c._outerWidth()){
_3d=c._outerWidth();
}
}
});
return {width:_3d,height:_3e};
};
};
function _3f(_40,_41){
var _42=$.data(_40,"datagrid");
var _43=_42.options;
var dc=_42.dc;
if(!dc.body2.children("table.datagrid-btable-frozen").length){
dc.body1.add(dc.body2).prepend("<table class=\"datagrid-btable datagrid-btable-frozen\" cellspacing=\"0\" cellpadding=\"0\"></table>");
}
_44(true);
_44(false);
_1e(_40);
function _44(_45){
var _46=_45?1:2;
var tr=_43.finder.getTr(_40,_41,"body",_46);
(_45?dc.body1:dc.body2).children("table.datagrid-btable-frozen").append(tr);
};
};
function _47(_48,_49){
function _4a(){
var _4b=[];
var _4c=[];
$(_48).children("thead").each(function(){
var opt=$.parser.parseOptions(this,[{frozen:"boolean"}]);
$(this).find("tr").each(function(){
var _4d=[];
$(this).find("th").each(function(){
var th=$(this);
var col=$.extend({},$.parser.parseOptions(this,["field","align","halign","order",{sortable:"boolean",checkbox:"boolean",resizable:"boolean",fixed:"boolean"},{rowspan:"number",colspan:"number",width:"number"}]),{title:(th.html()||undefined),hidden:(th.attr("hidden")?true:undefined),formatter:(th.attr("formatter")?eval(th.attr("formatter")):undefined),styler:(th.attr("styler")?eval(th.attr("styler")):undefined),sorter:(th.attr("sorter")?eval(th.attr("sorter")):undefined)});
if(th.attr("editor")){
var s=$.trim(th.attr("editor"));
if(s.substr(0,1)=="{"){
col.editor=eval("("+s+")");
}else{
col.editor=s;
}
}
_4d.push(col);
});
opt.frozen?_4b.push(_4d):_4c.push(_4d);
});
});
return [_4b,_4c];
};
var _4e=$("<div class=\"datagrid-wrap\">"+"<div class=\"datagrid-view\">"+"<div class=\"datagrid-view1\">"+"<div class=\"datagrid-header\">"+"<div class=\"datagrid-header-inner\"></div>"+"</div>"+"<div class=\"datagrid-body\">"+"<div class=\"datagrid-body-inner\"></div>"+"</div>"+"<div class=\"datagrid-footer\">"+"<div class=\"datagrid-footer-inner\"></div>"+"</div>"+"</div>"+"<div class=\"datagrid-view2\">"+"<div class=\"datagrid-header\">"+"<div class=\"datagrid-header-inner\"></div>"+"</div>"+"<div class=\"datagrid-body\"></div>"+"<div class=\"datagrid-footer\">"+"<div class=\"datagrid-footer-inner\"></div>"+"</div>"+"</div>"+"</div>"+"</div>").insertAfter(_48);
_4e.panel({doSize:false});
_4e.panel("panel").addClass("datagrid").bind("_resize",function(e,_4f){
var _50=$.data(_48,"datagrid").options;
if(_50.fit==true||_4f){
_19(_48);
setTimeout(function(){
if($.data(_48,"datagrid")){
_51(_48);
}
},0);
}
return false;
});
$(_48).hide().appendTo(_4e.children("div.datagrid-view"));
var cc=_4a();
var _52=_4e.children("div.datagrid-view");
var _53=_52.children("div.datagrid-view1");
var _54=_52.children("div.datagrid-view2");
var _55=_4e.closest("div.datagrid-view");
if(!_55.length){
_55=_52;
}
var ss=_9(_55);
return {panel:_4e,frozenColumns:cc[0],columns:cc[1],dc:{view:_52,view1:_53,view2:_54,header1:_53.children("div.datagrid-header").children("div.datagrid-header-inner"),header2:_54.children("div.datagrid-header").children("div.datagrid-header-inner"),body1:_53.children("div.datagrid-body").children("div.datagrid-body-inner"),body2:_54.children("div.datagrid-body"),footer1:_53.children("div.datagrid-footer").children("div.datagrid-footer-inner"),footer2:_54.children("div.datagrid-footer").children("div.datagrid-footer-inner")},ss:ss};
};
function _56(_57){
var _58=$.data(_57,"datagrid");
var _59=_58.options;
var dc=_58.dc;
var _5a=_58.panel;
_5a.panel($.extend({},_59,{id:null,doSize:false,onResize:function(_5b,_5c){
setTimeout(function(){
if($.data(_57,"datagrid")){
_1e(_57);
_87(_57);
_59.onResize.call(_5a,_5b,_5c);
}
},0);
},onExpand:function(){
_2e(_57);
_59.onExpand.call(_5a);
}}));
_58.rowIdPrefix="datagrid-row-r"+(++_1);
_58.cellClassPrefix="datagrid-cell-c"+_1;
_5d(dc.header1,_59.frozenColumns,true);
_5d(dc.header2,_59.columns,false);
_5e();
dc.header1.add(dc.header2).css("display",_59.showHeader?"block":"none");
dc.footer1.add(dc.footer2).css("display",_59.showFooter?"block":"none");
if(_59.toolbar){
if(typeof _59.toolbar=="string"){
$(_59.toolbar).addClass("datagrid-toolbar").prependTo(_5a);
$(_59.toolbar).show();
}else{
$("div.datagrid-toolbar",_5a).remove();
var tb=$("<div class=\"datagrid-toolbar\"><table cellspacing=\"0\" cellpadding=\"0\"><tr></tr></table></div>").prependTo(_5a);
var tr=tb.find("tr");
for(var i=0;i<_59.toolbar.length;i++){
var btn=_59.toolbar[i];
if(btn=="-"){
$("<td><div class=\"datagrid-btn-separator\"></div></td>").appendTo(tr);
}else{
var td=$("<td></td>").appendTo(tr);
var _5f=$("<a href=\"javascript:void(0)\"></a>").appendTo(td);
_5f[0].onclick=eval(btn.handler||function(){
});
_5f.linkbutton($.extend({},btn,{plain:true}));
}
}
}
}else{
$("div.datagrid-toolbar",_5a).remove();
}
$("div.datagrid-pager",_5a).remove();
if(_59.pagination){
var _60=$("<div class=\"datagrid-pager\"></div>");
if(_59.pagePosition=="bottom"){
_60.appendTo(_5a);
}else{
if(_59.pagePosition=="top"){
_60.addClass("datagrid-pager-top").prependTo(_5a);
}else{
var _61=$("<div class=\"datagrid-pager datagrid-pager-top\"></div>").prependTo(_5a);
_60.appendTo(_5a);
_60=_60.add(_61);
}
}
_60.pagination({total:0,pageNumber:_59.pageNumber,pageSize:_59.pageSize,pageList:_59.pageList,onSelectPage:function(_62,_63){
_59.pageNumber=_62;
_59.pageSize=_63;
_60.pagination("refresh",{pageNumber:_62,pageSize:_63});
_160(_57);
}});
_59.pageSize=_60.pagination("options").pageSize;
}
function _5d(_64,_65,_66){
if(!_65){
return;
}
$(_64).show();
$(_64).empty();
var t=$("<table class=\"datagrid-htable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody></tbody></table>").appendTo(_64);
for(var i=0;i<_65.length;i++){
var tr=$("<tr class=\"datagrid-header-row\"></tr>").appendTo($("tbody",t));
var _67=_65[i];
for(var j=0;j<_67.length;j++){
var col=_67[j];
var _68="";
if(col.rowspan){
_68+="rowspan=\""+col.rowspan+"\" ";
}
if(col.colspan){
_68+="colspan=\""+col.colspan+"\" ";
}
var td=$("<td "+_68+"></td>").appendTo(tr);
if(col.checkbox){
td.attr("field",col.field);
$("<div class=\"datagrid-header-check\"></div>").html("<input type=\"checkbox\"/>").appendTo(td);
}else{
if(col.field){
td.attr("field",col.field);
td.append("<div class=\"datagrid-cell\"><span></span><span class=\"datagrid-sort-icon\"></span></div>");
$("span",td).html(col.title);
$("span.datagrid-sort-icon",td).html("&nbsp;");
var _69=td.find("div.datagrid-cell");
if(_59.sortName==col.field){
_69.addClass("datagrid-sort-"+_59.sortOrder);
}
if(col.resizable==false){
_69.attr("resizable","false");
}
if(col.width){
_69._outerWidth(col.width);
c...
对不起,完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途) 企业QQ:2852517674
地址:北京市海淀区中关村鼎好大厦A座二层 邮编:100080
Room A-801,Dinghao Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2015. 京ICP备09089570号 | 京公网安备11010702000869号
分享该页面
关闭侧边栏