﻿/*TabCloseMenu*/
Ext.ux.TabCloseMenu = function () {var tabs, menu, ctxItem; this.init = function (tp) { tabs = tp; tabs.on('contextmenu', onContextMenu); }; function onContextMenu(tabPanel, tab, e) { var items = []; if (tab.closable) { items.push({ text: 'Kapat', handler: function () { tabPanel.remove(tab); } }); } var canCloseOthers = false; tabPanel.items.each(function () { if (this != tab && this.closable) { canCloseOthers = true; return false; } return true; }); if (canCloseOthers) { items.push({ text: 'Diğerlerini Kapat', handler: function () { tabPanel.items.each(function () { if (this != tab && this.closable) { tabPanel.remove(this); } }) } }) }; var menu = new Ext.menu.Menu({ items: items }); menu.showAt(e.getXY()); }};
/*TreeNodeProvider*/
Ext.tree.TreeNodeProvider=function(cfg){this.data=[];Ext.apply(this,cfg);if(!this.getNodes||(typeof this.getNodes!="function"))
throw'!this.getNodes || typeof this.getNodes != "function"';this.setData=function(t_data){this.data=t_data;}
this.getData=function(){return this.data;}}
/*MyTreeLoader*/
Ext.tree.MyTreeLoader=function(config){var canFireLoadEvent=true;var treeNodeProvider=null;var loading=false;Ext.apply(this,config);Ext.tree.MyTreeLoader.superclass.constructor.call(this,config);treeNodeProvider=this.treeNodeProvider;var processResponse=function(o,node,callback){try{node.beginUpdate();for(var i=0,len=o.length;i<len;i++){var n=this.createNode(o[i]);if(n){node.appendChild(n);}};node.endUpdate();}
catch(e){canFireLoadEvent=false;this.fireEvent("loadexception",this,node,treeNodeProvider.data);};if(typeof callback=="function"){callback();};if(canFireLoadEvent===true){this.fireEvent("load",this,node,treeNodeProvider.data);}}.createDelegate(this);var requestData=function(node,callback){if(this.fireEvent("beforeload",this,node,callback)!==false){loading=true;var nodesToAdd=null;try{nodesToAdd=treeNodeProvider.getNodes(treeNodeProvider.data);}
catch(e){canFireLoadEvent=false;this.fireEvent("loadexception",this,node,treeNodeProvider.data);};if(typeof nodesToAdd!="undefined"&&nodesToAdd!=null){processResponse(nodesToAdd,node,callback);loading=false;}}
else{canFireLoadEvent=false;}}.createDelegate(this);this.load=function(node,callback){canFireLoadEvent=true;if(this.clearOnLoad){while(node.firstChild){var tmpNode=node.firstChild;node.removeChild(tmpNode);tmpNode.destroy();}};if(this.doPreload(node)){if(typeof callback=="function"){callback();}}
else if(treeNodeProvider){requestData(node,callback);}}
this.isLoading=function(){return loading;}
this.updateTreeNodeProvider=function(obj){if(treeNodeProvider){treeNodeProvider.setData(obj);}}
this.getTreeNodeProvider=function(){return treeNodeProvider;}
this.setTreeNodeProvider=function(newTreeNodeProvider){if(newTreeNodeProvider==null||(typeof newTreeNodeProvider=='undefined'))
throw'setTreeNodeProvider, newTreeNodeProvider == null || (typeof newTreeNodeProvider == undefined)';treeNodeProvider=newTreeNodeProvider;}};Ext.tree.MyTreeLoader=Ext.extend(Ext.tree.MyTreeLoader,Ext.tree.TreeLoader);
/*ZeroClipboard*/


var ZeroClipboard = { version: "1.0.7", clients: {}, moviePath: '/Component/ExtJs/plugin/ZeroClipboard.swf', nextId: 1, $: function (thingy) {
    if (typeof (thingy) == 'string') thingy = document.getElementById(thingy); if (!thingy.addClass) {
        thingy.hide = function () { this.style.display = 'none'; }; thingy.show = function () { this.style.display = ''; }; thingy.addClass = function (name) { this.removeClass(name); this.className += ' ' + name; }; thingy.removeClass = function (name) {
            var classes = this.className.split(/\s+/); var idx = -1; for (var k = 0; k < classes.length; k++) { if (classes[k] == name) { idx = k; k = classes.length; } }
            if (idx > -1) { classes.splice(idx, 1); this.className = classes.join(' '); }
            return this;
        }; thingy.hasClass = function (name) { return !!this.className.match(new RegExp("\\s*" + name + "\\s*")); };
    }
    return thingy;
}, setMoviePath: function (path) { this.moviePath = path; }, dispatch: function (id, eventName, args) { var client = this.clients[id]; if (client) { client.receiveEvent(eventName, args); } }, register: function (id, client) { this.clients[id] = client; }, getDOMObjectPosition: function (obj, stopObj) {
    var info = { left: 0, top: 0, width: obj.width ? obj.width : obj.offsetWidth, height: obj.height ? obj.height : obj.offsetHeight }; while (obj && (obj != stopObj)) { info.left += obj.offsetLeft; info.top += obj.offsetTop; obj = obj.offsetParent; }
    return info;
}, Client: function (elem) { this.handlers = {}; this.id = ZeroClipboard.nextId++; this.movieId = 'ZeroClipboardMovie_' + this.id; ZeroClipboard.register(this.id, this); if (elem) this.glue(elem); } 
}; ZeroClipboard.Client.prototype = { id: 0, ready: false, movie: null, clipText: '', handCursorEnabled: true, cssEffects: true, handlers: null, glue: function (elem, appendElem, stylesToAdd) {
    this.domElement = ZeroClipboard.$(elem); var zIndex = 10000; if (this.domElement.style.zIndex) { zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; }
    if (typeof (appendElem) == 'string') { appendElem = ZeroClipboard.$(appendElem); }
    else if (typeof (appendElem) == 'undefined') { appendElem = document.getElementsByTagName('body')[0]; }
    var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem); this.div = document.createElement('div'); var style = this.div.style; style.position = 'absolute'; style.left = '' + box.left + 'px'; style.top = '' + box.top + 'px'; style.width = '' + box.width + 'px'; style.height = '' + box.height + 'px'; style.zIndex = zIndex; if (typeof (stylesToAdd) == 'object') { for (addedStyle in stylesToAdd) { style[addedStyle] = stylesToAdd[addedStyle]; } }
    appendElem.appendChild(this.div); this.div.innerHTML = this.getHTML(box.width, box.height);
}, getHTML: function (width, height) {
    var html = ''; var flashvars = 'id=' + this.id + '&width=' + width + '&height=' + height; if (navigator.userAgent.match(/MSIE/)) { var protocol = location.href.match(/^https/i) ? 'https://' : 'http://'; html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + protocol + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + width + '" height="' + height + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + flashvars + '"/><param name="wmode" value="transparent"/></object>'; }
    else { html += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + flashvars + '" wmode="transparent" />'; }
    return html;
}, hide: function () { if (this.div) { this.div.style.left = '-2000px'; } }, show: function () { this.reposition(); }, destroy: function () {
    if (this.domElement && this.div) {
        this.hide(); this.div.innerHTML = ''; var body = document.getElementsByTagName('body')[0]; try { body.removeChild(this.div); } catch (e) { ; }
        this.domElement = null; this.div = null;
    } 
}, reposition: function (elem) {
    if (elem) { this.domElement = ZeroClipboard.$(elem); if (!this.domElement) this.hide(); }
    if (this.domElement && this.div) { var box = ZeroClipboard.getDOMObjectPosition(this.domElement); var style = this.div.style; style.left = '' + box.left + 'px'; style.top = '' + box.top + 'px'; } 
}, setText: function (newText) { this.clipText = newText; if (this.ready) this.movie.setText(newText); }, addEventListener: function (eventName, func) { eventName = eventName.toString().toLowerCase().replace(/^on/, ''); if (!this.handlers[eventName]) this.handlers[eventName] = []; this.handlers[eventName].push(func); }, setHandCursor: function (enabled) { this.handCursorEnabled = enabled; if (this.ready) this.movie.setHandCursor(enabled); }, setCSSEffects: function (enabled) { this.cssEffects = !!enabled; }, receiveEvent: function (eventName, args) {
    eventName = eventName.toString().toLowerCase().replace(/^on/, ''); switch (eventName) {
        case 'load': this.movie = document.getElementById(this.movieId); if (!this.movie) { var self = this; setTimeout(function () { self.receiveEvent('load', null); }, 1); return; }
            if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { var self = this; setTimeout(function () { self.receiveEvent('load', null); }, 100); this.ready = true; return; }
            this.ready = true; this.movie.setText(this.clipText); this.movie.setHandCursor(this.handCursorEnabled); break; case 'mouseover': if (this.domElement && this.cssEffects) { this.domElement.addClass('hover'); if (this.recoverActive) this.domElement.addClass('active'); }
            break; case 'mouseout': if (this.domElement && this.cssEffects) {
                this.recoverActive = false; if (this.domElement.hasClass('active')) { this.domElement.removeClass('active'); this.recoverActive = true; }
                this.domElement.removeClass('hover');
            }
            break; case 'mousedown': if (this.domElement && this.cssEffects) { this.domElement.addClass('active'); }
            break; case 'mouseup': if (this.domElement && this.cssEffects) { this.domElement.removeClass('active'); this.recoverActive = false; }
            break;
    }
    if (this.handlers[eventName]) {
        for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
            var func = this.handlers[eventName][idx]; if (typeof (func) == 'function') { func(this, args); }
            else if ((typeof (func) == 'object') && (func.length == 2)) { func[0][func[1]](this, args); }
            else if (typeof (func) == 'string') { window[func](this, args); } 
        } 
    } 
} 
};

//var ZeroClipboard = { version: "1.0.7", clients: {}, moviePath: '/Component/ExtJs/plugin/ZeroClipboard.swf', nextId: 1, $: function (thingy) { if (typeof (thingy) == 'string') thingy = document.getElementById(thingy); if (!thingy.addClass) { thingy.hide = function () { this.style.display = 'none' }; thingy.show = function () { this.style.display = '' }; thingy.addClass = function (name) { this.removeClass(name); this.className += ' ' + name }; thingy.removeClass = function (name) { var classes = this.className.split(/\s+/); var idx = -1; for (var k = 0; k < classes.length; k++) { if (classes[k] == name) { idx = k; k = classes.length } } if (idx > -1) { classes.splice(idx, 1); this.className = classes.join(' ') } return this }; thingy.hasClass = function (name) { return !!this.className.match(new RegExp("\\s*" + name + "\\s*")) } } return thingy }, setMoviePath: function (path) { this.moviePath = path }, dispatch: function (id, eventName, args) { var client = this.clients[id]; if (client) { client.receiveEvent(eventName, args) } }, register: function (id, client) { this.clients[id] = client }, getDOMObjectPosition: function (obj, stopObj) { var info = { left: 0, top: 0, width: obj.width ? obj.width : obj.offsetWidth, height: obj.height ? obj.height : obj.offsetHeight }; while (obj && (obj != stopObj)) { info.left += obj.offsetLeft; info.top += obj.offsetTop; obj = obj.offsetParent } return info }, Client: function (elem) { this.handlers = {}; this.id = ZeroClipboard.nextId++; this.movieId = 'ZeroClipboardMovie_' + this.id; ZeroClipboard.register(this.id, this); if (elem) this.glue(elem) } };

(function (a) { a.fn.zclip = function (c) { if (typeof c == "object" && !c.length) { var b = a.extend({ path: "/Component/ExtJs/plugin/ZeroClipboard.swf", copy: null, beforeCopy: null, afterCopy: null, clickAfter: true, setHandCursor: true, setCSSEffects: true }, c); return this.each(function () { var e = a(this); if (e.is(":visible") && (typeof b.copy == "string" || a.isFunction(b.copy))) { ZeroClipboard.setMoviePath(b.path); var d = new ZeroClipboard.Client(); if (a.isFunction(b.copy)) { e.bind("zClip_copy", b.copy) } if (a.isFunction(b.beforeCopy)) { e.bind("zClip_beforeCopy", b.beforeCopy) } if (a.isFunction(b.afterCopy)) { e.bind("zClip_afterCopy", b.afterCopy) } d.setHandCursor(b.setHandCursor); d.setCSSEffects(b.setCSSEffects); d.addEventListener("mouseOver", function (f) { e.trigger("mouseenter") }); d.addEventListener("mouseOut", function (f) { e.trigger("mouseleave") }); d.addEventListener("mouseDown", function (f) { e.trigger("mousedown"); if (!a.isFunction(b.copy)) { d.setText(b.copy) } else { d.setText(e.triggerHandler("zClip_copy")) } if (a.isFunction(b.beforeCopy)) { e.trigger("zClip_beforeCopy") } }); d.addEventListener("complete", function (f, g) { if (a.isFunction(b.afterCopy)) { e.trigger("zClip_afterCopy") } else { if (g.length > 500) { g = g.substr(0, 500) + "...\n\n(" + (g.length - 500) + " characters not shown)" } e.removeClass("hover"); alert("Copied text to clipboard:\n\n " + g) } if (b.clickAfter) { e.trigger("click") } }); d.glue(e[0], e.parent()[0]); a(window).bind("load resize", function () { d.reposition() }) } }) } else { if (typeof c == "string") { return this.each(function () { var f = a(this); c = c.toLowerCase(); var e = f.data("zclipId"); var d = a("#" + e + ".zclip"); if (c == "remove") { d.remove(); f.removeClass("active hover") } else { if (c == "hide") { d.hide(); f.removeClass("active hover") } else { if (c == "show") { d.show() } } } }) } } } })(jQuery); 
/*
* zClip :: jQuery ZeroClipboard v1.1.1
* http://steamdev.com/zclip
*
* Copyright 2011, SteamDev
* Released under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Date: Wed Jun 01, 2011
*/


//var ZeroClipboard = { version: "1.0.7", clients: {}, moviePath: "ZeroClipboard.swf", nextId: 1, $: function (a) { if (typeof (a) == "string") { a = document.getElementById(a) } if (!a.addClass) { a.hide = function () { this.style.display = "none" }; a.show = function () { this.style.display = "" }; a.addClass = function (b) { this.removeClass(b); this.className += " " + b }; a.removeClass = function (d) { var e = this.className.split(/\s+/); var b = -1; for (var c = 0; c < e.length; c++) { if (e[c] == d) { b = c; c = e.length } } if (b > -1) { e.splice(b, 1); this.className = e.join(" ") } return this }; a.hasClass = function (b) { return !!this.className.match(new RegExp("\\s*" + b + "\\s*")) } } return a }, setMoviePath: function (a) { this.moviePath = a }, dispatch: function (d, b, c) { var a = this.clients[d]; if (a) { a.receiveEvent(b, c) } }, register: function (b, a) { this.clients[b] = a }, getDOMObjectPosition: function (c, a) { var b = { left: 0, top: 0, width: c.width ? c.width : c.offsetWidth, height: c.height ? c.height : c.offsetHeight }; if (c && (c != a)) { b.left += c.offsetLeft; b.top += c.offsetTop } return b }, Client: function (a) { this.handlers = {}; this.id = ZeroClipboard.nextId++; this.movieId = "ZeroClipboardMovie_" + this.id; ZeroClipboard.register(this.id, this); if (a) { this.glue(a) } } }; ZeroClipboard.Client.prototype = { id: 0, ready: false, movie: null, clipText: "", handCursorEnabled: true, cssEffects: true, handlers: null, glue: function (d, b, e) { this.domElement = ZeroClipboard.$(d); var f = 99; if (this.domElement.style.zIndex) { f = parseInt(this.domElement.style.zIndex, 10) + 1 } if (typeof (b) == "string") { b = ZeroClipboard.$(b) } else { if (typeof (b) == "undefined") { b = document.getElementsByTagName("body")[0] } } var c = ZeroClipboard.getDOMObjectPosition(this.domElement, b); this.div = document.createElement("div"); this.div.className = "zclip"; this.div.id = "zclip-" + this.movieId; $(this.domElement).data("zclipId", "zclip-" + this.movieId); var a = this.div.style; a.position = "absolute"; a.left = "" + c.left + "px"; a.top = "" + c.top + "px"; a.width = "" + c.width + "px"; a.height = "" + c.height + "px"; a.zIndex = f; if (typeof (e) == "object") { for (addedStyle in e) { a[addedStyle] = e[addedStyle] } } b.appendChild(this.div); this.div.innerHTML = this.getHTML(c.width, c.height) }, getHTML: function (d, a) { var c = ""; var b = "id=" + this.id + "&width=" + d + "&height=" + a; if (navigator.userAgent.match(/MSIE/)) { var e = location.href.match(/^https/i) ? "https://" : "http://"; c += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + e + 'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + d + '" height="' + a + '" id="' + this.movieId + '" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="' + ZeroClipboard.moviePath + '" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="' + b + '"/><param name="wmode" value="transparent"/></object>' } else { c += '<embed id="' + this.movieId + '" src="' + ZeroClipboard.moviePath + '" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="' + d + '" height="' + a + '" name="' + this.movieId + '" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="' + b + '" wmode="transparent" />' } return c }, hide: function () { if (this.div) { this.div.style.left = "-2000px" } }, show: function () { this.reposition() }, destroy: function () { if (this.domElement && this.div) { this.hide(); this.div.innerHTML = ""; var a = document.getElementsByTagName("body")[0]; try { a.removeChild(this.div) } catch (b) { } this.domElement = null; this.div = null } }, reposition: function (c) { if (c) { this.domElement = ZeroClipboard.$(c); if (!this.domElement) { this.hide() } } if (this.domElement && this.div) { var b = ZeroClipboard.getDOMObjectPosition(this.domElement); var a = this.div.style; a.left = "" + b.left + "px"; a.top = "" + b.top + "px" } }, setText: function (a) { this.clipText = a; if (this.ready) { this.movie.setText(a) } }, addEventListener: function (a, b) { a = a.toString().toLowerCase().replace(/^on/, ""); if (!this.handlers[a]) { this.handlers[a] = [] } this.handlers[a].push(b) }, setHandCursor: function (a) { this.handCursorEnabled = a; if (this.ready) { this.movie.setHandCursor(a) } }, setCSSEffects: function (a) { this.cssEffects = !!a }, receiveEvent: function (d, f) { d = d.toString().toLowerCase().replace(/^on/, ""); switch (d) { case "load": this.movie = document.getElementById(this.movieId); if (!this.movie) { var c = this; setTimeout(function () { c.receiveEvent("load", null) }, 1); return } if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { var c = this; setTimeout(function () { c.receiveEvent("load", null) }, 100); this.ready = true; return } this.ready = true; try { this.movie.setText(this.clipText) } catch (h) { } try { this.movie.setHandCursor(this.handCursorEnabled) } catch (h) { } break; case "mouseover": if (this.domElement && this.cssEffects) { this.domElement.addClass("hover"); if (this.recoverActive) { this.domElement.addClass("active") } } break; case "mouseout": if (this.domElement && this.cssEffects) { this.recoverActive = false; if (this.domElement.hasClass("active")) { this.domElement.removeClass("active"); this.recoverActive = true } this.domElement.removeClass("hover") } break; case "mousedown": if (this.domElement && this.cssEffects) { this.domElement.addClass("active") } break; case "mouseup": if (this.domElement && this.cssEffects) { this.domElement.removeClass("active"); this.recoverActive = false } break } if (this.handlers[d]) { for (var b = 0, a = this.handlers[d].length; b < a; b++) { var g = this.handlers[d][b]; if (typeof (g) == "function") { g(this, f) } else { if ((typeof (g) == "object") && (g.length == 2)) { g[0][g[1]](this, f) } else { if (typeof (g) == "string") { window[g](this, f) } } } } } } };

/*CopyButton*/
Ext.namespace('Ext.ux');Ext.ux.CopyButton=Ext.extend(Ext.Button,{initComponent:function(){Ext.ux.CopyButton.superclass.initComponent.call(this);this.clip=new ZeroClipboard.Client();},afterRender:function(){Ext.ux.CopyButton.superclass.afterRender.call(this);this.clip.glue(this.getEl().dom);this.clip.hide();this.clip.addEventListener('mouseOver',this.clipMouseOver.createDelegate(this));this.clip.addEventListener('mouseOut',this.clipMouseOut.createDelegate(this));this.clip.addEventListener('mouseDown',this.clipMouseDown.createDelegate(this));this.clip.addEventListener('mouseUp',this.clipMouseUp.createDelegate(this));},onDestroy:function(){this.clip.destroy();Ext.ux.CopyButton.superclass.onDestroy.call(this);},onMouseOver:function(){if(!this.disabled){this.clip.show();}},clipMouseDown:function(){this.getClickEl().addClass('x-btn-click');this.clip.setText(this.getValue());Ext.getDoc().on('mouseup',this.clipMouseUp,this);},clipMouseUp:function(){Ext.getDoc().un('mouseup',this.clipMouseUp,this);this.getClickEl().removeClass('x-btn-click');this.focus();this.fireEvent('click',this);},clipMouseOver:function(){if(!this.disabled){this.el.addClass('x-btn-over');this.fireEvent('mouseover',this);}},clipMouseOut:function(){this.clip.hide();if(!this.disabled){this.el.removeClass('x-btn-over');this.fireEvent('mouseout',this);}},setValue:function(value){this.value=String(value);},getValue:function(){return this.value;}});

