You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.1 KiB

var OxO7a34=["SetStyle","length","","GetStyle","GetText",":",";","cssText","inp_color","inp_color_Preview","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(Ox4a1){var Oxa8= new Date();var Ox4a2=Oxa8.getTime()+Ox4a1;while(true){Oxa8= new Date();if(Oxa8.getTime()>Ox4a2){return ;} ;} ;} ;function StyleClass(Ox201){var Ox4a4=[];var Ox4a5={};if(Ox201){Ox4aa();} ;this[OxO7a34[0]]=function SetStyle(name,Ox4f,Ox4a7){name=name.toLowerCase();for(var i=0;i<Ox4a4[OxO7a34[1]];i++){if(Ox4a4[i]==name){break ;} ;} ;Ox4a4[i]=name;Ox4a5[name]=Ox4f?(Ox4f+(Ox4a7||OxO7a34[2])):OxO7a34[2];} ;this[OxO7a34[3]]=function GetStyle(name){name=name.toLowerCase();return Ox4a5[name]||OxO7a34[2];} ;this[OxO7a34[4]]=function Ox4a9(){var Ox201=OxO7a34[2];for(var i=0;i<Ox4a4[OxO7a34[1]];i++){var Ox27=Ox4a4[i];var p=Ox4a5[Ox27];if(p){Ox201+=Ox27+OxO7a34[5]+p+OxO7a34[6];} ;} ;return Ox201;} ;function Ox4aa(){var arr=Ox201.split(OxO7a34[6]);for(var i=0;i<arr[OxO7a34[1]];i++){var p=arr[i].split(OxO7a34[5]);var Ox27=p[0].replace(/^\s+/g,OxO7a34[2]).replace(/\s+$/g,OxO7a34[2]).toLowerCase();Ox4a4[Ox4a4[OxO7a34[1]]]=Ox27;Ox4a5[Ox27]=p[1];} ;} ;} ;function GetStyle(Ox137,name){return new StyleClass(Ox137.cssText).GetStyle(name);} ;function SetStyle(Ox137,name,Ox4f,Ox4ab){var Ox4ac= new StyleClass(Ox137.cssText);Ox4ac.SetStyle(name,Ox4f,Ox4ab);Ox137[OxO7a34[7]]=Ox4ac.GetText();} ;function ParseFloatToString(Ox24){var Ox8=parseFloat(Ox24);if(isNaN(Ox8)){return OxO7a34[2];} ;return Ox8+OxO7a34[2];} ;var inp_color=Window_GetElement(window,OxO7a34[8],true);var inp_color_Preview=Window_GetElement(window,OxO7a34[9],true);var tb_image=Window_GetElement(window,OxO7a34[10],true);var btnbrowse=Window_GetElement(window,OxO7a34[11],true);var sel_bgrepeat=Window_GetElement(window,OxO7a34[12],true);var sel_bgattach=Window_GetElement(window,OxO7a34[13],true);var sel_hor=Window_GetElement(window,OxO7a34[14],true);var tb_hor=Window_GetElement(window,OxO7a34[15],true);var sel_hor_unit=Window_GetElement(window,OxO7a34[16],true);var sel_ver=Window_GetElement(window,OxO7a34[17],true);var tb_ver=Window_GetElement(window,OxO7a34[18],true);var sel_ver_unit=Window_GetElement(window,OxO7a34[19],true);var outer=Window_GetElement(window,OxO7a34[20],true);var div_demo=Window_GetElement(window,OxO7a34[21],true);btnbrowse[OxO7a34[22]]=function btnbrowse_onclick(){function Ox35c(Ox13e){if(Ox13e){tb_image[OxO7a34[23]]=Ox13e;FireUIChanged();} ;} ;editor.SetNextDialogWindow(window);if(Browser_IsSafari()){editor.ShowSelectImageDialog(Ox35c,tb_image.value,tb_image);} else {editor.ShowSelectImageDialog(Ox35c,tb_image.value);} ;} ;UpdateState=function UpdateState_Background(){tb_hor[OxO7a34[24]]=sel_hor_unit[OxO7a34[24]]=(sel_hor[OxO7a34[25]]>0);tb_ver[OxO7a34[24]]=sel_ver_unit[OxO7a34[24]]=(sel_ver[OxO7a34[25]]>0);div_demo[OxO7a34[26]][OxO7a34[7]]=element[OxO7a34[26]][OxO7a34[7]];} ;SyncToView=function SyncToView_Background(){tb_image[OxO7a34[23]]=element[OxO7a34[26]][OxO7a34[27]];FixTbImage();inp_color[OxO7a34[23]]=element[OxO7a34[26]][OxO7a34[28]];inp_color[OxO7a34[26]][OxO7a34[28]]=element[OxO7a34[26]][OxO7a34[28]];inp_color_Preview[OxO7a34[26]][OxO7a34[28]]=element[OxO7a34[26]][OxO7a34[28]];sel_bgrepeat[OxO7a34[23]]=element[OxO7a34[26]][OxO7a34[29]];sel_bgattach[OxO7a34[23]]=element[OxO7a34[26]][OxO7a34[30]];sel_hor[OxO7a34[23]]=element[OxO7a34[26]][OxO7a34[31]];sel_hor_unit[OxO7a34[25]]=0;if(sel_hor[OxO7a34[25]]==-1){if(ParseFloatToString(element[OxO7a34[26]].backgroundPositionX)){tb_hor[OxO7a34[23]]=ParseFloatToString(element[OxO7a34[26]].backgroundPositionX);for(var i=0;i<sel_hor_unit[OxO7a34[32]][OxO7a34[1]];i++){var Ox142=sel_hor_unit[OxO7a34[32]][i][OxO7a34[23]];if(Ox142&&element[OxO7a34[26]][OxO7a34[31]].indexOf(Ox142)!=-1){sel_hor_unit[OxO7a34[25]]=i;break ;} ;} ;} ;} ;sel_ver[OxO7a34[23]]=element[OxO7a34[26]][OxO7a34[33]];sel_ver_unit[OxO7a34[25]]=0;if(sel_ver[OxO7a34[25]]==-1){if(ParseFloatToString(element[OxO7a34[26]].backgroundPositionY)){tb_ver[OxO7a34[23]]=ParseFloatToString(element[OxO7a34[26]].backgroundPositionY);for(var i=0;i<sel_ver_unit[OxO7a34[32]][OxO7a34[1]];i++){var Ox142=sel_ver_unit[OxO7a34[32]][i][OxO7a34[23]];if(Ox142&&element[OxO7a34[26]][OxO7a34[33]].indexOf(Ox142)!=-1){sel_ver_unit[OxO7a34[25]]=i;break ;} ;} ;} ;} ;} ;SyncTo=function SyncTo_Background(element){if(tb_image[OxO7a34[23]]){element[OxO7a34[26]][OxO7a34[27]]=OxO7a34[34]+tb_image[OxO7a34[23]]+OxO7a34[35];} else {SetStyle(element.style,OxO7a34[36],OxO7a34[2]);} ;try{element[OxO7a34[26]][OxO7a34[28]]=inp_color[OxO7a34[23]]||OxO7a34[2];} catch(x){element[OxO7a34[26]][OxO7a34[28]]=OxO7a34[2];} ;element[OxO7a34[26]][OxO7a34[29]]=sel_bgrepeat[OxO7a34[23]]||OxO7a34[2];element[OxO7a34[26]][OxO7a34[30]]=sel_bgattach[OxO7a34[23]]||OxO7a34[2];element[OxO7a34[26]][OxO7a34[37]]=OxO7a34[2];if(sel_hor[OxO7a34[25]]>0){element[OxO7a34[26]][OxO7a34[31]]=sel_hor[OxO7a34[23]];} else {if(ParseFloatToString(tb_hor.value)){element[OxO7a34[26]][OxO7a34[31]]=ParseFloatToString(tb_hor.value)+sel_hor_unit[OxO7a34[23]];} else {element[OxO7a34[26]][OxO7a34[31]]=OxO7a34[2];} ;} ;if(sel_ver[OxO7a34[25]]>0){element[OxO7a34[26]][OxO7a34[33]]=sel_ver[OxO7a34[23]];} else {if(ParseFloatToString(tb_ver.value)){element[OxO7a34[26]][OxO7a34[33]]=ParseFloatToString(tb_ver.value)+sel_ver_unit[OxO7a34[23]];} else {element[OxO7a34[26]][OxO7a34[33]]=OxO7a34[2];} ;} ;} ;function FixTbImage(){var Ox142=tb_image[OxO7a34[23]].replace(/^(\s+)/g,OxO7a34[2]).replace(/(\s+)$/g,OxO7a34[2]);if(Ox142.substr(0,4).toLowerCase()==OxO7a34[34]){Ox142=Ox142.substr(4,Ox142[OxO7a34[1]]-4);} ;if(Ox142.substr(Ox142[OxO7a34[1]]-1,1)==OxO7a34[35]){Ox142=Ox142.substr(0,Ox142[OxO7a34[1]]-1);} ;if(Ox142==OxO7a34[38]){Ox142=OxO7a34[2];} ;tb_image[OxO7a34[23]]=Ox142;} ;inp_color[OxO7a34[22]]=inp_color_Preview[OxO7a34[22]]=function inp_color_onclick(){SelectColor(inp_color,inp_color_Preview);} ;