mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12601 201d5d3c-b55e-5fd7-737f-ddc643e51545
1 line
No EOL
16 KiB
JavaScript
1 line
No EOL
16 KiB
JavaScript
if(jQuery){jQuery.noConflict();}(function(b){var a=navigator.userAgent.toLowerCase();b.os={Linux:/linux/.test(a),Unix:/x11/.test(a),Mac:/mac/.test(a),Windows:/win/.test(a)};b.os.name=(b.os.Windows)?"Windows":(b.os.Linux)?"Linux":(b.os.Unix)?"Unix":(b.os.Mac)?"Mac":"";window.XE={loaded_popup_menus:new Array(),addedDocument:new Array(),checkboxToggleAll:function(d){if(!is_def(d)){d="cart";}var c={wrap:null,checked:"toggle",doClick:false};switch(arguments.length){case 1:if(typeof(arguments[0])=="string"){d=arguments[0];}else{b.extend(c,arguments[0]||{});d="cart";}break;case 2:d=arguments[0];b.extend(c,arguments[1]||{});}if(c.doClick==true){c.checked=null;}if(typeof(c.wrap)=="string"){c.wrap="#"+c.wrap;}if(c.wrap){var e=b(c.wrap).find("input[name="+d+"]:checkbox");}else{var e=b("input[name="+d+"]:checkbox");}if(c.checked=="toggle"){e.each(function(){b(this).attr("checked",(b(this).attr("checked"))?false:true);});}else{(c.doClick==true)?e.click():e.attr("checked",c.checked);}},displayPopupMenu:function(k,e,h){var s=h.target_srl;var r=h.menu_id;var j=k.menus;var n="";if(this.loaded_popup_menus[r]){n=this.loaded_popup_menus[r];}else{if(j){var t=j.item;if(typeof(t.length)=="undefined"||t.length<1){t=new Array(t);}if(t.length){for(var l=0;l<t.length;l++){var d=t[l].url;var p=t[l].str;var q=t[l].icon;var o=t[l].target;var c="";var m="";switch(o){case"popup":m=" onclick=\"popopen(this.href,'"+o+"'); return false;\"";break;case"javascript":m=' onclick="'+d+'; return false; "';d="#";break;default:m=' onclick="window.open(this.href); return false;"';break;}n+="<li "+c+'><a href="'+d+'"'+m+">"+p+"</a></li> ";}}}this.loaded_popup_menus[r]=n;}if(n){var f=b("#popup_menu_area").html("<ul>"+n+"</ul>");var g={top:h.page_y,left:h.page_x};if(f.outerHeight()+g.top>b(window).height()+b(window).scrollTop()){g.top=b(window).height()-f.outerHeight()+b(window).scrollTop();}if(f.outerWidth()+g.left>b(window).width()+b(window).scrollLeft()){g.left=b(window).width()-f.outerWidth()+b(window).scrollLeft();}f.css({top:g.top,left:g.left}).show();}}};})(jQuery);jQuery(function(c){c('a[href^="#"]').click(function(){c(c(this).attr("href")).attr("tabindex","0").css("outline","0").focus();});if(c.browser.msie){c("select").each(function(g,d){var f=false;var h=new Array();for(var e=0;e<d.options.length;e++){if(d.options[e].disabled){d.options[e].style.color="#CCCCCC";f=true;}else{h[g]=(h[g]>-1)?h[g]:e;}}if(!f){return;}d.oldonchange=d.onchange;d.onchange=function(){if(this.options[this.selectedIndex].disabled){this.selectedIndex=h[g];}else{if(this.oldonchange){this.oldonchange();}}};if(d.selectedIndex>=0&&d.options[d.selectedIndex].disabled){d.onchange();}});}var a=c(".xe_content .fold_button");if(a.size()){var b=c("div.fold_container",a);c("button.more",a).click(function(){c(this).hide().next("button").show().parent().next(b).show();});c("button.less",a).click(function(){c(this).hide().prev("button").show().parent().next(b).hide();});}jQuery('input[type="submit"],button[type="submit"]').click(function(e){var d=jQuery(e.currentTarget);setTimeout(function(){return function(){d.attr("disabled","disabled");};}(),0);setTimeout(function(){return function(){d.removeAttr("disabled");};}(),3000);});});(function(){function a(d,c){return(d.replace(/#.*$/,"")===c.replace(/#.*$/,""));}var b=Array.isArray||function(c){return Object.prototype.toString.call(c)=="[object Array]";};String.prototype.getQuery=function(e){var h=a(this,window.location.href)?current_url:this;var c=h.indexOf("?");if(c==-1){return null;}var g=h.substr(c+1,this.length),d={};g.replace(/([^=]+)=([^&]*)(&|$)/g,function(){d[arguments[1]]=arguments[2];});var f=d[e];if(typeof(f)=="undefined"){f="";}return f;};String.prototype.setQuery=function(p,e){var j=a(this,window.location.href)?current_url:this;var o=j.indexOf("?");var f=j.replace(/#$/,"");var k,r,q;if(typeof(e)=="undefined"){e="";}if(o!=-1){var h=f.substr(o+1,j.length),l={},t=[];f=j.substr(0,o);h.replace(/([^=]+)=([^&]*)(&|$)/g,function(i,c,u){l[c]=u;});l[p]=e;for(var d in l){if(!l.hasOwnProperty(d)){continue;}if(!(q=String(l[d]).trim())){continue;}t.push(d+"="+decodeURI(q));}h=t.join("&");f=f+(h?"?"+h:"");}else{if(String(e).trim()){f=f+"?"+p+"="+e;}}r=/^https:\/\/([^:\/]+)(:\d+|)/i;if(r.test(f)){var s="http://"+RegExp.$1;if(window.http_port&&http_port!=80){s+=":"+http_port;}f=f.replace(r,s);}var n=!!window.enforce_ssl;if(!n&&b(window.ssl_actions)&&(k=f.getQuery("act"))){for(var g=0,m=ssl_actions.length;g<m;g++){if(ssl_actions[g]===k){n=true;break;}}}r=/http:\/\/([^:\/]+)(:\d+|)/i;if(n&&r.test(f)){var s="https://"+RegExp.$1;if(window.https_port&&https_port!=443){s+=":"+https_port;}f=f.replace(r,s);}f=f.replace(/\/(index\.php)?\?/,"/index.php?");return encodeURI(f);};String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");};})();function xSleep(b){b=b/1000;var a=new Date();var c=new Date();while(c.getTime()-a.getTime()<b){c=new Date();}}function isDef(){for(var a=0;a<arguments.length;++a){if(typeof(arguments[a])=="undefined"){return false;}}return true;}var winopen_list=new Array();function winopen(a,f,b){if(typeof(xeVid)!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")){a=a.setQuery("vid",xeVid);}try{if(f!="_blank"&&winopen_list[f]){winopen_list[f].close();winopen_list[f]=null;}}catch(d){}if(typeof(f)=="undefined"){f="_blank";}if(typeof(b)=="undefined"){b="";}var c=window.open(a,f,b);c.focus();if(f!="_blank"){winopen_list[f]=c;}}function popopen(a,b){if(typeof(b)=="undefined"){b="_blank";}if(typeof(xeVid)!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")){a=a.setQuery("vid",xeVid);}winopen(a,b,"width=650,height=500,scrollbars=yes,resizable=yes,toolbars=no");}function sendMailTo(a){location.href="mailto:"+a;}function move_url(a,b){if(!a){return false;}if(typeof(b)=="undefined"){b="N";}if(b=="N"){b=false;}else{b=true;}if(/^\./.test(a)){a=request_uri+a;}if(b){winopen(a);}else{location.href=a;}return false;}function displayMultimedia(e,d,a,b){var c=_displayMultimedia(e,d,a,b);if(c){document.writeln(c);}}function _displayMultimedia(a,c,i,k){if(a.indexOf("files")==0){a=request_uri+a;}var e={wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:false};var d=jQuery.extend(e,k||{});var j=(d.autostart&&d.autostart!="false")?"true":"false";delete (d.autostart);var f="";var g="";var h="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a)){h='<img src="'+a+'" width="'+c+'" height="'+i+'" />';}else{if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a)){h='<embed src="'+request_uri+'common/img/flvplayer.swf" allowfullscreen="true" autostart="'+j+'" width="'+c+'" height="'+i+'" flashvars="&file='+a+"&width="+c+"&height="+i+"&autostart="+j+'" wmode="'+d.wmode+'" />';}else{if(/\.swf/i.test(a)){f="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";if(typeof(enforce_ssl)!="undefined"&&enforce_ssl){g="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0";}else{g="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0";}h='<object classid="'+f+'" codebase="'+g+'" width="'+c+'" height="'+i+'" flashvars="'+d.flashvars+'">';h+='<param name="movie" value="'+a+'" />';for(var b in d){if(d[b]!="undefined"&&d[b]!=""){h+='<param name="'+b+'" value="'+d[b]+'" />';}}h+='<embed src="'+a+'" autostart="'+j+'" width="'+c+'" height="'+i+'" flashvars="'+d.flashvars+'" wmode="'+d.wmode+'"></embed></object>';}else{if(jQuery.browser.mozilla||jQuery.browser.opera){j=(d.autostart&&d.autostart!="false")?"1":"0";}h='<embed src="'+a+'" autostart="'+j+'" width="'+c+'" height="'+i+'"';if(d.wmode=="transparent"){h+=' windowlessvideo="1"';}h+="></embed>";}}}return h;}function zbxe_folder_open(a){jQuery("#folder_open_"+a).hide();jQuery("#folder_close_"+a).show();jQuery("#folder_"+a).show();}function zbxe_folder_close(a){jQuery("#folder_open_"+a).show();jQuery("#folder_close_"+a).hide();jQuery("#folder_"+a).hide();}function setFixedPopupSize(){var f=jQuery,i=f(window),b=f("body>.popup"),a,d,c,e,g;g=b.css({overflow:"scroll"}).offset();a=b.width(10).height(10000).get(0).scrollWidth+g.left*2;d=b.height(10).width(10000).get(0).scrollHeight+g.top*2;if(a<800){a=800+g.left*2;}c=i.width();e=i.height();if(a!=c){window.resizeBy(a-c,0);}if(d!=e){window.resizeBy(0,d-e);}b.width(a-g.left*2).css({overflow:"",height:""});}function doCallModuleAction(a,c,b){var d={target_srl:b,cur_mid:current_mid,mid:current_mid};exec_xml(a,c,d,completeCallModuleAction);}function completeCallModuleAction(a,b){if(a.message!="success"){alert(a.message);}location.reload();}function completeMessage(a){alert(a.message);location.reload();}function doChangeLangType(a){if(typeof(a)=="string"){setLangType(a);}else{var b=a.options[a.selectedIndex].value;setLangType(b);}location.href=location.href.setQuery("l","");}function setLangType(b){var a=new Date();a.setTime(a.getTime()+(7000*24*3600000));setCookie("lang_type",b,a,"/");}function doDocumentPreview(e){var a=e;while(a.nodeName!="FORM"){a=a.parentNode;}if(a.nodeName!="FORM"){return;}var b=a.getAttribute("editor_sequence");var c=editorGetContent(b);var d=window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var f=jQuery("#previewDocument");if(!f.length){jQuery('<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'"><input type="hidden" name="module" value="document" /><input type="hidden" name="act" value="dispDocumentPreview" /><input type="hidden" name="content" /></form>').appendTo(document.body);f=jQuery("#previewDocument")[0];}else{f=f[0];}if(f){f.content.value=c;f.submit();}}function doDocumentSave(f){var b=f.form.getAttribute("editor_sequence");var h=editorRelKeys[b]["content"].value;if(typeof(b)!="undefined"&&b&&typeof(editorRelKeys)!="undefined"&&typeof(editorGetContent)=="function"){var c=editorGetContent(b);editorRelKeys[b]["content"].value=c;}var g={},e=["error","message","document_srl"],a=f.form.elements,d=jQuery(f.form).serializeArray();jQuery.each(d,function(j,k){var l=jQuery.trim(k.value);if(!l){return true;}if(/\[\]$/.test(k.name)){k.name=k.name.replace(/\[\]$/,"");}if(g[k.name]){g[k.name]+="|@|"+l;}else{g[k.name]=k.value;}});exec_xml("document","procDocumentTempSave",g,completeDocumentSave,e,g,f.form);editorRelKeys[b]["content"].value=h;return false;}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message);}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"));}function doDocumentSelect(a){if(!opener||!opener.objForSavedDoc){window.close();return;}opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite");window.close();}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo");}var addedDocument=new Array();function doAddDocumentCart(b){var a=b.value;addedDocument[addedDocument.length]=a;setTimeout(function(){callAddDocumentCart(addedDocument.length);},100);}function callAddDocumentCart(a){if(addedDocument.length<1||a!=addedDocument.length){return;}var b=new Array();b.srls=addedDocument.join(",");exec_xml("document","procDocumentAddCart",b,null);addedDocument=new Array();}function transRGB2Hex(d){if(!d){return d;}if(d.indexOf("#")>-1){return d.replace(/^#/,"");}if(d.toLowerCase().indexOf("rgb")<0){return d;}d=d.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=d.split(",");var c="";for(var b=0;b<value_list.length;b++){var a=parseInt(value_list[b],10).toString(16);if(a.length==1){a="0"+a;}c+=a;}return c;}function toggleSecuritySignIn(){var a=location.href;if(/https:\/\//i.test(a)){location.href=a.replace(/^https/i,"http");}else{location.href=a.replace(/^http/i,"https");}}function reloadDocument(){location.reload();}var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(c){var a="";var k,h,f,j,g,e,d;var b=0;c=Base64._utf8_encode(c);while(b<c.length){k=c.charCodeAt(b++);h=c.charCodeAt(b++);f=c.charCodeAt(b++);j=k>>2;g=((k&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64;}else{if(isNaN(f)){d=64;}}a=a+this._keyStr.charAt(j)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d);}return a;},decode:function(c){var a="";var k,h,f;var j,g,e,d;var b=0;c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(b<c.length){j=this._keyStr.indexOf(c.charAt(b++));g=this._keyStr.indexOf(c.charAt(b++));e=this._keyStr.indexOf(c.charAt(b++));d=this._keyStr.indexOf(c.charAt(b++));k=(j<<2)|(g>>4);h=((g&15)<<4)|(e>>2);f=((e&3)<<6)|d;a=a+String.fromCharCode(k);if(e!=64){a=a+String.fromCharCode(h);}if(d!=64){a=a+String.fromCharCode(f);}}a=Base64._utf8_decode(a);return a;},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d);}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128);}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128);}}}return a;},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++;}else{if((e>191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2;}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3;}}}return b;}};if(typeof(resizeImageContents)=="undefined"){function resizeImageContents(){}}if(typeof(activateOptionDisabled)=="undefined"){function activateOptionDisabled(){}}objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle();}function svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show();}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide();}function open_calendar(c,d,b){if(typeof(d)=="undefined"){d="";}var a="./common/tpl/calendar.php?";if(c){a+="fo_id="+c;}if(d){a+="&day_str="+d;}if(b){a+="&callback_func="+b;}popopen(a,"Calendar");}var loaded_popup_menus=XE.loaded_popup_menus;function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,c){XE.displayPopupMenu(a,b,c);}function GetObjLeft(a){return jQuery(a).offset().left;}function GetObjTop(a){return jQuery(a).offset().top;}function replaceOuterHTML(b,a){jQuery(b).replaceWith(a);}function getOuterHTML(a){return jQuery(a).html().trim();}function setCookie(b,c,a,e){var d=b+"="+escape(c)+((!a)?"":("; expires="+a.toGMTString()))+"; path="+((!e)?"/":e);document.cookie=d;}function getCookie(b){var a=document.cookie.match(new RegExp(b+"=(.*?)(?:;|$)"));if(a){return unescape(a[1]);}}function is_def(a){return(typeof(a)!="undefined");}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1);}function get_by_id(a){return document.getElementById(a);}jQuery(function(a){a(document).click(function(d){var e=a("#popup_menu_area");if(!e.length){e=a('<div id="popup_menu_area" style="display:none;z-index:9999" />').appendTo(document.body);}e.hide();var b=a(d.target).filter("a,div,span");if(!b.length){b=a(d.target).closest("a,div,span");}if(!b.length){return;}var c=b.attr("class"),f;if(c){f=c.match(new RegExp("(?:^| )((document|comment|member)_([1-9]\\d*))(?: |$)",""));}if(!f){return;}var h="get"+ucfirst(f[2])+"Menu";var i={mid:current_mid,cur_mid:current_mid,menu_id:f[1],target_srl:f[3],cur_act:current_url.getQuery("act"),page_x:d.pageX,page_y:d.pageY};var g="error message menus".split(" ");d.preventDefault();d.stopPropagation();if(is_def(window.xeVid)){i.vid=xeVid;}if(is_def(XE.loaded_popup_menus[i.menu_id])){return XE.displayPopupMenu(i,g,i);}show_waiting_message=false;exec_xml("member",h,i,XE.displayPopupMenu,g,i);show_waiting_message=true;});a("a._xe_popup").click(function(){var e=a(this),c=e.attr("name"),b=e.attr("href"),d;if(!c){c="_xe_popup_"+Math.floor(Math.random()*1000);}d=window.open(b,c,"left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no");if(d){d.focus();}return false;});if(a.datepicker){a.datepicker.setDefaults({dateFormat:"yy-mm-dd"});}}); |