- 浏览: 2617660 次
- 性别:
- 来自: 小胖儿的大城
文章分类
最新评论
-
ni4wangba0:
ni4wangba0 写道亲测,算法有问题。对不起,其实是我自 ...
谈谈"求线段交点"的几种算法(js实现,完整版) -
ni4wangba0:
亲测,算法有问题。
谈谈"求线段交点"的几种算法(js实现,完整版) -
kers007:
苹果不让Webapp 在appstore 里发布,我不知道对 ...
苹果真的要在 AppStore 里封杀 WebApp 吗? -
striveandlive:
fins = js大牛
[原创]GT-Template, 一个超轻量级的js模板工具. -
AlwaysYang:
基础扎实的才能行走天下。
关于body的"大小"在ie和ff下的一些基础知识
由于文档工作滞后
导致我本来放弃了今天发布的念头
但是还是不忍心 让这样一个特殊的日子与 GT-Grid 擦肩而过
所以 还是决定放出 奥运版(本来打算叫正式版,不过刚才网友提醒,叫奥运版更合适 呵呵)
不过我只能说 这个版本的代码是正式的 ,
但是文档依然是目前大家在网上看到的这些.
这贴必然还会是一个 时常更新和编辑的帖子.
希望大家能够喜欢.
我先不多说什么了 晚上看完奥运再来补充
祝福中国 祝福北京 祝福奥运
祝福javaeye
祝福gt
祝福你 祝福我
============================
具体文档请参见下面地址:
列表组件 GT-Grid 最新版本 & 教程
与服务端结合的例子(8月3日版本)
与服务端结合的例子
有个间接实现的方法,不过算是上个时代的方法了,就是刷新iframe
你可以将GT-GRID单独的抽成一个页面,然后用框架将这个页面嵌入进去,同时你在抽成那个页面的loadUrl可以换成<%your url%>(java),当然这个url是你需要保存在session中或则得到的参数。这样的话就能实现你想动态加载url了。
---------------------------------------------------------------------
如果要上传大的代码 建议用附件上传 呵呵
这个我没发看具体对不对
不过 我想应该是对的 eval(...) 里的内容就是一个函数 直接执行那个函数
函数的返回值就是 源代码, 如果你是这么做的 那么应该没问题
另外 jsa的gui程序自带这个功能,选择"格式化代码" 就可以
此问题我在我blog 里回答过很多次了 呵呵
不过我很高兴再回答一次
GT-Grid目前使用的是
全世界最NB的js压缩混淆工具:JSA
来做的压缩混淆.
这个工具是 中国人开发的 一个 "免费不开源"产品.
作者是 javaeye 社区的大牛 jindw
我很高兴 你把你在je的处女贴回给了我
我更高兴的是你说了"拜拜"
送你一张图 作为临别礼物吧
----------------------------------------
客户端分页?OR服务器端分页?
----------------------------------------
导致我本来放弃了今天发布的念头
但是还是不忍心 让这样一个特殊的日子与 GT-Grid 擦肩而过
所以 还是决定放出 奥运版(本来打算叫正式版,不过刚才网友提醒,叫奥运版更合适 呵呵)
不过我只能说 这个版本的代码是正式的 ,
但是文档依然是目前大家在网上看到的这些.
这贴必然还会是一个 时常更新和编辑的帖子.
希望大家能够喜欢.
我先不多说什么了 晚上看完奥运再来补充
祝福中国 祝福北京 祝福奥运
祝福javaeye
祝福gt
祝福你 祝福我
============================
具体文档请参见下面地址:
列表组件 GT-Grid 最新版本 & 教程
与服务端结合的例子(8月3日版本)
与服务端结合的例子
- gt-grid_1.0_b20080808.zip (626 KB)
- 描述: GT-Grid 1.0正式版本.
- 下载次数: 2644
评论
60 楼
feohoo
2008-09-03
引用
lsllsf
有没有改变loadurl的方法或函数
有没有改变loadurl的方法或函数
有个间接实现的方法,不过算是上个时代的方法了,就是刷新iframe
你可以将GT-GRID单独的抽成一个页面,然后用框架将这个页面嵌入进去,同时你在抽成那个页面的loadUrl可以换成<%your url%>(java),当然这个url是你需要保存在session中或则得到的参数。这样的话就能实现你想动态加载url了。
---------------------------------------------------------------------
59 楼
fins
2008-09-02
目前只能直接赋值
58 楼
lsllsf
2008-09-02
有没有改变loadurl的方法或函数
57 楼
lsllsf
2008-08-28
找到了.原来可以在代码中指字样式.
56 楼
lsllsf
2008-08-28
怎么能让gt-grid在ie显示时置顶呢.我在样式表中加了margin-top: 0px;
margin-left: 0px;没有效果呢.
margin-left: 0px;没有效果呢.
55 楼
fins
2008-08-28
GT-Grid不开源 所以不能提供你代码 实在抱歉
54 楼
lsllsf
2008-08-28
打出来的代码可读性太差了。楼主把你的源码发我一份吧。lsllsf@tom.com
还有和数据库交互的时候,可不可以不用交互所有信息,比如你删除时只交互主键就可以了。最好的交互的是sql。谢谢楼主。有注释的代码发我一份。我研究一下。
还有和数据库交互的时候,可不可以不用交互所有信息,比如你删除时只交互主键就可以了。最好的交互的是sql。谢谢楼主。有注释的代码发我一份。我研究一下。
53 楼
fins
2008-08-27
lsllsf 写道
谢谢楼主能分享你的源码.我会改进意见发给你的.同时我也希望你能把他作成一个开源项目人多力量大.这是源码你看一下有哪些不对的吗.
如果要上传大的代码 建议用附件上传 呵呵
这个我没发看具体对不对
不过 我想应该是对的 eval(...) 里的内容就是一个函数 直接执行那个函数
函数的返回值就是 源代码, 如果你是这么做的 那么应该没问题
另外 jsa的gui程序自带这个功能,选择"格式化代码" 就可以
52 楼
lsllsf
2008-08-27
谢谢楼主能分享你的源码.我会改进意见发给你的.同时我也希望你能把他作成一个开源项目人多力量大.这是源码你看一下有哪些不对的吗.
if(!window.GT){
window.GT={};
}
GT.Const=GT.Const||{};
GTConst=GT.Const;
GT.Const.Grid={DEFAULT_ECG_ID:"gt",SHADOW_ROW:"_shadowRow",HIDE_HEADER_ROW:"_hideListRow",COL_T_CLASSNAME:"gt-col-",SKIN_CLASSNAME_PREFIX:"gt-skin-",SCROLLBAR_WIDTH:18,MIN_COLWIDTH:40,AJAX_HEADER:["isAjaxRequest","true"]};
GT.Const.Key={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,PAUSE:19,CAPSLOCK:20,ESC:27,SPACE:33,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,WIN:91,WIN_R:92,MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLLLOCK:145};
if(!window.GT){
window.GT={};
}
GT.loaded=false;
GT.init=function(_){
_=_||window;
GT.doc=document;
_.undefined=_.undefined;
var $=_.navigator.userAgent.toLowerCase();
GT.isIE=$.indexOf("msie")>-1;
GT.isIE7=$.indexOf("msie 7")>-1;
GT.isIE8=$.indexOf("msie 8")>-1;
GT.isIE9=$.indexOf("msie 9")>-1;
GT.isFF=$.indexOf("firefox")>-1;
GT.isFF1=$.indexOf("firefox/1")>-1;
GT.isFF2=$.indexOf("firefox/2")>-1;
GT.isFF3=$.indexOf("firefox/3")>-1;
GT.isOpera=$.indexOf("opera")>-1;
GT.isWebkit=(/webkit|khtml/).test($);
GT.isSafari=$.indexOf("safari")>-1||GT.isWebkit;
GT.isGecko=GT.isMoz=!GT.isSafari&&$.indexOf("gecko")>-1;
GT.isStrict=GT.doc.compatMode=="CSS1Compat"||GT.isSafari;
GT.isBoxModel=GT.isIE&&!GT.isIE8&&!GT.isIE9&&!GT.isStrict;
GT.isNotStrictIE=GT.isBoxModel;
GT.isSecure=_.location.href.toLowerCase().indexOf("https")===0;
GT.isWindows=($.indexOf("windows")!=-1||$.indexOf("win32")!=-1);
GT.isMac=($.indexOf("macintosh")!=-1||$.indexOf("mac os x")!=-1);
GT.isLinux=($.indexOf("linux")!=-1);
};
GT.init();
GT.$extend=function(_,A,C){
if(arguments.length<2){
A=_;
_=this;
}
for(var B in A){
var $=A[B];
if(C&&$&>.$type($,"object","array")){
$=GT.$clone($,C);
}
_[B]=$;
}
return _;
};
GT.$empty=function(){
};
GT.$extend(GT,{$chk:function($){
return !!($||$===0||$==="");
},$type:function($){
var A=arguments.length;
if(A>1){
for(var B=1;B<A;B++){
if(GT.$type($)==arguments[B]){
return true;
}
}
return false;
}
var _=typeof $;
if($===null){
return "object";
}
if(_=="undefined"){
return "undefined";
}
if($.htmlElement){
return "element";
}
if(_=="object"&&$.nodeType&&$.nodeName){
switch($.nodeType){
case 1:
return "element";
case 3:
return (/\S/).test($.nodeValue)?"textnode":"whitespace";
}
}
if(_=="object"||_=="function"){
switch($.constructor){
case Array:
return "array";
case RegExp:
return "regexp";
case GT.Class:
return "class";
}
}
if(_=="object"&&typeof $.length=="number"){
return ($.callee)?"arguments":"collection";
}else {
if(_=="function"&&typeof $.length=="number"&&$[0]!==undefined){
return "collection";
}
}
return _;
},$merge:function(){
var B={};
for(var C=0;C<arguments.length;C++){
for(var A in arguments[C]){
var _=arguments[C][A],$=B[A];
if($&>.$type(_,"object")&>.$type($,"object")){
B[A]=GT.$merge($,_);
}else {
B[A]=_;
}
}
}
return B;
},$indexOf:function(_,A,$){
if(_){
$=$||0;
for(var C=$,B=_.length;C<B;C++){
if(_[C]===A){
return C;
}
}
}
return -1;
},$array:function(B,_,D,A){
var $=[];
if(B){
if(!GT.$chk(_)){
_=0;
}
if(!GT.$chk(D)){
D=B.length;
}
if(GT.$type(B,"arguments","collection")||GT.$type(B,"array")&&(_>0||D<B.length)){
for(var E=_;E<D;E++){
$.push(B[E]);
}
}else {
if(GT.$type(B,"array")){
$=$.concat(B);
}else {
for(var C in B){
if(B.hasOwnProperty(C)){
$.push(B[C]);
}
}
}
}
}
return $;
},$clone:function(_,A){
var $;
if(!_){
$=_;
}else {
if(GT.$type(_,"array","arguments","collection")){
$=GT.$array(_,0,_.length,A);
}else {
$=GT.$extend({},_,A);
}
}
return $;
},$msg:function($,_){
for(var A=1;A<arguments.length;A++){
$=GT.U.replaceAll($,"#{"+A+"}",arguments[A]);
}
return $;
},$clear:function($){
window.clearTimeout($);
window.clearInterval($);
if(CollectGarbage){
CollectGarbage();
}
return null;
},$thread:function(_,A){
var $=_;
window.setTimeout($,A||20);
},$each:function(C,E,D,$){
var A=[];
if(GT.$type(C,"array","arguments","collection")||C&&!GT.$type(C,"string")&>.$type(C.length,"number")){
for(var F=0,B=C.length;F<B;F++){
A.push(E.call(D||C,C[F],F,C,$));
}
}else {
for(var _ in C){
A.push(E.call(D||C,C[_],_,C,$));
}
}
return A;
},$getText:function($){
return $.innerText===undefined?$.textContent:$.innerText;
},$element:function($,B){
if(GT.$type($,"string")){
if(GT.isIE&&B&&(B.name||B.type)){
var _=(B.name)?" name=\""+B.name+"\"":"",A=(B.type)?" type=\""+B.type+"\"":"";
delete B.name;
delete B.type;
$="<"+$+_+A+">";
}
$=GT.doc.createElement($);
}
if(B){
if(B.style){
GT.$extend($.style,B.style);
delete B.style;
}
GT.$extend($,B);
}
return $;
}});
GT.Class=function(_){
_=_||{};
var $=function(){
var _=this.XtX0;
if(GT.$type(_,"function")){
_=_.apply(this,arguments);
}
if(GT.$type(_,"object")){
GT.$extend(this,_);
}
var $=this.abstractMethods;
GT.$each(this.abstractMethods,function($){
this[$]=GT.$empty;
},this);
return (arguments[0]!==GT.$empty&>.$type(this.rmm5,"function"))?this.rmm5.apply(this,arguments):this;
};
GT.$extend($,this);
$.constructor=GT.Class;
$.prototype=_;
return $;
};
GT.Class.prototype={extend:function(){
var C=new this(GT.$empty);
for(var D=0,_=arguments.length;D<_;D++){
var A=arguments[D];
for(var $ in A){
var B=C[$];
C[$]=GT.Class.merge(B,A[$]);
}
}
return new GT.Class(C);
}};
GT.Class.merge=function($,_){
if($&&$!=_){
var A=GT.$type(_);
if(!GT.$type($,A)){
return _;
}
switch(A){
case "function":
var B=function(){
this.nds1=arguments.callee.nds1;
return _.apply(this,arguments);
};
B.nds1=$;
return B;
case "object":
return GT.$merge($,_);
}
}
return _;
};
GT.$class=function($){
return new GT.Class($);
};
GT.$e=GT.$element;
GT.$A=GT.$array;
GT.$byId=function($,A){
if(!GT.$chk($)){
return null;
}
var _=GT.$type($);
if(_=="element"){
return GT.$e($,A);
}
if(_=="string"||_=="number"){
$=GT.doc.getElementById(""+$);
}
if(!$){
return null;
}
if(GT.U.contains(["object","embed"],$.tagName.toLowerCase())){
return $;
}
return GT.$e($);
};
GT.$byName=function(_){
var A=[];
if(!GT.$chk(_)){
return A;
}
var $=GT.doc.getElementsByName(""+_);
if(!$||$.length<1){
return A;
}
for(var B=0;B<$.length;B++){
_=$[B];
A.push(GT.U.contains(["object","embed"],_.tagName.toLowerCase())?_:GT.$e(_));
}
return A;
};
GT.$=function($){
var _=GT.$byName($);
if(_&&_.length===1){
return _[0];
}
return (!_||_.length<1)?GT.$byId($):_;
};
GT.Utils={parseInt:function($,A){
var _=parseInt($);
return isNaN(parseInt($))?A||0:_;
},moveItem:function(_,$,B){
$=$<0?0:($>_.length-1?_.length-1:$);
B=B<0?0:(B>_.length-1?_.length-1:B);
if($==B){
return _;
}
var A=_[$],C=_[B];
_.splice(B,1,A,C);
if($<B){
_.splice($,1);
}else {
_.splice($+1,1);
}
return _;
},convert:function(_,$){
switch($){
case "int":
return parseInt(_);
case "float":
return parseFloat(_);
case "date":
return _;
default:
return _;
}
return _;
},getTagName:function($){
return $&&$.tagName?String($.tagName).toUpperCase():null;
},Sea9:function(A,$,_,B){
if(!$){
_=GT.$event(_);
$=GT.U.getEventTarget(_);
}
B=B||6;
if(!$){
return null;
}
A=A.toLowerCase();
while($&&(B--)>0){
if($.tagName&&$.tagName.toLowerCase()==A){
return $;
}
$=$.parentNode;
}
return null;
},focus:function(_){
if(_){
try{
_.focus();
_.select&&_.select();
}
catch($){
}
}
},hasClass:function($,_){
return $?GT.U.hasSubString($.className,_," "):false;
},addClass:function($,_){
if($&&!GT.U.hasClass($,_)){
$.className=GT.U.xZs1($.className+" "+_);
}
return $;
},removeClass:function($,_){
if($){
$.className=GT.U.xZs1($.className.replace(new RegExp("(^|\\s)"+_+"(?:\\s|$)"),"$1"));
}
return $;
},toggleClass:function($,_){
return GT.U.hasClass($,_)?GT.U.removeClass($,_):GT.U.addClass($,_);
},hasSubString:function(_,A,$){
return ($)?($+_+$).indexOf($+A+$)>-1:_.indexOf(A)>-1;
},childElement:function(_,$){
var B=0,A=_?_.firstChild:null;
while(A){
if(A.nodeType==1){
if(++B==$){
return A;
}
}
A=A.nextSibling;
}
return null;
},firstChildElement:function($){
return GT.U.childElement($,1);
},XeO1:function($){
var _=$.childNodes[$.childNodes.length-1];
return _.nodeType==1?_:GT.U.prevElement(_);
},nextElement:function($){
while(($=$.nextSibling)&&$.nodeType!=1){
}
return $;
},prevElement:function($){
while(($=$.previousSibling)&&$.nodeType!=1){
}
return $;
},getCellIndex:function(_){
if(GT.isIE){
var $=_.parentNode.cells;
for(var B=0,A=$.length;B<A;B++){
if($[B]===_){
return B;
}
}
}
return _.cellIndex;
},insertNodeBefore:function($,_){
if(!$||!_||!_.parentNode){
return null;
}
_.parentNode.insertBefore($,_);
return $;
},insertNodeAfter:function($,_){
_.parentNode.insertBefore($,_.nextSibling);
return $;
},listToMap:function(_){
var $={};
for(var A=0;A<_.length;A++){
$[_[A]]=_[A];
}
return $;
},createSelect:function(A,B,C,_){
_=_||GT.$e("select",C||{});
var $=GT.doc.createDocumentFragment();
GT.$each(A,function(_,C){
var A=GT.$e("option",{"value":C,"text":""+_,innerHTML:_});
if(GT.$chk(B)&&C==B){
A.selected=true;
}
$.appendChild(A);
});
_.appendChild($);
return _;
},createSelectHTML:function(B,D,G){
G=G||{};
var $=G.id?(" id=\""+G.id+"\" "):" ",_=G.className||"",C=G.style?(" style=\""+G.style+"\" "):" ",F=["<select"+$+C+"class=\"gt-input-select "+_+"\">"];
for(var E in B){
var A="";
if((D||D===0)&&E==D){
A=" selected=\"selected\" ";
}
F.push("<option value=\""+E+"\" "+A+">"+B[E]+"</option>");
}
F.push("</select>");
return F.join("");
},getEventTarget:function(A){
var _=null;
try{
_=A.target||A.srcElement;
}
catch($){
return null;
}
return !_?null:(_.nodeType==3?_.parentNode:_);
},stopEvent:function($){
$=$||window.event;
if($){
if($.stopPropagation){
$.stopPropagation();
$.preventDefault();
}else {
$.cancelBubble=true;
$.returnValue=false;
}
}
},addEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.addEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.attachEvent($,D);
}
GT.EventCache.add(_,B,D,false);
return _;
},removeEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.removeEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.detachEvent($,D);
}
GT.EventCache.remove(_,B,D,false);
return _;
},ric3:[],Zdl9:function(){
for(var A=0;A<GT.U.ric3.length;A++){
var _=GT.U.ric3[A];
try{
_.apply(this,arguments);
}
catch($){
}
}
GT.loaded=true;
},onLoad:function(_,$){
$=$||window;
GT.U.ric3.push(_);
if(!GT.U.Zdl9.hasAdd){
GT.U.addEvent($,"load",GT.U.Zdl9);
GT.U.Zdl9.hasAdd=true;
}
},igi0:function(){
return GT.doc.createElement("div");
}(),ica7:function(A,$){
GT.U.igi0.innerHTML="<table><tbody>"+A+"</tbody></table>";
var _=GT.U.igi0.getElementsByTagName("tr")[0];
$.appendChild(_);
GT.U.igi0.innerHTML="";
return _;
},removeNode:function(_){
for(var A=0;A<arguments.length;A++){
var $=arguments[A];
if(!$||!$.parentNode||$.tagName=="BODY"){
return null;
}
GT.EventCache.remove($);
if(GT.isIE){
GT.U.igi0.appendChild($);
GT.U.igi0.innerHTML="";
}else {
$.parentNode.removeChild($);
}
}
},getLastChild:function($){
return $.childNodes[$.childNodes.length-1];
},getPosLeftTop:function($,_){
_=_||window;
var B=$.offsetTop,A=$.offsetLeft;
$=$.offsetParent;
while($&&$!=_){
B+=($.offsetTop-$.scrollTop);
A+=($.offsetLeft-$.scrollLeft);
$=$.offsetParent;
}
return [A,B];
},getPosRight:function($){
return GT.U.getPosLeftTop($)[0]+$.offsetWidth;
},getPosBottom:function($){
return GT.U.getPosLeftTop($)[1]+$.offsetHeight;
},getHeight:function(A,$){
var C=A.offsetHeight||0;
if($!==true){
return C;
}
var B=GT.U.getBorderWidths(A),_=GT.U.getPaddings(A);
return C-B[0]-B[2]-_[0]-_[2];
},getWidth:function(B,_){
var $=B.offsetWidth||0;
if(_!==true){
return $;
}
var C=GT.U.getBorderWidths(B),A=GT.U.getPaddings(B);
return $-C[1]-C[3]-A[1]-A[3];
},getBorderWidths:function($){
return [GT.U.parseInt($.style.borderTopWidth),GT.U.parseInt($.style.borderRightWidth),GT.U.parseInt($.style.borderBottomWidth),GT.U.parseInt($.style.borderLeftWidth)];
},getPaddings:function($){
return [GT.U.parseInt($.style.paddingTop),GT.U.parseInt($.style.paddingRight),GT.U.parseInt($.style.paddingBottom),GT.U.parseInt($.style.paddingLeft)];
},getPageX:function($){
$=$||window.event;
var _=$.pageX;
if(!_&&0!==_){
_=$.clientX||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[0];
}
}
return _;
},getPageY:function($){
$=$||window.event;
var _=$.pageY;
if(!_&&0!==_){
_=$.clientY||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[1];
}
}
return _;
},getPageScroll:function(){
var _=GT.doc.documentElement,$=GT.doc.body;
if(_&&(_.scrollLeft||_.scrollTop)){
return [_.scrollLeft,_.scrollTop];
}else {
if($){
return [$.scrollLeft,_.scrollTop];
}else {
return [0,0];
}
}
},getScroll:function(A){
var $=A,B=GT.doc;
if($==B||$==B.body){
var C=window.pageXOffset||B.documentElement.scrollLeft||B.body.scrollLeft||0,_=window.pageYOffset||B.documentElement.scrollTop||B.body.scrollTop||0;
return [C,_];
}else {
return [$.scrollLeft,$.scrollTop];
}
},getXY:function(F,A){
var H,E,_,B,I=GT.doc.body;
if(F.getBoundingClientRect){
_=F.getBoundingClientRect();
B=GT.U.getScroll(GT.doc);
return [_.left+B[0],_.top+B[1]];
}
var K=0,J=0;
H=F;
A=A||I;
var D=F.style.position=="absolute";
while(H){
K+=H.offsetLeft;
J+=H.offsetTop;
if(!D&&H.style.position=="absolute"){
D=true;
}
if(GT.isGecko){
E=H;
var C=parseInt(E.style.borderTopWidth,10)||0,G=parseInt(E.style.borderLeftWidth,10)||0;
K+=G;
J+=C;
if(H!=F&&E.style.overflow!="visible"){
K+=G;
J+=C;
}
}
H=H.offsetParent;
}
if(GT.isSafari&&D){
K-=I.offsetLeft;
J-=I.offsetTop;
}
if(GT.isGecko&&!D){
var $=I;
K+=parseInt($.style.borderTopWidth,10)||0;
J+=parseInt($.style.borderTopWidth,10)||0;
}
H=F.parentNode;
while(H&&H!=I){
if(!GT.isOpera||(H.tagName.toUpperCase()!="TR"&&H.style.display!="inline")){
K-=H.scrollLeft;
J-=H.scrollTop;
}
H=H.parentNode;
}
return [K,J];
},setXY:function($,A){
if($.style.position=="static"){
$.style.position="relative";
}
var _=GT.U.gpn0($,A);
if(A[0]!==false){
$.style.left=_.left+"px";
}
if(A[1]!==false){
$.style.top=_.top+"px";
}
},gpn0:function(_,E,D){
if(typeof E=="object"||E instanceof Array){
D=E[1];
E=E[0];
}
var A=_.style.position,B=GT.U.getXY(_),C=parseInt(_.style.left,10),$=parseInt(_.style.top,10);
if(isNaN(C)){
C=(A=="relative")?0:_.offsetLeft;
}
if(isNaN($)){
$=(A=="relative")?0:_.offsetTop;
}
return {left:(E-B[0]+C),top:(D-B[1]+$)};
},getContentWidthHeight:function(A){
var _=GT.U.parseInt(A.style.marginLeft),B=GT.U.parseInt(A.style.marginRight),D=GT.U.parseInt(A.style.paddingLeft),C=GT.U.parseInt(A.style.paddingRight),$=A.clientWidth-D-C,E=A.clientHeight;
return [$,E];
},getPixelValue:function(A,_){
if(GT.$type(A,"number")){
return A;
}
A=""+A;
var $=GT.U.parseInt(A);
if(A.indexOf("%")>1){
return _*$/100;
}
return $;
},setValue:function(_,C){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
A=(""+A).toUpperCase();
switch(A){
case "SELECT":
var $=[].concat(C),B=null;
GT.$each(_.options,function(C,A){
if(A===0){
B=C;
}
C.selected=false;
if(_.multiple){
GT.$each($,function($){
C.selected=C.value==$;
});
}else {
if(C.value==$[0]){
C.selected=true;
B=false;
}
}
});
if(!_.multiple&&B){
B.selected=true;
}
return (_.multiple)?$:$[0];
case "INPUT":
if(_.type=="checkbox"||_.type=="radio"){
_.checked=_.value==C;
break ;
}
case "TEXTAREA":
_.value=C;
}
return null;
},getValue:function(_){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
switch(A){
case "SELECT":
var $=[];
GT.$each(_.options,function(_){
if(_.selected){
$.push(_.value);
}
});
$=(_.multiple)?$:$[0];
if(($===null||$===undefined)&&_.options[0]){
$=_.options[0].value;
}
return $;
case "INPUT":
if((_.type=="checkbox"||_.type=="radio")&&!_.checked){
break ;
}
case "TEXTAREA":
return _.value;
}
return null;
},setOpacity:function($,_){
_=_>1?1:(_<0?0:_);
if(!$.currentStyle||!$.currentStyle.hasLayout){
$.style.zoom=1;
}
if(GT.isIE){
$.style.filter=(_==1)?"":"alpha(opacity="+_*100+")";
}
$.style.opacity=_;
if(_===0){
if($.style.visibility!="hidden"){
$.style.visibility="hidden";
}
}else {
if($.style.visibility!="visible"){
$.style.visibility="visible";
}
}
return $;
},replaceAll:function(exstr,ov,value){
var gc=GT.U.escapeRegExp(ov);
if(!GT.$chk(gc)||gc===""){
return exstr;
}
var rep="/"+gc+"/gm",r=null,cmd="r=exstr.replace("+rep+","+GT.U.escapeString(value)+")";
eval(cmd);
return r;
},trim:function(_,$){
if(!_||!_.replace||!_.length){
return _;
}
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},escapeRegExp:function($){
return !$?""+$:(""+$).replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
},escapeString:function($){
return $===""?"''":(!$?""+$:("\""+(""+$).replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"));
},bind:function(A,_,$){
$=[].concat($);
return function(){
return A.apply(_||A,GT.U.merge(GT.$A(arguments),$));
};
},bindAsEventListener:function(A,_,$){
return function(B){
B=B||window.event;
return A.apply(_||A,[GT.$event(B)].concat($));
};
},trim:function(_,$){
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},xZs1:function($){
return GT.U.trim($.replace(/\s{2,}/g," "));
},contains:function($,_,A){
return GT.U.indexOf($,_,A)!=-1;
},merge:function(A,C,$){
var _=A.length<C.length?A.length:C.length;
if($){
for(var D=0,B=_;D<B;D++){
A[D]=C[D];
}
}
for(D=_,B=C.length;D<B;D++){
A[D]=C[D];
}
return A;
},each:function($,A,_){
return GT.$each($,A,_);
},indexOf:function($,_,B){
var A=$.length;
for(var C=(B<0)?Math.max(0,A+B):B||0;C<A;C++){
if($[C]===_){
return C;
}
}
return -1;
},remove:function($,_,B){
var C=0,A=$.length;
while(C<A){
if($[C]===_){
$.splice(C,1);
if(!B){
return $;
}
A--;
}else {
C++;
}
}
return $;
},next:function(_,A){
var $=GT.U.indexOf(_,A);
if($<0){
return null;
}
return _[$+1];
},previous:function(_,A){
var $=GT.U.indexOf(_,A);
if($<1){
return null;
}
return _[$-1];
},nce6:function($,_){
_=_||GT.doc;
var A=_.createElement("style");
A.id=$;
var B=_.getElementsByTagName("head")[0];
B&&B.appendChild(A);
return A;
},getCheckboxState:function($,_){
var A={};
for(var B=0;B<$.length;B++){
if($[B].name==_&&$[B].checked){
A[$[B].value]=$[B].checked;
}
}
return A;
}};
GT.Util=GT.Utils;
GT.U=GT.Utils;
GT.Utils.CSS=function(){
var $=null;
return {nce6:function(C,$,A){
var D;
A=A||GT.doc;
var B=A.getElementsByTagName("head");
if(!B||B.length<1){
A.documentElement.insertBefore(A.createElement("head"),A.body);
B=A.getElementsByTagName("head");
}
var E=B[0],F=A.createElement("style");
F.setAttribute("type","text/css");
if($){
F.setAttribute("id",$);
}
if(GT.isIE){
E.appendChild(F);
D=F.styleSheet;
D.cssText=C;
}else {
try{
F.appendChild(A.createTextNode(C));
}
catch(_){
F.cssText=C;
}
E.appendChild(F);
D=F.styleSheet?F.styleSheet:(F.sheet||A.styleSheets[A.styleSheets.length-1]);
}
this.cacheStyleSheet(D);
return D;
},getRules:function(_,A){
A=A||GT.doc;
if(!$||_){
$={};
var C=A.styleSheets;
for(var D=0,B=C.length;D<B;D++){
this.cacheStyleSheet(C[D]);
}
}
return $;
},getRule:function(_,$){
var A=this.getRules($);
return A[_.toLowerCase()];
},updateRule:function($,B,A){
var _=this.getRule($);
if(_){
_.style[B]=A;
}
},cacheStyleSheet:function(A){
$=$||{};
try{
var B=A.cssRules||A.rules;
for(var C=B.length-1;C>=0;--C){
$[B[C].selectorText.toLowerCase()]=B[C];
}
}
catch(_){
}
}};
}();
GT.$event=function($){
$=$||window.event;
return $;
};
GT.EventCache=(function(){
var A=[],_=[],B={};
function $($){
return ""+$+"_"+$.id;
}
return {add:function($,D,E){
if(!$){
return ;
}
if(!GT.U.contains(A,arguments)){
A.push(arguments);
}
var C=GT.U.indexOf(_,$),F=C+"_"+$+"_"+$.id;
if(C<0){
F=_.length+"_"+$+"_"+$.id;
_.push($);
B[F]={};
}
B[F][D]=B[F][D]||[];
if(!GT.U.contains(B[F][D],E)){
B[F][D].push(E);
}
},remove:function($,C,D){
if(!$){
return ;
}
var A=GT.U.indexOf(_,$),E=A+"_"+$+"_"+$.id;
if(A<0||!B[E]){
return ;
}
if(!C){
B[E]=null;
_[A]=null;
return ;
}
if(!D&&B[E][C]){
B[E][C]=null;
delete B[E][C];
}
if(B[E][C]){
B[E][C].remove(D);
}
},ega1:function(){
var _,$;
for(_=A.length-1;_>=0;_=_-1){
$=A[_];
GT.EventCache.remove($[0]);
if($[0].removeEventListener){
$[0].removeEventListener($[1],$[2],$[3]);
}
if($[1].substring(0,2)!="on"){
$[1]="on"+$[1];
}
if($[0].detachEvent){
$[0].detachEvent($[1],$[2]);
}
$[0][$[1]]=null;
delete A[_];
}
window.CollectGarbage&&CollectGarbage();
}};
})();
GT.initGlobalEvent=function(){
if(GT.initGlobalEvent.inited){
return ;
}
var $=GT.isIE?GT.doc.body:GT.doc;
GT.U.addEvent($,"mousemove",function($){
GT.activeGrid&>.Grid.IRe8($,GT.activeGrid);
});
GT.U.addEvent($,"mouseup",function($){
GT.activeGrid&>.Grid.gsO6($,GT.activeGrid);
});
GT.U.addEvent($,"click",function($){
GT.activeGrid&&(GT.activeGrid.saa5()||GT.activeGrid.closeGridMenu());
});
GT.U.addEvent($,"keydown",function($){
GT.activeGrid&>.activeGrid.ees6($);
});
GT.initGlobalEvent.inited=true;
};
GT.FunctionCache={};
GT.$invoke=function(B,_,$){
B=B||window;
var A=B[_]||GT.$getFunction(_);
if(typeof (A)=="function"){
return A.apply(B,$||[]);
}
};
GT.$getFunction=function($){
return GT.FunctionCache[$];
};
GT.$callFunction=function($,_){
GT.$invoke(null,$,_);
};
GT.$putFunction=function($,_){
GT.FunctionCache[$]=_;
};
GT.$removeFunction=function($){
GT.FunctionCache[$]=null;
delete GT.FunctionCache[$];
};
GT.U.onLoad(function(){
GT.U.addEvent(window,"unload",GT.EventCache.ega1);
});
GT.AjaxDefault={paramName:"_gt_json"};
GT.Ajax=GT.$class({XtX0:function(){
return {method:"post",jsonParamName:GT.AjaxDefault.paramName,async:true,urlEncoded:true,encoding:null,mimeType:null,beforeSend:GT.$empty,onComplete:GT.$empty,onSuccess:GT.$empty,onFailure:GT.$empty,onCancel:GT.$empty,xhr:"",url:"",data:"",paramType:"jsonString",headers:{"X-Requested-With":"XMLHttpRequest","Accept":"text/javascript, text/html, application/xml,application/json, text/xml, */*"},autoCancel:false,evalScripts:false,evalResponse:false,responseContentType:"",dataUrl:false,parameters:null};
},setParameters:function($){
this.parameters=$;
},rmm5:function(_){
_=_||{};
if(GT.$type(_)=="string"){
_={url:_};
}
if(!(this.xhr=this.getXHR())){
return ;
}
var $=GT.$extend(this.headers,_.headers);
GT.$extend(this,_);
if(this.mimeType){
$["X-Response-MimeType"]=this.mimeType;
}
this.headers=$;
},send:function(I){
this.running=true;
if(GT.$type(I)=="string"){
I={data:I};
}
I=GT.$extend({data:this.data,url:this.url,method:this.method},I);
var C=I.data,H=I.url,D=String(I.method).toLowerCase();
if(GT.$invoke(this,"beforeSend",[this.xhr,C])===false){
return this;
}
if(this.urlEncoded&&D=="post"){
var B=(this.encoding)?"; charset="+this.encoding:"";
this.setHeader("Content-type","application/x-www-form-urlencoded"+B);
}
switch(GT.$type(C)){
case "object":
if(this.paramType=="jsonString"){
var F=GT.toJSONString(C);
C={};
C[this.jsonParamName]=F;
}
C=GT.toQueryString(C);
break ;
}
var E;
if(this.parameters&>.$type(this.parameters,"object")){
E=GT.toQueryString(this.parameters);
}else {
if(GT.$type(this.parameters,"string")){
E=this.parameters;
}
}
if(E&>.$type(C,"string")){
C=C+"&"+E;
}
if(D=="post"){
var _=H.indexOf("?");
if(_>=0){
C=H.substring(_+1)+"&"+C;
H=H.substring(0,_);
}
}else {
if(C&&(D=="get"||this.dataUrl)){
H=H+(H.indexOf("?")>=0?"&":"?")+C;
C=null;
}
}
var A=this;
this.xhr.open(D.toUpperCase(),H,this.async);
this.xhr.onreadystatechange=function(){
return A.onStateChange.apply(A,arguments);
};
for(var G in this.headers){
try{
this.xhr.setRequestHeader(G,this.headers[G]);
}
catch($){
}
}
this.xhr.send(C);
if(!this.async){
this.onStateChange();
}
return this;
},onStateChange:function(){
if(this.xhr.readyState!=4||!this.running){
return ;
}
this.running=false;
this.status=0;
try{
this.status=this.xhr.status;
}
catch($){
}
this.onComplete();
if(this.isSuccess()){
this._onSuccess();
}else {
this._onFailure();
}
this.xhr.onreadystatechange=GT.$empty;
},isScript:function(){
return (/(ecma|java)script/).test(this.getHeader("Content-type"));
},isSuccess:function(){
var $=this.xhr.status;
return (($>=200)&&($<300));
},_onSuccess:function(){
this.response={"text":this.xhr.responseText,"xml":this.xhr.responseXML};
this.onSuccess(this.response);
},_onFailure:function($){
this.onFailure(this.xhr,$);
},setHeader:function($,_){
this.headers[$]=_;
return this;
},getHeader:function(_){
try{
return this.xhr.getResponseHeader(_);
}
catch($){
return null;
}
},getXHR:function(){
return (window.XMLHttpRequest)?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):false);
},cancel:function(){
if(!this.running){
return this;
}
this.running=false;
this.xhr.abort();
this.xhr.onreadystatechange=GT.$empty;
this.xhr=this.getXHR();
this.onCancel();
return this;
}});
GT.JSON={encode:function(A,$,B){
var _,C=B?"\n":"";
switch(GT.$type(A)){
case "string":
return "\""+A.replace(/[\x00-\x1f\\"]/g,GT.JSON.fcs0)+"\"";
case "array":
_=[];
GT.$each(A,function(D,A){
var C=GT.JSON.encode(D,$,B);
if(C||C===0){
_.push(C);
}
});
return "["+C+(B?_.join(","+C):_)+"]"+C;
case "object":
if(A===null){
return "null";
}
_=[];
GT.$each(A,function(C,D){
if(!$||D.indexOf($)!=0){
var A=GT.JSON.encode(C,$,B);
if(A){
_.push(GT.JSON.encode(D,$,B)+":"+A);
}
}
},null,$);
return "{"+C+(B?_.join(","+C):_)+C+"}"+C;
case "number":
case "boolean":
return String(A);
}
return null;
},decode:function(string,secure){
if(!GT.$type(string,"string")||!string.length){
return null;
}
if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){
return null;
}
return eval("("+string+")");
},tae5:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},fcs0:function($){
return GT.JSON.tae5[$]||"\\u00"+Math.floor($.charCodeAt()/16).toString(16)+($.charCodeAt()%16).toString(16);
}};
GT.toQueryString=function(_){
if(!_||GT.$type(_,"string","number")){
return _;
}
var $=[];
for(var B in _){
var A=_[B];
if(GT.$type(A,"object","array")){
A=GT.toJSONString(A);
}
$.push(encodeURIComponent(B)+"="+encodeURIComponent(A));
}
return $.join("&");
};
GT.toJSONString=function($,_){
return GT.JSON.encode($,"__gt_",_);
};
GT.Const.DataSet={KEY:"__gt_ds_key__",INDEX:"__gt_ds_index__",ROW_KEY:"__gt_row_key__",NOT_VAILD:"__gt_no_valid__",SN_FIELD:"__gt_sn__",SORT_VALUE:"__gt_sort_value__",SORT_S:"__gt_"};
GT.DataSetDefault={SEQUENCE:0,uniqueField:GT.Const.DataSet.SN_FIELD,recordType:"object",recordXpath:null,dataXML:null,currentBegin:0,cursor:0,startRecordNo:0,cacheData:false,cacheModifiedData:true,modified:false,XtX0:function(){
return {fields:[],fieldsName:[],fieldsMap:{},fieldsInfo:{},data:null,sXa7:[],Xxy6:null,additional:[],sortInfo:[],queryInfo:[],reocrdIndex:{},updatedRecords:{},nsu0:{},updatedFields:{},insertedRecords:{},deletedRecords:{},mef2:GT.$empty,LSa1:GT.$empty};
},rmm5:function($){
GT.$extend(this,$);
this.recordType=this.recordType||"object";
this.fields&&this.Lgs7(this.fields);
this.data&&this.gso6(this.data);
},initValues:GT.$empty,isEqualRecord:function(_,A){
for(var $ in this.fieldsInfo){
if(_[$]!==A[$]){
return false;
}
}
return true;
},xZs1:function($){
if(!this.cacheData||$===true){
this.data=null;
this.currentBegin=0;
this.sXa7=[];
}
this.cleanModifiedData();
},cleanModifiedData:function($){
if(!this.cacheModifiedData||$){
this.updatedRecords={};
this.nsu0={};
this.updatedFields={};
this.insertedRecords={};
this.deletedRecords={};
}
},gso6:function($){
if(!$){
return false;
}
this.xZs1();
return this.lgo1($);
},Lgs7:function(C){
this.fields=C;
this.fieldsName=[];
var A=null;
for(var B=0,_=this.fields.length;B<_;B++){
var $=this.fields[B]||{};
if(GT.$type($,"string")){
$={name:$};
}
$.name=$.name||String(B);
$.type=$.type||"string";
$.index=$.index||(this.getRecordType()=="array"?B:$.name);
if($.initValue){
A=A||{};
A[$.index]=$.initValue;
}
this.fieldsMap[$.name]=$;
this.fieldsInfo[$.index]=$;
this.fieldsName[B]=$.name;
}
if(A){
this.initValues=(function($){
return function(C,A,B){
for(var _ in $){
C[_]=$[_](C,A,B);
}
};
})(A);
}else {
this.initValues=GT.$empty;
}
},lgo1:function(A){
if(!A){
return false;
}
this.data=this.data||[];
var $=this;
for(var C=0,B=A.length;C<B;C++){
var _=A[C];
_[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.data.push(_);
this.sXa7.push(this.currentBegin++);
this.initValues(_,C,this);
}
return true;
},getDataProxySize:function(){
return this.sXa7.length;
},resetDataProxy:function(_){
this.sXa7=[];
_=_||this.getSize();
for(var $=0;$<_;$++){
this.sXa7[$]=$;
}
},loadData:function($){
if($){
return gso6($.load());
}
},Zls1:function($){
if($&&this.recordType!=$){
this.recordType=$;
this.Lgs7(this.fields);
}
},getRecord:function($){
return this.data?this.data[this.sXa7[$]]:null;
},getDataRecord:function($){
return this.dataset.data[$];
},setValueByName:function($,B,A){
var _=this.fieldsMap[B].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
$[_]=A;
},getValueByName:function($,A){
var _=this.fieldsMap[A].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
return $[_];
},getFields:function(){
},getRecordType:function(_,$){
this.recordType=_||this.recordType;
if(!GT.$type(this.recordType,"string")&&(this.data&&this.getSize()>0)){
$=this.data[0];
if(GT.$type($,"array")){
this.recordType="array";
}else {
this.recordType="object";
}
}
return this.recordType;
},filterCheck:{equal:function($,_){
return $==_;
},notEqual:function($,_){
return $!=_;
},less:function($,_){
return $<_;
},great:function($,_){
return $>_;
},lessEqual:function($,_){
return $<=_;
},greatEqual:function($,_){
return $>=_;
},like:function($,_){
return (""+$).indexOf(_+"")>=0;
},startWith:function($,_){
return (""+$).indexOf(_+"")===0;
},endWith:function($,_){
$=$+"";
_=_+"";
return $.indexOf(_)==$.length-_.length;
}},filterData:function(_){
var $=this,A=[];
_=[].concat(_);
GT.$each(this.data,function(C,E){
var F=true;
for(var J=0,H=_.length;J<H;J++){
var D=$.fieldsMap[_[J].fieldName].index,G=_[J].value,I=_[J].logic,B=C[D];
F=$.filterCheck[I](B,G);
if(!F){
break ;
}
}
if(F){
A.push(E);
}
});
return A;
},oeo6:function($){
var _=$[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.insertedRecords[_]=$;
GT.$invoke(this,"mef2",[$]);
this.modified=true;
},updateRecord:function($,F,C){
if(GT.$type($,"number")){
$=this.data[$];
}
var B=$[GT.Const.DataSet.SN_FIELD],A=$[this.uniqueField],E=this.fieldsMap[F].type,_=this.fieldsMap[F].index,D;
if(!this.insertedRecords[B]){
this.nsu0[A]=this.nsu0[A]||{};
this.nsu0[A][_]=$[_];
this.nsu0[A][this.uniqueField]=A;
this.updatedRecords[A]=$;
}
if(this.insertedRecords[B]||GT.$invoke(this,"LSa1",[$,F,C])!==false){
if(E=="int"){
C=parseInt(C);
C=isNaN(C)?"":C;
}else {
if(E=="float"){
C=parseFloat(C);
C=isNaN(C)?"":C;
}else {
C=GT.$chk(C)?String(C):"";
}
}
this.updatedFields[A]=this.updatedFields[A]||{};
this.updatedFields[A][_]=C;
this.updatedFields[A][this.uniqueField]=A;
$[_]=C;
this.modified=true;
}
},undeleteRecord:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
this.deletedRecords[_]=null;
delete this.deletedRecords[_];
}
},Oae4:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
if(this.insertedRecords[A]){
delete this.insertedRecords[A];
}else {
if(this.updatedRecords[_]){
delete this.updatedRecords[_];
delete this.nsu0[_];
}
this.deletedRecords[_]=$;
this.modified=true;
}
}
},addUniqueKey:function($){
},isInsertedRecord:function($){
return $&&this.insertedRecords[$[GT.Const.DataSet.SN_FIELD]]==$;
},Zxn5:function($){
return $&&this.deletedRecords[$[this.uniqueField]]==$;
},isUpdatedRecord:function($){
return $&&this.updatedRecords[$[this.uniqueField]]==$;
},sortFunction:null,negative:function($){
return function(A,_){
return 0-$(A,_);
};
},sort:function(J){
var D=[].concat(J),I=[];
for(var C=0;C<D.length;C++){
var G=D[C];
if(G){
var E,B,$,H=G.sortOrder.indexOf("def")===0;
if(!G.sortOrder||H){
$=GT.Const.DataSet.SN_FIELD;
B="int";
}else {
E=this.fieldsMap[G.fieldName];
if(E){
$=E.index;
B=E.type;
}
}
I.push(!H&&G.sortFn?G.sortFn:this.getSortFuns($,G.sortOrder,B,G.getSortValue));
}
}
var F=this,_=I.length,A=function(B,A){
var C=F.data[B],E=F.data[A];
for(var G=0;G<_;G++){
var $=I[G](C,E,D[G].sortOrder);
if($!=0){
return $;
}
}
return 0;
};
this.sXa7.sort(A);
},getSortFuns:function(D,B,E,F){
var $=this,A=GT.Const.DataSet.SORT_VALUE,C={};
compSort=this.sortFunction;
if(!compSort){
var _=F&&B.indexOf("def")!=0?function(_){
var A=_[D],$=F(A,_);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
}:function(_){
var A=_[D],$=GT.U.convert(A,E);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
};
compSort=B=="desc"?function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?1:($>A?-1:0);
}:function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?-1:($>A?1:0);
};
}
return compSort;
},query:function($,_,B,A){
},getSize:function(){
return !this.data?-1:this.data.length;
},getFieldsNum:function(){
return this.fields.length;
},sum:function($){
},avg:function($){
}};
GT.DataSet=GT.$class(GT.DataSetDefault);
if(!GT.Template){
GT.Template={};
}
GT.$extend(GT.Template,{Grid:{main:function(_){
var $=_.id,A=[_.toolbarPosition=="top"||_.toolbarPosition=="t"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box gt-toolbar-box-top\" ></div>":"","<div id=\""+$+"_viewport\" class=\"gt-viewport"+(_.simpleScrollbar?" gt-simple-scrollbar":"")+"\" >","<div id=\""+$+"_headDiv\" class=\"gt-head-div\"><div class=\"gt-head-wrap\" ></div>","<div id=\""+$+"_columnMoveS\" class=\"gt-column-moveflag\"></div>","<div id=\""+$+"_headerGhost\" class=\"gt-head-ghost\"></div>","</div>","<div id=\""+$+"_bodyDiv\" class=\"gt-body-div\"></div>","<div id=\""+$+"_freeze_headDiv\" class=\"gt-freeze-div\" ></div>","<div id=\""+$+"_freeze_bodyDiv\" class=\"gt-freeze-div\" ></div>","</div>",_.toolbarPosition=="bottom"||_.toolbarPosition=="b"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box\" ></div>":"","<form id=\""+$+"_export_form\" target=\""+$+"_export_iframe\" style=\"width:0px;height:0px;margin:0px;padding:0xp\" method=\"post\" width=\"0\" height=\"0\" >","<textarea id=\""+$+"_export_form_textarea\" name=\"\" style=\"width:0px;height:0px;display:none;\" ></textarea>","</form>","<iframe id=\""+$+"_export_iframe\" name=\""+$+"_export_iframe\" scrolling=\"no\" style=\"width:0px;height:0px;\" width=\"0\" height=\"0\" border=\"0\" frameborder=\"0\" >","</iframe>","<div id=\""+$+"_separateLine\" class=\"gt-split-line\"></div>","<div id=\""+$+"_mask\" class=\"gt-grid-mask\" >","<div id=\""+$+"_waiting\" class=\"gt-grid-waiting\">","<div class=\"gt-grid-waiting-icon\"></div><div class=\"gt-grid-waiting-text\">"+_.getMsg("WAITING_MSG")+"</div>","</div>","<div class=\"gt-grid-mask-bg\">","</div>","</div>"];
return A.join("\n");
},icS3:function(B,$,_){
var A=GT.$e("td",{className:$.styleClass,columnId:$.id}),C=$.hdRenderer($.header,$,B);
$.title=$.title||$.header||"";
C=(!C||GT.U.trim(C)=="")?" ":C;
if(_){
A.style.height="0px";
}
A.innerHTML=["<div class=\"gt-inner"+($.hdAlign?" gt-inner-"+$.hdAlign:"")+"\" ",_?"style=\"padding-top:0px;padding-bottom:0px;height:1px;\" ":"","unselectable=\"on\" title=\""+$.title+"\" >","<span>",C,"</span>",_?"":GT.T_G.hdToolHTML,"</div>"].join("");
return A;
},hdToolHTML:"<div class=\"gt-hd-tool\" ><span class=\"gt-hd-icon\"></span><span class=\"gt-hd-button\"></span><span class=\"gt-hd-split\"></span></div>",bodyTableStart:function($){
return ["<table ",$?"id=\""+$+"\" ":"","class=\"gt-table\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>"].join("");
},tableStartHTML:"<table class=\"gt-table\" style=\"margin-left:0px\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>",tableEndHTML:"</tbody></table>",rowStart:function($,A,_){
return GT.T_G.rowStartS($,A)+">\n";
},rowStartS:function($,_){
return ["<tr class=\"gt-row",(_%2==0?$.evenRowCss:""),"\" ",GT.Const.DataSet.INDEX,"=\"",_,"\" "].join("");
},rowEndHTML:"</tr>\n",innerStart:function($){
return ["<div class=\"gt-inner "+($.align?" gt-inner-"+$.align+" ":"")+($.styleClass?(" "+$.styleClass):""),"\" >"].join("");
},cellStartHTML:"<td ><div class=\"gt-inner\" >",cellEndHTML:"</div></td>",cell:function($,_,A){
return ["<td "+$.cellAttributes,_||""," class=\""+$.styleClass+"\" >",$.innerStartHTML,A,"</div></td>",].join("");
},gid6:function($,_){
return (GT.Const.Grid.COL_T_CLASSNAME+$.id+"-"+_).toLowerCase();
},freezeBodyCell:function(D,C,_,A){
var F=C+D.xlg1,$=C+D.Lxn2,E="style=\"width:"+$+"px;\"";
_=_||" ";
var B=GT.$e("td",{style:{width:F+"px"},innerHTML:"<div class=\""+(A?"gt-hd-inner":"gt-inner")+"\" "+E+">"+_+"</div>"});
return B;
},fss6:function(A,_,$){
return this.freezeBodyCell(A,_,$,true);
}},Dialog:{create:function(C){
var $=C.domId,A=C.gridId,B=GT.$chk(C.imm1)?C.imm1:true,_=C.title||"Dialog";
return ["<div class=\"gt-dialog-head\" >","<div class=\"gt-dialog-head-icon\"> </div>","<div id=\""+$+"_dialog_title\" class=\"gt-dialog-head-text\" >"+_+"</div>","<div class=\"gt-dialog-head-button\" >",B?"<a href=\"#\" onclick=\"GT.$grid('"+A+"').closeDialog();return false;\"> </a>":"","</div>","</div><div id=\""+$+"_dialog_body\" class=\"gt-dialog-body\"></div>"].join("");
},XOo3:["<select class=\"gt-input-select\">","<option value=\"equal\">=</option>","<option value=\"notEqual\">!=</option>","<option value=\"less\"><</option>","<option value=\"great\">></option>","<option value=\"lessEqual\"><=</option>","<option value=\"greatEqual\" >>=</option>","<option value=\"like\" >like</option>","<option value=\"startWith\">startWith</option>","<option value=\"endWith\">endWith</option>","</select>"].join("")}});
GT.T_G=GT.Template.Grid;
GT.T_C=GT.Template.Column;
GT.T_D=GT.Template.Dialog;
if(!window.GT){
window.GT={};
}
GT_GRID_VER="GT-Grid 1.0";
GT.WidgetCache={};
GT.GridCache={};
GT.GridNum=0;
GT.activeGrid=null;
GT.$widget=function($){
return GT.$type($,"string")?GT.WidgetCache[$]:$;
};
GT.$grid=function($){
$=$||GT.Const.Grid.DEFAULT_ECG_ID;
return GT.$type($,"string")?GT.GridCache[$]:$;
};
GT.GridDefault={defaultId:GT.Const.Grid.DEFAULT_ECG_ID,defaultWidth:"100%",defaultHeight:"100%",defaultColumnWidth:70,language:"default",skin:"default",defaultConst:["action","recordType","exportType","exportFileName","exception","parameters","queryParameters","data","pageInfo","filterInfo","sortInfo","columnInfo","fieldsName","insertedRecords","updatedRecords","updatedFields","deletedRecords","success","succeedData","failedData"],dataRoot:null,dataPageInfo:null,dataException:null,formid:null,isNative:false,loadURL:null,saveURL:null,exportURL:null,exportType:null,exportFileName:null,sortInfo:null,editable:true,resizable:false,showGridMenu:false,showIndexColumn:false,allowCustomSkin:false,allowFreeze:false,allowHide:false,allowGroup:false,allowResizeColumn:true,simpleScrollbar:true,scrollbarClass:null,monitorResize:false,stripeRows:true,lightOverRow:true,evenRowCss:"gt-row-even",syncCheckColumn:false,clickStartEdit:true,remotePaging:true,remoteSort:false,remoteFilter:false,remoteGroup:false,autoUpdateSortState:true,autoUpdateEditState:true,autoUpdateGroupState:true,autoUpdateFreezeState:true,autoSelectFirstRow:true,autoEditNext:false,submitUpdatedFields:false,autoSaveOnNav:false,reloadAfterSave:true,recountAfterSave:true,recount:false,showEditTool:true,showAddTool:true,showDelTool:true,showSaveTool:true,showReloadTool:true,showPrintTool:true,showFilterTool:true,showChartTool:true,showPageState:true,transparentMask:false,justShowFiltered:true,toolbarPosition:"bottom",toolbarContent:"nav | goto | pagesize | reload | add del save | print | filter chart | state",width:null,height:null,minWidth:50,minHeight:50,singleSelect:false,dataRoot:"data",multiSort:false,multiGroup:false,GTGridPath:"../../gt-grid",XtX0:function(){
return {skinList:[{text:this.getMsg("STYLE_NAME_DEFAULT"),value:"default"},{text:this.getMsg("STYLE_NAME_CHINA"),value:"china"},{text:this.getMsg("STYLE_NAME_VISTA"),value:"vista"},{text:this.getMsg("STYLE_NAME_MAC"),value:"mac"}],encoding:null,mimeType:null,jsonParamName:null,title:null,lastAction:null,ajax:null,autoExpandColumn:null,autoColumnWidth:false,cellWidthPadding:GT.isBoxModel?0:4,cellHeightPadding:GT.isBoxModel?0:2,xlg1:GT.isBoxModel?0:0,Lxn2:GT.isBoxModel?0:-4,freezeFixH:GT.isBoxModel?0:0,freezeFixW:GT.isIE?-1:-2,toolbarHeight:24,xBh4:0,snn6:0,freezeColumns:0,mnr4:0,defaultRecord:null,isWaiting:false,znn2:false,requesting:false,hasGridDivTemp:false,igs6:-1,moveColumnDelay:800,mouseDown:false,gridDiv:null,gridForm:null,viewport:null,headDiv:null,headTable:null,headFirstRow:null,bodyDiv:null,bodyFirstRow:null,footDiv:null,footTable:null,footFirstRow:null,headerGhost:null,columnMoveS:null,freezeHeadDiv:null,freezeHeadTable:null,freezeBodyDiv:null,freezeBodyTable:null,titleBar:null,waitingBar:null,nearPageBar:null,toolBar:null,separateLine:null,gridGhost:null,resizeButton:null,activeCell:null,activeRow:null,activeRecord:null,activeEditor:null,activeDialog:null,lastOverHdCell:null,scrollLeft:0,scrollTop:0,ads6:0,onComplete:GT.$empty,onResize:GT.$empty,beforeSelectRow:GT.$empty,afterSelectRow:GT.$empty,onClickHead:GT.$empty,onClickCell:GT.$empty,onDblClickCell:GT.$empty,beforeEdit:GT.$empty,afterEdit:GT.$empty,beforeSave:GT.$empty,beforeLoad:GT.$empty,Ilb6:GT.$empty,Obi2:GT.$empty,LSa1:GT.$empty,beforeInsert:GT.$empty,afterInsert:GT.$empty,beforeUpdate:GT.$empty,afterUpdate:GT.$empty,beforeDelete:GT.$empty,afterDelete:GT.$empty,renderRow:GT.$empty,editing:false,isFirstLoad:true,printCssText:null,gridTable:null,gridTbodyList:[],gridRowList:[],gridFreezeRowList:[],checkedRows:{},rowBegin:0,rowNum:0,rowEnd:0,currentRowNum:0,defaultPageInfo:{pageSize:0,pageNum:0,totalRowNum:0,totalPageNum:0,startRowNum:0,endRowNum:0},countTotal:true,pageSize:0,defaultPageSize:20,filterDataProxy:null,Xxy6:null,cacheData:[],dataset:null,selectedRows:[],overRow:null,cacheBodyList:[],frozenColumnList:[],sortedColumnList:[],pageSizeList:[],columns:[],columnList:[],columnMap:{},CONST:null,container:null,ghost:null,queryParameters:{},parameters:{}};
},sSn3:function(){
GT.activeGrid=this;
},clearCheckedRows:function($){
this.checkedRows={};
if($){
this.refresh();
}
},rmm5:function(_,G){
GT.GridNum++;
var E={};
GT.$each(this.defaultConst,function($,_){
E[$]=$;
});
this.id=""+_;
G=G||{};
if(GT.$type(_,"object")){
G=_;
this.id="gtgrid_"+GT.GridNum;
}
GT.$extend(E,G.CONST);
GT.$extend(this,G);
this.CONST=E;
var B=GT.$clone(this.defaultPageInfo);
this.pageInfo=GT.$extend(B,this.pageInfo);
this.pageInfo.pageSize=this.pageInfo.pageSize||this.pageSize;
this.pageSize=this.pageInfo.pageSize;
this.id=this.id||this.defaultId;
this.gridId=this.id;
this.rowKey="__gt_"+this.id+"_r_";
GT.GridCache[this.id]=this;
if(!this.dataset&&this.columns){
var D={fields:[]};
for(var C=0;C<this.columns.length;C++){
var A=this.columns[C],$={name:A.name||A.fieldName||A.id,type:A.type,index:(A.fieldIndex||A.fieldIndex===0)?A.fieldIndex:null};
D.fields.push($);
}
this.dataset=D;
}
if(this.dataset&&!(this.dataset instanceof GT.DataSet)){
this.dataset.recordType=this.dataset.recordType||this.recordType;
this.dataset=new GT.DataSet(this.dataset);
}
this.loadURL=this.loadURL||this.dataset.loadURL;
this.saveURL=this.saveURL||this.dataset.saveURL;
this.evenRowCss=" "+this.evenRowCss;
this.toolbarContent=this.toolbarContent===false?false:this.toolbarContent;
if(this.tools){
for(var F in this.tools){
GT.ToolFactroy.register(F,this.tools[F]);
}
}
this.sSn3();
},Zar3:function(C){
this.columns=C||this.columns;
if(!this.columns){
return ;
}
this.gridEditorCache=this.gridEditorCache||GT.$e("div",{className:"gt-editor-cache"});
var F=this.columns.length,D=0,B=true,A={};
for(var E=0;E<F;E++){
this.columns[E].grid=this;
this.columns[E].gridId=this.id;
if(this.columns[E].isCheckColumn){
this.columns[E]=GT.Grid.Xri9(this,this.columns[E]);
}
var _=new GT.Column(this.columns[E]);
this.columnMap[_.id]=_;
this.columnList.push(_);
_.colIndex=E;
if(_.frozen){
this.frozenColumnList.push(_.id);
}
var $=this.dataset.fieldsMap[_.fieldName];
if($){
_.fieldIndex=$.index;
}
_.editor=GT.Editor?GT.Editor.rIF9(_.editor,this):null;
if(_.editor&&_.editor.Ots6()){
this.gridEditorCache.appendChild(_.editor.Ots6());
}
if(_.renderer=="by editor"&&_.editor){
_.renderer=function(A,_,$,B,D,C){
return this.editor.getDisplayValue(A);
};
}
A[_.fieldIndex]=_.newValue||"";
_.styleClass=GT.T_G.gid6(this,_.id);
_.innerStyleClass="."+_.styleClass+" .gt-inner";
_.minWidth=_.minWidth+this.xlg1;
_.innerStartHTML=GT.T_G.innerStart(_);
if(_.sortOrder){
this.addSortInfo(this.gnn7(_));
}
if(_.separator){
_.separator.gridId=_.gridId;
}
if(_.hidden){
}
}
this.defaultRecord=this.defaultRecord||A;
return this;
},getMsg:function($){
var _=GT.Msg.Grid[this.language][$];
return _;
},ztn9:function(){
if(this.autoSelectFirstRow){
this.selectFirstRow();
}
this.toggleEmptyRow();
GT.$invoke(this,"onComplete",[this]);
this.hideWaiting();
this.ads6++;
},render:function($){
this.container=$||this.container;
this.Zar3();
this.eox4();
this.XtR3();
this.atr1();
this.gXi8();
this.l2m9();
this.zfm3();
},ned5:function(){
var $=this;
this.headDivHeight=this.headDiv.clientHeight;
if(this.customHead){
this.headDiv.style.height=this.headDivHeight-2+"px";
GT.$thread(function(){
$.headDiv.scrollTop=2;
});
this.headDivHeight-=2;
}
this.freezeHeadDiv.style.height=this.headDivHeight+"px";
this.freezeHeadDiv.style.top=0+this.freezeFixH+"px";
this.freezeBodyDiv.style.top=this.headDivHeight+this.freezeFixH+0+"px";
},eox4:function(){
var $="display:none;";
GT.Const.Grid.SCROLLBAR_WIDTH=20;
var A=this;
A.evenRowCss=A.stripeRows?A.evenRowCss:"";
var _=[];
GT.$each(this.columnList,function(B,D){
B.width=B.width||A.defaultColumnWidth;
var C=""+B.width;
if(C.indexOf("px")<1&&C.indexOf("%")<1){
C=parseInt(C);
}else {
if(C.indexOf("%")>0){
}
}
_[D]=["."+B.styleClass+" { width:"+(C+A.xlg1)+"px;"+(B.hidden?$:"")+" } ",B.innerStyleClass+" { width:"+(C+A.Lxn2)+"px; } "].join("\n");
});
GT.U.CSS.nce6(_.join("\n"));
},XtR3:function(){
var A=this;
this.navigator=new GT.Navigator({gridId:this.id,pageInfo:this.pageInfo});
this.pageStateBar=GT.$(this.pageStateBar);
if(this.isNative){
this.gridDiv=GT.$(this.id+"_div");
}else {
var B=[(GT.isBoxModel?"gt-b-ie ":(GT.isSafari?"gt-b-safari ":(GT.isOpera?"gt-b-opera ":(GT.isStrict?"gt-b-strict":"")))),"gt-grid","gt-skin-"+this.skin];
this.gridDiv=GT.$e("div",{id:this.id+"_div",className:B.join(" ")});
this.container=GT.$(this.container);
if(!this.container||!this.container.appendChild||!this.container.tagName||GT.U.getTagName(this.container)=="BODY"){
GT.doc.body.appendChild(this.gridDiv);
}else {
if(this.replaceContainer===true){
this.container.parentNode.insertBefore(this.gridDiv,this.container);
GT.U.removeNode(this.container);
this.container=null;
}else {
this.container.appendChild(this.gridDiv);
}
}
this.gridDiv.innerHTML=GT.T_G.main(this);
}
this.gridDiv.hideFocus=true;
this.gridMask=GT.$(this.id+"_mask");
this.gridWaiting=GT.$(this.id+"_waiting");
this.gridDialog=GT.$(this.id+"_dialog");
this.gridDialogTitle=GT.$(this.id+"_dialog_title");
this.gridDialogBody=GT.$(this.id+"_dialog_body");
this.gridDiv.appendChild(this.gridEditorCache);
this.gridFilterRSCache=this.gridFilterRSCache||GT.$e("table",{className:"gt-filter-rs-cache"});
this.gridDiv.appendChild(this.gridFilterRSCache);
this.showMask();
this.viewport=GT.$(this.id+"_viewport");
this.ghn8=GT.$(this.id+"_toolBarBox");
this.headDiv=GT.$(this.id+"_headDiv");
this.bodyDiv=GT.$(this.id+"_bodyDiv");
this.freezeView=GT.$(this.id+"_freezeView");
this.freezeHeadDiv=GT.$(this.id+"_freeze_headDiv");
this.freezeBodyDiv=GT.$(this.id+"_freeze_bodyDiv");
this.Osa4();
this.separateLine=GT.$(this.id+"_separateLine");
this.xBh4=this.toolbarPosition=="top"||this.toolbarPosition=="t"?this.toolbarHeight+(GT.isBoxModel?0:1):0;
if(this.separateLine){
this.separateLine.style.top=this.xBh4+"px";
}
this.columnMoveS=GT.$(this.id+"_columnMoveS");
this.headerGhost=GT.$(this.id+"_headerGhost");
this.gridIFrame=GT.$(this.id+"_export_iframe");
this.gridForm=GT.$(this.id+"_export_form");
this.gridFormTextarea=GT.$(this.id+"_export_form_textarea");
if(this.ghn8){
this.toolBar=GT.$e("div",{id:this.id+"_toolBar",className:"gt-toolbar"});
this.ghn8.appendChild(this.toolBar);
}
var _=""+(this.width||this.defaultWidth),$=""+(this.height||this.defaultHeight);
this.setSize(_,$,true);
this.showWaiting();
this.XXp9();
},XXp9:function(){
this.left=GT.U.getPosLeftTop(this.gridDiv);
this.top=this.left[1];
this.left=this.left[0];
this.mri8=GT.U.getXY(this.viewport);
},setSize:function(A,$,D){
var C=this,B=[this.gridDiv.offsetWidth,this.gridDiv.offsetHeight];
A=""+A;
$=""+$;
this.width=A;
this.height=$;
if(A.toLowerCase()=="auto"){
this.width=B[0]+"px";
}else {
if(A.indexOf("%")<1&&A.indexOf("px")<1){
this.width=GT.U.parseInt(A)+"px";
}
}
if($.toLowerCase()=="auto"){
this.height=B[1]+"px";
}else {
if($.indexOf("%")<1&&$.indexOf("px")<1){
this.height=GT.U.parseInt($)+"px";
}
}
var _=false;
if(($.indexOf("%")>1||A.indexOf("%")>1)&&this.monitorResize){
_=true;
}
if(_){
if(GT.isIE){
this.gridDiv.style.overflowY="hidden";
}else {
if(GT.isOpera){
this.gridDiv.style.overflow="hidden";
}
}
}
C.ant3(D);
},ant3:function(A){
this.gridMask.style.width=this.width;
this.gridMask.style.height=this.height;
this.gridDiv.style.width=this.width;
this.gridDiv.style.height=this.height;
var B=(""+this.height).indexOf("%")>0?this.gridDiv.clientHeight:parseInt(this.height),_=0-(GT.isBoxModel?2:3);
this.bodyDiv.style.height=B-(this.headDivHeight+this.toolbarHeight)+_+"px";
if(GT.isOpera){
var $=this.gridDiv.clientWidth+_+"px";
this.viewport.style.width=$;
if(this.ghn8){
this.ghn8.style.width=$;
}
}
if(this.freezeBodyDiv){
this.freezeBodyDiv.style.height=this.bodyDiv.clientHeight+"px";
}
if(A!==true){
this.onResize();
}
},atr1:function(){
this.gridGhost=GT.$e("div",{id:this.id+"_gridGhost",className:"gt-grid-ghost-rect"});
this.gridGhost.style.top=this.top+"px";
this.gridGhost.style.left=this.left+"px";
this.gridGhost.style.width=this.gridMask.style.width;
this.gridGhost.style.height=this.gridMask.style.height;
GT.doc.body.appendChild(this.gridGhost);
},Osa4:function(){
var B=this,E;
if(this.customHead){
if(GT.$type(this.customHead,"string")){
if(this.customHead.indexOf("<table")===0){
GT.U.igi0.innerHTML=this.customHead;
this.customHead=GT.U.igi0.firstChild;
}else {
this.customHead=GT.$(this.customHead);
}
}
this.customHead.style.display="";
this.headTable=GT.$e(this.customHead,{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=this.headTable.tBodies[0];
for(var H=0;H<this.headTbody.rows.length;H++){
var G=this.headTbody.rows[H];
G.className="gt-hd-row";
for(var D=0;D<G.cells.length;D++){
var A=G.cells[D],F=A.innerHTML,C=A.getAttribute("columnId");
if(C){
A.columnId=C;
var $=this.columnMap[C];
if(String(A.getAttribute("resizable")).toLowerCase()=="false"){
$.resizable=false;
}
if(String(A.getAttribute("sortable")).toLowerCase()=="false"){
$.sortable=false;
}
if(A.colSpan<2){
A.className=$.styleClass;
}
$.headCell=A;
}
A.innerHTML=["<div class=\"gt-inner",A.rowSpan<2?"":" gt-inner-tall2","\" unselectable=\"on\" >","<span>",F,"</span>",C?GT.T_G.hdToolHTML:"","</div>"].join("");
}
}
E=GT.$e("tr",{className:"gt-hd-row"+(this.customHead?" gt-hd-hidden":"")});
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$,true);
E.appendChild(A);
GT.Grid.SXd9(B,$);
});
this.headTbody.insertBefore(E,this.headTbody.rows[0]);
}else {
this.headTable=GT.$e("table",{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=GT.$e("tbody");
this.headTable.appendChild(this.headTbody);
E=GT.$e("tr",{className:"gt-hd-row"});
this.headTbody.appendChild(E);
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$);
E.appendChild(A);
$.headCell=A;
GT.Grid.SXd9(B,$);
},this);
}
this.headTable.style.marginRight=100+"px";
var _=this.headDiv.firstChild?String(GT.U.getTagName(this.headDiv.firstChild)):null;
if(_=="DIV"||_=="SPAN"){
this.headDiv.firstChild.appendChild(this.headTable);
}else {
this.headDiv.appendChild(this.headTable);
}
this.headFirstRow=this.headTbody.rows[0];
this.freezeHeadTable=GT.$e("table",{id:this.headTable.id+"_freeze",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.freezeHeadTable.style.height="100%";
this.freezeHeadDiv.appendChild(this.freezeHeadTable);
this.ned5();
},zfm3:function(){
var $=GT.$(this.id+"_bodyTable");
if($){
this.gridTable=$;
this.gridTbodyList.push($.tBodies[0]);
this.bodyFirstRow=this.xrt4();
}else {
this.reload();
}
},getColumn:function($){
if(GT.$type($)=="number"&&$>=0){
return this.columnList[$];
}else {
if(GT.U.getTagName($)=="TD"){
return this.columnList[GT.U.getCellIndex($)];
}else {
return this.columnMap[$];
}
}
},iiL6:function(C,_){
C=GT.$type(C,"number")?this.ois0(C):C;
_=_||this.getRecordByRow(C);
var B=C.getAttribute(GT.Const.DataSet.INDEX)/1;
this.dataset.initValues(_,B,this.dataset);
for(var E=0;E<C.cells.length;E++){
var $=this.getColumn(E);
if($!=this.activeColumn&&$.syncRefresh===false){
continue ;
}
var A=C.cells[E],D=false;
A.firstChild.innerHTML=$.renderer(_[$.fieldIndex],_,$,this,E,B);
}
},scrollGrid:function(I,H){
var C=this.snn6,_=this.freezeBodyDiv.clientWidth,$=this.activeCell.offsetLeft+((GT.isFF2||GT.isFF1)?0:C),B=$+this.activeCell.offsetWidth,F=this.activeCell.offsetTop,D=F+this.activeCell.offsetHeight,A=this.bodyDiv.scrollLeft,E=this.bodyDiv.scrollTop,J=A+this.bodyDiv.clientWidth+C,G=E+this.bodyDiv.clientHeight;
if(GT.$chk(I)){
this.bodyDiv.scrollLeft=I;
}else {
if($<=A+_){
this.bodyDiv.scrollLeft=$-_-(_>0?1:0);
}else {
if(B>=J){
this.bod
if(!window.GT){
window.GT={};
}
GT.Const=GT.Const||{};
GTConst=GT.Const;
GT.Const.Grid={DEFAULT_ECG_ID:"gt",SHADOW_ROW:"_shadowRow",HIDE_HEADER_ROW:"_hideListRow",COL_T_CLASSNAME:"gt-col-",SKIN_CLASSNAME_PREFIX:"gt-skin-",SCROLLBAR_WIDTH:18,MIN_COLWIDTH:40,AJAX_HEADER:["isAjaxRequest","true"]};
GT.Const.Key={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,PAUSE:19,CAPSLOCK:20,ESC:27,SPACE:33,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,WIN:91,WIN_R:92,MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLLLOCK:145};
if(!window.GT){
window.GT={};
}
GT.loaded=false;
GT.init=function(_){
_=_||window;
GT.doc=document;
_.undefined=_.undefined;
var $=_.navigator.userAgent.toLowerCase();
GT.isIE=$.indexOf("msie")>-1;
GT.isIE7=$.indexOf("msie 7")>-1;
GT.isIE8=$.indexOf("msie 8")>-1;
GT.isIE9=$.indexOf("msie 9")>-1;
GT.isFF=$.indexOf("firefox")>-1;
GT.isFF1=$.indexOf("firefox/1")>-1;
GT.isFF2=$.indexOf("firefox/2")>-1;
GT.isFF3=$.indexOf("firefox/3")>-1;
GT.isOpera=$.indexOf("opera")>-1;
GT.isWebkit=(/webkit|khtml/).test($);
GT.isSafari=$.indexOf("safari")>-1||GT.isWebkit;
GT.isGecko=GT.isMoz=!GT.isSafari&&$.indexOf("gecko")>-1;
GT.isStrict=GT.doc.compatMode=="CSS1Compat"||GT.isSafari;
GT.isBoxModel=GT.isIE&&!GT.isIE8&&!GT.isIE9&&!GT.isStrict;
GT.isNotStrictIE=GT.isBoxModel;
GT.isSecure=_.location.href.toLowerCase().indexOf("https")===0;
GT.isWindows=($.indexOf("windows")!=-1||$.indexOf("win32")!=-1);
GT.isMac=($.indexOf("macintosh")!=-1||$.indexOf("mac os x")!=-1);
GT.isLinux=($.indexOf("linux")!=-1);
};
GT.init();
GT.$extend=function(_,A,C){
if(arguments.length<2){
A=_;
_=this;
}
for(var B in A){
var $=A[B];
if(C&&$&>.$type($,"object","array")){
$=GT.$clone($,C);
}
_[B]=$;
}
return _;
};
GT.$empty=function(){
};
GT.$extend(GT,{$chk:function($){
return !!($||$===0||$==="");
},$type:function($){
var A=arguments.length;
if(A>1){
for(var B=1;B<A;B++){
if(GT.$type($)==arguments[B]){
return true;
}
}
return false;
}
var _=typeof $;
if($===null){
return "object";
}
if(_=="undefined"){
return "undefined";
}
if($.htmlElement){
return "element";
}
if(_=="object"&&$.nodeType&&$.nodeName){
switch($.nodeType){
case 1:
return "element";
case 3:
return (/\S/).test($.nodeValue)?"textnode":"whitespace";
}
}
if(_=="object"||_=="function"){
switch($.constructor){
case Array:
return "array";
case RegExp:
return "regexp";
case GT.Class:
return "class";
}
}
if(_=="object"&&typeof $.length=="number"){
return ($.callee)?"arguments":"collection";
}else {
if(_=="function"&&typeof $.length=="number"&&$[0]!==undefined){
return "collection";
}
}
return _;
},$merge:function(){
var B={};
for(var C=0;C<arguments.length;C++){
for(var A in arguments[C]){
var _=arguments[C][A],$=B[A];
if($&>.$type(_,"object")&>.$type($,"object")){
B[A]=GT.$merge($,_);
}else {
B[A]=_;
}
}
}
return B;
},$indexOf:function(_,A,$){
if(_){
$=$||0;
for(var C=$,B=_.length;C<B;C++){
if(_[C]===A){
return C;
}
}
}
return -1;
},$array:function(B,_,D,A){
var $=[];
if(B){
if(!GT.$chk(_)){
_=0;
}
if(!GT.$chk(D)){
D=B.length;
}
if(GT.$type(B,"arguments","collection")||GT.$type(B,"array")&&(_>0||D<B.length)){
for(var E=_;E<D;E++){
$.push(B[E]);
}
}else {
if(GT.$type(B,"array")){
$=$.concat(B);
}else {
for(var C in B){
if(B.hasOwnProperty(C)){
$.push(B[C]);
}
}
}
}
}
return $;
},$clone:function(_,A){
var $;
if(!_){
$=_;
}else {
if(GT.$type(_,"array","arguments","collection")){
$=GT.$array(_,0,_.length,A);
}else {
$=GT.$extend({},_,A);
}
}
return $;
},$msg:function($,_){
for(var A=1;A<arguments.length;A++){
$=GT.U.replaceAll($,"#{"+A+"}",arguments[A]);
}
return $;
},$clear:function($){
window.clearTimeout($);
window.clearInterval($);
if(CollectGarbage){
CollectGarbage();
}
return null;
},$thread:function(_,A){
var $=_;
window.setTimeout($,A||20);
},$each:function(C,E,D,$){
var A=[];
if(GT.$type(C,"array","arguments","collection")||C&&!GT.$type(C,"string")&>.$type(C.length,"number")){
for(var F=0,B=C.length;F<B;F++){
A.push(E.call(D||C,C[F],F,C,$));
}
}else {
for(var _ in C){
A.push(E.call(D||C,C[_],_,C,$));
}
}
return A;
},$getText:function($){
return $.innerText===undefined?$.textContent:$.innerText;
},$element:function($,B){
if(GT.$type($,"string")){
if(GT.isIE&&B&&(B.name||B.type)){
var _=(B.name)?" name=\""+B.name+"\"":"",A=(B.type)?" type=\""+B.type+"\"":"";
delete B.name;
delete B.type;
$="<"+$+_+A+">";
}
$=GT.doc.createElement($);
}
if(B){
if(B.style){
GT.$extend($.style,B.style);
delete B.style;
}
GT.$extend($,B);
}
return $;
}});
GT.Class=function(_){
_=_||{};
var $=function(){
var _=this.XtX0;
if(GT.$type(_,"function")){
_=_.apply(this,arguments);
}
if(GT.$type(_,"object")){
GT.$extend(this,_);
}
var $=this.abstractMethods;
GT.$each(this.abstractMethods,function($){
this[$]=GT.$empty;
},this);
return (arguments[0]!==GT.$empty&>.$type(this.rmm5,"function"))?this.rmm5.apply(this,arguments):this;
};
GT.$extend($,this);
$.constructor=GT.Class;
$.prototype=_;
return $;
};
GT.Class.prototype={extend:function(){
var C=new this(GT.$empty);
for(var D=0,_=arguments.length;D<_;D++){
var A=arguments[D];
for(var $ in A){
var B=C[$];
C[$]=GT.Class.merge(B,A[$]);
}
}
return new GT.Class(C);
}};
GT.Class.merge=function($,_){
if($&&$!=_){
var A=GT.$type(_);
if(!GT.$type($,A)){
return _;
}
switch(A){
case "function":
var B=function(){
this.nds1=arguments.callee.nds1;
return _.apply(this,arguments);
};
B.nds1=$;
return B;
case "object":
return GT.$merge($,_);
}
}
return _;
};
GT.$class=function($){
return new GT.Class($);
};
GT.$e=GT.$element;
GT.$A=GT.$array;
GT.$byId=function($,A){
if(!GT.$chk($)){
return null;
}
var _=GT.$type($);
if(_=="element"){
return GT.$e($,A);
}
if(_=="string"||_=="number"){
$=GT.doc.getElementById(""+$);
}
if(!$){
return null;
}
if(GT.U.contains(["object","embed"],$.tagName.toLowerCase())){
return $;
}
return GT.$e($);
};
GT.$byName=function(_){
var A=[];
if(!GT.$chk(_)){
return A;
}
var $=GT.doc.getElementsByName(""+_);
if(!$||$.length<1){
return A;
}
for(var B=0;B<$.length;B++){
_=$[B];
A.push(GT.U.contains(["object","embed"],_.tagName.toLowerCase())?_:GT.$e(_));
}
return A;
};
GT.$=function($){
var _=GT.$byName($);
if(_&&_.length===1){
return _[0];
}
return (!_||_.length<1)?GT.$byId($):_;
};
GT.Utils={parseInt:function($,A){
var _=parseInt($);
return isNaN(parseInt($))?A||0:_;
},moveItem:function(_,$,B){
$=$<0?0:($>_.length-1?_.length-1:$);
B=B<0?0:(B>_.length-1?_.length-1:B);
if($==B){
return _;
}
var A=_[$],C=_[B];
_.splice(B,1,A,C);
if($<B){
_.splice($,1);
}else {
_.splice($+1,1);
}
return _;
},convert:function(_,$){
switch($){
case "int":
return parseInt(_);
case "float":
return parseFloat(_);
case "date":
return _;
default:
return _;
}
return _;
},getTagName:function($){
return $&&$.tagName?String($.tagName).toUpperCase():null;
},Sea9:function(A,$,_,B){
if(!$){
_=GT.$event(_);
$=GT.U.getEventTarget(_);
}
B=B||6;
if(!$){
return null;
}
A=A.toLowerCase();
while($&&(B--)>0){
if($.tagName&&$.tagName.toLowerCase()==A){
return $;
}
$=$.parentNode;
}
return null;
},focus:function(_){
if(_){
try{
_.focus();
_.select&&_.select();
}
catch($){
}
}
},hasClass:function($,_){
return $?GT.U.hasSubString($.className,_," "):false;
},addClass:function($,_){
if($&&!GT.U.hasClass($,_)){
$.className=GT.U.xZs1($.className+" "+_);
}
return $;
},removeClass:function($,_){
if($){
$.className=GT.U.xZs1($.className.replace(new RegExp("(^|\\s)"+_+"(?:\\s|$)"),"$1"));
}
return $;
},toggleClass:function($,_){
return GT.U.hasClass($,_)?GT.U.removeClass($,_):GT.U.addClass($,_);
},hasSubString:function(_,A,$){
return ($)?($+_+$).indexOf($+A+$)>-1:_.indexOf(A)>-1;
},childElement:function(_,$){
var B=0,A=_?_.firstChild:null;
while(A){
if(A.nodeType==1){
if(++B==$){
return A;
}
}
A=A.nextSibling;
}
return null;
},firstChildElement:function($){
return GT.U.childElement($,1);
},XeO1:function($){
var _=$.childNodes[$.childNodes.length-1];
return _.nodeType==1?_:GT.U.prevElement(_);
},nextElement:function($){
while(($=$.nextSibling)&&$.nodeType!=1){
}
return $;
},prevElement:function($){
while(($=$.previousSibling)&&$.nodeType!=1){
}
return $;
},getCellIndex:function(_){
if(GT.isIE){
var $=_.parentNode.cells;
for(var B=0,A=$.length;B<A;B++){
if($[B]===_){
return B;
}
}
}
return _.cellIndex;
},insertNodeBefore:function($,_){
if(!$||!_||!_.parentNode){
return null;
}
_.parentNode.insertBefore($,_);
return $;
},insertNodeAfter:function($,_){
_.parentNode.insertBefore($,_.nextSibling);
return $;
},listToMap:function(_){
var $={};
for(var A=0;A<_.length;A++){
$[_[A]]=_[A];
}
return $;
},createSelect:function(A,B,C,_){
_=_||GT.$e("select",C||{});
var $=GT.doc.createDocumentFragment();
GT.$each(A,function(_,C){
var A=GT.$e("option",{"value":C,"text":""+_,innerHTML:_});
if(GT.$chk(B)&&C==B){
A.selected=true;
}
$.appendChild(A);
});
_.appendChild($);
return _;
},createSelectHTML:function(B,D,G){
G=G||{};
var $=G.id?(" id=\""+G.id+"\" "):" ",_=G.className||"",C=G.style?(" style=\""+G.style+"\" "):" ",F=["<select"+$+C+"class=\"gt-input-select "+_+"\">"];
for(var E in B){
var A="";
if((D||D===0)&&E==D){
A=" selected=\"selected\" ";
}
F.push("<option value=\""+E+"\" "+A+">"+B[E]+"</option>");
}
F.push("</select>");
return F.join("");
},getEventTarget:function(A){
var _=null;
try{
_=A.target||A.srcElement;
}
catch($){
return null;
}
return !_?null:(_.nodeType==3?_.parentNode:_);
},stopEvent:function($){
$=$||window.event;
if($){
if($.stopPropagation){
$.stopPropagation();
$.preventDefault();
}else {
$.cancelBubble=true;
$.returnValue=false;
}
}
},addEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.addEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.attachEvent($,D);
}
GT.EventCache.add(_,B,D,false);
return _;
},removeEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.removeEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.detachEvent($,D);
}
GT.EventCache.remove(_,B,D,false);
return _;
},ric3:[],Zdl9:function(){
for(var A=0;A<GT.U.ric3.length;A++){
var _=GT.U.ric3[A];
try{
_.apply(this,arguments);
}
catch($){
}
}
GT.loaded=true;
},onLoad:function(_,$){
$=$||window;
GT.U.ric3.push(_);
if(!GT.U.Zdl9.hasAdd){
GT.U.addEvent($,"load",GT.U.Zdl9);
GT.U.Zdl9.hasAdd=true;
}
},igi0:function(){
return GT.doc.createElement("div");
}(),ica7:function(A,$){
GT.U.igi0.innerHTML="<table><tbody>"+A+"</tbody></table>";
var _=GT.U.igi0.getElementsByTagName("tr")[0];
$.appendChild(_);
GT.U.igi0.innerHTML="";
return _;
},removeNode:function(_){
for(var A=0;A<arguments.length;A++){
var $=arguments[A];
if(!$||!$.parentNode||$.tagName=="BODY"){
return null;
}
GT.EventCache.remove($);
if(GT.isIE){
GT.U.igi0.appendChild($);
GT.U.igi0.innerHTML="";
}else {
$.parentNode.removeChild($);
}
}
},getLastChild:function($){
return $.childNodes[$.childNodes.length-1];
},getPosLeftTop:function($,_){
_=_||window;
var B=$.offsetTop,A=$.offsetLeft;
$=$.offsetParent;
while($&&$!=_){
B+=($.offsetTop-$.scrollTop);
A+=($.offsetLeft-$.scrollLeft);
$=$.offsetParent;
}
return [A,B];
},getPosRight:function($){
return GT.U.getPosLeftTop($)[0]+$.offsetWidth;
},getPosBottom:function($){
return GT.U.getPosLeftTop($)[1]+$.offsetHeight;
},getHeight:function(A,$){
var C=A.offsetHeight||0;
if($!==true){
return C;
}
var B=GT.U.getBorderWidths(A),_=GT.U.getPaddings(A);
return C-B[0]-B[2]-_[0]-_[2];
},getWidth:function(B,_){
var $=B.offsetWidth||0;
if(_!==true){
return $;
}
var C=GT.U.getBorderWidths(B),A=GT.U.getPaddings(B);
return $-C[1]-C[3]-A[1]-A[3];
},getBorderWidths:function($){
return [GT.U.parseInt($.style.borderTopWidth),GT.U.parseInt($.style.borderRightWidth),GT.U.parseInt($.style.borderBottomWidth),GT.U.parseInt($.style.borderLeftWidth)];
},getPaddings:function($){
return [GT.U.parseInt($.style.paddingTop),GT.U.parseInt($.style.paddingRight),GT.U.parseInt($.style.paddingBottom),GT.U.parseInt($.style.paddingLeft)];
},getPageX:function($){
$=$||window.event;
var _=$.pageX;
if(!_&&0!==_){
_=$.clientX||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[0];
}
}
return _;
},getPageY:function($){
$=$||window.event;
var _=$.pageY;
if(!_&&0!==_){
_=$.clientY||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[1];
}
}
return _;
},getPageScroll:function(){
var _=GT.doc.documentElement,$=GT.doc.body;
if(_&&(_.scrollLeft||_.scrollTop)){
return [_.scrollLeft,_.scrollTop];
}else {
if($){
return [$.scrollLeft,_.scrollTop];
}else {
return [0,0];
}
}
},getScroll:function(A){
var $=A,B=GT.doc;
if($==B||$==B.body){
var C=window.pageXOffset||B.documentElement.scrollLeft||B.body.scrollLeft||0,_=window.pageYOffset||B.documentElement.scrollTop||B.body.scrollTop||0;
return [C,_];
}else {
return [$.scrollLeft,$.scrollTop];
}
},getXY:function(F,A){
var H,E,_,B,I=GT.doc.body;
if(F.getBoundingClientRect){
_=F.getBoundingClientRect();
B=GT.U.getScroll(GT.doc);
return [_.left+B[0],_.top+B[1]];
}
var K=0,J=0;
H=F;
A=A||I;
var D=F.style.position=="absolute";
while(H){
K+=H.offsetLeft;
J+=H.offsetTop;
if(!D&&H.style.position=="absolute"){
D=true;
}
if(GT.isGecko){
E=H;
var C=parseInt(E.style.borderTopWidth,10)||0,G=parseInt(E.style.borderLeftWidth,10)||0;
K+=G;
J+=C;
if(H!=F&&E.style.overflow!="visible"){
K+=G;
J+=C;
}
}
H=H.offsetParent;
}
if(GT.isSafari&&D){
K-=I.offsetLeft;
J-=I.offsetTop;
}
if(GT.isGecko&&!D){
var $=I;
K+=parseInt($.style.borderTopWidth,10)||0;
J+=parseInt($.style.borderTopWidth,10)||0;
}
H=F.parentNode;
while(H&&H!=I){
if(!GT.isOpera||(H.tagName.toUpperCase()!="TR"&&H.style.display!="inline")){
K-=H.scrollLeft;
J-=H.scrollTop;
}
H=H.parentNode;
}
return [K,J];
},setXY:function($,A){
if($.style.position=="static"){
$.style.position="relative";
}
var _=GT.U.gpn0($,A);
if(A[0]!==false){
$.style.left=_.left+"px";
}
if(A[1]!==false){
$.style.top=_.top+"px";
}
},gpn0:function(_,E,D){
if(typeof E=="object"||E instanceof Array){
D=E[1];
E=E[0];
}
var A=_.style.position,B=GT.U.getXY(_),C=parseInt(_.style.left,10),$=parseInt(_.style.top,10);
if(isNaN(C)){
C=(A=="relative")?0:_.offsetLeft;
}
if(isNaN($)){
$=(A=="relative")?0:_.offsetTop;
}
return {left:(E-B[0]+C),top:(D-B[1]+$)};
},getContentWidthHeight:function(A){
var _=GT.U.parseInt(A.style.marginLeft),B=GT.U.parseInt(A.style.marginRight),D=GT.U.parseInt(A.style.paddingLeft),C=GT.U.parseInt(A.style.paddingRight),$=A.clientWidth-D-C,E=A.clientHeight;
return [$,E];
},getPixelValue:function(A,_){
if(GT.$type(A,"number")){
return A;
}
A=""+A;
var $=GT.U.parseInt(A);
if(A.indexOf("%")>1){
return _*$/100;
}
return $;
},setValue:function(_,C){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
A=(""+A).toUpperCase();
switch(A){
case "SELECT":
var $=[].concat(C),B=null;
GT.$each(_.options,function(C,A){
if(A===0){
B=C;
}
C.selected=false;
if(_.multiple){
GT.$each($,function($){
C.selected=C.value==$;
});
}else {
if(C.value==$[0]){
C.selected=true;
B=false;
}
}
});
if(!_.multiple&&B){
B.selected=true;
}
return (_.multiple)?$:$[0];
case "INPUT":
if(_.type=="checkbox"||_.type=="radio"){
_.checked=_.value==C;
break ;
}
case "TEXTAREA":
_.value=C;
}
return null;
},getValue:function(_){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
switch(A){
case "SELECT":
var $=[];
GT.$each(_.options,function(_){
if(_.selected){
$.push(_.value);
}
});
$=(_.multiple)?$:$[0];
if(($===null||$===undefined)&&_.options[0]){
$=_.options[0].value;
}
return $;
case "INPUT":
if((_.type=="checkbox"||_.type=="radio")&&!_.checked){
break ;
}
case "TEXTAREA":
return _.value;
}
return null;
},setOpacity:function($,_){
_=_>1?1:(_<0?0:_);
if(!$.currentStyle||!$.currentStyle.hasLayout){
$.style.zoom=1;
}
if(GT.isIE){
$.style.filter=(_==1)?"":"alpha(opacity="+_*100+")";
}
$.style.opacity=_;
if(_===0){
if($.style.visibility!="hidden"){
$.style.visibility="hidden";
}
}else {
if($.style.visibility!="visible"){
$.style.visibility="visible";
}
}
return $;
},replaceAll:function(exstr,ov,value){
var gc=GT.U.escapeRegExp(ov);
if(!GT.$chk(gc)||gc===""){
return exstr;
}
var rep="/"+gc+"/gm",r=null,cmd="r=exstr.replace("+rep+","+GT.U.escapeString(value)+")";
eval(cmd);
return r;
},trim:function(_,$){
if(!_||!_.replace||!_.length){
return _;
}
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},escapeRegExp:function($){
return !$?""+$:(""+$).replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
},escapeString:function($){
return $===""?"''":(!$?""+$:("\""+(""+$).replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"));
},bind:function(A,_,$){
$=[].concat($);
return function(){
return A.apply(_||A,GT.U.merge(GT.$A(arguments),$));
};
},bindAsEventListener:function(A,_,$){
return function(B){
B=B||window.event;
return A.apply(_||A,[GT.$event(B)].concat($));
};
},trim:function(_,$){
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},xZs1:function($){
return GT.U.trim($.replace(/\s{2,}/g," "));
},contains:function($,_,A){
return GT.U.indexOf($,_,A)!=-1;
},merge:function(A,C,$){
var _=A.length<C.length?A.length:C.length;
if($){
for(var D=0,B=_;D<B;D++){
A[D]=C[D];
}
}
for(D=_,B=C.length;D<B;D++){
A[D]=C[D];
}
return A;
},each:function($,A,_){
return GT.$each($,A,_);
},indexOf:function($,_,B){
var A=$.length;
for(var C=(B<0)?Math.max(0,A+B):B||0;C<A;C++){
if($[C]===_){
return C;
}
}
return -1;
},remove:function($,_,B){
var C=0,A=$.length;
while(C<A){
if($[C]===_){
$.splice(C,1);
if(!B){
return $;
}
A--;
}else {
C++;
}
}
return $;
},next:function(_,A){
var $=GT.U.indexOf(_,A);
if($<0){
return null;
}
return _[$+1];
},previous:function(_,A){
var $=GT.U.indexOf(_,A);
if($<1){
return null;
}
return _[$-1];
},nce6:function($,_){
_=_||GT.doc;
var A=_.createElement("style");
A.id=$;
var B=_.getElementsByTagName("head")[0];
B&&B.appendChild(A);
return A;
},getCheckboxState:function($,_){
var A={};
for(var B=0;B<$.length;B++){
if($[B].name==_&&$[B].checked){
A[$[B].value]=$[B].checked;
}
}
return A;
}};
GT.Util=GT.Utils;
GT.U=GT.Utils;
GT.Utils.CSS=function(){
var $=null;
return {nce6:function(C,$,A){
var D;
A=A||GT.doc;
var B=A.getElementsByTagName("head");
if(!B||B.length<1){
A.documentElement.insertBefore(A.createElement("head"),A.body);
B=A.getElementsByTagName("head");
}
var E=B[0],F=A.createElement("style");
F.setAttribute("type","text/css");
if($){
F.setAttribute("id",$);
}
if(GT.isIE){
E.appendChild(F);
D=F.styleSheet;
D.cssText=C;
}else {
try{
F.appendChild(A.createTextNode(C));
}
catch(_){
F.cssText=C;
}
E.appendChild(F);
D=F.styleSheet?F.styleSheet:(F.sheet||A.styleSheets[A.styleSheets.length-1]);
}
this.cacheStyleSheet(D);
return D;
},getRules:function(_,A){
A=A||GT.doc;
if(!$||_){
$={};
var C=A.styleSheets;
for(var D=0,B=C.length;D<B;D++){
this.cacheStyleSheet(C[D]);
}
}
return $;
},getRule:function(_,$){
var A=this.getRules($);
return A[_.toLowerCase()];
},updateRule:function($,B,A){
var _=this.getRule($);
if(_){
_.style[B]=A;
}
},cacheStyleSheet:function(A){
$=$||{};
try{
var B=A.cssRules||A.rules;
for(var C=B.length-1;C>=0;--C){
$[B[C].selectorText.toLowerCase()]=B[C];
}
}
catch(_){
}
}};
}();
GT.$event=function($){
$=$||window.event;
return $;
};
GT.EventCache=(function(){
var A=[],_=[],B={};
function $($){
return ""+$+"_"+$.id;
}
return {add:function($,D,E){
if(!$){
return ;
}
if(!GT.U.contains(A,arguments)){
A.push(arguments);
}
var C=GT.U.indexOf(_,$),F=C+"_"+$+"_"+$.id;
if(C<0){
F=_.length+"_"+$+"_"+$.id;
_.push($);
B[F]={};
}
B[F][D]=B[F][D]||[];
if(!GT.U.contains(B[F][D],E)){
B[F][D].push(E);
}
},remove:function($,C,D){
if(!$){
return ;
}
var A=GT.U.indexOf(_,$),E=A+"_"+$+"_"+$.id;
if(A<0||!B[E]){
return ;
}
if(!C){
B[E]=null;
_[A]=null;
return ;
}
if(!D&&B[E][C]){
B[E][C]=null;
delete B[E][C];
}
if(B[E][C]){
B[E][C].remove(D);
}
},ega1:function(){
var _,$;
for(_=A.length-1;_>=0;_=_-1){
$=A[_];
GT.EventCache.remove($[0]);
if($[0].removeEventListener){
$[0].removeEventListener($[1],$[2],$[3]);
}
if($[1].substring(0,2)!="on"){
$[1]="on"+$[1];
}
if($[0].detachEvent){
$[0].detachEvent($[1],$[2]);
}
$[0][$[1]]=null;
delete A[_];
}
window.CollectGarbage&&CollectGarbage();
}};
})();
GT.initGlobalEvent=function(){
if(GT.initGlobalEvent.inited){
return ;
}
var $=GT.isIE?GT.doc.body:GT.doc;
GT.U.addEvent($,"mousemove",function($){
GT.activeGrid&>.Grid.IRe8($,GT.activeGrid);
});
GT.U.addEvent($,"mouseup",function($){
GT.activeGrid&>.Grid.gsO6($,GT.activeGrid);
});
GT.U.addEvent($,"click",function($){
GT.activeGrid&&(GT.activeGrid.saa5()||GT.activeGrid.closeGridMenu());
});
GT.U.addEvent($,"keydown",function($){
GT.activeGrid&>.activeGrid.ees6($);
});
GT.initGlobalEvent.inited=true;
};
GT.FunctionCache={};
GT.$invoke=function(B,_,$){
B=B||window;
var A=B[_]||GT.$getFunction(_);
if(typeof (A)=="function"){
return A.apply(B,$||[]);
}
};
GT.$getFunction=function($){
return GT.FunctionCache[$];
};
GT.$callFunction=function($,_){
GT.$invoke(null,$,_);
};
GT.$putFunction=function($,_){
GT.FunctionCache[$]=_;
};
GT.$removeFunction=function($){
GT.FunctionCache[$]=null;
delete GT.FunctionCache[$];
};
GT.U.onLoad(function(){
GT.U.addEvent(window,"unload",GT.EventCache.ega1);
});
GT.AjaxDefault={paramName:"_gt_json"};
GT.Ajax=GT.$class({XtX0:function(){
return {method:"post",jsonParamName:GT.AjaxDefault.paramName,async:true,urlEncoded:true,encoding:null,mimeType:null,beforeSend:GT.$empty,onComplete:GT.$empty,onSuccess:GT.$empty,onFailure:GT.$empty,onCancel:GT.$empty,xhr:"",url:"",data:"",paramType:"jsonString",headers:{"X-Requested-With":"XMLHttpRequest","Accept":"text/javascript, text/html, application/xml,application/json, text/xml, */*"},autoCancel:false,evalScripts:false,evalResponse:false,responseContentType:"",dataUrl:false,parameters:null};
},setParameters:function($){
this.parameters=$;
},rmm5:function(_){
_=_||{};
if(GT.$type(_)=="string"){
_={url:_};
}
if(!(this.xhr=this.getXHR())){
return ;
}
var $=GT.$extend(this.headers,_.headers);
GT.$extend(this,_);
if(this.mimeType){
$["X-Response-MimeType"]=this.mimeType;
}
this.headers=$;
},send:function(I){
this.running=true;
if(GT.$type(I)=="string"){
I={data:I};
}
I=GT.$extend({data:this.data,url:this.url,method:this.method},I);
var C=I.data,H=I.url,D=String(I.method).toLowerCase();
if(GT.$invoke(this,"beforeSend",[this.xhr,C])===false){
return this;
}
if(this.urlEncoded&&D=="post"){
var B=(this.encoding)?"; charset="+this.encoding:"";
this.setHeader("Content-type","application/x-www-form-urlencoded"+B);
}
switch(GT.$type(C)){
case "object":
if(this.paramType=="jsonString"){
var F=GT.toJSONString(C);
C={};
C[this.jsonParamName]=F;
}
C=GT.toQueryString(C);
break ;
}
var E;
if(this.parameters&>.$type(this.parameters,"object")){
E=GT.toQueryString(this.parameters);
}else {
if(GT.$type(this.parameters,"string")){
E=this.parameters;
}
}
if(E&>.$type(C,"string")){
C=C+"&"+E;
}
if(D=="post"){
var _=H.indexOf("?");
if(_>=0){
C=H.substring(_+1)+"&"+C;
H=H.substring(0,_);
}
}else {
if(C&&(D=="get"||this.dataUrl)){
H=H+(H.indexOf("?")>=0?"&":"?")+C;
C=null;
}
}
var A=this;
this.xhr.open(D.toUpperCase(),H,this.async);
this.xhr.onreadystatechange=function(){
return A.onStateChange.apply(A,arguments);
};
for(var G in this.headers){
try{
this.xhr.setRequestHeader(G,this.headers[G]);
}
catch($){
}
}
this.xhr.send(C);
if(!this.async){
this.onStateChange();
}
return this;
},onStateChange:function(){
if(this.xhr.readyState!=4||!this.running){
return ;
}
this.running=false;
this.status=0;
try{
this.status=this.xhr.status;
}
catch($){
}
this.onComplete();
if(this.isSuccess()){
this._onSuccess();
}else {
this._onFailure();
}
this.xhr.onreadystatechange=GT.$empty;
},isScript:function(){
return (/(ecma|java)script/).test(this.getHeader("Content-type"));
},isSuccess:function(){
var $=this.xhr.status;
return (($>=200)&&($<300));
},_onSuccess:function(){
this.response={"text":this.xhr.responseText,"xml":this.xhr.responseXML};
this.onSuccess(this.response);
},_onFailure:function($){
this.onFailure(this.xhr,$);
},setHeader:function($,_){
this.headers[$]=_;
return this;
},getHeader:function(_){
try{
return this.xhr.getResponseHeader(_);
}
catch($){
return null;
}
},getXHR:function(){
return (window.XMLHttpRequest)?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):false);
},cancel:function(){
if(!this.running){
return this;
}
this.running=false;
this.xhr.abort();
this.xhr.onreadystatechange=GT.$empty;
this.xhr=this.getXHR();
this.onCancel();
return this;
}});
GT.JSON={encode:function(A,$,B){
var _,C=B?"\n":"";
switch(GT.$type(A)){
case "string":
return "\""+A.replace(/[\x00-\x1f\\"]/g,GT.JSON.fcs0)+"\"";
case "array":
_=[];
GT.$each(A,function(D,A){
var C=GT.JSON.encode(D,$,B);
if(C||C===0){
_.push(C);
}
});
return "["+C+(B?_.join(","+C):_)+"]"+C;
case "object":
if(A===null){
return "null";
}
_=[];
GT.$each(A,function(C,D){
if(!$||D.indexOf($)!=0){
var A=GT.JSON.encode(C,$,B);
if(A){
_.push(GT.JSON.encode(D,$,B)+":"+A);
}
}
},null,$);
return "{"+C+(B?_.join(","+C):_)+C+"}"+C;
case "number":
case "boolean":
return String(A);
}
return null;
},decode:function(string,secure){
if(!GT.$type(string,"string")||!string.length){
return null;
}
if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){
return null;
}
return eval("("+string+")");
},tae5:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},fcs0:function($){
return GT.JSON.tae5[$]||"\\u00"+Math.floor($.charCodeAt()/16).toString(16)+($.charCodeAt()%16).toString(16);
}};
GT.toQueryString=function(_){
if(!_||GT.$type(_,"string","number")){
return _;
}
var $=[];
for(var B in _){
var A=_[B];
if(GT.$type(A,"object","array")){
A=GT.toJSONString(A);
}
$.push(encodeURIComponent(B)+"="+encodeURIComponent(A));
}
return $.join("&");
};
GT.toJSONString=function($,_){
return GT.JSON.encode($,"__gt_",_);
};
GT.Const.DataSet={KEY:"__gt_ds_key__",INDEX:"__gt_ds_index__",ROW_KEY:"__gt_row_key__",NOT_VAILD:"__gt_no_valid__",SN_FIELD:"__gt_sn__",SORT_VALUE:"__gt_sort_value__",SORT_S:"__gt_"};
GT.DataSetDefault={SEQUENCE:0,uniqueField:GT.Const.DataSet.SN_FIELD,recordType:"object",recordXpath:null,dataXML:null,currentBegin:0,cursor:0,startRecordNo:0,cacheData:false,cacheModifiedData:true,modified:false,XtX0:function(){
return {fields:[],fieldsName:[],fieldsMap:{},fieldsInfo:{},data:null,sXa7:[],Xxy6:null,additional:[],sortInfo:[],queryInfo:[],reocrdIndex:{},updatedRecords:{},nsu0:{},updatedFields:{},insertedRecords:{},deletedRecords:{},mef2:GT.$empty,LSa1:GT.$empty};
},rmm5:function($){
GT.$extend(this,$);
this.recordType=this.recordType||"object";
this.fields&&this.Lgs7(this.fields);
this.data&&this.gso6(this.data);
},initValues:GT.$empty,isEqualRecord:function(_,A){
for(var $ in this.fieldsInfo){
if(_[$]!==A[$]){
return false;
}
}
return true;
},xZs1:function($){
if(!this.cacheData||$===true){
this.data=null;
this.currentBegin=0;
this.sXa7=[];
}
this.cleanModifiedData();
},cleanModifiedData:function($){
if(!this.cacheModifiedData||$){
this.updatedRecords={};
this.nsu0={};
this.updatedFields={};
this.insertedRecords={};
this.deletedRecords={};
}
},gso6:function($){
if(!$){
return false;
}
this.xZs1();
return this.lgo1($);
},Lgs7:function(C){
this.fields=C;
this.fieldsName=[];
var A=null;
for(var B=0,_=this.fields.length;B<_;B++){
var $=this.fields[B]||{};
if(GT.$type($,"string")){
$={name:$};
}
$.name=$.name||String(B);
$.type=$.type||"string";
$.index=$.index||(this.getRecordType()=="array"?B:$.name);
if($.initValue){
A=A||{};
A[$.index]=$.initValue;
}
this.fieldsMap[$.name]=$;
this.fieldsInfo[$.index]=$;
this.fieldsName[B]=$.name;
}
if(A){
this.initValues=(function($){
return function(C,A,B){
for(var _ in $){
C[_]=$[_](C,A,B);
}
};
})(A);
}else {
this.initValues=GT.$empty;
}
},lgo1:function(A){
if(!A){
return false;
}
this.data=this.data||[];
var $=this;
for(var C=0,B=A.length;C<B;C++){
var _=A[C];
_[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.data.push(_);
this.sXa7.push(this.currentBegin++);
this.initValues(_,C,this);
}
return true;
},getDataProxySize:function(){
return this.sXa7.length;
},resetDataProxy:function(_){
this.sXa7=[];
_=_||this.getSize();
for(var $=0;$<_;$++){
this.sXa7[$]=$;
}
},loadData:function($){
if($){
return gso6($.load());
}
},Zls1:function($){
if($&&this.recordType!=$){
this.recordType=$;
this.Lgs7(this.fields);
}
},getRecord:function($){
return this.data?this.data[this.sXa7[$]]:null;
},getDataRecord:function($){
return this.dataset.data[$];
},setValueByName:function($,B,A){
var _=this.fieldsMap[B].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
$[_]=A;
},getValueByName:function($,A){
var _=this.fieldsMap[A].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
return $[_];
},getFields:function(){
},getRecordType:function(_,$){
this.recordType=_||this.recordType;
if(!GT.$type(this.recordType,"string")&&(this.data&&this.getSize()>0)){
$=this.data[0];
if(GT.$type($,"array")){
this.recordType="array";
}else {
this.recordType="object";
}
}
return this.recordType;
},filterCheck:{equal:function($,_){
return $==_;
},notEqual:function($,_){
return $!=_;
},less:function($,_){
return $<_;
},great:function($,_){
return $>_;
},lessEqual:function($,_){
return $<=_;
},greatEqual:function($,_){
return $>=_;
},like:function($,_){
return (""+$).indexOf(_+"")>=0;
},startWith:function($,_){
return (""+$).indexOf(_+"")===0;
},endWith:function($,_){
$=$+"";
_=_+"";
return $.indexOf(_)==$.length-_.length;
}},filterData:function(_){
var $=this,A=[];
_=[].concat(_);
GT.$each(this.data,function(C,E){
var F=true;
for(var J=0,H=_.length;J<H;J++){
var D=$.fieldsMap[_[J].fieldName].index,G=_[J].value,I=_[J].logic,B=C[D];
F=$.filterCheck[I](B,G);
if(!F){
break ;
}
}
if(F){
A.push(E);
}
});
return A;
},oeo6:function($){
var _=$[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.insertedRecords[_]=$;
GT.$invoke(this,"mef2",[$]);
this.modified=true;
},updateRecord:function($,F,C){
if(GT.$type($,"number")){
$=this.data[$];
}
var B=$[GT.Const.DataSet.SN_FIELD],A=$[this.uniqueField],E=this.fieldsMap[F].type,_=this.fieldsMap[F].index,D;
if(!this.insertedRecords[B]){
this.nsu0[A]=this.nsu0[A]||{};
this.nsu0[A][_]=$[_];
this.nsu0[A][this.uniqueField]=A;
this.updatedRecords[A]=$;
}
if(this.insertedRecords[B]||GT.$invoke(this,"LSa1",[$,F,C])!==false){
if(E=="int"){
C=parseInt(C);
C=isNaN(C)?"":C;
}else {
if(E=="float"){
C=parseFloat(C);
C=isNaN(C)?"":C;
}else {
C=GT.$chk(C)?String(C):"";
}
}
this.updatedFields[A]=this.updatedFields[A]||{};
this.updatedFields[A][_]=C;
this.updatedFields[A][this.uniqueField]=A;
$[_]=C;
this.modified=true;
}
},undeleteRecord:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
this.deletedRecords[_]=null;
delete this.deletedRecords[_];
}
},Oae4:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
if(this.insertedRecords[A]){
delete this.insertedRecords[A];
}else {
if(this.updatedRecords[_]){
delete this.updatedRecords[_];
delete this.nsu0[_];
}
this.deletedRecords[_]=$;
this.modified=true;
}
}
},addUniqueKey:function($){
},isInsertedRecord:function($){
return $&&this.insertedRecords[$[GT.Const.DataSet.SN_FIELD]]==$;
},Zxn5:function($){
return $&&this.deletedRecords[$[this.uniqueField]]==$;
},isUpdatedRecord:function($){
return $&&this.updatedRecords[$[this.uniqueField]]==$;
},sortFunction:null,negative:function($){
return function(A,_){
return 0-$(A,_);
};
},sort:function(J){
var D=[].concat(J),I=[];
for(var C=0;C<D.length;C++){
var G=D[C];
if(G){
var E,B,$,H=G.sortOrder.indexOf("def")===0;
if(!G.sortOrder||H){
$=GT.Const.DataSet.SN_FIELD;
B="int";
}else {
E=this.fieldsMap[G.fieldName];
if(E){
$=E.index;
B=E.type;
}
}
I.push(!H&&G.sortFn?G.sortFn:this.getSortFuns($,G.sortOrder,B,G.getSortValue));
}
}
var F=this,_=I.length,A=function(B,A){
var C=F.data[B],E=F.data[A];
for(var G=0;G<_;G++){
var $=I[G](C,E,D[G].sortOrder);
if($!=0){
return $;
}
}
return 0;
};
this.sXa7.sort(A);
},getSortFuns:function(D,B,E,F){
var $=this,A=GT.Const.DataSet.SORT_VALUE,C={};
compSort=this.sortFunction;
if(!compSort){
var _=F&&B.indexOf("def")!=0?function(_){
var A=_[D],$=F(A,_);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
}:function(_){
var A=_[D],$=GT.U.convert(A,E);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
};
compSort=B=="desc"?function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?1:($>A?-1:0);
}:function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?-1:($>A?1:0);
};
}
return compSort;
},query:function($,_,B,A){
},getSize:function(){
return !this.data?-1:this.data.length;
},getFieldsNum:function(){
return this.fields.length;
},sum:function($){
},avg:function($){
}};
GT.DataSet=GT.$class(GT.DataSetDefault);
if(!GT.Template){
GT.Template={};
}
GT.$extend(GT.Template,{Grid:{main:function(_){
var $=_.id,A=[_.toolbarPosition=="top"||_.toolbarPosition=="t"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box gt-toolbar-box-top\" ></div>":"","<div id=\""+$+"_viewport\" class=\"gt-viewport"+(_.simpleScrollbar?" gt-simple-scrollbar":"")+"\" >","<div id=\""+$+"_headDiv\" class=\"gt-head-div\"><div class=\"gt-head-wrap\" ></div>","<div id=\""+$+"_columnMoveS\" class=\"gt-column-moveflag\"></div>","<div id=\""+$+"_headerGhost\" class=\"gt-head-ghost\"></div>","</div>","<div id=\""+$+"_bodyDiv\" class=\"gt-body-div\"></div>","<div id=\""+$+"_freeze_headDiv\" class=\"gt-freeze-div\" ></div>","<div id=\""+$+"_freeze_bodyDiv\" class=\"gt-freeze-div\" ></div>","</div>",_.toolbarPosition=="bottom"||_.toolbarPosition=="b"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box\" ></div>":"","<form id=\""+$+"_export_form\" target=\""+$+"_export_iframe\" style=\"width:0px;height:0px;margin:0px;padding:0xp\" method=\"post\" width=\"0\" height=\"0\" >","<textarea id=\""+$+"_export_form_textarea\" name=\"\" style=\"width:0px;height:0px;display:none;\" ></textarea>","</form>","<iframe id=\""+$+"_export_iframe\" name=\""+$+"_export_iframe\" scrolling=\"no\" style=\"width:0px;height:0px;\" width=\"0\" height=\"0\" border=\"0\" frameborder=\"0\" >","</iframe>","<div id=\""+$+"_separateLine\" class=\"gt-split-line\"></div>","<div id=\""+$+"_mask\" class=\"gt-grid-mask\" >","<div id=\""+$+"_waiting\" class=\"gt-grid-waiting\">","<div class=\"gt-grid-waiting-icon\"></div><div class=\"gt-grid-waiting-text\">"+_.getMsg("WAITING_MSG")+"</div>","</div>","<div class=\"gt-grid-mask-bg\">","</div>","</div>"];
return A.join("\n");
},icS3:function(B,$,_){
var A=GT.$e("td",{className:$.styleClass,columnId:$.id}),C=$.hdRenderer($.header,$,B);
$.title=$.title||$.header||"";
C=(!C||GT.U.trim(C)=="")?" ":C;
if(_){
A.style.height="0px";
}
A.innerHTML=["<div class=\"gt-inner"+($.hdAlign?" gt-inner-"+$.hdAlign:"")+"\" ",_?"style=\"padding-top:0px;padding-bottom:0px;height:1px;\" ":"","unselectable=\"on\" title=\""+$.title+"\" >","<span>",C,"</span>",_?"":GT.T_G.hdToolHTML,"</div>"].join("");
return A;
},hdToolHTML:"<div class=\"gt-hd-tool\" ><span class=\"gt-hd-icon\"></span><span class=\"gt-hd-button\"></span><span class=\"gt-hd-split\"></span></div>",bodyTableStart:function($){
return ["<table ",$?"id=\""+$+"\" ":"","class=\"gt-table\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>"].join("");
},tableStartHTML:"<table class=\"gt-table\" style=\"margin-left:0px\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>",tableEndHTML:"</tbody></table>",rowStart:function($,A,_){
return GT.T_G.rowStartS($,A)+">\n";
},rowStartS:function($,_){
return ["<tr class=\"gt-row",(_%2==0?$.evenRowCss:""),"\" ",GT.Const.DataSet.INDEX,"=\"",_,"\" "].join("");
},rowEndHTML:"</tr>\n",innerStart:function($){
return ["<div class=\"gt-inner "+($.align?" gt-inner-"+$.align+" ":"")+($.styleClass?(" "+$.styleClass):""),"\" >"].join("");
},cellStartHTML:"<td ><div class=\"gt-inner\" >",cellEndHTML:"</div></td>",cell:function($,_,A){
return ["<td "+$.cellAttributes,_||""," class=\""+$.styleClass+"\" >",$.innerStartHTML,A,"</div></td>",].join("");
},gid6:function($,_){
return (GT.Const.Grid.COL_T_CLASSNAME+$.id+"-"+_).toLowerCase();
},freezeBodyCell:function(D,C,_,A){
var F=C+D.xlg1,$=C+D.Lxn2,E="style=\"width:"+$+"px;\"";
_=_||" ";
var B=GT.$e("td",{style:{width:F+"px"},innerHTML:"<div class=\""+(A?"gt-hd-inner":"gt-inner")+"\" "+E+">"+_+"</div>"});
return B;
},fss6:function(A,_,$){
return this.freezeBodyCell(A,_,$,true);
}},Dialog:{create:function(C){
var $=C.domId,A=C.gridId,B=GT.$chk(C.imm1)?C.imm1:true,_=C.title||"Dialog";
return ["<div class=\"gt-dialog-head\" >","<div class=\"gt-dialog-head-icon\"> </div>","<div id=\""+$+"_dialog_title\" class=\"gt-dialog-head-text\" >"+_+"</div>","<div class=\"gt-dialog-head-button\" >",B?"<a href=\"#\" onclick=\"GT.$grid('"+A+"').closeDialog();return false;\"> </a>":"","</div>","</div><div id=\""+$+"_dialog_body\" class=\"gt-dialog-body\"></div>"].join("");
},XOo3:["<select class=\"gt-input-select\">","<option value=\"equal\">=</option>","<option value=\"notEqual\">!=</option>","<option value=\"less\"><</option>","<option value=\"great\">></option>","<option value=\"lessEqual\"><=</option>","<option value=\"greatEqual\" >>=</option>","<option value=\"like\" >like</option>","<option value=\"startWith\">startWith</option>","<option value=\"endWith\">endWith</option>","</select>"].join("")}});
GT.T_G=GT.Template.Grid;
GT.T_C=GT.Template.Column;
GT.T_D=GT.Template.Dialog;
if(!window.GT){
window.GT={};
}
GT_GRID_VER="GT-Grid 1.0";
GT.WidgetCache={};
GT.GridCache={};
GT.GridNum=0;
GT.activeGrid=null;
GT.$widget=function($){
return GT.$type($,"string")?GT.WidgetCache[$]:$;
};
GT.$grid=function($){
$=$||GT.Const.Grid.DEFAULT_ECG_ID;
return GT.$type($,"string")?GT.GridCache[$]:$;
};
GT.GridDefault={defaultId:GT.Const.Grid.DEFAULT_ECG_ID,defaultWidth:"100%",defaultHeight:"100%",defaultColumnWidth:70,language:"default",skin:"default",defaultConst:["action","recordType","exportType","exportFileName","exception","parameters","queryParameters","data","pageInfo","filterInfo","sortInfo","columnInfo","fieldsName","insertedRecords","updatedRecords","updatedFields","deletedRecords","success","succeedData","failedData"],dataRoot:null,dataPageInfo:null,dataException:null,formid:null,isNative:false,loadURL:null,saveURL:null,exportURL:null,exportType:null,exportFileName:null,sortInfo:null,editable:true,resizable:false,showGridMenu:false,showIndexColumn:false,allowCustomSkin:false,allowFreeze:false,allowHide:false,allowGroup:false,allowResizeColumn:true,simpleScrollbar:true,scrollbarClass:null,monitorResize:false,stripeRows:true,lightOverRow:true,evenRowCss:"gt-row-even",syncCheckColumn:false,clickStartEdit:true,remotePaging:true,remoteSort:false,remoteFilter:false,remoteGroup:false,autoUpdateSortState:true,autoUpdateEditState:true,autoUpdateGroupState:true,autoUpdateFreezeState:true,autoSelectFirstRow:true,autoEditNext:false,submitUpdatedFields:false,autoSaveOnNav:false,reloadAfterSave:true,recountAfterSave:true,recount:false,showEditTool:true,showAddTool:true,showDelTool:true,showSaveTool:true,showReloadTool:true,showPrintTool:true,showFilterTool:true,showChartTool:true,showPageState:true,transparentMask:false,justShowFiltered:true,toolbarPosition:"bottom",toolbarContent:"nav | goto | pagesize | reload | add del save | print | filter chart | state",width:null,height:null,minWidth:50,minHeight:50,singleSelect:false,dataRoot:"data",multiSort:false,multiGroup:false,GTGridPath:"../../gt-grid",XtX0:function(){
return {skinList:[{text:this.getMsg("STYLE_NAME_DEFAULT"),value:"default"},{text:this.getMsg("STYLE_NAME_CHINA"),value:"china"},{text:this.getMsg("STYLE_NAME_VISTA"),value:"vista"},{text:this.getMsg("STYLE_NAME_MAC"),value:"mac"}],encoding:null,mimeType:null,jsonParamName:null,title:null,lastAction:null,ajax:null,autoExpandColumn:null,autoColumnWidth:false,cellWidthPadding:GT.isBoxModel?0:4,cellHeightPadding:GT.isBoxModel?0:2,xlg1:GT.isBoxModel?0:0,Lxn2:GT.isBoxModel?0:-4,freezeFixH:GT.isBoxModel?0:0,freezeFixW:GT.isIE?-1:-2,toolbarHeight:24,xBh4:0,snn6:0,freezeColumns:0,mnr4:0,defaultRecord:null,isWaiting:false,znn2:false,requesting:false,hasGridDivTemp:false,igs6:-1,moveColumnDelay:800,mouseDown:false,gridDiv:null,gridForm:null,viewport:null,headDiv:null,headTable:null,headFirstRow:null,bodyDiv:null,bodyFirstRow:null,footDiv:null,footTable:null,footFirstRow:null,headerGhost:null,columnMoveS:null,freezeHeadDiv:null,freezeHeadTable:null,freezeBodyDiv:null,freezeBodyTable:null,titleBar:null,waitingBar:null,nearPageBar:null,toolBar:null,separateLine:null,gridGhost:null,resizeButton:null,activeCell:null,activeRow:null,activeRecord:null,activeEditor:null,activeDialog:null,lastOverHdCell:null,scrollLeft:0,scrollTop:0,ads6:0,onComplete:GT.$empty,onResize:GT.$empty,beforeSelectRow:GT.$empty,afterSelectRow:GT.$empty,onClickHead:GT.$empty,onClickCell:GT.$empty,onDblClickCell:GT.$empty,beforeEdit:GT.$empty,afterEdit:GT.$empty,beforeSave:GT.$empty,beforeLoad:GT.$empty,Ilb6:GT.$empty,Obi2:GT.$empty,LSa1:GT.$empty,beforeInsert:GT.$empty,afterInsert:GT.$empty,beforeUpdate:GT.$empty,afterUpdate:GT.$empty,beforeDelete:GT.$empty,afterDelete:GT.$empty,renderRow:GT.$empty,editing:false,isFirstLoad:true,printCssText:null,gridTable:null,gridTbodyList:[],gridRowList:[],gridFreezeRowList:[],checkedRows:{},rowBegin:0,rowNum:0,rowEnd:0,currentRowNum:0,defaultPageInfo:{pageSize:0,pageNum:0,totalRowNum:0,totalPageNum:0,startRowNum:0,endRowNum:0},countTotal:true,pageSize:0,defaultPageSize:20,filterDataProxy:null,Xxy6:null,cacheData:[],dataset:null,selectedRows:[],overRow:null,cacheBodyList:[],frozenColumnList:[],sortedColumnList:[],pageSizeList:[],columns:[],columnList:[],columnMap:{},CONST:null,container:null,ghost:null,queryParameters:{},parameters:{}};
},sSn3:function(){
GT.activeGrid=this;
},clearCheckedRows:function($){
this.checkedRows={};
if($){
this.refresh();
}
},rmm5:function(_,G){
GT.GridNum++;
var E={};
GT.$each(this.defaultConst,function($,_){
E[$]=$;
});
this.id=""+_;
G=G||{};
if(GT.$type(_,"object")){
G=_;
this.id="gtgrid_"+GT.GridNum;
}
GT.$extend(E,G.CONST);
GT.$extend(this,G);
this.CONST=E;
var B=GT.$clone(this.defaultPageInfo);
this.pageInfo=GT.$extend(B,this.pageInfo);
this.pageInfo.pageSize=this.pageInfo.pageSize||this.pageSize;
this.pageSize=this.pageInfo.pageSize;
this.id=this.id||this.defaultId;
this.gridId=this.id;
this.rowKey="__gt_"+this.id+"_r_";
GT.GridCache[this.id]=this;
if(!this.dataset&&this.columns){
var D={fields:[]};
for(var C=0;C<this.columns.length;C++){
var A=this.columns[C],$={name:A.name||A.fieldName||A.id,type:A.type,index:(A.fieldIndex||A.fieldIndex===0)?A.fieldIndex:null};
D.fields.push($);
}
this.dataset=D;
}
if(this.dataset&&!(this.dataset instanceof GT.DataSet)){
this.dataset.recordType=this.dataset.recordType||this.recordType;
this.dataset=new GT.DataSet(this.dataset);
}
this.loadURL=this.loadURL||this.dataset.loadURL;
this.saveURL=this.saveURL||this.dataset.saveURL;
this.evenRowCss=" "+this.evenRowCss;
this.toolbarContent=this.toolbarContent===false?false:this.toolbarContent;
if(this.tools){
for(var F in this.tools){
GT.ToolFactroy.register(F,this.tools[F]);
}
}
this.sSn3();
},Zar3:function(C){
this.columns=C||this.columns;
if(!this.columns){
return ;
}
this.gridEditorCache=this.gridEditorCache||GT.$e("div",{className:"gt-editor-cache"});
var F=this.columns.length,D=0,B=true,A={};
for(var E=0;E<F;E++){
this.columns[E].grid=this;
this.columns[E].gridId=this.id;
if(this.columns[E].isCheckColumn){
this.columns[E]=GT.Grid.Xri9(this,this.columns[E]);
}
var _=new GT.Column(this.columns[E]);
this.columnMap[_.id]=_;
this.columnList.push(_);
_.colIndex=E;
if(_.frozen){
this.frozenColumnList.push(_.id);
}
var $=this.dataset.fieldsMap[_.fieldName];
if($){
_.fieldIndex=$.index;
}
_.editor=GT.Editor?GT.Editor.rIF9(_.editor,this):null;
if(_.editor&&_.editor.Ots6()){
this.gridEditorCache.appendChild(_.editor.Ots6());
}
if(_.renderer=="by editor"&&_.editor){
_.renderer=function(A,_,$,B,D,C){
return this.editor.getDisplayValue(A);
};
}
A[_.fieldIndex]=_.newValue||"";
_.styleClass=GT.T_G.gid6(this,_.id);
_.innerStyleClass="."+_.styleClass+" .gt-inner";
_.minWidth=_.minWidth+this.xlg1;
_.innerStartHTML=GT.T_G.innerStart(_);
if(_.sortOrder){
this.addSortInfo(this.gnn7(_));
}
if(_.separator){
_.separator.gridId=_.gridId;
}
if(_.hidden){
}
}
this.defaultRecord=this.defaultRecord||A;
return this;
},getMsg:function($){
var _=GT.Msg.Grid[this.language][$];
return _;
},ztn9:function(){
if(this.autoSelectFirstRow){
this.selectFirstRow();
}
this.toggleEmptyRow();
GT.$invoke(this,"onComplete",[this]);
this.hideWaiting();
this.ads6++;
},render:function($){
this.container=$||this.container;
this.Zar3();
this.eox4();
this.XtR3();
this.atr1();
this.gXi8();
this.l2m9();
this.zfm3();
},ned5:function(){
var $=this;
this.headDivHeight=this.headDiv.clientHeight;
if(this.customHead){
this.headDiv.style.height=this.headDivHeight-2+"px";
GT.$thread(function(){
$.headDiv.scrollTop=2;
});
this.headDivHeight-=2;
}
this.freezeHeadDiv.style.height=this.headDivHeight+"px";
this.freezeHeadDiv.style.top=0+this.freezeFixH+"px";
this.freezeBodyDiv.style.top=this.headDivHeight+this.freezeFixH+0+"px";
},eox4:function(){
var $="display:none;";
GT.Const.Grid.SCROLLBAR_WIDTH=20;
var A=this;
A.evenRowCss=A.stripeRows?A.evenRowCss:"";
var _=[];
GT.$each(this.columnList,function(B,D){
B.width=B.width||A.defaultColumnWidth;
var C=""+B.width;
if(C.indexOf("px")<1&&C.indexOf("%")<1){
C=parseInt(C);
}else {
if(C.indexOf("%")>0){
}
}
_[D]=["."+B.styleClass+" { width:"+(C+A.xlg1)+"px;"+(B.hidden?$:"")+" } ",B.innerStyleClass+" { width:"+(C+A.Lxn2)+"px; } "].join("\n");
});
GT.U.CSS.nce6(_.join("\n"));
},XtR3:function(){
var A=this;
this.navigator=new GT.Navigator({gridId:this.id,pageInfo:this.pageInfo});
this.pageStateBar=GT.$(this.pageStateBar);
if(this.isNative){
this.gridDiv=GT.$(this.id+"_div");
}else {
var B=[(GT.isBoxModel?"gt-b-ie ":(GT.isSafari?"gt-b-safari ":(GT.isOpera?"gt-b-opera ":(GT.isStrict?"gt-b-strict":"")))),"gt-grid","gt-skin-"+this.skin];
this.gridDiv=GT.$e("div",{id:this.id+"_div",className:B.join(" ")});
this.container=GT.$(this.container);
if(!this.container||!this.container.appendChild||!this.container.tagName||GT.U.getTagName(this.container)=="BODY"){
GT.doc.body.appendChild(this.gridDiv);
}else {
if(this.replaceContainer===true){
this.container.parentNode.insertBefore(this.gridDiv,this.container);
GT.U.removeNode(this.container);
this.container=null;
}else {
this.container.appendChild(this.gridDiv);
}
}
this.gridDiv.innerHTML=GT.T_G.main(this);
}
this.gridDiv.hideFocus=true;
this.gridMask=GT.$(this.id+"_mask");
this.gridWaiting=GT.$(this.id+"_waiting");
this.gridDialog=GT.$(this.id+"_dialog");
this.gridDialogTitle=GT.$(this.id+"_dialog_title");
this.gridDialogBody=GT.$(this.id+"_dialog_body");
this.gridDiv.appendChild(this.gridEditorCache);
this.gridFilterRSCache=this.gridFilterRSCache||GT.$e("table",{className:"gt-filter-rs-cache"});
this.gridDiv.appendChild(this.gridFilterRSCache);
this.showMask();
this.viewport=GT.$(this.id+"_viewport");
this.ghn8=GT.$(this.id+"_toolBarBox");
this.headDiv=GT.$(this.id+"_headDiv");
this.bodyDiv=GT.$(this.id+"_bodyDiv");
this.freezeView=GT.$(this.id+"_freezeView");
this.freezeHeadDiv=GT.$(this.id+"_freeze_headDiv");
this.freezeBodyDiv=GT.$(this.id+"_freeze_bodyDiv");
this.Osa4();
this.separateLine=GT.$(this.id+"_separateLine");
this.xBh4=this.toolbarPosition=="top"||this.toolbarPosition=="t"?this.toolbarHeight+(GT.isBoxModel?0:1):0;
if(this.separateLine){
this.separateLine.style.top=this.xBh4+"px";
}
this.columnMoveS=GT.$(this.id+"_columnMoveS");
this.headerGhost=GT.$(this.id+"_headerGhost");
this.gridIFrame=GT.$(this.id+"_export_iframe");
this.gridForm=GT.$(this.id+"_export_form");
this.gridFormTextarea=GT.$(this.id+"_export_form_textarea");
if(this.ghn8){
this.toolBar=GT.$e("div",{id:this.id+"_toolBar",className:"gt-toolbar"});
this.ghn8.appendChild(this.toolBar);
}
var _=""+(this.width||this.defaultWidth),$=""+(this.height||this.defaultHeight);
this.setSize(_,$,true);
this.showWaiting();
this.XXp9();
},XXp9:function(){
this.left=GT.U.getPosLeftTop(this.gridDiv);
this.top=this.left[1];
this.left=this.left[0];
this.mri8=GT.U.getXY(this.viewport);
},setSize:function(A,$,D){
var C=this,B=[this.gridDiv.offsetWidth,this.gridDiv.offsetHeight];
A=""+A;
$=""+$;
this.width=A;
this.height=$;
if(A.toLowerCase()=="auto"){
this.width=B[0]+"px";
}else {
if(A.indexOf("%")<1&&A.indexOf("px")<1){
this.width=GT.U.parseInt(A)+"px";
}
}
if($.toLowerCase()=="auto"){
this.height=B[1]+"px";
}else {
if($.indexOf("%")<1&&$.indexOf("px")<1){
this.height=GT.U.parseInt($)+"px";
}
}
var _=false;
if(($.indexOf("%")>1||A.indexOf("%")>1)&&this.monitorResize){
_=true;
}
if(_){
if(GT.isIE){
this.gridDiv.style.overflowY="hidden";
}else {
if(GT.isOpera){
this.gridDiv.style.overflow="hidden";
}
}
}
C.ant3(D);
},ant3:function(A){
this.gridMask.style.width=this.width;
this.gridMask.style.height=this.height;
this.gridDiv.style.width=this.width;
this.gridDiv.style.height=this.height;
var B=(""+this.height).indexOf("%")>0?this.gridDiv.clientHeight:parseInt(this.height),_=0-(GT.isBoxModel?2:3);
this.bodyDiv.style.height=B-(this.headDivHeight+this.toolbarHeight)+_+"px";
if(GT.isOpera){
var $=this.gridDiv.clientWidth+_+"px";
this.viewport.style.width=$;
if(this.ghn8){
this.ghn8.style.width=$;
}
}
if(this.freezeBodyDiv){
this.freezeBodyDiv.style.height=this.bodyDiv.clientHeight+"px";
}
if(A!==true){
this.onResize();
}
},atr1:function(){
this.gridGhost=GT.$e("div",{id:this.id+"_gridGhost",className:"gt-grid-ghost-rect"});
this.gridGhost.style.top=this.top+"px";
this.gridGhost.style.left=this.left+"px";
this.gridGhost.style.width=this.gridMask.style.width;
this.gridGhost.style.height=this.gridMask.style.height;
GT.doc.body.appendChild(this.gridGhost);
},Osa4:function(){
var B=this,E;
if(this.customHead){
if(GT.$type(this.customHead,"string")){
if(this.customHead.indexOf("<table")===0){
GT.U.igi0.innerHTML=this.customHead;
this.customHead=GT.U.igi0.firstChild;
}else {
this.customHead=GT.$(this.customHead);
}
}
this.customHead.style.display="";
this.headTable=GT.$e(this.customHead,{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=this.headTable.tBodies[0];
for(var H=0;H<this.headTbody.rows.length;H++){
var G=this.headTbody.rows[H];
G.className="gt-hd-row";
for(var D=0;D<G.cells.length;D++){
var A=G.cells[D],F=A.innerHTML,C=A.getAttribute("columnId");
if(C){
A.columnId=C;
var $=this.columnMap[C];
if(String(A.getAttribute("resizable")).toLowerCase()=="false"){
$.resizable=false;
}
if(String(A.getAttribute("sortable")).toLowerCase()=="false"){
$.sortable=false;
}
if(A.colSpan<2){
A.className=$.styleClass;
}
$.headCell=A;
}
A.innerHTML=["<div class=\"gt-inner",A.rowSpan<2?"":" gt-inner-tall2","\" unselectable=\"on\" >","<span>",F,"</span>",C?GT.T_G.hdToolHTML:"","</div>"].join("");
}
}
E=GT.$e("tr",{className:"gt-hd-row"+(this.customHead?" gt-hd-hidden":"")});
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$,true);
E.appendChild(A);
GT.Grid.SXd9(B,$);
});
this.headTbody.insertBefore(E,this.headTbody.rows[0]);
}else {
this.headTable=GT.$e("table",{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=GT.$e("tbody");
this.headTable.appendChild(this.headTbody);
E=GT.$e("tr",{className:"gt-hd-row"});
this.headTbody.appendChild(E);
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$);
E.appendChild(A);
$.headCell=A;
GT.Grid.SXd9(B,$);
},this);
}
this.headTable.style.marginRight=100+"px";
var _=this.headDiv.firstChild?String(GT.U.getTagName(this.headDiv.firstChild)):null;
if(_=="DIV"||_=="SPAN"){
this.headDiv.firstChild.appendChild(this.headTable);
}else {
this.headDiv.appendChild(this.headTable);
}
this.headFirstRow=this.headTbody.rows[0];
this.freezeHeadTable=GT.$e("table",{id:this.headTable.id+"_freeze",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.freezeHeadTable.style.height="100%";
this.freezeHeadDiv.appendChild(this.freezeHeadTable);
this.ned5();
},zfm3:function(){
var $=GT.$(this.id+"_bodyTable");
if($){
this.gridTable=$;
this.gridTbodyList.push($.tBodies[0]);
this.bodyFirstRow=this.xrt4();
}else {
this.reload();
}
},getColumn:function($){
if(GT.$type($)=="number"&&$>=0){
return this.columnList[$];
}else {
if(GT.U.getTagName($)=="TD"){
return this.columnList[GT.U.getCellIndex($)];
}else {
return this.columnMap[$];
}
}
},iiL6:function(C,_){
C=GT.$type(C,"number")?this.ois0(C):C;
_=_||this.getRecordByRow(C);
var B=C.getAttribute(GT.Const.DataSet.INDEX)/1;
this.dataset.initValues(_,B,this.dataset);
for(var E=0;E<C.cells.length;E++){
var $=this.getColumn(E);
if($!=this.activeColumn&&$.syncRefresh===false){
continue ;
}
var A=C.cells[E],D=false;
A.firstChild.innerHTML=$.renderer(_[$.fieldIndex],_,$,this,E,B);
}
},scrollGrid:function(I,H){
var C=this.snn6,_=this.freezeBodyDiv.clientWidth,$=this.activeCell.offsetLeft+((GT.isFF2||GT.isFF1)?0:C),B=$+this.activeCell.offsetWidth,F=this.activeCell.offsetTop,D=F+this.activeCell.offsetHeight,A=this.bodyDiv.scrollLeft,E=this.bodyDiv.scrollTop,J=A+this.bodyDiv.clientWidth+C,G=E+this.bodyDiv.clientHeight;
if(GT.$chk(I)){
this.bodyDiv.scrollLeft=I;
}else {
if($<=A+_){
this.bodyDiv.scrollLeft=$-_-(_>0?1:0);
}else {
if(B>=J){
this.bod
51 楼
lsllsf
2008-08-27
谢谢楼主能分享你的源码.我会改进意见发给你的.同时我也希望你能把他作成一个开源项目人多力量大.这是源码你看一下有哪些不对的吗.
if(!window.GT){
window.GT={};
}
GT.Const=GT.Const||{};
GTConst=GT.Const;
GT.Const.Grid={DEFAULT_ECG_ID:"gt",SHADOW_ROW:"_shadowRow",HIDE_HEADER_ROW:"_hideListRow",COL_T_CLASSNAME:"gt-col-",SKIN_CLASSNAME_PREFIX:"gt-skin-",SCROLLBAR_WIDTH:18,MIN_COLWIDTH:40,AJAX_HEADER:["isAjaxRequest","true"]};
GT.Const.Key={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,PAUSE:19,CAPSLOCK:20,ESC:27,SPACE:33,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,WIN:91,WIN_R:92,MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLLLOCK:145};
if(!window.GT){
window.GT={};
}
GT.loaded=false;
GT.init=function(_){
_=_||window;
GT.doc=document;
_.undefined=_.undefined;
var $=_.navigator.userAgent.toLowerCase();
GT.isIE=$.indexOf("msie")>-1;
GT.isIE7=$.indexOf("msie 7")>-1;
GT.isIE8=$.indexOf("msie 8")>-1;
GT.isIE9=$.indexOf("msie 9")>-1;
GT.isFF=$.indexOf("firefox")>-1;
GT.isFF1=$.indexOf("firefox/1")>-1;
GT.isFF2=$.indexOf("firefox/2")>-1;
GT.isFF3=$.indexOf("firefox/3")>-1;
GT.isOpera=$.indexOf("opera")>-1;
GT.isWebkit=(/webkit|khtml/).test($);
GT.isSafari=$.indexOf("safari")>-1||GT.isWebkit;
GT.isGecko=GT.isMoz=!GT.isSafari&&$.indexOf("gecko")>-1;
GT.isStrict=GT.doc.compatMode=="CSS1Compat"||GT.isSafari;
GT.isBoxModel=GT.isIE&&!GT.isIE8&&!GT.isIE9&&!GT.isStrict;
GT.isNotStrictIE=GT.isBoxModel;
GT.isSecure=_.location.href.toLowerCase().indexOf("https")===0;
GT.isWindows=($.indexOf("windows")!=-1||$.indexOf("win32")!=-1);
GT.isMac=($.indexOf("macintosh")!=-1||$.indexOf("mac os x")!=-1);
GT.isLinux=($.indexOf("linux")!=-1);
};
GT.init();
GT.$extend=function(_,A,C){
if(arguments.length<2){
A=_;
_=this;
}
for(var B in A){
var $=A[B];
if(C&&$&>.$type($,"object","array")){
$=GT.$clone($,C);
}
_[B]=$;
}
return _;
};
GT.$empty=function(){
};
GT.$extend(GT,{$chk:function($){
return !!($||$===0||$==="");
},$type:function($){
var A=arguments.length;
if(A>1){
for(var B=1;B<A;B++){
if(GT.$type($)==arguments[B]){
return true;
}
}
return false;
}
var _=typeof $;
if($===null){
return "object";
}
if(_=="undefined"){
return "undefined";
}
if($.htmlElement){
return "element";
}
if(_=="object"&&$.nodeType&&$.nodeName){
switch($.nodeType){
case 1:
return "element";
case 3:
return (/\S/).test($.nodeValue)?"textnode":"whitespace";
}
}
if(_=="object"||_=="function"){
switch($.constructor){
case Array:
return "array";
case RegExp:
return "regexp";
case GT.Class:
return "class";
}
}
if(_=="object"&&typeof $.length=="number"){
return ($.callee)?"arguments":"collection";
}else {
if(_=="function"&&typeof $.length=="number"&&$[0]!==undefined){
return "collection";
}
}
return _;
},$merge:function(){
var B={};
for(var C=0;C<arguments.length;C++){
for(var A in arguments[C]){
var _=arguments[C][A],$=B[A];
if($&>.$type(_,"object")&>.$type($,"object")){
B[A]=GT.$merge($,_);
}else {
B[A]=_;
}
}
}
return B;
},$indexOf:function(_,A,$){
if(_){
$=$||0;
for(var C=$,B=_.length;C<B;C++){
if(_[C]===A){
return C;
}
}
}
return -1;
},$array:function(B,_,D,A){
var $=[];
if(B){
if(!GT.$chk(_)){
_=0;
}
if(!GT.$chk(D)){
D=B.length;
}
if(GT.$type(B,"arguments","collection")||GT.$type(B,"array")&&(_>0||D<B.length)){
for(var E=_;E<D;E++){
$.push(B[E]);
}
}else {
if(GT.$type(B,"array")){
$=$.concat(B);
}else {
for(var C in B){
if(B.hasOwnProperty(C)){
$.push(B[C]);
}
}
}
}
}
return $;
},$clone:function(_,A){
var $;
if(!_){
$=_;
}else {
if(GT.$type(_,"array","arguments","collection")){
$=GT.$array(_,0,_.length,A);
}else {
$=GT.$extend({},_,A);
}
}
return $;
},$msg:function($,_){
for(var A=1;A<arguments.length;A++){
$=GT.U.replaceAll($,"#{"+A+"}",arguments[A]);
}
return $;
},$clear:function($){
window.clearTimeout($);
window.clearInterval($);
if(CollectGarbage){
CollectGarbage();
}
return null;
},$thread:function(_,A){
var $=_;
window.setTimeout($,A||20);
},$each:function(C,E,D,$){
var A=[];
if(GT.$type(C,"array","arguments","collection")||C&&!GT.$type(C,"string")&>.$type(C.length,"number")){
for(var F=0,B=C.length;F<B;F++){
A.push(E.call(D||C,C[F],F,C,$));
}
}else {
for(var _ in C){
A.push(E.call(D||C,C[_],_,C,$));
}
}
return A;
},$getText:function($){
return $.innerText===undefined?$.textContent:$.innerText;
},$element:function($,B){
if(GT.$type($,"string")){
if(GT.isIE&&B&&(B.name||B.type)){
var _=(B.name)?" name=\""+B.name+"\"":"",A=(B.type)?" type=\""+B.type+"\"":"";
delete B.name;
delete B.type;
$="<"+$+_+A+">";
}
$=GT.doc.createElement($);
}
if(B){
if(B.style){
GT.$extend($.style,B.style);
delete B.style;
}
GT.$extend($,B);
}
return $;
}});
GT.Class=function(_){
_=_||{};
var $=function(){
var _=this.XtX0;
if(GT.$type(_,"function")){
_=_.apply(this,arguments);
}
if(GT.$type(_,"object")){
GT.$extend(this,_);
}
var $=this.abstractMethods;
GT.$each(this.abstractMethods,function($){
this[$]=GT.$empty;
},this);
return (arguments[0]!==GT.$empty&>.$type(this.rmm5,"function"))?this.rmm5.apply(this,arguments):this;
};
GT.$extend($,this);
$.constructor=GT.Class;
$.prototype=_;
return $;
};
GT.Class.prototype={extend:function(){
var C=new this(GT.$empty);
for(var D=0,_=arguments.length;D<_;D++){
var A=arguments[D];
for(var $ in A){
var B=C[$];
C[$]=GT.Class.merge(B,A[$]);
}
}
return new GT.Class(C);
}};
GT.Class.merge=function($,_){
if($&&$!=_){
var A=GT.$type(_);
if(!GT.$type($,A)){
return _;
}
switch(A){
case "function":
var B=function(){
this.nds1=arguments.callee.nds1;
return _.apply(this,arguments);
};
B.nds1=$;
return B;
case "object":
return GT.$merge($,_);
}
}
return _;
};
GT.$class=function($){
return new GT.Class($);
};
GT.$e=GT.$element;
GT.$A=GT.$array;
GT.$byId=function($,A){
if(!GT.$chk($)){
return null;
}
var _=GT.$type($);
if(_=="element"){
return GT.$e($,A);
}
if(_=="string"||_=="number"){
$=GT.doc.getElementById(""+$);
}
if(!$){
return null;
}
if(GT.U.contains(["object","embed"],$.tagName.toLowerCase())){
return $;
}
return GT.$e($);
};
GT.$byName=function(_){
var A=[];
if(!GT.$chk(_)){
return A;
}
var $=GT.doc.getElementsByName(""+_);
if(!$||$.length<1){
return A;
}
for(var B=0;B<$.length;B++){
_=$[B];
A.push(GT.U.contains(["object","embed"],_.tagName.toLowerCase())?_:GT.$e(_));
}
return A;
};
GT.$=function($){
var _=GT.$byName($);
if(_&&_.length===1){
return _[0];
}
return (!_||_.length<1)?GT.$byId($):_;
};
GT.Utils={parseInt:function($,A){
var _=parseInt($);
return isNaN(parseInt($))?A||0:_;
},moveItem:function(_,$,B){
$=$<0?0:($>_.length-1?_.length-1:$);
B=B<0?0:(B>_.length-1?_.length-1:B);
if($==B){
return _;
}
var A=_[$],C=_[B];
_.splice(B,1,A,C);
if($<B){
_.splice($,1);
}else {
_.splice($+1,1);
}
return _;
},convert:function(_,$){
switch($){
case "int":
return parseInt(_);
case "float":
return parseFloat(_);
case "date":
return _;
default:
return _;
}
return _;
},getTagName:function($){
return $&&$.tagName?String($.tagName).toUpperCase():null;
},Sea9:function(A,$,_,B){
if(!$){
_=GT.$event(_);
$=GT.U.getEventTarget(_);
}
B=B||6;
if(!$){
return null;
}
A=A.toLowerCase();
while($&&(B--)>0){
if($.tagName&&$.tagName.toLowerCase()==A){
return $;
}
$=$.parentNode;
}
return null;
},focus:function(_){
if(_){
try{
_.focus();
_.select&&_.select();
}
catch($){
}
}
},hasClass:function($,_){
return $?GT.U.hasSubString($.className,_," "):false;
},addClass:function($,_){
if($&&!GT.U.hasClass($,_)){
$.className=GT.U.xZs1($.className+" "+_);
}
return $;
},removeClass:function($,_){
if($){
$.className=GT.U.xZs1($.className.replace(new RegExp("(^|\\s)"+_+"(?:\\s|$)"),"$1"));
}
return $;
},toggleClass:function($,_){
return GT.U.hasClass($,_)?GT.U.removeClass($,_):GT.U.addClass($,_);
},hasSubString:function(_,A,$){
return ($)?($+_+$).indexOf($+A+$)>-1:_.indexOf(A)>-1;
},childElement:function(_,$){
var B=0,A=_?_.firstChild:null;
while(A){
if(A.nodeType==1){
if(++B==$){
return A;
}
}
A=A.nextSibling;
}
return null;
},firstChildElement:function($){
return GT.U.childElement($,1);
},XeO1:function($){
var _=$.childNodes[$.childNodes.length-1];
return _.nodeType==1?_:GT.U.prevElement(_);
},nextElement:function($){
while(($=$.nextSibling)&&$.nodeType!=1){
}
return $;
},prevElement:function($){
while(($=$.previousSibling)&&$.nodeType!=1){
}
return $;
},getCellIndex:function(_){
if(GT.isIE){
var $=_.parentNode.cells;
for(var B=0,A=$.length;B<A;B++){
if($[B]===_){
return B;
}
}
}
return _.cellIndex;
},insertNodeBefore:function($,_){
if(!$||!_||!_.parentNode){
return null;
}
_.parentNode.insertBefore($,_);
return $;
},insertNodeAfter:function($,_){
_.parentNode.insertBefore($,_.nextSibling);
return $;
},listToMap:function(_){
var $={};
for(var A=0;A<_.length;A++){
$[_[A]]=_[A];
}
return $;
},createSelect:function(A,B,C,_){
_=_||GT.$e("select",C||{});
var $=GT.doc.createDocumentFragment();
GT.$each(A,function(_,C){
var A=GT.$e("option",{"value":C,"text":""+_,innerHTML:_});
if(GT.$chk(B)&&C==B){
A.selected=true;
}
$.appendChild(A);
});
_.appendChild($);
return _;
},createSelectHTML:function(B,D,G){
G=G||{};
var $=G.id?(" id=\""+G.id+"\" "):" ",_=G.className||"",C=G.style?(" style=\""+G.style+"\" "):" ",F=["<select"+$+C+"class=\"gt-input-select "+_+"\">"];
for(var E in B){
var A="";
if((D||D===0)&&E==D){
A=" selected=\"selected\" ";
}
F.push("<option value=\""+E+"\" "+A+">"+B[E]+"</option>");
}
F.push("</select>");
return F.join("");
},getEventTarget:function(A){
var _=null;
try{
_=A.target||A.srcElement;
}
catch($){
return null;
}
return !_?null:(_.nodeType==3?_.parentNode:_);
},stopEvent:function($){
$=$||window.event;
if($){
if($.stopPropagation){
$.stopPropagation();
$.preventDefault();
}else {
$.cancelBubble=true;
$.returnValue=false;
}
}
},addEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.addEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.attachEvent($,D);
}
GT.EventCache.add(_,B,D,false);
return _;
},removeEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.removeEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.detachEvent($,D);
}
GT.EventCache.remove(_,B,D,false);
return _;
},ric3:[],Zdl9:function(){
for(var A=0;A<GT.U.ric3.length;A++){
var _=GT.U.ric3[A];
try{
_.apply(this,arguments);
}
catch($){
}
}
GT.loaded=true;
},onLoad:function(_,$){
$=$||window;
GT.U.ric3.push(_);
if(!GT.U.Zdl9.hasAdd){
GT.U.addEvent($,"load",GT.U.Zdl9);
GT.U.Zdl9.hasAdd=true;
}
},igi0:function(){
return GT.doc.createElement("div");
}(),ica7:function(A,$){
GT.U.igi0.innerHTML="<table><tbody>"+A+"</tbody></table>";
var _=GT.U.igi0.getElementsByTagName("tr")[0];
$.appendChild(_);
GT.U.igi0.innerHTML="";
return _;
},removeNode:function(_){
for(var A=0;A<arguments.length;A++){
var $=arguments[A];
if(!$||!$.parentNode||$.tagName=="BODY"){
return null;
}
GT.EventCache.remove($);
if(GT.isIE){
GT.U.igi0.appendChild($);
GT.U.igi0.innerHTML="";
}else {
$.parentNode.removeChild($);
}
}
},getLastChild:function($){
return $.childNodes[$.childNodes.length-1];
},getPosLeftTop:function($,_){
_=_||window;
var B=$.offsetTop,A=$.offsetLeft;
$=$.offsetParent;
while($&&$!=_){
B+=($.offsetTop-$.scrollTop);
A+=($.offsetLeft-$.scrollLeft);
$=$.offsetParent;
}
return [A,B];
},getPosRight:function($){
return GT.U.getPosLeftTop($)[0]+$.offsetWidth;
},getPosBottom:function($){
return GT.U.getPosLeftTop($)[1]+$.offsetHeight;
},getHeight:function(A,$){
var C=A.offsetHeight||0;
if($!==true){
return C;
}
var B=GT.U.getBorderWidths(A),_=GT.U.getPaddings(A);
return C-B[0]-B[2]-_[0]-_[2];
},getWidth:function(B,_){
var $=B.offsetWidth||0;
if(_!==true){
return $;
}
var C=GT.U.getBorderWidths(B),A=GT.U.getPaddings(B);
return $-C[1]-C[3]-A[1]-A[3];
},getBorderWidths:function($){
return [GT.U.parseInt($.style.borderTopWidth),GT.U.parseInt($.style.borderRightWidth),GT.U.parseInt($.style.borderBottomWidth),GT.U.parseInt($.style.borderLeftWidth)];
},getPaddings:function($){
return [GT.U.parseInt($.style.paddingTop),GT.U.parseInt($.style.paddingRight),GT.U.parseInt($.style.paddingBottom),GT.U.parseInt($.style.paddingLeft)];
},getPageX:function($){
$=$||window.event;
var _=$.pageX;
if(!_&&0!==_){
_=$.clientX||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[0];
}
}
return _;
},getPageY:function($){
$=$||window.event;
var _=$.pageY;
if(!_&&0!==_){
_=$.clientY||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[1];
}
}
return _;
},getPageScroll:function(){
var _=GT.doc.documentElement,$=GT.doc.body;
if(_&&(_.scrollLeft||_.scrollTop)){
return [_.scrollLeft,_.scrollTop];
}else {
if($){
return [$.scrollLeft,_.scrollTop];
}else {
return [0,0];
}
}
},getScroll:function(A){
var $=A,B=GT.doc;
if($==B||$==B.body){
var C=window.pageXOffset||B.documentElement.scrollLeft||B.body.scrollLeft||0,_=window.pageYOffset||B.documentElement.scrollTop||B.body.scrollTop||0;
return [C,_];
}else {
return [$.scrollLeft,$.scrollTop];
}
},getXY:function(F,A){
var H,E,_,B,I=GT.doc.body;
if(F.getBoundingClientRect){
_=F.getBoundingClientRect();
B=GT.U.getScroll(GT.doc);
return [_.left+B[0],_.top+B[1]];
}
var K=0,J=0;
H=F;
A=A||I;
var D=F.style.position=="absolute";
while(H){
K+=H.offsetLeft;
J+=H.offsetTop;
if(!D&&H.style.position=="absolute"){
D=true;
}
if(GT.isGecko){
E=H;
var C=parseInt(E.style.borderTopWidth,10)||0,G=parseInt(E.style.borderLeftWidth,10)||0;
K+=G;
J+=C;
if(H!=F&&E.style.overflow!="visible"){
K+=G;
J+=C;
}
}
H=H.offsetParent;
}
if(GT.isSafari&&D){
K-=I.offsetLeft;
J-=I.offsetTop;
}
if(GT.isGecko&&!D){
var $=I;
K+=parseInt($.style.borderTopWidth,10)||0;
J+=parseInt($.style.borderTopWidth,10)||0;
}
H=F.parentNode;
while(H&&H!=I){
if(!GT.isOpera||(H.tagName.toUpperCase()!="TR"&&H.style.display!="inline")){
K-=H.scrollLeft;
J-=H.scrollTop;
}
H=H.parentNode;
}
return [K,J];
},setXY:function($,A){
if($.style.position=="static"){
$.style.position="relative";
}
var _=GT.U.gpn0($,A);
if(A[0]!==false){
$.style.left=_.left+"px";
}
if(A[1]!==false){
$.style.top=_.top+"px";
}
},gpn0:function(_,E,D){
if(typeof E=="object"||E instanceof Array){
D=E[1];
E=E[0];
}
var A=_.style.position,B=GT.U.getXY(_),C=parseInt(_.style.left,10),$=parseInt(_.style.top,10);
if(isNaN(C)){
C=(A=="relative")?0:_.offsetLeft;
}
if(isNaN($)){
$=(A=="relative")?0:_.offsetTop;
}
return {left:(E-B[0]+C),top:(D-B[1]+$)};
},getContentWidthHeight:function(A){
var _=GT.U.parseInt(A.style.marginLeft),B=GT.U.parseInt(A.style.marginRight),D=GT.U.parseInt(A.style.paddingLeft),C=GT.U.parseInt(A.style.paddingRight),$=A.clientWidth-D-C,E=A.clientHeight;
return [$,E];
},getPixelValue:function(A,_){
if(GT.$type(A,"number")){
return A;
}
A=""+A;
var $=GT.U.parseInt(A);
if(A.indexOf("%")>1){
return _*$/100;
}
return $;
},setValue:function(_,C){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
A=(""+A).toUpperCase();
switch(A){
case "SELECT":
var $=[].concat(C),B=null;
GT.$each(_.options,function(C,A){
if(A===0){
B=C;
}
C.selected=false;
if(_.multiple){
GT.$each($,function($){
C.selected=C.value==$;
});
}else {
if(C.value==$[0]){
C.selected=true;
B=false;
}
}
});
if(!_.multiple&&B){
B.selected=true;
}
return (_.multiple)?$:$[0];
case "INPUT":
if(_.type=="checkbox"||_.type=="radio"){
_.checked=_.value==C;
break ;
}
case "TEXTAREA":
_.value=C;
}
return null;
},getValue:function(_){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
switch(A){
case "SELECT":
var $=[];
GT.$each(_.options,function(_){
if(_.selected){
$.push(_.value);
}
});
$=(_.multiple)?$:$[0];
if(($===null||$===undefined)&&_.options[0]){
$=_.options[0].value;
}
return $;
case "INPUT":
if((_.type=="checkbox"||_.type=="radio")&&!_.checked){
break ;
}
case "TEXTAREA":
return _.value;
}
return null;
},setOpacity:function($,_){
_=_>1?1:(_<0?0:_);
if(!$.currentStyle||!$.currentStyle.hasLayout){
$.style.zoom=1;
}
if(GT.isIE){
$.style.filter=(_==1)?"":"alpha(opacity="+_*100+")";
}
$.style.opacity=_;
if(_===0){
if($.style.visibility!="hidden"){
$.style.visibility="hidden";
}
}else {
if($.style.visibility!="visible"){
$.style.visibility="visible";
}
}
return $;
},replaceAll:function(exstr,ov,value){
var gc=GT.U.escapeRegExp(ov);
if(!GT.$chk(gc)||gc===""){
return exstr;
}
var rep="/"+gc+"/gm",r=null,cmd="r=exstr.replace("+rep+","+GT.U.escapeString(value)+")";
eval(cmd);
return r;
},trim:function(_,$){
if(!_||!_.replace||!_.length){
return _;
}
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},escapeRegExp:function($){
return !$?""+$:(""+$).replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
},escapeString:function($){
return $===""?"''":(!$?""+$:("\""+(""+$).replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"));
},bind:function(A,_,$){
$=[].concat($);
return function(){
return A.apply(_||A,GT.U.merge(GT.$A(arguments),$));
};
},bindAsEventListener:function(A,_,$){
return function(B){
B=B||window.event;
return A.apply(_||A,[GT.$event(B)].concat($));
};
},trim:function(_,$){
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},xZs1:function($){
return GT.U.trim($.replace(/\s{2,}/g," "));
},contains:function($,_,A){
return GT.U.indexOf($,_,A)!=-1;
},merge:function(A,C,$){
var _=A.length<C.length?A.length:C.length;
if($){
for(var D=0,B=_;D<B;D++){
A[D]=C[D];
}
}
for(D=_,B=C.length;D<B;D++){
A[D]=C[D];
}
return A;
},each:function($,A,_){
return GT.$each($,A,_);
},indexOf:function($,_,B){
var A=$.length;
for(var C=(B<0)?Math.max(0,A+B):B||0;C<A;C++){
if($[C]===_){
return C;
}
}
return -1;
},remove:function($,_,B){
var C=0,A=$.length;
while(C<A){
if($[C]===_){
$.splice(C,1);
if(!B){
return $;
}
A--;
}else {
C++;
}
}
return $;
},next:function(_,A){
var $=GT.U.indexOf(_,A);
if($<0){
return null;
}
return _[$+1];
},previous:function(_,A){
var $=GT.U.indexOf(_,A);
if($<1){
return null;
}
return _[$-1];
},nce6:function($,_){
_=_||GT.doc;
var A=_.createElement("style");
A.id=$;
var B=_.getElementsByTagName("head")[0];
B&&B.appendChild(A);
return A;
},getCheckboxState:function($,_){
var A={};
for(var B=0;B<$.length;B++){
if($[B].name==_&&$[B].checked){
A[$[B].value]=$[B].checked;
}
}
return A;
}};
GT.Util=GT.Utils;
GT.U=GT.Utils;
GT.Utils.CSS=function(){
var $=null;
return {nce6:function(C,$,A){
var D;
A=A||GT.doc;
var B=A.getElementsByTagName("head");
if(!B||B.length<1){
A.documentElement.insertBefore(A.createElement("head"),A.body);
B=A.getElementsByTagName("head");
}
var E=B[0],F=A.createElement("style");
F.setAttribute("type","text/css");
if($){
F.setAttribute("id",$);
}
if(GT.isIE){
E.appendChild(F);
D=F.styleSheet;
D.cssText=C;
}else {
try{
F.appendChild(A.createTextNode(C));
}
catch(_){
F.cssText=C;
}
E.appendChild(F);
D=F.styleSheet?F.styleSheet:(F.sheet||A.styleSheets[A.styleSheets.length-1]);
}
this.cacheStyleSheet(D);
return D;
},getRules:function(_,A){
A=A||GT.doc;
if(!$||_){
$={};
var C=A.styleSheets;
for(var D=0,B=C.length;D<B;D++){
this.cacheStyleSheet(C[D]);
}
}
return $;
},getRule:function(_,$){
var A=this.getRules($);
return A[_.toLowerCase()];
},updateRule:function($,B,A){
var _=this.getRule($);
if(_){
_.style[B]=A;
}
},cacheStyleSheet:function(A){
$=$||{};
try{
var B=A.cssRules||A.rules;
for(var C=B.length-1;C>=0;--C){
$[B[C].selectorText.toLowerCase()]=B[C];
}
}
catch(_){
}
}};
}();
GT.$event=function($){
$=$||window.event;
return $;
};
GT.EventCache=(function(){
var A=[],_=[],B={};
function $($){
return ""+$+"_"+$.id;
}
return {add:function($,D,E){
if(!$){
return ;
}
if(!GT.U.contains(A,arguments)){
A.push(arguments);
}
var C=GT.U.indexOf(_,$),F=C+"_"+$+"_"+$.id;
if(C<0){
F=_.length+"_"+$+"_"+$.id;
_.push($);
B[F]={};
}
B[F][D]=B[F][D]||[];
if(!GT.U.contains(B[F][D],E)){
B[F][D].push(E);
}
},remove:function($,C,D){
if(!$){
return ;
}
var A=GT.U.indexOf(_,$),E=A+"_"+$+"_"+$.id;
if(A<0||!B[E]){
return ;
}
if(!C){
B[E]=null;
_[A]=null;
return ;
}
if(!D&&B[E][C]){
B[E][C]=null;
delete B[E][C];
}
if(B[E][C]){
B[E][C].remove(D);
}
},ega1:function(){
var _,$;
for(_=A.length-1;_>=0;_=_-1){
$=A[_];
GT.EventCache.remove($[0]);
if($[0].removeEventListener){
$[0].removeEventListener($[1],$[2],$[3]);
}
if($[1].substring(0,2)!="on"){
$[1]="on"+$[1];
}
if($[0].detachEvent){
$[0].detachEvent($[1],$[2]);
}
$[0][$[1]]=null;
delete A[_];
}
window.CollectGarbage&&CollectGarbage();
}};
})();
GT.initGlobalEvent=function(){
if(GT.initGlobalEvent.inited){
return ;
}
var $=GT.isIE?GT.doc.body:GT.doc;
GT.U.addEvent($,"mousemove",function($){
GT.activeGrid&>.Grid.IRe8($,GT.activeGrid);
});
GT.U.addEvent($,"mouseup",function($){
GT.activeGrid&>.Grid.gsO6($,GT.activeGrid);
});
GT.U.addEvent($,"click",function($){
GT.activeGrid&&(GT.activeGrid.saa5()||GT.activeGrid.closeGridMenu());
});
GT.U.addEvent($,"keydown",function($){
GT.activeGrid&>.activeGrid.ees6($);
});
GT.initGlobalEvent.inited=true;
};
GT.FunctionCache={};
GT.$invoke=function(B,_,$){
B=B||window;
var A=B[_]||GT.$getFunction(_);
if(typeof (A)=="function"){
return A.apply(B,$||[]);
}
};
GT.$getFunction=function($){
return GT.FunctionCache[$];
};
GT.$callFunction=function($,_){
GT.$invoke(null,$,_);
};
GT.$putFunction=function($,_){
GT.FunctionCache[$]=_;
};
GT.$removeFunction=function($){
GT.FunctionCache[$]=null;
delete GT.FunctionCache[$];
};
GT.U.onLoad(function(){
GT.U.addEvent(window,"unload",GT.EventCache.ega1);
});
GT.AjaxDefault={paramName:"_gt_json"};
GT.Ajax=GT.$class({XtX0:function(){
return {method:"post",jsonParamName:GT.AjaxDefault.paramName,async:true,urlEncoded:true,encoding:null,mimeType:null,beforeSend:GT.$empty,onComplete:GT.$empty,onSuccess:GT.$empty,onFailure:GT.$empty,onCancel:GT.$empty,xhr:"",url:"",data:"",paramType:"jsonString",headers:{"X-Requested-With":"XMLHttpRequest","Accept":"text/javascript, text/html, application/xml,application/json, text/xml, */*"},autoCancel:false,evalScripts:false,evalResponse:false,responseContentType:"",dataUrl:false,parameters:null};
},setParameters:function($){
this.parameters=$;
},rmm5:function(_){
_=_||{};
if(GT.$type(_)=="string"){
_={url:_};
}
if(!(this.xhr=this.getXHR())){
return ;
}
var $=GT.$extend(this.headers,_.headers);
GT.$extend(this,_);
if(this.mimeType){
$["X-Response-MimeType"]=this.mimeType;
}
this.headers=$;
},send:function(I){
this.running=true;
if(GT.$type(I)=="string"){
I={data:I};
}
I=GT.$extend({data:this.data,url:this.url,method:this.method},I);
var C=I.data,H=I.url,D=String(I.method).toLowerCase();
if(GT.$invoke(this,"beforeSend",[this.xhr,C])===false){
return this;
}
if(this.urlEncoded&&D=="post"){
var B=(this.encoding)?"; charset="+this.encoding:"";
this.setHeader("Content-type","application/x-www-form-urlencoded"+B);
}
switch(GT.$type(C)){
case "object":
if(this.paramType=="jsonString"){
var F=GT.toJSONString(C);
C={};
C[this.jsonParamName]=F;
}
C=GT.toQueryString(C);
break ;
}
var E;
if(this.parameters&>.$type(this.parameters,"object")){
E=GT.toQueryString(this.parameters);
}else {
if(GT.$type(this.parameters,"string")){
E=this.parameters;
}
}
if(E&>.$type(C,"string")){
C=C+"&"+E;
}
if(D=="post"){
var _=H.indexOf("?");
if(_>=0){
C=H.substring(_+1)+"&"+C;
H=H.substring(0,_);
}
}else {
if(C&&(D=="get"||this.dataUrl)){
H=H+(H.indexOf("?")>=0?"&":"?")+C;
C=null;
}
}
var A=this;
this.xhr.open(D.toUpperCase(),H,this.async);
this.xhr.onreadystatechange=function(){
return A.onStateChange.apply(A,arguments);
};
for(var G in this.headers){
try{
this.xhr.setRequestHeader(G,this.headers[G]);
}
catch($){
}
}
this.xhr.send(C);
if(!this.async){
this.onStateChange();
}
return this;
},onStateChange:function(){
if(this.xhr.readyState!=4||!this.running){
return ;
}
this.running=false;
this.status=0;
try{
this.status=this.xhr.status;
}
catch($){
}
this.onComplete();
if(this.isSuccess()){
this._onSuccess();
}else {
this._onFailure();
}
this.xhr.onreadystatechange=GT.$empty;
},isScript:function(){
return (/(ecma|java)script/).test(this.getHeader("Content-type"));
},isSuccess:function(){
var $=this.xhr.status;
return (($>=200)&&($<300));
},_onSuccess:function(){
this.response={"text":this.xhr.responseText,"xml":this.xhr.responseXML};
this.onSuccess(this.response);
},_onFailure:function($){
this.onFailure(this.xhr,$);
},setHeader:function($,_){
this.headers[$]=_;
return this;
},getHeader:function(_){
try{
return this.xhr.getResponseHeader(_);
}
catch($){
return null;
}
},getXHR:function(){
return (window.XMLHttpRequest)?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):false);
},cancel:function(){
if(!this.running){
return this;
}
this.running=false;
this.xhr.abort();
this.xhr.onreadystatechange=GT.$empty;
this.xhr=this.getXHR();
this.onCancel();
return this;
}});
GT.JSON={encode:function(A,$,B){
var _,C=B?"\n":"";
switch(GT.$type(A)){
case "string":
return "\""+A.replace(/[\x00-\x1f\\"]/g,GT.JSON.fcs0)+"\"";
case "array":
_=[];
GT.$each(A,function(D,A){
var C=GT.JSON.encode(D,$,B);
if(C||C===0){
_.push(C);
}
});
return "["+C+(B?_.join(","+C):_)+"]"+C;
case "object":
if(A===null){
return "null";
}
_=[];
GT.$each(A,function(C,D){
if(!$||D.indexOf($)!=0){
var A=GT.JSON.encode(C,$,B);
if(A){
_.push(GT.JSON.encode(D,$,B)+":"+A);
}
}
},null,$);
return "{"+C+(B?_.join(","+C):_)+C+"}"+C;
case "number":
case "boolean":
return String(A);
}
return null;
},decode:function(string,secure){
if(!GT.$type(string,"string")||!string.length){
return null;
}
if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){
return null;
}
return eval("("+string+")");
},tae5:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},fcs0:function($){
return GT.JSON.tae5[$]||"\\u00"+Math.floor($.charCodeAt()/16).toString(16)+($.charCodeAt()%16).toString(16);
}};
GT.toQueryString=function(_){
if(!_||GT.$type(_,"string","number")){
return _;
}
var $=[];
for(var B in _){
var A=_[B];
if(GT.$type(A,"object","array")){
A=GT.toJSONString(A);
}
$.push(encodeURIComponent(B)+"="+encodeURIComponent(A));
}
return $.join("&");
};
GT.toJSONString=function($,_){
return GT.JSON.encode($,"__gt_",_);
};
GT.Const.DataSet={KEY:"__gt_ds_key__",INDEX:"__gt_ds_index__",ROW_KEY:"__gt_row_key__",NOT_VAILD:"__gt_no_valid__",SN_FIELD:"__gt_sn__",SORT_VALUE:"__gt_sort_value__",SORT_S:"__gt_"};
GT.DataSetDefault={SEQUENCE:0,uniqueField:GT.Const.DataSet.SN_FIELD,recordType:"object",recordXpath:null,dataXML:null,currentBegin:0,cursor:0,startRecordNo:0,cacheData:false,cacheModifiedData:true,modified:false,XtX0:function(){
return {fields:[],fieldsName:[],fieldsMap:{},fieldsInfo:{},data:null,sXa7:[],Xxy6:null,additional:[],sortInfo:[],queryInfo:[],reocrdIndex:{},updatedRecords:{},nsu0:{},updatedFields:{},insertedRecords:{},deletedRecords:{},mef2:GT.$empty,LSa1:GT.$empty};
},rmm5:function($){
GT.$extend(this,$);
this.recordType=this.recordType||"object";
this.fields&&this.Lgs7(this.fields);
this.data&&this.gso6(this.data);
},initValues:GT.$empty,isEqualRecord:function(_,A){
for(var $ in this.fieldsInfo){
if(_[$]!==A[$]){
return false;
}
}
return true;
},xZs1:function($){
if(!this.cacheData||$===true){
this.data=null;
this.currentBegin=0;
this.sXa7=[];
}
this.cleanModifiedData();
},cleanModifiedData:function($){
if(!this.cacheModifiedData||$){
this.updatedRecords={};
this.nsu0={};
this.updatedFields={};
this.insertedRecords={};
this.deletedRecords={};
}
},gso6:function($){
if(!$){
return false;
}
this.xZs1();
return this.lgo1($);
},Lgs7:function(C){
this.fields=C;
this.fieldsName=[];
var A=null;
for(var B=0,_=this.fields.length;B<_;B++){
var $=this.fields[B]||{};
if(GT.$type($,"string")){
$={name:$};
}
$.name=$.name||String(B);
$.type=$.type||"string";
$.index=$.index||(this.getRecordType()=="array"?B:$.name);
if($.initValue){
A=A||{};
A[$.index]=$.initValue;
}
this.fieldsMap[$.name]=$;
this.fieldsInfo[$.index]=$;
this.fieldsName[B]=$.name;
}
if(A){
this.initValues=(function($){
return function(C,A,B){
for(var _ in $){
C[_]=$[_](C,A,B);
}
};
})(A);
}else {
this.initValues=GT.$empty;
}
},lgo1:function(A){
if(!A){
return false;
}
this.data=this.data||[];
var $=this;
for(var C=0,B=A.length;C<B;C++){
var _=A[C];
_[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.data.push(_);
this.sXa7.push(this.currentBegin++);
this.initValues(_,C,this);
}
return true;
},getDataProxySize:function(){
return this.sXa7.length;
},resetDataProxy:function(_){
this.sXa7=[];
_=_||this.getSize();
for(var $=0;$<_;$++){
this.sXa7[$]=$;
}
},loadData:function($){
if($){
return gso6($.load());
}
},Zls1:function($){
if($&&this.recordType!=$){
this.recordType=$;
this.Lgs7(this.fields);
}
},getRecord:function($){
return this.data?this.data[this.sXa7[$]]:null;
},getDataRecord:function($){
return this.dataset.data[$];
},setValueByName:function($,B,A){
var _=this.fieldsMap[B].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
$[_]=A;
},getValueByName:function($,A){
var _=this.fieldsMap[A].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
return $[_];
},getFields:function(){
},getRecordType:function(_,$){
this.recordType=_||this.recordType;
if(!GT.$type(this.recordType,"string")&&(this.data&&this.getSize()>0)){
$=this.data[0];
if(GT.$type($,"array")){
this.recordType="array";
}else {
this.recordType="object";
}
}
return this.recordType;
},filterCheck:{equal:function($,_){
return $==_;
},notEqual:function($,_){
return $!=_;
},less:function($,_){
return $<_;
},great:function($,_){
return $>_;
},lessEqual:function($,_){
return $<=_;
},greatEqual:function($,_){
return $>=_;
},like:function($,_){
return (""+$).indexOf(_+"")>=0;
},startWith:function($,_){
return (""+$).indexOf(_+"")===0;
},endWith:function($,_){
$=$+"";
_=_+"";
return $.indexOf(_)==$.length-_.length;
}},filterData:function(_){
var $=this,A=[];
_=[].concat(_);
GT.$each(this.data,function(C,E){
var F=true;
for(var J=0,H=_.length;J<H;J++){
var D=$.fieldsMap[_[J].fieldName].index,G=_[J].value,I=_[J].logic,B=C[D];
F=$.filterCheck[I](B,G);
if(!F){
break ;
}
}
if(F){
A.push(E);
}
});
return A;
},oeo6:function($){
var _=$[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.insertedRecords[_]=$;
GT.$invoke(this,"mef2",[$]);
this.modified=true;
},updateRecord:function($,F,C){
if(GT.$type($,"number")){
$=this.data[$];
}
var B=$[GT.Const.DataSet.SN_FIELD],A=$[this.uniqueField],E=this.fieldsMap[F].type,_=this.fieldsMap[F].index,D;
if(!this.insertedRecords[B]){
this.nsu0[A]=this.nsu0[A]||{};
this.nsu0[A][_]=$[_];
this.nsu0[A][this.uniqueField]=A;
this.updatedRecords[A]=$;
}
if(this.insertedRecords[B]||GT.$invoke(this,"LSa1",[$,F,C])!==false){
if(E=="int"){
C=parseInt(C);
C=isNaN(C)?"":C;
}else {
if(E=="float"){
C=parseFloat(C);
C=isNaN(C)?"":C;
}else {
C=GT.$chk(C)?String(C):"";
}
}
this.updatedFields[A]=this.updatedFields[A]||{};
this.updatedFields[A][_]=C;
this.updatedFields[A][this.uniqueField]=A;
$[_]=C;
this.modified=true;
}
},undeleteRecord:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
this.deletedRecords[_]=null;
delete this.deletedRecords[_];
}
},Oae4:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
if(this.insertedRecords[A]){
delete this.insertedRecords[A];
}else {
if(this.updatedRecords[_]){
delete this.updatedRecords[_];
delete this.nsu0[_];
}
this.deletedRecords[_]=$;
this.modified=true;
}
}
},addUniqueKey:function($){
},isInsertedRecord:function($){
return $&&this.insertedRecords[$[GT.Const.DataSet.SN_FIELD]]==$;
},Zxn5:function($){
return $&&this.deletedRecords[$[this.uniqueField]]==$;
},isUpdatedRecord:function($){
return $&&this.updatedRecords[$[this.uniqueField]]==$;
},sortFunction:null,negative:function($){
return function(A,_){
return 0-$(A,_);
};
},sort:function(J){
var D=[].concat(J),I=[];
for(var C=0;C<D.length;C++){
var G=D[C];
if(G){
var E,B,$,H=G.sortOrder.indexOf("def")===0;
if(!G.sortOrder||H){
$=GT.Const.DataSet.SN_FIELD;
B="int";
}else {
E=this.fieldsMap[G.fieldName];
if(E){
$=E.index;
B=E.type;
}
}
I.push(!H&&G.sortFn?G.sortFn:this.getSortFuns($,G.sortOrder,B,G.getSortValue));
}
}
var F=this,_=I.length,A=function(B,A){
var C=F.data[B],E=F.data[A];
for(var G=0;G<_;G++){
var $=I[G](C,E,D[G].sortOrder);
if($!=0){
return $;
}
}
return 0;
};
this.sXa7.sort(A);
},getSortFuns:function(D,B,E,F){
var $=this,A=GT.Const.DataSet.SORT_VALUE,C={};
compSort=this.sortFunction;
if(!compSort){
var _=F&&B.indexOf("def")!=0?function(_){
var A=_[D],$=F(A,_);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
}:function(_){
var A=_[D],$=GT.U.convert(A,E);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
};
compSort=B=="desc"?function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?1:($>A?-1:0);
}:function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?-1:($>A?1:0);
};
}
return compSort;
},query:function($,_,B,A){
},getSize:function(){
return !this.data?-1:this.data.length;
},getFieldsNum:function(){
return this.fields.length;
},sum:function($){
},avg:function($){
}};
GT.DataSet=GT.$class(GT.DataSetDefault);
if(!GT.Template){
GT.Template={};
}
GT.$extend(GT.Template,{Grid:{main:function(_){
var $=_.id,A=[_.toolbarPosition=="top"||_.toolbarPosition=="t"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box gt-toolbar-box-top\" ></div>":"","<div id=\""+$+"_viewport\" class=\"gt-viewport"+(_.simpleScrollbar?" gt-simple-scrollbar":"")+"\" >","<div id=\""+$+"_headDiv\" class=\"gt-head-div\"><div class=\"gt-head-wrap\" ></div>","<div id=\""+$+"_columnMoveS\" class=\"gt-column-moveflag\"></div>","<div id=\""+$+"_headerGhost\" class=\"gt-head-ghost\"></div>","</div>","<div id=\""+$+"_bodyDiv\" class=\"gt-body-div\"></div>","<div id=\""+$+"_freeze_headDiv\" class=\"gt-freeze-div\" ></div>","<div id=\""+$+"_freeze_bodyDiv\" class=\"gt-freeze-div\" ></div>","</div>",_.toolbarPosition=="bottom"||_.toolbarPosition=="b"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box\" ></div>":"","<form id=\""+$+"_export_form\" target=\""+$+"_export_iframe\" style=\"width:0px;height:0px;margin:0px;padding:0xp\" method=\"post\" width=\"0\" height=\"0\" >","<textarea id=\""+$+"_export_form_textarea\" name=\"\" style=\"width:0px;height:0px;display:none;\" ></textarea>","</form>","<iframe id=\""+$+"_export_iframe\" name=\""+$+"_export_iframe\" scrolling=\"no\" style=\"width:0px;height:0px;\" width=\"0\" height=\"0\" border=\"0\" frameborder=\"0\" >","</iframe>","<div id=\""+$+"_separateLine\" class=\"gt-split-line\"></div>","<div id=\""+$+"_mask\" class=\"gt-grid-mask\" >","<div id=\""+$+"_waiting\" class=\"gt-grid-waiting\">","<div class=\"gt-grid-waiting-icon\"></div><div class=\"gt-grid-waiting-text\">"+_.getMsg("WAITING_MSG")+"</div>","</div>","<div class=\"gt-grid-mask-bg\">","</div>","</div>"];
return A.join("\n");
},icS3:function(B,$,_){
var A=GT.$e("td",{className:$.styleClass,columnId:$.id}),C=$.hdRenderer($.header,$,B);
$.title=$.title||$.header||"";
C=(!C||GT.U.trim(C)=="")?" ":C;
if(_){
A.style.height="0px";
}
A.innerHTML=["<div class=\"gt-inner"+($.hdAlign?" gt-inner-"+$.hdAlign:"")+"\" ",_?"style=\"padding-top:0px;padding-bottom:0px;height:1px;\" ":"","unselectable=\"on\" title=\""+$.title+"\" >","<span>",C,"</span>",_?"":GT.T_G.hdToolHTML,"</div>"].join("");
return A;
},hdToolHTML:"<div class=\"gt-hd-tool\" ><span class=\"gt-hd-icon\"></span><span class=\"gt-hd-button\"></span><span class=\"gt-hd-split\"></span></div>",bodyTableStart:function($){
return ["<table ",$?"id=\""+$+"\" ":"","class=\"gt-table\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>"].join("");
},tableStartHTML:"<table class=\"gt-table\" style=\"margin-left:0px\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>",tableEndHTML:"</tbody></table>",rowStart:function($,A,_){
return GT.T_G.rowStartS($,A)+">\n";
},rowStartS:function($,_){
return ["<tr class=\"gt-row",(_%2==0?$.evenRowCss:""),"\" ",GT.Const.DataSet.INDEX,"=\"",_,"\" "].join("");
},rowEndHTML:"</tr>\n",innerStart:function($){
return ["<div class=\"gt-inner "+($.align?" gt-inner-"+$.align+" ":"")+($.styleClass?(" "+$.styleClass):""),"\" >"].join("");
},cellStartHTML:"<td ><div class=\"gt-inner\" >",cellEndHTML:"</div></td>",cell:function($,_,A){
return ["<td "+$.cellAttributes,_||""," class=\""+$.styleClass+"\" >",$.innerStartHTML,A,"</div></td>",].join("");
},gid6:function($,_){
return (GT.Const.Grid.COL_T_CLASSNAME+$.id+"-"+_).toLowerCase();
},freezeBodyCell:function(D,C,_,A){
var F=C+D.xlg1,$=C+D.Lxn2,E="style=\"width:"+$+"px;\"";
_=_||" ";
var B=GT.$e("td",{style:{width:F+"px"},innerHTML:"<div class=\""+(A?"gt-hd-inner":"gt-inner")+"\" "+E+">"+_+"</div>"});
return B;
},fss6:function(A,_,$){
return this.freezeBodyCell(A,_,$,true);
}},Dialog:{create:function(C){
var $=C.domId,A=C.gridId,B=GT.$chk(C.imm1)?C.imm1:true,_=C.title||"Dialog";
return ["<div class=\"gt-dialog-head\" >","<div class=\"gt-dialog-head-icon\"> </div>","<div id=\""+$+"_dialog_title\" class=\"gt-dialog-head-text\" >"+_+"</div>","<div class=\"gt-dialog-head-button\" >",B?"<a href=\"#\" onclick=\"GT.$grid('"+A+"').closeDialog();return false;\"> </a>":"","</div>","</div><div id=\""+$+"_dialog_body\" class=\"gt-dialog-body\"></div>"].join("");
},XOo3:["<select class=\"gt-input-select\">","<option value=\"equal\">=</option>","<option value=\"notEqual\">!=</option>","<option value=\"less\"><</option>","<option value=\"great\">></option>","<option value=\"lessEqual\"><=</option>","<option value=\"greatEqual\" >>=</option>","<option value=\"like\" >like</option>","<option value=\"startWith\">startWith</option>","<option value=\"endWith\">endWith</option>","</select>"].join("")}});
GT.T_G=GT.Template.Grid;
GT.T_C=GT.Template.Column;
GT.T_D=GT.Template.Dialog;
if(!window.GT){
window.GT={};
}
GT_GRID_VER="GT-Grid 1.0";
GT.WidgetCache={};
GT.GridCache={};
GT.GridNum=0;
GT.activeGrid=null;
GT.$widget=function($){
return GT.$type($,"string")?GT.WidgetCache[$]:$;
};
GT.$grid=function($){
$=$||GT.Const.Grid.DEFAULT_ECG_ID;
return GT.$type($,"string")?GT.GridCache[$]:$;
};
GT.GridDefault={defaultId:GT.Const.Grid.DEFAULT_ECG_ID,defaultWidth:"100%",defaultHeight:"100%",defaultColumnWidth:70,language:"default",skin:"default",defaultConst:["action","recordType","exportType","exportFileName","exception","parameters","queryParameters","data","pageInfo","filterInfo","sortInfo","columnInfo","fieldsName","insertedRecords","updatedRecords","updatedFields","deletedRecords","success","succeedData","failedData"],dataRoot:null,dataPageInfo:null,dataException:null,formid:null,isNative:false,loadURL:null,saveURL:null,exportURL:null,exportType:null,exportFileName:null,sortInfo:null,editable:true,resizable:false,showGridMenu:false,showIndexColumn:false,allowCustomSkin:false,allowFreeze:false,allowHide:false,allowGroup:false,allowResizeColumn:true,simpleScrollbar:true,scrollbarClass:null,monitorResize:false,stripeRows:true,lightOverRow:true,evenRowCss:"gt-row-even",syncCheckColumn:false,clickStartEdit:true,remotePaging:true,remoteSort:false,remoteFilter:false,remoteGroup:false,autoUpdateSortState:true,autoUpdateEditState:true,autoUpdateGroupState:true,autoUpdateFreezeState:true,autoSelectFirstRow:true,autoEditNext:false,submitUpdatedFields:false,autoSaveOnNav:false,reloadAfterSave:true,recountAfterSave:true,recount:false,showEditTool:true,showAddTool:true,showDelTool:true,showSaveTool:true,showReloadTool:true,showPrintTool:true,showFilterTool:true,showChartTool:true,showPageState:true,transparentMask:false,justShowFiltered:true,toolbarPosition:"bottom",toolbarContent:"nav | goto | pagesize | reload | add del save | print | filter chart | state",width:null,height:null,minWidth:50,minHeight:50,singleSelect:false,dataRoot:"data",multiSort:false,multiGroup:false,GTGridPath:"../../gt-grid",XtX0:function(){
return {skinList:[{text:this.getMsg("STYLE_NAME_DEFAULT"),value:"default"},{text:this.getMsg("STYLE_NAME_CHINA"),value:"china"},{text:this.getMsg("STYLE_NAME_VISTA"),value:"vista"},{text:this.getMsg("STYLE_NAME_MAC"),value:"mac"}],encoding:null,mimeType:null,jsonParamName:null,title:null,lastAction:null,ajax:null,autoExpandColumn:null,autoColumnWidth:false,cellWidthPadding:GT.isBoxModel?0:4,cellHeightPadding:GT.isBoxModel?0:2,xlg1:GT.isBoxModel?0:0,Lxn2:GT.isBoxModel?0:-4,freezeFixH:GT.isBoxModel?0:0,freezeFixW:GT.isIE?-1:-2,toolbarHeight:24,xBh4:0,snn6:0,freezeColumns:0,mnr4:0,defaultRecord:null,isWaiting:false,znn2:false,requesting:false,hasGridDivTemp:false,igs6:-1,moveColumnDelay:800,mouseDown:false,gridDiv:null,gridForm:null,viewport:null,headDiv:null,headTable:null,headFirstRow:null,bodyDiv:null,bodyFirstRow:null,footDiv:null,footTable:null,footFirstRow:null,headerGhost:null,columnMoveS:null,freezeHeadDiv:null,freezeHeadTable:null,freezeBodyDiv:null,freezeBodyTable:null,titleBar:null,waitingBar:null,nearPageBar:null,toolBar:null,separateLine:null,gridGhost:null,resizeButton:null,activeCell:null,activeRow:null,activeRecord:null,activeEditor:null,activeDialog:null,lastOverHdCell:null,scrollLeft:0,scrollTop:0,ads6:0,onComplete:GT.$empty,onResize:GT.$empty,beforeSelectRow:GT.$empty,afterSelectRow:GT.$empty,onClickHead:GT.$empty,onClickCell:GT.$empty,onDblClickCell:GT.$empty,beforeEdit:GT.$empty,afterEdit:GT.$empty,beforeSave:GT.$empty,beforeLoad:GT.$empty,Ilb6:GT.$empty,Obi2:GT.$empty,LSa1:GT.$empty,beforeInsert:GT.$empty,afterInsert:GT.$empty,beforeUpdate:GT.$empty,afterUpdate:GT.$empty,beforeDelete:GT.$empty,afterDelete:GT.$empty,renderRow:GT.$empty,editing:false,isFirstLoad:true,printCssText:null,gridTable:null,gridTbodyList:[],gridRowList:[],gridFreezeRowList:[],checkedRows:{},rowBegin:0,rowNum:0,rowEnd:0,currentRowNum:0,defaultPageInfo:{pageSize:0,pageNum:0,totalRowNum:0,totalPageNum:0,startRowNum:0,endRowNum:0},countTotal:true,pageSize:0,defaultPageSize:20,filterDataProxy:null,Xxy6:null,cacheData:[],dataset:null,selectedRows:[],overRow:null,cacheBodyList:[],frozenColumnList:[],sortedColumnList:[],pageSizeList:[],columns:[],columnList:[],columnMap:{},CONST:null,container:null,ghost:null,queryParameters:{},parameters:{}};
},sSn3:function(){
GT.activeGrid=this;
},clearCheckedRows:function($){
this.checkedRows={};
if($){
this.refresh();
}
},rmm5:function(_,G){
GT.GridNum++;
var E={};
GT.$each(this.defaultConst,function($,_){
E[$]=$;
});
this.id=""+_;
G=G||{};
if(GT.$type(_,"object")){
G=_;
this.id="gtgrid_"+GT.GridNum;
}
GT.$extend(E,G.CONST);
GT.$extend(this,G);
this.CONST=E;
var B=GT.$clone(this.defaultPageInfo);
this.pageInfo=GT.$extend(B,this.pageInfo);
this.pageInfo.pageSize=this.pageInfo.pageSize||this.pageSize;
this.pageSize=this.pageInfo.pageSize;
this.id=this.id||this.defaultId;
this.gridId=this.id;
this.rowKey="__gt_"+this.id+"_r_";
GT.GridCache[this.id]=this;
if(!this.dataset&&this.columns){
var D={fields:[]};
for(var C=0;C<this.columns.length;C++){
var A=this.columns[C],$={name:A.name||A.fieldName||A.id,type:A.type,index:(A.fieldIndex||A.fieldIndex===0)?A.fieldIndex:null};
D.fields.push($);
}
this.dataset=D;
}
if(this.dataset&&!(this.dataset instanceof GT.DataSet)){
this.dataset.recordType=this.dataset.recordType||this.recordType;
this.dataset=new GT.DataSet(this.dataset);
}
this.loadURL=this.loadURL||this.dataset.loadURL;
this.saveURL=this.saveURL||this.dataset.saveURL;
this.evenRowCss=" "+this.evenRowCss;
this.toolbarContent=this.toolbarContent===false?false:this.toolbarContent;
if(this.tools){
for(var F in this.tools){
GT.ToolFactroy.register(F,this.tools[F]);
}
}
this.sSn3();
},Zar3:function(C){
this.columns=C||this.columns;
if(!this.columns){
return ;
}
this.gridEditorCache=this.gridEditorCache||GT.$e("div",{className:"gt-editor-cache"});
var F=this.columns.length,D=0,B=true,A={};
for(var E=0;E<F;E++){
this.columns[E].grid=this;
this.columns[E].gridId=this.id;
if(this.columns[E].isCheckColumn){
this.columns[E]=GT.Grid.Xri9(this,this.columns[E]);
}
var _=new GT.Column(this.columns[E]);
this.columnMap[_.id]=_;
this.columnList.push(_);
_.colIndex=E;
if(_.frozen){
this.frozenColumnList.push(_.id);
}
var $=this.dataset.fieldsMap[_.fieldName];
if($){
_.fieldIndex=$.index;
}
_.editor=GT.Editor?GT.Editor.rIF9(_.editor,this):null;
if(_.editor&&_.editor.Ots6()){
this.gridEditorCache.appendChild(_.editor.Ots6());
}
if(_.renderer=="by editor"&&_.editor){
_.renderer=function(A,_,$,B,D,C){
return this.editor.getDisplayValue(A);
};
}
A[_.fieldIndex]=_.newValue||"";
_.styleClass=GT.T_G.gid6(this,_.id);
_.innerStyleClass="."+_.styleClass+" .gt-inner";
_.minWidth=_.minWidth+this.xlg1;
_.innerStartHTML=GT.T_G.innerStart(_);
if(_.sortOrder){
this.addSortInfo(this.gnn7(_));
}
if(_.separator){
_.separator.gridId=_.gridId;
}
if(_.hidden){
}
}
this.defaultRecord=this.defaultRecord||A;
return this;
},getMsg:function($){
var _=GT.Msg.Grid[this.language][$];
return _;
},ztn9:function(){
if(this.autoSelectFirstRow){
this.selectFirstRow();
}
this.toggleEmptyRow();
GT.$invoke(this,"onComplete",[this]);
this.hideWaiting();
this.ads6++;
},render:function($){
this.container=$||this.container;
this.Zar3();
this.eox4();
this.XtR3();
this.atr1();
this.gXi8();
this.l2m9();
this.zfm3();
},ned5:function(){
var $=this;
this.headDivHeight=this.headDiv.clientHeight;
if(this.customHead){
this.headDiv.style.height=this.headDivHeight-2+"px";
GT.$thread(function(){
$.headDiv.scrollTop=2;
});
this.headDivHeight-=2;
}
this.freezeHeadDiv.style.height=this.headDivHeight+"px";
this.freezeHeadDiv.style.top=0+this.freezeFixH+"px";
this.freezeBodyDiv.style.top=this.headDivHeight+this.freezeFixH+0+"px";
},eox4:function(){
var $="display:none;";
GT.Const.Grid.SCROLLBAR_WIDTH=20;
var A=this;
A.evenRowCss=A.stripeRows?A.evenRowCss:"";
var _=[];
GT.$each(this.columnList,function(B,D){
B.width=B.width||A.defaultColumnWidth;
var C=""+B.width;
if(C.indexOf("px")<1&&C.indexOf("%")<1){
C=parseInt(C);
}else {
if(C.indexOf("%")>0){
}
}
_[D]=["."+B.styleClass+" { width:"+(C+A.xlg1)+"px;"+(B.hidden?$:"")+" } ",B.innerStyleClass+" { width:"+(C+A.Lxn2)+"px; } "].join("\n");
});
GT.U.CSS.nce6(_.join("\n"));
},XtR3:function(){
var A=this;
this.navigator=new GT.Navigator({gridId:this.id,pageInfo:this.pageInfo});
this.pageStateBar=GT.$(this.pageStateBar);
if(this.isNative){
this.gridDiv=GT.$(this.id+"_div");
}else {
var B=[(GT.isBoxModel?"gt-b-ie ":(GT.isSafari?"gt-b-safari ":(GT.isOpera?"gt-b-opera ":(GT.isStrict?"gt-b-strict":"")))),"gt-grid","gt-skin-"+this.skin];
this.gridDiv=GT.$e("div",{id:this.id+"_div",className:B.join(" ")});
this.container=GT.$(this.container);
if(!this.container||!this.container.appendChild||!this.container.tagName||GT.U.getTagName(this.container)=="BODY"){
GT.doc.body.appendChild(this.gridDiv);
}else {
if(this.replaceContainer===true){
this.container.parentNode.insertBefore(this.gridDiv,this.container);
GT.U.removeNode(this.container);
this.container=null;
}else {
this.container.appendChild(this.gridDiv);
}
}
this.gridDiv.innerHTML=GT.T_G.main(this);
}
this.gridDiv.hideFocus=true;
this.gridMask=GT.$(this.id+"_mask");
this.gridWaiting=GT.$(this.id+"_waiting");
this.gridDialog=GT.$(this.id+"_dialog");
this.gridDialogTitle=GT.$(this.id+"_dialog_title");
this.gridDialogBody=GT.$(this.id+"_dialog_body");
this.gridDiv.appendChild(this.gridEditorCache);
this.gridFilterRSCache=this.gridFilterRSCache||GT.$e("table",{className:"gt-filter-rs-cache"});
this.gridDiv.appendChild(this.gridFilterRSCache);
this.showMask();
this.viewport=GT.$(this.id+"_viewport");
this.ghn8=GT.$(this.id+"_toolBarBox");
this.headDiv=GT.$(this.id+"_headDiv");
this.bodyDiv=GT.$(this.id+"_bodyDiv");
this.freezeView=GT.$(this.id+"_freezeView");
this.freezeHeadDiv=GT.$(this.id+"_freeze_headDiv");
this.freezeBodyDiv=GT.$(this.id+"_freeze_bodyDiv");
this.Osa4();
this.separateLine=GT.$(this.id+"_separateLine");
this.xBh4=this.toolbarPosition=="top"||this.toolbarPosition=="t"?this.toolbarHeight+(GT.isBoxModel?0:1):0;
if(this.separateLine){
this.separateLine.style.top=this.xBh4+"px";
}
this.columnMoveS=GT.$(this.id+"_columnMoveS");
this.headerGhost=GT.$(this.id+"_headerGhost");
this.gridIFrame=GT.$(this.id+"_export_iframe");
this.gridForm=GT.$(this.id+"_export_form");
this.gridFormTextarea=GT.$(this.id+"_export_form_textarea");
if(this.ghn8){
this.toolBar=GT.$e("div",{id:this.id+"_toolBar",className:"gt-toolbar"});
this.ghn8.appendChild(this.toolBar);
}
var _=""+(this.width||this.defaultWidth),$=""+(this.height||this.defaultHeight);
this.setSize(_,$,true);
this.showWaiting();
this.XXp9();
},XXp9:function(){
this.left=GT.U.getPosLeftTop(this.gridDiv);
this.top=this.left[1];
this.left=this.left[0];
this.mri8=GT.U.getXY(this.viewport);
},setSize:function(A,$,D){
var C=this,B=[this.gridDiv.offsetWidth,this.gridDiv.offsetHeight];
A=""+A;
$=""+$;
this.width=A;
this.height=$;
if(A.toLowerCase()=="auto"){
this.width=B[0]+"px";
}else {
if(A.indexOf("%")<1&&A.indexOf("px")<1){
this.width=GT.U.parseInt(A)+"px";
}
}
if($.toLowerCase()=="auto"){
this.height=B[1]+"px";
}else {
if($.indexOf("%")<1&&$.indexOf("px")<1){
this.height=GT.U.parseInt($)+"px";
}
}
var _=false;
if(($.indexOf("%")>1||A.indexOf("%")>1)&&this.monitorResize){
_=true;
}
if(_){
if(GT.isIE){
this.gridDiv.style.overflowY="hidden";
}else {
if(GT.isOpera){
this.gridDiv.style.overflow="hidden";
}
}
}
C.ant3(D);
},ant3:function(A){
this.gridMask.style.width=this.width;
this.gridMask.style.height=this.height;
this.gridDiv.style.width=this.width;
this.gridDiv.style.height=this.height;
var B=(""+this.height).indexOf("%")>0?this.gridDiv.clientHeight:parseInt(this.height),_=0-(GT.isBoxModel?2:3);
this.bodyDiv.style.height=B-(this.headDivHeight+this.toolbarHeight)+_+"px";
if(GT.isOpera){
var $=this.gridDiv.clientWidth+_+"px";
this.viewport.style.width=$;
if(this.ghn8){
this.ghn8.style.width=$;
}
}
if(this.freezeBodyDiv){
this.freezeBodyDiv.style.height=this.bodyDiv.clientHeight+"px";
}
if(A!==true){
this.onResize();
}
},atr1:function(){
this.gridGhost=GT.$e("div",{id:this.id+"_gridGhost",className:"gt-grid-ghost-rect"});
this.gridGhost.style.top=this.top+"px";
this.gridGhost.style.left=this.left+"px";
this.gridGhost.style.width=this.gridMask.style.width;
this.gridGhost.style.height=this.gridMask.style.height;
GT.doc.body.appendChild(this.gridGhost);
},Osa4:function(){
var B=this,E;
if(this.customHead){
if(GT.$type(this.customHead,"string")){
if(this.customHead.indexOf("<table")===0){
GT.U.igi0.innerHTML=this.customHead;
this.customHead=GT.U.igi0.firstChild;
}else {
this.customHead=GT.$(this.customHead);
}
}
this.customHead.style.display="";
this.headTable=GT.$e(this.customHead,{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=this.headTable.tBodies[0];
for(var H=0;H<this.headTbody.rows.length;H++){
var G=this.headTbody.rows[H];
G.className="gt-hd-row";
for(var D=0;D<G.cells.length;D++){
var A=G.cells[D],F=A.innerHTML,C=A.getAttribute("columnId");
if(C){
A.columnId=C;
var $=this.columnMap[C];
if(String(A.getAttribute("resizable")).toLowerCase()=="false"){
$.resizable=false;
}
if(String(A.getAttribute("sortable")).toLowerCase()=="false"){
$.sortable=false;
}
if(A.colSpan<2){
A.className=$.styleClass;
}
$.headCell=A;
}
A.innerHTML=["<div class=\"gt-inner",A.rowSpan<2?"":" gt-inner-tall2","\" unselectable=\"on\" >","<span>",F,"</span>",C?GT.T_G.hdToolHTML:"","</div>"].join("");
}
}
E=GT.$e("tr",{className:"gt-hd-row"+(this.customHead?" gt-hd-hidden":"")});
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$,true);
E.appendChild(A);
GT.Grid.SXd9(B,$);
});
this.headTbody.insertBefore(E,this.headTbody.rows[0]);
}else {
this.headTable=GT.$e("table",{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=GT.$e("tbody");
this.headTable.appendChild(this.headTbody);
E=GT.$e("tr",{className:"gt-hd-row"});
this.headTbody.appendChild(E);
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$);
E.appendChild(A);
$.headCell=A;
GT.Grid.SXd9(B,$);
},this);
}
this.headTable.style.marginRight=100+"px";
var _=this.headDiv.firstChild?String(GT.U.getTagName(this.headDiv.firstChild)):null;
if(_=="DIV"||_=="SPAN"){
this.headDiv.firstChild.appendChild(this.headTable);
}else {
this.headDiv.appendChild(this.headTable);
}
this.headFirstRow=this.headTbody.rows[0];
this.freezeHeadTable=GT.$e("table",{id:this.headTable.id+"_freeze",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.freezeHeadTable.style.height="100%";
this.freezeHeadDiv.appendChild(this.freezeHeadTable);
this.ned5();
},zfm3:function(){
var $=GT.$(this.id+"_bodyTable");
if($){
this.gridTable=$;
this.gridTbodyList.push($.tBodies[0]);
this.bodyFirstRow=this.xrt4();
}else {
this.reload();
}
},getColumn:function($){
if(GT.$type($)=="number"&&$>=0){
return this.columnList[$];
}else {
if(GT.U.getTagName($)=="TD"){
return this.columnList[GT.U.getCellIndex($)];
}else {
return this.columnMap[$];
}
}
},iiL6:function(C,_){
C=GT.$type(C,"number")?this.ois0(C):C;
_=_||this.getRecordByRow(C);
var B=C.getAttribute(GT.Const.DataSet.INDEX)/1;
this.dataset.initValues(_,B,this.dataset);
for(var E=0;E<C.cells.length;E++){
var $=this.getColumn(E);
if($!=this.activeColumn&&$.syncRefresh===false){
continue ;
}
var A=C.cells[E],D=false;
A.firstChild.innerHTML=$.renderer(_[$.fieldIndex],_,$,this,E,B);
}
},scrollGrid:function(I,H){
var C=this.snn6,_=this.freezeBodyDiv.clientWidth,$=this.activeCell.offsetLeft+((GT.isFF2||GT.isFF1)?0:C),B=$+this.activeCell.offsetWidth,F=this.activeCell.offsetTop,D=F+this.activeCell.offsetHeight,A=this.bodyDiv.scrollLeft,E=this.bodyDiv.scrollTop,J=A+this.bodyDiv.clientWidth+C,G=E+this.bodyDiv.clientHeight;
if(GT.$chk(I)){
this.bodyDiv.scrollLeft=I;
}else {
if($<=A+_){
this.bodyDiv.scrollLeft=$-_-(_>0?1:0);
}else {
if(B>=J){
this.bod
if(!window.GT){
window.GT={};
}
GT.Const=GT.Const||{};
GTConst=GT.Const;
GT.Const.Grid={DEFAULT_ECG_ID:"gt",SHADOW_ROW:"_shadowRow",HIDE_HEADER_ROW:"_hideListRow",COL_T_CLASSNAME:"gt-col-",SKIN_CLASSNAME_PREFIX:"gt-skin-",SCROLLBAR_WIDTH:18,MIN_COLWIDTH:40,AJAX_HEADER:["isAjaxRequest","true"]};
GT.Const.Key={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,PAUSE:19,CAPSLOCK:20,ESC:27,SPACE:33,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,WIN:91,WIN_R:92,MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SCROLLLOCK:145};
if(!window.GT){
window.GT={};
}
GT.loaded=false;
GT.init=function(_){
_=_||window;
GT.doc=document;
_.undefined=_.undefined;
var $=_.navigator.userAgent.toLowerCase();
GT.isIE=$.indexOf("msie")>-1;
GT.isIE7=$.indexOf("msie 7")>-1;
GT.isIE8=$.indexOf("msie 8")>-1;
GT.isIE9=$.indexOf("msie 9")>-1;
GT.isFF=$.indexOf("firefox")>-1;
GT.isFF1=$.indexOf("firefox/1")>-1;
GT.isFF2=$.indexOf("firefox/2")>-1;
GT.isFF3=$.indexOf("firefox/3")>-1;
GT.isOpera=$.indexOf("opera")>-1;
GT.isWebkit=(/webkit|khtml/).test($);
GT.isSafari=$.indexOf("safari")>-1||GT.isWebkit;
GT.isGecko=GT.isMoz=!GT.isSafari&&$.indexOf("gecko")>-1;
GT.isStrict=GT.doc.compatMode=="CSS1Compat"||GT.isSafari;
GT.isBoxModel=GT.isIE&&!GT.isIE8&&!GT.isIE9&&!GT.isStrict;
GT.isNotStrictIE=GT.isBoxModel;
GT.isSecure=_.location.href.toLowerCase().indexOf("https")===0;
GT.isWindows=($.indexOf("windows")!=-1||$.indexOf("win32")!=-1);
GT.isMac=($.indexOf("macintosh")!=-1||$.indexOf("mac os x")!=-1);
GT.isLinux=($.indexOf("linux")!=-1);
};
GT.init();
GT.$extend=function(_,A,C){
if(arguments.length<2){
A=_;
_=this;
}
for(var B in A){
var $=A[B];
if(C&&$&>.$type($,"object","array")){
$=GT.$clone($,C);
}
_[B]=$;
}
return _;
};
GT.$empty=function(){
};
GT.$extend(GT,{$chk:function($){
return !!($||$===0||$==="");
},$type:function($){
var A=arguments.length;
if(A>1){
for(var B=1;B<A;B++){
if(GT.$type($)==arguments[B]){
return true;
}
}
return false;
}
var _=typeof $;
if($===null){
return "object";
}
if(_=="undefined"){
return "undefined";
}
if($.htmlElement){
return "element";
}
if(_=="object"&&$.nodeType&&$.nodeName){
switch($.nodeType){
case 1:
return "element";
case 3:
return (/\S/).test($.nodeValue)?"textnode":"whitespace";
}
}
if(_=="object"||_=="function"){
switch($.constructor){
case Array:
return "array";
case RegExp:
return "regexp";
case GT.Class:
return "class";
}
}
if(_=="object"&&typeof $.length=="number"){
return ($.callee)?"arguments":"collection";
}else {
if(_=="function"&&typeof $.length=="number"&&$[0]!==undefined){
return "collection";
}
}
return _;
},$merge:function(){
var B={};
for(var C=0;C<arguments.length;C++){
for(var A in arguments[C]){
var _=arguments[C][A],$=B[A];
if($&>.$type(_,"object")&>.$type($,"object")){
B[A]=GT.$merge($,_);
}else {
B[A]=_;
}
}
}
return B;
},$indexOf:function(_,A,$){
if(_){
$=$||0;
for(var C=$,B=_.length;C<B;C++){
if(_[C]===A){
return C;
}
}
}
return -1;
},$array:function(B,_,D,A){
var $=[];
if(B){
if(!GT.$chk(_)){
_=0;
}
if(!GT.$chk(D)){
D=B.length;
}
if(GT.$type(B,"arguments","collection")||GT.$type(B,"array")&&(_>0||D<B.length)){
for(var E=_;E<D;E++){
$.push(B[E]);
}
}else {
if(GT.$type(B,"array")){
$=$.concat(B);
}else {
for(var C in B){
if(B.hasOwnProperty(C)){
$.push(B[C]);
}
}
}
}
}
return $;
},$clone:function(_,A){
var $;
if(!_){
$=_;
}else {
if(GT.$type(_,"array","arguments","collection")){
$=GT.$array(_,0,_.length,A);
}else {
$=GT.$extend({},_,A);
}
}
return $;
},$msg:function($,_){
for(var A=1;A<arguments.length;A++){
$=GT.U.replaceAll($,"#{"+A+"}",arguments[A]);
}
return $;
},$clear:function($){
window.clearTimeout($);
window.clearInterval($);
if(CollectGarbage){
CollectGarbage();
}
return null;
},$thread:function(_,A){
var $=_;
window.setTimeout($,A||20);
},$each:function(C,E,D,$){
var A=[];
if(GT.$type(C,"array","arguments","collection")||C&&!GT.$type(C,"string")&>.$type(C.length,"number")){
for(var F=0,B=C.length;F<B;F++){
A.push(E.call(D||C,C[F],F,C,$));
}
}else {
for(var _ in C){
A.push(E.call(D||C,C[_],_,C,$));
}
}
return A;
},$getText:function($){
return $.innerText===undefined?$.textContent:$.innerText;
},$element:function($,B){
if(GT.$type($,"string")){
if(GT.isIE&&B&&(B.name||B.type)){
var _=(B.name)?" name=\""+B.name+"\"":"",A=(B.type)?" type=\""+B.type+"\"":"";
delete B.name;
delete B.type;
$="<"+$+_+A+">";
}
$=GT.doc.createElement($);
}
if(B){
if(B.style){
GT.$extend($.style,B.style);
delete B.style;
}
GT.$extend($,B);
}
return $;
}});
GT.Class=function(_){
_=_||{};
var $=function(){
var _=this.XtX0;
if(GT.$type(_,"function")){
_=_.apply(this,arguments);
}
if(GT.$type(_,"object")){
GT.$extend(this,_);
}
var $=this.abstractMethods;
GT.$each(this.abstractMethods,function($){
this[$]=GT.$empty;
},this);
return (arguments[0]!==GT.$empty&>.$type(this.rmm5,"function"))?this.rmm5.apply(this,arguments):this;
};
GT.$extend($,this);
$.constructor=GT.Class;
$.prototype=_;
return $;
};
GT.Class.prototype={extend:function(){
var C=new this(GT.$empty);
for(var D=0,_=arguments.length;D<_;D++){
var A=arguments[D];
for(var $ in A){
var B=C[$];
C[$]=GT.Class.merge(B,A[$]);
}
}
return new GT.Class(C);
}};
GT.Class.merge=function($,_){
if($&&$!=_){
var A=GT.$type(_);
if(!GT.$type($,A)){
return _;
}
switch(A){
case "function":
var B=function(){
this.nds1=arguments.callee.nds1;
return _.apply(this,arguments);
};
B.nds1=$;
return B;
case "object":
return GT.$merge($,_);
}
}
return _;
};
GT.$class=function($){
return new GT.Class($);
};
GT.$e=GT.$element;
GT.$A=GT.$array;
GT.$byId=function($,A){
if(!GT.$chk($)){
return null;
}
var _=GT.$type($);
if(_=="element"){
return GT.$e($,A);
}
if(_=="string"||_=="number"){
$=GT.doc.getElementById(""+$);
}
if(!$){
return null;
}
if(GT.U.contains(["object","embed"],$.tagName.toLowerCase())){
return $;
}
return GT.$e($);
};
GT.$byName=function(_){
var A=[];
if(!GT.$chk(_)){
return A;
}
var $=GT.doc.getElementsByName(""+_);
if(!$||$.length<1){
return A;
}
for(var B=0;B<$.length;B++){
_=$[B];
A.push(GT.U.contains(["object","embed"],_.tagName.toLowerCase())?_:GT.$e(_));
}
return A;
};
GT.$=function($){
var _=GT.$byName($);
if(_&&_.length===1){
return _[0];
}
return (!_||_.length<1)?GT.$byId($):_;
};
GT.Utils={parseInt:function($,A){
var _=parseInt($);
return isNaN(parseInt($))?A||0:_;
},moveItem:function(_,$,B){
$=$<0?0:($>_.length-1?_.length-1:$);
B=B<0?0:(B>_.length-1?_.length-1:B);
if($==B){
return _;
}
var A=_[$],C=_[B];
_.splice(B,1,A,C);
if($<B){
_.splice($,1);
}else {
_.splice($+1,1);
}
return _;
},convert:function(_,$){
switch($){
case "int":
return parseInt(_);
case "float":
return parseFloat(_);
case "date":
return _;
default:
return _;
}
return _;
},getTagName:function($){
return $&&$.tagName?String($.tagName).toUpperCase():null;
},Sea9:function(A,$,_,B){
if(!$){
_=GT.$event(_);
$=GT.U.getEventTarget(_);
}
B=B||6;
if(!$){
return null;
}
A=A.toLowerCase();
while($&&(B--)>0){
if($.tagName&&$.tagName.toLowerCase()==A){
return $;
}
$=$.parentNode;
}
return null;
},focus:function(_){
if(_){
try{
_.focus();
_.select&&_.select();
}
catch($){
}
}
},hasClass:function($,_){
return $?GT.U.hasSubString($.className,_," "):false;
},addClass:function($,_){
if($&&!GT.U.hasClass($,_)){
$.className=GT.U.xZs1($.className+" "+_);
}
return $;
},removeClass:function($,_){
if($){
$.className=GT.U.xZs1($.className.replace(new RegExp("(^|\\s)"+_+"(?:\\s|$)"),"$1"));
}
return $;
},toggleClass:function($,_){
return GT.U.hasClass($,_)?GT.U.removeClass($,_):GT.U.addClass($,_);
},hasSubString:function(_,A,$){
return ($)?($+_+$).indexOf($+A+$)>-1:_.indexOf(A)>-1;
},childElement:function(_,$){
var B=0,A=_?_.firstChild:null;
while(A){
if(A.nodeType==1){
if(++B==$){
return A;
}
}
A=A.nextSibling;
}
return null;
},firstChildElement:function($){
return GT.U.childElement($,1);
},XeO1:function($){
var _=$.childNodes[$.childNodes.length-1];
return _.nodeType==1?_:GT.U.prevElement(_);
},nextElement:function($){
while(($=$.nextSibling)&&$.nodeType!=1){
}
return $;
},prevElement:function($){
while(($=$.previousSibling)&&$.nodeType!=1){
}
return $;
},getCellIndex:function(_){
if(GT.isIE){
var $=_.parentNode.cells;
for(var B=0,A=$.length;B<A;B++){
if($[B]===_){
return B;
}
}
}
return _.cellIndex;
},insertNodeBefore:function($,_){
if(!$||!_||!_.parentNode){
return null;
}
_.parentNode.insertBefore($,_);
return $;
},insertNodeAfter:function($,_){
_.parentNode.insertBefore($,_.nextSibling);
return $;
},listToMap:function(_){
var $={};
for(var A=0;A<_.length;A++){
$[_[A]]=_[A];
}
return $;
},createSelect:function(A,B,C,_){
_=_||GT.$e("select",C||{});
var $=GT.doc.createDocumentFragment();
GT.$each(A,function(_,C){
var A=GT.$e("option",{"value":C,"text":""+_,innerHTML:_});
if(GT.$chk(B)&&C==B){
A.selected=true;
}
$.appendChild(A);
});
_.appendChild($);
return _;
},createSelectHTML:function(B,D,G){
G=G||{};
var $=G.id?(" id=\""+G.id+"\" "):" ",_=G.className||"",C=G.style?(" style=\""+G.style+"\" "):" ",F=["<select"+$+C+"class=\"gt-input-select "+_+"\">"];
for(var E in B){
var A="";
if((D||D===0)&&E==D){
A=" selected=\"selected\" ";
}
F.push("<option value=\""+E+"\" "+A+">"+B[E]+"</option>");
}
F.push("</select>");
return F.join("");
},getEventTarget:function(A){
var _=null;
try{
_=A.target||A.srcElement;
}
catch($){
return null;
}
return !_?null:(_.nodeType==3?_.parentNode:_);
},stopEvent:function($){
$=$||window.event;
if($){
if($.stopPropagation){
$.stopPropagation();
$.preventDefault();
}else {
$.cancelBubble=true;
$.returnValue=false;
}
}
},addEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.addEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.attachEvent($,D);
}
GT.EventCache.add(_,B,D,false);
return _;
},removeEvent:function(_,B,D,C,A){
if(!D||!_||!B){
return false;
}
if(arguments.length>3){
D=GT.U.bindAsEventListener(D,C,A);
}
if(_.addEventListener){
_.removeEventListener(B,D,false);
}else {
var $=B=="selectstart"?B:"on"+B;
_.detachEvent($,D);
}
GT.EventCache.remove(_,B,D,false);
return _;
},ric3:[],Zdl9:function(){
for(var A=0;A<GT.U.ric3.length;A++){
var _=GT.U.ric3[A];
try{
_.apply(this,arguments);
}
catch($){
}
}
GT.loaded=true;
},onLoad:function(_,$){
$=$||window;
GT.U.ric3.push(_);
if(!GT.U.Zdl9.hasAdd){
GT.U.addEvent($,"load",GT.U.Zdl9);
GT.U.Zdl9.hasAdd=true;
}
},igi0:function(){
return GT.doc.createElement("div");
}(),ica7:function(A,$){
GT.U.igi0.innerHTML="<table><tbody>"+A+"</tbody></table>";
var _=GT.U.igi0.getElementsByTagName("tr")[0];
$.appendChild(_);
GT.U.igi0.innerHTML="";
return _;
},removeNode:function(_){
for(var A=0;A<arguments.length;A++){
var $=arguments[A];
if(!$||!$.parentNode||$.tagName=="BODY"){
return null;
}
GT.EventCache.remove($);
if(GT.isIE){
GT.U.igi0.appendChild($);
GT.U.igi0.innerHTML="";
}else {
$.parentNode.removeChild($);
}
}
},getLastChild:function($){
return $.childNodes[$.childNodes.length-1];
},getPosLeftTop:function($,_){
_=_||window;
var B=$.offsetTop,A=$.offsetLeft;
$=$.offsetParent;
while($&&$!=_){
B+=($.offsetTop-$.scrollTop);
A+=($.offsetLeft-$.scrollLeft);
$=$.offsetParent;
}
return [A,B];
},getPosRight:function($){
return GT.U.getPosLeftTop($)[0]+$.offsetWidth;
},getPosBottom:function($){
return GT.U.getPosLeftTop($)[1]+$.offsetHeight;
},getHeight:function(A,$){
var C=A.offsetHeight||0;
if($!==true){
return C;
}
var B=GT.U.getBorderWidths(A),_=GT.U.getPaddings(A);
return C-B[0]-B[2]-_[0]-_[2];
},getWidth:function(B,_){
var $=B.offsetWidth||0;
if(_!==true){
return $;
}
var C=GT.U.getBorderWidths(B),A=GT.U.getPaddings(B);
return $-C[1]-C[3]-A[1]-A[3];
},getBorderWidths:function($){
return [GT.U.parseInt($.style.borderTopWidth),GT.U.parseInt($.style.borderRightWidth),GT.U.parseInt($.style.borderBottomWidth),GT.U.parseInt($.style.borderLeftWidth)];
},getPaddings:function($){
return [GT.U.parseInt($.style.paddingTop),GT.U.parseInt($.style.paddingRight),GT.U.parseInt($.style.paddingBottom),GT.U.parseInt($.style.paddingLeft)];
},getPageX:function($){
$=$||window.event;
var _=$.pageX;
if(!_&&0!==_){
_=$.clientX||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[0];
}
}
return _;
},getPageY:function($){
$=$||window.event;
var _=$.pageY;
if(!_&&0!==_){
_=$.clientY||0;
if(GT.isIE){
_+=GT.U.getPageScroll()[1];
}
}
return _;
},getPageScroll:function(){
var _=GT.doc.documentElement,$=GT.doc.body;
if(_&&(_.scrollLeft||_.scrollTop)){
return [_.scrollLeft,_.scrollTop];
}else {
if($){
return [$.scrollLeft,_.scrollTop];
}else {
return [0,0];
}
}
},getScroll:function(A){
var $=A,B=GT.doc;
if($==B||$==B.body){
var C=window.pageXOffset||B.documentElement.scrollLeft||B.body.scrollLeft||0,_=window.pageYOffset||B.documentElement.scrollTop||B.body.scrollTop||0;
return [C,_];
}else {
return [$.scrollLeft,$.scrollTop];
}
},getXY:function(F,A){
var H,E,_,B,I=GT.doc.body;
if(F.getBoundingClientRect){
_=F.getBoundingClientRect();
B=GT.U.getScroll(GT.doc);
return [_.left+B[0],_.top+B[1]];
}
var K=0,J=0;
H=F;
A=A||I;
var D=F.style.position=="absolute";
while(H){
K+=H.offsetLeft;
J+=H.offsetTop;
if(!D&&H.style.position=="absolute"){
D=true;
}
if(GT.isGecko){
E=H;
var C=parseInt(E.style.borderTopWidth,10)||0,G=parseInt(E.style.borderLeftWidth,10)||0;
K+=G;
J+=C;
if(H!=F&&E.style.overflow!="visible"){
K+=G;
J+=C;
}
}
H=H.offsetParent;
}
if(GT.isSafari&&D){
K-=I.offsetLeft;
J-=I.offsetTop;
}
if(GT.isGecko&&!D){
var $=I;
K+=parseInt($.style.borderTopWidth,10)||0;
J+=parseInt($.style.borderTopWidth,10)||0;
}
H=F.parentNode;
while(H&&H!=I){
if(!GT.isOpera||(H.tagName.toUpperCase()!="TR"&&H.style.display!="inline")){
K-=H.scrollLeft;
J-=H.scrollTop;
}
H=H.parentNode;
}
return [K,J];
},setXY:function($,A){
if($.style.position=="static"){
$.style.position="relative";
}
var _=GT.U.gpn0($,A);
if(A[0]!==false){
$.style.left=_.left+"px";
}
if(A[1]!==false){
$.style.top=_.top+"px";
}
},gpn0:function(_,E,D){
if(typeof E=="object"||E instanceof Array){
D=E[1];
E=E[0];
}
var A=_.style.position,B=GT.U.getXY(_),C=parseInt(_.style.left,10),$=parseInt(_.style.top,10);
if(isNaN(C)){
C=(A=="relative")?0:_.offsetLeft;
}
if(isNaN($)){
$=(A=="relative")?0:_.offsetTop;
}
return {left:(E-B[0]+C),top:(D-B[1]+$)};
},getContentWidthHeight:function(A){
var _=GT.U.parseInt(A.style.marginLeft),B=GT.U.parseInt(A.style.marginRight),D=GT.U.parseInt(A.style.paddingLeft),C=GT.U.parseInt(A.style.paddingRight),$=A.clientWidth-D-C,E=A.clientHeight;
return [$,E];
},getPixelValue:function(A,_){
if(GT.$type(A,"number")){
return A;
}
A=""+A;
var $=GT.U.parseInt(A);
if(A.indexOf("%")>1){
return _*$/100;
}
return $;
},setValue:function(_,C){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
A=(""+A).toUpperCase();
switch(A){
case "SELECT":
var $=[].concat(C),B=null;
GT.$each(_.options,function(C,A){
if(A===0){
B=C;
}
C.selected=false;
if(_.multiple){
GT.$each($,function($){
C.selected=C.value==$;
});
}else {
if(C.value==$[0]){
C.selected=true;
B=false;
}
}
});
if(!_.multiple&&B){
B.selected=true;
}
return (_.multiple)?$:$[0];
case "INPUT":
if(_.type=="checkbox"||_.type=="radio"){
_.checked=_.value==C;
break ;
}
case "TEXTAREA":
_.value=C;
}
return null;
},getValue:function(_){
_=GT.$(_);
if(!_){
return ;
}
var A=_.tagName;
switch(A){
case "SELECT":
var $=[];
GT.$each(_.options,function(_){
if(_.selected){
$.push(_.value);
}
});
$=(_.multiple)?$:$[0];
if(($===null||$===undefined)&&_.options[0]){
$=_.options[0].value;
}
return $;
case "INPUT":
if((_.type=="checkbox"||_.type=="radio")&&!_.checked){
break ;
}
case "TEXTAREA":
return _.value;
}
return null;
},setOpacity:function($,_){
_=_>1?1:(_<0?0:_);
if(!$.currentStyle||!$.currentStyle.hasLayout){
$.style.zoom=1;
}
if(GT.isIE){
$.style.filter=(_==1)?"":"alpha(opacity="+_*100+")";
}
$.style.opacity=_;
if(_===0){
if($.style.visibility!="hidden"){
$.style.visibility="hidden";
}
}else {
if($.style.visibility!="visible"){
$.style.visibility="visible";
}
}
return $;
},replaceAll:function(exstr,ov,value){
var gc=GT.U.escapeRegExp(ov);
if(!GT.$chk(gc)||gc===""){
return exstr;
}
var rep="/"+gc+"/gm",r=null,cmd="r=exstr.replace("+rep+","+GT.U.escapeString(value)+")";
eval(cmd);
return r;
},trim:function(_,$){
if(!_||!_.replace||!_.length){
return _;
}
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},escapeRegExp:function($){
return !$?""+$:(""+$).replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
},escapeString:function($){
return $===""?"''":(!$?""+$:("\""+(""+$).replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"));
},bind:function(A,_,$){
$=[].concat($);
return function(){
return A.apply(_||A,GT.U.merge(GT.$A(arguments),$));
};
},bindAsEventListener:function(A,_,$){
return function(B){
B=B||window.event;
return A.apply(_||A,[GT.$event(B)].concat($));
};
},trim:function(_,$){
var A=($>0)?(/^\s+/):($<0)?(/\s+$/):(/^\s+|\s+$/g);
return _.replace(A,"");
},xZs1:function($){
return GT.U.trim($.replace(/\s{2,}/g," "));
},contains:function($,_,A){
return GT.U.indexOf($,_,A)!=-1;
},merge:function(A,C,$){
var _=A.length<C.length?A.length:C.length;
if($){
for(var D=0,B=_;D<B;D++){
A[D]=C[D];
}
}
for(D=_,B=C.length;D<B;D++){
A[D]=C[D];
}
return A;
},each:function($,A,_){
return GT.$each($,A,_);
},indexOf:function($,_,B){
var A=$.length;
for(var C=(B<0)?Math.max(0,A+B):B||0;C<A;C++){
if($[C]===_){
return C;
}
}
return -1;
},remove:function($,_,B){
var C=0,A=$.length;
while(C<A){
if($[C]===_){
$.splice(C,1);
if(!B){
return $;
}
A--;
}else {
C++;
}
}
return $;
},next:function(_,A){
var $=GT.U.indexOf(_,A);
if($<0){
return null;
}
return _[$+1];
},previous:function(_,A){
var $=GT.U.indexOf(_,A);
if($<1){
return null;
}
return _[$-1];
},nce6:function($,_){
_=_||GT.doc;
var A=_.createElement("style");
A.id=$;
var B=_.getElementsByTagName("head")[0];
B&&B.appendChild(A);
return A;
},getCheckboxState:function($,_){
var A={};
for(var B=0;B<$.length;B++){
if($[B].name==_&&$[B].checked){
A[$[B].value]=$[B].checked;
}
}
return A;
}};
GT.Util=GT.Utils;
GT.U=GT.Utils;
GT.Utils.CSS=function(){
var $=null;
return {nce6:function(C,$,A){
var D;
A=A||GT.doc;
var B=A.getElementsByTagName("head");
if(!B||B.length<1){
A.documentElement.insertBefore(A.createElement("head"),A.body);
B=A.getElementsByTagName("head");
}
var E=B[0],F=A.createElement("style");
F.setAttribute("type","text/css");
if($){
F.setAttribute("id",$);
}
if(GT.isIE){
E.appendChild(F);
D=F.styleSheet;
D.cssText=C;
}else {
try{
F.appendChild(A.createTextNode(C));
}
catch(_){
F.cssText=C;
}
E.appendChild(F);
D=F.styleSheet?F.styleSheet:(F.sheet||A.styleSheets[A.styleSheets.length-1]);
}
this.cacheStyleSheet(D);
return D;
},getRules:function(_,A){
A=A||GT.doc;
if(!$||_){
$={};
var C=A.styleSheets;
for(var D=0,B=C.length;D<B;D++){
this.cacheStyleSheet(C[D]);
}
}
return $;
},getRule:function(_,$){
var A=this.getRules($);
return A[_.toLowerCase()];
},updateRule:function($,B,A){
var _=this.getRule($);
if(_){
_.style[B]=A;
}
},cacheStyleSheet:function(A){
$=$||{};
try{
var B=A.cssRules||A.rules;
for(var C=B.length-1;C>=0;--C){
$[B[C].selectorText.toLowerCase()]=B[C];
}
}
catch(_){
}
}};
}();
GT.$event=function($){
$=$||window.event;
return $;
};
GT.EventCache=(function(){
var A=[],_=[],B={};
function $($){
return ""+$+"_"+$.id;
}
return {add:function($,D,E){
if(!$){
return ;
}
if(!GT.U.contains(A,arguments)){
A.push(arguments);
}
var C=GT.U.indexOf(_,$),F=C+"_"+$+"_"+$.id;
if(C<0){
F=_.length+"_"+$+"_"+$.id;
_.push($);
B[F]={};
}
B[F][D]=B[F][D]||[];
if(!GT.U.contains(B[F][D],E)){
B[F][D].push(E);
}
},remove:function($,C,D){
if(!$){
return ;
}
var A=GT.U.indexOf(_,$),E=A+"_"+$+"_"+$.id;
if(A<0||!B[E]){
return ;
}
if(!C){
B[E]=null;
_[A]=null;
return ;
}
if(!D&&B[E][C]){
B[E][C]=null;
delete B[E][C];
}
if(B[E][C]){
B[E][C].remove(D);
}
},ega1:function(){
var _,$;
for(_=A.length-1;_>=0;_=_-1){
$=A[_];
GT.EventCache.remove($[0]);
if($[0].removeEventListener){
$[0].removeEventListener($[1],$[2],$[3]);
}
if($[1].substring(0,2)!="on"){
$[1]="on"+$[1];
}
if($[0].detachEvent){
$[0].detachEvent($[1],$[2]);
}
$[0][$[1]]=null;
delete A[_];
}
window.CollectGarbage&&CollectGarbage();
}};
})();
GT.initGlobalEvent=function(){
if(GT.initGlobalEvent.inited){
return ;
}
var $=GT.isIE?GT.doc.body:GT.doc;
GT.U.addEvent($,"mousemove",function($){
GT.activeGrid&>.Grid.IRe8($,GT.activeGrid);
});
GT.U.addEvent($,"mouseup",function($){
GT.activeGrid&>.Grid.gsO6($,GT.activeGrid);
});
GT.U.addEvent($,"click",function($){
GT.activeGrid&&(GT.activeGrid.saa5()||GT.activeGrid.closeGridMenu());
});
GT.U.addEvent($,"keydown",function($){
GT.activeGrid&>.activeGrid.ees6($);
});
GT.initGlobalEvent.inited=true;
};
GT.FunctionCache={};
GT.$invoke=function(B,_,$){
B=B||window;
var A=B[_]||GT.$getFunction(_);
if(typeof (A)=="function"){
return A.apply(B,$||[]);
}
};
GT.$getFunction=function($){
return GT.FunctionCache[$];
};
GT.$callFunction=function($,_){
GT.$invoke(null,$,_);
};
GT.$putFunction=function($,_){
GT.FunctionCache[$]=_;
};
GT.$removeFunction=function($){
GT.FunctionCache[$]=null;
delete GT.FunctionCache[$];
};
GT.U.onLoad(function(){
GT.U.addEvent(window,"unload",GT.EventCache.ega1);
});
GT.AjaxDefault={paramName:"_gt_json"};
GT.Ajax=GT.$class({XtX0:function(){
return {method:"post",jsonParamName:GT.AjaxDefault.paramName,async:true,urlEncoded:true,encoding:null,mimeType:null,beforeSend:GT.$empty,onComplete:GT.$empty,onSuccess:GT.$empty,onFailure:GT.$empty,onCancel:GT.$empty,xhr:"",url:"",data:"",paramType:"jsonString",headers:{"X-Requested-With":"XMLHttpRequest","Accept":"text/javascript, text/html, application/xml,application/json, text/xml, */*"},autoCancel:false,evalScripts:false,evalResponse:false,responseContentType:"",dataUrl:false,parameters:null};
},setParameters:function($){
this.parameters=$;
},rmm5:function(_){
_=_||{};
if(GT.$type(_)=="string"){
_={url:_};
}
if(!(this.xhr=this.getXHR())){
return ;
}
var $=GT.$extend(this.headers,_.headers);
GT.$extend(this,_);
if(this.mimeType){
$["X-Response-MimeType"]=this.mimeType;
}
this.headers=$;
},send:function(I){
this.running=true;
if(GT.$type(I)=="string"){
I={data:I};
}
I=GT.$extend({data:this.data,url:this.url,method:this.method},I);
var C=I.data,H=I.url,D=String(I.method).toLowerCase();
if(GT.$invoke(this,"beforeSend",[this.xhr,C])===false){
return this;
}
if(this.urlEncoded&&D=="post"){
var B=(this.encoding)?"; charset="+this.encoding:"";
this.setHeader("Content-type","application/x-www-form-urlencoded"+B);
}
switch(GT.$type(C)){
case "object":
if(this.paramType=="jsonString"){
var F=GT.toJSONString(C);
C={};
C[this.jsonParamName]=F;
}
C=GT.toQueryString(C);
break ;
}
var E;
if(this.parameters&>.$type(this.parameters,"object")){
E=GT.toQueryString(this.parameters);
}else {
if(GT.$type(this.parameters,"string")){
E=this.parameters;
}
}
if(E&>.$type(C,"string")){
C=C+"&"+E;
}
if(D=="post"){
var _=H.indexOf("?");
if(_>=0){
C=H.substring(_+1)+"&"+C;
H=H.substring(0,_);
}
}else {
if(C&&(D=="get"||this.dataUrl)){
H=H+(H.indexOf("?")>=0?"&":"?")+C;
C=null;
}
}
var A=this;
this.xhr.open(D.toUpperCase(),H,this.async);
this.xhr.onreadystatechange=function(){
return A.onStateChange.apply(A,arguments);
};
for(var G in this.headers){
try{
this.xhr.setRequestHeader(G,this.headers[G]);
}
catch($){
}
}
this.xhr.send(C);
if(!this.async){
this.onStateChange();
}
return this;
},onStateChange:function(){
if(this.xhr.readyState!=4||!this.running){
return ;
}
this.running=false;
this.status=0;
try{
this.status=this.xhr.status;
}
catch($){
}
this.onComplete();
if(this.isSuccess()){
this._onSuccess();
}else {
this._onFailure();
}
this.xhr.onreadystatechange=GT.$empty;
},isScript:function(){
return (/(ecma|java)script/).test(this.getHeader("Content-type"));
},isSuccess:function(){
var $=this.xhr.status;
return (($>=200)&&($<300));
},_onSuccess:function(){
this.response={"text":this.xhr.responseText,"xml":this.xhr.responseXML};
this.onSuccess(this.response);
},_onFailure:function($){
this.onFailure(this.xhr,$);
},setHeader:function($,_){
this.headers[$]=_;
return this;
},getHeader:function(_){
try{
return this.xhr.getResponseHeader(_);
}
catch($){
return null;
}
},getXHR:function(){
return (window.XMLHttpRequest)?new XMLHttpRequest():((window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):false);
},cancel:function(){
if(!this.running){
return this;
}
this.running=false;
this.xhr.abort();
this.xhr.onreadystatechange=GT.$empty;
this.xhr=this.getXHR();
this.onCancel();
return this;
}});
GT.JSON={encode:function(A,$,B){
var _,C=B?"\n":"";
switch(GT.$type(A)){
case "string":
return "\""+A.replace(/[\x00-\x1f\\"]/g,GT.JSON.fcs0)+"\"";
case "array":
_=[];
GT.$each(A,function(D,A){
var C=GT.JSON.encode(D,$,B);
if(C||C===0){
_.push(C);
}
});
return "["+C+(B?_.join(","+C):_)+"]"+C;
case "object":
if(A===null){
return "null";
}
_=[];
GT.$each(A,function(C,D){
if(!$||D.indexOf($)!=0){
var A=GT.JSON.encode(C,$,B);
if(A){
_.push(GT.JSON.encode(D,$,B)+":"+A);
}
}
},null,$);
return "{"+C+(B?_.join(","+C):_)+C+"}"+C;
case "number":
case "boolean":
return String(A);
}
return null;
},decode:function(string,secure){
if(!GT.$type(string,"string")||!string.length){
return null;
}
if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){
return null;
}
return eval("("+string+")");
},tae5:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},fcs0:function($){
return GT.JSON.tae5[$]||"\\u00"+Math.floor($.charCodeAt()/16).toString(16)+($.charCodeAt()%16).toString(16);
}};
GT.toQueryString=function(_){
if(!_||GT.$type(_,"string","number")){
return _;
}
var $=[];
for(var B in _){
var A=_[B];
if(GT.$type(A,"object","array")){
A=GT.toJSONString(A);
}
$.push(encodeURIComponent(B)+"="+encodeURIComponent(A));
}
return $.join("&");
};
GT.toJSONString=function($,_){
return GT.JSON.encode($,"__gt_",_);
};
GT.Const.DataSet={KEY:"__gt_ds_key__",INDEX:"__gt_ds_index__",ROW_KEY:"__gt_row_key__",NOT_VAILD:"__gt_no_valid__",SN_FIELD:"__gt_sn__",SORT_VALUE:"__gt_sort_value__",SORT_S:"__gt_"};
GT.DataSetDefault={SEQUENCE:0,uniqueField:GT.Const.DataSet.SN_FIELD,recordType:"object",recordXpath:null,dataXML:null,currentBegin:0,cursor:0,startRecordNo:0,cacheData:false,cacheModifiedData:true,modified:false,XtX0:function(){
return {fields:[],fieldsName:[],fieldsMap:{},fieldsInfo:{},data:null,sXa7:[],Xxy6:null,additional:[],sortInfo:[],queryInfo:[],reocrdIndex:{},updatedRecords:{},nsu0:{},updatedFields:{},insertedRecords:{},deletedRecords:{},mef2:GT.$empty,LSa1:GT.$empty};
},rmm5:function($){
GT.$extend(this,$);
this.recordType=this.recordType||"object";
this.fields&&this.Lgs7(this.fields);
this.data&&this.gso6(this.data);
},initValues:GT.$empty,isEqualRecord:function(_,A){
for(var $ in this.fieldsInfo){
if(_[$]!==A[$]){
return false;
}
}
return true;
},xZs1:function($){
if(!this.cacheData||$===true){
this.data=null;
this.currentBegin=0;
this.sXa7=[];
}
this.cleanModifiedData();
},cleanModifiedData:function($){
if(!this.cacheModifiedData||$){
this.updatedRecords={};
this.nsu0={};
this.updatedFields={};
this.insertedRecords={};
this.deletedRecords={};
}
},gso6:function($){
if(!$){
return false;
}
this.xZs1();
return this.lgo1($);
},Lgs7:function(C){
this.fields=C;
this.fieldsName=[];
var A=null;
for(var B=0,_=this.fields.length;B<_;B++){
var $=this.fields[B]||{};
if(GT.$type($,"string")){
$={name:$};
}
$.name=$.name||String(B);
$.type=$.type||"string";
$.index=$.index||(this.getRecordType()=="array"?B:$.name);
if($.initValue){
A=A||{};
A[$.index]=$.initValue;
}
this.fieldsMap[$.name]=$;
this.fieldsInfo[$.index]=$;
this.fieldsName[B]=$.name;
}
if(A){
this.initValues=(function($){
return function(C,A,B){
for(var _ in $){
C[_]=$[_](C,A,B);
}
};
})(A);
}else {
this.initValues=GT.$empty;
}
},lgo1:function(A){
if(!A){
return false;
}
this.data=this.data||[];
var $=this;
for(var C=0,B=A.length;C<B;C++){
var _=A[C];
_[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.data.push(_);
this.sXa7.push(this.currentBegin++);
this.initValues(_,C,this);
}
return true;
},getDataProxySize:function(){
return this.sXa7.length;
},resetDataProxy:function(_){
this.sXa7=[];
_=_||this.getSize();
for(var $=0;$<_;$++){
this.sXa7[$]=$;
}
},loadData:function($){
if($){
return gso6($.load());
}
},Zls1:function($){
if($&&this.recordType!=$){
this.recordType=$;
this.Lgs7(this.fields);
}
},getRecord:function($){
return this.data?this.data[this.sXa7[$]]:null;
},getDataRecord:function($){
return this.dataset.data[$];
},setValueByName:function($,B,A){
var _=this.fieldsMap[B].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
$[_]=A;
},getValueByName:function($,A){
var _=this.fieldsMap[A].index;
if(GT.$type($,"number")){
$=this.getRecord($);
}
return $[_];
},getFields:function(){
},getRecordType:function(_,$){
this.recordType=_||this.recordType;
if(!GT.$type(this.recordType,"string")&&(this.data&&this.getSize()>0)){
$=this.data[0];
if(GT.$type($,"array")){
this.recordType="array";
}else {
this.recordType="object";
}
}
return this.recordType;
},filterCheck:{equal:function($,_){
return $==_;
},notEqual:function($,_){
return $!=_;
},less:function($,_){
return $<_;
},great:function($,_){
return $>_;
},lessEqual:function($,_){
return $<=_;
},greatEqual:function($,_){
return $>=_;
},like:function($,_){
return (""+$).indexOf(_+"")>=0;
},startWith:function($,_){
return (""+$).indexOf(_+"")===0;
},endWith:function($,_){
$=$+"";
_=_+"";
return $.indexOf(_)==$.length-_.length;
}},filterData:function(_){
var $=this,A=[];
_=[].concat(_);
GT.$each(this.data,function(C,E){
var F=true;
for(var J=0,H=_.length;J<H;J++){
var D=$.fieldsMap[_[J].fieldName].index,G=_[J].value,I=_[J].logic,B=C[D];
F=$.filterCheck[I](B,G);
if(!F){
break ;
}
}
if(F){
A.push(E);
}
});
return A;
},oeo6:function($){
var _=$[GT.Const.DataSet.SN_FIELD]=this.SEQUENCE++;
this.insertedRecords[_]=$;
GT.$invoke(this,"mef2",[$]);
this.modified=true;
},updateRecord:function($,F,C){
if(GT.$type($,"number")){
$=this.data[$];
}
var B=$[GT.Const.DataSet.SN_FIELD],A=$[this.uniqueField],E=this.fieldsMap[F].type,_=this.fieldsMap[F].index,D;
if(!this.insertedRecords[B]){
this.nsu0[A]=this.nsu0[A]||{};
this.nsu0[A][_]=$[_];
this.nsu0[A][this.uniqueField]=A;
this.updatedRecords[A]=$;
}
if(this.insertedRecords[B]||GT.$invoke(this,"LSa1",[$,F,C])!==false){
if(E=="int"){
C=parseInt(C);
C=isNaN(C)?"":C;
}else {
if(E=="float"){
C=parseFloat(C);
C=isNaN(C)?"":C;
}else {
C=GT.$chk(C)?String(C):"";
}
}
this.updatedFields[A]=this.updatedFields[A]||{};
this.updatedFields[A][_]=C;
this.updatedFields[A][this.uniqueField]=A;
$[_]=C;
this.modified=true;
}
},undeleteRecord:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
this.deletedRecords[_]=null;
delete this.deletedRecords[_];
}
},Oae4:function(D){
var B=-1,$,C;
if(GT.$type(D,"number")){
B=D;
if(B>=0){
C=this.sXa7[B];
$=this.data[C];
}
}else {
if(D&&(GT.$type(D,"object")||GT.$type(D,"array"))){
$=D;
}
}
if($){
var A=$[GT.Const.DataSet.SN_FIELD],_=$[this.uniqueField];
if(this.insertedRecords[A]){
delete this.insertedRecords[A];
}else {
if(this.updatedRecords[_]){
delete this.updatedRecords[_];
delete this.nsu0[_];
}
this.deletedRecords[_]=$;
this.modified=true;
}
}
},addUniqueKey:function($){
},isInsertedRecord:function($){
return $&&this.insertedRecords[$[GT.Const.DataSet.SN_FIELD]]==$;
},Zxn5:function($){
return $&&this.deletedRecords[$[this.uniqueField]]==$;
},isUpdatedRecord:function($){
return $&&this.updatedRecords[$[this.uniqueField]]==$;
},sortFunction:null,negative:function($){
return function(A,_){
return 0-$(A,_);
};
},sort:function(J){
var D=[].concat(J),I=[];
for(var C=0;C<D.length;C++){
var G=D[C];
if(G){
var E,B,$,H=G.sortOrder.indexOf("def")===0;
if(!G.sortOrder||H){
$=GT.Const.DataSet.SN_FIELD;
B="int";
}else {
E=this.fieldsMap[G.fieldName];
if(E){
$=E.index;
B=E.type;
}
}
I.push(!H&&G.sortFn?G.sortFn:this.getSortFuns($,G.sortOrder,B,G.getSortValue));
}
}
var F=this,_=I.length,A=function(B,A){
var C=F.data[B],E=F.data[A];
for(var G=0;G<_;G++){
var $=I[G](C,E,D[G].sortOrder);
if($!=0){
return $;
}
}
return 0;
};
this.sXa7.sort(A);
},getSortFuns:function(D,B,E,F){
var $=this,A=GT.Const.DataSet.SORT_VALUE,C={};
compSort=this.sortFunction;
if(!compSort){
var _=F&&B.indexOf("def")!=0?function(_){
var A=_[D],$=F(A,_);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
}:function(_){
var A=_[D],$=GT.U.convert(A,E);
C[_[GT.Const.DataSet.SN_FIELD]]=$;
return $;
};
compSort=B=="desc"?function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?1:($>A?-1:0);
}:function(B,D){
var $=C[B]||_(B),A=C[D]||_(D);
return $<A?-1:($>A?1:0);
};
}
return compSort;
},query:function($,_,B,A){
},getSize:function(){
return !this.data?-1:this.data.length;
},getFieldsNum:function(){
return this.fields.length;
},sum:function($){
},avg:function($){
}};
GT.DataSet=GT.$class(GT.DataSetDefault);
if(!GT.Template){
GT.Template={};
}
GT.$extend(GT.Template,{Grid:{main:function(_){
var $=_.id,A=[_.toolbarPosition=="top"||_.toolbarPosition=="t"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box gt-toolbar-box-top\" ></div>":"","<div id=\""+$+"_viewport\" class=\"gt-viewport"+(_.simpleScrollbar?" gt-simple-scrollbar":"")+"\" >","<div id=\""+$+"_headDiv\" class=\"gt-head-div\"><div class=\"gt-head-wrap\" ></div>","<div id=\""+$+"_columnMoveS\" class=\"gt-column-moveflag\"></div>","<div id=\""+$+"_headerGhost\" class=\"gt-head-ghost\"></div>","</div>","<div id=\""+$+"_bodyDiv\" class=\"gt-body-div\"></div>","<div id=\""+$+"_freeze_headDiv\" class=\"gt-freeze-div\" ></div>","<div id=\""+$+"_freeze_bodyDiv\" class=\"gt-freeze-div\" ></div>","</div>",_.toolbarPosition=="bottom"||_.toolbarPosition=="b"?"<div id=\""+$+"_toolBarBox\" class=\"gt-toolbar-box\" ></div>":"","<form id=\""+$+"_export_form\" target=\""+$+"_export_iframe\" style=\"width:0px;height:0px;margin:0px;padding:0xp\" method=\"post\" width=\"0\" height=\"0\" >","<textarea id=\""+$+"_export_form_textarea\" name=\"\" style=\"width:0px;height:0px;display:none;\" ></textarea>","</form>","<iframe id=\""+$+"_export_iframe\" name=\""+$+"_export_iframe\" scrolling=\"no\" style=\"width:0px;height:0px;\" width=\"0\" height=\"0\" border=\"0\" frameborder=\"0\" >","</iframe>","<div id=\""+$+"_separateLine\" class=\"gt-split-line\"></div>","<div id=\""+$+"_mask\" class=\"gt-grid-mask\" >","<div id=\""+$+"_waiting\" class=\"gt-grid-waiting\">","<div class=\"gt-grid-waiting-icon\"></div><div class=\"gt-grid-waiting-text\">"+_.getMsg("WAITING_MSG")+"</div>","</div>","<div class=\"gt-grid-mask-bg\">","</div>","</div>"];
return A.join("\n");
},icS3:function(B,$,_){
var A=GT.$e("td",{className:$.styleClass,columnId:$.id}),C=$.hdRenderer($.header,$,B);
$.title=$.title||$.header||"";
C=(!C||GT.U.trim(C)=="")?" ":C;
if(_){
A.style.height="0px";
}
A.innerHTML=["<div class=\"gt-inner"+($.hdAlign?" gt-inner-"+$.hdAlign:"")+"\" ",_?"style=\"padding-top:0px;padding-bottom:0px;height:1px;\" ":"","unselectable=\"on\" title=\""+$.title+"\" >","<span>",C,"</span>",_?"":GT.T_G.hdToolHTML,"</div>"].join("");
return A;
},hdToolHTML:"<div class=\"gt-hd-tool\" ><span class=\"gt-hd-icon\"></span><span class=\"gt-hd-button\"></span><span class=\"gt-hd-split\"></span></div>",bodyTableStart:function($){
return ["<table ",$?"id=\""+$+"\" ":"","class=\"gt-table\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>"].join("");
},tableStartHTML:"<table class=\"gt-table\" style=\"margin-left:0px\" cellSpacing=\"0\" cellPadding=\"0\" border=\"0\" ><tbody>",tableEndHTML:"</tbody></table>",rowStart:function($,A,_){
return GT.T_G.rowStartS($,A)+">\n";
},rowStartS:function($,_){
return ["<tr class=\"gt-row",(_%2==0?$.evenRowCss:""),"\" ",GT.Const.DataSet.INDEX,"=\"",_,"\" "].join("");
},rowEndHTML:"</tr>\n",innerStart:function($){
return ["<div class=\"gt-inner "+($.align?" gt-inner-"+$.align+" ":"")+($.styleClass?(" "+$.styleClass):""),"\" >"].join("");
},cellStartHTML:"<td ><div class=\"gt-inner\" >",cellEndHTML:"</div></td>",cell:function($,_,A){
return ["<td "+$.cellAttributes,_||""," class=\""+$.styleClass+"\" >",$.innerStartHTML,A,"</div></td>",].join("");
},gid6:function($,_){
return (GT.Const.Grid.COL_T_CLASSNAME+$.id+"-"+_).toLowerCase();
},freezeBodyCell:function(D,C,_,A){
var F=C+D.xlg1,$=C+D.Lxn2,E="style=\"width:"+$+"px;\"";
_=_||" ";
var B=GT.$e("td",{style:{width:F+"px"},innerHTML:"<div class=\""+(A?"gt-hd-inner":"gt-inner")+"\" "+E+">"+_+"</div>"});
return B;
},fss6:function(A,_,$){
return this.freezeBodyCell(A,_,$,true);
}},Dialog:{create:function(C){
var $=C.domId,A=C.gridId,B=GT.$chk(C.imm1)?C.imm1:true,_=C.title||"Dialog";
return ["<div class=\"gt-dialog-head\" >","<div class=\"gt-dialog-head-icon\"> </div>","<div id=\""+$+"_dialog_title\" class=\"gt-dialog-head-text\" >"+_+"</div>","<div class=\"gt-dialog-head-button\" >",B?"<a href=\"#\" onclick=\"GT.$grid('"+A+"').closeDialog();return false;\"> </a>":"","</div>","</div><div id=\""+$+"_dialog_body\" class=\"gt-dialog-body\"></div>"].join("");
},XOo3:["<select class=\"gt-input-select\">","<option value=\"equal\">=</option>","<option value=\"notEqual\">!=</option>","<option value=\"less\"><</option>","<option value=\"great\">></option>","<option value=\"lessEqual\"><=</option>","<option value=\"greatEqual\" >>=</option>","<option value=\"like\" >like</option>","<option value=\"startWith\">startWith</option>","<option value=\"endWith\">endWith</option>","</select>"].join("")}});
GT.T_G=GT.Template.Grid;
GT.T_C=GT.Template.Column;
GT.T_D=GT.Template.Dialog;
if(!window.GT){
window.GT={};
}
GT_GRID_VER="GT-Grid 1.0";
GT.WidgetCache={};
GT.GridCache={};
GT.GridNum=0;
GT.activeGrid=null;
GT.$widget=function($){
return GT.$type($,"string")?GT.WidgetCache[$]:$;
};
GT.$grid=function($){
$=$||GT.Const.Grid.DEFAULT_ECG_ID;
return GT.$type($,"string")?GT.GridCache[$]:$;
};
GT.GridDefault={defaultId:GT.Const.Grid.DEFAULT_ECG_ID,defaultWidth:"100%",defaultHeight:"100%",defaultColumnWidth:70,language:"default",skin:"default",defaultConst:["action","recordType","exportType","exportFileName","exception","parameters","queryParameters","data","pageInfo","filterInfo","sortInfo","columnInfo","fieldsName","insertedRecords","updatedRecords","updatedFields","deletedRecords","success","succeedData","failedData"],dataRoot:null,dataPageInfo:null,dataException:null,formid:null,isNative:false,loadURL:null,saveURL:null,exportURL:null,exportType:null,exportFileName:null,sortInfo:null,editable:true,resizable:false,showGridMenu:false,showIndexColumn:false,allowCustomSkin:false,allowFreeze:false,allowHide:false,allowGroup:false,allowResizeColumn:true,simpleScrollbar:true,scrollbarClass:null,monitorResize:false,stripeRows:true,lightOverRow:true,evenRowCss:"gt-row-even",syncCheckColumn:false,clickStartEdit:true,remotePaging:true,remoteSort:false,remoteFilter:false,remoteGroup:false,autoUpdateSortState:true,autoUpdateEditState:true,autoUpdateGroupState:true,autoUpdateFreezeState:true,autoSelectFirstRow:true,autoEditNext:false,submitUpdatedFields:false,autoSaveOnNav:false,reloadAfterSave:true,recountAfterSave:true,recount:false,showEditTool:true,showAddTool:true,showDelTool:true,showSaveTool:true,showReloadTool:true,showPrintTool:true,showFilterTool:true,showChartTool:true,showPageState:true,transparentMask:false,justShowFiltered:true,toolbarPosition:"bottom",toolbarContent:"nav | goto | pagesize | reload | add del save | print | filter chart | state",width:null,height:null,minWidth:50,minHeight:50,singleSelect:false,dataRoot:"data",multiSort:false,multiGroup:false,GTGridPath:"../../gt-grid",XtX0:function(){
return {skinList:[{text:this.getMsg("STYLE_NAME_DEFAULT"),value:"default"},{text:this.getMsg("STYLE_NAME_CHINA"),value:"china"},{text:this.getMsg("STYLE_NAME_VISTA"),value:"vista"},{text:this.getMsg("STYLE_NAME_MAC"),value:"mac"}],encoding:null,mimeType:null,jsonParamName:null,title:null,lastAction:null,ajax:null,autoExpandColumn:null,autoColumnWidth:false,cellWidthPadding:GT.isBoxModel?0:4,cellHeightPadding:GT.isBoxModel?0:2,xlg1:GT.isBoxModel?0:0,Lxn2:GT.isBoxModel?0:-4,freezeFixH:GT.isBoxModel?0:0,freezeFixW:GT.isIE?-1:-2,toolbarHeight:24,xBh4:0,snn6:0,freezeColumns:0,mnr4:0,defaultRecord:null,isWaiting:false,znn2:false,requesting:false,hasGridDivTemp:false,igs6:-1,moveColumnDelay:800,mouseDown:false,gridDiv:null,gridForm:null,viewport:null,headDiv:null,headTable:null,headFirstRow:null,bodyDiv:null,bodyFirstRow:null,footDiv:null,footTable:null,footFirstRow:null,headerGhost:null,columnMoveS:null,freezeHeadDiv:null,freezeHeadTable:null,freezeBodyDiv:null,freezeBodyTable:null,titleBar:null,waitingBar:null,nearPageBar:null,toolBar:null,separateLine:null,gridGhost:null,resizeButton:null,activeCell:null,activeRow:null,activeRecord:null,activeEditor:null,activeDialog:null,lastOverHdCell:null,scrollLeft:0,scrollTop:0,ads6:0,onComplete:GT.$empty,onResize:GT.$empty,beforeSelectRow:GT.$empty,afterSelectRow:GT.$empty,onClickHead:GT.$empty,onClickCell:GT.$empty,onDblClickCell:GT.$empty,beforeEdit:GT.$empty,afterEdit:GT.$empty,beforeSave:GT.$empty,beforeLoad:GT.$empty,Ilb6:GT.$empty,Obi2:GT.$empty,LSa1:GT.$empty,beforeInsert:GT.$empty,afterInsert:GT.$empty,beforeUpdate:GT.$empty,afterUpdate:GT.$empty,beforeDelete:GT.$empty,afterDelete:GT.$empty,renderRow:GT.$empty,editing:false,isFirstLoad:true,printCssText:null,gridTable:null,gridTbodyList:[],gridRowList:[],gridFreezeRowList:[],checkedRows:{},rowBegin:0,rowNum:0,rowEnd:0,currentRowNum:0,defaultPageInfo:{pageSize:0,pageNum:0,totalRowNum:0,totalPageNum:0,startRowNum:0,endRowNum:0},countTotal:true,pageSize:0,defaultPageSize:20,filterDataProxy:null,Xxy6:null,cacheData:[],dataset:null,selectedRows:[],overRow:null,cacheBodyList:[],frozenColumnList:[],sortedColumnList:[],pageSizeList:[],columns:[],columnList:[],columnMap:{},CONST:null,container:null,ghost:null,queryParameters:{},parameters:{}};
},sSn3:function(){
GT.activeGrid=this;
},clearCheckedRows:function($){
this.checkedRows={};
if($){
this.refresh();
}
},rmm5:function(_,G){
GT.GridNum++;
var E={};
GT.$each(this.defaultConst,function($,_){
E[$]=$;
});
this.id=""+_;
G=G||{};
if(GT.$type(_,"object")){
G=_;
this.id="gtgrid_"+GT.GridNum;
}
GT.$extend(E,G.CONST);
GT.$extend(this,G);
this.CONST=E;
var B=GT.$clone(this.defaultPageInfo);
this.pageInfo=GT.$extend(B,this.pageInfo);
this.pageInfo.pageSize=this.pageInfo.pageSize||this.pageSize;
this.pageSize=this.pageInfo.pageSize;
this.id=this.id||this.defaultId;
this.gridId=this.id;
this.rowKey="__gt_"+this.id+"_r_";
GT.GridCache[this.id]=this;
if(!this.dataset&&this.columns){
var D={fields:[]};
for(var C=0;C<this.columns.length;C++){
var A=this.columns[C],$={name:A.name||A.fieldName||A.id,type:A.type,index:(A.fieldIndex||A.fieldIndex===0)?A.fieldIndex:null};
D.fields.push($);
}
this.dataset=D;
}
if(this.dataset&&!(this.dataset instanceof GT.DataSet)){
this.dataset.recordType=this.dataset.recordType||this.recordType;
this.dataset=new GT.DataSet(this.dataset);
}
this.loadURL=this.loadURL||this.dataset.loadURL;
this.saveURL=this.saveURL||this.dataset.saveURL;
this.evenRowCss=" "+this.evenRowCss;
this.toolbarContent=this.toolbarContent===false?false:this.toolbarContent;
if(this.tools){
for(var F in this.tools){
GT.ToolFactroy.register(F,this.tools[F]);
}
}
this.sSn3();
},Zar3:function(C){
this.columns=C||this.columns;
if(!this.columns){
return ;
}
this.gridEditorCache=this.gridEditorCache||GT.$e("div",{className:"gt-editor-cache"});
var F=this.columns.length,D=0,B=true,A={};
for(var E=0;E<F;E++){
this.columns[E].grid=this;
this.columns[E].gridId=this.id;
if(this.columns[E].isCheckColumn){
this.columns[E]=GT.Grid.Xri9(this,this.columns[E]);
}
var _=new GT.Column(this.columns[E]);
this.columnMap[_.id]=_;
this.columnList.push(_);
_.colIndex=E;
if(_.frozen){
this.frozenColumnList.push(_.id);
}
var $=this.dataset.fieldsMap[_.fieldName];
if($){
_.fieldIndex=$.index;
}
_.editor=GT.Editor?GT.Editor.rIF9(_.editor,this):null;
if(_.editor&&_.editor.Ots6()){
this.gridEditorCache.appendChild(_.editor.Ots6());
}
if(_.renderer=="by editor"&&_.editor){
_.renderer=function(A,_,$,B,D,C){
return this.editor.getDisplayValue(A);
};
}
A[_.fieldIndex]=_.newValue||"";
_.styleClass=GT.T_G.gid6(this,_.id);
_.innerStyleClass="."+_.styleClass+" .gt-inner";
_.minWidth=_.minWidth+this.xlg1;
_.innerStartHTML=GT.T_G.innerStart(_);
if(_.sortOrder){
this.addSortInfo(this.gnn7(_));
}
if(_.separator){
_.separator.gridId=_.gridId;
}
if(_.hidden){
}
}
this.defaultRecord=this.defaultRecord||A;
return this;
},getMsg:function($){
var _=GT.Msg.Grid[this.language][$];
return _;
},ztn9:function(){
if(this.autoSelectFirstRow){
this.selectFirstRow();
}
this.toggleEmptyRow();
GT.$invoke(this,"onComplete",[this]);
this.hideWaiting();
this.ads6++;
},render:function($){
this.container=$||this.container;
this.Zar3();
this.eox4();
this.XtR3();
this.atr1();
this.gXi8();
this.l2m9();
this.zfm3();
},ned5:function(){
var $=this;
this.headDivHeight=this.headDiv.clientHeight;
if(this.customHead){
this.headDiv.style.height=this.headDivHeight-2+"px";
GT.$thread(function(){
$.headDiv.scrollTop=2;
});
this.headDivHeight-=2;
}
this.freezeHeadDiv.style.height=this.headDivHeight+"px";
this.freezeHeadDiv.style.top=0+this.freezeFixH+"px";
this.freezeBodyDiv.style.top=this.headDivHeight+this.freezeFixH+0+"px";
},eox4:function(){
var $="display:none;";
GT.Const.Grid.SCROLLBAR_WIDTH=20;
var A=this;
A.evenRowCss=A.stripeRows?A.evenRowCss:"";
var _=[];
GT.$each(this.columnList,function(B,D){
B.width=B.width||A.defaultColumnWidth;
var C=""+B.width;
if(C.indexOf("px")<1&&C.indexOf("%")<1){
C=parseInt(C);
}else {
if(C.indexOf("%")>0){
}
}
_[D]=["."+B.styleClass+" { width:"+(C+A.xlg1)+"px;"+(B.hidden?$:"")+" } ",B.innerStyleClass+" { width:"+(C+A.Lxn2)+"px; } "].join("\n");
});
GT.U.CSS.nce6(_.join("\n"));
},XtR3:function(){
var A=this;
this.navigator=new GT.Navigator({gridId:this.id,pageInfo:this.pageInfo});
this.pageStateBar=GT.$(this.pageStateBar);
if(this.isNative){
this.gridDiv=GT.$(this.id+"_div");
}else {
var B=[(GT.isBoxModel?"gt-b-ie ":(GT.isSafari?"gt-b-safari ":(GT.isOpera?"gt-b-opera ":(GT.isStrict?"gt-b-strict":"")))),"gt-grid","gt-skin-"+this.skin];
this.gridDiv=GT.$e("div",{id:this.id+"_div",className:B.join(" ")});
this.container=GT.$(this.container);
if(!this.container||!this.container.appendChild||!this.container.tagName||GT.U.getTagName(this.container)=="BODY"){
GT.doc.body.appendChild(this.gridDiv);
}else {
if(this.replaceContainer===true){
this.container.parentNode.insertBefore(this.gridDiv,this.container);
GT.U.removeNode(this.container);
this.container=null;
}else {
this.container.appendChild(this.gridDiv);
}
}
this.gridDiv.innerHTML=GT.T_G.main(this);
}
this.gridDiv.hideFocus=true;
this.gridMask=GT.$(this.id+"_mask");
this.gridWaiting=GT.$(this.id+"_waiting");
this.gridDialog=GT.$(this.id+"_dialog");
this.gridDialogTitle=GT.$(this.id+"_dialog_title");
this.gridDialogBody=GT.$(this.id+"_dialog_body");
this.gridDiv.appendChild(this.gridEditorCache);
this.gridFilterRSCache=this.gridFilterRSCache||GT.$e("table",{className:"gt-filter-rs-cache"});
this.gridDiv.appendChild(this.gridFilterRSCache);
this.showMask();
this.viewport=GT.$(this.id+"_viewport");
this.ghn8=GT.$(this.id+"_toolBarBox");
this.headDiv=GT.$(this.id+"_headDiv");
this.bodyDiv=GT.$(this.id+"_bodyDiv");
this.freezeView=GT.$(this.id+"_freezeView");
this.freezeHeadDiv=GT.$(this.id+"_freeze_headDiv");
this.freezeBodyDiv=GT.$(this.id+"_freeze_bodyDiv");
this.Osa4();
this.separateLine=GT.$(this.id+"_separateLine");
this.xBh4=this.toolbarPosition=="top"||this.toolbarPosition=="t"?this.toolbarHeight+(GT.isBoxModel?0:1):0;
if(this.separateLine){
this.separateLine.style.top=this.xBh4+"px";
}
this.columnMoveS=GT.$(this.id+"_columnMoveS");
this.headerGhost=GT.$(this.id+"_headerGhost");
this.gridIFrame=GT.$(this.id+"_export_iframe");
this.gridForm=GT.$(this.id+"_export_form");
this.gridFormTextarea=GT.$(this.id+"_export_form_textarea");
if(this.ghn8){
this.toolBar=GT.$e("div",{id:this.id+"_toolBar",className:"gt-toolbar"});
this.ghn8.appendChild(this.toolBar);
}
var _=""+(this.width||this.defaultWidth),$=""+(this.height||this.defaultHeight);
this.setSize(_,$,true);
this.showWaiting();
this.XXp9();
},XXp9:function(){
this.left=GT.U.getPosLeftTop(this.gridDiv);
this.top=this.left[1];
this.left=this.left[0];
this.mri8=GT.U.getXY(this.viewport);
},setSize:function(A,$,D){
var C=this,B=[this.gridDiv.offsetWidth,this.gridDiv.offsetHeight];
A=""+A;
$=""+$;
this.width=A;
this.height=$;
if(A.toLowerCase()=="auto"){
this.width=B[0]+"px";
}else {
if(A.indexOf("%")<1&&A.indexOf("px")<1){
this.width=GT.U.parseInt(A)+"px";
}
}
if($.toLowerCase()=="auto"){
this.height=B[1]+"px";
}else {
if($.indexOf("%")<1&&$.indexOf("px")<1){
this.height=GT.U.parseInt($)+"px";
}
}
var _=false;
if(($.indexOf("%")>1||A.indexOf("%")>1)&&this.monitorResize){
_=true;
}
if(_){
if(GT.isIE){
this.gridDiv.style.overflowY="hidden";
}else {
if(GT.isOpera){
this.gridDiv.style.overflow="hidden";
}
}
}
C.ant3(D);
},ant3:function(A){
this.gridMask.style.width=this.width;
this.gridMask.style.height=this.height;
this.gridDiv.style.width=this.width;
this.gridDiv.style.height=this.height;
var B=(""+this.height).indexOf("%")>0?this.gridDiv.clientHeight:parseInt(this.height),_=0-(GT.isBoxModel?2:3);
this.bodyDiv.style.height=B-(this.headDivHeight+this.toolbarHeight)+_+"px";
if(GT.isOpera){
var $=this.gridDiv.clientWidth+_+"px";
this.viewport.style.width=$;
if(this.ghn8){
this.ghn8.style.width=$;
}
}
if(this.freezeBodyDiv){
this.freezeBodyDiv.style.height=this.bodyDiv.clientHeight+"px";
}
if(A!==true){
this.onResize();
}
},atr1:function(){
this.gridGhost=GT.$e("div",{id:this.id+"_gridGhost",className:"gt-grid-ghost-rect"});
this.gridGhost.style.top=this.top+"px";
this.gridGhost.style.left=this.left+"px";
this.gridGhost.style.width=this.gridMask.style.width;
this.gridGhost.style.height=this.gridMask.style.height;
GT.doc.body.appendChild(this.gridGhost);
},Osa4:function(){
var B=this,E;
if(this.customHead){
if(GT.$type(this.customHead,"string")){
if(this.customHead.indexOf("<table")===0){
GT.U.igi0.innerHTML=this.customHead;
this.customHead=GT.U.igi0.firstChild;
}else {
this.customHead=GT.$(this.customHead);
}
}
this.customHead.style.display="";
this.headTable=GT.$e(this.customHead,{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=this.headTable.tBodies[0];
for(var H=0;H<this.headTbody.rows.length;H++){
var G=this.headTbody.rows[H];
G.className="gt-hd-row";
for(var D=0;D<G.cells.length;D++){
var A=G.cells[D],F=A.innerHTML,C=A.getAttribute("columnId");
if(C){
A.columnId=C;
var $=this.columnMap[C];
if(String(A.getAttribute("resizable")).toLowerCase()=="false"){
$.resizable=false;
}
if(String(A.getAttribute("sortable")).toLowerCase()=="false"){
$.sortable=false;
}
if(A.colSpan<2){
A.className=$.styleClass;
}
$.headCell=A;
}
A.innerHTML=["<div class=\"gt-inner",A.rowSpan<2?"":" gt-inner-tall2","\" unselectable=\"on\" >","<span>",F,"</span>",C?GT.T_G.hdToolHTML:"","</div>"].join("");
}
}
E=GT.$e("tr",{className:"gt-hd-row"+(this.customHead?" gt-hd-hidden":"")});
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$,true);
E.appendChild(A);
GT.Grid.SXd9(B,$);
});
this.headTbody.insertBefore(E,this.headTbody.rows[0]);
}else {
this.headTable=GT.$e("table",{id:this.id+"_headTable",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.headTbody=GT.$e("tbody");
this.headTable.appendChild(this.headTbody);
E=GT.$e("tr",{className:"gt-hd-row"});
this.headTbody.appendChild(E);
GT.$each(this.columnList,function($,_){
var A=GT.T_G.icS3(B,$);
E.appendChild(A);
$.headCell=A;
GT.Grid.SXd9(B,$);
},this);
}
this.headTable.style.marginRight=100+"px";
var _=this.headDiv.firstChild?String(GT.U.getTagName(this.headDiv.firstChild)):null;
if(_=="DIV"||_=="SPAN"){
this.headDiv.firstChild.appendChild(this.headTable);
}else {
this.headDiv.appendChild(this.headTable);
}
this.headFirstRow=this.headTbody.rows[0];
this.freezeHeadTable=GT.$e("table",{id:this.headTable.id+"_freeze",className:"gt-head-table",cellSpacing:"0",cellPadding:"0",border:"0"});
this.freezeHeadTable.style.height="100%";
this.freezeHeadDiv.appendChild(this.freezeHeadTable);
this.ned5();
},zfm3:function(){
var $=GT.$(this.id+"_bodyTable");
if($){
this.gridTable=$;
this.gridTbodyList.push($.tBodies[0]);
this.bodyFirstRow=this.xrt4();
}else {
this.reload();
}
},getColumn:function($){
if(GT.$type($)=="number"&&$>=0){
return this.columnList[$];
}else {
if(GT.U.getTagName($)=="TD"){
return this.columnList[GT.U.getCellIndex($)];
}else {
return this.columnMap[$];
}
}
},iiL6:function(C,_){
C=GT.$type(C,"number")?this.ois0(C):C;
_=_||this.getRecordByRow(C);
var B=C.getAttribute(GT.Const.DataSet.INDEX)/1;
this.dataset.initValues(_,B,this.dataset);
for(var E=0;E<C.cells.length;E++){
var $=this.getColumn(E);
if($!=this.activeColumn&&$.syncRefresh===false){
continue ;
}
var A=C.cells[E],D=false;
A.firstChild.innerHTML=$.renderer(_[$.fieldIndex],_,$,this,E,B);
}
},scrollGrid:function(I,H){
var C=this.snn6,_=this.freezeBodyDiv.clientWidth,$=this.activeCell.offsetLeft+((GT.isFF2||GT.isFF1)?0:C),B=$+this.activeCell.offsetWidth,F=this.activeCell.offsetTop,D=F+this.activeCell.offsetHeight,A=this.bodyDiv.scrollLeft,E=this.bodyDiv.scrollTop,J=A+this.bodyDiv.clientWidth+C,G=E+this.bodyDiv.clientHeight;
if(GT.$chk(I)){
this.bodyDiv.scrollLeft=I;
}else {
if($<=A+_){
this.bodyDiv.scrollLeft=$-_-(_>0?1:0);
}else {
if(B>=J){
this.bod
50 楼
fins
2008-08-26
lsllsf 写道
你用的是什么混淆工具,我的js代码也想混淆
此问题我在我blog 里回答过很多次了 呵呵
不过我很高兴再回答一次
GT-Grid目前使用的是
全世界最NB的js压缩混淆工具:JSA
来做的压缩混淆.
这个工具是 中国人开发的 一个 "免费不开源"产品.
作者是 javaeye 社区的大牛 jindw
49 楼
fins
2008-08-26
jinzhen78 写道
不开源,还混淆代码,可悲,中国的软件,如果extjs按你的思路发展早死了。
拜拜罢您哪!,我没兴趣用,extjs很好
拜拜罢您哪!,我没兴趣用,extjs很好
我很高兴 你把你在je的处女贴回给了我
我更高兴的是你说了"拜拜"
送你一张图 作为临别礼物吧
48 楼
jinzhen78
2008-08-26
不开源,还混淆代码,可悲,中国的软件,如果extjs按你的思路发展早死了。
拜拜罢您哪!,我没兴趣用,extjs很好
拜拜罢您哪!,我没兴趣用,extjs很好
47 楼
lsllsf
2008-08-26
你用的是什么混淆工具,我的js代码也想混淆
46 楼
feohoo
2008-08-19
没修改过代码?在080803中的是有和后台的实例,不过是用的H2数据库
不过看过后根据作者想法在spring+hibernate中得以实现了。^_^
不过看过后根据作者想法在spring+hibernate中得以实现了。^_^
45 楼
talangniao
2008-08-19
GT-Grid最新版本+ 与服务端结合的示例中丢进去的,没有修改过代码!
44 楼
feohoo
2008-08-19
问题:
点击单元格编辑的时候是否有对应事件接口?
描述:
比如说我想编辑属性为'班级'的一个单元格,点击该格的时候显示所有班级下拉列表供选择(当然是自己写的方法),就是说点击的时候单元格显示为可编辑,并且激活一个事件.
答案:
热盼中......
点击单元格编辑的时候是否有对应事件接口?
描述:
比如说我想编辑属性为'班级'的一个单元格,点击该格的时候显示所有班级下拉列表供选择(当然是自己写的方法),就是说点击的时候单元格显示为可编辑,并且激活一个事件.
答案:
热盼中......
43 楼
feohoo
2008-08-19
引用
100w条数据?
----------------------------------------
客户端分页?OR服务器端分页?
----------------------------------------
42 楼
talangniao
2008-08-18
可是我点击最快一页,好慢
纠正:最后一页
纠正:最后一页
41 楼
talangniao
2008-08-18
我是一个新手,测试了一下这个列表,往数据库student_info表中丢了100w条数据,
进行列表测试,点击分页时候,下一页,下一页速度非常快,可是我点击最快一页,好慢,很长时间列表才显示出来,再点击上一页,一样很慢,但是点击首页的时候又很快!是不是sql的原因?对数据库不是很了解!能不能讲讲原理啊?
进行列表测试,点击分页时候,下一页,下一页速度非常快,可是我点击最快一页,好慢,很长时间列表才显示出来,再点击上一页,一样很慢,但是点击首页的时候又很快!是不是sql的原因?对数据库不是很了解!能不能讲讲原理啊?
发表评论
-
那些成天说我的GT-Grid抄袭的人注意了
2009-03-19 22:01 10299你们能够在浩瀚的网络中找到 sigmawidgets htt ... -
[发布]GT-Grid 1.42 版 ★& "前后台结合示例"★2009-01-15更新
2009-01-15 02:41 27578=============================== ... -
[发布]GT-Grid 1.36 版 ★& "前后台结合示例"★2008-12-01 12AM 更新
2008-12-01 01:27 10483(最后更新时间 :12月1日 中午12点时, 修正了 1.36 ... -
GT-Grid 近期将会发布一个bug修正版本,然后将会进行较大的重构
2008-11-11 00:12 3892GT-Grid 近期将会发布一个bug修正版本, 主要修正上一 ... -
[发布]GT-Grid 1.25 版 ★& "前后台结合示例" ★2008-10-21 更新
2008-10-21 17:25 19855首先 先道个歉. 之前许诺过 10月20日之前发布,结果迟到了 ... -
对于复杂javabean到json串的转换,建议使用FlexJSON
2008-10-16 11:23 9932gt-grid自带的那个 javaBean与json的转换工具 ... -
[通知] GT-Grid 讨论群 变更
2008-10-10 15:54 3047GT-Grid的群建立至今, 用户早已满员, 每日还有很多申请 ... -
10月中旬支持导出excel和csv的gt-grid会推出
2008-10-04 21:19 270310月中旬支持导出excel和csv的gt-grid会推出 ( ... -
[发布]GT-Grid 1.18版 & "前后台结合示例"更新 ★2008-09-12发布
2008-09-12 16:40 12692这个版本带有 与java后台结合的示例. 单独的最新版本的 ... -
调查: 关于GT-Grid导致IE崩溃的问题
2008-09-09 15:39 4224有网友反应 对GT-Grid进行操作时 会导致IE崩溃. ... -
[发布] GT-Grid 1.15 版 (080908发布) ★
2008-09-08 14:10 4219GT-Grid 1.15版 说明文档. 这篇文档主要说明一些 ... -
[发布] GT-Grid 1.12 版 (080904发布) ★
2008-09-03 11:02 5499GT-Grid 1.12版 说明文档. 这篇文档主要说明一些 ... -
奥运结束, GT启航
2008-08-25 10:11 2914前一阵由于关注奥运 GT做的工作比较少 奥运结束了 GT该再 ... -
最近奥运,GT的开发暂停一段时间,抱歉了
2008-08-18 20:13 19648月8号之后 GT的更新速度缓慢了,我回答问题也没有以前及时了 ... -
GT-Grid 1.0 基础教程(十二)
2008-08-05 02:06 17534GT-Grid 1.0 基础教程(十二) 教程说明: 这是一 ... -
GT-Grid 1.0 基础教程(十一)
2008-08-03 22:29 8244GT-Grid 1.0 基础教程(十一 ... -
GT-Grid 1.0 基础教程(十)
2008-08-03 00:52 16800GT-Grid 1.0 基础教程(十) 教程说明: 这是一个 ... -
GT-Grid 1.0 基础教程(九)
2008-07-28 00:43 15640GT-Grid 1.0 基础教程(九) 教程说明: 这是一个 ... -
我的两点请求, 麻烦关注GT和ecside的朋友看一下,谢谢了
2008-07-27 21:55 30161 恳请大家以后不要通 ... -
GT-Grid 1.0 基础教程(八)
2008-07-27 01:13 15022GT-Grid 1.0 基础教程(八) 教程说明: 这是一个 ...
相关推荐
GT-Grid 1.0 是一个强大的分布式计算框架,它为大数据处理提供了高效、灵活的解决方案。本基础教程旨在帮助初学者快速理解并掌握GT-Grid 1.0 的核心概念和基本操作,以便在实际项目中应用。下面将详细阐述GT-Grid ...
### GT-Grid 1.0 基础教程(一)——纯客户端只读列表开发详解 #### 一、教程背景与目标 本教程旨在帮助初学者快速掌握如何使用GT-Grid开发纯客户端只读列表的基本技能。对于那些对Ajax技术下的列表组件不太熟悉的...
在示例中,`doc1.txt` 可能包含有关如何设置数据源和如何将数据绑定到`gt-grid`的详细说明。通常,这涉及到配置数据模型,定义列属性以及处理数据加载和更新的事件。 其次,`gt-grid` 提供了丰富的列配置选项,包括...
《GT-Grid 源码解析与后台交互实践》 GT-Grid 是一款功能强大的数据网格组件,广泛应用于Web应用中展示和管理大量结构化数据。本次我们将通过"gt_grid_demo"源码下载来深入理解GT-Grid的运作机制及其与后台数据交互...
GT-Grid 教程示例 GT-Grid 教程示例GT-Grid 教程示例GT-Grid 教程示例
"gt-grid 表格源码,开发包,api手册"这一资源主要涵盖了用于构建数据表格的前端组件的源代码、开发工具以及相关的API文档。gt-grid是一个强大的数据展示和操作框架,它允许开发者以灵活的方式展示和管理大量结构化...
本篇文章将深入探讨两种流行的JavaScript表格组件——GT-Grid和EXT-Grid,并通过对比分析它们的特点、功能和使用场景,以帮助开发者选择最适合项目需求的组件。 GT-Grid与EXT-Grid都是用于构建高性能、可定制的表格...
GT-Grid 是一款强大的数据网格组件,常用于前端开发中展示和操作大量结构化数据。在Web应用中,它提供了一种高效的方式来呈现表格数据,支持排序、筛选、分页、编辑等多种功能,大大提升了用户体验。这个压缩包文件...
GT-Grid 是一个基于Ajax技术的列表组件. 拥有丰富的功能以及良好易用性和用户体验. 它是 EC Side列表组件 的更新换代产品. (ECSide是GT-Grid作者的另一作品, 是一个在国内拥有广泛用户群的列表组件,它基于传统的jsp...
"gt-grid.rar+demo"这个压缩包文件包含的是关于"gt-grid"的样例源码。"gt-grid"是一个常见的前端数据展示控件,通常用于创建高性能、可定制的表格,它在Web应用中广泛使用,特别是在大数据量的场景下。下面我们将...
**gt-grid基础教程** 在网页开发中,数据的展示往往是不可或缺的部分,特别是在处理大量结构化信息时。`gt-grid`是一款由"胖哥"开发的高效、功能丰富的表格组件,专为页面展示设计,旨在帮助开发者更便捷地构建数据...
【GT-grid表格组件详解】 GT-grid是一款高效、易用的前端表格组件,它在最新的版本中提供了丰富的功能,包括但不限于分页、过滤、排序等,旨在帮助开发者更好地管理和展示数据,提升用户体验。以下是对GT-grid及其...
在本示例中,“gt-grid 分页 用ajax 开发的 里面有例子”显然演示了如何使用`gt-grid`配合Ajax实现分页功能。 首先,我们需要理解Ajax的核心概念。Ajax(Asynchronous JavaScript and XML)是一种创建动态网页的...
网页Grid组件,特别是GT-Grid组件,是Web开发中一种强大的数据展示工具,它为开发者提供了灵活、高效且功能丰富的表格解决方案。Grid组件在网页应用中扮演着至关重要的角色,用于展示结构化数据,支持排序、筛选、...
GT-GRID是一款基于jQuery的强大的数据网格插件,主要用于展示和操作大量结构化的数据。它在Web应用中常被用于创建功能丰富的表格,提供类似数据库的分页、排序、过滤和编辑功能,使得用户可以方便地浏览和管理数据。...
NULL 博文链接:https://fins.iteye.com/blog/283672
标题中的“Draw-Grid_100_catia插件_catia车线_drawgrid_Draw-Grid下载_catia_”提到了几个关键元素,分别是“Draw-Grid”,“CATIA 插件”,“catia车线”以及“下载”。这表明我们要讨论的是一个用于CATIA软件的...
ag-Grid Enterprise是一款高度可定制、高性能的数据网格组件,广泛应用于JavaScript和TypeScript项目中,为数据呈现、编辑和分析提供了强大的解决方案。v19.1.1是该组件的一个特定版本,发布于2018年10月31日。在...
ag-grid我没找到汉化提示的js(没仔细找),下载了官方的社区版js代码,记事本查找替换的,如果没积分可以自己搜索替换,我只改了contains(模糊查找)、not contains(模糊过滤)、equals(精确查找)、not equals...
- **安装**:通常通过npm或yarn进行安装,例如`npm install ag-grid-community`。 - **初始化**:在项目中引入ag-Grid,并创建数据网格实例,设置数据源和列定义。 - **文档与示例**:ag-Grid提供详尽的官方文档和...