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

📄 radtoolbar.js

📁 Telerik是很大的第三方软件制造商
💻 JS
字号:
if (typeof(window.RadToolbarNamespace)=="\x75\x6edefined"){window.RadToolbarNamespace=new Object(); } ; function RadToolbar(ClientID){ this.ClientID=ClientID; this.o=document.getElementById(this.ClientID+"toolb\x61\x72"); this.O1=18; this.l1=17; this.i1= false; var U=this ; this.I1= function (e){U.OnKeyDown(e); } ; this.o2= function (e){U.O2(e); } ; this.l2(document,"ke\x79\x64o\x77\x6e",this.I1); this.l2(document,"\153\x65\x79up",this.o2); } ; RadToolbar.prototype.Start= function (){var U=this ; this.i2= function (e){U.I2(e); } ; this.l2(window,"\x6coad",this.i2); this.o3(); this.O3(); } ; RadToolbar.prototype.I2= function (e){if (!this.DockableObjectID){return; }var l3=RadDock_GetDockableObject(this.DockableObjectID); var U=this ; l3.radToolbar=U; l3.AddEventHandler("DockState\x43\x68ang\x65\x64",U.DockableObjectHandler); };RadToolbar.prototype.DockableObjectHandler= function (i3,e){var radToolbar=i3.radToolbar; if (!radToolbar){return; }var I3= true; if (e.docked){I3=((i3.ParentDockingZone.Type&RadDockingZoneTypeFlags.Horizontal)>0); }if (I3){if (this.o4 && this.O4){i3.style.width=this.O4+"\x70x"; i3.style.height=this.o4+"\x70x"; }radToolbar.MakeHorizontal(); }else { this.o4=i3.offsetHeight; this.O4=i3.offsetWidth; i3.style.width="1\x70\x78"; i3.style.height="1p\x78"; radToolbar.MakeVertical(); }};RadToolbarNamespace.l4= function (i4){i4.returnValue= false; i4.cancelBubble= true; if (i4.stopPropagation){i4.stopPropagation(); }return false; };RadToolbar.prototype.attachEvent= function (R,r){ this.AttachEvent(R,r); };RadToolbar.prototype.AttachEvent= function (R,r){var I4=this.o5(r); var O5= function (l5,e){return I4(l5,e); };this[R+"\x48andle\x72"]=O5; } ; RadToolbar.prototype.l2= function (S,R,r){try {if (document.all){S.attachEvent("\x6f\x6e"+R,r); }else {S.addEventListener(R,r, true); }}catch (Q){}} ; RadToolbar.prototype.o5= function (i5){var O5= function (l5,e){} ; if (typeof(i5).toString().toLowerCase()=="fu\x6e\x63tion"){O5=i5; }else if (typeof(i5).toString().toLowerCase()=="string"){try {O5=eval(i5);}catch (Q){}}return O5; } ; RadToolbarNamespace.AppendStyleSheet= function (I5,o6){var O6=(navigator.appName=="Micr\x6f\x73oft I\x6e\x74ern\x65t Expl\x6f\162\x65\162") && ((navigator.userAgent.toLowerCase().indexOf("\x6dac")!=-1) || (navigator.appVersion.toLowerCase().indexOf("mac")!=-1)); var l6=(navigator.userAgent.toLowerCase().indexOf("\x73afari")!=-1); if (O6 || l6){document.write("<"+"link"+" rel=\047styleshe\x65\164\047\x20ty\x70\x65=\047\x74ext\x2f\143\x73s\047\x20hr\x65\146=\x27"+o6+"\047\x3e"); }else {var i6=document.createElement("LINK"); i6.rel="\x73tyleshee\x74"; i6.type="text/c\x73\x73"; i6.href=o6; document.getElementById(I5+"\x53tyleS\x68\x65etHo\x6c\x64er").appendChild(i6); }} ; RadToolbar.prototype.I6= function (l5,e){if (this.OnClientOrientationChangedHandler!=null){var O5=this.OnClientOrientationChangedHandler; return O5(l5,e); }} ; RadToolbar.prototype.l= function (l5,e){if (this.OnClientMouseOverHandler!=null){var O5=this.OnClientMouseOverHandler; return O5(l5,e); }} ; RadToolbar.prototype.k= function (l5,e){if (this.OnClientMouseOutHandler!=null){var O5=this.OnClientMouseOutHandler; return O5(l5,e); }} ; RadToolbar.prototype.M= function (l5,e){if (this.o7 && !this.PostBackEventOptions){if (!(typeof(Page_ClientValidate)!="fun\x63tion" || Page_ClientValidate())){return; }}if (this.OnClientClickHandler!=null){var O5=this.OnClientClickHandler; var F=O5(l5,e); if (F== false){return; }} this.O3(); if (this.AutoPostBack){if (this.PostBackEventOptions){var O7=this.PostBackEventOptions.replace(/\x40\x40\x61\x72\x67\x75\x6d\x65\x6e\x74\x40\x40/g,"o\x6e\x63lick#"+l5.CommandName); eval(O7); }else {var l7=this.PostBackFunction.replace(/\x40\x40\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x40\x40/g,"on\x63lick\x23"+l5.CommandName); eval(l7); }}} ; RadToolbar.prototype.H= function (l5,e){if (this.OnClientMouseDownHandler!=null){var O5=this.OnClientMouseDownHandler; return O5(l5,e); }} ; RadToolbar.prototype.o1= function (l5,e){if (this.OnClientButtonToggledHandler!=null){var O5=this.OnClientButtonToggledHandler; return O5(l5,e); }} ; RadToolbar.prototype.OnKeyDown= function (e){if (e.keyCode==this.O1 && this.ShortcutKey.toLowerCase()=="\x61lt"){ this.i1= true; }if (e.keyCode==this.l1 && this.ShortcutKey.toLowerCase()=="cont\x72\x6fl"){ this.i1= true; }if (this.i1 && (e.keyCode!=this.O1 && e.keyCode!=this.l1)){for (var i=0; i<this.NumberOfButtons; i++){var AccessKey=this.i7[i].AccessKey; if (AccessKey && AccessKey.toLowerCase()==String.fromCharCode(e.keyCode).toLowerCase() && this.i7[i].Enabled){ this.i7[i].P(); }}}} ; RadToolbar.prototype.O2= function (e){if (e.keyCode==this.O1 && this.ShortcutKey.toLowerCase()=="alt"){ this.i1= false; }if (e.keyCode==this.l1 && this.ShortcutKey.toLowerCase()=="control"){ this.i1= false; }};RadToolbar.prototype.MakeVertical= function (){if (this.Orientation.toLowerCase()!="vertica\x6c"){ this.I7(); }};RadToolbar.prototype.MakeHorizontal= function (){if (this.Orientation.toLowerCase()!="hor\x69\x7aontal"){ this.o8(); }};RadToolbar.prototype.ToggleONButton= function (CommandName){ this.ToggleButton( true ,CommandName); } ; RadToolbar.prototype.ToggleOFFButton= function (CommandName){ this.ToggleButton( false ,CommandName); } ; RadToolbar.prototype.DisableButton= function (CommandName){var O8=this.GetButtonByCommand(CommandName); if (O8==-1){alert("Canno\x74\x20find\x20\x61 but\x74on with\x20\163\x75\143h\x20\x63\x6fmma\x6e\144 \x6e\141m\x65!"); }O8.DisableButton(); this.O3(); } ; RadToolbar.prototype.EnableButton= function (CommandName){var O8=this.GetButtonByCommand(CommandName); if (O8==-1){alert("\x43\x61nnot f\x69\x6ed a \x62\x75tt\x6f\x6e wi\x74\150 \x73\165\x63\x68 c\x6f\155m\x61nd na\x6d\145!"); }O8.EnableButton(); this.O3(); } ; RadToolbar.prototype.ShowButton= function (CommandName){var O8=this.GetButtonByCommand(CommandName); if (O8==-1){alert("Cannot f\x69\x6ed a \x62\x75tto\x6e\040\x77ith suc\x68\x20co\x6dmand n\x61\155e\x21"); }O8.ShowButton(); this.O3(); } ; RadToolbar.prototype.HideButton= function (CommandName){var O8=this.GetButtonByCommand(CommandName); if (O8==-1){alert("\x43annot\x20\x66ind \x61\x20but\x74\x6fn w\x69\x74h \x73\x75ch\x20comman\x64\040\x6e\141m\x65!"); }O8.HideButton(); this.O3(); } ; RadToolbar.prototype.o0= function (){var O0=""; O0+=this.Orientation+"\x23"; for (var i=0; i<(this.NumberOfButtons-1); i++){O0+=this.i7[i].o0()+"#"; }O0+=this.i7[i].o0(); return O0; } ; RadToolbar.prototype.GetButtonByCommand= function (CommandName){for (var i=0; i<this.NumberOfButtons; i++){if (this.ButtonCommandArray[i]==CommandName){return this.i7[i]; }}return -1; } ; RadToolbar.prototype.l8= function (){if (this.o.rows.length>1){return "verti\x63\x61l"; }else {return "\x68orizonta\x6c"; }};RadToolbar.prototype.I7= function (){if (this.l8()=="v\x65\x72tical"){return; }var i8=this.o.rows[0]; var NumberOfButtons=i8.cells.length; if (!this.DisplayEnds){i8.cells[0].className=this.Skin+"_radtoolbar\x5f\x76ert\x69\x63al"; }for (var i=1; i<(NumberOfButtons); i++){var I8=i8.cells[1]; I8.className=this.Skin+"_radtoo\x6c\x62ar_v\x65\x72tica\x6c"; I8.parentNode.removeChild(I8); var o9=this.o.insertRow(this.o.rows.length); o9.appendChild(I8); } this.Orientation="vertica\x6c"; this.O9(); } ; RadToolbar.prototype.o8= function (){if (this.l8()=="\x68orizontal"){return; }var i8=this.o.rows[0]; var NumberOfButtons=this.o.rows.length; if (!this.DisplayEnds){ this.o.rows[0].cells[0].className=this.Skin+"_radto\x6f\x6cbar_\x68\x6frizo\x6etal";}for (var i=1; i<NumberOfButtons; i++){var l9=this.o.rows[1]; var I8=l9.cells[0]; I8.className=this.Skin+"_ra\x64\x74oolbar\x5f\150\x6f\x72izo\x6e\164a\x6c"; i8.appendChild(I8); l9.parentNode.removeChild(l9); } this.Orientation="hori\x7a\x6fntal"; this.O9(); } ; RadToolbar.prototype.O9= function (){ this.i9(); this.I9(); this.I6(this,this.Orientation); this.O3(); };RadToolbar.prototype.I9= function (){if (!this.DisplayEnds){return; }if (this.Orientation.toLowerCase()=="hor\x69\x7aontal"){var oa=document.getElementById(this.ClientID+"_topleft"); oa.className=this.Skin+"_ra\x64\x74oolbar\x5f\x6ceft"; var Oa=document.getElementById(this.ClientID+"_\x62o\x74\x72igh\x74"); Oa.className=this.Skin+"\x5fradtool\x62\x61r_ri\x67\x68t"; }else {var oa=document.getElementById(this.ClientID+"_t\x6f\x70left"); oa.className=this.Skin+"\x5f\x72adtoo\x6c\x62ar_\x74\x6fp"; var Oa=document.getElementById(this.ClientID+"\x5fbotri\x67\x68t"); Oa.className=this.Skin+"\x5fradtool\x62\x61r_bo\x74"; }} ; RadToolbar.prototype.i9= function (){for (var i in this.SeparatorIDArray){var la=document.getElementById(this.SeparatorIDArray[i]); if (this.Orientation.toLowerCase()=="\x68orizo\x6e\x74al"){la.className=this.Skin+"_r\x61\x64separa\x74\x6fr_h"; }else {la.className=this.Skin+"\x5f\x72adsep\x61\x72ato\x72\x5fv"; }}};RadToolbar.prototype.i0= function (O8){for (var i=0; i<this.NumberOfButtons; i++){if (this.i7[i].IsToggle && this.i7[i].ButtonGroup==O8.ButtonGroup){if (this.i7[i].ClientID!=O8.ClientID){if (this.i7[i].Toggled){ this.i7[i].ToggleButton( false); }}else { this.i7[i].ToggleButton(!O8.Toggled); }}}} ; RadToolbar.prototype.O3= function (){var ia=document.getElementById(this.HiddenInputID); ia.value=this.o0(); } ; RadToolbar.prototype.o3= function (){ this.i7=new Array(); for (var i=0; i<this.NumberOfButtons; i++){var object=window[this.ButtonIDArray[i]]; object.n=this ; this.i7[i]=object; } this.Ia=new Array(); for (var i=0; i<this.NumberOfButtons; i++){ this.Ia[i]=document.getElementById(this.ButtonIDArray[i]); }} ; RadToolbar.prototype.ToggleButton= function (I0,CommandName){var O8=this.GetButtonByCommand(CommandName); if (O8==-1){alert("\x43annot\x20\x66ind \x61\x20but\x74on wit\x68\x20suc\x68\040\x63omm\x61nd n\x61\155e\x21"); }if (O8.Toggled==I0){return; }else {O8.N(); }} ;

⌨️ 快捷键说明

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