Dialog_Tag_Style_Background.js
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:6k
源码类别:

OA系统

开发平台:

C#

  1. var OxO7451=["SetStyle","length","","GetStyle","GetText",":",";","cssText","inp_color","tb_image","btnbrowse","sel_bgrepeat","sel_bgattach","sel_hor","tb_hor","sel_hor_unit","sel_ver","tb_ver","sel_ver_unit","outer","div_demo","onclick","value","disabled","selectedIndex","style","backgroundImage","backgroundColor","backgroundRepeat","backgroundAttachment","backgroundPositionX","options","backgroundPositionY","url(",")","background-image","backgroundPosition","none"]; 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[OxO7451[0x0]]=function SetStyle(name,Ox1be,Ox39c){ name=name.toLowerCase() ;for(var i=0x0;i<Ox399[OxO7451[0x1]];i++){if(Ox399[i]==name){break ;} ;} ; Ox399[i]=name ; Ox39a[name]=Ox1be?(Ox1be+(Ox39c||OxO7451[0x2])):OxO7451[0x2] ;}  ; this[OxO7451[0x3]]=function GetStyle(name){ name=name.toLowerCase() ;return Ox39a[name]||OxO7451[0x2];}  ; this[OxO7451[0x4]]=function Ox39e(){var Ox18e=OxO7451[0x2];for(var i=0x0;i<Ox399[OxO7451[0x1]];i++){var n=Ox399[i];var p=Ox39a[n];if(p){ Ox18e+=n+OxO7451[0x5]+p+OxO7451[0x6] ;} ;} ;return Ox18e;}  ; function Ox39f(){var arr=Ox18e.split(OxO7451[0x6]);for(var i=0x0;i<arr[OxO7451[0x1]];i++){var p=arr[i].split(OxO7451[0x5]);var n=p[0x0].replace(/^s+/g,OxO7451[0x2]).replace(/s+$/g,OxO7451[0x2]).toLowerCase(); Ox399[Ox399[OxO7451[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[OxO7451[0x7]]=Ox3a2.GetText() ;}  ; function ParseFloatToString(Ox24){var Oxe=parseFloat(Ox24);if(isNaN(Oxe)){return OxO7451[0x2];} ;return Oxe+OxO7451[0x2];}  ;var inp_color=Window_GetElement(window,OxO7451[0x8],true);var tb_image=Window_GetElement(window,OxO7451[0x9],true);var btnbrowse=Window_GetElement(window,OxO7451[0xa],true);var sel_bgrepeat=Window_GetElement(window,OxO7451[0xb],true);var sel_bgattach=Window_GetElement(window,OxO7451[0xc],true);var sel_hor=Window_GetElement(window,OxO7451[0xd],true);var tb_hor=Window_GetElement(window,OxO7451[0xe],true);var sel_hor_unit=Window_GetElement(window,OxO7451[0xf],true);var sel_ver=Window_GetElement(window,OxO7451[0x10],true);var tb_ver=Window_GetElement(window,OxO7451[0x11],true);var sel_ver_unit=Window_GetElement(window,OxO7451[0x12],true);var outer=Window_GetElement(window,OxO7451[0x13],true);var div_demo=Window_GetElement(window,OxO7451[0x14],true); btnbrowse[OxO7451[0x15]]=function btnbrowse_onclick(){ function Ox20e(Ox330){if(Ox330){ tb_image[OxO7451[0x16]]=Ox330 ;} ;}  ; editor.SetNextDialogWindow(window) ;if(Browser_IsSafari()){ editor.ShowSelectImageDialog(Ox20e,tb_image.value,tb_image) ;} else { editor.ShowSelectImageDialog(Ox20e,tb_image.value) ;} ;}  ; UpdateState=function UpdateState_Background(){ tb_hor[OxO7451[0x17]]=sel_hor_unit[OxO7451[0x17]]=(sel_hor[OxO7451[0x18]]>0x0) ; tb_ver[OxO7451[0x17]]=sel_ver_unit[OxO7451[0x17]]=(sel_ver[OxO7451[0x18]]>0x0) ; div_demo[OxO7451[0x19]][OxO7451[0x7]]=element[OxO7451[0x19]][OxO7451[0x7]] ;}  ; SyncToView=function SyncToView_Background(){ tb_image[OxO7451[0x16]]=element[OxO7451[0x19]][OxO7451[0x1a]] ; FixTbImage() ; inp_color[OxO7451[0x16]]=element[OxO7451[0x19]][OxO7451[0x1b]] ; inp_color[OxO7451[0x19]][OxO7451[0x1b]]=element[OxO7451[0x19]][OxO7451[0x1b]] ; sel_bgrepeat[OxO7451[0x16]]=element[OxO7451[0x19]][OxO7451[0x1c]] ; sel_bgattach[OxO7451[0x16]]=element[OxO7451[0x19]][OxO7451[0x1d]] ; sel_hor[OxO7451[0x16]]=element[OxO7451[0x19]][OxO7451[0x1e]] ; sel_hor_unit[OxO7451[0x18]]=0x0 ;if(sel_hor[OxO7451[0x18]]==-0x1){if(ParseFloatToString(element[OxO7451[0x19]].backgroundPositionX)){ tb_hor[OxO7451[0x16]]=ParseFloatToString(element[OxO7451[0x19]].backgroundPositionX) ;for(var i=0x0;i<sel_hor_unit[OxO7451[0x1f]][OxO7451[0x1]];i++){var Ox60=sel_hor_unit[OxO7451[0x1f]][i][OxO7451[0x16]];if(Ox60&&element[OxO7451[0x19]][OxO7451[0x1e]].indexOf(Ox60)!=-0x1){ sel_hor_unit[OxO7451[0x18]]=i ;break ;} ;} ;} ;} ; sel_ver[OxO7451[0x16]]=element[OxO7451[0x19]][OxO7451[0x20]] ; sel_ver_unit[OxO7451[0x18]]=0x0 ;if(sel_ver[OxO7451[0x18]]==-0x1){if(ParseFloatToString(element[OxO7451[0x19]].backgroundPositionY)){ tb_ver[OxO7451[0x16]]=ParseFloatToString(element[OxO7451[0x19]].backgroundPositionY) ;for(var i=0x0;i<sel_ver_unit[OxO7451[0x1f]][OxO7451[0x1]];i++){var Ox60=sel_ver_unit[OxO7451[0x1f]][i][OxO7451[0x16]];if(Ox60&&element[OxO7451[0x19]][OxO7451[0x20]].indexOf(Ox60)!=-0x1){ sel_ver_unit[OxO7451[0x18]]=i ;break ;} ;} ;} ;} ;}  ; SyncTo=function SyncTo_Background(element){if(tb_image[OxO7451[0x16]]){ element[OxO7451[0x19]][OxO7451[0x1a]]=OxO7451[0x21]+tb_image[OxO7451[0x16]]+OxO7451[0x22] ;} else { SetStyle(element.style,OxO7451[0x23],OxO7451[0x2]) ;} ;try{ element[OxO7451[0x19]][OxO7451[0x1b]]=inp_color[OxO7451[0x16]]||OxO7451[0x2] ;} catch(x){ element[OxO7451[0x19]][OxO7451[0x1b]]=OxO7451[0x2] ;} ; element[OxO7451[0x19]][OxO7451[0x1c]]=sel_bgrepeat[OxO7451[0x16]]||OxO7451[0x2] ; element[OxO7451[0x19]][OxO7451[0x1d]]=sel_bgattach[OxO7451[0x16]]||OxO7451[0x2] ; element[OxO7451[0x19]][OxO7451[0x24]]=OxO7451[0x2] ;if(sel_hor[OxO7451[0x18]]>0x0){ element[OxO7451[0x19]][OxO7451[0x1e]]=sel_hor[OxO7451[0x16]] ;} else {if(ParseFloatToString(tb_hor.value)){ element[OxO7451[0x19]][OxO7451[0x1e]]=ParseFloatToString(tb_hor.value)+sel_hor_unit[OxO7451[0x16]] ;} else { element[OxO7451[0x19]][OxO7451[0x1e]]=OxO7451[0x2] ;} ;} ;if(sel_ver[OxO7451[0x18]]>0x0){ element[OxO7451[0x19]][OxO7451[0x20]]=sel_ver[OxO7451[0x16]] ;} else {if(ParseFloatToString(tb_ver.value)){ element[OxO7451[0x19]][OxO7451[0x20]]=ParseFloatToString(tb_ver.value)+sel_ver_unit[OxO7451[0x16]] ;} else { element[OxO7451[0x19]][OxO7451[0x20]]=OxO7451[0x2] ;} ;} ;}  ; function FixTbImage(){var Ox60=tb_image[OxO7451[0x16]].replace(/^(s+)/g,OxO7451[0x2]).replace(/(s+)$/g,OxO7451[0x2]);if(Ox60.substr(0x0,0x4).toLowerCase()==OxO7451[0x21]){ Ox60=Ox60.substr(0x4,Ox60[OxO7451[0x1]]-0x4) ;} ;if(Ox60.substr(Ox60[OxO7451[0x1]]-0x1,0x1)==OxO7451[0x22]){ Ox60=Ox60.substr(0x0,Ox60[OxO7451[0x1]]-0x1) ;} ;if(Ox60==OxO7451[0x25]){ Ox60=OxO7451[0x2] ;} ; tb_image[OxO7451[0x16]]=Ox60 ;}  ;