1//vs12/04/13 2function igbut_init(id,prop,evs) 3{ 4 if(!ig_WebControl.prototype.isPrototypeOf(ig_WebButton.prototype))ig_WebButton.prototype=new ig_WebControl(); 5 var o=ig_getWebControlById(id); 6 if(o) 7 { 8 var e=o._elems;if(e)if((e=e[10])!=null)e.value=''; 9 o._elems=o.Event=null; 10 ig_dispose(o); 11 } 12 o=new ig_WebButton(id,prop,evs); 13 o.fireEvt("init"); 14 o.fireEvt("paint"); 15} 16var igbut_mouse=null,igbut_size=null; 17function ig_WebButton(id,prop,evs) 18{ 19 this.constructor(id); 20 this.valI=function(o,i){o=(o==null||o.length<=i)?null:o[i];return (o==null)?"":o;} 21 this.intI=function(o,i){return ig_shared.isEmpty(o=this.valI(o,i))?-1:parseInt(o);} 22 this._evts=["mousemove","mouseover","mouseout","mousedown","mouseup","click","keydown","keyup","focus","blur","select","selectstart"]; 23 var o,e,j,i=prop.length-1; 24 var a=i+((i>6)?2:1); 25 this._apps=new Array(a); 26 this._last=new Object(); 27 while(a-->0) 28 { 29 this._apps[a]=new Object(); 30 if(a%6==3)continue; 31 o=prop[i--].split(";"); 32 for(j=0;j<o.length-1;j+=2) 33 { 34 this._apps[a][o[j]]=e=o[j+1]; 35 if(i%5==2)this._apps[a+1][o[j]]=e; 36 if(i%5==1)this._apps[a+2][o[j]]=e; 37 } 38 } 39 if(!igbut_mouse) 40 { 41 ig_shared.addEventListener(document.body,"mouseup",igbut_evt); 42 ig_shared.addEventListener(window,"mouseup",igbut_evt); 43 igbut_mouse=this; 44 } 45 if((e=document.getElementById(id))==null)return; 46 /*0-input,1-tableMain,2-tableOuter,3-span,4-img,5-td,6-tdT/R,7-tdB/L,8-tdB/R,9-tableInner,10-viewState*/ 47 this._elems=new Array(11); 48 this._elems[i=0]=e; 49 while(++i<31)if((this._elems[i]=document.getElementById(id+"__"+i))==null&&i>10)break; 50 this._uniqueID=e.name; 51 this._clientID=this._id; 52 this._txt=e.value; 53 var props=prop[0].split(","); 54 i=0; 55 this._userEvents=new Object(); 56 if(evs)for(j=0;j<evs.length-1;j+=2) 57 this._userEvents[evs[j]]=ig_shared.replace(evs[j+1],'"','\"'); 58 this._autoSubmit=!ig_shared.isEmpty(props[i++]); 59 this._display=ig_shared.isEmpty(props[i++])?"block":"inline"; 60 this._space=this.valI(props,i++); 61 this._enter=this.valI(props,i++); 62 this._wMax=this.intI(props,i++); 63 this._hMax=this.intI(props,i++); 64 this._wBdr=this.intI(props,i++); 65 this._hBdr=this.intI(props,i++); 66 this._validate=ig_shared.notEmpty(props[i++]); 67 this._focusable=ig_shared.notEmpty(props[i++]); 68 this._disTD=ig_shared.notEmpty(props[i++]); 69 this._validationGroup = props[i++]; 70 this._postbackUrl = props[i++]; 71 this.addLsnr=function(e) 72 { 73 if(!e||e.nodeName=="#text"||!e.setAttribute)return; 74 var i=this._evts.length,x=e.tagName=="INPUT"; 75 /*_evts=["mousemove","mouseover","mouseout","mousedown","mouseup","click","keydown","keyup","focus","blur","select","selectstart"];*/ 76 if(e.getAttribute("ig_b")!=this._id) 77 while(i-->0)if(x==(i>4&&i<10))ig_shared.addEventListener(e,this._evts[i],igbut_evt); 78 e.setAttribute("ig_b",this._id);if(x)return; 79 e.unselectable="on";i=((x=e.childNodes)==null)?0:x.length; 80 while(i-->0)this.addLsnr(x[i]); 81 } 82 if((e=this._elems[2])==null)e=this._elems[1]; 83 this._element=e; 84 this.addLsnr(e); 85 this._w=e.style.width; 86 this._h=e.style.height; 87 this.getState=function(){return this._state;} 88 this.getAutoSubmit=function(){return this._autoSubmit;} 89 this.getFocusable=function(){return this._focusable;} 90 this.getDisplay=function(){return this._display;} 91 this.hasFocus=function(){return this._fcs==true;} 92 this.setFocus=function(){try{if(!this._fcs&&this._focusable)this._elems[0].focus();}catch(e){}} 93 this.getEnabled=function(){return this._elems[0].disabled!=true;} 94 this.setEnabled = function (v) { if (this._disTD) this._elems[5].disabled = !v; this._elems[5].style.cursor = "pointer"; if(!v)this._key=this._fcs=null;this.update("Enabled",!(this._elems[0].disabled=!v));this.paint(true);} 95 this.getVisible=function(){return this._element.style.display!="none";} 96 this.setVisible=function(v){this._element.style.display=v?this._display:"none";} 97 this.getText=function(){return this._txt;} 98 this.setText=function(v){if(ig_shared.setText(this._elems[3],v))this.update("Text",this._txt=v);} 99 this.getImageAt=function(i){return this._apps[i]["img"];} 100 this.setImageAt=function(v,i,c){this.update("Url",this._apps[i]["img"]=v,i,c);this.paint(true);} 101 this.getBackColorAt=function(i){return this._apps[i]["bg"];} 102 this.setBackColorAt=function(v,i,c){this.update("BackColor",this._apps[i]["bg"]=v,i,c);this.paint(true);} 103 this.getForeColorAt=function(i){return this._apps[i]["clr"];} 104 this.setForeColorAt=function(v,i,c){this.update("ForeColor",this._apps[i]["clr"]=v,i,c);this.paint(true);} 105 this.getBorderColorAt=function(i){return this._apps[i]["bc"];} 106 this.setBorderColorAt=function(v,i,c){this.update("BorderColor",this._apps[i]["bc"]=v,i,c);this.paint(true);} 107 this.getRoundedImageAt=function(i){return this._apps[i]["bgi"];} 108 this.setRoundedImageAt=function(v,i,c){this.update(null,this._apps[i]["bgi"]=v,i,c);this.paint(true);} 109 this.getElementAt=function(i) 110 { 111 var e=this._elems[i]; 112 if(!e&&i==10)try 113 { 114 e=document.createElement("INPUT");e.type="hidden"; 115 this._elems[0].form.appendChild(e); 116 e.name=this._uniqueID+"__10";e.id=this._id+"__10";e.value=""; 117 this._elems[10]=e; 118 }catch(ex){} 119 return e; 120 } 121 this._checked=this._waitM=0; 122 this._state=this._checked+(this.getEnabled()?0:5); 123 this.paint=function(e) 124 { 125 /*0-normal,1-hover,2-focus,3-focus/hover,4-pressed,5-disabled*/ 126 var state=this.getEnabled()?0:5,ee=this._elems; 127 if(e==false)this._key=this._mouseDown=null; 128 if(state==0)state=ig_shared.notEmpty(this._key)?4:(this._mouseIn?(this._mouseDown==1?4:(this._fcs?3:1)):(this._fcs?2:0)); 129 if((state+=this._checked)==this._state&&!e)return; 130 this._state=state; 131 /*0-input,1-tableMain,2-tableOuter,3-span,4-img,5-td,6-tdT/R,7-tdB/L,8-tdB/R,9-tableInner,10-viewState*/ 132 var v,a=this._apps[state],a0=this._apps[0],e1=ee[1];
133 var s0=e1.style,s1=ee[3],s5=ee[5].style; 134 s1=s1?s1.style:s0; 135 for(var i in a0) 136 { 137 if((v=a[i])==null)v=a0[i]; 138 if(v==this._last[i])continue; 139 this._last[i]=v; 140 switch(i) 141 { 142 case "bg":s5.backgroundColor=v;break; 143 case "clr":s1.color=v;break; 144 case "bc":s0.borderColor=v;break; 145 case "bs":s0.borderStyle=v;break; 146 case "bw":s0.borderWidth=v;break; 147 case "ff":s1.fontFamily=v;break; 148 case "fs":s1.fontSize=v;break; 149 case "fb":s1.fontWeight=ig_shared.isEmpty(v)?"":"bold";break; 150 case "fi":s1.fontStyle=ig_shared.isEmpty(v)?"":"italic";break; 151 case "td":s1.textDecoration=v;break; 152 case "bgi":for(var j=5;j<9;j++)if((e=ee[j])!=null)e.style.backgroundImage="url("+v+")";break; 153 case "img":if((e=ee[4])!=null)e.src=v;break; 154 case "cn":if((i=e1._css)==null){i=e1.className;if(!i)i='';e1._css=i;}if(i&&v!=i)v+=' '+i; 155 e1.className=v;if((e=ee[3])!=null)e.className=v;if((e=ee[9])!=null)e.className=v;break; 156 case "filter":s0.filter=v;break; 157 case "ls":s1.letterSpacing=v;break; 158 case "wm":s1.writingMode=v;break; 159 case "pd":s5.padding=v;break; 160 case "ibc":s5.borderColor=v;break; 161 case "ibs":s5.borderStyle=v;break; 162 case "ibw":s5.borderWidth=v;break; 163 default:if(i.charAt(0)=="x") 164 {ee[i=parseInt(i.substring(1))].bgColor=v;if(i==19||i==22||i==25||i==28)ee[i+1].bgColor=ee[i+2].bgColor=v;}break; 165 } 166 } 167 this.fireEvt("paint"); 168 } 169 this.doMouse=function(e,a,s) 170 { 171 /*a:["mousemove","mouseover","mouseout","mousedown","mouseup"]*/ 172 var b=e.button,ie=ig_shared.IsIE&&!ig_shared.IsIE11Plus; 173 if((a>2&&ie&&b!=1)||(a>2&&!ie&&b))return; 174 var mi=true,e0=this._elems[2];if(!e0)e0=this._elems[1]; 175 if(a==2)mi=ig_shared.isInside(e,e0,this._elems[1],(s.id==this._id+"__2")?50:0); 176 if(a==4){this._waitM=3;s=igbut_fromElem(s);mi=s!=null&&s._id==this._id;} 177 //request to raise click on mouseup 178 b=a==4&&this._mouseDown==1; 179 if(this._mouseDown&&!mi){this._mouseDown=2;if(a==1)return;} 180 /*mi-MouseOver,mo-MouseOut*/ 181 if(this._mouseIn!=mi)this.fireEvt(mi?"mi":"mo",e); 182 this._mouseIn=mi; 183 if(a>=3){this._key=null;this._mouseDown=4-a;} 184 if(a==3){igbut_mouse=this;this.setFocus();} 185 if(b)this.click(e,a,"0"); 186 } 187 this.doEvt=function(e,t,s) 188 { 189 /*_evts=["mousemove","mouseover","mouseout","mousedown","mouseup","click","keydown","keyup","focus","blur","select","selectstart"]; */ 190 var v,a=10; 191 while(a-->0)if(this._evts[a]==t)break; 192 if(a<4)this._waitM--; 193 if(a==3&&(!ig_shared.IsSafari||!this._focusable))ig_cancelEvent(e); 194 if(a<0||(a==3&&this._mouseDown==1))return; 195 if(a==5)this.click(e,a);/*5-click*/ 196 else 197 { 198 var cancel=this.fireEvt(t,e,a); 199 if(!this.getEnabled())return; 200 if(a<5)this.doMouse(e,a,s);/*0..4-mouse*/ 201 /*8-focus,9-blur*/ 202 if(a==8){this._fcs=true;if(e.altKey&&!e.ctrlKey&&this._mouseDown!=1)this._key="3";} 203 if(a==9){this._mouseDown=(this._waitM<1)?(this._mouseIn?1:0):null;this._fcs=this._key=null;} 204 if(a==6)/*6-keydown*/ 205 { 206 v=e.keyCode;this._key=null; 207 if(v==13||v==32) 208 { 209 this._key=(v==13)?this._enter:this._space; 210 if(this._key.length==0)cancel=true; 211 } 212 if(cancel)ig_cancelEvent(e); 213 } 214 if(a==7&&e.keyCode!=32)this._key=null; 215 } 216 this.paint(); 217 } 218 this.fireEvt=function(id,evnt,a,v) 219 { 220 if(ig_shared.isEmpty(id=this._userEvents[id]))return false; 221 var evt=new ig_EventObject(); 222 evt.event=evnt;evt.action=v; 223 ig_fireEvent(this,id,evt); 224 if(evt.cancel||(evt.cancelPostBack&&a==5)){ig_cancelEvent(evnt);return true;} 225 if(evt.needPostBack&&!this.posted())if(this.doValid()) 226 { 227 this.doPost("4");/*4-custom*/ 228 return true; 229 } 230 return false; 231 } 232 this.posted=function(){return this._post&&(new Date()).getTime()<this._post+300;} 233 this.doPost=function(v,skip) 234 { 235 try 236 { 237 var id=this._uniqueID,url=this._postbackUrl,et=document.getElementById('__EVENTTARGET'); 238 // ensure IPostBackEventHandler.RaisePostBackEvent 239 if(et)et.value=id; 240 if(url) 241 { 242 var form=window.theForm||document.forms[0]; 243 if(form)form.action=url; 244 else url=null; 245 } 246 this._post=new Date().getTime(); 247 // skip: browser will raise form.submit/__doPostBack by itself 248 if(!skip||url)__doPostBack(id,v); 249 }catch(ex){} 250 } 251 this.click=function(e,a,v) 252 { 253 if(!this.getEnabled())return; 254 if(a==5)v=(e.altKey||this._key==null)?(this._key="3"):this._key; 255 if(v=="2"||v=="3"){igbut_mouse=this;window.setTimeout("try{if(typeof(igbut_mouse)=='object')igbut_mouse.paint(false);}catch(e){}",100);} 256 else this._key=null; 257 if(this.posted()||v===""){ig_cancelEvent(e);return;} 258 if(v==null)v="0"; 259 if(this.fireEvt("c",e,a,v))return; 260 if(this._autoSubmit)if(this.doValid((a==5)?e:null)) 261 { 262 this.update(v); 263 this.doPost(v,a==5); 264 } 265 } 266 this.doValid=function(e) 267 {
268 if(this._validate&&(typeof Page_ClientValidate =="function")) 269 try{var ret=Page_ClientValidate(this._validationGroup);Page_BlockSubmit=false;if(!ret&&e)ig_cancelEvent(e);return ret;}catch(ex){} 270 return true; 271 } 272 this.update=function(p,v,i,client) 273 { 274 var e=this.getElementAt(10); 275 if(!e||client)return; 276 if(v==null){e.value=":"+p+e.value;return;} 277 if(!this._vs)this._vs=new ig_xmlNode(); 278 var s="U",n=this._vs.addNode("x",true),ss=["","Hover","Focus","Hover","Pressed","Disabled"]; 279 if(i!=null) 280 { 281 if(v.indexOf(" ")>=0)return; 282 ss=ss[i%6]; 283 if(!p){p=ss+"ImageUrl";ss="RoundedCorners";} 284 else{ss+="Appearance";s=p.charAt(0);} 285 if(i>5)ss="Checked"+ss; 286 n=n.addNode(ss);if(s!="U")n=n.addNode("Style"); 287 } 288 n.setPropertyValue(p,""+v); 289 e.value=this._vs.getText(); 290 } 291 this.but_size=function() 292 { 293 var e=this._elems[1];var s=e.style,h=e.offsetHeight,s5=this._elems[5].style; 294 if(this._h.length>0&&s.height!=this._h&&h<=this._hMax&&h>5)s.height=this._h; 295 if(this._w.length>0&&s.width!=this._w&&e.offsetWidth<=this._wMax)s.width=this._w; 296 if(this._wMax>0&&e.offsetWidth>this._wMax){if(s.tableLayout!="fixed")s.tableLayout="fixed";s.width=this._wMax;} 297 if(this._hMax>0&&e.offsetHeight>this._hMax)s.height=this._hMax; 298 if(this._wBdr>=0){s.width=e.offsetWidth;s5.width=e.offsetWidth-this._wBdr;this._wBdr=this._wMax=-1;} 299 if(this._hBdr>=0&&(h=e.offsetHeight)>5){s.height=h;s5.height=e.offsetHeight-this._hBdr;this._hBdr=this._hMax=-1;} 300 } 301 if((this._wMax<=0||this._w.length<1)&&(this._hMax<=0||this._h.length<1))return; 302 this._onResize=function(){this.but_size();} 303 if((o=igbut_size)==null)igbut_size=o=new Array(); 304 this.but_size(); 305 while((e=e.parentNode)!=null) 306 { 307 if(e.ig_id)break; 308 if((i=e.tagName)!="TABLE"&&i!="TD"&&i!="DIV")continue; 309 ig_shared.addEventListener(e,"resize",igbut_evt); 310 e.ig_id=id;o[o.length]={e:e}; 311 } 312} 313function igbut_fromElem(e) 314{ 315 var id="",i=0; 316 while(e!=null&&ig_shared.isEmpty(id)) 317 { 318 try{if(e.getAttribute!=null)id=e.getAttribute("ig_b");}catch(ex){} 319 if(++i>2)return null; 320 e=e.parentNode; 321 } 322 return ig_getWebControlById(id); 323} 324function igbut_evt(e) 325{ 326 if(!e)if((e=window.event)==null)return; 327 if(typeof(igbut_mouse)!='object'||typeof(ig_all)!='object')return; 328 var t=e.type,o=igbut_mouse,r=igbut_size,s=e.target; 329 if(!s)s=e.srcElement; 330 if(t=="mouseup"){if(o._mouseDown)o.doEvt(e,t,s);return;} 331 if(t=="resize") 332 { 333 var i=0,j=r?r.length:0; 334 while(j-->0) 335 { 336 var w=r[j].e.offsetWidth,h=r[j].e.offsetHeight; 337 if(r[j].w!=w||r[j].h!=h){i++;r[j].w=w;r[j].h=h;} 338 } 339 if(i>0){if(s&&ig_shared.notEmpty(i=s.ig_id)){ig_all[i].but_size();return;}s=null;} 340 if(!s)for(i in ig_all)if(ig_all[i].but_size)ig_all[i].but_size(); 341 return; 342 } 343 if((o=igbut_fromElem(s))==null)o=igbut_fromElem(this); 344 if(o)ig_shared._ib_e_id=o._id; 345 else if(t=='mouseout')o=ig_getWebControlById(ig_shared._ib_e_id); 346 if(o&&o.doEvt)o.doEvt(e,t,s); 347}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.