Dialog_Tag_Style_Border.js
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:7k
- var OxO24be=["SetStyle","length","","GetStyle","GetText",":",";","cssText","div_selector_event","div_selector","sel_part","tb_margin","sel_margin_unit","tb_padding","sel_padding_unit","tb_border","sel_border_unit","sel_border","sel_style","inp_color","outer","div_demo","offsetWidth","offsetHeight","Top","Left","Bottom","Right","onmousemove","style","border","4px solid red","runtimeStyle","onmouseout","onclick","value","onchange","disabled","selectedIndex","4px solid blue","-","Color"," ","Style","Width","options","margin","padding"]; function pause(Ox396){var Ox10a= new Date();var Ox397=Ox10a.getTime()+Ox396;while(true){ Ox10a= new Date() ;if(Ox10a.getTime()>Ox397){return ;} ;} ;} ; function StyleClass(Ox18e){var Ox399=[];var Ox39a={};if(Ox18e){ Ox39f() ;} ; this[OxO24be[0x0]]=function SetStyle(name,Ox1be,Ox39c){ name=name.toLowerCase() ;for(var i=0x0;i<Ox399[OxO24be[0x1]];i++){if(Ox399[i]==name){break ;} ;} ; Ox399[i]=name ; Ox39a[name]=Ox1be?(Ox1be+(Ox39c||OxO24be[0x2])):OxO24be[0x2] ;} ; this[OxO24be[0x3]]=function GetStyle(name){ name=name.toLowerCase() ;return Ox39a[name]||OxO24be[0x2];} ; this[OxO24be[0x4]]=function Ox39e(){var Ox18e=OxO24be[0x2];for(var i=0x0;i<Ox399[OxO24be[0x1]];i++){var n=Ox399[i];var p=Ox39a[n];if(p){ Ox18e+=n+OxO24be[0x5]+p+OxO24be[0x6] ;} ;} ;return Ox18e;} ; function Ox39f(){var arr=Ox18e.split(OxO24be[0x6]);for(var i=0x0;i<arr[OxO24be[0x1]];i++){var p=arr[i].split(OxO24be[0x5]);var n=p[0x0].replace(/^s+/g,OxO24be[0x2]).replace(/s+$/g,OxO24be[0x2]).toLowerCase(); Ox399[Ox399[OxO24be[0x1]]]=n ; Ox39a[n]=p[0x1] ;} ;} ;} ; function GetStyle(Ox3a0,name){return new StyleClass(Ox3a0.cssText).GetStyle(name);} ; function SetStyle(Ox3a0,name,Ox1be,Ox3a1){var Ox3a2= new StyleClass(Ox3a0.cssText); Ox3a2.SetStyle(name,Ox1be,Ox3a1) ; Ox3a0[OxO24be[0x7]]=Ox3a2.GetText() ;} ; function ParseFloatToString(Ox24){var Oxe=parseFloat(Ox24);if(isNaN(Oxe)){return OxO24be[0x2];} ;return Oxe+OxO24be[0x2];} ;var div_selector_event=Window_GetElement(window,OxO24be[0x8],true);var div_selector=Window_GetElement(window,OxO24be[0x9],true);var sel_part=Window_GetElement(window,OxO24be[0xa],true);var tb_margin=Window_GetElement(window,OxO24be[0xb],true);var sel_margin_unit=Window_GetElement(window,OxO24be[0xc],true);var tb_padding=Window_GetElement(window,OxO24be[0xd],true);var sel_padding_unit=Window_GetElement(window,OxO24be[0xe],true);var tb_border=Window_GetElement(window,OxO24be[0xf],true);var sel_border_unit=Window_GetElement(window,OxO24be[0x10],true);var sel_border=Window_GetElement(window,OxO24be[0x11],true);var sel_style=Window_GetElement(window,OxO24be[0x12],true);var inp_color=Window_GetElement(window,OxO24be[0x13],true);var outer=Window_GetElement(window,OxO24be[0x14],true);var div_demo=Window_GetElement(window,OxO24be[0x15],true); function GetPartFromEvent(){var src=Event_GetSrcElement();var Ox30=Event_GetOffsetX();var Ox2f=Event_GetOffsetY();if(src==div_selector){ Ox30+=0xa ; Ox2f+=0xa ;} ;var Ox2b=0xf-Ox30;var Oxf=Ox30-(div_selector_event[OxO24be[0x16]]-0xf);var Ox25=0xf-Ox2f;var Ox17=Ox2f-(div_selector_event[OxO24be[0x17]]-0xf);if(Ox2b>0x0){if(Ox25>0x0){return Ox2b>Ox25?OxO24be[0x18]:OxO24be[0x19];} ;if(Ox17>0x0){return Ox2b>Ox17?OxO24be[0x1a]:OxO24be[0x19];} ;return OxO24be[0x19];} ;if(Oxf>0x0){if(Ox25>0x0){return Oxf>Ox25?OxO24be[0x18]:OxO24be[0x1b];} ;if(Ox17>0x0){return Oxf>Ox17?OxO24be[0x1a]:OxO24be[0x1b];} ;return OxO24be[0x1b];} ;if(Ox25>0x0){return OxO24be[0x18];} ;if(Ox17>0x0){return OxO24be[0x1a];} ;return OxO24be[0x2];} ; div_selector_event[OxO24be[0x1c]]=function div_selector_event_onmousemove(){var Ox3bb=GetPartFromEvent();if(Browser_IsWinIE()){ div_selector[OxO24be[0x1d]][OxO24be[0x7]]=OxO24be[0x2] ; div_selector[OxO24be[0x1d]][OxO24be[0x1e]+Ox3bb]=OxO24be[0x1f] ;} else { div_selector[OxO24be[0x20]][OxO24be[0x7]]=OxO24be[0x2] ; div_selector[OxO24be[0x20]][OxO24be[0x1e]+Ox3bb]=OxO24be[0x1f] ;} ;} ; div_selector_event[OxO24be[0x21]]=function div_selector_event_onmouseout(){if(Browser_IsWinIE()){ div_selector[OxO24be[0x20]][OxO24be[0x7]]=OxO24be[0x2] ;} else { div_selector[OxO24be[0x1d]][OxO24be[0x7]]=OxO24be[0x2] ;} ;} ; div_selector_event[OxO24be[0x22]]=function div_selector_event_onclick(){ sel_part[OxO24be[0x23]]=GetPartFromEvent() ; SyncToViewInternal() ; UpdateState() ;} ; sel_part[OxO24be[0x24]]=function sel_part_onchange(){ SyncToViewInternal() ; UpdateState() ;} ; UpdateState=function UpdateState_Border(){ tb_border[OxO24be[0x25]]=sel_border_unit[OxO24be[0x25]]=(sel_border[OxO24be[0x26]]>0x0) ; div_demo[OxO24be[0x1d]][OxO24be[0x7]]=element[OxO24be[0x1d]][OxO24be[0x7]] ; div_selector[OxO24be[0x1d]][OxO24be[0x7]]=OxO24be[0x2] ; div_selector[OxO24be[0x1d]][OxO24be[0x1e]+(sel_part[OxO24be[0x23]]||OxO24be[0x2])]=OxO24be[0x27] ;} ; SyncToView=function SyncToView_Border(){var Ox3bb=sel_part[OxO24be[0x23]];var Ox3bc=Ox3bb?OxO24be[0x28]+Ox3bb:Ox3bb;if(Browser_IsWinIE()){ inp_color[OxO24be[0x23]]=element[OxO24be[0x1d]][OxO24be[0x1e]+Ox3bb+OxO24be[0x29]] ;} else {var arr=revertColor(element[OxO24be[0x1d]][OxO24be[0x1e]+Ox3bb+OxO24be[0x29]]).split(OxO24be[0x2a]); inp_color[OxO24be[0x23]]=arr[0x0] ;} ; sel_style[OxO24be[0x23]]=element[OxO24be[0x1d]][OxO24be[0x1e]+Ox3bb+OxO24be[0x2b]] ; sel_border[OxO24be[0x23]]=element[OxO24be[0x1d]][OxO24be[0x1e]+Ox3bb+OxO24be[0x2c]] ;var Ox4a1=element[OxO24be[0x1d]][OxO24be[0x1e]+Ox3bb+OxO24be[0x2c]]; tb_border[OxO24be[0x23]]=ParseFloatToString(Ox4a1) ;if(tb_border[OxO24be[0x23]]){for(var i=0x0;i<sel_border_unit[OxO24be[0x2d]][OxO24be[0x1]];i++){var Ox60=sel_border_unit[OxO24be[0x2d]][i][OxO24be[0x23]];if(Ox60&&Ox4a1.indexOf(Ox60)!=-0x1){ sel_border_unit[OxO24be[0x26]]=i ;break ;} ;} ;} ;var Ox4a2=element[OxO24be[0x1d]][OxO24be[0x2e]+Ox3bb]; tb_margin[OxO24be[0x23]]=ParseFloatToString(Ox4a2) ;if(tb_margin[OxO24be[0x23]]){for(var i=0x0;i<sel_margin_unit[OxO24be[0x2d]][OxO24be[0x1]];i++){var Ox60=sel_margin_unit[OxO24be[0x2d]][i][OxO24be[0x23]];if(Ox60&&Ox4a2.indexOf(Ox60)!=-0x1){ sel_margin_unit[OxO24be[0x26]]=i ;break ;} ;} ;} ;var Ox4a3=element[OxO24be[0x1d]][OxO24be[0x2f]+Ox3bb]; tb_padding[OxO24be[0x23]]=ParseFloatToString(Ox4a3) ;if(tb_padding[OxO24be[0x23]]){for(var i=0x0;i<sel_padding_unit[OxO24be[0x2d]][OxO24be[0x1]];i++){var Ox60=sel_padding_unit[OxO24be[0x2d]][i][OxO24be[0x23]];if(Ox60&&Ox4a3.indexOf(Ox60)!=-0x1){ sel_padding_unit[OxO24be[0x26]]=i ;break ;} ;} ;} ;} ; SyncTo=function SyncTo_Border(element){var Ox3bb=sel_part[OxO24be[0x23]];var Ox3bc=Ox3bb?OxO24be[0x28]+Ox3bb:Ox3bb;var Ox3bd=OxO24be[0x2];if(sel_border[OxO24be[0x26]]>0x0){ Ox3bd=sel_border[OxO24be[0x23]] ;} else {if(ParseFloatToString(tb_border.value)){ Ox3bd=ParseFloatToString(tb_border.value)+sel_border_unit[OxO24be[0x23]] ;} else { Ox3bd=OxO24be[0x2] ;} ;} ;var Ox70=inp_color[OxO24be[0x23]]||OxO24be[0x2];var Ox3a0=sel_style[OxO24be[0x23]]||OxO24be[0x2];if(Ox3bd||Ox3a0){ SetStyle(element[OxO24be[0x1d]],OxO24be[0x1e]+Ox3bc,Ox3bd+OxO24be[0x2a]+Ox3a0+OxO24be[0x2a]+Ox70) ;} else { SetStyle(element[OxO24be[0x1d]],OxO24be[0x1e]+Ox3bc,OxO24be[0x2]) ;} ; SetStyle(element[OxO24be[0x1d]],OxO24be[0x2e]+Ox3bc,ParseFloatToString(tb_margin.value),sel_margin_unit.value) ; SetStyle(element[OxO24be[0x1d]],OxO24be[0x2f]+Ox3bc,ParseFloatToString(tb_padding.value),sel_padding_unit.value) ;} ;