📄 ig_weblistbarie4.js
字号:
/*
Infragistics Listbar Script
Version 5.1.20051.37
Copyright (c) 2002-2004 Infragistics, Inc. All Rights Reserved.
*/
var ig_dom;
var ig_IE;
var iglbar_SourceGroup;
var iglbar_CloneGroup;
var iglbar_CurrentX=0;
var iglbar_CurrentY=0;
function ig_initialize() {
ig_dom = (document.getElementById) ? true : false;
ig_IE = (document.all) ? true : false;
ig_IE4 = ig_IE && !ig_dom;
ig_IE5 = ig_IE && ig_dom;
ig_Mac = (navigator.appVersion.indexOf("Mac") != -1);
ig_IE5M = ig_IE5 && ig_Mac;
ig_IEW = ig_IE && !ig_Mac;
ig_IE4W = ig_IE4 && ig_IEW;
ig_IE5W = ig_IE5 && ig_IEW;
ig_NS = navigator.appName == ("Netscape");
ig_NS4 = (document.layers) ? true : false;
ig_NS6 = navigator.vendor == ("Netscape6");
if(ig_IE5M) {
ig_DOM = false; ig_IE4 = true;
}
}
//Return the html Element with the specified id.
function iglbar_getElementById(tagName) {
if(ig_dom==null)ig_initialize();
if(ig_IE)
return document.all[tagName];
else
{
return document.getElementById(tagName);
}
}
//Return an iglbar_Group object associated with the specified id.
function iglbar_getGroupById(id){
var parts=id.split("_");
var barId=parts[0];
var bar=iglbar_getListbarById(barId);
return bar.Groups[parts[2]];
}
//Return an iglbar_Item object associated with the specified id.
function iglbar_getItemById(id){
var parts=id.split("_");
var barId=parts[0];
var bar=iglbar_getListbarById(barId);
return bar.Groups[parts[1]].Items[parts[3]];
}
function iglbar_adjust(lbar){
var i=0;
var moveToBottom=false;
var group=new Array(2);
while(lbar.Groups[i]!=null){
group[0]=iglbar_getElementById(lbar.Groups[i].Id+"_top_tr");
group[1]=iglbar_getElementById(lbar.Groups[i].Id+"_bottom_tr");
iglbar_getElementById(lbar.Id+"_Items_"+i.toString()).style.display="none";
if(!moveToBottom){
if(lbar.Groups[i]==lbar.SelectedGroup){
moveToBottom=true;
iglbar_getElementById(lbar.Id+"_Items_"+i.toString()).style.display="";
}
group[0].style.display="";
group[1].style.display="none";
}
else{
if(ig.getElementById(lbar.Id+"_BotGroup").style.display=="none")ig.getElementById(lbar.Id+"_BotGroup").style.display="";
group[1].style.display="";
group[0].style.display="none";
}
i++;
}
iglbar_getElementById(lbar.Id+"_Items").className=lbar.SelectedGroup.GroupStyleClassName;
}
function iglbar_groupHeaderMouseOver(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var group=iglbar_getGroupById(src.id);
if(group==null||!group.getExpanded()||!group.Enabled)return;
src.className=group.HeaderAppearance.HoverAppearance.ClassName;
}
function iglbar_groupHeaderMouseOut(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var group=iglbar_getGroupById(src.id);
if(group==null||!group.Enabled)return;
if(group.getExpanded())
src.className=group.HeaderAppearance.ExpandedAppearance.ClassName;
else src.className=group.HeaderAppearance.CollapsedAppearance.ClassName;
}
function iglbar_headerClick(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var group=iglbar_getGroupById(src.id);
if(group.getEnabled())iglbar_navigate(group.TargetUrl,group.TargetFrame);
if(group.Control.HeaderClickAction==0)
iglbar_toggleGroup(e,src);
}
function iglbar_headerDoubleClick(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var group=iglbar_getGroupById(src.id);
if(group.Control.HeaderClickAction==1)
iglbar_toggleGroup(e,src);
}
function iglbar_groupButtonClicked(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var group=iglbar_getGroupById(src.id);
if(group==null||group.Control==null||group==group.Control.SelectedGroup||!group.Enabled)return;
group.setSelected(true);
iglbar_navigate(group.TargetUrl,group.TargetFrame);
}
function iglbar_groupButtonMouseOver(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var group=iglbar_getGroupById(src.id);
if(group==null||group.getSelected()||!group.Enabled)return;
src.className=group.ButtonHoverStyleClassName;
}
function iglbar_groupButtonMouseOut(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var group=iglbar_getGroupById(src.id);
if(group==null||group.getSelected()||!group.Enabled)return;
src.className=group.ButtonStyleClassName;
}
function iglbar_itemClicked(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var item=iglbar_getItemById(src.id);
if(!item.Enabled||!item.Group.Enabled)return;
if(item==null||item.getSelected())return;
item.setSelected(true);
}
function iglbar_itemMouseOver(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var item=iglbar_getItemById(src.id);
if(item.getSelected()||!item.Enabled||!item.Group.Enabled)return;
if(item.SelectionStyle==1)
item.getImage().className=item.HoverStyleClassName;
else src.className=item.HoverStyleClassName;
}
function iglbar_itemMouseOut(e,src){
e = (e) ? e : ((window.event) ? window.event : "");
var item=iglbar_getItemById(src.id);
if(item.getSelected()||!item.Enabled||!item.Group.Enabled)return;
if(item.SelectionStyle==1)
item.getImage().className=item.DefaultStyleClassName;
else src.className=item.DefaultStyleClassName;
}
function iglbar_navigate(targetUrl,targetFrame){
if(targetUrl==null||targetUrl==""||targetUrl.length==0)return;
if(targetFrame==null||targetFrame == ""||targetFrame.length==0)
targetFrame=null;
if(targetUrl.indexOf("javascript") != -1)
eval(targetUrl);
else
if(targetFrame != null){
if(iglbar_getElementById(targetFrame) != null) {
iglbar_getElementById(targetFrame).src = targetUrl;
}
else
if(eval("parent.frames."+targetFrame) != null) {
eval("parent.frames."+targetFrame+".location=\""+targetUrl+"\";");
}
else {
window.open(targetUrl);
}
}
else
{
location.href = targetUrl;
}
}
function UltraWebListbar(id,groups){
var props=eval(id+"_propsArray");
this.Id=id;
this.uniqueID=eval(id+"UniqueID");
this.Groups=groups;
this.Groups.valueChanged=false;
this.SelectedGroup=this.Groups[props[1]];
if(this.SelectedGroup!=null)this.SelectedGroup.selected=true;
this.SelectedItem=this.SelectedGroup.Items[props[2]];
this.HeaderClickAction=props[3];
this.enabled=props[4];
this.getEnabled=iglbar_getEnabled;
this.setEnabled=iglbar_setEnabled;
this.PostBackOnGroupClick=props[5];
this.PostBackOnItemClick=props[6];
this.PostBackOnGroupExpanded=props[7];
this.PostBackOnGroupCollapsed=props[8];
if(this.SelectedItem!=null)this.SelectedItem.selected=true;
var i=0;
while(groups[i]!=null){
groups[i].Control=this;
i++;
}
}
function iglbar_HeaderStyle(style,xpndImage,image){
this.ClassName=style;
this.ExpansionIndicatorImageUrl=xpndImage;
this.ImageUrl=image;
}
function iglbar_Header(xpnd,clpse,hover,xpandId,imageId){
this.ExpandedAppearance=xpnd;
this.CollapsedAppearance=clpse;
this.HoverAppearance=hover;
this.ExpansionIndicator=iglbar_getElementById(xpandId);
this.Image=iglbar_getElementById(imageId);
}
function iglbar_ExplorerBarGroup(id,text,key,enabled,groupStyle,headerAppearance,itemIconStyle,itemSelectionStyle,expanded,targetUrl,targetFrame,items){
this.Id=id;
this.Element=iglbar_getElementById(id+"_group");
this.Key=key;
this.enabled=enabled;
this.getEnabled=iglbar_isGroupEnabled;
this.setEnabled=iglbar_setEnabled;
this.GroupStyleClassName=groupStyle;
this.HeaderAppearance=headerAppearance;
this.ItemIconStyle=itemIconStyle;
this.ItemSelectionStyle=itemSelectionStyle;
this.Items=items;
this.Items.ValueChanged=false;
this.TargetUrl=targetUrl;
this.TargetFrame=targetFrame;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -