/// Copyright (c) 2005-2007. Tatter & Company / Needlworks /// All rights reserved. Licensed under the GPL. /// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) //=0 && document.all); if(Standardizer.prototype.isIE) { Standardizer.prototype.browserVersion = parseFloat(ua.substr(Math.max(ua.indexOf("MSIE"),0)+4,4)); Standardizer.prototype.engineVersion = Standardizer.prototype.browserVersion; } // Mozilla Firefox Standardizer.prototype.isFirefox = (ua.indexOf("Firefox")>=0 || ua.toLowerCase().indexOf("iceweasel")>=0 || ua.indexOf("Minefield")>0); if(Standardizer.prototype.isFirefox) { Standardizer.prototype.browserVersion = parseFloat(ua.substr(ua.indexOf("Firefox/")+8,10)); Standardizer.prototype.engineVersion = parseFloat(ua.substr(Math.max(ua.indexOf("rv:"),0)+3,7)); } // Webkit / Safari webkitIndex = Math.max(ua.indexOf("WebKit"), ua.indexOf("Safari"),0); Standardizer.prototype.isSafari = (ua.indexOf("Safari")>=0); Standardizer.prototype.isWebkit = (webkitIndex > 0); if(Standardizer.prototype.isWebkit) { Standardizer.prototype.browserVersion = parseFloat(ua.split("Version/")[1]) || ( ( parseFloat(ua.substr(webkitIndex+7)) >= 419.3 ) ? 3 : 2 ) || 2; Standardizer.prototype.engineVersion = parseFloat(ua.substr(webkitIndex+7)); } // Opera Standardizer.prototype.isOpera = (!Standardizer.prototype.isIE&&(ua.indexOf("Opera")>=0)); // Mozilla-compatible Standardizer.prototype.isMozilla = (!Standardizer.prototype.isIE && !Standardizer.prototype.isFirefox && !Standardizer.prototype.isSafari && !Standardizer.prototype.isOpera && (ua.indexOf("Mozilla")>=0)); Standardizer.prototype.addEventListener = function(object) { if(!object.addEventListener) object.addEventListener = function addEventListener(type,listener,useCapture) { this.attachEvent("on"+type,listener); }; if(!object.removeEventListener) object.removeEventListener = function removeEventListener(type,listener,useCapture) { this.detachEvent("on"+type,listener); }; }; Standardizer.prototype.removeEventListener = function(object) { if(object.removeEventListener) return; object.removeEventListener = function removeEventListener(type,listener,useCapture) { this.detachEvent("on"+type,listener); }; }; Standardizer.prototype.event = function(event) { if(window.event) { event = window.event; if(event.target) return event; if(event.srcElement) event.target = event.srcElement; if(event.preventDefault == undefined) event.preventDefault = function() { this.returnValue=false;}; }; return event; }; Standardizer.prototype.getScrollTop = function() { return(this.isSafari?document.body.scrollTop:document.documentElement.scrollTop); }; Standardizer.prototype.getScrollLeft = function() { return(this.isSafari?document.body.scrollLeft:document.documentElement.scrollLeft); }; Standardizer.prototype.addLoadEventListener = function(fn) { if (this.isIE) { var prevListener = document.onreadystatechange; document.onreadystatechange = function() { if (prevListener) prevListener(); if (document.readyState == 'complete') { fn(); } }; } else { this.addEventListener(document); document.addEventListener('DOMContentLoaded', fn, false); } }; Standardizer.prototype.addUnloadEventListener = function(fn) { var prevListener = window.onunload; window.onunload = function() { if (prevListener) prevListener(); fn(); }; }; Standardizer.prototype.querySelector = function(selector) { if (document.querySelector) // Firefox 3.1+, IE8+, Webkit x.x+ return document.querySelector(selector); // Here, we only retrieve one element that matches the selector, // but this may NOT be fully compatible with W3C specification for now. // (Example: ':hover' to get the currently hovered element.) // TODO } Standardizer.prototype.querySelectorAll = function(selector) { if (document.querySelectorAll) // Firefox 3.1+, IE8+, Webkit x.x+ return document.querySelectorAll(selector); // TODO } var STD=new Standardizer(); STD.addEventListener(window); var KeyCode = new function() { this.framework = "Eolin AJAX Framework"; this.name = "Eolin LogViewer"; this.verion = "1.0"; this.copyright = "Copyright (c) 2005, Tatter & Company / Needlworks / Tatter Network Foundation. All rights reserved."; this.A=65;this.B=66;this.C=67;this.D=68;this.E=69;this.F=70;this.G=71; this.H=72;this.I=73;this.J=74;this.K=75;this.L=76;this.M=77;this.N=78; this.O=79;this.P=80;this.Q=81;this.R=82;this.S=83;this.T=84;this.U=85; this.V=86;this.W=87;this.X=88;this.Y=89;this.Z=90; this.Down=40;this.Up=38;this.Left=37;this.Right=39; }; PageMaster.prototype.namespace = "Eolin.Application.Framework"; PageMaster.prototype.name = "Eolin Page Master"; PageMaster.prototype.verion = "1.0"; PageMaster.prototype.copyright = "Copyright (c) 2005, Tatter & Company / Needlworks / Tatter Network Foundation. All rights reserved."; PageMaster.prototype.message = "아직 처리중인 작업이 있습니다."; function PageMaster() { this._status = null; this._messages = new Array(); this._requests=new Array(); this._holders=new Array(); this._timer=null; window.addEventListener("load",PageMaster.prototype._onLoad,false); window.addEventListener("beforeunload",PageMaster.prototype._onBeforeUnload,false); }; PageMaster.prototype._onLoad = function(event) { PM._status = document.createElement("div"); PM._status.style.position = "absolute"; PM._status.className = "ajaxMessage ajaxProcessingMessage"; PM._status.style.color = "white"; PM._status.style.backgroundColor = "navy"; PM._status.style.margin = "0px"; PM._status.style.paddingLeft = "10px"; PM._status.style.paddingRight = "10px"; STD.addEventListener(window); window.addEventListener("scroll",PageMaster.prototype._updateStatus,false); window.addEventListener("resize",PageMaster.prototype._updateStatus,false); }; PageMaster.prototype._showStatus = function() { if(PM._status.parentNode == document.body) return; document.body.appendChild(this._status); this._updateStatus(); }; PageMaster.prototype._hideStatus = function(){ if(PM._status.parentNode==document.body) document.body.removeChild(PM._status); }; PageMaster.prototype._updateStatus=function() { if(PM._status.parentNode == document.body) { PM._status.style.top = (!STD.isSafari?document.documentElement.scrollTop:document.body.scrollTop)+"px"; PM._status.style.left = ((!STD.isSafari?document.documentElement.scrollLeft:document.body.scrollLeft)+document.documentElement.clientWidth-PM._status.offsetWidth)+"px"; }; PM.updateMessages(); }; PageMaster.prototype.showMessage = function(message,align,valign,timeout) { if((typeof(message) != "string")||(message.length == 0)) return-1; if(align==undefined) align = "center"; if(valign==undefined) valign="middle"; if(timeout==undefined) timeout=3000; var oMessage = document.createElement("div"); oMessage.innerHTML = message;oMessage.style.position="absolute"; oMessage.className = "ajaxMessage ajaxSuccessMessage"; oMessage.style.color = "white"; oMessage.style.backgroundColor = "green"; oMessage.style.margin = "0px"; oMessage.style.paddingLeft = "10px"; oMessage.style.paddingRight = "10px"; oMessage._align = align; oMessage._valign = valign; document.body.appendChild(oMessage); var index=this._messages.push(oMessage)-1; this.updateMessages(); window.setTimeout("PM._hideMessage("+index+")",timeout); return index; }; PageMaster.prototype.showErrorMessage = function(message,align,valign,timeout) { if((typeof(message) != "string")||(message.length == 0)) return-1; if(align==undefined) align = "center"; if(valign==undefined) valign="middle"; if(timeout==undefined) timeout=3000; var oMessage = document.createElement("div"); oMessage.innerHTML = message;oMessage.style.position="absolute"; oMessage.className = "ajaxMessage ajaxErrorMessage"; oMessage.style.color = "white"; oMessage.style.backgroundColor = "red"; oMessage.style.margin = "0px"; oMessage.style.paddingLeft = "10px"; oMessage.style.paddingRight = "10px"; oMessage._align = align; oMessage._valign = valign; document.body.appendChild(oMessage); var index=this._messages.push(oMessage)-1; this.updateMessages(); window.setTimeout("PM._hideMessage("+index+")",timeout); return index; }; PageMaster.prototype._hideMessage = function(index) { document.body.removeChild(this._messages[index]); this._messages.splice(index,1,null); while((this._messages.length>0) && (this._messages[this._messages.length-1] == null)) this._messages.pop(); }; PageMaster.prototype.updateMessages = function() { for(var i=0;i0) { event.returnValue=PM.message; return; }; for(var i=0;i 0) { this.url=this.url+this.getfragment; if(this.id != null) {this.url=this.url+'&id='+this.id} } else { if(this.id != null) {this.url=this.url+'?id='+this.id} } } if(this.cache) this._request.open(this.method,this.url,this.async); else if(this.url.lastIndexOf("?") >= 0) this._request.open(this.method,this.url+"&__T__="+(new Date()).getTime(),this.async); else this._request.open(this.method,this.url+"?__T__="+(new Date()).getTime(),this.async); if(STD.isFirefox) this._request.setRequestHeader("Referer",location.href); if(arguments.length>0) { this.content=arguments[0]; } if(this.content.length>0) this._request.setRequestHeader("Content-Type",this.contentType); if(this.timeout>0) { this._request.setRequestHeader("Connection","Keep-Alive"); this._request.setRequestHeader("Keep-Alive","timeout="+this.timeout); } this._request.send(this.content); if(!this.async) { if(this.persistent) PM.removeRequest(this); if(this.onVerify()) this.onSuccess(); else { for(var i in this._properties) if (this._properties[i] instanceof Array) this._properties[i][0][this._properties[i][1]] = this._properties[i][2]; for(var i in this._attributes) if (this._attributes[i] instanceof Array) this._attributes[i][0].setAttribute(this._attributes[i][1],this._attributes[i][2]); this.onError(); }; }; }; HTTPRequest.prototype.getText = function(path) { try { if(path == undefined) return this._request.responseText; var directives=path.split("/"); if(directives[0] != "") return null; var cursor = this._request.responseXML.documentElement; if(cursor.nodeName!=directives[1]) return null; for(var i=2;i