⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 igf_ui.js

📁 一个JSF的商业组件的DEMO,infragistics-netadvantage.lic:NetAdvantage for JSF Vol1 2008,m21A99D6A11FF-9B33DC4B8
💻 JS
📖 第 1 页 / 共 3 页
字号:
return css;};IgUIElement.prototype.getDefaultClass=function(){return this.getAttribute(ig.PROP_DEFAULT_CLASS,true);};IgUIElement.prototype.getDisabledClass=function(){return this.getAttribute(ig.PROP_DISABLED_CLASS,true);};IgUIElement.prototype.getEventArguments=function(){return this.getAttribute("oprmtrs");};IgUIElement.prototype.getFirstChild=function(oe){var cc=this.getChildContainer();if(!ig.isNull(cc)){var t=this.getType();cc=ig.findDescendant(cc.elm,ig.PROP_TYPE,t);cc=ig.getUIElementById(cc);if(oe===true&&!ig.isNull(cc)&&!cc.isEnabled()){cc=cc.getNextSibling(true);}}
return cc;};IgUIElement.prototype.getFirstSibling=function(oe){var r=null;var t=this.getType();var tmp=this.elm.parentNode.firstChild;while(!ig.isNull(tmp)){if(ig.getType(tmp)==t){r=tmp;break;}
tmp=tmp.nextSibling;}
r=ig.getUIElementById(r);if(oe===true&&!ig.isNull(r)&&!r.isEnabled()){r=r.getNextSibling(true);}
return r;};IgUIElement.prototype.getHoverClass=function(){return this.getAttribute(ig.PROP_HOVER_CLASS,true);};IgUIElement.prototype.getLastChild=function(oe){var r=this.getFirstChild(oe);if(r){r=r.getLastSibling(oe);}
return r;};IgUIElement.prototype.getLastSibling=function(oe){var r=null;var t=this.getType();var tmp=this.elm.parentNode.lastChild;while(!ig.isNull(tmp)){if(ig.getType(tmp)==t){r=tmp;break;}
tmp=tmp.previousSibling;}
r=ig.getUIElementById(r);if(oe===true&&!ig.isNull(r)&&!r.isEnabled()){r=r.getPreviousSibling(true);}
return r;};IgUIElement.prototype.getNextSibling=function(oe){var r=null;var t=this.getType();var tmp=this.elm.nextSibling;while(!ig.isNull(tmp)){if(ig.getType(tmp)==t){r=tmp;break;}
tmp=tmp.nextSibling;}
r=ig.getUIElementById(r);if(oe===true&&!ig.isNull(r)&&!r.isEnabled()){r=r.getNextSibling(true);}
return r;};IgUIElement.prototype.getParentType=function(){return null;}
IgUIElement.prototype.getParentComponent=function(){var parentType=this.getParentType();var parent=null;if(!ig.isNull(parentType)){parent=ig.getTargetUIElement(this.elm.parentNode,parentType);if(!ig.isNull(parent)){return parent;}}
var parentId=this.getAttribute(ig.PROP_PARENT_COMPONENT);if(ig.NaES(parentId)){return ig.getUIElementById(parentId);}
var pids=this.getParentIds();if(ig.isArray(pids)){for(var i=0;i<pids.length;i++){parentId=pids[i];if(ig.isUIComponent(parentId)){this.setAttribute(ig.PROP_PARENT_COMPONENT,parentId);return ig.getUIElementById(parentId);}}}
parent=ig.findAncestor(this.elm.parentNode,ig.PROP_COMPONENT,null,null);if(!ig.isNull(parent)){return ig.getUIElementById(parent);}
return null;};IgUIElement.prototype.getParentIds=function(){var pids=new Array();var id=this.getId();if(ig.NaES(id)){var lio=id.length;while(lio>=0){lio=id.lastIndexOf(":",lio-1);if(lio>=0){var anId=id.substring(0,lio);pids.push(anId);}}}
return pids;};IgUIElement.prototype.getParentSibling=function(){var c=this.getAttribute(ig.PROP_PARENT);if(!ig.NaES(c)){var pids=this.getParentIds();if(ig.isArray(pids)){for(var i=0;i<pids.length;i++){var tmp=ig.getElementById(pids[i]);if(ig.isOfType(tmp,this.getType())){this.setAttribute(ig.PROP_PARENT,tmp.id);c=tmp.id;break;}}}
if(!ig.NaES(c)){c=ig.findAncestor(this.elm.parentNode,ig.PROP_TYPE,this.getType(),null);}}
return ig.getUIElementById(c);};IgUIElement.prototype.getPreviousSibling=function(oe){var r=null;var t=this.getType();var tmp=this.elm.previousSibling;while(!ig.isNull(tmp)){if(ig.getType(tmp)==t){r=tmp;break;}
tmp=tmp.previousSibling;}
r=ig.getUIElementById(r);if(oe===true&&!ig.isNull(r)&&!r.isEnabled()){r=r.getPreviousSibling(true);}
return r;};IgUIElement.prototype.hasChild=function(){return(!ig.isNull(this.getChildContainer()));};IgUIElement.prototype.getSelectedClass=function(){return this.getAttribute(ig.PROP_SELECTED_CLASS,true);};IgUIElement.prototype.isAncestor=function(n){var res=false;if(!ig.isNull(n)){var thisId=this.getId();var otherId=n.getId();if(ig.NaES(thisId)&&ig.NaES(otherId)){res=(otherId.indexOf(thisId)===0);}}
return res;};IgUIElement.prototype.isExpanded=function(){var cc=this.getChildContainer();return(!ig.isNull(cc))?(cc.elm.style.visibility!="hidden"&&cc.elm.style.display!="none"):false;};IgUIElement.prototype.isHovered=function(){return this.equals(ig.ui.getHoveredElement());};IgUIElement.prototype.isSelected=function(){var result=null;var comp=this.getParentComponent();if(!ig.isNull(comp)){result=this.equals(comp.getSelectedElement());}
return result;};IgUIElement.prototype.queueEvent=function(evtSrc,evtName,evtValue){if(ig.NaES(evtSrc)){var pcmp=this.getParentComponent();if(!ig.isNull(pcmp)){pcmp.queueEvent(evtSrc,evtName,evtValue);}}};IgUIElement.prototype.findEvent=function(evtSrc,evtName){if(ig.NaES(evtSrc)){var pcmp=this.getParentComponent();if(!ig.isNull(pcmp)){return pcmp.findEvent(evtSrc,evtName);}}};IgUIElement.prototype.removeChildren=function(){var cc=this.getChildrenContainer();if(!ig.isNull(cc)){var pn=cc.parentNode;if(!ig.isNull(pn)){pn.removeChild(cc);}}};IgUIElement.prototype.repaint=function(){this.applyClass();this.updateCursor();};IgUIElement.prototype.replaceChildren=function(newChildren){this.removeChildren();this.appendChildren();};IgUIElement.prototype.select=function(){var pc=this.getParentComponent();if(!ig.isNull(pc)){pc.selectElement(this);}};IgUIElement.prototype.setUIAttribute=function(n,v){if(this.setAttribute(n,v)){this.repaint();}};IgUIElement.prototype.toggle=function(){if(this.isExpanded()){this.collapse();}
else{this.expand();}};IgUIElement.prototype.unselect=function(){if(this.isSelected()){var pc=this.getParentComponent();if(!ig.isNull(pc)){pc.unselectElement(this);}}};IgUIElement.prototype.get_events=function(){if(!this._events){this._events=new EventHandlerList();}
return this._events;}
ig.augment(IgUIElement,IgDomNode);function IgUIComponent(e){this.IgUIElement(e);};IgUIComponent.prototype.focus=function(){};IgUIComponent.prototype.getParentComponent=function(){return null;};IgUIComponent.prototype.getSelectedElement=function(){var se=this.getAttribute(ig.PROP_SELECTED_ELEMENT);return ig.getUIElementById(se);};IgUIComponent.prototype.onKeyDown=function(e){};IgUIComponent.prototype.onKeyPress=function(e){};IgUIComponent.prototype.queueEvent=function(evtSrc,evtName,evtValue){var eq=new IgEventQueue(this.getId());if(!ig.isNull(eq)){eq.queueEvent(evtSrc,evtName,evtValue);}};IgUIComponent.prototype.findEvent=function(evtSrc,evtName){var eq=new IgEventQueue(this.getId());if(!ig.isNull(eq)){return eq.findEvent(evtSrc,evtName);}};IgUIComponent.prototype.clearEventQueue=function(evtSrc){var eq=new IgEventQueue(this.getId());if(!ig.isNull(eq)){return eq.setValue("");}};IgUIComponent.prototype.select=function(e){};IgUIComponent.prototype.selectElement=function(se){if(!ig.isNull(se)&&!se.isSelected()){this.unselectElement(this.getSelectedElement());if(ig.NaES(se.elm.id)){this.setAttribute(ig.PROP_SELECTED_ELEMENT,se.elm.id);}
else{this.setAttribute(ig.PROP_SELECTED_ELEMENT,se);}
se.repaint();}};IgUIComponent.prototype.unselectElement=function(se){if(!ig.isNull(se)){this.setAttribute(ig.PROP_SELECTED_ELEMENT,null);se.repaint();}};IgUIComponent.prototype.getClientEventPostBack=function(arg0){return null;};IgUIComponent.prototype._initClientEventsForObject=function(owner,vals)
{owner._clientEvents=new Object();var i=vals?vals.length:0;while(i-->0)
{var evt=vals[i].split(':');this.setClientEvent(owner,evt[0],evt[1],evt[2]);}};IgUIComponent.prototype.setClientEvent=function(owner,evtName,fnc,postBack)
{if(postBack)
postBack=parseInt(postBack,10);else
postBack=0;owner._clientEvents[evtName]={name:evtName,fnc:fnc,postBack:postBack};if(evtName&&fnc)
this.addClientEventHandler(owner,evtName,fnc);};IgUIComponent.prototype.addClientEventHandler=function(owner,evtName,fnc){$util.addClientEvent(owner,evtName,fnc);},IgUIComponent.prototype._raiseClientEventStart=function(param)
{var params=param;if(params.substring)
params=arguments;return this._raiseCE_0(this,params[0],this.getClientEventPostBack(params[0]),params[1],params);};IgUIComponent.prototype._raiseClientEvent=function(param)
{var args=this._raiseClientEventStart(param.substring?arguments:param);return args?this._raiseClientEventEnd(args,args._name):null;};IgUIComponent.prototype._raiseClientEventEnd=function(args)
{if(args&&args._props&&!(args.get_cancel&&args.get_cancel()))
this._postAction(args,args._name);return args;};IgUIComponent.prototype._raiseSenderClientEvent=function(sender,clientEvent,eventArgs)
{eventArgs=this._raiseSenderClientEventStart(sender,clientEvent,eventArgs);return this._raiseClientEventEnd(eventArgs);};IgUIComponent.prototype._raiseSenderClientEventStart=function(sender,clientEvent,eventArgs)
{return this._raiseCE_0(sender,clientEvent.name,clientEvent.postBack,eventArgs);};IgUIComponent.prototype._raiseCE_0=function(me,evtName,post,args,params)
{var fnc=me.get_events().getHandler(evtName);var str=args&&args.substring;if(!fnc&&post==null)
return str?null:args;if(str)
eval('try{args = new $IG.'+args+'EventArgs();}catch(ex){args = null;}');var i=1,len=params?params.length:0;if(!args)
args=(len<3)?new Sys.EventArgs():new $IG.EventArgs();if(args._props)
while(++i<len)if(params[i]!=null)
args._props[i-2]=params[i];if(post)
{if(!args._props)
args._props=new Array();if(!args._props[1]||args._props[1]==0)
args._props[1]=post;}
if(fnc)
fnc(this,args);if(args._props)
delete args._props[0];args._name=evtName;return args;};IgUIComponent.prototype._postAction=function(args,evtName){}
ig.augment(IgUIComponent,IgUIElement);function IgPopup(e){this.IgDomNode(e);};IgPopup.prototype.createIframe=function(){var ifr=null;if(ig.isIE){var id=this.elm.id;if(!ig.isNull(id)){id=id+"_frm";ifr=ig.getUIElementById(ig.ui.getDocument().createElement("IFRAME"));ifr.elm.frameBorder="no";ifr.elm.id=id;ifr.elm.scrolling="no";ifr.elm.src='javascript:new String("<html></html>")';ifr.elm.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0);";ifr.setStyle("z-index",this.getStyle("z-index"));ifr.setStyle("visibility","hidden");ifr.setStyle("display","none");var size=this.getSize();ifr.setSize(size.width,size.height);this.elm.parentNode.insertBefore(ifr.elm,this.elm);}}
return ifr;};IgPopup.prototype.show=function(x,y,x2,y2){this.callSuper("IgDomNode","show",x,y,x2,y2);if(this.needIeFix()){var ifr=this.getIframe();if(ig.isNull(ifr)){ifr=this.createIframe();}
ifr.show(x,y,x2,y2);}};IgPopup.prototype.moveBy=function(x,y){this.callSuper("IgDomNode","moveBy",x,y);if(this.needIeFix()){var ifr=this.getIframe();if(!ig.isNull(ifr)){ifr.moveBy(x,y);}}};IgPopup.prototype.needIeFix=function(rs){return ig.isIE;};IgPopup.prototype.hide=function(rs){this.callSuper("IgDomNode","hide",rs);if(this.needIeFix()){var ifr=this.getIframe();if(!ig.isNull(ifr)){ifr.hide(rs);}}};IgPopup.prototype.getIframe=function(){var id=this.elm.id+"_frm";return ig.getUIElementById(id);};IgPopup.prototype.removeNode=function(){if(this.needIeFix()){var ifr=this.getIframe();if(!ig.isNull(ifr)){ifr.removeNode();}}
this.callSuper("IgDomNode","removeNode");};ig.augment(IgPopup,IgDomNode);function IgPagerLink(e){this.IgUIElement(e);};ig.augment(IgPagerLink,IgUIElement);function IgLink(e){this.IgUIElement(e);};IgLink.prototype.getIconUrl=function(){return this.getAttribute("odiu",false);};IgLink.prototype.getHoverIconUrl=function(){return this.getAttribute("ohiu",false);};IgLink.prototype.repaint=function(){this.callSuper("IgUIElement","repaint");this.updateIcon();};IgLink.prototype.getIcon=function(){return ig.getElementById(this.getId()+"i");};IgLink.prototype.updateIcon=function(){var tmp=(this.isHovered())?this.getHoverIconUrl():this.getIconUrl();if(ig.NaES(tmp)){var e=this.getIcon();if(!ig.isNull(e)){e.src=tmp;}}};ig.augment(IgLink,IgUIElement);function IgHeaderLink(e){this.IgLink(e);};IgHeaderLink.prototype.click=function(){this.toggle();};IgHeaderLink.prototype.collapse=function(){this.callSuper("IgLink","collapse");this.repaint();};IgHeaderLink.prototype.expand=function(){this.callSuper("IgLink","expand");this.repaint();};IgHeaderLink.prototype.getClass=function(){var css=null;if(!this.isEnabled()){css=this.getDisabledClass();}
else{if(this.isExpanded()){if(this.isHovered()){css=this.getExpandedHoverClass();}
else{css=this.getExpandedDefaultClass();}}
else{if(this.isHovered()){css=this.getHoverClass();}}
if(!css){css=this.getDefaultClass();}}
return css;};IgHeaderLink.prototype.getExpandedDefaultClass=function(){return this.getAttribute("oedc",true);};IgHeaderLink.prototype.getExpandedHoverClass=function(){return this.getAttribute("oehc",true);};IgHeaderLink.prototype.getExpandedIconUrl=function(){return this.getAttribute("oediu",false);};IgHeaderLink.prototype.getExpandedHoverIconUrl=function(){return this.getAttribute("oehiu",false);};IgHeaderLink.prototype.updateIcon=function(){var tmp=(this.isHovered())?this.getHoverIconUrl():this.getIconUrl();if(ig.NaES(tmp)){var e=this.getIcon();if(!ig.isNull(e)){e.src=tmp;}}};ig.augment(IgHeaderLink,IgLink);function IgHtmlTable(e){this.IgUIElement(e);};IgHtmlTable.prototype.getCell=function(row,col){var result=null;if(ig.isNumber(row)&&ig.isNumber(col)){var r=this.getRow(row);if(!ig.isNull(r)){var cl=r.elm.cells[col];if(!ig.isNull(cl)){result=new IgDomNode(cl);}}}
return result;};IgHtmlTable.prototype.getColCount=function(){return this.elm.rows[0].cells.length;};IgHtmlTable.prototype.getColGroupCol=function(col){var result=null;var colGroups=this.elm.getElementsByTagName("colgroup");if(ig.isArray(colGroups)){var cols=colGroups[0].getElementsByTagName("col");if(ig.isArray(cols)){if(cols.length>col){result=new IgDomNode(cols[col]);}}}
return result;};IgHtmlTable.prototype.getRow=function(i){var result=null;if(i<this.getRowCount()){var r=this.elm.rows[i];if(!ig.isNull(r)){result=ig.getUIElementById(r);}}
return result;};IgHtmlTable.prototype.getRowCount=function(){return this.elm.rows.length;};IgHtmlTable.prototype.setColGroupColWidth=function(col,w){if(ig.isNumber(col)&&ig.isNumber(w)){var cgc=this.getColGroupCol(col);if(!ig.isNull(cgc)){if(w>0){cgc.setSize(w,null);}}}};IgHtmlTable.prototype.setColumnWidth=function(col,w){var row=this.getRow(0);if(!ig.isNull(row)){var aCell=row.elm.cells[col];if(!ig.isNull(aCell)){aCell=ig.getUIElementById(aCell);aCell.setSize(w);}}};ig.augment(IgHtmlTable,IgUIElement);ig.addEventListener(window,"load",ig.ui.init,false);}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -