From 5fb05be2eaa118bd8df6d0168c3cdc82407fe925 Mon Sep 17 00:00:00 2001
From: Thomas Jakobi
Date: Tue, 9 Feb 2021 17:34:45 +0100
Subject: [PATCH] Remove flash based xtypes (#15312)
* Remove flash based xtypes
'chart', 'piechart', 'cartesianchart' and the derived xtypes
* Add the chart components in an extra file.
* Deactivate MODx.util.Clipboard
* Remove the chart components finally
* Disable flash fallback
* Completely remove MODx.util.Clipboard
A github search for MODx.util.Clipboard filename:utilities.js shows 459 results, most in the utilities.js file or in some cache files. So I think that the component is no longer in use.
* grunt build
Co-authored-by: Jason Coward
---
manager/assets/ext3/ext-all-debug.js | 16226 ++++++++++-----------
manager/assets/ext3/ext-all.js | 6 +-
manager/assets/fileapi/FileAPI.js | 22 +-
manager/assets/modext/modx.jsgrps-min.js | 2 +-
manager/assets/modext/util/utilities.js | 29 -
5 files changed, 7397 insertions(+), 8888 deletions(-)
diff --git a/manager/assets/ext3/ext-all-debug.js b/manager/assets/ext3/ext-all-debug.js
index 14d16971c00..d9e1cd1ef6c 100644
--- a/manager/assets/ext3/ext-all-debug.js
+++ b/manager/assets/ext3/ext-all-debug.js
@@ -1,5 +1,5 @@
/*
-This file is part of Ext JS 3.4
+This file is part of Ext JS 3.4 (without the flash based components)
Copyright (c) 2011-2013 Sencha Inc
@@ -16,7 +16,7 @@ requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
-Build date: 2013-04-03 15:07:25
+Build date: 2020-10-28 16:35:00
*/
(function(){
@@ -26,7 +26,7 @@ var EXTUTIL = Ext.util,
FALSE = false;
EXTUTIL.Observable = function(){
-
+
var me = this, e = me.events;
if(me.listeners){
me.on(me.listeners);
@@ -36,10 +36,10 @@ EXTUTIL.Observable = function(){
};
EXTUTIL.Observable.prototype = {
-
+
filterOptRe : /^(?:scope|delay|buffer|single)$/,
-
+
fireEvent : function(){
var a = Array.prototype.slice.call(arguments, 0),
ename = a[0].toLowerCase(),
@@ -76,13 +76,13 @@ EXTUTIL.Observable.prototype = {
return ret;
},
-
+
addListener : function(eventName, fn, scope, o){
var me = this,
e,
oe,
ce;
-
+
if (typeof eventName == 'object') {
o = eventName;
for (e in o) {
@@ -101,7 +101,7 @@ EXTUTIL.Observable.prototype = {
}
},
-
+
removeListener : function(eventName, fn, scope){
var ce = this.events[eventName.toLowerCase()];
if (typeof ce == 'object') {
@@ -109,7 +109,7 @@ EXTUTIL.Observable.prototype = {
}
},
-
+
purgeListeners : function(){
var events = this.events,
evt,
@@ -122,7 +122,7 @@ EXTUTIL.Observable.prototype = {
}
},
-
+
addEvents : function(o){
var me = this;
me.events = me.events || {};
@@ -137,13 +137,13 @@ EXTUTIL.Observable.prototype = {
}
},
-
+
hasListener : function(eventName){
var e = this.events[eventName.toLowerCase()];
return typeof e == 'object' && e.listeners.length > 0;
},
-
+
suspendEvents : function(queueSuspended){
this.eventsSuspended = TRUE;
if(queueSuspended && !this.eventQueue){
@@ -151,7 +151,7 @@ EXTUTIL.Observable.prototype = {
}
},
-
+
resumeEvents : function(){
var me = this,
queued = me.eventQueue || [];
@@ -224,7 +224,7 @@ EXTUTIL.Event.prototype = {
scope = scope || me.obj;
if(!me.isListening(fn, scope)){
l = me.createListener(fn, scope, options);
- if(me.firing){
+ if(me.firing){
me.listeners = me.listeners.slice(0);
}
me.listeners.push(l);
@@ -304,7 +304,7 @@ EXTUTIL.Event.prototype = {
return ret;
},
-
+
clearListeners : function(){
var me = this,
l = me.listeners,
@@ -347,7 +347,7 @@ Ext.DomHelper = function(){
cssRe = /([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,
endRe = /end/i,
pub,
-
+
afterbegin = 'afterbegin',
afterend = 'afterend',
beforebegin = 'beforebegin',
@@ -359,13 +359,13 @@ Ext.DomHelper = function(){
trs = tbs + '',
tre = ' '+tbe;
-
+
function doInsert(el, o, returnElement, pos, sibling, append){
var newNode = pub.insertHtml(pos, Ext.getDom(el), createHtml(o));
return returnElement ? Ext.get(newNode, true) : newNode;
}
-
+
function createHtml(o){
var b = '',
attr,
@@ -397,7 +397,7 @@ Ext.DomHelper = function(){
}
}
};
-
+
if (emptyTags.test(o.tag)) {
b += '/>';
} else {
@@ -434,7 +434,7 @@ Ext.DomHelper = function(){
return el;
}
-
+
function insertIntoTable(tag, where, el, html) {
var node,
before;
@@ -465,31 +465,31 @@ Ext.DomHelper = function(){
return node;
}
-
+
function createContextualFragment(html){
var div = document.createElement("div"),
fragment = document.createDocumentFragment(),
i = 0,
length, childNodes;
-
+
div.innerHTML = html;
childNodes = div.childNodes;
length = childNodes.length;
-
+
for (; i < length; i++) {
fragment.appendChild(childNodes[i].cloneNode(true));
}
-
+
return fragment;
}
-
+
pub = {
-
+
markup : function(o){
return createHtml(o);
},
-
+
applyStyles : function(el, styles){
if (styles) {
var matches;
@@ -499,7 +499,7 @@ Ext.DomHelper = function(){
styles = styles.call();
}
if (typeof styles == "string") {
-
+
cssRe.lastIndex = 0;
while ((matches = cssRe.exec(styles))) {
el.setStyle(matches[1], matches[2]);
@@ -509,7 +509,7 @@ Ext.DomHelper = function(){
}
}
},
-
+
insertHtml : function(where, el, html){
var hash = {},
hashVal,
@@ -520,7 +520,7 @@ Ext.DomHelper = function(){
rs;
where = where.toLowerCase();
-
+
hash[beforebegin] = ['BeforeBegin', 'previousSibling'];
hash[afterend] = ['AfterEnd', 'nextSibling'];
@@ -528,7 +528,7 @@ Ext.DomHelper = function(){
if(tableRe.test(el.tagName) && (rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html))){
return rs;
}
-
+
hash[afterbegin] = ['AfterBegin', 'firstChild'];
hash[beforeend] = ['BeforeEnd', 'lastChild'];
if ((hashVal = hash[where])) {
@@ -572,27 +572,27 @@ Ext.DomHelper = function(){
throw 'Illegal insertion point -> "' + where + '"';
},
-
+
insertBefore : function(el, o, returnElement){
return doInsert(el, o, returnElement, beforebegin);
},
-
+
insertAfter : function(el, o, returnElement){
return doInsert(el, o, returnElement, afterend, 'nextSibling');
},
-
+
insertFirst : function(el, o, returnElement){
return doInsert(el, o, returnElement, afterbegin, 'firstChild');
},
-
+
append : function(el, o, returnElement){
return doInsert(el, o, returnElement, beforeend, '', true);
},
-
+
overwrite : function(el, o, returnElement){
el = Ext.getDom(el);
el.innerHTML = createHtml(o);
@@ -624,19 +624,19 @@ Ext.Template = function(html){
html = buf.join('');
}
-
+
me.html = html;
-
+
if (me.compiled) {
me.compile();
}
};
Ext.Template.prototype = {
-
+
re : /\{([\w\-]+)\}/g,
-
-
+
+
applyTemplate : function(values){
var me = this;
@@ -647,7 +647,7 @@ Ext.Template.prototype = {
});
},
-
+
set : function(html, compile){
var me = this;
me.html = html;
@@ -655,7 +655,7 @@ Ext.Template.prototype = {
return compile ? me.compile() : me;
},
-
+
compile : function(){
var me = this,
sep = Ext.isGecko ? "+" : ",";
@@ -671,22 +671,22 @@ Ext.Template.prototype = {
return me;
},
-
+
insertFirst: function(el, values, returnElement){
return this.doInsert('afterBegin', el, values, returnElement);
},
-
+
insertBefore: function(el, values, returnElement){
return this.doInsert('beforeBegin', el, values, returnElement);
},
-
+
insertAfter : function(el, values, returnElement){
return this.doInsert('afterEnd', el, values, returnElement);
},
-
+
append : function(el, values, returnElement){
return this.doInsert('beforeEnd', el, values, returnElement);
},
@@ -697,7 +697,7 @@ Ext.Template.prototype = {
return returnEl ? Ext.get(newNode, true) : newNode;
},
-
+
overwrite : function(el, values, returnElement){
el = Ext.getDom(el);
el.innerHTML = this.applyTemplate(values);
@@ -715,28 +715,28 @@ Ext.Template.from = function(el, config){
Ext.DomQuery = function(){
- var cache = {},
- simpleCache = {},
+ var cache = {},
+ simpleCache = {},
valueCache = {},
nonSpace = /\S/,
trimRe = /^\s+|\s+$/g,
tplRe = /\{(\d+)\}/g,
modeRe = /^(\s?[\/>+~]\s?|\s|$)/,
tagTokenRe = /^(#)?([\w\-\*]+)/,
- nthRe = /(\d*)n\+?(\d*)/,
+ nthRe = /(\d*)n\+?(\d*)/,
nthRe2 = /\D/,
-
-
-
+
+
+
isIE = window.ActiveXObject ? true : false,
key = 30803;
-
-
-
- eval("var batch = 30803;");
-
-
+
+
+ eval("var batch = 30803;");
+
+
+
function child(parent, index){
var i = 0,
n = parent.firstChild;
@@ -751,31 +751,31 @@ Ext.DomQuery = function(){
return null;
}
-
- function next(n){
+
+ 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;
@@ -784,8 +784,8 @@ Ext.DomQuery = function(){
}
-
-
+
+
function byClassName(nodeSet, cls){
if(!cls){
return nodeSet;
@@ -800,7 +800,7 @@ Ext.DomQuery = function(){
};
function attrValue(n, attr){
-
+
if(!n.tagName && typeof n.length != "undefined"){
n = n[0];
}
@@ -819,22 +819,22 @@ Ext.DomQuery = function(){
};
-
-
-
+
+
+
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);
@@ -842,8 +842,8 @@ Ext.DomQuery = function(){
result[++ri] = ci;
}
}
-
-
+
+
} else if(mode == "/" || mode == ">"){
var utag = tagName.toUpperCase();
for(var i = 0, ni, cn; ni = ns[i]; i++){
@@ -854,8 +854,8 @@ Ext.DomQuery = function(){
}
}
}
-
-
+
+
}else if(mode == "+"){
var utag = tagName.toUpperCase();
for(var i = 0, n; n = ns[i]; i++){
@@ -864,8 +864,8 @@ Ext.DomQuery = function(){
result[++ri] = n;
}
}
-
-
+
+
}else if(mode == "~"){
var utag = tagName.toUpperCase();
for(var i = 0, n; n = ns[i]; i++){
@@ -923,29 +923,29 @@ Ext.DomQuery = function(){
return result;
}
-
-
+
+
function byAttribute(cs, attr, value, op, custom){
- var result = [],
- ri = -1,
- useGetStyle = custom == "{",
- fn = Ext.DomQuery.operators[op],
+ var result = [],
+ ri = -1,
+ useGetStyle = custom == "{",
+ fn = Ext.DomQuery.operators[op],
a,
xml,
hasXml;
-
+
for(var i = 0, ci; ci = cs[i]; i++){
-
+
if(ci.nodeType != 1){
continue;
}
-
+
if(!hasXml){
xml = Ext.DomQuery.isXml(ci);
hasXml = true;
}
-
-
+
+
if(!xml){
if(useGetStyle){
a = Ext.DomQuery.getStyle(ci, attr);
@@ -954,8 +954,8 @@ Ext.DomQuery = function(){
} else if (attr == "for"){
a = ci.htmlFor;
} else if (attr == "href"){
-
-
+
+
a = ci.getAttribute("href", 2);
} else{
a = ci.getAttribute(attr);
@@ -975,7 +975,7 @@ Ext.DomQuery = function(){
}
function nodupIEXml(cs){
- var d = ++key,
+ var d = ++key,
r;
cs[0].setAttribute("_nodup", d);
r = [cs[0]];
@@ -1030,7 +1030,7 @@ Ext.DomQuery = function(){
r = [];
for(var i = 0, len = c1.length; i < len; i++){
c1[i].setAttribute("_qdiff", d);
- }
+ }
for(var i = 0, len = c2.length; i < len; i++){
if(c2[i].getAttribute("_qdiff") != d){
r[r.length] = c2[i];
@@ -1051,10 +1051,10 @@ Ext.DomQuery = function(){
}
if(isIE && typeof c1[0].selectSingleNode != "undefined"){
return quickDiffIEXml(c1, c2);
- }
+ }
for(var i = 0; i < len1; i++){
c1[i]._qdiff = d;
- }
+ }
for(var i = 0, len = c2.length; i < len; i++){
if(c2[i]._qdiff != d){
r[r.length] = c2[i];
@@ -1076,26 +1076,26 @@ Ext.DomQuery = function(){
getStyle : function(el, name){
return Ext.fly(el).getStyle(name);
},
-
+
compile : function(path, type){
type = type || "select";
-
+
var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],
- mode,
+ mode,
lastPath,
matchers = Ext.DomQuery.matchers,
matchersLn = matchers.length,
modeMatch,
-
+
lmode = path.match(modeRe);
-
+
if(lmode && lmode[1]){
fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";';
path = path.replace(lmode[1], "");
}
-
-
+
+
while(path.substr(0, 1)=="/"){
path = path.substr(1);
}
@@ -1105,9 +1105,9 @@ Ext.DomQuery = function(){
var tokenMatch = path.match(tagTokenRe);
if(type == "select"){
if(tokenMatch){
-
+
if(tokenMatch[1] == "#"){
- fn[fn.length] = 'n = quickId(n, mode, root, "'+tokenMatch[2]+'");';
+ fn[fn.length] = 'n = quickId(n, mode, root, "'+tokenMatch[2]+'");';
}else{
fn[fn.length] = 'n = getNodes(n, mode, "'+tokenMatch[2]+'");';
}
@@ -1115,7 +1115,7 @@ Ext.DomQuery = function(){
}else if(path.substr(0, 1) != '@'){
fn[fn.length] = 'n = getNodes(n, mode, "*");';
}
-
+
}else{
if(tokenMatch){
if(tokenMatch[1] == "#"){
@@ -1140,7 +1140,7 @@ Ext.DomQuery = function(){
break;
}
}
-
+
if(!matched){
throw 'Error parsing selector, parsing failed at "' + path + '"';
}
@@ -1150,29 +1150,29 @@ Ext.DomQuery = function(){
path = path.replace(modeMatch[1], "");
}
}
-
+
fn[fn.length] = "return nodup(n);\n}";
-
-
+
+
eval(fn.join(""));
return f;
},
-
+
jsSelect: function(path, root, type){
-
+
root = root || document;
-
+
if(typeof root == "string"){
root = document.getElementById(root);
}
var paths = path.split(","),
results = [];
-
-
- for(var i = 0, len = paths.length; i < len; i++){
+
+
+ for(var i = 0, len = paths.length; i < len; i++){
var subPath = paths[i].replace(trimRe, "");
-
+
if(!cache[subPath]){
cache[subPath] = Ext.DomQuery.compile(subPath);
if(!cache[subPath]){
@@ -1184,9 +1184,9 @@ Ext.DomQuery = function(){
results = results.concat(result);
}
}
-
-
-
+
+
+
if(paths.length > 1){
return nodup(results);
}
@@ -1203,19 +1203,19 @@ Ext.DomQuery = function(){
var cs = root.querySelectorAll(path);
return Ext.toArray(cs);
}
- catch (ex) {}
- }
+ 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]){
@@ -1223,24 +1223,24 @@ Ext.DomQuery = function(){
}
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);
@@ -1250,7 +1250,7 @@ Ext.DomQuery = function(){
return isArray ? (result.length == el.length) : (result.length > 0);
},
-
+
filter : function(els, ss, nonMatches){
ss = ss.replace(trimRe, "");
if(!simpleCache[ss]){
@@ -1260,7 +1260,7 @@ Ext.DomQuery = function(){
return nonMatches ? quickDiff(result, els) : result;
},
-
+
matchers : [{
re: /^\.([\w\-]+)/,
select: 'n = byClassName(n, " {1} ");'
@@ -1542,15 +1542,15 @@ Ext.query = Ext.DomQuery.select;
var task = new Ext.util.DelayedTask(function(){
alert(Ext.getDom('myInputField').value.length);
});
-// Wait 500ms before calling our function. If the user presses another key
+// Wait 500ms before calling our function. If the user presses another key
// during that 500ms, it will be cancelled and we'll wait another 500ms.
Ext.get('myInputField').on('keypress', function(){
- task.{@link #delay}(500);
+ task.{@link #delay}(500);
});
- *
+ *
* Note that we are using a DelayedTask here to illustrate a point. The configuration
* option buffer for {@link Ext.util.Observable#addListener addListener/on} will
- * also setup a delayed task for you to buffer events.
+ * also setup a delayed task for you to buffer events.
* @constructor The parameters to this constructor serve as defaults and are not required.
* @param {Function} fn (optional) The default function to call.
* @param {Object} scope (optional) The default scope (The this
reference) in which the
@@ -1559,13 +1559,13 @@ Ext.get('myInputField').on('keypress', function(){
*/
Ext.util.DelayedTask = function(fn, scope, args){
var me = this,
- id,
+ id,
call = function(){
clearInterval(id);
id = null;
fn.apply(scope, args || []);
};
-
+
/**
* Cancels any pending timeout and queues a new one
* @param {Number} delay The milliseconds to delay
@@ -2214,12 +2214,12 @@ el.un('click', this.handlerFn);
return this;
},
-
+
isBorderBox : function(){
return Ext.isBorderBox || Ext.isForcedBorderBox || noBoxAdjust[(this.dom.tagName || "").toLowerCase()];
},
-
+
remove : function(){
var me = this,
dom = me.dom;
@@ -2230,7 +2230,7 @@ el.un('click', this.handlerFn);
}
},
-
+
hover : function(overFn, outFn, scope, options){
var me = this;
me.on('mouseenter', overFn, scope || me.dom, options);
@@ -2238,17 +2238,17 @@ el.un('click', this.handlerFn);
return me;
},
-
+
contains : function(el){
return !el ? false : Ext.lib.Dom.isAncestor(this.dom, el.dom ? el.dom : el);
},
-
+
getAttributeNS : function(ns, name){
return this.getAttribute(name, ns);
},
-
+
getAttribute: (function(){
var test = document.createElement('table'),
isBrokenOnTable = false,
@@ -2306,7 +2306,7 @@ el.un('click', this.handlerFn);
test = null;
})(),
-
+
update : function(html) {
if (this.dom) {
this.dom.innerHTML = html;
@@ -2340,7 +2340,7 @@ El.get = function(el){
elm,
id;
if(!el){ return null; }
- if (typeof el == "string") {
+ if (typeof el == "string") {
if (!(elm = DOC.getElementById(el))) {
return null;
}
@@ -2351,7 +2351,7 @@ El.get = function(el){
ex = El.addToCache(new El(elm));
}
return ex;
- } else if (el.tagName) {
+ } else if (el.tagName) {
if(!(id = el.id)){
id = Ext.id(el);
}
@@ -2364,10 +2364,10 @@ El.get = function(el){
return ex;
} else if (el instanceof El) {
if(el != docEl){
-
-
-
+
+
+
if (Ext.isIE && (el.id == undefined || el.id == '')) {
el.dom = el.dom;
} else {
@@ -2380,7 +2380,7 @@ El.get = function(el){
} else if(Ext.isArray(el)) {
return El.select(el);
} else if(el == DOC) {
-
+
if(!docEl){
var f = function(){};
f.prototype = El.prototype;
@@ -2436,23 +2436,23 @@ function garbageCollect(){
}
el = o.el;
d = el.dom;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
if(!d || !d.parentNode || (!d.offsetParent && !DOC.getElementById(eid))){
if(Ext.enableListenerCollection){
Ext.EventManager.removeAll(d);
@@ -2460,7 +2460,7 @@ function garbageCollect(){
delete EC[eid];
}
}
-
+
if (Ext.isIE) {
var t = {};
for (eid in EC) {
@@ -2520,14 +2520,14 @@ Ext.Element.addMethods(function(){
PREVIOUSSIBLING = 'previousSibling',
DQ = Ext.DomQuery,
GET = Ext.get;
-
+
return {
-
+
findParent : function(simpleSelector, maxDepth, returnEl){
var p = this.dom,
- b = document.body,
- depth = 0,
- stopEl;
+ b = document.body,
+ depth = 0,
+ stopEl;
if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') {
return null;
}
@@ -2545,66 +2545,66 @@ Ext.Element.addMethods(function(){
}
return null;
},
-
-
+
+
findParentNode : function(simpleSelector, maxDepth, returnEl){
var p = Ext.fly(this.dom.parentNode, '_internal');
return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null;
},
-
-
+
+
up : function(simpleSelector, maxDepth){
return this.findParentNode(simpleSelector, maxDepth, true);
},
-
-
+
+
select : function(selector){
return Ext.Element.select(selector, this.dom);
},
-
-
+
+
query : function(selector){
return DQ.select(selector, this.dom);
},
-
-
+
+
child : function(selector, returnDom){
var n = DQ.selectNode(selector, this.dom);
return returnDom ? n : GET(n);
},
-
-
+
+
down : function(selector, returnDom){
var n = DQ.selectNode(" > " + selector, this.dom);
return returnDom ? n : GET(n);
},
-
-
+
+
parent : function(selector, returnDom){
return this.matchNode(PARENTNODE, PARENTNODE, selector, returnDom);
},
-
-
+
+
next : function(selector, returnDom){
return this.matchNode(NEXTSIBLING, NEXTSIBLING, selector, returnDom);
},
-
-
+
+
prev : function(selector, returnDom){
return this.matchNode(PREVIOUSSIBLING, PREVIOUSSIBLING, selector, returnDom);
},
-
-
-
+
+
+
first : function(selector, returnDom){
return this.matchNode(NEXTSIBLING, 'firstChild', selector, returnDom);
},
-
-
+
+
last : function(selector, returnDom){
return this.matchNode(PREVIOUSSIBLING, 'lastChild', selector, returnDom);
},
-
+
matchNode : function(dir, start, selector, returnDom){
var n = this.dom[start];
while(n){
@@ -2614,7 +2614,7 @@ Ext.Element.addMethods(function(){
n = n[dir];
}
return null;
- }
+ }
};
}());
Ext.Element.addMethods(
@@ -2622,85 +2622,85 @@ function() {
var GETDOM = Ext.getDom,
GET = Ext.get,
DH = Ext.DomHelper;
-
+
return {
-
- appendChild: function(el){
- return GET(el).appendTo(this);
+
+ appendChild: function(el){
+ return GET(el).appendTo(this);
},
-
-
- appendTo: function(el){
- GETDOM(el).appendChild(this.dom);
+
+
+ appendTo: function(el){
+ GETDOM(el).appendChild(this.dom);
return this;
},
-
-
- insertBefore: function(el){
+
+
+ insertBefore: function(el){
(el = GETDOM(el)).parentNode.insertBefore(this.dom, el);
return this;
},
-
-
+
+
insertAfter: function(el){
(el = GETDOM(el)).parentNode.insertBefore(this.dom, el.nextSibling);
return this;
},
-
-
+
+
insertFirst: function(el, returnDom){
el = el || {};
- if(el.nodeType || el.dom || typeof el == 'string'){
+ if(el.nodeType || el.dom || typeof el == 'string'){
el = GETDOM(el);
this.dom.insertBefore(el, this.dom.firstChild);
return !returnDom ? GET(el) : el;
- }else{
+ }else{
return this.createChild(el, this.dom.firstChild, returnDom);
}
},
-
-
+
+
replace: function(el){
el = GET(el);
this.insertBefore(el);
el.remove();
return this;
},
-
-
+
+
replaceWith: function(el){
var me = this;
-
+
if(el.nodeType || el.dom || typeof el == 'string'){
el = GETDOM(el);
me.dom.parentNode.insertBefore(el, me.dom);
}else{
el = DH.insertBefore(me.dom, el);
}
-
+
delete Ext.elCache[me.id];
- Ext.removeNode(me.dom);
+ Ext.removeNode(me.dom);
me.id = Ext.id(me.dom = el);
- Ext.Element.addToCache(me.isFlyweight ? new Ext.Element(me.dom) : me);
+ Ext.Element.addToCache(me.isFlyweight ? new Ext.Element(me.dom) : me);
return me;
},
-
-
+
+
createChild: function(config, insertBefore, returnDom){
config = config || {tag:'div'};
- return insertBefore ?
- DH.insertBefore(insertBefore, config, returnDom !== true) :
+ return insertBefore ?
+ DH.insertBefore(insertBefore, config, returnDom !== true) :
DH[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true);
},
-
-
- wrap: function(config, returnDom){
+
+
+ wrap: function(config, returnDom){
var newEl = DH.insertBefore(this.dom, config || {tag: "div"}, !returnDom);
newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom);
return newEl;
},
-
-
+
+
insertHtml : function(where, html, returnEl){
var el = DH.insertHtml(where, this.dom, html);
return returnEl ? Ext.get(el) : el;
@@ -2708,7 +2708,7 @@ function() {
};
}());
Ext.Element.addMethods(function(){
-
+
var supports = Ext.supports,
propCache = {},
camelRe = /(-[a-z])/gi,
@@ -2733,14 +2733,14 @@ Ext.Element.addMethods(function(){
OVERFLOWX = 'overflow-x',
OVERFLOWY = 'overflow-y',
ORIGINALCLIP = 'originalClip',
-
+
borders = {l: BORDER + LEFT + WIDTH, r: BORDER + RIGHT + WIDTH, t: BORDER + TOP + WIDTH, b: BORDER + BOTTOM + WIDTH},
paddings = {l: PADDING + LEFT, r: PADDING + RIGHT, t: PADDING + TOP, b: PADDING + BOTTOM},
margins = {l: MARGIN + LEFT, r: MARGIN + RIGHT, t: MARGIN + TOP, b: MARGIN + BOTTOM},
data = Ext.Element.data;
-
+
function camelFn(m, a) {
return a.charAt(1).toUpperCase();
}
@@ -2750,7 +2750,7 @@ Ext.Element.addMethods(function(){
}
return {
-
+
adjustWidth : function(width) {
var me = this;
var isNum = (typeof width == "number");
@@ -2760,7 +2760,7 @@ Ext.Element.addMethods(function(){
return (isNum && width < 0) ? 0 : width;
},
-
+
adjustHeight : function(height) {
var me = this;
var isNum = (typeof height == "number");
@@ -2771,14 +2771,14 @@ Ext.Element.addMethods(function(){
},
-
+
addClass : function(className){
var me = this,
i,
len,
v,
cls = [];
-
+
if (!Ext.isArray(className)) {
if (typeof className == 'string' && !this.hasClass(className)) {
me.dom.className += " " + className;
@@ -2798,7 +2798,7 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
removeClass : function(className){
var me = this,
i,
@@ -2826,7 +2826,7 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
radioClass : function(className){
var cn = this.dom.parentNode.childNodes,
v,
@@ -2842,17 +2842,17 @@ Ext.Element.addMethods(function(){
return this.addClass(className);
},
-
+
toggleClass : function(className){
return this.hasClass(className) ? this.removeClass(className) : this.addClass(className);
},
-
+
hasClass : function(className){
return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1;
},
-
+
replaceClass : function(oldClassName, newClassName){
return this.removeClass(oldClassName).addClass(newClassName);
},
@@ -2861,7 +2861,7 @@ Ext.Element.addMethods(function(){
return this.getStyle(style) == val;
},
-
+
getStyle : function(){
return view && view.getComputedStyle ?
function(prop){
@@ -2877,16 +2877,16 @@ Ext.Element.addMethods(function(){
prop = chkCache(prop);
out = (v = el.style[prop]) ? v :
(cs = view.getComputedStyle(el, "")) ? cs[prop] : null;
-
-
-
+
+
+
if(prop == 'marginRight' && out != '0px' && !supports.correctRightMargin){
display = el.style.display;
el.style.display = 'inline-block';
out = view.getComputedStyle(el, '').marginRight;
el.style.display = display;
}
-
+
if(prop == 'backgroundColor' && out == 'rgba(0, 0, 0, 0)' && !supports.correctTransparentColor){
out = 'transparent';
}
@@ -2914,7 +2914,7 @@ Ext.Element.addMethods(function(){
};
}(),
-
+
getColor : function(attr, defaultValue, prefix){
var v = this.getStyle(attr),
color = (typeof prefix != 'undefined') ? prefix : '#',
@@ -2935,10 +2935,10 @@ Ext.Element.addMethods(function(){
return(color.length > 5 ? color.toLowerCase() : defaultValue);
},
-
+
setStyle : function(prop, value){
var tmp, style;
-
+
if (typeof prop != 'object') {
tmp = {};
tmp[prop] = value;
@@ -2953,7 +2953,7 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
setOpacity : function(opacity, animate){
var me = this,
s = me.dom.style;
@@ -2974,7 +2974,7 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
clearOpacity : function(){
var style = this.dom.style;
if(Ext.isIE9m){
@@ -2987,7 +2987,7 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
getHeight : function(contentHeight){
var me = this,
dom = me.dom,
@@ -2998,7 +2998,7 @@ Ext.Element.addMethods(function(){
return h < 0 ? 0 : h;
},
-
+
getWidth : function(contentWidth){
var me = this,
dom = me.dom,
@@ -3008,7 +3008,7 @@ Ext.Element.addMethods(function(){
return w < 0 ? 0 : w;
},
-
+
setWidth : function(width, animate){
var me = this;
width = me.adjustWidth(width);
@@ -3018,7 +3018,7 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
setHeight : function(height, animate){
var me = this;
height = me.adjustHeight(height);
@@ -3028,17 +3028,17 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
getBorderWidth : function(side){
return this.addStyles(side, borders);
},
-
+
getPadding : function(side){
return this.addStyles(side, paddings);
},
-
+
clip : function(){
var me = this,
dom = me.dom;
@@ -3057,7 +3057,7 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
unclip : function(){
var me = this,
dom = me.dom;
@@ -3078,7 +3078,7 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
addStyles : function(sides, styles){
var ttlSize = 0,
sidesArr = sides.match(wordsRe),
@@ -3114,63 +3114,63 @@ var D = Ext.lib.Dom,
ZINDEX = "z-index";
Ext.Element.addMethods({
-
+
getX : function(){
return D.getX(this.dom);
},
-
+
getY : function(){
return D.getY(this.dom);
},
-
+
getXY : function(){
return D.getXY(this.dom);
},
-
+
getOffsetsTo : function(el){
var o = this.getXY(),
e = Ext.fly(el, '_internal').getXY();
return [o[0]-e[0],o[1]-e[1]];
},
-
- setX : function(x, animate){
+
+ setX : function(x, animate){
return this.setXY([x, this.getY()], this.animTest(arguments, animate, 1));
},
-
- setY : function(y, animate){
+
+ setY : function(y, animate){
return this.setXY([this.getX(), y], this.animTest(arguments, animate, 1));
},
-
+
setLeft : function(left){
this.setStyle(LEFT, this.addUnits(left));
return this;
},
-
+
setTop : function(top){
this.setStyle(TOP, this.addUnits(top));
return this;
},
-
+
setRight : function(right){
this.setStyle(RIGHT, this.addUnits(right));
return this;
},
-
+
setBottom : function(bottom){
this.setStyle(BOTTOM, this.addUnits(bottom));
return this;
},
-
+
setXY : function(pos, animate){
var me = this;
if(!animate || !me.anim){
@@ -3181,44 +3181,44 @@ Ext.Element.addMethods({
return me;
},
-
+
setLocation : function(x, y, animate){
return this.setXY([x, y], this.animTest(arguments, animate, 2));
},
-
+
moveTo : function(x, y, animate){
- return this.setXY([x, y], this.animTest(arguments, animate, 2));
- },
-
-
+ return this.setXY([x, y], this.animTest(arguments, animate, 2));
+ },
+
+
getLeft : function(local){
return !local ? this.getX() : parseInt(this.getStyle(LEFT), 10) || 0;
},
-
+
getRight : function(local){
var me = this;
return !local ? me.getX() + me.getWidth() : (me.getLeft(true) + me.getWidth()) || 0;
},
-
+
getTop : function(local) {
return !local ? this.getY() : parseInt(this.getStyle(TOP), 10) || 0;
},
-
+
getBottom : function(local){
var me = this;
return !local ? me.getY() + me.getHeight() : (me.getTop(true) + me.getHeight()) || 0;
},
-
+
position : function(pos, zIndex, x, y){
var me = this;
-
- if(!pos && me.isStyle(POSITION, STATIC)){
- me.setStyle(POSITION, RELATIVE);
+
+ if(!pos && me.isStyle(POSITION, STATIC)){
+ me.setStyle(POSITION, RELATIVE);
} else if(pos) {
me.setStyle(POSITION, pos);
}
@@ -3228,7 +3228,7 @@ Ext.Element.addMethods({
if(x || y) me.setXY([x || false, y || false]);
},
-
+
clearPositioning : function(value){
value = value || '';
this.setStyle({
@@ -3242,7 +3242,7 @@ Ext.Element.addMethods({
return this;
},
-
+
getPositioning : function(){
var l = this.getStyle(LEFT);
var t = this.getStyle(TOP);
@@ -3255,26 +3255,26 @@ Ext.Element.addMethods({
"z-index" : this.getStyle(ZINDEX)
};
},
-
-
+
+
setPositioning : function(pc){
var me = this,
style = me.dom.style;
-
+
me.setStyle(pc);
-
+
if(pc.right == AUTO){
style.right = "";
}
if(pc.bottom == AUTO){
style.bottom = "";
}
-
+
return me;
- },
-
-
- translatePoints : function(x, y){
+ },
+
+
+ translatePoints : function(x, y){
y = isNaN(x[1]) ? y : x[1];
x = isNaN(x[0]) ? x : x[0];
var me = this,
@@ -3282,34 +3282,34 @@ Ext.Element.addMethods({
o = me.getXY(),
l = parseInt(me.getStyle(LEFT), 10),
t = parseInt(me.getStyle(TOP), 10);
-
+
l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft);
- t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop);
+ t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop);
- return {left: (x - o[0] + l), top: (y - o[1] + t)};
+ return {left: (x - o[0] + l), top: (y - o[1] + t)};
},
-
+
animTest : function(args, animate, i) {
return !!animate && this.preanim ? this.preanim(args, i) : false;
}
});
})();
Ext.Element.addMethods({
-
+
isScrollable : function(){
var dom = this.dom;
return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth;
},
-
+
scrollTo : function(side, value){
this.dom["scroll" + (/top/i.test(side) ? "Top" : "Left")] = value;
return this;
},
-
+
getScroll : function(){
- var d = this.dom,
+ var d = this.dom,
doc = document,
body = doc.body,
docElement = doc.documentElement,
@@ -3319,7 +3319,7 @@ Ext.Element.addMethods({
if(d == doc || d == body){
if(Ext.isIE && Ext.isStrict){
- l = docElement.scrollLeft;
+ l = docElement.scrollLeft;
t = docElement.scrollTop;
}else{
l = window.pageXOffset;
@@ -3376,23 +3376,23 @@ Ext.Element.addMethods(function(){
};
return {
-
+
originalDisplay : "",
visibilityMode : 1,
-
+
setVisibilityMode : function(visMode){
data(this.dom, VISMODE, visMode);
return this;
},
-
+
animate : function(args, duration, onComplete, easing, animType){
this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType);
return this;
},
-
+
anim : function(args, opt, animType, defaultDur, defaultEase, cb){
animType = animType || 'run';
opt = opt || {};
@@ -3412,21 +3412,21 @@ Ext.Element.addMethods(function(){
return anim;
},
-
+
preanim : function(a, i){
return !a[i] ? false : (typeof a[i] == 'object' ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]});
},
-
+
isVisible : function() {
var me = this,
dom = me.dom,
visible = data(dom, ISVISIBLE);
- if(typeof visible == 'boolean'){
+ if(typeof visible == 'boolean'){
return visible;
}
-
+
visible = !me.isStyle(VISIBILITY, HIDDEN) &&
!me.isStyle(DISPLAY, NONE) &&
!((getVisMode(dom) == El.ASCLASS) && me.hasClass(me.visibilityCls || El.visibilityCls));
@@ -3435,14 +3435,14 @@ Ext.Element.addMethods(function(){
return visible;
},
-
+
setVisible : function(visible, animate){
var me = this, isDisplay, isVisibility, isOffsets, isNosize,
dom = me.dom,
visMode = getVisMode(dom);
-
+
if (typeof animate == 'string'){
switch (animate) {
case DISPLAY:
@@ -3491,7 +3491,7 @@ Ext.Element.addMethods(function(){
dom.style.visibility = visible ? "visible" : HIDDEN;
}
}else{
-
+
if(visible){
me.setOpacity(.01);
me.setVisible(true);
@@ -3505,25 +3505,25 @@ Ext.Element.addMethods(function(){
visible || me.setVisible(false).setOpacity(1);
});
}
- data(dom, ISVISIBLE, visible);
+ data(dom, ISVISIBLE, visible);
return me;
},
-
+
hasMetrics : function(){
var dom = this.dom;
return this.isVisible() || (getVisMode(dom) == El.VISIBILITY);
},
-
+
toggle : function(animate){
var me = this;
me.setVisible(!me.isVisible(), me.preanim(arguments, 0));
return me;
},
-
+
setDisplayed : function(value) {
if(typeof value == "boolean"){
value = value ? getDisplay(this.dom) : NONE;
@@ -3532,21 +3532,21 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
fixDisplay : function(){
var me = this;
if(me.isStyle(DISPLAY, NONE)){
me.setStyle(VISIBILITY, HIDDEN);
- me.setStyle(DISPLAY, getDisplay(this.dom));
- if(me.isStyle(DISPLAY, NONE)){
+ me.setStyle(DISPLAY, getDisplay(this.dom));
+ if(me.isStyle(DISPLAY, NONE)){
me.setStyle(DISPLAY, "block");
}
}
},
-
+
hide : function(animate){
-
+
if (typeof animate == 'string'){
this.setVisible(false, animate);
return this;
@@ -3555,9 +3555,9 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
show : function(animate){
-
+
if (typeof animate == 'string'){
this.setVisible(true, animate);
return this;
@@ -3567,7 +3567,7 @@ Ext.Element.addMethods(function(){
}
};
}());(function(){
-
+
var NULL = null,
UNDEFINED = undefined,
TRUE = true,
@@ -3588,7 +3588,7 @@ Ext.Element.addMethods(function(){
MOTION = "motion",
POSITION = "position",
EASEOUT = "easeOut",
-
+
flyEl = new Ext.Element.Flyweight(),
queues = {},
getObject = function(o){
@@ -3599,7 +3599,7 @@ Ext.Element.addMethods(function(){
flyEl.id = Ext.id(dom);
return flyEl;
},
-
+
getQueue = function(id){
if(!queues[id]){
queues[id] = [];
@@ -3609,78 +3609,78 @@ Ext.Element.addMethods(function(){
setQueue = function(id, value){
queues[id] = value;
};
-
+
Ext.enableFx = TRUE;
Ext.Fx = {
-
-
-
+
+
+
switchStatements : function(key, fn, argHash){
return fn.apply(this, argHash[key]);
},
-
-
- slideIn : function(anchor, o){
+
+
+ slideIn : function(anchor, o){
o = getObject(o);
var me = this,
dom = me.dom,
st = dom.style,
xy,
r,
- b,
- wrap,
+ b,
+ wrap,
after,
st,
- args,
+ args,
pt,
bw,
bh;
-
+
anchor = anchor || "t";
- me.queueFx(o, function(){
+ me.queueFx(o, function(){
xy = fly(dom).getXY();
-
- fly(dom).fixDisplay();
-
-
- r = fly(dom).getFxRestore();
+
+ fly(dom).fixDisplay();
+
+
+ r = fly(dom).getFxRestore();
b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
b.right = b.x + b.width;
b.bottom = b.y + b.height;
-
-
- fly(dom).setWidth(b.width).setHeight(b.height);
-
-
+
+
+ fly(dom).setWidth(b.width).setHeight(b.height);
+
+
wrap = fly(dom).fxWrap(r.pos, o, HIDDEN);
-
+
st.visibility = VISIBLE;
st.position = ABSOLUTE;
-
-
+
+
function after(){
fly(dom).fxUnwrap(wrap, r.pos, o);
st.width = r.width;
st.height = r.height;
fly(dom).afterFx(o);
}
-
-
- pt = {to: [b.x, b.y]};
+
+
+ pt = {to: [b.x, b.y]};
bw = {to: b.width};
bh = {to: b.height};
-
- function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){
+
+ function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){
var ret = {};
fly(wrap).setWidth(ww).setHeight(wh);
if(fly(wrap)[sXY]){
- fly(wrap)[sXY](sXYval);
+ fly(wrap)[sXY](sXYval);
}
- style[s1] = style[s2] = "0";
+ style[s1] = style[s2] = "0";
if(w){
ret.width = w;
}
@@ -3703,7 +3703,7 @@ Ext.Fx = {
br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt],
tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt]
});
-
+
st.visibility = VISIBLE;
fly(wrap).show();
@@ -3711,13 +3711,13 @@ Ext.Fx = {
o,
MOTION,
.5,
- EASEOUT,
+ EASEOUT,
after);
});
return me;
},
-
-
+
+
slideOut : function(anchor, o){
o = getObject(o);
var me = this,
@@ -3728,51 +3728,51 @@ Ext.Fx = {
r,
b,
a,
- zero = {to: 0};
-
+ zero = {to: 0};
+
anchor = anchor || "t";
me.queueFx(o, function(){
-
-
- r = fly(dom).getFxRestore();
+
+
+ r = fly(dom).getFxRestore();
b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
b.right = b.x + b.width;
b.bottom = b.y + b.height;
-
-
+
+
fly(dom).setWidth(b.width).setHeight(b.height);
-
+
wrap = fly(dom).fxWrap(r.pos, o, VISIBLE);
-
+
st.visibility = VISIBLE;
st.position = ABSOLUTE;
- fly(wrap).setWidth(b.width).setHeight(b.height);
+ fly(wrap).setWidth(b.width).setHeight(b.height);
function after(){
- o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
+ o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
fly(dom).fxUnwrap(wrap, r.pos, o);
st.width = r.width;
st.height = r.height;
fly(dom).afterFx(o);
- }
-
- function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){
+ }
+
+ function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){
var ret = {};
-
+
style[s1] = style[s2] = "0";
- ret[p1] = v1;
+ ret[p1] = v1;
if(p2){
- ret[p2] = v2;
+ ret[p2] = v2;
}
if(p3){
ret[p3] = v3;
}
-
+
return ret;
};
-
+
a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
t : [st, LEFT, BOTTOM, HEIGHT, zero],
l : [st, RIGHT, TOP, WIDTH, zero],
@@ -3783,18 +3783,18 @@ Ext.Fx = {
br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}],
tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}]
});
-
+
arguments.callee.anim = fly(wrap).fxanim(a,
o,
MOTION,
.5,
- EASEOUT,
+ EASEOUT,
after);
});
return me;
},
-
+
puff : function(o){
o = getObject(o);
var me = this,
@@ -3810,18 +3810,18 @@ Ext.Fx = {
fly(dom).clearOpacity();
fly(dom).show();
-
- r = fly(dom).getFxRestore();
-
+
+ r = fly(dom).getFxRestore();
+
function after(){
- o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
- fly(dom).clearOpacity();
+ o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
+ fly(dom).clearOpacity();
fly(dom).setPositioning(r.pos);
st.width = r.width;
st.height = r.height;
st.fontSize = '';
fly(dom).afterFx(o);
- }
+ }
arguments.callee.anim = fly(dom).fxanim({
width : {to : fly(dom).adjustWidth(width * 2)},
@@ -3839,7 +3839,7 @@ Ext.Fx = {
return me;
},
-
+
switchOff : function(o){
o = getObject(o);
var me = this,
@@ -3851,34 +3851,34 @@ Ext.Fx = {
fly(dom).clearOpacity();
fly(dom).clip();
-
+
r = fly(dom).getFxRestore();
-
+
function after(){
- o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
+ o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
fly(dom).clearOpacity();
fly(dom).setPositioning(r.pos);
st.width = r.width;
- st.height = r.height;
+ st.height = r.height;
fly(dom).afterFx(o);
};
- fly(dom).fxanim({opacity : {to : 0.3}},
- NULL,
- NULL,
- .1,
- NULL,
- function(){
+ fly(dom).fxanim({opacity : {to : 0.3}},
+ NULL,
+ NULL,
+ .1,
+ NULL,
+ function(){
fly(dom).clearOpacity();
- (function(){
+ (function(){
fly(dom).fxanim({
height : {to : 1},
points : {by : [0, fly(dom).getHeight() * .5]}
- },
- o,
- MOTION,
- 0.3,
- 'easeIn',
+ },
+ o,
+ MOTION,
+ 0.3,
+ 'easeIn',
after);
}).defer(100);
});
@@ -3886,7 +3886,7 @@ Ext.Fx = {
return me;
},
-
+
highlight : function(color, o){
o = getObject(o);
var me = this,
@@ -3902,20 +3902,20 @@ Ext.Fx = {
function after(){
dom.style[attr] = restore;
fly(dom).afterFx(o);
- }
+ }
restore = dom.style[attr];
a[attr] = {from: color || "ffff9c", to: o.endColor || fly(dom).getColor(attr) || "ffffff"};
arguments.callee.anim = fly(dom).fxanim(a,
o,
'color',
1,
- 'easeIn',
+ 'easeIn',
after);
});
return me;
},
-
+
frame : function(color, count, o){
o = getObject(o);
var me = this,
@@ -3927,7 +3927,7 @@ Ext.Fx = {
color = color || '#C3DAF9';
if(color.length == 6){
color = '#' + color;
- }
+ }
count = count || 1;
fly(dom).show();
@@ -3937,14 +3937,14 @@ Ext.Fx = {
proxy = fly(document.body || document.documentElement).createChild({
style:{
position : ABSOLUTE,
- 'z-index': 35000,
+ 'z-index': 35000,
border : '0px solid ' + color
}
});
return proxy.queueFx({}, animFn);
};
-
-
+
+
arguments.callee.anim = {
isAnimated: true,
stop: function() {
@@ -3952,7 +3952,7 @@ Ext.Fx = {
proxy.stopFx();
}
};
-
+
function animFn(){
var scale = Ext.isBorderBox ? 2 : 1;
active = proxy.anim({
@@ -3981,8 +3981,8 @@ Ext.Fx = {
return me;
},
-
- pause : function(seconds){
+
+ pause : function(seconds){
var dom = this.dom,
t;
@@ -4001,13 +4001,13 @@ Ext.Fx = {
return this;
},
-
+
fadeIn : function(o){
o = getObject(o);
var me = this,
dom = me.dom,
to = o.endOpacity || 1;
-
+
me.queueFx(o, function(){
fly(dom).setOpacity(0);
fly(dom).fixDisplay();
@@ -4023,27 +4023,27 @@ Ext.Fx = {
return me;
},
-
+
fadeOut : function(o){
o = getObject(o);
var me = this,
dom = me.dom,
style = dom.style,
- to = o.endOpacity || 0;
-
- me.queueFx(o, function(){
- arguments.callee.anim = fly(dom).fxanim({
+ to = o.endOpacity || 0;
+
+ me.queueFx(o, function(){
+ arguments.callee.anim = fly(dom).fxanim({
opacity : {to : to}},
- o,
- NULL,
- .5,
- EASEOUT,
+ o,
+ NULL,
+ .5,
+ EASEOUT,
function(){
if(to == 0){
- Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ?
+ Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ?
style.display = "none" :
style.visibility = HIDDEN;
-
+
fly(dom).clearOpacity();
}
fly(dom).afterFx(o);
@@ -4052,7 +4052,7 @@ Ext.Fx = {
return me;
},
-
+
scale : function(w, h, o){
this.shift(Ext.apply({}, o, {
width: w,
@@ -4061,33 +4061,33 @@ Ext.Fx = {
return this;
},
-
+
shift : function(o){
o = getObject(o);
var dom = this.dom,
a = {};
-
+
this.queueFx(o, function(){
for (var prop in o) {
- if (o[prop] != UNDEFINED) {
- a[prop] = {to : o[prop]};
+ if (o[prop] != UNDEFINED) {
+ a[prop] = {to : o[prop]};
}
- }
-
+ }
+
a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a;
- a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;
-
+ a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;
+
if (a.x || a.y || a.xy) {
- a.points = a.xy ||
+ a.points = a.xy ||
{to : [ a.x ? a.x.to : fly(dom).getX(),
- a.y ? a.y.to : fly(dom).getY()]};
+ a.y ? a.y.to : fly(dom).getY()]};
}
arguments.callee.anim = fly(dom).fxanim(a,
- o,
- MOTION,
- .35,
- EASEOUT,
+ o,
+ MOTION,
+ .35,
+ EASEOUT,
function(){
fly(dom).afterFx(o);
});
@@ -4095,7 +4095,7 @@ Ext.Fx = {
return this;
},
-
+
ghost : function(anchor, o){
o = getObject(o);
var me = this,
@@ -4106,24 +4106,24 @@ Ext.Fx = {
r,
w,
h;
-
+
anchor = anchor || "b";
me.queueFx(o, function(){
-
+
r = fly(dom).getFxRestore();
w = fly(dom).getWidth();
h = fly(dom).getHeight();
-
+
function after(){
- o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
+ o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
fly(dom).clearOpacity();
fly(dom).setPositioning(r.pos);
st.width = r.width;
st.height = r.height;
fly(dom).afterFx(o);
}
-
+
pt.by = fly(dom).switchStatements(anchor.toLowerCase(), function(v1,v2){ return [v1, v2];}, {
t : [0, -h],
l : [-w, 0],
@@ -4132,9 +4132,9 @@ Ext.Fx = {
tl : [-w, -h],
bl : [-w, h],
br : [w, h],
- tr : [w, -h]
+ tr : [w, -h]
});
-
+
arguments.callee.anim = fly(dom).fxanim(a,
o,
MOTION,
@@ -4144,7 +4144,7 @@ Ext.Fx = {
return me;
},
-
+
syncFx : function(){
var me = this;
me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
@@ -4155,7 +4155,7 @@ Ext.Fx = {
return me;
},
-
+
sequenceFx : function(){
var me = this;
me.fxDefaults = Ext.apply(me.fxDefaults || {}, {
@@ -4166,20 +4166,20 @@ Ext.Fx = {
return me;
},
-
- nextFx : function(){
+
+ nextFx : function(){
var ef = getQueue(this.dom.id)[0];
if(ef){
ef.call(this);
}
},
-
+
hasActiveFx : function(){
return getQueue(this.dom.id)[0];
},
-
+
stopFx : function(finish){
var me = this,
id = me.dom.id;
@@ -4187,7 +4187,7 @@ Ext.Fx = {
var cur = getQueue(id)[0];
if(cur && cur.anim){
if(cur.anim.isAnimated){
- setQueue(id, [cur]);
+ setQueue(id, [cur]);
cur.anim.stop(finish !== undefined ? finish : TRUE);
}else{
setQueue(id, []);
@@ -4197,7 +4197,7 @@ Ext.Fx = {
return me;
},
-
+
beforeFx : function(o){
if(this.hasActiveFx() && !o.concurrent){
if(o.stopFx){
@@ -4209,13 +4209,13 @@ Ext.Fx = {
return TRUE;
},
-
+
hasFxBlock : function(){
var q = getQueue(this.dom.id);
return q && q[0] && q[0].block;
},
-
+
queueFx : function(o, fn){
var me = fly(this.dom);
if(!me.hasFxBlock()){
@@ -4234,12 +4234,12 @@ Ext.Fx = {
return me;
},
-
- fxWrap : function(pos, o, vis){
+
+ fxWrap : function(pos, o, vis){
var dom = this.dom,
wrap,
wrapXY;
- if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){
+ if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){
if(o.fixPosition){
wrapXY = fly(dom).getXY();
}
@@ -4260,30 +4260,30 @@ Ext.Fx = {
return wrap;
},
-
- fxUnwrap : function(wrap, pos, o){
+
+ fxUnwrap : function(wrap, pos, o){
var dom = this.dom;
fly(dom).clearPositioning();
fly(dom).setPositioning(pos);
if(!o.wrap){
var pn = fly(wrap).dom.parentNode;
- pn.insertBefore(dom, wrap);
+ pn.insertBefore(dom, wrap);
fly(wrap).remove();
}
},
-
+
getFxRestore : function(){
var st = this.dom.style;
return {pos: this.getPositioning(), width: st.width, height : st.height};
},
-
+
afterFx : function(o){
var dom = this.dom,
id = dom.id;
if(o.afterStyle){
- fly(dom).setStyle(o.afterStyle);
+ fly(dom).setStyle(o.afterStyle);
}
if(o.afterCls){
fly(dom).addClass(o.afterCls);
@@ -4300,16 +4300,16 @@ Ext.Fx = {
}
},
-
+
fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){
animType = animType || 'run';
opt = opt || {};
var anim = Ext.lib.Anim[animType](
- this.dom,
+ this.dom,
args,
(opt.duration || defaultDur) || .35,
(opt.easing || defaultEase) || EASEOUT,
- cb,
+ cb,
this
);
opt.anim = anim;
@@ -4326,7 +4326,7 @@ Ext.Element.addMethods(Ext.Fx);
})();
Ext.CompositeElementLite = function(els, root){
-
+
this.elements = [];
this.add(els, root);
this.el = new Ext.Element.Flyweight();
@@ -4335,25 +4335,25 @@ Ext.CompositeElementLite = function(els, root){
Ext.CompositeElementLite.prototype = {
isComposite: true,
-
+
getElement : function(el){
-
+
var e = this.el;
e.dom = el;
e.id = el.id;
return e;
},
-
+
transformElement : function(el){
return Ext.getDom(el);
},
-
+
getCount : function(){
return this.elements.length;
},
-
+
add : function(els, root){
var me = this,
elements = me.elements;
@@ -4389,7 +4389,7 @@ Ext.CompositeElementLite.prototype = {
}
return me;
},
-
+
item : function(index){
var me = this,
el = me.elements[index],
@@ -4401,7 +4401,7 @@ Ext.CompositeElementLite.prototype = {
return out;
},
-
+
addListener : function(eventName, handler, scope, opt){
var els = this.elements,
len = els.length,
@@ -4415,7 +4415,7 @@ Ext.CompositeElementLite.prototype = {
}
return this;
},
-
+
each : function(fn, scope){
var me = this,
els = me.elements,
@@ -4434,7 +4434,7 @@ Ext.CompositeElementLite.prototype = {
return me;
},
-
+
fill : function(els){
var me = this;
me.elements = [];
@@ -4442,7 +4442,7 @@ Ext.CompositeElementLite.prototype = {
return me;
},
-
+
filter : function(selector){
var els = [],
me = this,
@@ -4456,17 +4456,17 @@ Ext.CompositeElementLite.prototype = {
els[els.length] = me.transformElement(el);
}
});
-
+
me.elements = els;
return me;
},
-
+
indexOf : function(el){
return this.elements.indexOf(this.transformElement(el));
},
-
+
replaceElement : function(el, replacement, domReplace){
var index = !isNaN(el) ? el : this.indexOf(el),
d;
@@ -4482,7 +4482,7 @@ Ext.CompositeElementLite.prototype = {
return this;
},
-
+
clear : function(){
this.elements = [];
}
@@ -4538,37 +4538,37 @@ Ext.select = Ext.Element.select;
GET = 'GET',
WINDOW = window;
-
+
Ext.data.Connection = function(config){
Ext.apply(this, config);
this.addEvents(
-
+
BEFOREREQUEST,
-
+
REQUESTCOMPLETE,
-
+
REQUESTEXCEPTION
);
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(o){
var me = this;
if(me.fireEvent(BEFOREREQUEST, me, o)){
@@ -4639,19 +4639,19 @@ Ext.select = Ext.Element.select;
}
},
-
+
isLoading : function(transId){
return transId ? Ext.lib.Ajax.isCallInProgress(transId) : !! this.transId;
},
-
+
abort : function(transId){
if(transId || this.isLoading()){
Ext.lib.Ajax.abort(transId || this.transId);
}
},
-
+
handleResponse : function(response){
this.transId = false;
var options = response.argument.options;
@@ -4665,7 +4665,7 @@ Ext.select = Ext.Element.select;
}
},
-
+
handleFailure : function(response, e){
this.transId = false;
var options = response.argument.options;
@@ -4679,7 +4679,7 @@ Ext.select = Ext.Element.select;
}
},
-
+
doFormUpload : function(o, ps, url){
var id = Ext.id(),
doc = document,
@@ -4696,17 +4696,17 @@ Ext.select = Ext.Element.select;
action: form.action
};
-
+
Ext.fly(frame).set({
id: id,
name: id,
cls: 'x-hidden',
src: Ext.SSL_SECURE_URL
- });
+ });
doc.body.appendChild(frame);
-
+
if(Ext.isIE){
document.frames[id].name = id;
}
@@ -4720,7 +4720,7 @@ Ext.select = Ext.Element.select;
action: url || buf.action
});
-
+
Ext.iterate(Ext.urlDecode(ps, false), function(k, v){
hd = doc.createElement('input');
Ext.fly(hd).set({
@@ -4734,7 +4734,7 @@ Ext.select = Ext.Element.select;
function cb(){
var me = this,
-
+
r = {responseText : '',
responseXML : null,
argument : o.argument},
@@ -4745,13 +4745,13 @@ Ext.select = Ext.Element.select;
doc = frame.contentWindow.document || frame.contentDocument || WINDOW.frames[id].document;
if(doc){
if(doc.body){
- if(/textarea/i.test((firstChild = doc.body.firstChild || {}).tagName)){
+ if(/textarea/i.test((firstChild = doc.body.firstChild || {}).tagName)){
r.responseText = firstChild.value;
}else{
r.responseText = doc.body.innerHTML;
}
}
-
+
r.responseXML = doc.XMLDocument || doc;
}
}
@@ -4788,26 +4788,26 @@ Ext.select = Ext.Element.select;
Ext.Ajax = new Ext.data.Connection({
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
autoAbort : false,
-
+
serializeForm : function(form){
return Ext.lib.Ajax.serializeForm(form);
}
@@ -4822,7 +4822,7 @@ Ext.util.JSON = new (function(){
if (useNative === null) {
useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]';
}
-
+
return useNative;
};
}(),
@@ -4830,7 +4830,7 @@ Ext.util.JSON = new (function(){
return n < 10 ? "0" + n : n;
},
doDecode = function(json){
- return json ? eval("(" + json + ")") : "";
+ return json ? eval("(" + json + ")") : "";
},
doEncode = function(o){
if(!Ext.isDefined(o) || o === null){
@@ -4842,14 +4842,14 @@ Ext.util.JSON = new (function(){
}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];
@@ -4871,7 +4871,7 @@ Ext.util.JSON = new (function(){
}
a.push("}");
return a.join("");
- }
+ }
},
m = {
"\b": '\\b',
@@ -4918,7 +4918,7 @@ Ext.util.JSON = new (function(){
return a.join("");
};
-
+
this.encodeDate = function(o){
return '"' + o.getFullYear() + "-" +
pad(o.getMonth() + 1) + "-" +
@@ -4928,12 +4928,12 @@ Ext.util.JSON = new (function(){
pad(o.getSeconds()) + '"';
};
-
+
this.encode = function() {
var ec;
return function(o) {
if (!ec) {
-
+
ec = isNative() ? JSON.stringify : doEncode;
}
return ec(o);
@@ -4941,12 +4941,12 @@ Ext.util.JSON = new (function(){
}();
-
+
this.decode = function() {
var dc;
return function(json) {
if (!dc) {
-
+
dc = isNative() ? JSON.parse : doDecode;
}
return dc(json);
@@ -4971,7 +4971,7 @@ Ext.EventManager = function(){
DOMCONTENTLOADED = "DOMContentLoaded",
COMPLETE = 'complete',
propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,
-
+
specialElCache = [];
function getId(el){
@@ -4983,7 +4983,7 @@ Ext.EventManager = function(){
if (el) {
if (el.getElementById || el.navigator) {
-
+
for(; i < len; ++i){
o = specialElCache[i];
if(o.el === el){
@@ -4992,7 +4992,7 @@ Ext.EventManager = function(){
}
}
if(!id){
-
+
id = Ext.id(el);
specialElCache.push({
id: id,
@@ -5013,7 +5013,7 @@ Ext.EventManager = function(){
return id;
}
-
+
function addListener(el, ename, fn, task, wrap, scope){
el = Ext.getDom(el);
var id = getId(el),
@@ -5023,13 +5023,13 @@ Ext.EventManager = function(){
wfn = E.on(el, ename, wrap);
es[ename] = es[ename] || [];
-
+
es[ename].push([fn, wrap, scope, wfn, task]);
-
-
-
+
+
+
if(el.addEventListener && ename == "mousewheel"){
var args = ["DOMMouseScroll", wrap, false];
el.addEventListener.apply(el, args);
@@ -5038,14 +5038,14 @@ Ext.EventManager = function(){
});
}
-
+
if(el == DOC && ename == "mousedown"){
Ext.EventManager.stoppedMouseDownEvent.addListener(wrap);
}
}
function doScrollChk(){
-
+
if(window != top){
return false;
}
@@ -5059,7 +5059,7 @@ Ext.EventManager = function(){
fireDocReady();
return true;
}
-
+
function checkReadyState(e){
if(Ext.isIE9m && doScrollChk()){
@@ -5091,7 +5091,7 @@ Ext.EventManager = function(){
function fireDocReady(e){
if(!docReadyState){
- docReadyState = true;
+ docReadyState = true;
if(docReadyProcId){
clearTimeout(docReadyProcId);
@@ -5099,7 +5099,7 @@ Ext.EventManager = function(){
if(DETECT_NATIVE) {
DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false);
}
- if(Ext.isIE9m && checkReadyState.bindIE){
+ if(Ext.isIE9m && checkReadyState.bindIE){
DOC.detachEvent('onreadystatechange', checkReadyState);
}
E.un(WINDOW, "load", arguments.callee);
@@ -5117,27 +5117,27 @@ Ext.EventManager = function(){
if (DETECT_NATIVE) {
DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false);
}
-
+
if (Ext.isIE9m){
-
-
+
+
if(!checkReadyState()){
checkReadyState.bindIE = true;
DOC.attachEvent('onreadystatechange', checkReadyState);
}
}else if(Ext.isOpera ){
-
-
+
+
(DOC.readyState == COMPLETE && checkStyleSheets()) ||
DOC.addEventListener(DOMCONTENTLOADED, OperaDOMContentLoaded, false);
}else if (Ext.isWebKit){
-
+
checkReadyState();
}
-
+
E.on(WINDOW, "load", fireDocReady);
}
@@ -5152,7 +5152,7 @@ Ext.EventManager = function(){
function createBuffered(h, o, task){
return function(e){
-
+
task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]);
};
}
@@ -5186,7 +5186,7 @@ Ext.EventManager = function(){
throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.';
}
function h(e){
-
+
if(!Ext){
return;
}
@@ -5233,7 +5233,7 @@ Ext.EventManager = function(){
}
var pub = {
-
+
addListener : function(element, eventName, fn, scope, options){
if(typeof eventName == 'object'){
var o = eventName, e, val;
@@ -5241,10 +5241,10 @@ Ext.EventManager = function(){
val = o[e];
if(!propRe.test(e)){
if(Ext.isFunction(val)){
-
+
listen(element, e, o, val, o.scope);
}else{
-
+
listen(element, e, val);
}
}
@@ -5254,7 +5254,7 @@ Ext.EventManager = function(){
}
},
-
+
removeListener : function(el, eventName, fn, scope){
el = Ext.getDom(el);
var id = getId(el),
@@ -5263,7 +5263,7 @@ Ext.EventManager = function(){
for (i = 0, len = f.length; i < len; i++) {
-
+
if (Ext.isArray(fnc = f[i]) && fnc[0] == fn && (!scope || fnc[2] == scope)) {
if(fnc[4]) {
fnc[4].cancel();
@@ -5278,12 +5278,12 @@ Ext.EventManager = function(){
wrap = fnc[1];
E.un(el, eventName, E.extAdapter ? fnc[3] : wrap);
-
+
if(wrap && el.addEventListener && eventName == "mousewheel"){
el.removeEventListener("DOMMouseScroll", wrap, false);
}
-
+
if(wrap && el == DOC && eventName == "mousedown"){
Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap);
}
@@ -5301,7 +5301,7 @@ Ext.EventManager = function(){
}
},
-
+
removeAll : function(el){
el = Ext.getDom(el);
var id = getId(el),
@@ -5312,7 +5312,7 @@ Ext.EventManager = function(){
for(ename in es){
if(es.hasOwnProperty(ename)){
f = es[ename];
-
+
for (i = 0, len = f.length; i < len; i++) {
fn = f[i];
if(fn[4]) {
@@ -5327,12 +5327,12 @@ Ext.EventManager = function(){
wrap = fn[1];
E.un(el, ename, E.extAdapter ? fn[3] : wrap);
-
+
if(el.addEventListener && wrap && ename == "mousewheel"){
el.removeEventListener("DOMMouseScroll", wrap, false);
}
-
+
if(wrap && el == DOC && ename == "mousedown"){
Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap);
}
@@ -5356,14 +5356,14 @@ Ext.EventManager = function(){
return null;
}
},
-
+
removeFromSpecialCache: function(o) {
var i = 0,
len = specialElCache.length;
-
+
for (; i < len; ++i) {
if (specialElCache[i].el == o) {
- specialElCache.splice(i, 1);
+ specialElCache.splice(i, 1);
}
}
},
@@ -5399,7 +5399,7 @@ Ext.EventManager = function(){
delete Ext.elCache;
delete Ext.Element._flyweights;
-
+
var c,
conn,
tid,
@@ -5412,9 +5412,9 @@ Ext.EventManager = function(){
}
}
},
-
+
onDocumentReady : function(fn, scope, options){
- if (Ext.isReady) {
+ if (Ext.isReady) {
docReadyEvent || (docReadyEvent = new Ext.util.Event());
docReadyEvent.addListener(fn, scope, options);
docReadyEvent.fire();
@@ -5429,12 +5429,12 @@ Ext.EventManager = function(){
}
},
-
+
fireDocReady : fireDocReady
};
-
+
pub.on = pub.addListener;
-
+
pub.un = pub.removeListener;
pub.stoppedMouseDownEvent = new Ext.util.Event();
@@ -5447,16 +5447,16 @@ Ext.onReady = Ext.EventManager.onDocumentReady;
(function(){
var initExtCss = function() {
-
+
var bd = document.body || document.getElementsByTagName('body')[0];
if (!bd) {
return false;
}
var cls = [];
-
+
if (Ext.isIE) {
-
+
if (!Ext.isIE10p) {
cls.push('ext-ie');
}
@@ -5472,7 +5472,7 @@ Ext.onReady = Ext.EventManager.onDocumentReady;
cls.push('ext-ie10');
}
}
-
+
if (Ext.isGecko) {
if (Ext.isGecko2) {
cls.push('ext-gecko2');
@@ -5480,11 +5480,11 @@ Ext.onReady = Ext.EventManager.onDocumentReady;
cls.push('ext-gecko3');
}
}
-
+
if (Ext.isOpera) {
cls.push('ext-opera');
}
-
+
if (Ext.isWebKit) {
cls.push('ext-webkit');
}
@@ -5502,7 +5502,7 @@ Ext.onReady = Ext.EventManager.onDocumentReady;
cls.push("ext-linux");
}
-
+
if (Ext.isStrict || Ext.isBorderBox) {
var p = bd.parentNode;
if (p) {
@@ -5515,8 +5515,8 @@ Ext.onReady = Ext.EventManager.onDocumentReady;
Ext.fly(p, '_internal').addClass(((Ext.isStrict && Ext.isIE ) || (!Ext.enableForcedBoxModel && !Ext.isIE)) ? ' ext-strict' : ' ext-border-box');
}
}
-
-
+
+
if (Ext.enableForcedBoxModel && !Ext.isIE) {
Ext.isForcedBorderBox = true;
cls.push("ext-forced-border-box");
@@ -5533,15 +5533,15 @@ Ext.onReady = Ext.EventManager.onDocumentReady;
(function(){
-
+
var supports = Ext.apply(Ext.supports, {
-
+
correctRightMargin: true,
-
+
correctTransparentColor: true,
-
+
cssFloat: true
});
@@ -5579,20 +5579,20 @@ Ext.onReady = Ext.EventManager.onDocumentReady;
Ext.EventObject = function(){
var E = Ext.lib.Event,
clickRe = /(dbl)?click/,
-
+
safariKeys = {
- 3 : 13,
- 63234 : 37,
- 63235 : 39,
- 63232 : 38,
- 63233 : 40,
- 63276 : 33,
- 63277 : 34,
- 63272 : 46,
- 63273 : 36,
- 63275 : 35
- },
-
+ 3 : 13,
+ 63234 : 37,
+ 63235 : 39,
+ 63232 : 38,
+ 63233 : 40,
+ 63276 : 33,
+ 63277 : 34,
+ 63272 : 46,
+ 63273 : 36,
+ 63275 : 35
+ },
+
btnMap = Ext.isIE ? {1:0,4:1,2:2} : {0:0,1:1,2:2};
Ext.EventObjectImpl = function(e){
@@ -5602,30 +5602,30 @@ Ext.EventObject = function(){
};
Ext.EventObjectImpl.prototype = {
-
+
setEvent : function(e){
var me = this;
- if(e == me || (e && e.browserEvent)){
+ if(e == me || (e && e.browserEvent)){
return e;
}
me.browserEvent = e;
if(e){
-
+
me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1);
if(clickRe.test(e.type) && me.button == -1){
me.button = 0;
}
me.type = e.type;
me.shiftKey = e.shiftKey;
-
+
me.ctrlKey = e.ctrlKey || e.metaKey || false;
me.altKey = e.altKey;
-
+
me.keyCode = e.keyCode;
me.charCode = e.charCode;
-
+
me.target = E.getTarget(e);
-
+
me.xy = E.getXY(e);
}else{
me.button = -1;
@@ -5640,7 +5640,7 @@ Ext.EventObject = function(){
return me;
},
-
+
stopEvent : function(){
var me = this;
if(me.browserEvent){
@@ -5651,14 +5651,14 @@ Ext.EventObject = function(){
}
},
-
+
preventDefault : function(){
if(this.browserEvent){
E.preventDefault(this.browserEvent);
}
},
-
+
stopPropagation : function(){
var me = this;
if(me.browserEvent){
@@ -5669,59 +5669,59 @@ Ext.EventObject = function(){
}
},
-
+
getCharCode : function(){
return this.charCode || this.keyCode;
},
-
+
getKey : function(){
return this.normalizeKey(this.keyCode || this.charCode);
},
-
+
normalizeKey: function(k){
return Ext.isSafari ? (safariKeys[k] || k) : k;
},
-
+
getPageX : function(){
return this.xy[0];
},
-
+
getPageY : function(){
return this.xy[1];
},
-
+
getXY : function(){
return this.xy;
},
-
+
getTarget : function(selector, maxDepth, returnEl){
return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target);
},
-
+
getRelatedTarget : function(){
return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : null;
},
-
+
getWheelDelta : function(){
var e = this.browserEvent;
var delta = 0;
- if(e.wheelDelta){
+ if(e.wheelDelta){
delta = e.wheelDelta/120;
- }else if(e.detail){
+ }else if(e.detail){
delta = -e.detail/3;
}
return delta;
},
-
+
within : function(el, related, allowEl){
if(el){
var t = this[related ? "getRelatedTarget" : "getTarget"]();
@@ -5734,7 +5734,7 @@ Ext.EventObject = function(){
return new Ext.EventObjectImpl();
}();
Ext.Loader = Ext.apply({}, {
-
+
load: function(fileList, callback, scope, preserveOrder) {
var scope = scope || this,
head = document.getElementsByTagName("head")[0],
@@ -5742,19 +5742,19 @@ Ext.Loader = Ext.apply({}, {
numFiles = fileList.length,
loadedFiles = 0,
me = this;
-
-
+
+
var loadFileIndex = function(index) {
head.appendChild(
me.buildScriptTag(fileList[index], onFileLoaded)
);
};
-
-
+
+
var onFileLoaded = function() {
loadedFiles ++;
-
-
+
+
if (numFiles == loadedFiles && typeof callback == 'function') {
callback.call(scope);
} else {
@@ -5763,28 +5763,28 @@ Ext.Loader = Ext.apply({}, {
}
}
};
-
+
if (preserveOrder === true) {
loadFileIndex.call(this, 0);
} else {
-
+
Ext.each(fileList, function(file, index) {
fragment.appendChild(
this.buildScriptTag(file, onFileLoaded)
- );
+ );
}, this);
-
+
head.appendChild(fragment);
}
},
-
-
+
+
buildScriptTag: function(filename, callback) {
var script = document.createElement('script');
script.type = "text/javascript";
script.src = filename;
-
-
+
+
if (script.readyState) {
script.onreadystatechange = function() {
if (script.readyState == "loaded" || script.readyState == "complete") {
@@ -5794,16 +5794,16 @@ Ext.Loader = Ext.apply({}, {
};
} else {
script.onload = callback;
- }
-
+ }
+
return script;
}
});
Ext.ns("Ext.grid", "Ext.list", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
- "Ext.state", "Ext.layout.boxOverflow", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct", "Ext.slider");
-
+ "Ext.state", "Ext.layout.boxOverflow", "Ext.app", "Ext.ux", "Ext.direct", "Ext.slider");
+
Ext.apply(Ext, function(){
var E = Ext,
@@ -5811,10 +5811,10 @@ Ext.apply(Ext, function(){
scrollWidth = 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==',
@@ -5823,23 +5823,23 @@ Ext.apply(Ext, function(){
return Ext.extend(supr, fn(supr.prototype));
},
-
+
getDoc : function(){
return Ext.get(document);
},
-
+
num : function(v, defaultValue){
v = Number(Ext.isEmpty(v) || Ext.isArray(v) || typeof v == 'boolean' || (typeof v == 'string' && v.trim().length == 0) ? NaN : v);
return isNaN(v) ? defaultValue : v;
},
-
+
value : function(v, defaultValue, allowBlank){
return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
},
-
+
escapeRe : function(s) {
return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1");
},
@@ -5848,19 +5848,19 @@ Ext.apply(Ext, function(){
o[name] = o[name].createSequence(fn, scope);
},
-
+
addBehaviors : function(o){
if(!Ext.isReady){
Ext.onReady(function(){
Ext.addBehaviors(o);
});
} else {
- var cache = {},
+ var cache = {},
parts,
b,
s;
for (b in o) {
- if ((parts = b.split('@'))[1]) {
+ if ((parts = b.split('@'))[1]) {
s = parts[0];
if(!cache[s]){
cache[s] = Ext.select(s);
@@ -5872,28 +5872,28 @@ Ext.apply(Ext, function(){
}
},
-
+
getScrollBarWidth: function(force){
if(!Ext.isReady){
return 0;
}
if(force === true || scrollWidth === null){
-
+
var div = Ext.getBody().createChild(''),
child = div.child('div', true);
var w1 = child.offsetWidth;
div.setStyle('overflow', (Ext.isWebKit || Ext.isGecko) ? 'auto' : 'scroll');
var w2 = child.offsetWidth;
div.remove();
-
+
scrollWidth = w1 - w2 + 2;
}
return scrollWidth;
},
-
+
combine : function(){
var as = arguments, l = as.length, r = [];
for(var i = 0; i < l; i++){
@@ -5909,7 +5909,7 @@ Ext.apply(Ext, function(){
return r;
},
-
+
copyTo : function(dest, source, names){
if(typeof names == 'string'){
names = names.split(/[,;\s]/);
@@ -5922,7 +5922,7 @@ Ext.apply(Ext, function(){
return dest;
},
-
+
destroy : function(){
Ext.each(arguments, function(arg){
if(arg){
@@ -5937,7 +5937,7 @@ Ext.apply(Ext, function(){
}, this);
},
-
+
destroyMembers : function(o, arg1, arg2, etc){
for(var i = 1, a = arguments, len = a.length; i < len; i++) {
Ext.destroy(o[a[i]]);
@@ -5945,7 +5945,7 @@ Ext.apply(Ext, function(){
}
},
-
+
clean : function(arr){
var ret = [];
Ext.each(arr, function(v){
@@ -5956,7 +5956,7 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
unique : function(arr){
var ret = [],
collect = {};
@@ -5970,7 +5970,7 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
flatten : function(arr){
var worker = [];
function rFlatten(a) {
@@ -5986,7 +5986,7 @@ Ext.apply(Ext, function(){
return rFlatten(arr);
},
-
+
min : function(arr, comp){
var ret = arr[0];
comp = comp || function(a,b){ return a < b ? -1 : 1; };
@@ -5996,7 +5996,7 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
max : function(arr, comp){
var ret = arr[0];
comp = comp || function(a,b){ return a > b ? 1 : -1; };
@@ -6006,12 +6006,12 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
mean : function(arr){
return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined;
},
-
+
sum : function(arr){
var ret = 0;
Ext.each(arr, function(v) {
@@ -6020,7 +6020,7 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
partition : function(arr, truth){
var ret = [[],[]];
Ext.each(arr, function(v, i, a) {
@@ -6029,7 +6029,7 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
invoke : function(arr, methodName){
var ret = [],
args = Array.prototype.slice.call(arguments, 2);
@@ -6043,7 +6043,7 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
pluck : function(arr, prop){
var ret = [];
Ext.each(arr, function(v) {
@@ -6052,7 +6052,7 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
zip : function(){
var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }),
arrs = parts[0],
@@ -6073,16 +6073,16 @@ Ext.apply(Ext, function(){
return ret;
},
-
+
getCmp : function(id){
return Ext.ComponentMgr.get(id);
},
-
+
useShims: E.isIE6 || (E.isMac && E.isGecko2),
-
-
+
+
type : function(o){
if(o === undefined || o === null){
return false;
@@ -6114,7 +6114,7 @@ Ext.apply(Ext, function(){
o[name] = o[name].createInterceptor(fn, scope);
},
-
+
callback : function(cb, scope, args, delay){
if(typeof cb == 'function'){
if(delay){
@@ -6129,7 +6129,7 @@ Ext.apply(Ext, function(){
Ext.apply(Function.prototype, {
-
+
createSequence : function(fcn, scope){
var method = this;
return (typeof fcn != 'function') ?
@@ -6146,12 +6146,12 @@ Ext.apply(Function.prototype, {
Ext.applyIf(String, {
-
+
escape : function(string) {
return string.replace(/('|\\)/g, "\\$1");
},
-
+
leftPad : function (val, size, ch) {
var result = String(val);
if(!ch) {
@@ -6184,7 +6184,7 @@ Date.prototype.getElapsed = function(date) {
Ext.applyIf(Number.prototype, {
-
+
constrain : function(min, max){
return Math.min(Math.max(this, min), max);
}
@@ -6227,7 +6227,7 @@ Ext.lib.Dom.getRegion = function(el) {
return new Ext.lib.Region(t, r, b, l);
}
},
-
+
union : function(region) {
var me = this,
t = Math.min(me.top, region.top),
@@ -6286,7 +6286,7 @@ function(){
beforeend = 'beforeend',
confRe = /tag|children|cn|html$/i;
-
+
function doInsert(el, o, returnElement, pos, sibling, append){
el = Ext.getDom(el);
var newNode;
@@ -6303,8 +6303,8 @@ function(){
return returnElement ? Ext.get(newNode, true) : newNode;
}
-
-
+
+
function createDom(o, parentNode){
var el,
doc = document,
@@ -6313,16 +6313,16 @@ function(){
val,
cn;
- if (Ext.isArray(o)) {
- el = doc.createDocumentFragment();
+ if (Ext.isArray(o)) {
+ el = doc.createDocumentFragment();
for (var i = 0, l = o.length; i < l; i++) {
createDom(o[i], el);
}
- } else if (typeof o == 'string') {
+ } else if (typeof o == 'string') {
el = doc.createTextNode(o);
} else {
el = doc.createElement( o.tag || 'div' );
- useSet = !!el.setAttribute;
+ useSet = !!el.setAttribute;
for (var attr in o) {
if(!confRe.test(attr)){
val = o[attr];
@@ -6352,47 +6352,47 @@ function(){
}
pub = {
-
+
createTemplate : function(o){
var html = Ext.DomHelper.createHtml(o);
return new Ext.Template(html);
},
-
+
useDom : false,
-
+
insertBefore : function(el, o, returnElement){
return doInsert(el, o, returnElement, beforebegin);
},
-
+
insertAfter : function(el, o, returnElement){
return doInsert(el, o, returnElement, afterend, 'nextSibling');
},
-
+
insertFirst : function(el, o, returnElement){
return doInsert(el, o, returnElement, afterbegin, 'firstChild');
},
-
+
append: function(el, o, returnElement){
return doInsert(el, o, returnElement, beforeend, '', true);
},
-
+
createDom: createDom
};
return pub;
}());
Ext.apply(Ext.Template.prototype, {
-
+
disableFormats : false,
-
-
+
+
re : /\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
argsRe : /^\s*['"](.*)["']\s*$/,
compileARe : /\\/g,
@@ -6520,7 +6520,7 @@ sayHiToFriend('Brian'); // alerts "Hi, Brian"
* If omitted, defaults to the scope in which the original function is called or the browser window.
* @return {Function} The new function
*/
- createInterceptor: function(origFn, newFn, scope) {
+ createInterceptor: function(origFn, newFn, scope) {
var method = origFn;
if (!Ext.isFunction(newFn)) {
return origFn;
@@ -6634,7 +6634,7 @@ Ext.defer(function(){
* Create a combined function call sequence of the original function + the passed function.
* The resulting function returns the results of the original function.
* The passed fcn is called with the parameters of the original function. Example usage:
- *
+ *
var sayHi = function(name){
alert('Hi, ' + name);
@@ -6669,7 +6669,7 @@ sayGoodbye('Fred'); // both alerts show
};
/**
- * Shorthand for {@link Ext.util.Functions#defer}
+ * Shorthand for {@link Ext.util.Functions#defer}
* @param {Function} fn The function to defer.
* @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately)
* @param {Object} scope (optional) The scope (this
reference) in which the function is executed.
@@ -6685,7 +6685,7 @@ sayGoodbye('Fred'); // both alerts show
Ext.defer = Ext.util.Functions.defer;
/**
- * Shorthand for {@link Ext.util.Functions#createInterceptor}
+ * Shorthand for {@link Ext.util.Functions#createInterceptor}
* @param {Function} origFn The original function.
* @param {Function} newFn The function to call before the original
* @param {Object} scope (optional) The scope (this
reference) in which the passed function is executed.
@@ -6854,12 +6854,12 @@ Ext.apply(Ext.util.Observable.prototype, function(){
* access the required target more quickly.
* Example:
Ext.override(Ext.form.Field, {
-
+
initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
this.enableBubble('change');
}),
-
+
getBubbleTarget : function() {
if (!this.formPanel) {
this.formPanel = this.findParentByType('form');
@@ -6875,7 +6875,7 @@ var myForm = new Ext.formPanel({
}],
listeners: {
change: function() {
-
+
myForm.header.setStyle('color', 'red');
}
}
@@ -6933,9 +6933,9 @@ Ext.apply(Ext.EventManager, function(){
unload = Ext.EventManager._unload,
curWidth = 0,
curHeight = 0,
-
-
-
+
+
+
useKeydown = Ext.isWebKit ?
Ext.num(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1]) >= 525 :
!((Ext.isGecko && !Ext.isWindows) || Ext.isOpera);
@@ -6943,21 +6943,21 @@ Ext.apply(Ext.EventManager, function(){
return {
_unload: function(){
Ext.EventManager.un(window, "resize", this.fireWindowResize, this);
- unload.call(Ext.EventManager);
+ unload.call(Ext.EventManager);
},
-
-
+
+
doResizeEvent: function(){
var h = D.getViewHeight(),
w = D.getViewWidth();
-
+
if(curHeight != h || curWidth != w){
resizeEvent.fire(curWidth = w, curHeight = h);
}
},
-
+
onWindowResize : function(fn, scope, options){
if(!resizeEvent){
resizeEvent = new Ext.util.Event();
@@ -6967,14 +6967,14 @@ Ext.apply(Ext.EventManager, function(){
resizeEvent.addListener(fn, scope, options);
},
-
+
fireWindowResize : function(){
if(resizeEvent){
resizeTask.delay(100);
}
},
-
+
onTextResize : function(fn, scope, options){
if(!textEvent){
textEvent = new Ext.util.Event();
@@ -6992,33 +6992,33 @@ Ext.apply(Ext.EventManager, function(){
textEvent.addListener(fn, scope, options);
},
-
+
removeResizeListener : function(fn, scope){
if(resizeEvent){
resizeEvent.removeListener(fn, scope);
}
},
-
+
fireResize : function(){
if(resizeEvent){
resizeEvent.fire(D.getViewWidth(), D.getViewHeight());
}
},
-
+
textResizeInterval : 50,
-
+
ieDeferSrc : false,
-
-
+
+
getKeyEvent : function(){
return useKeydown ? 'keydown' : 'keypress';
},
-
-
+
+
useKeydown: useKeydown
};
}());
@@ -7027,189 +7027,189 @@ 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,
-
+ CONTROL : 17,
+
ALT: 18,
-
+
PAUSE: 19,
-
+
CAPS_LOCK: 20,
-
+
ESC: 27,
-
+
SPACE: 32,
-
+
PAGE_UP: 33,
- PAGEUP : 33,
-
+ PAGEUP : 33,
+
PAGE_DOWN: 34,
- PAGEDOWN : 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 me = this,
k = this.normalizeKey(me.keyCode);
- return (k >= 33 && k <= 40) ||
+ return (k >= 33 && k <= 40) ||
k == me.RETURN ||
k == me.TAB ||
k == me.ESC;
@@ -7219,22 +7219,22 @@ Ext.apply(Ext.EventObjectImpl.prototype, {
var k = this.normalizeKey(this.keyCode);
return (this.type == 'keypress' && this.ctrlKey) ||
this.isNavKeyPress() ||
- (k == this.BACKSPACE) ||
- (k >= 16 && k <= 20) ||
- (k >= 44 && k <= 46);
+ (k == this.BACKSPACE) ||
+ (k >= 16 && k <= 20) ||
+ (k >= 44 && k <= 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(eventName, preventDefault) {
var me = this;
function fn(e) {
@@ -7243,7 +7243,7 @@ Ext.Element.addMethods({
e.preventDefault();
}
}
-
+
if (Ext.isArray(eventName)) {
Ext.each(eventName, function(e) {
me.on(e, fn);
@@ -7254,14 +7254,14 @@ Ext.Element.addMethods({
return me;
},
-
+
relayEvent : function(eventName, observable) {
this.on(eventName, function(e) {
observable.fireEvent(eventName, e);
});
},
-
+
clean : function(forceReclean) {
var me = this,
dom = me.dom,
@@ -7281,25 +7281,25 @@ Ext.Element.addMethods({
}
n = nx;
}
-
+
Ext.Element.data(dom, 'isCleaned', true);
return me;
},
-
+
load : function() {
var updateManager = this.getUpdater();
updateManager.update.apply(updateManager, arguments);
-
+
return this;
},
-
+
getUpdater : function() {
return this.updateManager || (this.updateManager = new Ext.Updater(this));
},
-
+
update : function(html, loadScripts, callback) {
if (!this.dom) {
return this;
@@ -7351,12 +7351,12 @@ Ext.Element.addMethods({
}
}
}
-
+
el = DOC.getElementById(id);
if (el) {
Ext.removeNode(el);
}
-
+
if (typeof callback == 'function') {
callback();
}
@@ -7365,14 +7365,14 @@ Ext.Element.addMethods({
return this;
},
-
+
removeAllListeners : function() {
this.removeAnchor();
Ext.EventManager.removeAll(this.dom);
return this;
},
-
+
createProxy : function(config, renderTo, matchBox) {
config = (typeof config == 'object') ? config : {tag : "div", cls: config};
@@ -7380,7 +7380,7 @@ Ext.Element.addMethods({
proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) :
Ext.DomHelper.insertBefore(me.dom, config, true);
- if (matchBox && me.setBox && me.getBox) {
+ if (matchBox && me.setBox && me.getBox) {
proxy.setBox(me.getBox());
}
return proxy;
@@ -7390,18 +7390,18 @@ Ext.Element.addMethods({
Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater;
Ext.Element.addMethods({
-
+
getAnchorXY : function(anchor, local, s){
-
-
+
+
anchor = (anchor || "tl").toLowerCase();
s = s || {};
-
- var me = this,
+
+ var me = this,
vp = me.dom == document.body || me.dom == document,
w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(),
- h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(),
- xy,
+ h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(),
+ xy,
r = Math.round,
o = me.getXY(),
scroll = me.getScroll(),
@@ -7413,18 +7413,18 @@ Ext.Element.addMethods({
l : [0, r(h * 0.5)],
r : [w, r(h * 0.5)],
b : [r(w * 0.5), h],
- tl : [0, 0],
+ tl : [0, 0],
bl : [0, h],
br : [w, h],
tr : [w, 0]
};
-
- xy = hash[anchor];
- return [xy[0] + extraX, xy[1] + extraY];
+
+ xy = hash[anchor];
+ return [xy[0] + extraX, xy[1] + extraY];
},
-
- anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){
+
+ anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){
var me = this,
dom = me.dom,
scroll = !Ext.isEmpty(monitorScroll),
@@ -7433,8 +7433,8 @@ Ext.Element.addMethods({
Ext.callback(callback, Ext.fly(dom));
},
anchor = this.getAnchor();
-
-
+
+
this.removeAnchor();
Ext.apply(anchor, {
fn: action,
@@ -7442,20 +7442,20 @@ Ext.Element.addMethods({
});
Ext.EventManager.onWindowResize(action, null);
-
+
if(scroll){
Ext.EventManager.on(window, 'scroll', action, null,
{buffer: !isNaN(monitorScroll) ? monitorScroll : 50});
}
- action.call(me);
+ action.call(me);
return me;
},
-
-
+
+
removeAnchor : function(){
var me = this,
anchor = this.getAnchor();
-
+
if(anchor && anchor.fn){
Ext.EventManager.removeResizeListener(anchor.fn);
if(anchor.scroll){
@@ -7465,8 +7465,8 @@ Ext.Element.addMethods({
}
return me;
},
-
-
+
+
getAnchor : function(){
var data = Ext.Element.data,
dom = this.dom;
@@ -7474,38 +7474,38 @@ Ext.Element.addMethods({
return;
}
var anchor = data(dom, '_anchor');
-
+
if(!anchor){
anchor = data(dom, '_anchor', {});
}
return anchor;
},
-
- getAlignToXY : function(el, p, o){
+
+ getAlignToXY : function(el, p, o){
el = Ext.get(el);
-
+
if(!el || !el.dom){
throw "Element.alignToXY with an element that doesn't exist";
}
-
+
o = o || [0,0];
- p = (!p || p == "?" ? "tl-bl?" : (!(/-/).test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase();
-
+ p = (!p || p == "?" ? "tl-bl?" : (!(/-/).test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase();
+
var me = this,
d = me.dom,
a1,
a2,
x,
y,
-
+
w,
h,
r,
- dw = Ext.lib.Dom.getViewWidth() -10,
- dh = Ext.lib.Dom.getViewHeight()-10,
+ dw = Ext.lib.Dom.getViewWidth() -10,
+ dh = Ext.lib.Dom.getViewHeight()-10,
p1y,
- p1x,
+ p1x,
p2y,
p2x,
swapY,
@@ -7515,41 +7515,41 @@ Ext.Element.addMethods({
docBody = doc.body,
scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5,
scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5,
- c = false,
- p1 = "",
+ c = false,
+ p1 = "",
p2 = "",
m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/);
-
+
if(!m){
throw "Element.alignTo with an invalid alignment " + p;
}
-
- p1 = m[1];
- p2 = m[2];
+
+ p1 = m[1];
+ p2 = m[2];
c = !!m[3];
-
-
+
+
a1 = me.getAnchorXY(p1, true);
a2 = el.getAnchorXY(p2, false);
x = a2[0] - a1[0] + o[0];
y = a2[1] - a1[1] + o[1];
- if(c){
+ if(c){
w = me.getWidth();
h = me.getHeight();
- r = el.getRegion();
-
-
-
+ r = el.getRegion();
+
+
+
p1y = p1.charAt(0);
p1x = p1.charAt(p1.length-1);
p2y = p2.charAt(0);
p2x = p2.charAt(p2.length-1);
swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t"));
- swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r"));
-
+ swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r"));
+
if (x + w > dw + scrollX) {
x = swapX ? r.left-w : dw+scrollX-w;
@@ -7567,20 +7567,20 @@ Ext.Element.addMethods({
return [x,y];
},
-
+
alignTo : function(element, position, offsets, animate){
var me = this;
return me.setXY(me.getAlignToXY(element, position, offsets),
me.preanim && !!animate ? me.preanim(arguments, 3) : false);
},
-
-
+
+
adjustForConstraints : function(xy, parent, offsets){
return this.getConstrainToXY(parent || document, false, offsets, xy) || xy;
},
-
- getConstrainToXY : function(el, local, offsets, proposedXY){
+
+ getConstrainToXY : function(el, local, offsets, proposedXY){
var os = {top:0, left:0, bottom:0, right: 0};
return function(el, local, offsets, proposedXY){
@@ -7614,13 +7614,13 @@ Ext.Element.addMethods({
xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]),
x = xy[0], y = xy[1],
offset = this.getConstrainOffset(),
- w = this.dom.offsetWidth + offset,
+ w = this.dom.offsetWidth + offset,
h = this.dom.offsetHeight + offset;
-
+
var moved = false;
-
+
if((x + w) > vr){
x = vr - w;
moved = true;
@@ -7629,7 +7629,7 @@ Ext.Element.addMethods({
y = vb - h;
moved = true;
}
-
+
if(x < vx){
x = vx;
moved = true;
@@ -7641,9 +7641,6 @@ Ext.Element.addMethods({
return moved ? [x, y] : false;
};
}(),
-
-
-
@@ -7697,24 +7694,27 @@ Ext.Element.addMethods({
-
+
+
+
+
getConstrainOffset : function(){
return 0;
},
-
-
+
+
getCenterXY : function(){
return this.getAlignToXY(document, 'c-c');
},
-
+
center : function(centerIn){
- return this.alignTo(centerIn || document, 'c-c');
- }
+ return this.alignTo(centerIn || document, 'c-c');
+ }
});
Ext.Element.addMethods({
-
+
select : function(selector, unique){
return Ext.Element.select(selector, unique, this.dom);
}
@@ -7723,15 +7723,15 @@ Ext.apply(Ext.Element.prototype, function() {
var GETDOM = Ext.getDom,
GET = Ext.get,
DH = Ext.DomHelper;
-
- return {
-
+
+ return {
+
insertSibling: function(el, where, returnDom){
var me = this,
rt,
isAfter = (where || 'before').toLowerCase() == 'after',
insertEl;
-
+
if(Ext.isArray(el)){
insertEl = me;
Ext.each(el, function(e) {
@@ -7742,9 +7742,9 @@ Ext.apply(Ext.Element.prototype, function() {
});
return rt;
}
-
+
el = el || {};
-
+
if(el.nodeType || el.dom){
rt = me.dom.parentNode.insertBefore(GETDOM(el), isAfter ? me.dom.nextSibling : me.dom);
if (!returnDom) {
@@ -7753,7 +7753,7 @@ Ext.apply(Ext.Element.prototype, function() {
}else{
if (isAfter && !me.dom.nextSibling) {
rt = DH.append(me.dom.parentNode, el, !returnDom);
- } else {
+ } else {
rt = DH[isAfter ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom);
}
}
@@ -7769,13 +7769,13 @@ Ext.Element.addMethods(function(){
var INTERNAL = "_internal",
pxMatch = /(\d+\.?\d+)px/;
return {
-
+
applyStyles : function(style){
Ext.DomHelper.applyStyles(this.dom, style);
return this;
},
-
+
getStyles : function(){
var ret = {};
Ext.each(arguments, function(v) {
@@ -7785,10 +7785,10 @@ Ext.Element.addMethods(function(){
return ret;
},
-
+
setOverflow : function(v){
var dom = this.dom;
- if(v=='auto' && Ext.isMac && Ext.isGecko2){
+ if(v=='auto' && Ext.isMac && Ext.isGecko2){
dom.style.overflow = 'hidden';
(function(){dom.style.overflow = 'auto';}).defer(1);
}else{
@@ -7796,18 +7796,18 @@ Ext.Element.addMethods(function(){
}
},
-
+
boxWrap : function(cls){
cls = cls || 'x-box';
- var el = Ext.get(this.insertHtml("beforeBegin", "" + String.format(Ext.Element.boxMarkup, cls) + "
"));
+ var el = Ext.get(this.insertHtml("beforeBegin", "" + String.format(Ext.Element.boxMarkup, cls) + "
"));
Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom);
return el;
},
-
+
setSize : function(width, height, animate){
var me = this;
- if(typeof width == 'object'){
+ if(typeof width == 'object'){
height = width.height;
width = width.width;
}
@@ -7822,7 +7822,7 @@ Ext.Element.addMethods(function(){
return me;
},
-
+
getComputedHeight : function(){
var me = this,
h = Math.max(me.dom.offsetHeight, me.dom.clientHeight);
@@ -7835,7 +7835,7 @@ Ext.Element.addMethods(function(){
return h;
},
-
+
getComputedWidth : function(){
var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth);
if(!w){
@@ -7847,12 +7847,12 @@ Ext.Element.addMethods(function(){
return w;
},
-
+
getFrameWidth : function(sides, onlyContentBox){
return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides));
},
-
+
addClassOnOver : function(className){
this.hover(
function(){
@@ -7865,7 +7865,7 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
addClassOnFocus : function(className){
this.on("focus", function(){
Ext.fly(this, INTERNAL).addClass(className);
@@ -7876,7 +7876,7 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
addClassOnClick : function(className){
var dom = this.dom;
this.on("mousedown", function(){
@@ -7891,14 +7891,14 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
getViewSize : function(){
var doc = document,
d = this.dom,
isDoc = (d == doc || d == doc.body);
-
+
if (isDoc) {
var extdom = Ext.lib.Dom;
return {
@@ -7906,7 +7906,7 @@ Ext.Element.addMethods(function(){
height : extdom.getViewHeight()
};
-
+
} else {
return {
width : d.clientWidth,
@@ -7915,7 +7915,7 @@ Ext.Element.addMethods(function(){
}
},
-
+
getStyleSize : function(){
var me = this,
@@ -7925,7 +7925,7 @@ Ext.Element.addMethods(function(){
isDoc = (d == doc || d == doc.body),
s = d.style;
-
+
if (isDoc) {
var extdom = Ext.lib.Dom;
return {
@@ -7933,30 +7933,30 @@ Ext.Element.addMethods(function(){
height : extdom.getViewHeight()
};
}
-
+
if(s.width && s.width != 'auto'){
w = parseFloat(s.width);
if(me.isBorderBox()){
w -= me.getFrameWidth('lr');
}
}
-
+
if(s.height && s.height != 'auto'){
h = parseFloat(s.height);
if(me.isBorderBox()){
h -= me.getFrameWidth('tb');
}
}
-
+
return {width: w || me.getWidth(true), height: h || me.getHeight(true)};
},
-
+
getSize : function(contentSize){
return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)};
},
-
+
repaint : function(){
var dom = this.dom;
this.addClass("x-repaint");
@@ -7966,14 +7966,14 @@ Ext.Element.addMethods(function(){
return this;
},
-
+
unselectable : function(){
this.dom.unselectable = "on";
return this.swallowEvent("selectstart", true).
addClass("x-unselectable");
},
-
+
getMargins : function(side){
var me = this,
key,
@@ -7993,10 +7993,10 @@ Ext.Element.addMethods(function(){
}());
Ext.Element.addMethods({
-
+
setBox : function(box, adjust, animate){
var me = this,
- w = box.width,
+ w = box.width,
h = box.height;
if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){
w -= (me.getBorderWidth("lr") + me.getPadding("lr"));
@@ -8006,14 +8006,14 @@ Ext.Element.addMethods({
return me;
},
-
- getBox : function(contentBox, local) {
+
+ getBox : function(contentBox, local) {
var me = this,
xy,
left,
top,
getBorderWidth = me.getBorderWidth,
- getPadding = me.getPadding,
+ getPadding = me.getPadding,
l,
r,
t,
@@ -8039,13 +8039,13 @@ Ext.Element.addMethods({
bx.bottom = bx.y + bx.height;
return bx;
},
-
-
+
+
move : function(direction, distance, animate){
- var me = this,
+ var me = this,
xy = me.getXY(),
x = xy[0],
- y = xy[1],
+ y = xy[1],
left = [x - distance, y],
right = [x + distance, y],
top = [x, y - distance],
@@ -8058,16 +8058,16 @@ Ext.Element.addMethods({
t : top,
top : top,
up : top,
- b : bottom,
+ b : bottom,
bottom : bottom,
- down : bottom
+ down : bottom
};
-
- direction = direction.toLowerCase();
+
+ direction = direction.toLowerCase();
me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2));
},
-
-
+
+
setLeftTop : function(left, top){
var me = this,
style = me.dom.style;
@@ -8075,55 +8075,55 @@ Ext.Element.addMethods({
style.top = me.addUnits(top);
return me;
},
-
-
+
+
getRegion : function(){
return Ext.lib.Dom.getRegion(this.dom);
},
-
-
+
+
setBounds : function(x, y, width, height, animate){
var me = this;
if (!animate || !me.anim) {
me.setSize(width, height);
me.setLocation(x, y);
} else {
- me.anim({points: {to: [x, y]},
- width: {to: me.adjustWidth(width)},
+ me.anim({points: {to: [x, y]},
+ width: {to: me.adjustWidth(width)},
height: {to: me.adjustHeight(height)}},
- me.preanim(arguments, 4),
+ me.preanim(arguments, 4),
'motion');
}
return me;
},
-
+
setRegion : function(region, animate) {
return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1));
}
});
Ext.Element.addMethods({
-
+
scrollTo : function(side, value, animate) {
-
+
var top = /top/i.test(side),
me = this,
dom = me.dom,
prop;
if (!animate || !me.anim) {
-
+
prop = 'scroll' + (top ? 'Top' : 'Left');
dom[prop] = value;
}
else {
-
+
prop = 'scroll' + (top ? 'Left' : 'Top');
me.anim({scroll: {to: top ? [dom[prop], value] : [value, dom[prop]]}}, me.preanim(arguments, 2), 'scroll');
}
return me;
},
-
-
+
+
scrollIntoView : function(container, hscroll) {
var c = Ext.getDom(container) || Ext.getBody().dom,
el = this.dom,
@@ -8144,7 +8144,7 @@ Ext.Element.addMethods({
else if (b > cb) {
c.scrollTop = b-ch;
}
-
+
c.scrollTop = c.scrollTop;
if (hscroll !== false) {
@@ -8159,12 +8159,12 @@ Ext.Element.addMethods({
return this;
},
-
+
scrollChildIntoView : function(child, hscroll) {
Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll);
},
-
-
+
+
scroll : function(direction, distance, animate) {
if (!this.isScrollable()) {
return false;
@@ -8182,7 +8182,7 @@ Ext.Element.addMethods({
};
hash.d = hash.b;
hash.u = hash.t;
-
+
direction = direction.substr(0, 1);
if ((v = hash[direction]) > -1) {
scrolled = true;
@@ -8202,15 +8202,15 @@ Ext.Element.addMethods(
data = Ext.Element.data;
return {
-
+
isVisible : function(deep) {
var vis = !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE),
p = this.dom.parentNode;
-
+
if (deep !== true || !vis) {
return vis;
}
-
+
while (p && !(/^body/i.test(p.tagName))) {
if (!Ext.fly(p, '_isVisible').isVisible()) {
return false;
@@ -8220,23 +8220,23 @@ Ext.Element.addMethods(
return true;
},
-
+
isDisplayed : function() {
return !this.isStyle(DISPLAY, NONE);
},
-
+
enableDisplayMode : function(display) {
this.setVisibilityMode(Ext.Element.DISPLAY);
-
+
if (!Ext.isEmpty(display)) {
data(this.dom, 'originalDisplay', display);
}
-
+
return this;
},
-
+
mask : function(msg, msgCls) {
var me = this,
dom = me.dom,
@@ -8260,7 +8260,7 @@ Ext.Element.addMethods(
me.addClass(XMASKED);
mask.setDisplayed(true);
-
+
if (typeof msg == 'string') {
var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true);
data(dom, 'maskMsg', mm);
@@ -8269,16 +8269,16 @@ Ext.Element.addMethods(
mm.setDisplayed(true);
mm.center(me);
}
-
-
+
+
if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') {
mask.setSize(undefined, me.getHeight());
}
-
+
return mask;
},
-
+
unmask : function() {
var me = this,
dom = me.dom,
@@ -8290,24 +8290,24 @@ Ext.Element.addMethods(
maskMsg.remove();
data(dom, 'maskMsg', undefined);
}
-
+
mask.remove();
data(dom, 'mask', undefined);
me.removeClass([XMASKED, XMASKEDRELATIVE]);
}
},
-
+
isMasked : function() {
var m = data(this.dom, 'mask');
return m && m.isVisible();
},
-
+
createShim : function() {
var el = document.createElement('iframe'),
shim;
-
+
el.frameBorder = '0';
el.className = 'ext-shim';
el.src = Ext.SSL_SECURE_URL;
@@ -8319,7 +8319,7 @@ Ext.Element.addMethods(
}()
);
Ext.Element.addMethods({
-
+
addKeyListener : function(key, fn, scope){
var config;
if(typeof key != 'object' || Ext.isArray(key)){
@@ -8341,7 +8341,7 @@ Ext.Element.addMethods({
return new Ext.KeyMap(this, config);
},
-
+
addKeyMap : function(config){
return new Ext.KeyMap(this, config);
}
@@ -8365,22 +8365,22 @@ Ext.apply(Ext.CompositeElementLite.prototype, {
return this;
},
-
+
first : function(){
return this.item(0);
},
-
+
last : function(){
return this.item(this.getCount()-1);
},
-
+
contains : function(el){
return this.indexOf(el) != -1;
},
-
+
removeElement : function(keys, removeDom){
var me = this,
els = this.elements,
@@ -8408,22 +8408,22 @@ Ext.CompositeElement = Ext.extend(Ext.CompositeElementLite, {
this.add(els, root);
},
-
+
getElement : function(el){
-
+
return el;
},
-
+
transformElement : function(el){
return Ext.get(el);
}
-
-
-
+
+
+
});
@@ -8448,12 +8448,12 @@ function() {
UPDATE = "update",
FAILURE = "failure";
-
+
function processSuccess(response){
var me = this;
me.transaction = null;
if (response.argument.form && response.argument.reset) {
- try {
+ try {
response.argument.form.reset();
} catch(e){}
}
@@ -8466,7 +8466,7 @@ function() {
}
}
-
+
function updateComplete(response, type, success){
this.fireEvent(type || UPDATE, this.el, response);
if(Ext.isFunction(response.argument.callback)){
@@ -8474,7 +8474,7 @@ function() {
}
}
-
+
function processFailure(response){
updateComplete.call(this, response, FAILURE, !!(this.transaction = null));
}
@@ -8486,76 +8486,76 @@ function() {
if(!forceNew && el.updateManager){
return el.updateManager;
}
-
+
me.el = el;
-
+
me.defaultUrl = null;
me.addEvents(
-
+
BEFOREUPDATE,
-
+
UPDATE,
-
+
FAILURE
);
Ext.apply(me, Ext.Updater.defaults);
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
me.transaction = null;
-
+
me.refreshDelegate = me.refresh.createDelegate(me);
-
+
me.updateDelegate = me.update.createDelegate(me);
-
+
me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me);
-
+
me.renderer = me.renderer || me.getDefaultRenderer();
Ext.Updater.superclass.constructor.call(me);
},
-
+
setRenderer : function(renderer){
this.renderer = renderer;
},
-
+
getRenderer : function(){
return this.renderer;
},
-
+
getDefaultRenderer: function() {
return new Ext.Updater.BasicRenderer();
},
-
+
setDefaultUrl : function(defaultUrl){
this.defaultUrl = defaultUrl;
},
-
+
getEl : function(){
return this.el;
},
-
+
update : function(url, params, callback, discardUrl){
var me = this,
cfg,
callerScope;
if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){
- if(Ext.isObject(url)){
+ if(Ext.isObject(url)){
cfg = url;
url = cfg.url;
params = params || cfg.params;
@@ -8599,7 +8599,7 @@ function() {
}
},
-
+
formUpdate : function(form, url, reset, callback){
var me = this;
if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){
@@ -8625,7 +8625,7 @@ function() {
}
},
-
+
startAutoRefresh : function(interval, url, params, callback, refreshNow){
var me = this;
if(refreshNow){
@@ -8637,7 +8637,7 @@ function() {
me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.defaultUrl, params, callback, true]), interval * 1000);
},
-
+
stopAutoRefresh : function(){
if(this.autoRefreshProcId){
clearInterval(this.autoRefreshProcId);
@@ -8645,31 +8645,31 @@ function() {
}
},
-
+
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(callback){
if(this.defaultUrl){
this.update(this.defaultUrl, null, callback, true);
@@ -8680,17 +8680,17 @@ function() {
Ext.Updater.defaults = {
-
+
timeout : 30,
-
+
disableCaching : false,
-
+
showLoadIndicator : true,
-
+
indicatorText : 'Loading...
',
-
+
loadScripts : false,
-
+
sslBlankUrl : Ext.SSL_SECURE_URL
};
@@ -8706,7 +8706,7 @@ Ext.Updater.updateElement = function(el, url, params, options){
Ext.Updater.BasicRenderer = function(){};
Ext.Updater.BasicRenderer.prototype = {
-
+
render : function(el, response, updateManager, callback){
el.update(response.responseText, updateManager.loadScripts, callback);
}
@@ -8733,12 +8733,12 @@ function xf(format) {
Date.formatCodeToRegex = function(character, currentGroup) {
-
+
var p = Date.parseCodes[character];
if (p) {
p = typeof p == 'function'? p() : p;
- Date.parseCodes[character] = p;
+ Date.parseCodes[character] = p;
}
return p ? Ext.applyIf({
@@ -8746,7 +8746,7 @@ Date.formatCodeToRegex = function(character, currentGroup) {
}, p) : {
g:0,
c:null,
- s:Ext.escapeRe(character)
+ s:Ext.escapeRe(character)
};
};
@@ -8754,11 +8754,11 @@ Date.formatCodeToRegex = function(character, currentGroup) {
var $f = Date.formatCodeToRegex;
Ext.apply(Date, {
-
+
parseFunctions: {
"M$": function(input, strict) {
-
-
+
+
var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/');
var r = (input || '').match(re);
return r? new Date(((r[1] || '') + r[2]) * 1) : null;
@@ -8766,41 +8766,41 @@ Ext.apply(Date, {
},
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",
@@ -8811,7 +8811,7 @@ Ext.apply(Date, {
"Saturday"
],
-
+
monthNames : [
"January",
"February",
@@ -8827,7 +8827,7 @@ Ext.apply(Date, {
"December"
],
-
+
monthNumbers : {
Jan:0,
Feb:1,
@@ -8843,23 +8843,23 @@ Ext.apply(Date, {
Dec:11
},
-
+
getShortMonthName : function(month) {
return Date.monthNames[month].substring(0, 3);
},
-
+
getShortDayName : function(day) {
return Date.dayNames[day].substring(0, 3);
},
-
+
getMonthNumber : function(name) {
-
+
return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
},
-
-
+
+
formatContainsHourInfo : (function(){
var stripEscapeRe = /(\\.)/g,
hourInfoRe = /([gGhHisucUOPZ]|M\$)/;
@@ -8868,10 +8868,10 @@ Ext.apply(Date, {
};
})(),
-
+
formatCodes : {
d: "String.leftPad(this.getDate(), 2, '0')",
- D: "Date.getShortDayName(this.getDay())",
+ D: "Date.getShortDayName(this.getDay())",
j: "this.getDate()",
l: "Date.dayNames[this.getDay()]",
N: "(this.getDay() ? this.getDay() : 7)",
@@ -8881,7 +8881,7 @@ Ext.apply(Date, {
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())",
+ M: "Date.getShortMonthName(this.getMonth())",
n: "(this.getMonth() + 1)",
t: "this.getDaysInMonth()",
L: "(this.isLeapYear() ? 1 : 0)",
@@ -8902,27 +8902,27 @@ Ext.apply(Date, {
T: "this.getTimezone()",
Z: "(this.getTimezoneOffset() * -60)",
- c: function() {
+ c: function() {
for (var c = "Y-m-dTH:i:sP", code = [], i = 0, l = c.length; i < l; ++i) {
var e = c.charAt(i);
- code.push(e == "T" ? "'T'" : Date.getFormatCode(e));
+ code.push(e == "T" ? "'T'" : Date.getFormatCode(e));
}
return code.join(" + ");
},
-
+
U: "Math.round(this.getTime() / 1000)"
},
-
+
isValid : function(y, m, d, h, i, s, ms) {
-
+
h = h || 0;
i = i || 0;
s = s || 0;
ms = ms || 0;
-
+
var dt = new Date(y < 100 ? 100 : y, m - 1, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);
return y == dt.getFullYear() &&
@@ -8934,7 +8934,7 @@ Ext.apply(Date, {
ms == dt.getMilliseconds();
},
-
+
parseDate : function(input, format, strict) {
var p = Date.parseFunctions;
if (p[format] == null) {
@@ -8943,20 +8943,20 @@ Ext.apply(Date, {
return p[format](input, Ext.isDefined(strict) ? strict : Date.useStrict);
},
-
+
getFormatCode : function(character) {
var f = Date.formatCodes[character];
if (f) {
f = typeof f == 'function'? f() : f;
- Date.formatCodes[character] = f;
+ Date.formatCodes[character] = f;
}
-
+
return f || ("'" + String.escape(character) + "'");
},
-
+
createFormat : function(format) {
var code = [],
special = false,
@@ -8976,62 +8976,62 @@ Ext.apply(Date, {
Date.formatFunctions[format] = new Function("return " + code.join('+'));
},
-
+
createParser : function() {
var code = [
"var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,",
"def = Date.defaults,",
- "results = String(input).match(Date.parseRegexes[{0}]);",
+ "results = String(input).match(Date.parseRegexes[{0}]);",
"if(results){",
"{1}",
- "if(u != null){",
- "v = new Date(u * 1000);",
+ "if(u != null){",
+ "v = new Date(u * 1000);",
"}else{",
-
-
-
+
+
+
"dt = (new Date()).clearTime();",
-
+
"y = Ext.num(y, Ext.num(def.y, dt.getFullYear()));",
"m = Ext.num(m, Ext.num(def.m - 1, dt.getMonth()));",
"d = Ext.num(d, Ext.num(def.d, dt.getDate()));",
-
+
"h = Ext.num(h, Ext.num(def.h, dt.getHours()));",
"i = Ext.num(i, Ext.num(def.i, dt.getMinutes()));",
"s = Ext.num(s, Ext.num(def.s, dt.getSeconds()));",
"ms = Ext.num(ms, Ext.num(def.ms, dt.getMilliseconds()));",
"if(z >= 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 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));",
"}",
"}",
@@ -9070,7 +9070,7 @@ Ext.apply(Date, {
}
}
}
-
+
if (last) {
calc.push(last);
}
@@ -9080,21 +9080,21 @@ Ext.apply(Date, {
};
}(),
-
+
parseCodes : {
-
+
d: {
g:1,
c:"d = parseInt(results[{0}], 10);\n",
- s:"(\\d{2})"
+ s:"(\\d{2})"
},
j: {
g:1,
c:"d = parseInt(results[{0}], 10);\n",
- s:"(\\d{1,2})"
+ s:"(\\d{1,2})"
},
D: function() {
- for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i);
+ for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i);
return {
g:0,
c:null,
@@ -9111,7 +9111,7 @@ Ext.apply(Date, {
N: {
g:0,
c:null,
- s:"[1-7]"
+ s:"[1-7]"
},
S: {
g:0,
@@ -9121,27 +9121,27 @@ Ext.apply(Date, {
w: {
g:0,
c:null,
- s:"[0-6]"
+ s:"[0-6]"
},
z: {
g:1,
c:"z = parseInt(results[{0}], 10);\n",
- s:"(\\d{1,3})"
+ s:"(\\d{1,3})"
},
W: {
g:0,
c:null,
- s:"(?:\\d{2})"
+ s:"(?:\\d{2})"
},
F: function() {
return {
g:1,
- c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",
+ c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",
s:"(" + Date.monthNames.join("|") + ")"
};
},
M: function() {
- for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i);
+ for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i);
return Ext.applyIf({
s:"(" + a.join("|") + ")"
}, $f("F"));
@@ -9149,17 +9149,17 @@ Ext.apply(Date, {
m: {
g:1,
c:"m = parseInt(results[{0}], 10) - 1;\n",
- s:"(\\d{2})"
+ s:"(\\d{2})"
},
n: {
g:1,
c:"m = parseInt(results[{0}], 10) - 1;\n",
- s:"(\\d{1,2})"
+ s:"(\\d{1,2})"
},
t: {
g:0,
c:null,
- s:"(?:\\d{2})"
+ s:"(?:\\d{2})"
},
L: {
g:0,
@@ -9172,20 +9172,20 @@ Ext.apply(Date, {
Y: {
g:1,
c:"y = parseInt(results[{0}], 10);\n",
- s:"(\\d{4})"
+ s:"(\\d{4})"
},
y: {
g:1,
c:"var ty = parseInt(results[{0}], 10);\n"
- + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",
+ + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",
s:"(\\d{1,2})"
},
-
+
a: function(){
return $f("A");
},
A: {
-
+
calcLast: true,
g:1,
c:"if (/(am)/i.test(results[{0}])) {\n"
@@ -9199,7 +9199,7 @@ Ext.apply(Date, {
G: {
g:1,
c:"h = parseInt(results[{0}], 10);\n",
- s:"(\\d{1,2})"
+ s:"(\\d{1,2})"
},
h: function() {
return $f("H");
@@ -9207,74 +9207,74 @@ Ext.apply(Date, {
H: {
g:1,
c:"h = parseInt(results[{0}], 10);\n",
- s:"(\\d{2})"
+ s:"(\\d{2})"
},
i: {
g:1,
c:"i = parseInt(results[{0}], 10);\n",
- s:"(\\d{2})"
+ s:"(\\d{2})"
},
s: {
g:1,
c:"s = parseInt(results[{0}], 10);\n",
- s:"(\\d{2})"
+ s:"(\\d{2})"
},
u: {
g:1,
c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",
- s:"(\\d+)"
+ 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"
+ "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})"
+ 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"
+ "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})"
+ s: "([+\-]\\d{2}:\\d{2})"
},
T: {
g:0,
c:null,
- s:"[A-Z]{1,4}"
+ s:"[A-Z]{1,4}"
},
Z: {
g:1,
- c:"zz = results[{0}] * 1;\n"
+ c:"zz = results[{0}] * 1;\n"
+ "zz = (-43200 <= zz && zz <= 50400)? zz : null;\n",
- s:"([+\-]?\\d{1,5})"
+ s:"([+\-]?\\d{1,5})"
},
c: function() {
var calc = [],
arr = [
- $f("Y", 1),
- $f("m", 2),
- $f("d", 3),
- $f("h", 4),
- $f("i", 5),
- $f("s", 6),
- {c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},
- {c:[
- "if(results[8]) {",
+ $f("Y", 1),
+ $f("m", 2),
+ $f("d", 3),
+ $f("h", 4),
+ $f("i", 5),
+ $f("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;",
+ "zz = 0;",
"}else if (results[8].indexOf(':') > -1){",
- $f("P", 8).c,
+ $f("P", 8).c,
"}else{",
- $f("O", 8).c,
+ $f("O", 8).c,
"}",
"}"
].join('\n')}
@@ -9288,15 +9288,15 @@ Ext.apply(Date, {
g:1,
c:calc.join(""),
s:[
- arr[0].s,
- "(?:", "-", arr[1].s,
- "(?:", "-", arr[2].s,
+ arr[0].s,
+ "(?:", "-", arr[1].s,
+ "(?:", "-", arr[2].s,
"(?:",
- "(?:T| )?",
- arr[3].s, ":", arr[4].s,
- "(?::", arr[5].s, ")?",
- "(?:(?:\\.|,)(\\d+))?",
- "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",
+ "(?:T| )?",
+ arr[3].s, ":", arr[4].s,
+ "(?::", arr[5].s, ")?",
+ "(?:(?:\\.|,)(\\d+))?",
+ "(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",
")?",
")?",
")?"
@@ -9306,7 +9306,7 @@ Ext.apply(Date, {
U: {
g:1,
c:"u = parseInt(results[{0}], 10);\n",
- s:"(-?\\d+)"
+ s:"(-?\\d+)"
}
}
});
@@ -9314,7 +9314,7 @@ Ext.apply(Date, {
}());
Ext.apply(Date.prototype, {
-
+
dateFormat : function(format) {
if (Date.formatFunctions[format] == null) {
Date.createFormat(format);
@@ -9322,24 +9322,24 @@ Ext.apply(Date.prototype, {
return Date.formatFunctions[format].call(this);
},
-
+
getTimezone : function() {
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, "");
},
-
+
getGMTOffset : function(colon) {
return (this.getTimezoneOffset() > 0 ? "-" : "+")
+ String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0")
@@ -9347,7 +9347,7 @@ Ext.apply(Date.prototype, {
+ String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0");
},
-
+
getDayOfYear: function() {
var num = 0,
d = this.clone(),
@@ -9360,61 +9360,61 @@ Ext.apply(Date.prototype, {
return num + this.getDate() - 1;
},
-
+
getWeekOfYear : function() {
-
- var ms1d = 864e5,
- ms7d = 7 * ms1d;
- return function() {
- var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d,
- AWN = Math.floor(DC3 / 7),
+ var ms1d = 864e5,
+ ms7d = 7 * ms1d;
+
+ return function() {
+ var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d,
+ AWN = Math.floor(DC3 / 7),
Wyr = new Date(AWN * ms7d).getUTCFullYear();
return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1;
};
}(),
-
+
isLeapYear : function() {
var year = this.getFullYear();
return !!((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)));
},
-
+
getFirstDayOfMonth : function() {
var day = (this.getDay() - (this.getDate() - 1)) % 7;
return (day < 0) ? (day + 7) : day;
},
-
+
getLastDayOfMonth : function() {
return this.getLastDateOfMonth().getDay();
},
-
+
getFirstDateOfMonth : function() {
return new Date(this.getFullYear(), this.getMonth(), 1);
},
-
+
getLastDateOfMonth : function() {
return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth());
},
-
+
getDaysInMonth: function() {
var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
- return function() {
+ return function() {
var m = this.getMonth();
return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m];
};
}(),
-
+
getSuffix : function() {
switch (this.getDate()) {
case 1:
@@ -9432,38 +9432,38 @@ Ext.apply(Date.prototype, {
}
},
-
+
clone : function() {
return new Date(this.getTime());
},
-
+
isDST : function() {
-
-
+
+
return new Date(this.getFullYear(), 0, 1).getTimezoneOffset() != this.getTimezoneOffset();
},
-
+
clearTime : function(clone) {
if (clone) {
return this.clone().clearTime();
}
-
+
var d = this.getDate();
-
+
this.setHours(0);
this.setMinutes(0);
this.setSeconds(0);
this.setMilliseconds(0);
- if (this.getDate() != d) {
-
-
+ if (this.getDate() != d) {
+
+
+
-
for (var hr = 1, c = this.add(Date.HOUR, hr); c.getDate() != d; hr++, c = this.add(Date.HOUR, hr));
this.setDate(d);
@@ -9473,7 +9473,7 @@ Ext.apply(Date.prototype, {
return this;
},
-
+
add : function(interval, value) {
var d = this.clone();
if (!interval || value === 0) return d;
@@ -9509,7 +9509,7 @@ Ext.apply(Date.prototype, {
return d;
},
-
+
between : function(start, end) {
var t = this.getTime();
return start.getTime() <= t && t <= end.getTime();
@@ -9527,8 +9527,8 @@ if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420
_xMonth : Date.prototype.setMonth,
_xDate : Date.prototype.setDate,
-
-
+
+
setMonth : function(num) {
if (num <= -1) {
var n = Math.ceil(-num),
@@ -9543,12 +9543,12 @@ if (Ext.isSafari && (navigator.userAgent.match(/WebKit\/(\d+)/)[1] || NaN) < 420
}
},
-
-
-
+
+
+
setDate : function(d) {
-
-
+
+
return this.setTime(this.getTime() - (this.getDate() - d) * 864e5);
}
});
@@ -9564,13 +9564,13 @@ Ext.util.MixedCollection = function(allowFunctions, keyFn){
this.keys = [];
this.length = 0;
this.addEvents(
-
+
'clear',
-
+
'add',
-
+
'replace',
-
+
'remove',
'sort'
);
@@ -9583,10 +9583,10 @@ Ext.util.MixedCollection = function(allowFunctions, keyFn){
Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
-
+
allowFunctions : false,
-
+
add : function(key, o){
if(arguments.length == 1){
o = arguments[0];
@@ -9606,12 +9606,12 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return o;
},
-
+
getKey : function(o){
return o.id;
},
-
+
replace : function(key, o){
if(arguments.length == 1){
o = arguments[0];
@@ -9628,7 +9628,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return o;
},
-
+
addAll : function(objs){
if(arguments.length > 1 || Ext.isArray(objs)){
var args = arguments.length > 1 ? arguments : objs;
@@ -9644,9 +9644,9 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
}
},
-
+
each : function(fn, scope){
- var items = [].concat(this.items);
+ var items = [].concat(this.items);
for(var i = 0, len = items.length; i < len; i++){
if(fn.call(scope || items[i], items[i], i, len) === false){
break;
@@ -9654,14 +9654,14 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
}
},
-
+
eachKey : function(fn, scope){
for(var i = 0, len = this.keys.length; i < len; i++){
fn.call(scope || window, this.keys[i], this.items[i], i, len);
}
},
-
+
find : function(fn, scope){
for(var i = 0, len = this.items.length; i < len; i++){
if(fn.call(scope || window, this.items[i], this.keys[i])){
@@ -9671,7 +9671,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return null;
},
-
+
insert : function(index, key, o){
if(arguments.length == 2){
o = arguments[1];
@@ -9695,12 +9695,12 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return o;
},
-
+
remove : function(o){
return this.removeAt(this.indexOf(o));
},
-
+
removeAt : function(index){
if(index < this.length && index >= 0){
this.length--;
@@ -9717,54 +9717,54 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return false;
},
-
+
removeKey : function(key){
return this.removeAt(this.indexOfKey(key));
},
-
+
getCount : function(){
return this.length;
},
-
+
indexOf : function(o){
return this.items.indexOf(o);
},
-
+
indexOfKey : function(key){
return this.keys.indexOf(key);
},
-
+
item : function(key){
var mk = this.map[key],
item = mk !== undefined ? mk : (typeof key == 'number') ? this.items[key] : undefined;
- return typeof item != 'function' || this.allowFunctions ? item : null;
+ return typeof item != 'function' || this.allowFunctions ? item : null;
},
-
+
itemAt : function(index){
return this.items[index];
},
-
+
key : function(key){
return this.map[key];
},
-
+
contains : function(o){
return this.indexOf(o) != -1;
},
-
+
containsKey : function(key){
return typeof this.map[key] != 'undefined';
},
-
+
clear : function(){
this.length = 0;
this.items = [];
@@ -9773,32 +9773,32 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
this.fireEvent('clear');
},
-
+
first : function(){
return this.items[0];
},
-
+
last : function(){
return this.items[this.length-1];
},
-
+
_sort : function(property, dir, fn){
var i, len,
dsc = String(dir).toUpperCase() == 'DESC' ? -1 : 1,
-
+
c = [],
keys = this.keys,
items = this.items;
-
+
fn = fn || function(a, b) {
return a - b;
};
-
+
for(i = 0, len = items.length; i < len; i++){
c[c.length] = {
key : keys[i],
@@ -9807,7 +9807,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
};
}
-
+
c.sort(function(a, b){
var v = fn(a[property], b[property]) * dsc;
if(v === 0){
@@ -9816,7 +9816,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return v;
});
-
+
for(i = 0, len = c.length; i < len; i++){
items[i] = c[i].value;
keys[i] = c[i].key;
@@ -9825,12 +9825,12 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
this.fireEvent('sort', this);
},
-
+
sort : function(dir, fn){
this._sort('value', dir, fn);
},
-
+
reorder: function(mapping) {
this.suspendEvents();
@@ -9841,7 +9841,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
remaining = [],
oldIndex;
-
+
for (oldIndex in mapping) {
order[mapping[oldIndex]] = items[oldIndex];
}
@@ -9865,7 +9865,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
this.fireEvent('sort', this);
},
-
+
keySort : function(dir, fn){
this._sort('key', dir, fn || function(a, b){
var v1 = String(a).toUpperCase(), v2 = String(b).toUpperCase();
@@ -9873,7 +9873,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
});
},
-
+
getRange : function(start, end){
var items = this.items;
if(items.length < 1){
@@ -9894,7 +9894,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return r;
},
-
+
filter : function(property, value, anyMatch, caseSensitive){
if(Ext.isEmpty(value, false)){
return this.clone();
@@ -9905,7 +9905,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
});
},
-
+
filterBy : function(fn, scope){
var r = new Ext.util.MixedCollection();
r.getKey = this.getKey;
@@ -9918,7 +9918,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return r;
},
-
+
findIndex : function(property, value, start, anyMatch, caseSensitive){
if(Ext.isEmpty(value, false)){
return -1;
@@ -9929,7 +9929,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
}, null, start);
},
-
+
findIndexBy : function(fn, scope, start){
var k = this.keys, it = this.items;
for(var i = (start||0), len = it.length; i < len; i++){
@@ -9940,9 +9940,9 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return -1;
},
-
+
createValueMatcher : function(value, anyMatch, caseSensitive, exactMatch) {
- if (!value.exec) {
+ if (!value.exec) {
var er = Ext.escapeRe;
value = String(value);
@@ -9959,7 +9959,7 @@ Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, {
return value;
},
-
+
clone : function(){
var r = new Ext.util.MixedCollection();
var k = this.keys, it = this.items;
@@ -9975,58 +9975,58 @@ Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item
Ext.AbstractManager = Ext.extend(Object, {
typeName: 'type',
-
+
constructor: function(config) {
Ext.apply(this, config || {});
-
-
+
+
this.all = new Ext.util.MixedCollection();
-
+
this.types = {};
},
-
-
+
+
get : function(id){
return this.all.get(id);
},
-
-
+
+
register: function(item) {
this.all.add(item);
},
-
-
+
+
unregister: function(item) {
- this.all.remove(item);
+ this.all.remove(item);
},
-
-
+
+
registerType : function(type, cls){
this.types[type] = cls;
cls[this.typeName] = type;
},
-
-
+
+
isRegistered : function(type){
- return this.types[type] !== undefined;
+ return this.types[type] !== undefined;
},
-
-
+
+
create: function(config, defaultType) {
var type = config[this.typeName] || config.type || defaultType,
Constructor = this.types[type];
-
+
if (Constructor == undefined) {
throw new Error(String.format("The '{0}' type has not been registered with this manager", type));
}
-
+
return new Constructor(config);
},
-
-
+
+
onAvailable : function(id, fn, scope){
var all = this.all;
-
+
all.on("add", function(index, o){
if (o.id == id) {
fn.call(scope || o, o);
@@ -10042,7 +10042,7 @@ Ext.util.Format = function() {
nl2brRe = /\r?\n/g;
return {
-
+
ellipsis : function(value, len, word) {
if (value && value.length > len) {
if (word) {
@@ -10060,12 +10060,12 @@ Ext.util.Format = function() {
return value;
},
-
+
undef : function(value) {
return value !== undefined ? value : "";
},
-
+
defaultValue : function(value, defaultValue) {
if (!defaultValue && defaultValue !== 0) {
defaultValue = '';
@@ -10073,42 +10073,42 @@ Ext.util.Format = function() {
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);
@@ -10119,7 +10119,7 @@ Ext.util.Format = function() {
}
},
-
+
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);
@@ -10138,7 +10138,7 @@ Ext.util.Format = function() {
return "$" + v;
},
-
+
date : function(v, format) {
if (!v) {
return "";
@@ -10149,24 +10149,24 @@ Ext.util.Format = function() {
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";
@@ -10177,10 +10177,10 @@ Ext.util.Format = function() {
}
},
-
+
math : function(){
var fns = {};
-
+
return function(v, a){
if (!fns[a]) {
fns[a] = new Function('v', 'return v ' + a + ';');
@@ -10189,7 +10189,7 @@ Ext.util.Format = function() {
};
}(),
-
+
round : function(value, precision) {
var result = Number(value);
if (typeof precision == 'number') {
@@ -10199,7 +10199,7 @@ Ext.util.Format = function() {
return result;
},
-
+
number: function(v, format) {
if (!format) {
return v;
@@ -10237,9 +10237,9 @@ Ext.util.Format = function() {
psplit = fnum.split('.');
if (hasComma) {
- var cnum = psplit[0],
- parr = [],
- j = cnum.length,
+ var cnum = psplit[0],
+ parr = [],
+ j = cnum.length,
m = Math.floor(j / 3),
n = cnum.length % 3 || 3,
i;
@@ -10248,7 +10248,7 @@ Ext.util.Format = function() {
if (i != 0) {
n = 3;
}
-
+
parr[parr.length] = cnum.substr(i, n);
m -= 1;
}
@@ -10265,19 +10265,19 @@ Ext.util.Format = function() {
return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum);
},
-
+
numberRenderer : function(format) {
return function(v) {
return Ext.util.Format.number(v, format);
};
},
-
+
plural : function(v, s, p) {
return v +' ' + (v == 1 ? s : (p ? p : s+'s'));
},
-
+
nl2br : function(v) {
return Ext.isEmpty(v) ? '' : v.replace(nl2brRe, ' ');
}
@@ -10350,12 +10350,12 @@ Ext.XTemplate = function(){
me.tpls = tpls;
};
Ext.extend(Ext.XTemplate, Ext.Template, {
-
+
re : /\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,
-
+
codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g,
-
+
applySubTemplate : function(id, values, parent, xindex, xcount){
var me = this,
len,
@@ -10378,7 +10378,7 @@ Ext.extend(Ext.XTemplate, Ext.Template, {
return t.compiled.call(me, vs, parent, xindex, xcount);
},
-
+
compileTpl : function(tpl){
var fm = Ext.util.Format,
useF = this.disableFormats !== true,
@@ -10417,11 +10417,11 @@ Ext.extend(Ext.XTemplate, Ext.Template, {
}
function codeFn(m, code){
-
+
return "'" + sep + '(' + code.replace(/\\'/g, "'") + ')' + sep + "'";
}
-
+
if(Ext.isGecko){
body = "tpl.compiled = function(values, parent, xindex, xcount){ return '" +
tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn) +
@@ -10436,17 +10436,17 @@ Ext.extend(Ext.XTemplate, Ext.Template, {
return this;
},
-
+
applyTemplate : function(values){
return this.master.compiled.call(this, values, {}, 1, 1);
},
-
+
compile : function(){return this;}
-
-
-
+
+
+
});
@@ -10466,7 +10466,7 @@ Ext.util.CSS = function(){
var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); };
return {
-
+
createStyleSheet : function(cssText, id){
var ss;
var head = doc.getElementsByTagName("head")[0];
@@ -10492,7 +10492,7 @@ Ext.util.CSS = function(){
return ss;
},
-
+
removeStyleSheet : function(id){
var existing = doc.getElementById(id);
if(existing){
@@ -10500,7 +10500,7 @@ Ext.util.CSS = function(){
}
},
-
+
swapStyleSheet : function(id, url){
this.removeStyleSheet(id);
var ss = doc.createElement("link");
@@ -10510,13 +10510,13 @@ Ext.util.CSS = function(){
ss.setAttribute("href", url);
doc.getElementsByTagName("head")[0].appendChild(ss);
},
-
-
+
+
refreshCache : function(){
return this.getRules(true);
},
-
+
cacheStyleSheet : function(ss){
if(!rules){
rules = {};
@@ -10528,8 +10528,8 @@ Ext.util.CSS = function(){
}
}catch(e){}
},
-
-
+
+
getRules : function(refreshCache){
if(rules === null || refreshCache){
rules = {};
@@ -10537,13 +10537,13 @@ Ext.util.CSS = function(){
for(var i =0, len = ds.length; i < len; i++){
try{
this.cacheStyleSheet(ds[i]);
- }catch(e){}
+ }catch(e){}
}
}
return rules;
},
-
-
+
+
getRule : function(selector, refreshCache){
var rs = this.getRules(refreshCache);
if(!Ext.isArray(selector)){
@@ -10556,9 +10556,9 @@ Ext.util.CSS = function(){
}
return null;
},
-
-
-
+
+
+
updateRule : function(selector, property, value){
if(!Ext.isArray(selector)){
var rule = this.getRule(selector);
@@ -10575,10 +10575,10 @@ Ext.util.CSS = function(){
}
return false;
}
- };
+ };
}();
Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
-
+
constructor : function(el, config){
this.el = Ext.get(el);
this.el.unselectable();
@@ -10586,11 +10586,11 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
Ext.apply(this, config);
this.addEvents(
-
+
"mousedown",
-
+
"click",
-
+
"mouseup"
);
@@ -10599,21 +10599,21 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
this.enable();
}
-
+
if(this.handler){
this.on("click", this.handler, this.scope || this);
}
- Ext.util.ClickRepeater.superclass.constructor.call(this);
+ Ext.util.ClickRepeater.superclass.constructor.call(this);
},
-
+
interval : 20,
delay: 250,
preventDefault : true,
stopDefault : false,
timer : 0,
-
+
enable: function(){
if(this.disabled){
this.el.on('mousedown', this.handleMouseDown, this);
@@ -10627,7 +10627,7 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
this.disabled = false;
},
-
+
disable: function( force){
if(force || !this.disabled){
clearTimeout(this.timer);
@@ -10640,7 +10640,7 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
this.disabled = true;
},
-
+
setDisabled: function(disabled){
this[disabled ? 'disable' : 'enable']();
},
@@ -10654,7 +10654,7 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
}
},
-
+
destroy : function() {
this.disable(true);
Ext.destroy(this.el);
@@ -10669,7 +10669,7 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
this.fireEvent("click", this, e);
},
-
+
handleMouseDown : function(e){
clearTimeout(this.timer);
this.el.blur();
@@ -10684,14 +10684,14 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
this.fireEvent("mousedown", this, e);
this.fireEvent("click", this, e);
-
+
if (this.accelerate) {
this.delay = 400;
}
this.timer = this.click.defer(this.delay || this.interval, this, [e]);
},
-
+
click : function(e){
this.fireEvent("click", this, e);
this.timer = this.click.defer(this.accelerate ?
@@ -10706,7 +10706,7 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
-
+
handleMouseOut : function(){
clearTimeout(this.timer);
if(this.pressClass){
@@ -10715,7 +10715,7 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
this.el.on("mouseover", this.handleMouseReturn, this);
},
-
+
handleMouseReturn : function(){
this.el.un("mouseover", this.handleMouseReturn, this);
if(this.pressClass){
@@ -10724,7 +10724,7 @@ Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, {
this.click();
},
-
+
handleMouseUp : function(e){
clearTimeout(this.timer);
this.el.un("mouseover", this.handleMouseReturn, this);
@@ -10744,14 +10744,14 @@ Ext.KeyNav = function(el, config){
};
Ext.KeyNav.prototype = {
-
+
disabled : false,
-
+
defaultEventAction: "stopEvent",
-
+
forceKeyDown : false,
-
+
relay : function(e){
var k = e.getKey(),
h = this.keyToHandler[k];
@@ -10762,12 +10762,12 @@ Ext.KeyNav.prototype = {
}
},
-
+
doRelay : function(e, h, hname){
return h.call(this.scope || this, e, hname);
},
-
+
enter : false,
left : false,
right : false,
@@ -10782,7 +10782,7 @@ Ext.KeyNav.prototype = {
end : false,
space : false,
-
+
keyToHandler : {
37 : "left",
39 : "right",
@@ -10798,27 +10798,27 @@ Ext.KeyNav.prototype = {
9 : "tab",
32 : "space"
},
-
+
stopKeyUp: function(e) {
var k = e.getKey();
if (k >= 37 && k <= 40) {
-
-
+
+
e.stopEvent();
}
},
-
-
+
+
destroy: function(){
- this.disable();
+ this.disable();
},
-
+
enable: function() {
if (this.disabled) {
if (Ext.isSafari2) {
-
+
this.el.on('keyup', this.stopKeyUp, this);
}
@@ -10827,11 +10827,11 @@ Ext.KeyNav.prototype = {
}
},
-
+
disable: function() {
if (!this.disabled) {
if (Ext.isSafari2) {
-
+
this.el.un('keyup', this.stopKeyUp, this);
}
@@ -10839,13 +10839,13 @@ Ext.KeyNav.prototype = {
this.disabled = true;
}
},
-
-
+
+
setDisabled : function(disabled){
this[disabled ? "disable" : "enable"]();
},
-
-
+
+
isKeydown: function(){
return this.forceKeyDown || Ext.EventManager.useKeydown;
}
@@ -10862,10 +10862,10 @@ Ext.KeyMap = function(el, config, eventName){
};
Ext.KeyMap.prototype = {
-
+
stopEvent : false,
-
+
addBinding : function(config){
if(Ext.isArray(config)){
Ext.each(config, function(c){
@@ -10878,8 +10878,8 @@ Ext.KeyMap.prototype = {
scope = config.scope;
if (config.stopEvent) {
- this.stopEvent = config.stopEvent;
- }
+ this.stopEvent = config.stopEvent;
+ }
if(typeof keyCode == "string"){
var ks = [];
@@ -10890,7 +10890,7 @@ Ext.KeyMap.prototype = {
keyCode = ks;
}
var keyArray = Ext.isArray(keyCode);
-
+
var handler = function(e){
if(this.checkModifiers(config, e)){
var k = e.getKey();
@@ -10916,8 +10916,8 @@ Ext.KeyMap.prototype = {
};
this.bindings.push(handler);
},
-
-
+
+
checkModifiers: function(config, e){
var val, key, keys = ['shift', 'ctrl', 'alt'];
for (var i = 0, len = keys.length; i < len; ++i){
@@ -10930,7 +10930,7 @@ Ext.KeyMap.prototype = {
return true;
},
-
+
on : function(key, fn, scope){
var keyCode, shift, ctrl, alt;
if(typeof key == "object" && !Ext.isArray(key)){
@@ -10951,9 +10951,9 @@ Ext.KeyMap.prototype = {
});
},
-
+
handleKeyDown : function(e){
- if(this.enabled){
+ if(this.enabled){
var b = this.bindings;
for(var i = 0, len = b.length; i < len; i++){
b[i].call(this, e);
@@ -10961,12 +10961,12 @@ Ext.KeyMap.prototype = {
}
},
-
+
isEnabled : function(){
return this.enabled;
},
-
+
enable: function(){
if(!this.enabled){
this.el.on(this.eventName, this.handleKeyDown, this);
@@ -10974,15 +10974,15 @@ Ext.KeyMap.prototype = {
}
},
-
+
disable: function(){
if(this.enabled){
this.el.removeListener(this.eventName, this.handleKeyDown, this);
this.enabled = false;
}
},
-
-
+
+
setDisabled : function(disabled){
this[disabled ? "disable" : "enable"]();
}
@@ -10990,7 +10990,7 @@ Ext.KeyMap.prototype = {
Ext.util.TextMetrics = function(){
var shared;
return {
-
+
measure : function(el, text, fixedWidth){
if(!shared){
shared = Ext.util.TextMetrics.Instance(el, fixedWidth);
@@ -11000,7 +11000,7 @@ Ext.util.TextMetrics = function(){
return shared.getSize(text);
},
-
+
createInstance : function(el, fixedWidth){
return Ext.util.TextMetrics.Instance(el, fixedWidth);
}
@@ -11019,7 +11019,7 @@ Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){
}
var instance = {
-
+
getSize : function(text){
ml.update(text);
var s = ml.getSize();
@@ -11027,25 +11027,25 @@ Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){
return s;
},
-
+
bind : function(el){
ml.setStyle(
Ext.fly(el).getStyles('font-size','font-style', 'font-weight', 'font-family','line-height', 'text-transform', 'letter-spacing')
);
},
-
+
setFixedWidth : function(width){
ml.setWidth(width);
},
-
+
getWidth : function(text){
ml.dom.style.width = 'auto';
return this.getSize(text).width;
},
-
+
getHeight : function(text){
return this.getSize(text).height;
}
@@ -11057,14 +11057,14 @@ Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){
};
Ext.Element.addMethods({
-
+
getTextWidth : function(text, min, max){
return (Ext.util.TextMetrics.measure(this.dom, Ext.value(text, this.dom.innerHTML, true)).width).constrain(min || 0, max || 1000000);
}
});
Ext.util.Cookies = {
-
+
set : function(name, value){
var argv = arguments;
var argc = arguments.length;
@@ -11075,7 +11075,7 @@ Ext.util.Cookies = {
document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secure" : "");
},
-
+
get : function(name){
var arg = name + "=";
var alen = arg.length;
@@ -11095,13 +11095,13 @@ Ext.util.Cookies = {
return null;
},
-
+
clear : function(name){
if(Ext.util.Cookies.get(name)){
document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
},
-
+
getCookieVal : function(offset){
var endstr = document.cookie.indexOf(";", offset);
if(endstr == -1){
@@ -11116,25 +11116,25 @@ Ext.handleError = function(e) {
Ext.Error = function(message) {
-
+
this.message = (this.lang[message]) ? this.lang[message] : message;
};
Ext.Error.prototype = new Error();
Ext.apply(Ext.Error.prototype, {
-
+
lang: {},
name: 'Ext.Error',
-
+
getName : function() {
return this.name;
},
-
+
getMessage : function() {
return this.message;
},
-
+
toJson : function() {
return Ext.encode(this);
}
@@ -11146,22 +11146,22 @@ Ext.ComponentMgr = function(){
var ptypes = {};
return {
-
+
register : function(c){
all.add(c);
},
-
+
unregister : function(c){
all.remove(c);
},
-
+
get : function(id){
return all.get(id);
},
-
+
onAvailable : function(id, fn, scope){
all.on("add", function(index, o){
if(o.id == id){
@@ -11171,56 +11171,56 @@ Ext.ComponentMgr = function(){
});
},
-
+
all : all,
-
-
+
+
types : types,
-
-
+
+
ptypes: ptypes,
-
-
+
+
isRegistered : function(xtype){
- return types[xtype] !== undefined;
+ return types[xtype] !== undefined;
},
-
-
+
+
isPluginRegistered : function(ptype){
- return ptypes[ptype] !== undefined;
- },
+ return ptypes[ptype] !== undefined;
+ },
+
-
registerType : function(xtype, cls){
types[xtype] = cls;
cls.xtype = xtype;
},
-
+
create : function(config, defaultType){
return config.render ? config : new types[config.xtype || defaultType](config);
},
-
+
registerPlugin : function(ptype, cls){
ptypes[ptype] = cls;
cls.ptype = ptype;
},
-
+
createPlugin : function(config, defaultType){
var PluginCls = ptypes[config.ptype || defaultType];
if (PluginCls.init) {
- return PluginCls;
+ return PluginCls;
} else {
return new PluginCls(config);
- }
+ }
}
};
}();
-Ext.reg = Ext.ComponentMgr.registerType;
+Ext.reg = Ext.ComponentMgr.registerType;
Ext.preg = Ext.ComponentMgr.registerPlugin;
@@ -11228,52 +11228,52 @@ Ext.create = Ext.ComponentMgr.create;
Ext.Component = function(config){
config = config || {};
if(config.initialConfig){
- if(config.isAction){
+ if(config.isAction){
this.baseAction = config;
}
- config = config.initialConfig;
- }else if(config.tagName || config.dom || Ext.isString(config)){
+ config = config.initialConfig;
+ }else if(config.tagName || config.dom || Ext.isString(config)){
config = {applyTo: config, id: config.id || config};
}
-
+
this.initialConfig = config;
Ext.apply(this, config);
this.addEvents(
-
+
'added',
-
+
'disable',
-
+
'enable',
-
+
'beforeshow',
-
+
'show',
-
+
'beforehide',
-
+
'hide',
-
+
'removed',
-
+
'beforerender',
-
+
'render',
-
+
'afterrender',
-
+
'beforedestroy',
-
+
'destroy',
-
+
'beforestaterestore',
-
+
'staterestore',
-
+
'beforestatesave',
-
+
'statesave'
);
this.getId();
@@ -11313,73 +11313,73 @@ Ext.Component = function(config){
Ext.Component.AUTO_ID = 1000;
Ext.extend(Ext.Component, Ext.util.Observable, {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
disabled : false,
-
+
hidden : false,
-
-
-
-
-
-
-
+
+
+
+
+
+
+
autoEl : 'div',
-
+
disabledClass : 'x-item-disabled',
-
+
allowDomMove : true,
-
+
autoShow : false,
-
+
hideMode : 'display',
-
+
hideParent : false,
-
-
-
-
-
+
+
+
+
+
rendered : false,
-
-
-
-
+
+
+
+
tplWriteMode : 'overwrite',
-
-
+
+
bubbleEvents: [],
-
+
ctype : 'Ext.Component',
-
+
actionMode : 'el',
-
+
getActionEl : function(){
return this[this.actionMode];
},
@@ -11396,9 +11396,9 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return p;
},
-
+
initComponent : function(){
-
+
if(this.listeners){
this.on(this.listeners);
delete this.listeners;
@@ -11406,7 +11406,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
this.enableBubble(this.bubbleEvents);
},
-
+
render : function(container, position){
if(!this.rendered && this.fireEvent('beforerender', this) !== false){
if(!container && this.el){
@@ -11444,8 +11444,8 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
this.fireEvent('render', this);
-
-
+
+
var contentTarget = this.getContentTarget();
if (this.html){
contentTarget.update(Ext.DomHelper.markup(this.html));
@@ -11469,11 +11469,11 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
if(this.hidden){
-
+
this.doHide();
}
if(this.disabled){
-
+
this.disable(true);
}
@@ -11486,7 +11486,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
},
-
+
update: function(htmlOrData, loadScripts, cb) {
var contentTarget = this.getContentTarget();
if (this.tpl && typeof htmlOrData !== "string") {
@@ -11498,23 +11498,23 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
},
-
+
onAdded : function(container, pos) {
this.ownerCt = container;
this.initRef();
this.fireEvent('added', this, container, pos);
},
-
+
onRemoved : function() {
this.removeRef();
this.fireEvent('removed', this, this.ownerCt);
delete this.ownerCt;
},
-
+
initRef : function() {
-
+
if(this.ref && !this.refOwner){
var levels = this.ref.split('/'),
last = levels.length,
@@ -11527,7 +11527,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
if(t){
t[this.refName = levels[--i]] = this;
-
+
this.refOwner = t;
}
}
@@ -11540,7 +11540,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
initState : function(){
if(Ext.state.Manager){
var id = this.getStateId();
@@ -11556,12 +11556,12 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
getStateId : function(){
return this.stateId || ((/^(ext-comp-|ext-gen)/).test(String(this.id)) ? null : this.id);
},
-
+
initStateEvents : function(){
if(this.stateEvents){
for(var i = 0, e; e = this.stateEvents[i]; i++){
@@ -11570,19 +11570,19 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
applyState : function(state){
if(state){
Ext.apply(this, state);
}
},
-
+
getState : function(){
return null;
},
-
+
saveState : function(){
if(Ext.state.Manager && this.stateful !== false){
var id = this.getStateId();
@@ -11596,14 +11596,14 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
applyToMarkup : function(el){
this.allowDomMove = false;
this.el = Ext.get(el);
this.render(this.el.dom.parentNode);
},
-
+
addClass : function(cls){
if(this.el){
this.el.addClass(cls);
@@ -11613,7 +11613,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
removeClass : function(cls){
if(this.el){
this.el.removeClass(cls);
@@ -11623,8 +11623,8 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
-
+
+
onRender : function(ct, position){
if(!this.el && this.autoEl){
if(Ext.isString(this.autoEl)){
@@ -11650,7 +11650,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
getAutoCreate : function(){
var cfg = Ext.isObject(this.autoCreate) ?
this.autoCreate : Ext.apply({}, this.defaultAutoCreate);
@@ -11660,10 +11660,10 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return cfg;
},
-
+
afterRender : Ext.emptyFn,
-
+
destroy : function(){
if(!this.isDestroyed){
if(this.fireEvent('beforedestroy', this) !== false){
@@ -11678,7 +11678,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
this.container.remove();
}
}
-
+
if(this.focusTask && this.focusTask.cancel){
this.focusTask.cancel();
}
@@ -11699,33 +11699,33 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
beforeDestroy : Ext.emptyFn,
-
+
onDestroy : Ext.emptyFn,
-
+
getEl : function(){
return this.el;
},
-
+
getContentTarget : function(){
return this.el;
},
-
+
getId : function(){
return this.id || (this.id = 'ext-comp-' + (++Ext.Component.AUTO_ID));
},
-
+
getItemId : function(){
return this.itemId || this.getId();
},
-
+
focus : function(selectText, delay){
if(delay){
this.focusTask = new Ext.util.DelayedTask(this.focus, this, [selectText, false]);
@@ -11741,7 +11741,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
blur : function(){
if(this.rendered){
this.el.blur();
@@ -11749,7 +11749,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
disable : function( silent){
if(this.rendered){
this.onDisable();
@@ -11761,13 +11761,13 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
onDisable : function(){
this.getActionEl().addClass(this.disabledClass);
this.el.dom.disabled = true;
},
-
+
enable : function(){
if(this.rendered){
this.onEnable();
@@ -11777,18 +11777,18 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
onEnable : function(){
this.getActionEl().removeClass(this.disabledClass);
this.el.dom.disabled = false;
},
-
+
setDisabled : function(disabled){
return this[disabled ? 'disable' : 'enable']();
},
-
+
show : function(){
if(this.fireEvent('beforeshow', this) !== false){
this.hidden = false;
@@ -11803,12 +11803,12 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
onShow : function(){
this.getVisibilityEl().removeClass('x-hide-' + this.hideMode);
},
-
+
hide : function(){
if(this.fireEvent('beforehide', this) !== false){
this.doHide();
@@ -11817,7 +11817,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
doHide: function(){
this.hidden = true;
if(this.rendered){
@@ -11825,53 +11825,53 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
onHide : function(){
this.getVisibilityEl().addClass('x-hide-' + this.hideMode);
},
-
+
getVisibilityEl : function(){
return this.hideParent ? this.container : this.getActionEl();
},
-
+
setVisible : function(visible){
return this[visible ? 'show' : 'hide']();
},
-
+
isVisible : function(){
return this.rendered && this.getVisibilityEl().isVisible();
},
-
+
cloneConfig : function(overrides){
overrides = overrides || {};
var id = overrides.id || Ext.id();
var cfg = Ext.applyIf(overrides, this.initialConfig);
- cfg.id = id;
+ cfg.id = id;
return new this.constructor(cfg);
},
-
+
getXType : function(){
return this.constructor.xtype;
},
-
+
isXType : function(xtype, shallow){
-
+
if (Ext.isFunction(xtype)){
- xtype = xtype.xtype;
+ xtype = xtype.xtype;
}else if (Ext.isObject(xtype)){
- xtype = xtype.constructor.xtype;
+ xtype = xtype.constructor.xtype;
}
return !shallow ? ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : this.constructor.xtype == xtype;
},
-
+
getXTypes : function(){
var tc = this.constructor;
if(!tc.xtypes){
@@ -11886,20 +11886,20 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return tc.xtypes;
},
-
+
findParentBy : function(fn) {
for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt);
return p || null;
},
-
+
findParentByType : function(xtype, shallow){
return this.findParentBy(function(c){
return c.isXType(xtype, shallow);
});
},
-
+
bubble : function(fn, scope, args){
var p = this;
while(p){
@@ -11911,12 +11911,12 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return this;
},
-
+
getPositionEl : function(){
return this.positionEl || this.el;
},
-
+
purgeListeners : function(){
Ext.Component.superclass.purgeListeners.call(this);
if(this.mons){
@@ -11924,7 +11924,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
clearMons : function(){
Ext.each(this.mons, function(m){
m.item.un(m.ename, m.fn, m.scope);
@@ -11932,7 +11932,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
this.mons = [];
},
-
+
createMons: function(){
if(!this.mons){
this.mons = [];
@@ -11940,7 +11940,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
}
},
-
+
mon : function(item, ename, fn, scope, opt){
this.createMons();
if(Ext.isObject(ename)){
@@ -11952,13 +11952,13 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
continue;
}
if(Ext.isFunction(o[e])){
-
+
this.mons.push({
item: item, ename: e, fn: o[e], scope: o.scope
});
item.on(e, o[e], o.scope, o);
}else{
-
+
this.mons.push({
item: item, ename: e, fn: o[e], scope: o.scope
});
@@ -11974,7 +11974,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
item.on(ename, fn, scope, opt);
},
-
+
mun : function(item, ename, fn, scope){
var found, mon;
this.createMons();
@@ -11990,7 +11990,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return found;
},
-
+
nextSibling : function(){
if(this.ownerCt){
var index = this.ownerCt.items.indexOf(this);
@@ -12001,7 +12001,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return null;
},
-
+
previousSibling : function(){
if(this.ownerCt){
var index = this.ownerCt.items.indexOf(this);
@@ -12012,7 +12012,7 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
return null;
},
-
+
getBubbleTarget : function(){
return this.ownerCt;
}
@@ -12021,100 +12021,100 @@ Ext.extend(Ext.Component, Ext.util.Observable, {
Ext.reg('component', Ext.Component);
Ext.Action = Ext.extend(Object, {
-
-
-
-
-
-
-
+
+
+
+
+
+
+
constructor : function(config){
this.initialConfig = config;
this.itemId = config.itemId = (config.itemId || config.id || Ext.id());
this.items = [];
},
-
-
+
+
isAction : true,
-
+
setText : function(text){
this.initialConfig.text = text;
this.callEach('setText', [text]);
},
-
+
getText : function(){
return this.initialConfig.text;
},
-
+
setIconClass : function(cls){
this.initialConfig.iconCls = cls;
this.callEach('setIconClass', [cls]);
},
-
+
getIconClass : function(){
return this.initialConfig.iconCls;
},
-
+
setDisabled : function(v){
this.initialConfig.disabled = v;
this.callEach('setDisabled', [v]);
},
-
+
enable : function(){
this.setDisabled(false);
},
-
+
disable : function(){
this.setDisabled(true);
},
-
+
isDisabled : function(){
return this.initialConfig.disabled;
},
-
+
setHidden : function(v){
this.initialConfig.hidden = v;
this.callEach('setVisible', [!v]);
},
-
+
show : function(){
this.setHidden(false);
},
-
+
hide : function(){
this.setHidden(true);
},
-
+
isHidden : function(){
return this.initialConfig.hidden;
},
-
+
setHandler : function(fn, scope){
this.initialConfig.handler = fn;
this.initialConfig.scope = scope;
this.callEach('setHandler', [fn, scope]);
},
-
+
each : function(fn, scope){
Ext.each(this.items, fn, scope);
},
-
+
callEach : function(fnName, args){
var cs = this.items;
for(var i = 0, len = cs.length; i < len; i++){
@@ -12122,18 +12122,18 @@ Ext.Action = Ext.extend(Object, {
}
},
-
+
addComponent : function(comp){
this.items.push(comp);
comp.on('destroy', this.removeComponent, this);
},
-
+
removeComponent : function(comp){
this.items.remove(comp);
},
-
+
execute : function(){
this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments);
}
@@ -12144,7 +12144,7 @@ Ext.Layer = function(config, existingEl){
config = config || {};
var dh = Ext.DomHelper,
cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body;
-
+
if (existingEl) {
this.dom = Ext.getDom(existingEl);
}
@@ -12242,9 +12242,9 @@ Ext.extend(Ext.Layer, Ext.Element, {
}
},
-
-
-
+
+
+
sync : function(doShow){
var shadow = this.shadow;
if(!this.updating && this.isVisible() && (shadow || this.useShim)){
@@ -12264,7 +12264,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
if(doShow){
shim.show();
}
-
+
var shadowAdj = shadow.el.getXY(), shimStyle = shim.dom.style,
shadowSize = shadow.el.getSize();
shimStyle.left = (shadowAdj[0])+'px';
@@ -12282,7 +12282,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
}
},
-
+
destroy : function(){
this.hideShim();
if(this.shadow){
@@ -12297,18 +12297,18 @@ Ext.extend(Ext.Layer, Ext.Element, {
this.destroy();
},
-
+
beginUpdate : function(){
this.updating = true;
},
-
+
endUpdate : function(){
this.updating = false;
this.sync(true);
},
-
+
hideUnders : function(negOffset){
if(this.shadow){
this.shadow.hide();
@@ -12316,7 +12316,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
this.hideShim();
},
-
+
constrainXY : function(){
if(this.constrain){
var vw = Ext.lib.Dom.getViewWidth(),
@@ -12327,9 +12327,9 @@ Ext.extend(Ext.Layer, Ext.Element, {
var x = xy[0], y = xy[1];
var so = this.shadowOffset;
var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so;
-
+
var moved = false;
-
+
if((x + w) > vw+s.left){
x = vw - w - so;
moved = true;
@@ -12338,7 +12338,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
y = vh - h - so;
moved = true;
}
-
+
if(x < s.left){
x = s.left;
moved = true;
@@ -12362,18 +12362,18 @@ Ext.extend(Ext.Layer, Ext.Element, {
}
return this;
},
-
+
getConstrainOffset : function(){
- return this.shadowOffset;
+ return this.shadowOffset;
},
isVisible : function(){
return this.visible;
},
-
+
showAction : function(){
- this.visible = true;
+ this.visible = true;
if(this.useDisplay === true){
this.setDisplayed('');
}else if(this.lastXY){
@@ -12383,7 +12383,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
}
},
-
+
hideAction : function(){
this.visible = false;
if(this.useDisplay === true){
@@ -12393,7 +12393,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
}
},
-
+
setVisible : function(v, a, d, c, e){
if(v){
this.showAction();
@@ -12439,26 +12439,26 @@ Ext.extend(Ext.Layer, Ext.Element, {
this.lastLT = [left, top];
},
-
+
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(left){
this.storeLeftTop(left, this.getTop(true));
supr.setLeft.apply(this, arguments);
@@ -12492,7 +12492,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
return this;
},
-
+
createCB : function(c){
var el = this;
return function(){
@@ -12504,19 +12504,19 @@ Ext.extend(Ext.Layer, Ext.Element, {
};
},
-
+
setX : function(x, a, d, c, e){
this.setXY([x, this.getY()], a, d, c, e);
return this;
},
-
+
setY : function(y, a, d, c, e){
this.setXY([this.getX(), y], a, d, c, e);
return this;
},
-
+
setSize : function(w, h, a, d, c, e){
this.beforeAction();
var cb = this.createCB(c);
@@ -12527,7 +12527,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
return this;
},
-
+
setWidth : function(w, a, d, c, e){
this.beforeAction();
var cb = this.createCB(c);
@@ -12538,7 +12538,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
return this;
},
-
+
setHeight : function(h, a, d, c, e){
this.beforeAction();
var cb = this.createCB(c);
@@ -12549,7 +12549,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
return this;
},
-
+
setBounds : function(x, y, w, h, a, d, c, e){
this.beforeAction();
var cb = this.createCB(c);
@@ -12564,7 +12564,7 @@ Ext.extend(Ext.Layer, Ext.Element, {
return this;
},
-
+
setZIndex : function(zindex){
this.zindex = zindex;
this.setStyle('z-index', zindex + 2);
@@ -12590,7 +12590,7 @@ Ext.Shadow = function(config) {
},
rad = Math.floor(this.offset / 2);
switch (this.mode.toLowerCase()) {
-
+
case "drop":
a.w = 0;
a.l = a.t = o;
@@ -12636,14 +12636,14 @@ Ext.Shadow = function(config) {
};
Ext.Shadow.prototype = {
-
-
+
+
offset: 4,
-
+
defaultMode: "drop",
-
+
show: function(target) {
target = Ext.get(target);
if (!this.el) {
@@ -12665,12 +12665,12 @@ Ext.Shadow.prototype = {
this.el.dom.style.display = "block";
},
-
+
isVisible: function() {
return this.el ? true: false;
},
-
+
realign: function(l, t, w, h) {
if (!this.el) {
return;
@@ -12701,7 +12701,7 @@ Ext.Shadow.prototype = {
}
},
-
+
hide: function() {
if (this.el) {
this.el.dom.style.display = "none";
@@ -12710,7 +12710,7 @@ Ext.Shadow.prototype = {
}
},
-
+
setZIndex: function(z) {
this.zIndex = z;
if (this.el) {
@@ -12742,52 +12742,52 @@ Ext.Shadow.Pool = function() {
}();
Ext.BoxComponent = Ext.extend(Ext.Component, {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
initComponent : function(){
Ext.BoxComponent.superclass.initComponent.call(this);
this.addEvents(
-
+
'resize',
-
+
'move'
);
},
-
+
boxReady : false,
-
+
deferHeight: false,
-
+
setSize : function(w, h){
-
+
if(typeof w == 'object'){
h = w.height;
w = w.width;
@@ -12804,14 +12804,14 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
if (Ext.isDefined(h) && Ext.isDefined(this.boxMaxHeight) && (h > this.boxMaxHeight)) {
h = this.boxMaxHeight;
}
-
+
if(!this.boxReady){
this.width = w;
this.height = h;
return this;
}
-
+
if(this.cacheSizes !== false && this.lastSize && this.lastSize.width == w && this.lastSize.height == h){
return this;
}
@@ -12820,7 +12820,7 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
aw = adj.width,
ah = adj.height,
rz;
- if(aw !== undefined || ah !== undefined){
+ if(aw !== undefined || ah !== undefined){
rz = this.getResizeEl();
if(!this.deferHeight && aw !== undefined && ah !== undefined){
rz.setSize(aw, ah);
@@ -12835,39 +12835,39 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
return this;
},
-
+
setWidth : function(width){
return this.setSize(width);
},
-
+
setHeight : function(height){
return this.setSize(undefined, height);
},
-
+
getSize : function(){
return this.getResizeEl().getSize();
},
-
+
getWidth : function(){
return this.getResizeEl().getWidth();
},
-
+
getHeight : function(){
return this.getResizeEl().getHeight();
},
-
+
getOuterSize : function(){
var el = this.getResizeEl();
return {width: el.getWidth() + el.getMargins('lr'),
height: el.getHeight() + el.getMargins('tb')};
},
-
+
getPosition : function(local){
var el = this.getPositionEl();
if(local === true){
@@ -12876,7 +12876,7 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
return this.xy || el.getXY();
},
-
+
getBox : function(local){
var pos = this.getPosition(local);
var s = this.getSize();
@@ -12885,19 +12885,19 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
return s;
},
-
+
updateBox : function(box){
this.setSize(box.width, box.height);
this.setPagePosition(box.x, box.y);
return this;
},
-
+
getResizeEl : function(){
return this.resizeEl || this.el;
},
-
+
setAutoScroll : function(scroll){
if(this.rendered){
this.getContentTarget().setOverflow(scroll ? 'auto' : '');
@@ -12906,7 +12906,7 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
return this;
},
-
+
setPosition : function(x, y){
if(x && typeof x[1] == 'number'){
y = x[1];
@@ -12935,7 +12935,7 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
return this;
},
-
+
setPagePosition : function(x, y){
if(x && typeof x[1] == 'number'){
y = x[1];
@@ -12946,7 +12946,7 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
if(!this.boxReady){
return;
}
- if(x === undefined || y === undefined){
+ if(x === undefined || y === undefined){
return;
}
var p = this.getPositionEl().translatePoints(x, y);
@@ -12954,7 +12954,7 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
return this;
},
-
+
afterRender : function(){
Ext.BoxComponent.superclass.afterRender.call(this);
if(this.resizeEl){
@@ -12973,23 +12973,23 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
}
},
-
+
syncSize : function(){
delete this.lastSize;
this.setSize(this.autoWidth ? undefined : this.getResizeEl().getWidth(), this.autoHeight ? undefined : this.getResizeEl().getHeight());
return this;
},
-
+
onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
},
-
+
onPosition : function(x, y){
},
-
+
adjustSize : function(w, h){
if(this.autoWidth){
w = 'auto';
@@ -13000,7 +13000,7 @@ Ext.BoxComponent = Ext.extend(Ext.Component, {
return {width : w, height: h};
},
-
+
adjustPosition : function(x, y){
return {x : x, y: y};
}
@@ -13015,69 +13015,69 @@ Ext.Spacer = Ext.extend(Ext.BoxComponent, {
Ext.reg('spacer', Ext.Spacer);
Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){
-
+
this.el = Ext.get(dragElement, true);
this.el.unselectable();
-
+
this.resizingEl = Ext.get(resizingElement, true);
-
+
this.orientation = orientation || Ext.SplitBar.HORIZONTAL;
-
-
+
+
this.minSize = 0;
-
+
this.maxSize = 2000;
-
+
this.animate = false;
-
+
this.useShim = false;
-
+
this.shim = null;
if(!existingProxy){
-
+
this.proxy = Ext.SplitBar.createProxy(this.orientation);
}else{
this.proxy = Ext.get(existingProxy).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 = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT);
this.el.addClass("x-splitbar-h");
}else{
-
+
this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM);
this.el.addClass("x-splitbar-v");
}
this.addEvents(
-
+
"resize",
-
+
"moved",
-
+
"beforeresize",
"beforeapply"
@@ -13121,7 +13121,7 @@ Ext.extend(Ext.SplitBar, Ext.util.Observable, {
Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y);
},
-
+
onEndProxyDrag : function(e){
Ext.get(this.proxy).setDisplayed(false);
var endPoint = Ext.lib.Event.getXY(e);
@@ -13153,38 +13153,38 @@ Ext.extend(Ext.SplitBar, Ext.util.Observable, {
}
},
-
+
getAdapter : function(){
return this.adapter;
},
-
+
setAdapter : function(adapter){
this.adapter = adapter;
this.adapter.init(this);
},
-
+
getMinimumSize : function(){
return this.minSize;
},
-
+
setMinimumSize : function(minSize){
this.minSize = minSize;
},
-
+
getMaximumSize : function(){
return this.maxSize;
},
-
+
setMaximumSize : function(maxSize){
this.maxSize = maxSize;
},
-
+
setCurrentSize : function(size){
var oldAnimate = this.animate;
this.animate = false;
@@ -13192,7 +13192,7 @@ Ext.extend(Ext.SplitBar, Ext.util.Observable, {
this.animate = oldAnimate;
},
-
+
destroy : function(removeEl){
Ext.destroy(this.shim, Ext.get(this.proxy));
this.dd.unreg();
@@ -13218,11 +13218,11 @@ Ext.SplitBar.BasicLayoutAdapter = function(){
};
Ext.SplitBar.BasicLayoutAdapter.prototype = {
-
+
init : function(s){
},
-
+
getElementSize : function(s){
if(s.orientation == Ext.SplitBar.HORIZONTAL){
return s.resizingEl.getWidth();
@@ -13231,7 +13231,7 @@ Ext.SplitBar.BasicLayoutAdapter.prototype = {
}
},
-
+
setElementSize : function(s, newSize, onComplete){
if(s.orientation == Ext.SplitBar.HORIZONTAL){
if(!s.animate){
@@ -13313,51 +13313,51 @@ 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 items = this.items;
if(items){
delete this.items;
@@ -13365,15 +13365,15 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
}
},
-
+
initItems : function(){
if(!this.items){
this.items = new Ext.util.MixedCollection(false, this.getComponentId);
- this.getLayout();
+ this.getLayout();
}
},
-
+
setLayout : function(layout){
if(this.layout && this.layout != layout){
this.layout.setContainer(null);
@@ -13384,8 +13384,8 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
},
afterRender: function(){
-
-
+
+
Ext.Container.superclass.afterRender.call(this);
if(!this.layout){
this.layout = 'auto';
@@ -13399,36 +13399,36 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
}
this.setLayout(this.layout);
-
+
if(this.activeItem !== undefined && this.layout.setActiveItem){
var item = this.activeItem;
delete this.activeItem;
this.layout.setActiveItem(item);
}
-
+
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(comp){
return comp.getItemId();
},
-
+
add : function(comp){
this.initItems();
var args = arguments.length > 1;
@@ -13443,7 +13443,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
var index = this.items.length;
if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){
this.items.add(c);
-
+
c.onAdded(this, index);
this.onAdd(c);
this.fireEvent('add', this, c, index);
@@ -13452,40 +13452,40 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
},
onAdd : function(c){
-
+
},
-
+
onAdded : function(container, pos) {
-
+
this.ownerCt = container;
this.initRef();
-
+
this.cascade(function(c){
c.initRef();
});
this.fireEvent('added', this, container, pos);
},
-
+
insert : function(index, comp) {
var args = arguments,
length = args.length,
result = [],
i, c;
-
+
this.initItems();
-
+
if (length > 2) {
for (i = length - 1; i >= 1; --i) {
result.push(this.insert(index, args[i]));
}
return result;
}
-
+
c = this.lookupComponent(this.applyDefaults(comp));
index = Math.min(index, this.items.length);
-
+
if (this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false) {
if (c.ownerCt == this) {
this.items.remove(c);
@@ -13495,11 +13495,11 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
this.onAdd(c);
this.fireEvent('add', this, c, index);
}
-
+
return c;
},
-
+
applyDefaults : function(c){
var d = this.defaults;
if(d){
@@ -13518,7 +13518,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return c;
},
-
+
onBeforeAdd : function(item){
if(item.ownerCt){
item.ownerCt.remove(item, false);
@@ -13528,7 +13528,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
}
},
-
+
remove : function(comp, autoDestroy){
this.initItems();
var c = this.getComponent(comp);
@@ -13540,10 +13540,10 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
},
onRemove: function(c){
-
+
},
-
+
doRemove: function(c, autoDestroy){
var l = this.layout,
hasLayout = l && this.rendered;
@@ -13562,7 +13562,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
}
},
-
+
removeAll: function(autoDestroy){
this.initItems();
var item, rem = [], items = [];
@@ -13579,7 +13579,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return items;
},
-
+
getComponent : function(comp){
if(Ext.isObject(comp)){
comp = comp.getItemId();
@@ -13587,7 +13587,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return this.items.get(comp);
},
-
+
lookupComponent : function(comp){
if(Ext.isString(comp)){
return Ext.ComponentMgr.get(comp);
@@ -13597,13 +13597,13 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return comp;
},
-
+
createComponent : function(config, defaultType){
if (config.render) {
return config;
}
-
-
+
+
var c = Ext.create(Ext.apply({
ownerCt: this
}, config), defaultType || this.defaultType);
@@ -13612,13 +13612,13 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return c;
},
-
+
canLayout : function() {
var el = this.getVisibilityEl();
return el && el.dom && !el.isStyle("display", "none");
},
-
+
doLayout : function(shallow, force){
var rendered = this.rendered,
@@ -13648,28 +13648,28 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
if(rendered){
this.onLayout(shallow, forceLayout);
}
-
+
this.hasLayout = true;
delete this.forceLayout;
},
onLayout : Ext.emptyFn,
-
+
shouldBufferLayout: function(){
-
+
var hl = this.hasLayout;
if(this.ownerCt){
-
+
return hl ? !this.hasLayoutPending() : false;
}
-
+
return hl;
},
-
+
hasLayoutPending: function(){
-
+
var pending = false;
this.ownerCt.bubble(function(c){
if(c.layoutPending){
@@ -13681,16 +13681,16 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
},
onShow : function(){
-
+
Ext.Container.superclass.onShow.call(this);
-
+
if(Ext.isDefined(this.deferLayout)){
delete this.deferLayout;
this.doLayout(true);
}
},
-
+
getLayout : function(){
if(!this.layout){
var layout = new Ext.layout.AutoLayout(this.layoutConfig);
@@ -13699,7 +13699,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return this.layout;
},
-
+
beforeDestroy : function(){
var c;
if(this.items){
@@ -13714,7 +13714,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
Ext.Container.superclass.beforeDestroy.call(this);
},
-
+
cascade : function(fn, scope, args){
if(fn.apply(scope || this, args || [this]) !== false){
if(this.items){
@@ -13731,9 +13731,9 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
findById : function(id){
- var m = null,
+ var m = null,
ct = this;
this.cascade(function(c){
if(ct != c && c.id === id){
@@ -13744,21 +13744,21 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return m;
},
-
+
findByType : function(xtype, shallow){
return this.findBy(function(c){
return c.isXType(xtype, shallow);
});
},
-
+
find : function(prop, value){
return this.findBy(function(c){
return c[prop] === value;
});
},
-
+
findBy : function(fn, scope){
var m = [], ct = this;
this.cascade(function(c){
@@ -13769,7 +13769,7 @@ Ext.Container = Ext.extend(Ext.BoxComponent, {
return m;
},
-
+
get : function(key){
return this.getComponent(key);
}
@@ -13779,14 +13779,14 @@ Ext.Container.LAYOUTS = {};
Ext.reg('container', Ext.Container);
Ext.layout.ContainerLayout = Ext.extend(Object, {
-
-
-
-
+
+
+
+
monitorResize:false,
-
+
activeItem : null,
constructor : function(config){
@@ -13796,7 +13796,7 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
type: 'container',
-
+
IEMeasureHack : function(target, viewFlag) {
var tChildren = target.dom.childNodes, tLen = tChildren.length, c, d = [], e, i, ret;
for (i = 0 ; i < tLen ; i++) {
@@ -13818,10 +13818,10 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
return ret;
},
-
+
getLayoutTargetSize : Ext.EmptyFn,
-
+
layout : function(){
var ct = this.container, target = ct.getLayoutTarget();
if(!(this.hasLayout || Ext.isEmpty(this.targetCls))){
@@ -13831,17 +13831,17 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
ct.fireEvent('afterlayout', ct, this);
},
-
+
onLayout : function(ct, target){
this.renderAll(ct, target);
},
-
+
isValidParent : function(c, target){
return target && c.getPositionEl().dom.parentNode == (target.dom || target);
},
-
+
renderAll : function(ct, target){
var items = ct.items.items, i, c, len = items.length;
for(i = 0; i < len; i++) {
@@ -13852,7 +13852,7 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
}
},
-
+
renderItem : function(c, position, target){
if (c) {
if (!c.rendered) {
@@ -13870,8 +13870,8 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
}
},
-
-
+
+
getRenderedItems: function(ct){
var t = ct.getLayoutTarget(), cti = ct.items.items, len = cti.length, i, c, items = [];
for (i = 0; i < len; i++) {
@@ -13882,14 +13882,14 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
return items;
},
-
+
configureItem: function(c){
if (this.extraCls) {
var t = c.getPositionEl ? c.getPositionEl() : c;
t.addClass(this.extraCls);
}
-
+
if (c.doLayout && this.forceLayout) {
c.doLayout();
}
@@ -13915,7 +13915,7 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
}
},
-
+
onResize: function(){
var ct = this.container,
b;
@@ -13941,9 +13941,9 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
delete ct.layoutPending;
},
-
+
setContainer : function(ct){
-
+
if(this.monitorResize && ct != this.container){
var old = this.container;
if(old){
@@ -13956,7 +13956,7 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
this.container = ct;
},
-
+
parseMargins : function(v){
if (Ext.isNumber(v)) {
v = v.toString();
@@ -13981,7 +13981,7 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
};
},
-
+
fieldTpl: (function() {
var t = new Ext.Template(
'',
@@ -13994,9 +13994,9 @@ Ext.layout.ContainerLayout = Ext.extend(Object, {
return t.compile();
})(),
-
+
destroy : function(){
-
+
if(this.resizeTask && this.resizeTask.cancel){
this.resizeTask.cancel();
}
@@ -14022,7 +14022,7 @@ Ext.layout.AutoLayout = Ext.extend(Ext.layout.ContainerLayout, {
for(i = 0; i < len; i++){
c = cs[i];
if (c.doLayout){
-
+
c.doLayout(true);
}
}
@@ -14032,7 +14032,7 @@ Ext.layout.AutoLayout = Ext.extend(Ext.layout.ContainerLayout, {
Ext.Container.LAYOUTS['auto'] = Ext.layout.AutoLayout;
Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {
-
+
monitorResize:true,
type: 'fit',
@@ -14042,11 +14042,11 @@ Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {
if (!target) {
return {};
}
-
+
return target.getStyleSize();
},
-
+
onLayout : function(ct, target){
Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target);
if(!ct.collapsed){
@@ -14054,37 +14054,37 @@ Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
},
-
+
setItemSize : function(item, size){
- if(item && size.height > 0){
+ if(item && size.height > 0){
item.setSize(size);
}
}
});
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(item){
var ai = this.activeItem,
ct = this.container;
item = ct.getComponent(item);
-
+
if(item && ai != item){
-
+
if(ai){
ai.hide();
if (ai.hidden !== true) {
@@ -14095,14 +14095,14 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
var layout = item.doLayout && (this.layoutOnCardChange || !item.rendered);
-
+
this.activeItem = item;
-
-
+
+
delete item.deferLayout;
-
+
item.show();
this.layout();
@@ -14114,7 +14114,7 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
}
},
-
+
renderAll : function(ct, target){
if(this.deferredRender){
this.renderItem(this.activeItem, undefined, target);
@@ -14126,14 +14126,14 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
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,
@@ -14144,9 +14144,9 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
if (target) {
ret = target.getViewSize();
-
-
-
+
+
+
if (Ext.isIE9m && Ext.isStrict && ret.width == 0){
ret = target.getStyleSize();
}
@@ -14156,7 +14156,7 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
return ret;
},
-
+
onLayout : function(container, target) {
Ext.layout.AnchorLayout.superclass.onLayout.call(this, container, target);
@@ -14183,7 +14183,7 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
return;
}
-
+
if(container.anchorSize) {
if(typeof container.anchorSize == 'number') {
anchorWidth = container.anchorSize;
@@ -14200,14 +14200,14 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
component = components[i];
el = component.getPositionEl();
-
+
if (!component.anchor && component.items && !Ext.isNumber(component.width) && !(Ext.isIE6 && Ext.isStrict)){
component.anchor = this.defaultAnchor;
}
if(component.anchor) {
anchorSpec = component.anchorSpec;
-
+
if(!anchorSpec){
anchorsArray = component.anchor.split(' ');
component.anchorSpec = anchorSpec = {
@@ -14243,11 +14243,11 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
delete this.adjustmentPass;
},
-
+
parseAnchor : function(a, start, cstart) {
if (a && a != 'none') {
var last;
-
+
if (this.parseAnchorRE.test(a)) {
var diff = cstart - start;
return function(v){
@@ -14256,7 +14256,7 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
return v - diff;
}
};
-
+
} else if(a.indexOf('%') != -1) {
var ratio = parseFloat(a.replace('%', ''))*.01;
return function(v){
@@ -14265,7 +14265,7 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
return Math.floor(v*ratio);
}
};
-
+
} else {
a = parseInt(a, 10);
if (!isNaN(a)) {
@@ -14281,22 +14281,22 @@ Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
return false;
},
-
+
adjustWidthAnchor : function(value, comp){
return value;
},
-
+
adjustHeightAnchor : function(value, comp){
return value;
}
-
+
});
Ext.Container.LAYOUTS['anchor'] = Ext.layout.AnchorLayout;
Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
-
+
monitorResize:true,
type: 'column',
@@ -14305,7 +14305,7 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
scrollOffset : 0,
-
+
targetCls: 'x-column-layout-ct',
@@ -14318,9 +14318,9 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
if (target) {
ret = target.getViewSize();
-
-
-
+
+
+
if (Ext.isIE9m && Ext.isStrict && ret.width == 0){
ret = target.getStyleSize();
}
@@ -14333,15 +14333,15 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
renderAll : function(ct, target) {
if(!this.innerCt){
-
-
+
+
this.innerCt = target.createChild({cls:'x-column-inner'});
this.innerCt.createChild({cls:'x-clear'});
}
Ext.layout.ColumnLayout.superclass.renderAll.call(this, ct, this.innerCt);
},
-
+
onLayout : function(ct, target){
var cs = ct.items.items,
len = cs.length,
@@ -14354,7 +14354,7 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
var size = this.getLayoutTargetSize();
- if (Ext.isIE9m && (size.width < 1 && size.height < 1)) {
+ if (Ext.isIE9m && (size.width < 1 && size.height < 1)) {
return;
}
@@ -14364,8 +14364,8 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
this.innerCt.setWidth(w);
-
-
+
+
for(i = 0; i < len; i++){
c = cs[i];
@@ -14386,8 +14386,8 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
}
-
-
+
+
if (Ext.isIE9m) {
if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) {
var ts = this.getLayoutTargetSize();
@@ -14400,15 +14400,15 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, {
delete this.adjustmentPass;
}
-
+
});
Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout;
Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
-
+
monitorResize:true,
-
+
rendered : false,
type: 'border',
@@ -14420,7 +14420,7 @@ Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
return target ? target.getViewSize() : {};
},
-
+
onLayout : function(ct, target){
var collapsed, i, c, pos, items = ct.items.items, len = items.length;
if(!this.rendered){
@@ -14445,7 +14445,7 @@ Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
var size = this.getLayoutTargetSize();
- if(size.width < 20 || size.height < 20){
+ if(size.width < 20 || size.height < 20){
if(collapsed){
this.restoreCollapsed = collapsed;
}
@@ -14519,10 +14519,10 @@ Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
collapsed[i].collapse(false);
}
}
- if(Ext.isIE9m && Ext.isStrict){
+ if(Ext.isIE9m && Ext.isStrict){
target.repaint();
}
-
+
if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) {
var ts = this.getLayoutTargetSize();
if (ts.width != size.width || ts.height != size.height){
@@ -14548,7 +14548,7 @@ Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, {
Ext.layout.BorderLayout.superclass.destroy.call(this);
}
-
+
});
@@ -14575,38 +14575,38 @@ Ext.layout.BorderLayout.Region = function(layout, config, pos){
};
Ext.layout.BorderLayout.Region.prototype = {
-
-
-
-
-
-
+
+
+
+
+
+
collapsible : false,
-
+
split:false,
-
+
floatable: true,
-
+
minWidth:50,
-
+
minHeight:50,
-
+
defaultMargins : {left:0,top:0,right:0,bottom:0},
-
+
defaultNSCMargins : {left:5,top:5,right:5,bottom:5},
-
+
defaultEWCMargins : {left:5,top:0,right:5,bottom:0},
floatingZIndex: 100,
-
+
isCollapsed : false,
-
-
-
-
+
+
+
+
render : function(ct, p){
this.panel = p;
p.el.enableDisplayMode();
@@ -14640,7 +14640,7 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
getCollapsedEl : function(){
if(!this.collapsedEl){
if(!this.toolTemplate){
@@ -14682,7 +14682,7 @@ Ext.layout.BorderLayout.Region.prototype = {
return this.collapsedEl;
},
-
+
onExpandClick : function(e){
if(this.isSlid){
this.panel.expand(false);
@@ -14691,12 +14691,12 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
onCollapseClick : function(e){
this.panel.collapse();
},
-
+
beforeCollapse : function(p, animate){
this.lastAnim = animate;
if(this.splitEl){
@@ -14710,7 +14710,7 @@ Ext.layout.BorderLayout.Region.prototype = {
this.layout.layout();
},
-
+
onCollapse : function(animate){
this.panel.el.setStyle('z-index', 1);
if(this.lastAnim === false || this.panel.animCollapse === false){
@@ -14722,7 +14722,7 @@ Ext.layout.BorderLayout.Region.prototype = {
this.panel.saveState();
},
-
+
beforeExpand : function(animate){
if(this.isSlid){
this.afterSlideIn();
@@ -14739,7 +14739,7 @@ Ext.layout.BorderLayout.Region.prototype = {
this.panel.el.setStyle('z-index', this.floatingZIndex);
},
-
+
onExpand : function(){
this.isCollapsed = false;
if(this.splitEl){
@@ -14751,7 +14751,7 @@ Ext.layout.BorderLayout.Region.prototype = {
this.panel.saveState();
},
-
+
collapseClick : function(e){
if(this.isSlid){
e.stopPropagation();
@@ -14762,7 +14762,7 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
onHide : function(){
if(this.isCollapsed){
this.getCollapsedEl().hide();
@@ -14771,7 +14771,7 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
onShow : function(){
if(this.isCollapsed){
this.getCollapsedEl().show();
@@ -14780,44 +14780,44 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
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(panel){
this.panel = panel;
},
-
+
getMinWidth: function(){
return this.minWidth;
},
-
+
getMinHeight: function(){
return this.minHeight;
},
-
+
applyLayoutCollapsed : function(box){
var ce = this.getCollapsedEl();
ce.setLeftTop(box.x, box.y);
ce.setSize(box.width, box.height);
},
-
+
applyLayout : function(box){
if(this.isCollapsed){
this.applyLayoutCollapsed(box);
@@ -14827,17 +14827,17 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
beforeSlide: function(){
this.panel.beforeEffect();
},
-
+
afterSlide : function(){
this.panel.afterEffect();
},
-
+
initAutoHide : function(){
if(this.autoHide !== false){
if(!this.autoHideHd){
@@ -14859,7 +14859,7 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
clearAutoHide : function(){
if(this.autoHide !== false){
this.el.un("mouseout", this.autoHideHd.mouseout);
@@ -14869,12 +14869,12 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
clearMonitor : function(){
Ext.getDoc().un("click", this.slideInIf, this);
},
-
+
slideOut : function(){
if(this.isSlid || this.el.hasActiveFx()){
return;
@@ -14886,24 +14886,24 @@ Ext.layout.BorderLayout.Region.prototype = {
}
this.el.show();
-
+
pc = this.panel.collapsed;
this.panel.collapsed = false;
if(this.position == 'east' || this.position == 'west'){
-
+
dh = this.panel.deferHeight;
this.panel.deferHeight = false;
this.panel.setSize(undefined, this.collapsedEl.getHeight());
-
+
this.panel.deferHeight = dh;
}else{
this.panel.setSize(this.collapsedEl.getWidth(), undefined);
}
-
+
this.panel.collapsed = pc;
this.restoreLT = [this.el.dom.style.left, this.el.dom.style.top];
@@ -14927,7 +14927,7 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
afterSlideIn : function(){
this.clearAutoHide();
this.isSlid = false;
@@ -14943,7 +14943,7 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
slideIn : function(cb){
if(!this.isSlid || this.el.hasActiveFx()){
Ext.callback(cb);
@@ -14968,14 +14968,14 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
slideInIf : function(e){
if(!e.within(this.el)){
this.slideIn();
}
},
-
+
anchors : {
"west" : "left",
"east" : "right",
@@ -14983,7 +14983,7 @@ Ext.layout.BorderLayout.Region.prototype = {
"south" : "bottom"
},
-
+
sanchors : {
"west" : "l",
"east" : "r",
@@ -14991,7 +14991,7 @@ Ext.layout.BorderLayout.Region.prototype = {
"south" : "b"
},
-
+
canchors : {
"west" : "tl-tr",
"east" : "tr-tl",
@@ -14999,22 +14999,22 @@ Ext.layout.BorderLayout.Region.prototype = {
"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 cm = this.cmargins;
switch(this.position){
@@ -15033,7 +15033,7 @@ Ext.layout.BorderLayout.Region.prototype = {
}
},
-
+
getExpandAdj : function(){
var c = this.collapsedEl, cm = this.cmargins;
switch(this.position){
@@ -15063,20 +15063,20 @@ Ext.layout.BorderLayout.Region.prototype = {
Ext.layout.BorderLayout.SplitRegion = function(layout, config, pos){
Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this, layout, config, pos);
-
+
this.applyLayout = this.applyFns[pos];
};
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,
@@ -15108,7 +15108,7 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region,
}
},
-
+
applyFns : {
west : function(box){
if(this.isCollapsed){
@@ -15160,7 +15160,7 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region,
}
},
-
+
render : function(ct, p){
Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p);
@@ -15202,7 +15202,7 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region,
}
},
-
+
getSize : function(){
if(this.isCollapsed){
return this.collapsedEl.getSize();
@@ -15216,21 +15216,21 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region,
return s;
},
-
+
getHMaxSize : function(){
var cmax = this.maxSize || 10000;
var center = this.layout.center;
return Math.min(cmax, (this.el.getWidth()+center.el.getWidth())-center.getMinWidth());
},
-
+
getVMaxSize : function(){
var cmax = this.maxSize || 10000;
var center = this.layout.center;
return Math.min(cmax, (this.el.getHeight()+center.el.getHeight())-center.getMinHeight());
},
-
+
onSplitMove : function(split, newSize){
var s = this.panel.getSize();
this.lastSplitSize = newSize;
@@ -15246,12 +15246,12 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region,
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);
@@ -15262,12 +15262,12 @@ Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout;
Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
-
+
labelSeparator : ':',
-
-
+
+
trackLabels: true,
type: 'form',
@@ -15278,7 +15278,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
c.un('show', this.onFieldShow, this);
c.un('hide', this.onFieldHide, this);
}
-
+
var el = c.getPositionEl(),
ct = c.getItemCt && c.getItemCt();
if (c.rendered && ct) {
@@ -15293,7 +15293,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
}
},
-
+
setContainer : function(ct){
Ext.layout.FormLayout.superclass.setContainer.call(this, ct);
ct.labelAlign = ct.labelAlign || this.labelAlign;
@@ -15301,7 +15301,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
ct.addClass('x-form-label-' + ct.labelAlign);
}
- if (ct.hideLabels || this.hideLabels) {
+ if (ct.hideLabels || this.hideLabels) {
Ext.apply(this, {
labelStyle: 'display:none',
elementStyle: 'padding-left:0;',
@@ -15329,7 +15329,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
}
},
-
+
isHide: function(c){
return c.hideLabel || this.container.hideLabels;
},
@@ -15337,7 +15337,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
onFieldShow: function(c){
c.getItemCt().removeClass('x-hide-' + c.hideMode);
-
+
if (c.isComposite) {
c.doLayout();
}
@@ -15347,7 +15347,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
c.getItemCt().addClass('x-hide-' + c.hideMode);
},
-
+
getLabelStyle: function(s){
var ls = '', items = [this.labelStyle, s];
for (var i = 0, len = items.length; i < len; ++i){
@@ -15361,9 +15361,9 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
return ls;
},
-
-
+
+
renderItem : function(c, position, target){
if(c && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){
var args = this.getTemplateArgs(c);
@@ -15376,8 +15376,8 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
c.itemCt = this.fieldTpl.append(target, args, true);
}
if(!c.getItemCt){
-
-
+
+
Ext.apply(c, {
getItemCt: function(){
return c.itemCt;
@@ -15407,12 +15407,12 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
}
},
-
+
getTemplateArgs: function(field) {
var noLabelSep = !field.fieldLabel || field.hideLabel,
itemCls = (field.itemCls || this.container.itemCls || '') + (field.hideLabel ? ' x-hide-label' : '');
-
+
if (Ext.isIE9 && Ext.isIEQuirks && field instanceof Ext.form.TextField) {
itemCls += ' x-input-wrapper';
}
@@ -15428,7 +15428,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
};
},
-
+
adjustWidthAnchor: function(value, c){
if(c.label && !this.isHide(c) && (this.container.labelAlign != 'top')){
var adjust = Ext.isIE6 || Ext.isIEQuirks;
@@ -15444,32 +15444,32 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, {
return value;
},
-
+
isValidParent : function(c, target){
return target && this.container.getEl().contains(c.getPositionEl());
}
-
+
});
Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout;
Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, {
-
+
fill : true,
-
+
autoWidth : true,
-
+
titleCollapse : true,
-
+
hideCollapseTool : false,
-
+
collapseFirst : false,
-
+
animate : false,
-
+
sequence : false,
-
+
activeOnTop : false,
type: 'accordion',
@@ -15509,7 +15509,7 @@ Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, {
c.un('beforeexpand', this.beforeExpand, this);
},
-
+
beforeExpand : function(p, anim){
var ai = this.activeItem;
if(ai){
@@ -15529,34 +15529,34 @@ Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, {
if(this.activeOnTop){
p.el.dom.parentNode.insertBefore(p.el.dom, p.el.dom.parentNode.firstChild);
}
-
+
this.layout();
},
-
+
setItemSize : function(item, size){
if(this.fill && item){
var hh = 0, i, ct = this.getRenderedItems(this.container), len = ct.length, p;
-
+
for (i = 0; i < len; i++) {
if((p = ct[i]) != item && !p.hidden){
hh += p.header.getHeight();
}
};
-
+
size.height -= hh;
-
-
+
+
item.setSize(size);
}
},
-
+
setActiveItem : function(item){
this.setActive(item, true);
},
-
+
setActive : function(item, expand){
var ai = this.activeItem;
item = this.container.getComponent(item);
@@ -15578,19 +15578,19 @@ Ext.Container.LAYOUTS.accordion = Ext.layout.AccordionLayout;
Ext.layout.Accordion = Ext.layout.AccordionLayout;
Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
-
-
+
+
monitorResize:false,
type: 'table',
targetCls: 'x-table-layout-ct',
-
+
tableAttrs:null,
-
+
setContainer : function(ct){
Ext.layout.TableLayout.superclass.setContainer.call(this, ct);
@@ -15598,8 +15598,8 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
this.currentColumn = 0;
this.cells = [];
},
-
-
+
+
onLayout : function(ct, target){
var cs = ct.items.items, len = cs.length, c, i;
@@ -15612,7 +15612,7 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
this.renderAll(ct, target);
},
-
+
getRow : function(index){
var row = this.table.tBodies[0].childNodes[index];
if(!row){
@@ -15622,7 +15622,7 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
return row;
},
-
+
getNextCell : function(c){
var cell = this.getNextNonSpan(this.currentColumn, this.currentRow);
var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1];
@@ -15653,7 +15653,7 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
return td;
},
-
+
getNextNonSpan: function(colIndex, rowIndex){
var cols = this.columns;
while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) {
@@ -15667,9 +15667,9 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
return [colIndex, rowIndex];
},
-
+
renderItem : function(c, position, target){
-
+
if(!this.table){
this.table = target.createChild(
Ext.apply({tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, this.tableAttrs), null, true);
@@ -15685,17 +15685,17 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
},
-
+
isValidParent : function(c, target){
return c.getPositionEl().up('table', 5).dom.parentNode === (target.dom || target);
},
-
+
destroy: function(){
delete this.table;
Ext.layout.TableLayout.superclass.destroy.call(this);
}
-
+
});
Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout;
@@ -15712,28 +15712,28 @@ Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
},
-
+
adjustWidthAnchor : function(value, comp){
return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
},
-
+
adjustHeightAnchor : function(value, comp){
return value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
}
-
+
});
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,
@@ -15747,29 +15747,29 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
if (Ext.isString(this.defaultMargins)) {
this.defaultMargins = this.parseMargins(this.defaultMargins);
}
-
+
var handler = this.overflowHandler;
-
+
if (typeof handler == 'string') {
handler = {
type: handler
};
}
-
+
var handlerType = 'none';
if (handler && handler.type != undefined) {
handlerType = handler.type;
}
-
+
var constructor = Ext.layout.boxOverflow[handlerType];
if (constructor[this.type]) {
constructor = constructor[this.type];
}
-
+
this.overflowHandler = new constructor(this, handler);
},
-
+
onLayout: function(container, target) {
Ext.layout.BoxLayout.superclass.onLayout.call(this, container, target);
@@ -15778,19 +15778,19 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
calcs = this.calculateChildBoxes(items, tSize),
boxes = calcs.boxes,
meta = calcs.meta;
-
-
+
+
if (tSize.width > 0) {
var handler = this.overflowHandler,
method = meta.tooNarrow ? 'handleOverflow' : 'clearOverflow';
-
+
var results = handler[method](calcs, tSize);
-
+
if (results) {
if (results.targetSize) {
tSize = results.targetSize;
}
-
+
if (results.recalculate) {
items = this.getVisibleItems(container);
calcs = this.calculateChildBoxes(items, tSize);
@@ -15798,45 +15798,45 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
}
}
-
-
+
+
this.layoutTargetLastSize = tSize;
-
-
+
+
this.childBoxCache = calcs;
-
+
this.updateInnerCtSize(tSize, calcs);
this.updateChildBoxes(boxes);
-
+
this.handleTargetOverflow(tSize, container, target);
},
-
+
updateChildBoxes: function(boxes) {
for (var i = 0, length = boxes.length; i < length; i++) {
var box = boxes[i],
comp = box.component;
-
+
if (box.dirtySize) {
comp.setSize(box.width, box.height);
}
-
+
if (isNaN(box.left) || isNaN(box.top)) {
continue;
}
-
+
comp.setPosition(box.left, box.top);
}
},
-
+
updateInnerCtSize: function(tSize, calcs) {
var align = this.align,
padding = this.padding,
width = tSize.width,
height = tSize.height;
-
+
if (this.type == 'hbox') {
var innerCtWidth = width,
innerCtHeight = calcs.meta.maxHeight + padding.top + padding.bottom;
@@ -15860,7 +15860,7 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
this.innerCt.setSize(innerCtWidth || undefined, innerCtHeight || undefined);
},
-
+
handleTargetOverflow: function(previousTargetSize, container, target) {
var overflow = target.getStyle('overflow');
@@ -15875,12 +15875,12 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
delete this.adjustmentPass;
},
-
+
isValidParent : function(c, target) {
return this.innerCt && c.getPositionEl().dom.parentNode == this.innerCt.dom;
},
-
+
getVisibleItems: function(ct) {
var ct = ct || this.container,
t = ct.getLayoutTarget(),
@@ -15898,10 +15898,10 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
return items;
},
-
+
renderAll : function(ct, target) {
if (!this.innerCt) {
-
+
this.innerCt = target.createChild({cls:this.innerCls});
this.padding = this.parseMargins(this.padding);
}
@@ -15910,13 +15910,13 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
getLayoutTargetSize : function() {
var target = this.container.getLayoutTarget(), ret;
-
+
if (target) {
ret = target.getViewSize();
-
-
-
+
+
+
if (Ext.isIE9m && Ext.isStrict && ret.width == 0){
ret = target.getStyleSize();
}
@@ -15924,11 +15924,11 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
ret.width -= target.getPadding('lr');
ret.height -= target.getPadding('tb');
}
-
+
return ret;
},
-
+
renderItem : function(c) {
if(Ext.isString(c.margins)){
c.margins = this.parseMargins(c.margins);
@@ -15937,11 +15937,11 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
Ext.layout.BoxLayout.superclass.renderItem.apply(this, arguments);
},
-
-
+
+
destroy: function() {
Ext.destroy(this.overflowHandler);
-
+
Ext.layout.BoxLayout.superclass.destroy.apply(this, arguments);
}
});
@@ -15951,12 +15951,12 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, {
Ext.layout.boxOverflow.None = Ext.extend(Object, {
constructor: function(layout, config) {
this.layout = layout;
-
+
Ext.apply(this, config || {});
},
-
+
handleOverflow: Ext.emptyFn,
-
+
clearOverflow: Ext.emptyFn
});
@@ -15964,37 +15964,37 @@ Ext.layout.boxOverflow.None = Ext.extend(Object, {
Ext.layout.boxOverflow.none = Ext.layout.boxOverflow.None;
Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
-
+
afterCls: 'x-strip-right',
-
-
+
+
noItemsMenuText : '
(None)
',
-
+
constructor: function(layout) {
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(calculations, targetSize) {
var newWidth = targetSize.width + (this.afterCt ? this.afterCt.getWidth() : 0),
items = this.menuItems;
-
+
this.hideTrigger();
-
+
for (var index = 0, length = items.length; index < length; index++) {
items.pop().component.show();
}
-
+
return {
targetSize: {
height: targetSize.height,
@@ -16002,21 +16002,21 @@ Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
}
};
},
-
-
+
+
showTrigger: function() {
this.createMenu();
this.menuTrigger.show();
},
-
-
+
+
hideTrigger: function() {
if (this.menuTrigger != undefined) {
this.menuTrigger.hide();
}
},
-
-
+
+
beforeMenuShow: function(menu) {
var items = this.menuItems,
len = items.length,
@@ -16026,28 +16026,28 @@ Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
var needsSep = function(group, item){
return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator);
};
-
+
this.clearMenu();
menu.removeAll();
-
+
for (var i = 0; i < len; i++) {
item = items[i].component;
-
+
if (prev && (needsSep(item, prev) || needsSep(prev, item))) {
menu.add('-');
}
-
+
this.addComponentToMenu(menu, item);
prev = item;
}
-
+
if (menu.items.length < 1) {
menu.add(this.noItemsMenuText);
}
},
-
-
+
+
createMenuConfig : function(component, hideOnClick){
var config = Ext.apply({}, component.initialConfig),
group = component.toggleGroup;
@@ -16080,7 +16080,7 @@ Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
return config;
},
-
+
addComponentToMenu : function(menu, component) {
if (component instanceof Ext.Toolbar.Separator) {
menu.add('-');
@@ -16099,8 +16099,8 @@ Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
}
}
},
-
-
+
+
clearMenu : function(){
var menu = this.moreMenu;
if (menu && menu.items) {
@@ -16109,13 +16109,13 @@ Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
});
}
},
-
-
+
+
createMenu: function() {
if (!this.menuTrigger) {
this.createInnerElements();
-
-
+
+
this.menu = new Ext.menu.Menu({
ownerCt : this.layout.container,
listeners: {
@@ -16124,7 +16124,7 @@ Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
}
});
-
+
this.menuTrigger = new Ext.Button({
iconCls : 'x-toolbar-more-icon',
cls : 'x-toolbar-more',
@@ -16133,8 +16133,8 @@ Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, {
});
}
},
-
-
+
+
destroy: function() {
Ext.destroy(this.menu, this.menuTrigger);
}
@@ -16145,58 +16145,58 @@ Ext.layout.boxOverflow.menu = Ext.layout.boxOverflow.Menu;
Ext.layout.boxOverflow.HorizontalMenu = Ext.extend(Ext.layout.boxOverflow.Menu, {
-
+
constructor: function() {
Ext.layout.boxOverflow.HorizontalMenu.superclass.constructor.apply(this, arguments);
-
+
var me = this,
layout = me.layout,
origFunction = layout.calculateChildBoxes;
-
+
layout.calculateChildBoxes = function(visibleItems, targetSize) {
var calcs = origFunction.apply(layout, arguments),
meta = calcs.meta,
items = me.menuItems;
-
-
-
+
+
+
var hiddenWidth = 0;
for (var index = 0, length = items.length; index < length; index++) {
hiddenWidth += items[index].width;
}
-
+
meta.minimumWidth += hiddenWidth;
meta.tooNarrow = meta.minimumWidth > targetSize.width;
-
+
return calcs;
- };
+ };
},
-
+
handleOverflow: function(calculations, targetSize) {
this.showTrigger();
-
+
var newWidth = targetSize.width - this.afterCt.getWidth(),
boxes = calculations.boxes,
usedWidth = 0,
recalculate = false;
-
-
+
+
for (var index = 0, length = boxes.length; index < length; index++) {
usedWidth += boxes[index].width;
}
-
+
var spareWidth = newWidth - usedWidth,
showCount = 0;
-
-
+
+
for (var index = 0, length = this.menuItems.length; index < length; index++) {
var hidden = this.menuItems[index],
comp = hidden.component,
width = hidden.width;
-
+
if (width < spareWidth) {
comp.show();
-
+
spareWidth -= width;
showCount ++;
recalculate = true;
@@ -16204,7 +16204,7 @@ Ext.layout.boxOverflow.HorizontalMenu = Ext.extend(Ext.layout.boxOverflow.Menu,
break;
}
}
-
+
if (recalculate) {
this.menuItems = this.menuItems.slice(showCount);
} else {
@@ -16224,11 +16224,11 @@ Ext.layout.boxOverflow.HorizontalMenu = Ext.extend(Ext.layout.boxOverflow.Menu,
}
}
}
-
+
if (this.menuItems.length == 0) {
this.hideTrigger();
}
-
+
return {
targetSize: {
height: targetSize.height,
@@ -16241,37 +16241,37 @@ Ext.layout.boxOverflow.HorizontalMenu = Ext.extend(Ext.layout.boxOverflow.Menu,
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,
@@ -16282,162 +16282,162 @@ Ext.layout.boxOverflow.Scroller = Ext.extend(Ext.layout.boxOverflow.None, {
}
});
},
-
-
+
+
handleOverflow: function(calculations, targetSize) {
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();
+ this.afterScroller.hide();
}
},
-
-
+
+
createScrollers: function() {
if (!this.beforeScroller && !this.afterScroller) {
var before = this.beforeCt.createChild({
cls: String.format("{0} {1} ", this.scrollerCls, this.beforeScrollerCls)
});
-
+
var after = this.afterCt.createChild({
cls: String.format("{0} {1}", this.scrollerCls, this.afterScrollerCls)
});
-
+
before.addClassOnOver(this.beforeScrollerCls + '-hover');
after.addClassOnOver(this.afterScrollerCls + '-hover');
-
+
before.setVisibilityMode(Ext.Element.DISPLAY);
after.setVisibilityMode(Ext.Element.DISPLAY);
-
+
this.beforeRepeater = new Ext.util.ClickRepeater(before, {
interval: this.scrollRepeatInterval,
handler : this.scrollLeft,
scope : this
});
-
+
this.afterRepeater = new Ext.util.ClickRepeater(after, {
interval: this.scrollRepeatInterval,
handler : this.scrollRight,
scope : this
});
-
-
+
+
this.beforeScroller = before;
-
-
+
+
this.afterScroller = after;
}
},
-
-
+
+
destroy: function() {
Ext.destroy(this.beforeScroller, this.afterScroller, this.beforeRepeater, this.afterRepeater, this.beforeCt, this.afterCt);
},
-
-
+
+
scrollBy: function(delta, animate) {
this.scrollTo(this.getScrollPosition() + delta, animate);
},
-
-
+
+
getItem: function(item) {
if (Ext.isString(item)) {
item = Ext.getCmp(item);
} else if (Ext.isNumber(item)) {
item = this.items[item];
}
-
+
return item;
},
-
-
+
+
getScrollAnim: function() {
return {
- duration: this.scrollDuration,
- callback: this.updateScrollButtons,
+ duration: this.scrollDuration,
+ callback: this.updateScrollButtons,
scope : this
};
},
-
-
+
+
updateScrollButtons: function() {
if (this.beforeScroller == undefined || this.afterScroller == undefined) {
return;
}
-
+
var beforeMeth = this.atExtremeBefore() ? 'addClass' : 'removeClass',
afterMeth = this.atExtremeAfter() ? 'addClass' : 'removeClass',
beforeCls = this.beforeScrollerCls + '-disabled',
afterCls = this.afterScrollerCls + '-disabled';
-
+
this.beforeScroller[beforeMeth](beforeCls);
this.afterScroller[afterMeth](afterCls);
this.scrolling = false;
},
-
-
+
+
atExtremeBefore: function() {
return this.getScrollPosition() === 0;
},
-
-
+
+
scrollLeft: function(animate) {
this.scrollBy(-this.scrollIncrement, animate);
},
-
-
+
+
scrollRight: function(animate) {
this.scrollBy(this.scrollIncrement, animate);
},
-
-
+
+
scrollToItem: function(item, animate) {
item = this.getItem(item);
-
+
if (item != undefined) {
var visibility = this.getItemVisibility(item);
-
+
if (!visibility.fullyVisible) {
var box = item.getBox(true, true),
newX = box.x;
-
+
if (visibility.hiddenRight) {
newX -= (this.layout.innerCt.getWidth() - box.width);
}
-
+
this.scrollTo(newX, animate);
}
}
},
-
-
+
+
getItemVisibility: function(item) {
var box = this.getItem(item).getBox(true, true),
itemLeft = box.x,
itemRight = box.x + box.width,
scrollLeft = this.getScrollPosition(),
scrollRight = this.layout.innerCt.getWidth() + scrollLeft;
-
+
return {
hiddenLeft : itemLeft < scrollLeft,
hiddenRight : itemRight > scrollRight,
@@ -16453,10 +16453,10 @@ Ext.layout.boxOverflow.scroller = Ext.layout.boxOverflow.Scroller;
Ext.layout.boxOverflow.VerticalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, {
scrollIncrement: 75,
wheelIncrement : 2,
-
+
handleOverflow: function(calculations, targetSize) {
Ext.layout.boxOverflow.VerticalScroller.superclass.handleOverflow.apply(this, arguments);
-
+
return {
targetSize: {
height: targetSize.height - (this.beforeCt.getHeight() + this.afterCt.getHeight()),
@@ -16464,13 +16464,13 @@ Ext.layout.boxOverflow.VerticalScroller = Ext.extend(Ext.layout.boxOverflow.Scro
}
};
},
-
-
+
+
createInnerElements: function() {
var target = this.layout.innerCt;
-
-
-
+
+
+
if (!this.beforeCt) {
this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before');
this.afterCt = target.insertSibling({cls: this.afterCls}, 'after');
@@ -16478,19 +16478,19 @@ Ext.layout.boxOverflow.VerticalScroller = Ext.extend(Ext.layout.boxOverflow.Scro
this.createWheelListener();
}
},
-
-
+
+
scrollTo: function(position, animate) {
var oldPosition = this.getScrollPosition(),
newPosition = position.constrain(0, this.getMaxScrollBottom());
-
+
if (newPosition != oldPosition && !this.scrolling) {
if (animate == undefined) {
animate = this.animateScroll;
}
-
+
this.layout.innerCt.scrollTo('top', newPosition, animate ? this.getScrollAnim() : false);
-
+
if (animate) {
this.scrolling = true;
} else {
@@ -16499,18 +16499,18 @@ Ext.layout.boxOverflow.VerticalScroller = Ext.extend(Ext.layout.boxOverflow.Scro
}
}
},
-
-
+
+
getScrollPosition: function(){
return parseInt(this.layout.innerCt.dom.scrollTop, 10) || 0;
},
-
-
+
+
getMaxScrollBottom: function() {
return this.layout.innerCt.dom.scrollHeight - this.layout.innerCt.getHeight();
},
-
-
+
+
atExtremeAfter: function() {
return this.getScrollPosition() >= this.getMaxScrollBottom();
}
@@ -16523,7 +16523,7 @@ Ext.layout.boxOverflow.scroller.vbox = Ext.layout.boxOverflow.VerticalScroller;
Ext.layout.boxOverflow.HorizontalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, {
handleOverflow: function(calculations, targetSize) {
Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this, arguments);
-
+
return {
targetSize: {
height: targetSize.height,
@@ -16531,33 +16531,33 @@ Ext.layout.boxOverflow.HorizontalScroller = Ext.extend(Ext.layout.boxOverflow.Sc
}
};
},
-
-
+
+
createInnerElements: function() {
var target = this.layout.innerCt;
-
-
-
+
+
+
if (!this.beforeCt) {
this.afterCt = target.insertSibling({cls: this.afterCls}, 'before');
this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before');
-
+
this.createWheelListener();
}
},
-
-
+
+
scrollTo: function(position, animate) {
var oldPosition = this.getScrollPosition(),
newPosition = position.constrain(0, this.getMaxScrollRight());
-
+
if (newPosition != oldPosition && !this.scrolling) {
if (animate == undefined) {
animate = this.animateScroll;
}
-
+
this.layout.innerCt.scrollTo('left', newPosition, animate ? this.getScrollAnim() : false);
-
+
if (animate) {
this.scrolling = true;
} else {
@@ -16566,18 +16566,18 @@ Ext.layout.boxOverflow.HorizontalScroller = Ext.extend(Ext.layout.boxOverflow.Sc
}
}
},
-
-
+
+
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();
}
@@ -16585,15 +16585,15 @@ Ext.layout.boxOverflow.HorizontalScroller = Ext.extend(Ext.layout.boxOverflow.Sc
Ext.layout.boxOverflow.scroller.hbox = Ext.layout.boxOverflow.HorizontalScroller;
Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
-
- align: 'top',
+
+ align: 'top',
type : 'hbox',
-
-
-
+
+
+
calculateChildBoxes: function(visibleItems, targetSize) {
var visibleCount = visibleItems.length,
@@ -16617,31 +16617,31 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
desiredWidth = 0,
minimumWidth = 0,
-
+
boxes = [],
-
+
child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedWidth,
horizMargins, vertMargins, stretchHeight;
-
+
for (i = 0; i < visibleCount; i++) {
child = visibleItems[i];
childHeight = child.height;
childWidth = child.width;
canLayout = !child.hasLayout && typeof child.doLayout == 'function';
-
+
if (typeof childWidth != 'number') {
-
+
if (child.flex && !childWidth) {
totalFlex += child.flex;
-
+
} else {
-
-
+
+
if (!childWidth && canLayout) {
child.doLayout();
}
@@ -16659,7 +16659,7 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
desiredWidth += horizMargins + (child.flex ? child.minWidth || 0 : childWidth);
minimumWidth += horizMargins + (child.minWidth || childWidth || 0);
-
+
if (typeof childHeight != 'number') {
if (canLayout) {
child.doLayout();
@@ -16669,7 +16669,7 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
maxHeight = Math.max(maxHeight, childHeight + childMargins.top + childMargins.bottom);
-
+
boxes.push({
component: child,
height : childHeight || undefined,
@@ -16680,7 +16680,7 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
var shortfall = desiredWidth - width,
tooNarrow = minimumWidth > width;
-
+
var availableWidth = Math.max(0, width - nonFlexWidth - paddingHoriz);
if (tooNarrow) {
@@ -16688,20 +16688,20 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
boxes[i].width = visibleItems[i].minWidth || visibleItems[i].width || boxes[i].width;
}
} else {
-
-
+
+
if (shortfall > 0) {
var minWidths = [];
-
-
-
+
+
+
for (var index = 0, length = visibleCount; index < length; index++) {
var item = visibleItems[index],
minWidth = item.minWidth || 0;
-
-
+
+
if (item.flex) {
boxes[index].width = minWidth;
} else {
@@ -16713,12 +16713,12 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
}
}
-
+
minWidths.sort(function(a, b) {
return a.available > b.available ? 1 : -1;
});
-
+
for (var i = 0, length = minWidths.length; i < length; i++) {
var itemIndex = minWidths[i].index;
@@ -16737,11 +16737,11 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
shortfall -= reduction;
}
} else {
-
+
var remainingWidth = availableWidth,
remainingFlex = totalFlex;
-
+
for (i = 0; i < visibleCount; i++) {
child = visibleItems[i];
calcs = boxes[i];
@@ -16767,7 +16767,7 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
leftOffset += availableWidth;
}
-
+
for (i = 0; i < visibleCount; i++) {
child = visibleItems[i];
calcs = boxes[i];
@@ -16816,15 +16816,15 @@ Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout;
Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
-
- align : 'left',
+
+ align : 'left',
type: 'vbox',
-
-
-
+
+
+
calculateChildBoxes: function(visibleItems, targetSize) {
var visibleCount = visibleItems.length,
@@ -16848,31 +16848,31 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
desiredHeight= 0,
minimumHeight= 0,
-
+
boxes = [],
-
+
child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedHeight,
horizMargins, vertMargins, stretchWidth, length;
-
+
for (i = 0; i < visibleCount; i++) {
child = visibleItems[i];
childHeight = child.height;
childWidth = child.width;
canLayout = !child.hasLayout && typeof child.doLayout == 'function';
-
+
if (typeof childHeight != 'number') {
-
+
if (child.flex && !childHeight) {
totalFlex += child.flex;
-
+
} else {
-
-
+
+
if (!childHeight && canLayout) {
child.doLayout();
}
@@ -16890,7 +16890,7 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
desiredHeight += vertMargins + (child.flex ? child.minHeight || 0 : childHeight);
minimumHeight += vertMargins + (child.minHeight || childHeight || 0);
-
+
if (typeof childWidth != 'number') {
if (canLayout) {
child.doLayout();
@@ -16900,7 +16900,7 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
maxWidth = Math.max(maxWidth, childWidth + childMargins.left + childMargins.right);
-
+
boxes.push({
component: child,
height : childHeight || undefined,
@@ -16911,7 +16911,7 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
var shortfall = desiredHeight - height,
tooNarrow = minimumHeight > height;
-
+
var availableHeight = Math.max(0, (height - nonFlexHeight - paddingVert));
if (tooNarrow) {
@@ -16919,20 +16919,20 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
boxes[i].height = visibleItems[i].minHeight || visibleItems[i].height || boxes[i].height;
}
} else {
-
-
+
+
if (shortfall > 0) {
var minHeights = [];
-
-
-
+
+
+
for (var index = 0, length = visibleCount; index < length; index++) {
var item = visibleItems[index],
minHeight = item.minHeight || 0;
-
-
+
+
if (item.flex) {
boxes[index].height = minHeight;
} else {
@@ -16944,12 +16944,12 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
}
}
-
+
minHeights.sort(function(a, b) {
return a.available > b.available ? 1 : -1;
});
-
+
for (var i = 0, length = minHeights.length; i < length; i++) {
var itemIndex = minHeights[i].index;
@@ -16968,11 +16968,11 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
shortfall -= reduction;
}
} else {
-
+
var remainingHeight = availableHeight,
remainingFlex = totalFlex;
-
+
for (i = 0; i < visibleCount; i++) {
child = visibleItems[i];
calcs = boxes[i];
@@ -16998,7 +16998,7 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, {
topOffset += availableHeight;
}
-
+
for (i = 0; i < visibleCount; i++) {
child = visibleItems[i];
calcs = boxes[i];
@@ -17053,16 +17053,16 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
type: 'toolbar',
-
+
triggerWidth: 18,
-
+
noItemsMenuText : '
(None)
',
-
+
lastOverflow: false,
-
+
tableHTML: [
'
'
].join(""),
-
+
onLayout : function(ct, target) {
-
+
if (!this.leftTr) {
var align = ct.buttonAlign == 'center' ? 'center' : 'left';
@@ -17115,7 +17115,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
this.extrasTr = target.child('tr.x-toolbar-extras-row', true);
if (this.hiddenItem == undefined) {
-
+
this.hiddenItems = [];
}
}
@@ -17124,7 +17124,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
items = ct.items.items,
position = 0;
-
+
for (var i = 0, len = items.length, c; i < len; i++, position++) {
c = items[i];
@@ -17143,14 +17143,14 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
}
-
+
this.cleanup(this.leftTr);
this.cleanup(this.rightTr);
this.cleanup(this.extrasTr);
this.fitToSize(target);
},
-
+
cleanup : function(el) {
var cn = el.childNodes, i, c;
@@ -17161,7 +17161,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
},
-
+
insertCell : function(c, target, position) {
var td = document.createElement('td');
td.className = 'x-toolbar-cell';
@@ -17171,7 +17171,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
return td;
},
-
+
hideItem : function(item) {
this.hiddenItems.push(item);
@@ -17180,19 +17180,19 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
item.hide();
},
-
+
unhideItem : function(item) {
item.show();
item.xtbHidden = false;
this.hiddenItems.remove(item);
},
-
+
getItemWidth : function(c) {
return c.hidden ? (c.xtbWidth || 0) : c.getPositionEl().dom.parentNode.offsetWidth;
},
-
+
fitToSize : function(target) {
if (this.container.enableOverflow === false) {
return;
@@ -17231,7 +17231,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
}
-
+
hasHiddens = hiddenItems.length != 0;
if (hasHiddens) {
@@ -17253,7 +17253,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
},
-
+
createMenuConfig : function(component, hideOnClick){
var config = Ext.apply({}, component.initialConfig),
group = component.toggleGroup;
@@ -17286,7 +17286,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
return config;
},
-
+
addComponentToMenu : function(menu, component) {
if (component instanceof Ext.Toolbar.Separator) {
menu.add('-');
@@ -17306,7 +17306,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
},
-
+
clearMenu : function(){
var menu = this.moreMenu;
if (menu && menu.items) {
@@ -17316,7 +17316,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
},
-
+
beforeMoreShow : function(menu) {
var items = this.container.items.items,
len = items.length,
@@ -17340,16 +17340,16 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
}
-
+
if (menu.items.length < 1) {
menu.add(this.noItemsMenuText);
}
},
-
+
initMore : function(){
if (!this.more) {
-
+
this.moreMenu = new Ext.menu.Menu({
ownerCt : this.container,
listeners: {
@@ -17358,7 +17358,7 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, {
}
});
-
+
this.more = new Ext.Button({
iconCls: 'x-toolbar-more-icon',
cls : 'x-toolbar-more',
@@ -17389,8 +17389,8 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;
setContainer : function(ct){
this.monitorResize = !ct.floating;
-
-
+
+
ct.on('autosize', this.doAutoSize, this);
Ext.layout.MenuLayout.superclass.setContainer.call(this, ct);
},
@@ -17449,7 +17449,7 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;
};
},
-
+
isValidParent : function(c, target) {
return c.el.up('li.x-menu-list-item', 5).dom.parentNode === (target.dom || target);
},
@@ -17466,7 +17466,7 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;
ct.setWidth(w);
}else if(Ext.isIE9m){
ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8 || Ext.isIE9) ? 'auto' : ct.minWidth);
- var el = ct.getEl(), t = el.dom.offsetWidth;
+ var el = ct.getEl(), t = el.dom.offsetWidth;
ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr'));
}
}
@@ -17475,17 +17475,17 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;
Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout;
Ext.Viewport = Ext.extend(Ext.Container, {
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
initComponent : function() {
Ext.Viewport.superclass.initComponent.call(this);
@@ -17509,124 +17509,124 @@ Ext.Viewport = Ext.extend(Ext.Container, {
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'
);
@@ -17636,7 +17636,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.toolbars = [];
-
+
if(this.tbar){
this.elements += ',tbar';
this.topToolbar = this.createToolbar(this.tbar);
@@ -17673,7 +17673,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
createFbar : function(fbar){
var min = this.minButtonWidth;
this.elements += ',footer';
@@ -17687,19 +17687,19 @@ Ext.Panel = Ext.extend(Ext.Container, {
};
}
});
-
-
-
+
+
+
this.fbar.items.each(function(c){
c.minWidth = c.minWidth || this.minButtonWidth;
}, this);
this.buttons = this.fbar.items.items;
},
-
+
createToolbar: function(tb, options){
var result;
-
+
if(Ext.isArray(tb)){
tb = {
items: tb
@@ -17710,7 +17710,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return result;
},
-
+
createElement : function(name, pnode){
if(this[name]){
pnode.appendChild(this[name].dom);
@@ -17734,7 +17734,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
onRender : function(ct, position){
Ext.Panel.superclass.onRender.call(this, ct, position);
this.createClasses();
@@ -17761,7 +17761,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.tools = {};
el.addClass(this.baseCls);
- if(d.firstChild){
+ if(d.firstChild){
this.header = el.down('.'+this.headerCls);
this.bwrap = el.down('.'+this.bwrapCls);
var cp = this.bwrap ? this.bwrap : el;
@@ -17782,16 +17782,16 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.elements += ',footer';
}
-
-
+
+
if(this.frame){
el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls));
this.createElement('header', d.firstChild.firstChild.firstChild);
this.createElement('bwrap', d);
-
+
bw = this.bwrap.dom;
var ml = d.childNodes[1], bl = d.childNodes[2];
bw.appendChild(ml);
@@ -17806,14 +17806,14 @@ Ext.Panel = Ext.extend(Ext.Container, {
if(!this.footer){
this.bwrap.dom.lastChild.className += ' x-panel-nofooter';
}
-
+
this.ft = Ext.get(this.bwrap.dom.lastChild);
this.mc = Ext.get(mc);
}else{
this.createElement('header', d);
this.createElement('bwrap', d);
-
+
bw = this.bwrap.dom;
this.createElement('tbar', bw);
this.createElement('body', bw);
@@ -17858,7 +17858,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
if(this.header){
this.header.unselectable();
-
+
if(this.headerAsText){
this.header.dom.innerHTML =
'';
@@ -17881,7 +17881,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.addTool.apply(this, ts);
}
-
+
if(this.fbar){
this.footer.addClass('x-panel-btns');
this.fbar.ownerCt = this;
@@ -17898,7 +17898,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
setIconClass : function(cls){
var old = this.iconCls;
this.iconCls = cls;
@@ -17924,7 +17924,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.fireEvent('iconchange', this, cls, old);
},
-
+
makeFloating : function(cfg){
this.floating = true;
this.el = new Ext.Layer(Ext.apply({}, cfg, {
@@ -17935,22 +17935,22 @@ Ext.Panel = Ext.extend(Ext.Container, {
}), this.el);
},
-
+
getTopToolbar : function(){
return this.topToolbar;
},
-
+
getBottomToolbar : function(){
return this.bottomToolbar;
},
-
+
getFooterToolbar : function() {
return this.fbar;
},
-
+
addButton : function(config, handler, scope){
if(!this.fbar){
this.createFbar([]);
@@ -17967,7 +17967,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return this.fbar.add(config);
},
-
+
addTool : function(){
if(!this.rendered){
if(!this.tools){
@@ -17978,12 +17978,12 @@ Ext.Panel = Ext.extend(Ext.Container, {
}, this);
return;
}
-
+
if(!this[this.toolTarget]){
return;
}
if(!this.toolTemplate){
-
+
var tt = new Ext.Template(
'
'
);
@@ -18049,7 +18049,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
onShow : function(){
if(this.floating){
return this.el.show();
@@ -18057,7 +18057,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
Ext.Panel.superclass.onShow.call(this);
},
-
+
onHide : function(){
if(this.floating){
return this.el.hide();
@@ -18065,7 +18065,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
Ext.Panel.superclass.onHide.call(this);
},
-
+
createToolHandler : function(t, tc, overCls, panel){
return function(e){
t.removeClass(overCls);
@@ -18078,7 +18078,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
};
},
-
+
afterRender : function(){
if(this.floating && !this.hidden){
this.el.show();
@@ -18086,7 +18086,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
if(this.title){
this.setTitle(this.title);
}
- Ext.Panel.superclass.afterRender.call(this);
+ Ext.Panel.superclass.afterRender.call(this);
if (this.collapsed) {
this.collapsed = false;
this.collapse(false);
@@ -18094,7 +18094,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.initEvents();
},
-
+
getKeyMap : function(){
if(!this.keyMap){
this.keyMap = new Ext.KeyMap(this.el, this.keys);
@@ -18102,7 +18102,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return this.keyMap;
},
-
+
initEvents : function(){
if(this.keys){
this.getKeyMap();
@@ -18124,13 +18124,13 @@ Ext.Panel = Ext.extend(Ext.Container, {
},
-
+
initDraggable : function(){
-
+
this.dd = new Ext.Panel.DD(this, Ext.isBoolean(this.draggable) ? null : this.draggable);
},
-
+
beforeEffect : function(anim){
if(this.floating){
this.el.beforeAction();
@@ -18140,13 +18140,13 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
afterEffect : function(anim){
this.syncShadow();
this.el.removeClass('x-panel-animated');
},
-
+
createEffect : function(a, cb, scope){
var o = {
scope:scope,
@@ -18157,7 +18157,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return o;
}else if(!a.callback){
o.callback = cb;
- }else {
+ }else {
o.callback = function(){
cb.call(scope);
Ext.callback(a.callback, a.scope);
@@ -18166,7 +18166,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return Ext.applyIf(o, a);
},
-
+
collapse : function(animate){
if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){
return;
@@ -18177,7 +18177,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return this;
},
-
+
onCollapse : function(doAnim, animArg){
if(doAnim){
this[this.collapseEl].slideOut(this.slideAnchor,
@@ -18189,7 +18189,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
afterCollapse : function(anim){
this.collapsed = true;
this.el.addClass(this.collapsedCls);
@@ -18198,7 +18198,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
this.afterEffect(anim);
-
+
this.cascade(function(c) {
if (c.lastSize) {
c.lastSize = { width: undefined, height: undefined };
@@ -18207,7 +18207,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.fireEvent('collapse', this);
},
-
+
expand : function(animate){
if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){
return;
@@ -18219,7 +18219,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return this;
},
-
+
onExpand : function(doAnim, animArg){
if(doAnim){
this[this.collapseEl].slideIn(this.slideAnchor,
@@ -18231,7 +18231,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
afterExpand : function(anim){
this.collapsed = false;
if(anim !== false){
@@ -18245,13 +18245,13 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.fireEvent('expand', this);
},
-
+
toggleCollapse : function(animate){
this[this.collapsed ? 'expand' : 'collapse'](animate);
return this;
},
-
+
onDisable : function(){
if(this.rendered && this.maskDisabled){
this.el.mask();
@@ -18259,7 +18259,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
Ext.Panel.superclass.onDisable.call(this);
},
-
+
onEnable : function(){
if(this.rendered && this.maskDisabled){
this.el.unmask();
@@ -18267,16 +18267,16 @@ Ext.Panel = Ext.extend(Ext.Container, {
Ext.Panel.superclass.onEnable.call(this);
},
-
+
onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
var w = adjWidth,
h = adjHeight;
if(Ext.isDefined(w) || Ext.isDefined(h)){
if(!this.collapsed){
-
-
-
+
+
+
if(Ext.isNumber(w)){
this.body.setWidth(w = this.adjustBodyWidth(w - this.getFrameWidth()));
@@ -18296,7 +18296,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.bbar.setWidth(w);
if(this.bottomToolbar){
this.bottomToolbar.setSize(w);
-
+
if (Ext.isIE9m) {
this.bbar.setStyle('position', 'static');
this.bbar.setStyle('position', '');
@@ -18310,10 +18310,10 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
}
-
+
if(Ext.isNumber(h)){
h = Math.max(0, h - this.getFrameHeight());
-
+
this.body.setHeight(h);
}else if(h == 'auto'){
this.body.setHeight(h);
@@ -18323,7 +18323,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight());
}
}else{
-
+
this.queuedBodySize = {width: w, height: h};
if(!this.queuedExpand && this.allowQueuedExpand !== false){
this.queuedExpand = true;
@@ -18340,12 +18340,12 @@ Ext.Panel = Ext.extend(Ext.Container, {
},
-
+
onBodyResize: function(w, h){
this.fireEvent('bodyresize', this, w, h);
},
-
+
getToolbarHeight: function(){
var h = 0;
if(this.rendered){
@@ -18356,22 +18356,22 @@ Ext.Panel = Ext.extend(Ext.Container, {
return h;
},
-
+
adjustBodyHeight : function(h){
return h;
},
-
+
adjustBodyWidth : function(w){
return w;
},
-
+
onPosition : function(){
this.syncShadow();
},
-
+
getFrameWidth : function(){
var w = this.el.getFrameWidth('lr') + this.bwrap.getFrameWidth('lr');
@@ -18383,7 +18383,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
return w;
},
-
+
getFrameHeight : function() {
var h = this.el.getFrameWidth('tb') + this.bwrap.getFrameWidth('tb');
h += (this.tbar ? this.tbar.getHeight() : 0) +
@@ -18398,35 +18398,35 @@ Ext.Panel = Ext.extend(Ext.Container, {
return h;
},
-
+
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(title, iconCls){
this.title = title;
if(this.header && this.headerAsText){
@@ -18439,19 +18439,19 @@ Ext.Panel = Ext.extend(Ext.Container, {
return this;
},
-
+
getUpdater : function(){
return this.body.getUpdater();
},
-
+
load : function(){
var um = this.body.getUpdater();
um.update.apply(um, arguments);
return this;
},
-
+
beforeDestroy : function(){
Ext.Panel.superclass.beforeDestroy.call(this);
if(this.header){
@@ -18495,7 +18495,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
Ext.destroy(this.toolbars);
},
-
+
createClasses : function(){
this.headerCls = this.baseCls + '-header';
this.headerTextCls = this.baseCls + '-header-text';
@@ -18506,7 +18506,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
this.footerCls = this.baseCls + '-footer';
},
-
+
createGhost : function(cls, useShim, appendTo){
var el = document.createElement('div');
el.className = 'x-panel-ghost ' + (cls ? cls : '');
@@ -18529,7 +18529,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
}
},
-
+
doAutoLoad : function(){
var u = this.body.getUpdater();
if(this.renderer){
@@ -18538,7 +18538,7 @@ Ext.Panel = Ext.extend(Ext.Container, {
u.update(Ext.isObject(this.autoLoad) ? this.autoLoad : {url: this.autoLoad});
},
-
+
getTool : function(id) {
return this.tools[id];
}
@@ -18550,7 +18550,7 @@ Ext.reg('panel', Ext.Panel);
Ext.Editor = function(field, config){
if(field.field){
this.field = Ext.create(field.field, 'textfield');
- config = Ext.apply({}, field);
+ config = Ext.apply({}, field);
delete config.field;
}else{
this.field = field;
@@ -18559,51 +18559,51 @@ Ext.Editor = function(field, config){
};
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(ct, position){
this.el = new Ext.Layer({
shadow: this.shadow,
@@ -18634,13 +18634,13 @@ Ext.extend(Ext.Editor, Ext.Component, {
this.field.getEl().dom.name = '';
if(this.swallowKeys){
this.field.el.swallowEvent([
- 'keypress',
- 'keydown'
+ 'keypress',
+ 'keydown'
]);
}
},
-
+
onSpecialKey : function(field, e){
var key = e.getKey(),
complete = this.completeOnEnter && key == e.ENTER,
@@ -18659,7 +18659,7 @@ Ext.extend(Ext.Editor, Ext.Component, {
this.fireEvent('specialkey', field, e);
},
-
+
startEdit : function(el, value){
if(this.editing){
this.completeEdit();
@@ -18679,7 +18679,7 @@ Ext.extend(Ext.Editor, Ext.Component, {
}
},
-
+
doAutoSize : function(){
if(this.autoSize){
var sz = this.boundEl.getSize(),
@@ -18701,21 +18701,21 @@ Ext.extend(Ext.Editor, Ext.Component, {
}
},
-
+
setSize : function(w, h){
delete this.field.lastSize;
this.field.setSize(w, h);
if(this.el){
-
+
if(Ext.isGecko2 || Ext.isOpera || (Ext.isIE7 && Ext.isStrict)){
-
+
this.el.setSize(w, h);
}
this.el.sync();
}
},
-
+
realign : function(autoSize){
if(autoSize === true){
this.doAutoSize();
@@ -18723,12 +18723,12 @@ Ext.extend(Ext.Editor, Ext.Component, {
this.el.alignTo(this.boundEl, this.alignment, this.offsets);
},
-
+
completeEdit : function(remainVisible){
if(!this.editing){
return;
}
-
+
if (this.field.assertValue) {
this.field.assertValue();
}
@@ -18753,7 +18753,7 @@ Ext.extend(Ext.Editor, Ext.Component, {
}
},
-
+
onShow : function(){
this.el.show();
if(this.hideEl !== false){
@@ -18763,7 +18763,7 @@ Ext.extend(Ext.Editor, Ext.Component, {
this.fireEvent("startedit", this.boundEl, this.startValue);
},
-
+
cancelEdit : function(remainVisible){
if(this.editing){
var v = this.getValue();
@@ -18773,7 +18773,7 @@ Ext.extend(Ext.Editor, Ext.Component, {
}
},
-
+
hideEdit: function(remainVisible){
if(remainVisible !== true){
this.editing = false;
@@ -18781,15 +18781,15 @@ Ext.extend(Ext.Editor, Ext.Component, {
}
},
-
+
onBlur : function(){
-
+
if(this.allowBlur === true && this.editing && this.selectSameEditor !== true){
this.completeEdit();
}
},
-
+
onHide : function(){
if(this.editing){
this.completeEdit();
@@ -18805,12 +18805,12 @@ Ext.extend(Ext.Editor, Ext.Component, {
}
},
-
+
setValue : function(v){
this.field.setValue(v);
},
-
+
getValue : function(){
return this.field.getValue();
},
@@ -18825,20 +18825,20 @@ Ext.extend(Ext.Editor, Ext.Component, {
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',
@@ -18847,23 +18847,23 @@ Ext.ColorPalette = Ext.extend(Ext.Component, {
'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(container, position){
this.autoEl = {
tag: 'div',
@@ -18880,7 +18880,7 @@ Ext.ColorPalette = Ext.extend(Ext.Component, {
}
},
-
+
afterRender : function(){
Ext.ColorPalette.superclass.afterRender.call(this);
if(this.value){
@@ -18890,7 +18890,7 @@ Ext.ColorPalette = Ext.extend(Ext.Component, {
}
},
-
+
handleClick : function(e, t){
e.preventDefault();
if(!this.disabled){
@@ -18899,7 +18899,7 @@ Ext.ColorPalette = Ext.extend(Ext.Component, {
}
},
-
+
select : function(color, suppressEvent){
color = color.replace('#', '');
if(color != this.value || this.allowReselect){
@@ -18915,59 +18915,59 @@ Ext.ColorPalette = Ext.extend(Ext.Component, {
}
}
-
+
});
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,
-
+
+ initHour: 12,
+
+
initComponent : function(){
Ext.DatePicker.superclass.initComponent.call(this);
@@ -18975,7 +18975,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
this.value.clearTime(true) : new Date().clearTime();
this.addEvents(
-
+
'select'
);
@@ -18986,7 +18986,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
this.initDisabledDays();
},
-
+
initDisabledDays : function(){
if(!this.disabledDatesRE && this.disabledDates){
var dd = this.disabledDates,
@@ -19003,7 +19003,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
setDisabledDates : function(dd){
if(Ext.isArray(dd)){
this.disabledDates = dd;
@@ -19015,41 +19015,41 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
this.update(this.value, true);
},
-
+
setDisabledDays : function(dd){
this.disabledDays = dd;
this.update(this.value, true);
},
-
+
setMinDate : function(dt){
this.minDate = dt;
this.update(this.value, true);
},
-
+
setMaxDate : function(dt){
this.maxDate = dt;
this.update(this.value, true);
},
-
+
setValue : function(value){
this.value = value.clearTime(true);
this.update(this.value);
},
-
+
getValue : function(){
return this.value;
},
-
+
focus : function(){
this.update(this.activeDate);
},
-
+
onEnable: function(initial){
Ext.DatePicker.superclass.onEnable.call(this);
this.doDisabled(false);
@@ -19060,19 +19060,19 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
},
-
+
onDisable : function(){
Ext.DatePicker.superclass.onDisable.call(this);
this.doDisabled(true);
if(Ext.isIE9m && !Ext.isIE8){
-
+
Ext.each([].concat(this.textNodes, this.el.query('th span')), function(el){
Ext.fly(el).repaint();
});
}
},
-
+
doDisabled : function(disabled){
this.keyNav.setDisabled(disabled);
this.prevRepeater.setDisabled(disabled);
@@ -19083,7 +19083,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onRender : function(container, position){
var m = [
'
',
@@ -19213,7 +19213,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
this.onEnable(true);
},
-
+
createMonthPicker : function(){
if(!this.monthPicker.dom.firstChild){
var buf = [''];
@@ -19253,7 +19253,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
showMonthPicker : function(){
if(!this.disabled){
this.createMonthPicker();
@@ -19270,7 +19270,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
updateMPYear : function(y){
this.mpyear = y;
var ys = this.mpYears.elements;
@@ -19289,19 +19289,19 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
updateMPMonth : function(sm){
this.mpMonths.each(function(m, a, i){
m[m.dom.xmonth == sm ? 'addClass' : 'removeClass']('x-date-mp-sel');
});
},
-
+
selectMPMonth : function(m){
},
-
+
onMonthClick : function(e, t){
e.stopEvent();
var el = new Ext.Element(t), pn;
@@ -19311,7 +19311,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
else if(el.is('button.x-date-mp-ok')){
var d = new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate());
if(d.getMonth() != this.mpSelMonth){
-
+
d = new Date(this.mpSelYear, this.mpSelMonth, 1).getLastDateOfMonth();
}
this.update(d);
@@ -19335,7 +19335,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onMonthDblClick : function(e, t){
e.stopEvent();
var el = new Ext.Element(t), pn;
@@ -19349,7 +19349,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
hideMonthPicker : function(disableAnim){
if(this.monthPicker){
if(disableAnim === true){
@@ -19360,27 +19360,27 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
showPrevMonth : function(e){
this.update(this.activeDate.add('mo', -1));
},
-
+
showNextMonth : function(e){
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(e){
e.stopEvent();
if(!this.disabled){
@@ -19393,7 +19393,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
handleDateClick : function(e, t){
e.stopEvent();
if(!this.disabled && t.dateValue && !Ext.fly(t.parentNode).hasClass('x-date-disabled')){
@@ -19404,7 +19404,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
selectToday : function(){
if(this.todayBtn && !this.todayBtn.disabled){
this.setValue(new Date().clearTime());
@@ -19412,7 +19412,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
update : function(date, forceRefresh){
if(this.rendered){
var vd = this.activeDate, vis = this.isVisible();
@@ -19446,7 +19446,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
prevStart = pm.getDaysInMonth()-startingPos,
cells = this.cells.elements,
textEls = this.textNodes,
-
+
d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart, this.initHour)),
today = new Date().clearTime().getTime(),
sel = date.clearTime(true).getTime(),
@@ -19484,7 +19484,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
Ext.fly(cell.firstChild).focus(50);
}
}
-
+
if(t < min) {
cell.className = ' x-date-disabled';
cell.title = cal.minText;
@@ -19540,9 +19540,9 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
this.el.setWidth(w + this.el.getBorderWidth('lr'));
Ext.fly(main).setWidth(w);
this.internalRender = true;
-
-
-
+
+
+
if(Ext.isOpera && !this.secondPass){
main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px';
this.secondPass = true;
@@ -19552,7 +19552,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
},
-
+
beforeDestroy : function() {
if(this.rendered){
Ext.destroy(
@@ -19570,7 +19570,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
}
}
-
+
});
Ext.reg('datepicker', Ext.DatePicker);
@@ -19588,7 +19588,7 @@ Ext.LoadMask = function(el, config){
this.removeMask = Ext.value(this.removeMask, false);
}else{
var um = this.el.getUpdater();
- um.showLoadIndicator = false;
+ um.showLoadIndicator = false;
um.on({
scope: this,
beforeupdate: this.onBeforeLoad,
@@ -19600,49 +19600,49 @@ Ext.LoadMask = function(el, config){
};
Ext.LoadMask.prototype = {
-
-
-
+
+
+
msg : 'Loading...',
-
+
msgCls : 'x-mask-loading',
-
+
disabled: false,
-
+
disable : function(){
this.disabled = true;
},
-
+
enable : function(){
this.disabled = false;
},
-
+
onLoad : function(){
this.el.unmask(this.removeMask);
},
-
+
onBeforeLoad : function(){
if(!this.disabled){
this.el.mask(this.msg, this.msgCls);
}
},
-
+
show: function(){
this.onBeforeLoad();
},
-
+
hide: function(){
this.onLoad();
},
-
+
destroy : function(){
if(this.store){
this.store.un('beforeload', this.onBeforeLoad, this);
@@ -19657,17 +19657,17 @@ Ext.LoadMask.prototype = {
}
};
Ext.slider.Thumb = Ext.extend(Object, {
-
-
+
+
dragging: false,
-
+
constructor: function(config) {
-
+
Ext.apply(this, config || {}, {
cls: 'x-slider-thumb',
-
+
constrain: false
});
@@ -19678,26 +19678,26 @@ Ext.slider.Thumb = Ext.extend(Object, {
}
},
-
+
render: function() {
this.el = this.slider.innerEl.insertFirst({cls: this.cls});
this.initEvents();
},
-
+
enable: function() {
this.disabled = false;
this.el.removeClass(this.slider.disabledClass);
},
-
+
disable: function() {
this.disabled = true;
this.el.addClass(this.slider.disabledClass);
},
-
+
initEvents: function() {
var el = this.el;
@@ -19715,7 +19715,7 @@ Ext.slider.Thumb = Ext.extend(Object, {
this.tracker.initEl(el);
},
-
+
onBeforeDragStart : function(e) {
if (this.disabled) {
return false;
@@ -19725,7 +19725,7 @@ Ext.slider.Thumb = Ext.extend(Object, {
}
},
-
+
onDragStart: function(e){
this.el.addClass('x-slider-thumb-drag');
this.dragging = true;
@@ -19734,7 +19734,7 @@ Ext.slider.Thumb = Ext.extend(Object, {
this.slider.fireEvent('dragstart', this.slider, e, this);
},
-
+
onDrag: function(e) {
var slider = this.slider,
index = this.index,
@@ -19759,7 +19759,7 @@ Ext.slider.Thumb = Ext.extend(Object, {
return Ext.util.Format.round(slider.reverseValue(pos.left), slider.decimalPrecision);
},
-
+
onDragEnd: function(e) {
var slider = this.slider,
value = this.value;
@@ -19773,8 +19773,8 @@ Ext.slider.Thumb = Ext.extend(Object, {
slider.fireEvent('changecomplete', slider, value, this);
}
},
-
-
+
+
destroy: function(){
Ext.destroyMembers(this, 'tracker', 'el');
}
@@ -19782,66 +19782,66 @@ Ext.slider.Thumb = Ext.extend(Object, {
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 values = this.values;
@@ -19855,7 +19855,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
addThumb: function(value) {
var thumb = new Ext.slider.Thumb({
value : value,
@@ -19865,11 +19865,11 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
});
this.thumbs.push(thumb);
-
+
if (this.rendered) thumb.render();
},
-
+
promoteThumb: function(topThumb) {
var thumbs = this.thumbs,
zIndex, thumb;
@@ -19887,7 +19887,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onRender : function() {
this.autoEl = {
cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'),
@@ -19906,19 +19906,19 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
this.innerEl = this.endEl.first();
this.focusEl = this.innerEl.child('.x-slider-focus');
-
+
for (var i=0; i < this.thumbs.length; i++) {
this.thumbs[i].render();
}
-
+
var thumb = this.innerEl.child('.x-slider-thumb');
this.halfThumb = (this.vertical ? thumb.getHeight() : thumb.getWidth()) / 2;
this.initEvents();
},
-
+
initEvents : function(){
this.mon(this.el, {
scope : this,
@@ -19929,13 +19929,13 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
this.focusEl.swallowEvent("click", true);
},
-
+
onMouseDown : function(e){
if(this.disabled){
return;
}
-
+
var thumbClicked = false;
for (var i=0; i < this.thumbs.length; i++) {
thumbClicked = thumbClicked || e.target == this.thumbs[i].el.dom;
@@ -19948,10 +19948,10 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
this.focus();
},
-
+
onClickChange : function(local) {
if (local.top > this.clickRange[0] && local.top < this.clickRange[1]) {
-
+
var thumb = this.getNearest(local, 'left'),
index = thumb.index;
@@ -19959,11 +19959,11 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
getNearest: function(local, prop) {
var localValue = prop == 'top' ? this.innerEl.getHeight() - local[prop] : local[prop],
clickValue = this.reverseValue(localValue),
- nearestDistance = (this.maxValue - this.minValue) + 5,
+ nearestDistance = (this.maxValue - this.minValue) + 5,
index = 0,
nearest = null;
@@ -19981,9 +19981,9 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
return nearest;
},
-
+
onKeyDown : function(e){
-
+
if(this.disabled || this.thumbs.length !== 1){
e.preventDefault();
return;
@@ -20008,7 +20008,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
doSnap : function(value){
if (!(this.increment && value)) {
return value;
@@ -20027,7 +20027,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
return newValue.constrain(this.minValue, this.maxValue);
},
-
+
afterRender : function(){
Ext.slider.MultiSlider.superclass.afterRender.apply(this, arguments);
@@ -20038,7 +20038,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
var v = this.normalizeValue(thumb.value);
if (v !== thumb.value) {
-
+
this.setValue(i, v, false);
} else {
this.moveThumb(i, this.translateValue(v), false);
@@ -20047,14 +20047,14 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
};
},
-
+
getRatio : function(){
var w = this.innerEl.getWidth(),
v = this.maxValue - this.minValue;
return v == 0 ? w : (w/v);
},
-
+
normalizeValue : function(v){
v = this.doSnap(v);
v = Ext.util.Format.round(v, this.decimalPrecision);
@@ -20062,14 +20062,14 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
return v;
},
-
+
setMinValue : function(val){
this.minValue = val;
var i = 0,
thumbs = this.thumbs,
len = thumbs.length,
t;
-
+
for(; i < len; ++i){
t = thumbs[i];
t.value = t.value < val ? val : t.value;
@@ -20077,14 +20077,14 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
this.syncThumb();
},
-
+
setMaxValue : function(val){
this.maxValue = val;
var i = 0,
thumbs = this.thumbs,
len = thumbs.length,
t;
-
+
for(; i < len; ++i){
t = thumbs[i];
t.value = t.value > val ? val : t.value;
@@ -20092,7 +20092,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
this.syncThumb();
},
-
+
setValue : function(index, v, animate, changeComplete) {
var thumb = this.thumbs[index],
el = thumb.el;
@@ -20111,19 +20111,19 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
translateValue : function(v) {
var ratio = this.getRatio();
return (v * ratio) - (this.minValue * ratio) - this.halfThumb;
},
-
+
reverseValue : function(pos){
var ratio = this.getRatio();
return (pos + (this.minValue * ratio)) / ratio;
},
-
+
moveThumb: function(index, v, animate){
var thumb = this.thumbs[index].el;
@@ -20134,22 +20134,22 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
focus : function(){
this.focusEl.focus(10);
},
-
+
onResize : function(w, h){
var thumbs = this.thumbs,
len = thumbs.length,
i = 0;
-
-
+
+
for(; i < len; ++i){
- thumbs[i].el.stopFx();
+ thumbs[i].el.stopFx();
}
-
+
if(Ext.isNumber(w)){
this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r')));
}
@@ -20157,7 +20157,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
Ext.slider.MultiSlider.superclass.onResize.apply(this, arguments);
},
-
+
onDisable: function(){
Ext.slider.MultiSlider.superclass.onDisable.call(this);
@@ -20168,8 +20168,8 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
thumb.disable();
if(Ext.isIE){
-
-
+
+
var xy = el.getXY();
el.hide();
@@ -20184,7 +20184,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onEnable: function(){
Ext.slider.MultiSlider.superclass.onEnable.call(this);
@@ -20205,7 +20205,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
syncThumb : function() {
if (this.rendered) {
for (var i=0; i < this.thumbs.length; i++) {
@@ -20214,12 +20214,12 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
}
},
-
+
getValue : function(index) {
return this.thumbs[index].value;
},
-
+
getValues: function() {
var values = [];
@@ -20230,7 +20230,7 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, {
return values;
},
-
+
beforeDestroy : function(){
var thumbs = this.thumbs;
for(var i = 0, len = thumbs.length; i < len; ++i){
@@ -20256,20 +20256,20 @@ Ext.slider.SingleSlider = Ext.extend(Ext.slider.MultiSlider, {
Ext.slider.SingleSlider.superclass.constructor.call(this, config);
},
-
+
getValue: function() {
-
+
return Ext.slider.SingleSlider.superclass.getValue.call(this, 0);
},
-
+
setValue: function(value, animate) {
var args = Ext.toArray(arguments),
len = args.length;
-
-
-
+
+
+
if (len == 1 || (len <= 3 && typeof arguments[1] != 'number')) {
args.unshift(0);
}
@@ -20277,15 +20277,15 @@ Ext.slider.SingleSlider = Ext.extend(Ext.slider.MultiSlider, {
return Ext.slider.SingleSlider.superclass.setValue.apply(this, args);
},
-
+
syncThumb : function() {
return Ext.slider.SingleSlider.superclass.syncThumb.apply(this, [0].concat(arguments));
},
-
-
+
+
getNearest : function(){
-
- return this.thumbs[0];
+
+ return this.thumbs[0];
}
});
@@ -20342,25 +20342,25 @@ Ext.slider.Thumb.Vertical = {
};
Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
-
+
baseCls : 'x-progress',
-
-
+
+
animate : false,
-
+
waitTimer : null,
-
+
initComponent : function(){
Ext.ProgressBar.superclass.initComponent.call(this);
this.addEvents(
-
+
"update"
);
},
-
+
onRender : function(ct, position){
var tpl = new Ext.Template(
'',
@@ -20379,7 +20379,7 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
this.el = position ? tpl.insertBefore(position, {cls: this.baseCls}, true)
: tpl.append(ct, {cls: this.baseCls}, true);
-
+
if(this.id){
this.el.dom.id = this.id;
}
@@ -20387,11 +20387,11 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
this.progressBar = Ext.get(inner.firstChild);
if(this.textEl){
-
+
this.textEl = Ext.get(this.textEl);
delete this.textTopEl;
}else{
-
+
this.textTopEl = Ext.get(this.progressBar.dom.firstChild);
var textBackEl = Ext.get(inner.childNodes[1]);
this.textTopEl.setStyle("z-index", 99).addClass('x-hidden');
@@ -20400,8 +20400,8 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
}
this.progressBar.setHeight(inner.offsetHeight);
},
-
-
+
+
afterRender : function(){
Ext.ProgressBar.superclass.afterRender.call(this);
if(this.value){
@@ -20411,7 +20411,7 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
}
},
-
+
updateProgress : function(value, text, animate){
this.value = value || 0;
if(text){
@@ -20421,7 +20421,7 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
var w = Math.floor(value*this.el.dom.firstChild.offsetWidth);
this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate));
if(this.textTopEl){
-
+
this.textTopEl.removeClass('x-hidden').setWidth(w);
}
}
@@ -20429,7 +20429,7 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
wait : function(o){
if(!this.waitTimer){
var scope = this;
@@ -20455,12 +20455,12 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
isWaiting : function(){
return this.waitTimer !== null;
},
-
+
updateText : function(text){
this.text = text || ' ';
if(this.rendered){
@@ -20468,8 +20468,8 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
}
return this;
},
-
-
+
+
syncProgressBar : function(){
if(this.value){
this.updateProgress(this.value, this.text);
@@ -20477,7 +20477,7 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
setSize : function(w, h){
Ext.ProgressBar.superclass.setSize.call(this, w, h);
if(this.textTopEl){
@@ -20488,7 +20488,7 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
reset : function(hide){
this.updateProgress(0);
if(this.textTopEl){
@@ -20500,16 +20500,16 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, {
}
return this;
},
-
-
+
+
clearTimer : function(){
if(this.waitTimer){
- this.waitTimer.onStop = null;
+ this.waitTimer.onStop = null;
Ext.TaskMgr.stop(this.waitTimer);
this.waitTimer = null;
}
},
-
+
onDestroy: function(){
this.clearTimer();
if(this.rendered){
@@ -20537,161 +20537,161 @@ Ext.dd.DragDrop = function(id, sGroup, config) {
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(x, y) { },
-
+
startDrag: function(x, y) { },
-
+
b4Drag: function(e) { },
-
+
onDrag: function(e) { },
-
+
onDragEnter: function(e, id) { },
-
+
b4DragOver: function(e) { },
-
+
onDragOver: function(e, id) { },
-
+
b4DragOut: function(e) { },
-
+
onDragOut: function(e, id) { },
-
+
b4DragDrop: function(e) { },
-
+
onDragDrop: function(e, id) { },
-
+
onInvalidDrop: function(e) { },
-
+
b4EndDrag: function(e) { },
-
+
endDrag: function(e) { },
-
+
b4MouseDown: function(e) { },
-
+
onMouseDown: function(e) { },
-
+
onMouseUp: function(e) { },
-
+
onAvailable: function () {
},
-
+
defaultPadding : {left:0, right:0, top:0, bottom:0},
-
+
constrainTo : function(constrainTo, pad, inContent){
if(Ext.isNumber(pad)){
pad = {left: pad, right:pad, top:pad, bottom:pad};
@@ -20700,7 +20700,7 @@ Ext.dd.DragDrop.prototype = {
var b = Ext.get(this.getEl()).getBox(),
ce = Ext.get(constrainTo),
s = ce.getScroll(),
- c,
+ c,
cd = ce.dom;
if(cd == document.body){
c = { x: s.left, y: s.top, width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()};
@@ -20714,17 +20714,17 @@ Ext.dd.DragDrop.prototype = {
leftSpace = b.x - c.x;
this.resetConstraints();
- this.setXConstraint(leftSpace - (pad.left||0),
- c.width - leftSpace - b.width - (pad.right||0),
+ this.setXConstraint(leftSpace - (pad.left||0),
+ c.width - leftSpace - b.width - (pad.right||0),
this.xTickSize
);
- this.setYConstraint(topSpace - (pad.top||0),
- c.height - topSpace - b.height - (pad.bottom||0),
+ this.setYConstraint(topSpace - (pad.top||0),
+ c.height - topSpace - b.height - (pad.bottom||0),
this.yTickSize
);
},
-
+
getEl: function() {
if (!this._domRef) {
this._domRef = Ext.getDom(this.id);
@@ -20733,49 +20733,49 @@ Ext.dd.DragDrop.prototype = {
return this._domRef;
},
-
+
getDragEl: function() {
return Ext.getDom(this.dragElId);
},
-
+
init: function(id, sGroup, config) {
this.initTarget(id, sGroup, config);
Event.on(this.id, "mousedown", this.handleMouseDown, this);
-
+
},
-
+
initTarget: function(id, sGroup, config) {
-
+
this.config = config || {};
-
+
this.DDM = Ext.dd.DDM;
-
+
this.groups = {};
-
-
+
+
if (typeof id !== "string") {
id = Ext.id(id);
}
-
+
this.id = id;
-
+
this.addToGroup((sGroup) ? sGroup : "default");
-
-
+
+
this.handleElId = id;
-
+
this.setDragElId(id);
-
+
this.invalidHandleTypes = { A: "A" };
this.invalidHandleIds = {};
this.invalidHandleClasses = [];
@@ -20785,11 +20785,11 @@ Ext.dd.DragDrop.prototype = {
this.handleOnAvailable();
},
-
+
applyConfig: function() {
-
-
+
+
this.padding = this.config.padding || [0, 0, 0, 0];
this.isTarget = (this.config.isTarget !== false);
this.maintainOffset = (this.config.maintainOffset);
@@ -20797,16 +20797,16 @@ Ext.dd.DragDrop.prototype = {
},
-
+
handleOnAvailable: function() {
this.available = true;
this.resetConstraints();
this.onAvailable();
},
-
+
setPadding: function(iTop, iRight, iBot, iLeft) {
-
+
if (!iRight && 0 !== iRight) {
this.padding = [iTop, iTop, iTop, iTop];
} else if (!iBot && 0 !== iBot) {
@@ -20816,7 +20816,7 @@ Ext.dd.DragDrop.prototype = {
}
},
-
+
setInitPosition: function(diffX, diffY) {
var el = this.getEl();
@@ -20838,7 +20838,7 @@ Ext.dd.DragDrop.prototype = {
this.setStartPosition(p);
},
-
+
setStartPosition: function(pos) {
var p = pos || Dom.getXY( this.getEl() );
this.deltaSetXY = null;
@@ -20847,13 +20847,13 @@ Ext.dd.DragDrop.prototype = {
this.startPageY = p[1];
},
-
+
addToGroup: function(sGroup) {
this.groups[sGroup] = true;
this.DDM.regDragDrop(this, sGroup);
},
-
+
removeFromGroup: function(sGroup) {
if (this.groups[sGroup]) {
delete this.groups[sGroup];
@@ -20862,12 +20862,12 @@ Ext.dd.DragDrop.prototype = {
this.DDM.removeDDFromGroup(this, sGroup);
},
-
+
setDragElId: function(id) {
this.dragElId = id;
},
-
+
setHandleElId: function(id) {
if (typeof id !== "string") {
id = Ext.id(id);
@@ -20876,7 +20876,7 @@ Ext.dd.DragDrop.prototype = {
this.DDM.regHandle(this.id, id);
},
-
+
setOuterHandleElId: function(id) {
if (typeof id !== "string") {
id = Ext.id(id);
@@ -20888,7 +20888,7 @@ Ext.dd.DragDrop.prototype = {
this.hasOuterHandles = true;
},
-
+
unreg: function() {
Event.un(this.id, "mousedown",
this.handleMouseDown);
@@ -20900,12 +20900,12 @@ Ext.dd.DragDrop.prototype = {
this.unreg();
},
-
+
isLocked: function() {
return (this.DDM.isLocked() || this.locked);
},
-
+
handleMouseDown: function(e, oDD){
if (this.primaryButtonOnly && e.button != 0) {
return;
@@ -20922,7 +20922,7 @@ Ext.dd.DragDrop.prototype = {
} else {
if (this.clickValidator(e)) {
-
+
this.setStartPosition();
this.b4MouseDown(e);
@@ -20954,13 +20954,13 @@ Ext.dd.DragDrop.prototype = {
this.DDM.handleWasClicked(target, this.id)) );
},
-
+
addInvalidHandleType: function(tagName) {
var type = tagName.toUpperCase();
this.invalidHandleTypes[type] = type;
},
-
+
addInvalidHandleId: function(id) {
if (typeof id !== "string") {
id = Ext.id(id);
@@ -20968,19 +20968,19 @@ Ext.dd.DragDrop.prototype = {
this.invalidHandleIds[id] = id;
},
-
+
addInvalidHandleClass: function(cssClass) {
this.invalidHandleClasses.push(cssClass);
},
-
+
removeInvalidHandleType: function(tagName) {
var type = tagName.toUpperCase();
-
+
delete this.invalidHandleTypes[type];
},
-
+
removeInvalidHandleId: function(id) {
if (typeof id !== "string") {
id = Ext.id(id);
@@ -20988,7 +20988,7 @@ Ext.dd.DragDrop.prototype = {
delete this.invalidHandleIds[id];
},
-
+
removeInvalidHandleClass: function(cssClass) {
for (var i=0, len=this.invalidHandleClasses.length; i
= val) {
-
-
+
+
return tickArray[0];
} else {
for (var i=0, len=tickArray.length; i clientH && toBot < thresh ) {
window.scrollTo(sl, st + scrAmt);
}
-
-
+
+
if ( y < st && st > 0 && y - st < thresh ) {
window.scrollTo(sl, st - scrAmt);
}
-
-
+
+
if ( right > clientW && toRight < thresh ) {
window.scrollTo(sl + scrAmt, st);
}
-
-
+
+
if ( x < sl && sl > 0 && x - sl < thresh ) {
window.scrollTo(sl - scrAmt, st);
}
}
},
-
+
getTargetCoord: function(iPageX, iPageY) {
var x = iPageX - this.deltaX;
var y = iPageY - this.deltaY;
@@ -22192,20 +22192,20 @@ Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, {
return {x:x, y:y};
},
-
+
applyConfig: function() {
Ext.dd.DD.superclass.applyConfig.call(this);
this.scroll = (this.config.scroll !== false);
},
-
+
b4MouseDown: function(e) {
-
+
this.autoOffset(e.getPageX(),
e.getPageY());
},
-
+
b4Drag: function(e) {
this.setDragElPos(e.getPageX(),
e.getPageY());
@@ -22215,10 +22215,10 @@ Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, {
return ("DD " + this.id);
}
-
-
-
-
+
+
+
+
});
@@ -22234,13 +22234,13 @@ Ext.dd.DDProxy.dragElId = "ygddfdiv";
Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
-
+
resizeFrame: true,
-
+
centerFrame: false,
-
+
createFrame: function() {
var self = this;
var body = document.body;
@@ -22263,14 +22263,14 @@ Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
s.border = "2px solid #aaa";
s.zIndex = 999;
-
-
-
+
+
+
body.insertBefore(div, body.firstChild);
}
},
-
+
initFrame: function() {
this.createFrame();
},
@@ -22283,7 +22283,7 @@ Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
this.setDragElId(this.config.dragElId || Ext.dd.DDProxy.dragElId);
},
-
+
showFrame: function(iPageX, iPageY) {
var el = this.getEl();
var dragEl = this.getDragEl();
@@ -22301,7 +22301,7 @@ Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
Ext.fly(dragEl).show();
},
-
+
_resizeProxy: function() {
if (this.resizeFrame) {
var el = this.getEl();
@@ -22309,7 +22309,7 @@ Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
}
},
-
+
b4MouseDown: function(e) {
var x = e.getPageX();
var y = e.getPageY();
@@ -22317,31 +22317,31 @@ Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, {
this.setDragElPos(x, y);
},
-
+
b4StartDrag: function(x, y) {
-
+
this.showFrame(x, y);
},
-
+
b4EndDrag: function(e) {
Ext.fly(this.getDragEl()).hide();
},
-
-
-
+
+
+
endDrag: function(e) {
var lel = this.getEl();
var del = this.getDragEl();
-
+
del.style.visibility = "";
this.beforeMove();
-
-
+
+
lel.style.visibility = "hidden";
Ext.dd.DDM.moveToEl(lel, del);
del.style.visibility = "hidden";
@@ -22372,92 +22372,92 @@ Ext.dd.DDTarget = function(id, sGroup, config) {
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, {
-
+Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, {
+
active: false,
-
+
tolerance: 5,
-
+
autoStart: false,
-
+
constructor : function(config){
Ext.apply(this, config);
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);
}
@@ -22495,7 +22495,7 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, {
},
onMouseMove: function(e, target){
-
+
var ieCheck = Ext.isIE6 || Ext.isIE7 || Ext.isIE8;
if(this.active && ieCheck && !e.browserEvent.button){
e.preventDefault();
@@ -22521,7 +22521,7 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, {
onMouseUp: function(e) {
var doc = Ext.getDoc(),
wasActive = this.active;
-
+
doc.un('mousemove', this.onMouseMove, this);
doc.un('mouseup', this.onMouseUp, this);
doc.un('selectstart', this.stopSelect, this);
@@ -22554,28 +22554,28 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, {
e.stopEvent();
return false;
},
-
-
+
+
onBeforeStart : function(e) {
},
-
+
onStart : function(xy) {
},
-
+
onDrag : function(e) {
},
-
+
onEnd : function(e) {
},
-
+
getDragTarget : function(){
return this.dragTarget;
},
@@ -22620,18 +22620,18 @@ Ext.dd.ScrollManager = function(){
var els = {};
var dragEl = null;
var proc = {};
-
+
var onStop = function(e){
dragEl = null;
clearProc();
};
-
+
var triggerRefresh = function(){
if(ddm.dragCurrent){
ddm.refreshCache(ddm.dragCurrent.groups);
}
};
-
+
var doScroll = function(){
if(ddm.dragCurrent){
var dds = Ext.dd.ScrollManager;
@@ -22646,7 +22646,7 @@ Ext.dd.ScrollManager = function(){
}
}
};
-
+
var clearProc = function(){
if(proc.id){
clearInterval(proc.id);
@@ -22669,16 +22669,16 @@ Ext.dd.ScrollManager = function(){
proc.id = setInterval(doScroll, freq);
}
};
-
+
var onFire = function(e, isDrop){
if(isDrop || !ddm.dragCurrent){ return; }
var dds = Ext.dd.ScrollManager;
if(!dragEl || dragEl != ddm.dragCurrent){
dragEl = ddm.dragCurrent;
-
+
dds.refreshCache();
}
-
+
var xy = Ext.lib.Event.getXY(e);
var pt = new Ext.lib.Point(xy[0], xy[1]);
for(var id in els){
@@ -22710,12 +22710,12 @@ Ext.dd.ScrollManager = function(){
}
clearProc();
};
-
+
ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm);
ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm);
-
+
return {
-
+
register : function(el){
if(Ext.isArray(el)){
for(var i = 0, len = el.length; i < len; i++) {
@@ -22726,8 +22726,8 @@ Ext.dd.ScrollManager = function(){
els[el.id] = el;
}
},
-
-
+
+
unregister : function(el){
if(Ext.isArray(el)){
for(var i = 0, len = el.length; i < len; i++) {
@@ -22738,31 +22738,31 @@ Ext.dd.ScrollManager = function(){
delete els[el.id];
}
},
-
-
+
+
vthresh : 25,
-
+
hthresh : 25,
-
+
increment : 100,
-
-
+
+
frequency : 500,
-
-
+
+
animate: true,
-
-
+
+
animDuration: .4,
-
-
+
+
ddGroup: undefined,
-
-
+
+
refreshCache : function(){
for(var id in els){
- if(typeof els[id] == 'object'){
+ if(typeof els[id] == 'object'){
els[id]._region = els[id].getRegion();
}
}
@@ -22770,8 +22770,8 @@ Ext.dd.ScrollManager = function(){
};
}();
Ext.dd.Registry = function(){
- var elements = {};
- var handles = {};
+ var elements = {};
+ var handles = {};
var autoIdSeed = 0;
var getId = function(el, autogen){
@@ -22785,9 +22785,9 @@ Ext.dd.Registry = function(){
}
return id;
};
-
+
return {
-
+
register : function(el, data){
data = data || {};
if(typeof el == "string"){
@@ -22806,7 +22806,7 @@ Ext.dd.Registry = function(){
}
},
-
+
unregister : function(el){
var id = getId(el, false);
var data = elements[id];
@@ -22821,29 +22821,29 @@ Ext.dd.Registry = function(){
}
},
-
+
getHandle : function(id){
- if(typeof id != "string"){
+ if(typeof id != "string"){
id = id.id;
}
return handles[id];
},
-
+
getHandleFromEvent : function(e){
var t = Ext.lib.Event.getTarget(e);
return t ? handles[t.id] : null;
},
-
+
getTarget : function(id){
- if(typeof id != "string"){
+ if(typeof id != "string"){
id = id.id;
}
return elements[id];
},
-
+
getTargetFromEvent : function(e){
var t = Ext.lib.Event.getTarget(e);
return t ? elements[t.id] || handles[t.id] : null;
@@ -22859,7 +22859,7 @@ Ext.dd.StatusProxy = function(config){
{tag: "div", cls: "x-dd-drop-icon"},
{tag: "div", cls: "x-dd-drag-ghost"}
]
- },
+ },
shadow: !config || config.shadow !== false
});
this.ghost = Ext.get(this.el.dom.childNodes[1]);
@@ -22867,12 +22867,12 @@ Ext.dd.StatusProxy = function(config){
};
Ext.dd.StatusProxy.prototype = {
-
+
dropAllowed : "x-dd-drop-ok",
-
+
dropNotAllowed : "x-dd-drop-nodrop",
-
+
setStatus : function(cssClass){
cssClass = cssClass || this.dropNotAllowed;
if(this.dropStatus != cssClass){
@@ -22881,7 +22881,7 @@ Ext.dd.StatusProxy.prototype = {
}
},
-
+
reset : function(clearGhost){
this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed;
this.dropStatus = this.dropNotAllowed;
@@ -22890,7 +22890,7 @@ Ext.dd.StatusProxy.prototype = {
}
},
-
+
update : function(html){
if(typeof html == "string"){
this.ghost.update(html);
@@ -22899,23 +22899,23 @@ Ext.dd.StatusProxy.prototype = {
html.style.margin = "0";
this.ghost.dom.appendChild(html);
}
- var el = this.ghost.dom.firstChild;
+ var el = this.ghost.dom.firstChild;
if(el){
Ext.fly(el).setStyle('float', 'none');
}
},
-
+
getEl : function(){
return this.el;
},
-
+
getGhost : function(){
return this.ghost;
},
-
+
hide : function(clear){
this.el.hide();
if(clear){
@@ -22923,24 +22923,24 @@ Ext.dd.StatusProxy.prototype = {
}
},
-
+
stop : function(){
if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){
this.anim.stop();
}
},
-
+
show : function(){
this.el.show();
},
-
+
sync : function(){
this.el.sync();
},
-
+
repair : function(xy, callback, scope){
this.callback = callback;
this.scope = scope;
@@ -22960,7 +22960,7 @@ Ext.dd.StatusProxy.prototype = {
}
},
-
+
afterRepair : function(){
this.hide(true);
if(typeof this.callback == "function"){
@@ -22969,9 +22969,9 @@ Ext.dd.StatusProxy.prototype = {
this.callback = null;
this.scope = null;
},
-
+
destroy: function(){
- Ext.destroy(this.ghost, this.el);
+ Ext.destroy(this.ghost, this.el);
}
};
Ext.dd.DragSource = function(el, config){
@@ -22979,31 +22979,31 @@ Ext.dd.DragSource = function(el, config){
if(!this.dragData){
this.dragData = {};
}
-
+
Ext.apply(this, config);
-
+
if(!this.proxy){
this.proxy = new Ext.dd.StatusProxy();
}
- Ext.dd.DragSource.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group,
+ Ext.dd.DragSource.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group,
{dragElId : this.proxy.id, resizeFrame: false, isTarget: false, scroll: this.scroll === true});
-
+
this.dragging = false;
};
Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
-
-
+
+
dropAllowed : "x-dd-drop-ok",
-
+
dropNotAllowed : "x-dd-drop-nodrop",
-
+
getDragData : function(e){
return this.dragData;
},
-
+
onDragEnter : function(e, id){
var target = Ext.dd.DragDropMgr.getDDById(id);
this.cachedTarget = target;
@@ -23014,26 +23014,26 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
}else{
this.proxy.setStatus(this.dropAllowed);
}
-
+
if(this.afterDragEnter){
-
+
this.afterDragEnter(target, e, id);
}
}
},
-
+
beforeDragEnter : function(target, e, id){
return true;
},
-
+
alignElWithMouse: function() {
Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments);
this.proxy.sync();
},
-
+
onDragOver : function(e, id){
var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
if(this.beforeDragOver(target, e, id) !== false){
@@ -23043,18 +23043,18 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
}
if(this.afterDragOver){
-
+
this.afterDragOver(target, e, id);
}
}
},
-
+
beforeDragOver : function(target, e, id){
return true;
},
-
+
onDragOut : function(e, id){
var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
if(this.beforeDragOut(target, e, id) !== false){
@@ -23063,24 +23063,24 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
}
this.proxy.reset();
if(this.afterDragOut){
-
+
this.afterDragOut(target, e, id);
}
}
this.cachedTarget = null;
},
-
+
beforeDragOut : function(target, e, id){
return true;
},
-
-
+
+
onDragDrop : function(e, id){
var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id);
if(this.beforeDragDrop(target, e, id) !== false){
if(target.isNotifyTarget){
- if(target.notifyDrop(this, e, this.dragData)){
+ if(target.notifyDrop(this, e, this.dragData)){
this.onValidDrop(target, e, id);
}else{
this.onInvalidDrop(target, e, id);
@@ -23088,35 +23088,35 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
}else{
this.onValidDrop(target, e, id);
}
-
+
if(this.afterDragDrop){
-
+
this.afterDragDrop(target, e, id);
}
}
delete this.cachedTarget;
},
-
+
beforeDragDrop : function(target, e, id){
return true;
},
-
+
onValidDrop : function(target, e, id){
this.hideProxy();
if(this.afterValidDrop){
-
+
this.afterValidDrop(target, e, id);
}
},
-
+
getRepairXY : function(e, data){
- return this.el.getXY();
+ return this.el.getXY();
},
-
+
onInvalidDrop : function(target, e, id){
this.beforeInvalidDrop(target, e, id);
if(this.cachedTarget){
@@ -23128,12 +23128,12 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this);
if(this.afterInvalidDrop){
-
+
this.afterInvalidDrop(e, id);
}
},
-
+
afterRepair : function(){
if(Ext.enableFx){
this.el.highlight(this.hlColor || "c3daf9");
@@ -23141,12 +23141,12 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
this.dragging = false;
},
-
+
beforeInvalidDrop : function(target, e, id){
return true;
},
-
+
handleMouseDown : function(e){
if(this.dragging) {
return;
@@ -23156,18 +23156,18 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
this.dragData = data;
this.proxy.stop();
Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments);
- }
+ }
},
-
+
onBeforeDrag : function(data, e){
return true;
},
-
+
onStartDrag : Ext.emptyFn,
-
+
startDrag : function(x, y){
this.proxy.reset();
this.dragging = true;
@@ -23176,84 +23176,84 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, {
this.proxy.show();
},
-
+
onInitDrag : function(x, y){
var clone = this.el.dom.cloneNode(true);
- clone.id = Ext.id();
+ clone.id = Ext.id();
this.proxy.update(clone);
this.onStartDrag(x, y);
return true;
},
-
+
getProxy : function(){
- return this.proxy;
+ return this.proxy;
},
-
+
hideProxy : function(){
- this.proxy.hide();
+ this.proxy.hide();
this.proxy.reset(true);
this.dragging = false;
},
-
+
triggerCacheRefresh : function(){
Ext.dd.DDM.refreshCache(this.groups);
},
-
+
b4EndDrag: function(e) {
},
-
+
endDrag : function(e){
this.onEndDrag(this.dragData, e);
},
-
+
onEndDrag : function(data, e){
},
-
-
+
+
autoOffset : function(x, y) {
this.setDelta(-12, -20);
},
-
+
destroy: function(){
Ext.dd.DragSource.superclass.destroy.call(this);
Ext.destroy(this.proxy);
}
});
Ext.dd.DropTarget = Ext.extend(Ext.dd.DDTarget, {
-
+
constructor : function(el, config){
this.el = Ext.get(el);
-
+
Ext.apply(this, config);
-
+
if(this.containerScroll){
Ext.dd.ScrollManager.register(this.el);
}
-
- Ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group,
- {isTarget: true});
+
+ Ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group,
+ {isTarget: true});
},
-
-
-
-
+
+
+
+
dropAllowed : "x-dd-drop-ok",
-
+
dropNotAllowed : "x-dd-drop-nodrop",
-
+
isTarget : true,
-
+
isNotifyTarget : true,
-
+
notifyEnter : function(dd, e, data){
if(this.overClass){
this.el.addClass(this.overClass);
@@ -23261,23 +23261,23 @@ Ext.dd.DropTarget = Ext.extend(Ext.dd.DDTarget, {
return this.dropAllowed;
},
-
+
notifyOver : function(dd, e, data){
return this.dropAllowed;
},
-
+
notifyOut : function(dd, e, data){
if(this.overClass){
this.el.removeClass(this.overClass);
}
},
-
+
notifyDrop : function(dd, e, data){
return false;
},
-
+
destroy : function(){
Ext.dd.DropTarget.superclass.destroy.call(this);
if(this.containerScroll){
@@ -23286,31 +23286,31 @@ Ext.dd.DropTarget = Ext.extend(Ext.dd.DDTarget, {
}
});
Ext.dd.DragZone = Ext.extend(Ext.dd.DragSource, {
-
+
constructor : function(el, config){
Ext.dd.DragZone.superclass.constructor.call(this, el, config);
if(this.containerScroll){
Ext.dd.ScrollManager.register(this.el);
}
},
-
-
-
-
-
+
+
+
+
+
getDragData : function(e){
return Ext.dd.Registry.getHandleFromEvent(e);
},
-
-
+
+
onInitDrag : function(x, y){
this.proxy.update(this.dragData.ddel.cloneNode(true));
this.onStartDrag(x, y);
return true;
},
-
-
+
+
afterRepair : function(){
if(Ext.enableFx){
Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
@@ -23318,11 +23318,11 @@ Ext.dd.DragZone = Ext.extend(Ext.dd.DragSource, {
this.dragging = false;
},
-
+
getRepairXY : function(e){
- return Ext.Element.fly(this.dragData.ddel).getXY();
+ return Ext.Element.fly(this.dragData.ddel).getXY();
},
-
+
destroy : function(){
Ext.dd.DragZone.superclass.destroy.call(this);
if(this.containerScroll){
@@ -23335,50 +23335,50 @@ Ext.dd.DropZone = function(el, config){
};
Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {
-
+
getTargetFromEvent : function(e){
return Ext.dd.Registry.getTargetFromEvent(e);
},
-
+
onNodeEnter : function(n, dd, e, data){
-
+
},
-
+
onNodeOver : function(n, dd, e, data){
return this.dropAllowed;
},
-
+
onNodeOut : function(n, dd, e, data){
-
+
},
-
+
onNodeDrop : function(n, dd, e, data){
return false;
},
-
+
onContainerOver : function(dd, e, data){
return this.dropNotAllowed;
},
-
+
onContainerDrop : function(dd, e, data){
return false;
},
-
+
notifyEnter : function(dd, e, data){
return this.dropNotAllowed;
},
-
+
notifyOver : function(dd, e, data){
var n = this.getTargetFromEvent(e);
- if(!n){
+ if(!n){
if(this.lastOverNode){
this.onNodeOut(this.lastOverNode, dd, e, data);
this.lastOverNode = null;
@@ -23395,7 +23395,7 @@ Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {
return this.onNodeOver(n, dd, e, data);
},
-
+
notifyOut : function(dd, e, data){
if(this.lastOverNode){
this.onNodeOut(this.lastOverNode, dd, e, data);
@@ -23403,7 +23403,7 @@ Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {
}
},
-
+
notifyDrop : function(dd, e, data){
if(this.lastOverNode){
this.onNodeOut(this.lastOverNode, dd, e, data);
@@ -23415,25 +23415,25 @@ Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, {
this.onContainerDrop(dd, e, data);
},
-
+
triggerCacheRefresh : function(){
Ext.dd.DDM.refreshCache(this.groups);
- }
+ }
});
Ext.Element.addMethods({
-
+
initDD : function(group, config, overrides){
var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
return Ext.apply(dd, overrides);
},
-
+
initDDProxy : function(group, config, overrides){
var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
return Ext.apply(dd, overrides);
},
-
+
initDDTarget : function(group, config, overrides){
var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
return Ext.apply(dd, overrides);
@@ -23442,14 +23442,14 @@ Ext.Element.addMethods({
Ext.data.Api = (function() {
-
-
-
-
+
+
+
+
var validActions = {};
return {
-
+
actions : {
create : 'create',
read : 'read',
@@ -23457,7 +23457,7 @@ Ext.data.Api = (function() {
destroy : 'destroy'
},
-
+
restActions : {
create : 'POST',
read : 'GET',
@@ -23465,15 +23465,15 @@ Ext.data.Api = (function() {
destroy : 'DELETE'
},
-
+
isAction : function(action) {
return (Ext.data.Api.actions[action]) ? true : false;
},
-
+
getVerb : function(name) {
if (validActions[name]) {
- return validActions[name];
+ return validActions[name];
}
for (var verb in this.actions) {
if (this.actions[verb] === name) {
@@ -23484,10 +23484,10 @@ Ext.data.Api = (function() {
return (validActions[name] !== undefined) ? validActions[name] : null;
},
-
+
isValid : function(api){
var invalid = [];
- var crud = this.actions;
+ var crud = this.actions;
for (var action in api) {
if (!(action in crud)) {
invalid.push(action);
@@ -23496,7 +23496,7 @@ Ext.data.Api = (function() {
return (!invalid.length) ? true : invalid;
},
-
+
hasUniqueUrl : function(proxy, verb) {
var url = (proxy.api[verb]) ? proxy.api[verb].url : null;
var unique = true;
@@ -23508,10 +23508,10 @@ Ext.data.Api = (function() {
return unique;
},
-
+
prepare : function(proxy) {
if (!proxy.api) {
- proxy.api = {};
+ proxy.api = {};
}
for (var verb in this.actions) {
var action = this.actions[verb];
@@ -23525,15 +23525,15 @@ Ext.data.Api = (function() {
}
},
-
+
restify : function(proxy) {
proxy.restful = true;
for (var verb in this.restActions) {
proxy.api[this.actions[verb]].method ||
(proxy.api[this.actions[verb]].method = this.restActions[verb]);
}
-
-
+
+
proxy.onWrite = proxy.onWrite.createInterceptor(function(action, o, response, rs) {
var reader = o.reader;
var res = new Ext.data.Response({
@@ -23542,18 +23542,18 @@ Ext.data.Api = (function() {
});
switch (response.status) {
- case 200:
+ case 200:
return true;
break;
- case 201:
+ case 201:
if (Ext.isEmpty(res.raw.responseText)) {
res.success = true;
} else {
-
+
return true;
}
break;
- case 204:
+ case 204:
res.success = true;
res.data = null;
break;
@@ -23568,7 +23568,7 @@ Ext.data.Api = (function() {
}
o.request.callback.call(o.request.scope, res.data, res, res.success);
- return false;
+ return false;
}, proxy);
}
};
@@ -23625,30 +23625,30 @@ Ext.apply(Ext.data.Api.Error.prototype, {
Ext.data.SortTypes = {
-
+
none : function(s){
return s;
},
-
-
+
+
stripTagsRE : /<\/?[^>]+>/gi,
-
-
+
+
asText : function(s){
return String(s).replace(this.stripTagsRE, "");
},
-
-
+
+
asUCText : function(s){
return String(s).toUpperCase().replace(this.stripTagsRE, "");
},
-
-
+
+
asUCString : function(s) {
return String(s).toUpperCase();
},
-
-
+
+
asDate : function(s) {
if(!s){
return 0;
@@ -23658,21 +23658,21 @@ Ext.data.SortTypes = {
}
return Date.parse(String(s));
},
-
-
+
+
asFloat : function(s) {
var val = parseFloat(String(s).replace(/,/g, ""));
return isNaN(val) ? 0 : val;
},
-
-
+
+
asInt : function(s) {
var val = parseInt(String(s).replace(/,/g, ""), 10);
return isNaN(val) ? 0 : val;
}
};
Ext.data.Record = function(data, id){
-
+
this.id = (id || id === 0) ? id : Ext.data.Record.id(this);
this.data = data || {};
};
@@ -23707,32 +23707,32 @@ Ext.data.Record.id = function(rec) {
};
Ext.data.Record.prototype = {
-
-
-
-
-
-
+
+
+
+
+
+
dirty : false,
editing : false,
error : null,
-
+
modified : null,
-
+
phantom : false,
-
+
join : function(store){
-
+
this.store = store;
},
-
+
set : function(name, value){
var encode = Ext.isPrimitive(value) ? String : Ext.encode;
if(encode(this.data[name]) == encode(value)) {
return;
- }
+ }
this.dirty = true;
if(!this.modified){
this.modified = {};
@@ -23746,45 +23746,45 @@ Ext.data.Record.prototype = {
}
},
-
+
afterEdit : function(){
if (this.store != undefined && typeof this.store.afterEdit == "function") {
this.store.afterEdit(this);
}
},
-
+
afterReject : function(){
if(this.store){
this.store.afterReject(this);
}
},
-
+
afterCommit : function(){
if(this.store){
this.store.afterCommit(this);
}
},
-
+
get : function(name){
return this.data[name];
},
-
+
beginEdit : function(){
this.editing = true;
this.modified = this.modified || {};
},
-
+
cancelEdit : function(){
this.editing = false;
delete this.modified;
},
-
+
endEdit : function(){
this.editing = false;
if(this.dirty){
@@ -23792,7 +23792,7 @@ Ext.data.Record.prototype = {
}
},
-
+
reject : function(silent){
var m = this.modified;
for(var n in m){
@@ -23808,7 +23808,7 @@ Ext.data.Record.prototype = {
}
},
-
+
commit : function(silent){
this.dirty = false;
delete this.modified;
@@ -23818,7 +23818,7 @@ Ext.data.Record.prototype = {
}
},
-
+
getChanges : function(){
var m = this.modified, cs = {};
for(var n in m){
@@ -23829,34 +23829,34 @@ Ext.data.Record.prototype = {
return cs;
},
-
+
hasError : function(){
return this.error !== null;
},
-
+
clearError : function(){
this.error = null;
},
-
+
copy : function(newId) {
return new this.constructor(Ext.apply({}, this.data), newId || this.id);
},
-
+
isModified : function(fieldName){
return !!(this.modified && this.modified.hasOwnProperty(fieldName));
},
-
+
isValid : function() {
return this.fields.find(function(f) {
return (f.allowBlank === false && Ext.isEmpty(this.data[f.name])) ? true : false;
},this) ? false : true;
},
-
+
markDirty : function(){
this.dirty = true;
if(!this.modified){
@@ -23869,23 +23869,23 @@ Ext.data.Record.prototype = {
};
Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
-
-
+
+
register : function(){
for(var i = 0, s; (s = arguments[i]); i++){
this.add(s);
}
},
-
+
unregister : function(){
for(var i = 0, s; (s = arguments[i]); i++){
this.remove(this.lookup(s));
}
},
-
+
lookup : function(id){
if(Ext.isArray(id)){
var fields = ['field1'], expand = !Ext.isArray(id[0]);
@@ -23906,47 +23906,47 @@ Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), {
return Ext.isObject(id) ? (id.events ? id : Ext.create(id, 'store')) : this.get(id);
},
-
+
getKey : function(o){
return o.storeId;
}
});
Ext.data.Store = Ext.extend(Ext.util.Observable, {
-
-
-
-
-
-
-
+
+
+
+
+
+
+
writer : undefined,
-
-
-
+
+
+
remoteSort : false,
-
+
autoDestroy : false,
-
+
pruneModifiedRecords : false,
-
+
lastOptions : null,
-
+
autoSave : true,
-
+
batch : true,
-
+
restful: false,
-
+
paramNames : undefined,
-
+
defaultParamNames : {
start : 'start',
limit : 'limit',
@@ -23957,13 +23957,13 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
isDestroyed: false,
hasMultiSort: false,
-
+
batchKey : '_ext_batch_',
constructor : function(config){
-
-
+
+
this.data = new Ext.util.MixedCollection(false);
this.data.getKey = function(o){
@@ -23971,7 +23971,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
};
-
+
this.removed = [];
if(config && config.data){
@@ -23981,7 +23981,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
Ext.apply(this, config);
-
+
this.baseParams = Ext.isObject(this.baseParams) ? this.baseParams : {};
this.paramNames = Ext.applyIf(this.paramNames || {}, this.defaultParamNames);
@@ -23989,23 +23989,23 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
if((this.url || this.api) && !this.proxy){
this.proxy = new Ext.data.HttpProxy({url: this.url, api: this.api});
}
-
+
if (this.restful === true && this.proxy) {
-
-
+
+
this.batch = false;
Ext.data.Api.restify(this.proxy);
}
- if(this.reader){
+ if(this.reader){
if(!this.recordType){
this.recordType = this.reader.recordType;
}
if(this.reader.onMetaChange){
this.reader.onMetaChange = this.reader.onMetaChange.createSequence(this.onMetaChange, this);
}
- if (this.writer) {
- if (this.writer instanceof(Ext.data.DataWriter) === false) {
+ if (this.writer) {
+ if (this.writer instanceof(Ext.data.DataWriter) === false) {
this.writer = this.buildWriter(this.writer);
}
this.writer.meta = this.reader.meta;
@@ -24013,51 +24013,51 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
}
-
+
if(this.recordType){
-
+
this.fields = this.recordType.prototype.fields;
}
this.modified = [];
this.addEvents(
-
+
'datachanged',
-
+
'metachange',
-
+
'add',
-
+
'remove',
-
+
'update',
-
+
'clear',
-
+
'exception',
-
+
'beforeload',
-
+
'load',
-
+
'loadexception',
-
+
'beforewrite',
-
+
'write',
-
+
'beforesave',
-
+
'save'
);
if(this.proxy){
-
+
this.relayEvents(this.proxy, ['loadexception', 'exception']);
}
-
+
if (this.writer) {
this.on({
scope: this,
@@ -24092,12 +24092,12 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
typeof this.autoLoad == 'object' ?
this.autoLoad : undefined]);
}
-
+
this.batchCounter = 0;
this.batches = {};
},
-
+
buildWriter : function(config) {
var klass = undefined,
type = (config.format || 'json').toLowerCase();
@@ -24114,7 +24114,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
return new klass(config);
},
-
+
destroy : function(){
if(!this.isDestroyed){
if(this.storeId){
@@ -24129,7 +24129,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
add : function(records) {
var i, len, record, index;
@@ -24158,16 +24158,16 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.fireEvent('add', this, records, index);
},
-
+
addSorted : function(record){
var index = this.findInsertIndex(record);
this.insert(index, record);
},
-
+
doUpdate: function(rec){
var id = rec.id;
-
+
this.getById(id).join(null);
this.data.replace(id, rec);
@@ -24178,7 +24178,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.fireEvent('update', this, rec, Ext.data.Record.COMMIT);
},
-
+
remove : function(record){
if(Ext.isArray(record)){
Ext.each(record, function(r){
@@ -24202,12 +24202,12 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
removeAt : function(index){
this.remove(this.getAt(index));
},
-
+
removeAll : function(silent){
var items = [];
this.each(function(rec){
@@ -24220,19 +24220,19 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
if(this.pruneModifiedRecords){
this.modified = [];
}
- if (silent !== true) {
+ if (silent !== true) {
this.fireEvent('clear', this, items);
}
},
-
+
onClear: function(store, records){
Ext.each(records, function(rec, index){
this.destroyRecord(this, rec, index);
}, this);
},
-
+
insert : function(index, records) {
var i, len, record;
@@ -24255,32 +24255,32 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.fireEvent('add', this, records, index);
},
-
+
indexOf : function(record){
return this.data.indexOf(record);
},
-
+
indexOfId : function(id){
return this.data.indexOfKey(id);
},
-
+
getById : function(id){
return (this.snapshot || this.data).key(id);
},
-
+
getAt : function(index){
return this.data.itemAt(index);
},
-
+
getRange : function(start, end){
return this.data.getRange(start, end);
},
-
+
storeOptions : function(o){
o = Ext.apply({}, o);
delete o.callback;
@@ -24288,7 +24288,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.lastOptions = o;
},
-
+
clearData: function(){
this.data.each(function(rec) {
rec.join(null);
@@ -24296,7 +24296,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.data.clear();
},
-
+
load : function(options) {
options = Ext.apply({}, options);
this.storeOptions(options);
@@ -24307,21 +24307,21 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
options.params[pn.dir] = this.sortInfo.direction;
}
try {
- return this.execute('read', null, options);
+ return this.execute('read', null, options);
} catch(e) {
this.handleException(e);
return false;
}
},
-
+
updateRecord : function(store, record, action) {
if (action == Ext.data.Record.EDIT && this.autoSave === true && (!record.phantom || (record.phantom && record.isValid()))) {
this.save();
}
},
-
+
createRecords : function(store, records, index) {
var modified = this.modified,
length = records.length,
@@ -24331,7 +24331,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
record = records[i];
if (record.phantom && record.isValid()) {
- record.markDirty();
+ record.markDirty();
if (modified.indexOf(record) == -1) {
modified.push(record);
@@ -24343,17 +24343,17 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
destroyRecord : function(store, record, index) {
- if (this.modified.indexOf(record) != -1) {
+ if (this.modified.indexOf(record) != -1) {
this.modified.remove(record);
}
if (!record.phantom) {
this.removed.push(record);
-
-
-
+
+
+
record.lastIndex = index;
if (this.autoSave === true) {
@@ -24362,21 +24362,21 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
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') {
@@ -24384,36 +24384,36 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
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;
+ options.params.xaction = action;
}
-
-
-
-
-
+
+
+
+
+
this.proxy.request(Ext.data.Api.actions[action], rs, options.params, this.reader, this.createCallback(action, rs, batch), this, options);
}
return doRequest;
},
-
+
save : function() {
if (!this.writer) {
throw new Ext.data.Store.Error('writer-undefined');
@@ -24425,15 +24425,15 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
batch,
data = {},
i;
-
+
if(this.removed.length){
queue.push(['destroy', this.removed]);
}
-
+
var rs = [].concat(this.getModifiedRecords());
if(rs.length){
-
+
var phantoms = [];
for(i = rs.length-1; i >= 0; i--){
if(rs[i].phantom === true){
@@ -24441,16 +24441,16 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
if(rec.isValid()){
phantoms.push(rec);
}
- }else if(!rs[i].isValid()){
+ }else if(!rs[i].isValid()){
rs.splice(i,1);
}
}
-
+
if(phantoms.length){
queue.push(['create', phantoms]);
}
-
+
if(rs.length){
queue.push(['update', rs]);
}
@@ -24473,7 +24473,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
return -1;
},
-
+
doTransaction : function(action, rs, batch) {
function transaction(records) {
try{
@@ -24491,7 +24491,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
addToBatch : function(batch){
var b = this.batches,
key = this.batchKey + batch,
@@ -24527,14 +24527,14 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
-
+
+
createCallback : function(action, rs, batch) {
var actions = Ext.data.Api.actions;
return (action == 'read') ? this.loadRecords : function(data, response, success) {
-
+
this['on' + Ext.util.Format.capitalize(action) + 'Records'](success, rs, [].concat(data));
-
+
if (success === true) {
this.fireEvent('write', this, action, data, response, rs);
}
@@ -24542,9 +24542,9 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
};
},
-
-
-
+
+
+
clearModified : function(rs) {
if (Ext.isArray(rs)) {
for (var n=rs.length-1;n>=0;n--) {
@@ -24555,7 +24555,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
reMap : function(record) {
if (Ext.isArray(record)) {
for (var i = 0, len = record.length; i < len; i++) {
@@ -24570,7 +24570,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
onCreateRecords : function(success, rs, data) {
if (success === true) {
try {
@@ -24579,14 +24579,14 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
catch (e) {
this.handleException(e);
if (Ext.isArray(rs)) {
-
+
this.onCreateRecords(success, rs, data);
}
}
}
},
-
+
onUpdateRecords : function(success, rs, data) {
if (success === true) {
try {
@@ -24594,42 +24594,42 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
} catch (e) {
this.handleException(e);
if (Ext.isArray(rs)) {
-
+
this.onUpdateRecords(success, rs, data);
}
}
}
},
-
+
onDestroyRecords : function(success, rs, data) {
-
+
rs = (rs instanceof Ext.data.Record) ? [rs] : [].concat(rs);
for (var i=0,len=rs.length;i=0;i--) {
- this.insert(rs[i].lastIndex, rs[i]);
+ this.insert(rs[i].lastIndex, rs[i]);
}
}
},
-
+
handleException : function(e) {
-
+
Ext.handleError(e);
},
-
+
reload : function(options){
this.load(Ext.applyIf(options||{}, this.lastOptions));
},
-
-
+
+
loadRecords : function(o, options, success){
var i, len;
@@ -24684,47 +24684,47 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
loadData : function(o, append){
var r = this.reader.readRecords(o);
this.loadRecords(r, {add: append}, 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 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));
}
@@ -24733,15 +24733,15 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
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);
@@ -24751,22 +24751,22 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
return directionModifier * result;
};
-
+
this.data.sort(direction, fn);
if (this.snapshot && this.snapshot != this.data) {
this.snapshot.sort(direction, fn);
}
},
-
+
createSortFunction: function(field, direction) {
direction = direction || "ASC";
var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1;
var sortType = this.fields.get(field).sortType;
-
-
+
+
return function(r1, r2) {
var v1 = sortType(r1.data[field]),
v2 = sortType(r2.data[field]);
@@ -24775,14 +24775,14 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
};
},
-
+
setDefaultSort : function(field, dir) {
dir = dir ? dir.toUpperCase() : 'ASC';
this.sortInfo = {field: field, direction: dir};
this.sortToggle[field] = dir;
},
-
+
sort : function(fieldName, dir) {
if (Ext.isArray(arguments[0])) {
return this.multiSort.call(this, fieldName, dir);
@@ -24791,7 +24791,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
singleSort: function(fieldName, dir) {
var field = this.fields.get(fieldName);
if (!field) {
@@ -24803,7 +24803,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
sortToggle = this.sortToggle ? this.sortToggle[name] : null;
if (!dir) {
- if (sortInfo && sortInfo.field == name) {
+ if (sortInfo && sortInfo.field == name) {
dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC');
} else {
dir = field.sortDir;
@@ -24830,17 +24830,17 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
return true;
},
-
+
multiSort: function(sorters, direction) {
this.hasMultiSort = true;
direction = direction || "ASC";
-
+
if (this.multiSortInfo && direction == this.multiSortInfo.direction) {
direction = direction.toggle("ASC", "DESC");
}
-
+
this.multiSortInfo = {
sorters : sorters,
direction: direction
@@ -24855,17 +24855,17 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
each : function(fn, scope){
this.data.each(fn, scope);
},
-
+
getModifiedRecords : function(){
return this.modified;
},
-
+
sum : function(property, start, end){
var rs = this.data.items, v = 0;
start = start || 0;
@@ -24877,7 +24877,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
return v;
},
-
+
createFilterFn : function(property, value, anyMatch, caseSensitive, exactMatch){
if(Ext.isEmpty(value, false)){
return false;
@@ -24888,7 +24888,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
};
},
-
+
createMultipleFilterFn: function(filters) {
return function(record) {
var isMatch = true;
@@ -24905,10 +24905,10 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
};
},
-
+
filter : function(property, value, anyMatch, caseSensitive, exactMatch){
var fn;
-
+
if (Ext.isObject(property)) {
property = [property];
}
@@ -24916,13 +24916,13 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
if (Ext.isArray(property)) {
var filters = [];
-
+
for (var i=0, j = property.length; i < j; i++) {
var filter = property[i],
func = filter.fn,
scope = filter.scope || this;
-
+
if (!Ext.isFunction(func)) {
func = this.createFilterFn(filter.property, filter.value, filter.anyMatch, filter.caseSensitive, filter.exactMatch);
}
@@ -24932,21 +24932,21 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
fn = this.createMultipleFilterFn(filters);
} else {
-
+
fn = this.createFilterFn(property, value, anyMatch, caseSensitive, exactMatch);
}
return fn ? this.filterBy(fn) : this.clearFilter();
},
-
+
filterBy : function(fn, scope){
this.snapshot = this.snapshot || this.data;
this.data = this.queryBy(fn, scope || this);
this.fireEvent('datachanged', this);
},
-
+
clearFilter : function(suppressEvent){
if(this.isFiltered()){
this.data = this.snapshot;
@@ -24957,42 +24957,42 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
}
},
-
+
isFiltered : function(){
return !!this.snapshot && this.snapshot != this.data;
},
-
+
query : function(property, value, anyMatch, caseSensitive){
var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
return fn ? this.queryBy(fn) : this.data.clone();
},
-
+
queryBy : function(fn, scope){
var data = this.snapshot || this.data;
return data.filterBy(fn, scope||this);
},
-
+
find : function(property, value, start, anyMatch, caseSensitive){
var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
return fn ? this.data.findIndexBy(fn, null, start) : -1;
},
-
+
findExact: function(property, value, start){
return this.data.findIndexBy(function(rec){
return rec.get(property) === value;
}, this, start);
},
-
+
findBy : function(fn, scope, start){
return this.data.findIndexBy(fn, scope, start);
},
-
+
collect : function(dataIndex, allowNull, bypassFilter){
var d = (bypassFilter === true && this.snapshot) ?
this.snapshot.items : this.data.items;
@@ -25008,7 +25008,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
return r;
},
-
+
afterEdit : function(record){
if(this.modified.indexOf(record) == -1){
this.modified.push(record);
@@ -25016,19 +25016,19 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.fireEvent('update', this, record, Ext.data.Record.EDIT);
},
-
+
afterReject : function(record){
this.modified.remove(record);
this.fireEvent('update', this, record, Ext.data.Record.REJECT);
},
-
+
afterCommit : function(record){
this.modified.remove(record);
this.fireEvent('update', this, record, Ext.data.Record.COMMIT);
},
-
+
commitChanges : function(){
var modified = this.modified.slice(0),
length = modified.length,
@@ -25042,7 +25042,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.removed = [];
},
-
+
rejectChanges : function() {
var modified = this.modified.slice(0),
removed = this.removed.slice(0).reverse(),
@@ -25063,7 +25063,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.removed = [];
},
-
+
onMetaChange : function(meta){
this.recordType = this.reader.recordType;
this.fields = this.recordType.prototype.fields;
@@ -25080,7 +25080,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
this.fireEvent('metachange', this, this.reader.meta);
},
-
+
findInsertIndex : function(record){
this.suspendEvents();
var data = this.data.clone();
@@ -25092,7 +25092,7 @@ Ext.data.Store = Ext.extend(Ext.util.Observable, {
return index;
},
-
+
setBaseParam : function (name, value){
this.baseParams = this.baseParams || {};
this.baseParams[name] = value;
@@ -25112,13 +25112,13 @@ Ext.apply(Ext.data.Store.Error.prototype, {
});
Ext.data.Field = Ext.extend(Object, {
-
+
constructor : function(config){
if(Ext.isString(config)){
config = {name: config};
}
Ext.apply(this, config);
-
+
var types = Ext.data.Types,
st = this.sortType,
t;
@@ -25131,7 +25131,7 @@ Ext.data.Field = Ext.extend(Object, {
this.type = types.AUTO;
}
-
+
if(Ext.isString(st)){
this.sortType = Ext.data.SortTypes[st];
}else if(Ext.isEmpty(st)){
@@ -25142,85 +25142,85 @@ Ext.data.Field = Ext.extend(Object, {
this.convert = this.type.convert;
}
},
-
-
-
-
-
+
+
+
+
+
dateFormat: null,
-
-
+
+
useNull: false,
-
-
+
+
defaultValue: "",
-
+
mapping: null,
-
+
sortType : null,
-
+
sortDir : "ASC",
-
+
allowBlank : true
});
Ext.data.DataReader = function(meta, recordType){
-
+
this.meta = meta;
-
+
this.recordType = Ext.isArray(recordType) ?
Ext.data.Record.create(recordType) : recordType;
-
+
if (this.recordType){
this.buildExtractors();
}
};
Ext.data.DataReader.prototype = {
-
-
+
+
getTotal: Ext.emptyFn,
-
+
getRoot: Ext.emptyFn,
-
+
getMessage: Ext.emptyFn,
-
+
getSuccess: Ext.emptyFn,
-
+
getId: Ext.emptyFn,
-
+
buildExtractors : Ext.emptyFn,
-
+
extractValues : Ext.emptyFn,
-
+
realize: function(rs, data){
if (Ext.isArray(rs)) {
for (var i = rs.length - 1; i >= 0; i--) {
-
+
if (Ext.isArray(data)) {
this.realize(rs.splice(i,1).shift(), data.splice(i,1).shift());
}
else {
-
-
+
+
this.realize(rs.splice(i,1).shift(), data);
}
}
}
else {
-
+
if (Ext.isArray(data) && data.length == 1) {
data = data.shift();
}
if (!this.isData(data)) {
-
-
+
+
throw new Ext.data.DataReader.Error('realize', rs);
}
- rs.phantom = false;
- rs._phid = rs.id;
+ rs.phantom = false;
+ rs._phid = rs.id;
rs.id = this.getId(data);
rs.data = data;
@@ -25229,7 +25229,7 @@ Ext.data.DataReader.prototype = {
}
},
-
+
update : function(rs, data) {
if (Ext.isArray(rs)) {
for (var i=rs.length-1; i >= 0; i--) {
@@ -25237,14 +25237,14 @@ Ext.data.DataReader.prototype = {
this.update(rs.splice(i,1).shift(), data.splice(i,1).shift());
}
else {
-
-
+
+
this.update(rs.splice(i,1).shift(), data);
}
}
}
else {
-
+
if (Ext.isArray(data) && data.length == 1) {
data = data.shift();
}
@@ -25255,15 +25255,15 @@ Ext.data.DataReader.prototype = {
}
},
-
+
extractData : function(root, returnRecords) {
-
+
var rawName = (this instanceof Ext.data.JsonReader) ? 'json' : 'node';
var rs = [];
-
-
+
+
if (this.isData(root) && !(this instanceof Ext.data.XmlReader)) {
root = [root];
}
@@ -25276,7 +25276,7 @@ Ext.data.DataReader.prototype = {
for (var i = 0; i < root.length; i++) {
var n = root[i];
var record = new Record(this.extractValues(n, fi, fl), this.getId(n));
- record[rawName] = n;
+ record[rawName] = n;
rs.push(record);
}
}
@@ -25290,12 +25290,12 @@ Ext.data.DataReader.prototype = {
return rs;
},
-
+
isData : function(data) {
return (data && Ext.isObject(data) && !Ext.isEmpty(this.getId(data))) ? true : false;
},
-
+
onMetaChange : function(meta){
delete this.ef;
this.meta = meta;
@@ -25325,16 +25325,16 @@ Ext.data.DataWriter = function(config){
};
Ext.data.DataWriter.prototype = {
-
+
writeAllFields : false,
-
- listful : false,
-
+ listful : false,
+
+
apply : function(params, baseParams, action, rs) {
var data = [],
renderer = action + 'Record';
-
+
if (Ext.isArray(rs)) {
Ext.each(rs, function(rec){
data.push(this[renderer](rec));
@@ -25346,19 +25346,19 @@ Ext.data.DataWriter.prototype = {
this.render(params, baseParams, data);
},
-
+
render : Ext.emptyFn,
-
+
updateRecord : Ext.emptyFn,
-
+
createRecord : Ext.emptyFn,
-
+
destroyRecord : Ext.emptyFn,
-
+
toHash : function(rec, config) {
var map = rec.fields.map,
data = {},
@@ -25369,9 +25369,9 @@ Ext.data.DataWriter.prototype = {
data[m.mapping ? m.mapping : m.name] = value;
}
});
-
-
-
+
+
+
if (rec.phantom) {
if (rec.fields.containsKey(this.meta.idProperty) && Ext.isEmpty(rec.data[this.meta.idProperty])) {
delete data[this.meta.idProperty];
@@ -25382,7 +25382,7 @@ Ext.data.DataWriter.prototype = {
return data;
},
-
+
toArray : function(data) {
var fields = [];
Ext.iterate(data, function(k, v) {fields.push({name: k, value: v});},this);
@@ -25390,41 +25390,41 @@ Ext.data.DataWriter.prototype = {
}
};
Ext.data.DataProxy = function(conn){
-
-
+
+
conn = conn || {};
-
-
-
+
+
+
this.api = conn.api;
this.url = conn.url;
this.restful = conn.restful;
this.listeners = conn.listeners;
-
+
this.prettyUrls = conn.prettyUrls;
-
+
this.addEvents(
-
+
'exception',
-
+
'beforeload',
-
+
'load',
-
+
'loadexception',
-
+
'beforewrite',
-
+
'write'
);
Ext.data.DataProxy.superclass.constructor.call(this);
-
+
try {
Ext.data.Api.prepare(this);
} catch (e) {
@@ -25432,15 +25432,15 @@ Ext.data.DataProxy = function(conn){
e.toConsole();
}
}
-
+
Ext.data.DataProxy.relayEvents(this, ['beforewrite', 'write', 'exception']);
};
Ext.extend(Ext.data.DataProxy, Ext.util.Observable, {
-
+
restful: false,
-
+
setApi : function() {
if (arguments.length == 1) {
var valid = Ext.data.Api.isValid(arguments[0]);
@@ -25460,12 +25460,12 @@ Ext.extend(Ext.data.DataProxy, Ext.util.Observable, {
Ext.data.Api.prepare(this);
},
-
+
isApiAction : function(action) {
return (this.api[action]) ? true : false;
},
-
+
request : function(action, rs, params, reader, callback, scope, options) {
if (!this.api[action] && !this.load) {
throw new Ext.data.DataProxy.Error('action-undefined', action);
@@ -25480,53 +25480,53 @@ Ext.extend(Ext.data.DataProxy, Ext.util.Observable, {
},
-
+
load : null,
-
+
doRequest : function(action, rs, params, reader, callback, scope, options) {
-
-
-
+
+
+
this.load(params, reader, callback, scope, options);
},
-
+
onRead : Ext.emptyFn,
-
+
onWrite : Ext.emptyFn,
-
+
buildUrl : function(action, record) {
record = record || null;
-
-
-
+
+
+
var url = (this.conn && this.conn.url) ? this.conn.url : (this.api[action]) ? this.api[action].url : this.url;
if (!url) {
throw new Ext.data.Api.Error('invalid-url', action);
}
-
-
-
-
-
-
+
+
+
+
+
+
var provides = null;
var m = url.match(/(.*)(\.json|\.xml|\.html)$/);
if (m) {
- provides = m[2];
- url = m[1];
+ provides = m[2];
+ url = m[1];
}
-
+
if ((this.restful === true || this.prettyUrls === true) && record instanceof Ext.data.Record && !record.phantom) {
url += '/' + record.id;
}
return (provides === null) ? url : url + provides;
},
-
+
destroy: function(){
this.purgeListeners();
}
@@ -25558,17 +25558,17 @@ Ext.data.Request = function(params) {
Ext.apply(this, params);
};
Ext.data.Request.prototype = {
-
+
action : undefined,
-
+
rs : undefined,
-
+
params: undefined,
-
+
callback : Ext.emptyFn,
-
+
scope : undefined,
-
+
reader : undefined
};
@@ -25576,17 +25576,17 @@ Ext.data.Response = function(params) {
Ext.apply(this, params);
};
Ext.data.Response.prototype = {
-
+
action: undefined,
-
+
success : undefined,
-
+
message : undefined,
-
+
data: undefined,
-
+
raw: undefined,
-
+
records: undefined
};
@@ -25597,21 +25597,21 @@ Ext.data.ScriptTagProxy = function(config){
this.head = document.getElementsByTagName("head")[0];
-
+
};
Ext.data.ScriptTagProxy.TRANS_ID = 1000;
Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
-
-
+
+
timeout : 30000,
-
+
callbackParam : "callback",
-
+
nocache : true,
-
+
doRequest : function(action, rs, params, reader, callback, scope, arg) {
var p = Ext.urlEncode(Ext.apply(params, this.extraParams));
@@ -25654,7 +25654,7 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
this.trans = trans;
},
-
+
createCallback : function(action, rs, trans) {
var self = this;
return function(res) {
@@ -25667,13 +25667,13 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
}
};
},
-
+
onRead : function(action, trans, res) {
var result;
try {
result = trans.reader.readRecords(res);
}catch(e){
-
+
this.fireEvent("loadexception", this, trans, res, e);
this.fireEvent('exception', this, 'response', action, trans, res, e);
@@ -25681,7 +25681,7 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
return;
}
if (result.success === false) {
-
+
this.fireEvent('loadexception', this, trans, res);
this.fireEvent('exception', this, 'remote', action, trans, res, null);
@@ -25690,11 +25690,11 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
}
trans.callback.call(trans.scope||window, result, trans.arg, result.success);
},
-
+
onWrite : function(action, trans, response, rs) {
var reader = trans.reader;
try {
-
+
var res = reader.readResponse(action, response);
} catch (e) {
this.fireEvent('exception', this, 'response', action, trans, res, e);
@@ -25710,19 +25710,19 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
trans.callback.call(trans.scope||window, res.data, res, true);
},
-
+
isLoading : function(){
return this.trans ? true : false;
},
-
+
abort : function(){
if(this.isLoading()){
this.destroyTrans(this.trans);
}
},
-
+
destroyTrans : function(trans, isLoaded){
this.head.removeChild(document.getElementById(trans.scriptId));
clearTimeout(trans.timeoutId);
@@ -25732,7 +25732,7 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
delete window[trans.cb];
}catch(e){}
}else{
-
+
window[trans.cb] = function(){
window[trans.cb] = undefined;
try{
@@ -25742,12 +25742,12 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
}
},
-
+
handleFailure : function(trans){
this.trans = false;
this.destroyTrans(trans, false);
if (trans.action === Ext.data.Api.actions.read) {
-
+
this.fireEvent("loadexception", this, null, trans.arg);
}
@@ -25758,7 +25758,7 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
trans.callback.call(trans.scope||window, null, trans.arg, false);
},
-
+
destroy: function(){
this.abort();
Ext.data.ScriptTagProxy.superclass.destroy.call(this);
@@ -25767,18 +25767,18 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
Ext.data.HttpProxy = function(conn){
Ext.data.HttpProxy.superclass.constructor.call(this, conn);
-
+
this.conn = conn;
-
-
-
-
+
+
+
+
this.conn.url = null;
this.useAjax = !conn || !conn.events;
-
+
var actions = Ext.data.Api.actions;
this.activeRequest = {};
for (var verb in actions) {
@@ -25787,12 +25787,12 @@ Ext.data.HttpProxy = function(conn){
};
Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
-
+
getConnection : function() {
return this.useAjax ? Ext.Ajax : this.conn;
},
-
+
setUrl : function(url, makePermanent) {
this.conn.url = url;
if (makePermanent === true) {
@@ -25802,7 +25802,7 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
}
},
-
+
doRequest : function(action, rs, params, reader, cb, scope, arg) {
var o = {
method: (this.api[action]) ? this.api[action]['method'] : undefined,
@@ -25816,8 +25816,8 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
scope: this
};
-
-
+
+
if (params.jsonData) {
o.jsonData = params.jsonData;
} else if (params.xmlData) {
@@ -25825,16 +25825,16 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
} else {
o.params = params || {};
}
-
-
-
+
+
+
this.conn.url = this.buildUrl(action, rs);
if(this.useAjax){
Ext.applyIf(o, this.conn);
-
+
if (action == Ext.data.Api.actions.read && this.activeRequest[action]) {
Ext.Ajax.abort(this.activeRequest[action]);
}
@@ -25842,18 +25842,18 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
}else{
this.conn.request(o);
}
-
+
this.conn.url = null;
},
-
+
createCallback : function(action, rs) {
return function(o, success, response) {
this.activeRequest[action] = undefined;
if (!success) {
if (action === Ext.data.Api.actions.read) {
-
-
+
+
this.fireEvent('loadexception', this, o, response);
}
this.fireEvent('exception', this, 'response', action, o, response);
@@ -25868,14 +25868,14 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
};
},
-
+
onRead : function(action, o, response) {
var result;
try {
result = o.reader.read(response);
}catch(e){
-
-
+
+
this.fireEvent('loadexception', this, o, response, e);
this.fireEvent('exception', this, 'response', action, o, response, e);
@@ -25883,23 +25883,23 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
return;
}
if (result.success === false) {
-
-
+
+
this.fireEvent('loadexception', this, o, response);
-
+
var res = o.reader.readResponse(action, response);
this.fireEvent('exception', this, 'remote', action, o, res, null);
}
else {
this.fireEvent('load', this, o, o.request.arg);
}
-
-
-
+
+
+
o.request.callback.call(o.request.scope, result, o.request.arg, result.success);
},
-
+
onWrite : function(action, o, response, rs) {
var reader = o.reader;
var res;
@@ -25915,13 +25915,13 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
} else {
this.fireEvent('exception', this, 'remote', action, o, res, rs);
}
-
-
-
+
+
+
o.request.callback.call(o.request.scope, res.data, res, res.success);
},
-
+
destroy: function(){
if(!this.useAjax){
this.conn.abort();
@@ -25937,7 +25937,7 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, {
}
});
Ext.data.MemoryProxy = function(data){
-
+
var api = {};
api[Ext.data.Api.actions.read] = true;
Ext.data.MemoryProxy.superclass.constructor.call(this, {
@@ -25947,17 +25947,17 @@ Ext.data.MemoryProxy = function(data){
};
Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, {
-
-
+
+
doRequest : function(action, rs, params, reader, callback, scope, arg) {
-
+
params = params || {};
var result;
try {
result = reader.readRecords(this.data);
}catch(e){
-
+
this.fireEvent("loadexception", this, null, arg, e);
this.fireEvent('exception', this, 'response', action, arg, null, e);
@@ -25970,24 +25970,24 @@ Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, {
Ext.data.Types = new function(){
var st = Ext.data.SortTypes;
Ext.apply(this, {
-
+
stripRe: /[\$,%]/g,
-
-
+
+
AUTO: {
convert: function(v){ return v; },
sortType: st.none,
type: 'auto'
},
-
+
STRING: {
convert: function(v){ return (v === undefined || v === null) ? '' : String(v); },
sortType: st.asUCString,
type: 'string'
},
-
+
INT: {
convert: function(v){
return v !== undefined && v !== null && v !== '' ?
@@ -25996,8 +25996,8 @@ Ext.data.Types = new function(){
sortType: st.none,
type: 'int'
},
-
-
+
+
FLOAT: {
convert: function(v){
return v !== undefined && v !== null && v !== '' ?
@@ -26006,15 +26006,15 @@ Ext.data.Types = new function(){
sortType: st.none,
type: 'float'
},
-
-
+
+
BOOL: {
convert: function(v){ return v === true || v === 'true' || v == 1; },
sortType: st.none,
type: 'bool'
},
-
-
+
+
DATE: {
convert: function(v){
var df = this.dateFormat;
@@ -26040,49 +26040,49 @@ Ext.data.Types = new function(){
type: 'date'
}
});
-
+
Ext.apply(this, {
-
+
BOOLEAN: this.BOOL,
-
+
INTEGER: this.INT,
-
- NUMBER: this.FLOAT
+
+ NUMBER: this.FLOAT
});
};
Ext.data.JsonWriter = Ext.extend(Ext.data.DataWriter, {
-
+
encode : true,
-
+
encodeDelete: false,
-
+
constructor : function(config){
- Ext.data.JsonWriter.superclass.constructor.call(this, config);
+ Ext.data.JsonWriter.superclass.constructor.call(this, config);
},
-
+
render : function(params, baseParams, data) {
if (this.encode === true) {
-
+
Ext.apply(params, baseParams);
params[this.meta.root] = Ext.encode(data);
} else {
-
+
var jdata = Ext.apply({}, baseParams);
jdata[this.meta.root] = data;
params.jsonData = jdata;
}
},
-
+
createRecord : function(rec) {
return this.toHash(rec);
},
-
+
updateRecord : function(rec) {
return this.toHash(rec);
},
-
+
destroyRecord : function(rec){
if(this.encodeDelete){
var data = {};
@@ -26095,10 +26095,10 @@ Ext.data.JsonWriter = Ext.extend(Ext.data.DataWriter, {
});
Ext.data.JsonReader = function(meta, recordType){
meta = meta || {};
-
-
-
-
+
+
+
+
Ext.applyIf(meta, {
idProperty: 'id',
successProperty: 'success',
@@ -26108,8 +26108,8 @@ Ext.data.JsonReader = function(meta, recordType){
Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields);
};
Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
-
-
+
+
read : function(response){
var json = response.responseText;
var o = Ext.decode(json);
@@ -26119,8 +26119,8 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
return this.readRecords(o);
},
-
-
+
+
readResponse : function(action, response) {
var o = (response.responseText !== undefined) ? Ext.decode(response.responseText) : response;
if(!o) {
@@ -26139,7 +26139,7 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
}
}
-
+
var res = new Ext.data.Response({
action: action,
success: success,
@@ -26148,16 +26148,16 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
raw: o
});
-
+
if (Ext.isEmpty(res.success)) {
throw new Ext.data.JsonReader.Error('successProperty-response', this.meta.successProperty);
}
return res;
},
-
+
readRecords : function(o){
-
+
this.jsonData = o;
if(o.metaData){
this.onMetaChange(o.metaData);
@@ -26179,15 +26179,15 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
}
}
-
+
return {
success : success,
- records : this.extractData(root, true),
+ records : this.extractData(root, true),
totalRecords : totalRecords
};
},
-
+
buildExtractors : function() {
if(this.ef){
return;
@@ -26223,12 +26223,12 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
this.ef = ef;
},
-
+
simpleAccess : function(obj, subsc) {
return obj[subsc];
},
-
+
createAccessor : function(){
var re = /[\[\.]/;
return function(expr) {
@@ -26249,7 +26249,7 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, {
};
}(),
-
+
extractValues : function(data, items, len) {
var f, values = {};
for(var j = 0; j < len; j++){
@@ -26280,10 +26280,10 @@ Ext.apply(Ext.data.JsonReader.Error.prototype, {
});
Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {
-
-
-
-
+
+
+
+
readRecords : function(o){
this.arrayData = o;
var s = this.meta,
@@ -26335,7 +26335,7 @@ Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {
}
});
Ext.data.ArrayStore = Ext.extend(Ext.data.Store, {
-
+
constructor: function(config){
Ext.data.ArrayStore.superclass.constructor.call(this, Ext.apply(config, {
reader: new Ext.data.ArrayReader(config)
@@ -26359,7 +26359,7 @@ Ext.reg('arraystore', Ext.data.ArrayStore);
Ext.data.SimpleStore = Ext.data.ArrayStore;
Ext.reg('simplestore', Ext.data.SimpleStore);
Ext.data.JsonStore = Ext.extend(Ext.data.Store, {
-
+
constructor: function(config){
Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(config, {
reader: new Ext.data.JsonReader(config)
@@ -26369,26 +26369,26 @@ Ext.data.JsonStore = Ext.extend(Ext.data.Store, {
Ext.reg('jsonstore', Ext.data.JsonStore);
Ext.data.XmlWriter = function(params) {
Ext.data.XmlWriter.superclass.constructor.apply(this, arguments);
-
+
this.tpl = (typeof(this.tpl) === 'string') ? new Ext.XTemplate(this.tpl).compile() : this.tpl.compile();
};
Ext.extend(Ext.data.XmlWriter, Ext.data.DataWriter, {
-
+
documentRoot: 'xrequest',
-
+
forceDocumentRoot: false,
-
+
root: 'records',
-
+
xmlVersion : '1.0',
-
+
xmlEncoding: 'ISO-8859-15',
-
-
+
+
tpl: '<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}{name}> <{root}> <{parent.record}><{name}>{value}{name}> {parent.record}> {root}> {documentRoot}> ',
-
+
render : function(params, baseParams, data) {
baseParams = this.toArray(baseParams);
params.xmlData = this.tpl.applyTemplate({
@@ -26402,17 +26402,17 @@ Ext.extend(Ext.data.XmlWriter, Ext.data.DataWriter, {
});
},
-
+
createRecord : function(rec) {
return this.toArray(this.toHash(rec));
},
-
+
updateRecord : function(rec) {
return this.toArray(this.toHash(rec));
},
-
+
destroyRecord : function(rec) {
var data = {};
data[this.meta.idProperty] = rec.id;
@@ -26423,7 +26423,7 @@ Ext.extend(Ext.data.XmlWriter, Ext.data.DataWriter, {
Ext.data.XmlReader = function(meta, recordType){
meta = meta || {};
-
+
Ext.applyIf(meta, {
idProperty: meta.idProperty || meta.idPath || meta.id,
successProperty: meta.successProperty || meta.success
@@ -26432,7 +26432,7 @@ Ext.data.XmlReader = function(meta, recordType){
Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields);
};
Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
-
+
read : function(response){
var doc = response.responseXML;
if(!doc) {
@@ -26441,9 +26441,9 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
return this.readRecords(doc);
},
-
+
readRecords : function(doc){
-
+
this.xmlData = doc;
var root = doc.documentElement || doc,
@@ -26458,9 +26458,9 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
success = this.getSuccess(root);
}
- var records = this.extractData(q.select(this.meta.record, root), true);
+ var records = this.extractData(q.select(this.meta.record, root), true);
+
-
return {
success : success,
records : records,
@@ -26468,13 +26468,13 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
};
},
-
+
readResponse : function(action, response) {
var q = Ext.DomQuery,
doc = response.responseXML,
root = doc.documentElement || doc;
-
+
var res = new Ext.data.Response({
action: action,
success : this.getSuccess(root),
@@ -26487,7 +26487,7 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
throw new Ext.data.DataReader.Error('successProperty-response', this.meta.successProperty);
}
-
+
if (action === Ext.data.Api.actions.create) {
var def = Ext.isDefined(res.data);
if (def && Ext.isEmpty(res.data)) {
@@ -26504,7 +26504,7 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
return true;
},
-
+
buildExtractors : function() {
if(this.ef){
return;
@@ -26545,7 +26545,7 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
this.ef = ef;
},
-
+
createAccessor : function(){
var q = Ext.DomQuery;
return function(key) {
@@ -26574,7 +26574,7 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
};
}(),
-
+
extractValues : function(data, items, len) {
var f, values = {};
for(var j = 0; j < len; j++){
@@ -26586,7 +26586,7 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
}
});
Ext.data.XmlStore = Ext.extend(Ext.data.Store, {
-
+
constructor: function(config){
Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(config, {
reader: new Ext.data.XmlReader(config)
@@ -26596,14 +26596,14 @@ Ext.data.XmlStore = Ext.extend(Ext.data.Store, {
Ext.reg('xmlstore', Ext.data.XmlStore);
Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
-
+
constructor: function(config) {
config = config || {};
-
-
-
-
+
+
+
+
this.hasMultiSort = true;
this.multiSortInfo = this.multiSortInfo || {sorters: []};
@@ -26612,7 +26612,7 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
sortInfo = config.sortInfo || this.sortInfo,
groupDir = config.groupDir || this.groupDir;
-
+
if(groupField){
sorters.push({
field : groupField,
@@ -26620,7 +26620,7 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
});
}
-
+
if (sortInfo) {
sorters.push(sortInfo);
}
@@ -26628,23 +26628,23 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
Ext.data.GroupingStore.superclass.constructor.call(this, config);
this.addEvents(
-
+
'groupchange'
);
this.applyGroupField();
},
-
-
+
+
remoteGroup : false,
-
+
groupOnSort:false,
-
+
groupDir : 'ASC',
-
+
clearGrouping : function(){
this.groupField = false;
@@ -26666,16 +26666,16 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
}
},
-
+
groupBy : function(field, forceRegroup, direction) {
direction = direction ? (String(direction).toUpperCase() == 'DESC' ? 'DESC' : 'ASC') : this.groupDir;
if (this.groupField == field && this.groupDir == direction && !forceRegroup) {
- return;
+ return;
}
-
-
+
+
var sorters = this.multiSortInfo.sorters;
if (sorters.length > 0 && sorters[0].field == this.groupField) {
sorters.shift();
@@ -26704,8 +26704,8 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
}
},
-
-
+
+
sort : function(fieldName, dir) {
if (this.remoteSort) {
return Ext.data.GroupingStore.superclass.sort.call(this, fieldName, dir);
@@ -26713,16 +26713,16 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
var sorters = [];
-
+
if (Ext.isArray(arguments[0])) {
sorters = arguments[0];
} else if (fieldName == undefined) {
-
-
+
+
sorters = this.sortInfo ? [this.sortInfo] : [];
} else {
-
-
+
+
var field = this.fields.get(fieldName);
if (!field) return false;
@@ -26731,7 +26731,7 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
sortToggle = this.sortToggle ? this.sortToggle[name] : null;
if (!dir) {
- if (sortInfo && sortInfo.field == name) {
+ if (sortInfo && sortInfo.field == name) {
dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC');
} else {
dir = field.sortDir;
@@ -26744,7 +26744,7 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
sorters = [this.sortInfo];
}
-
+
if (this.groupField) {
sorters.unshift({direction: this.groupDir, field: this.groupField});
}
@@ -26752,7 +26752,7 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
return this.multiSort.call(this, sorters, dir);
},
-
+
applyGroupField: function(){
if (this.remoteGroup) {
if(!this.baseParams){
@@ -26768,13 +26768,13 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
if (lo && lo.params) {
lo.params.groupDir = this.groupDir;
-
+
delete lo.params.groupBy;
}
}
},
-
+
applyGrouping : function(alwaysFireChange){
if(this.groupField !== false){
this.groupBy(this.groupField, true, this.groupDir);
@@ -26787,7 +26787,7 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, {
}
},
-
+
getGroupState : function(){
return this.groupOnSort && this.groupField !== false ?
(this.sortInfo ? this.sortInfo.field : undefined) : this.groupField;
@@ -26804,26 +26804,26 @@ Ext.data.DirectProxy = function(config){
};
Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
-
+
paramOrder: undefined,
-
+
paramsAsHash: true,
-
+
directFn : undefined,
-
+
doRequest : function(action, rs, params, reader, callback, scope, options) {
var args = [],
directFn = this.api[action] || this.directFn;
switch (action) {
case Ext.data.Api.actions.create:
- args.push(params.jsonData);
+ args.push(params.jsonData);
break;
case Ext.data.Api.actions.read:
-
+
if(directFn.directCfg.method.len > 0){
if(this.paramOrder){
for(var i = 0, len = this.paramOrder.length; i < len; i++){
@@ -26835,10 +26835,10 @@ Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
}
break;
case Ext.data.Api.actions.update:
- args.push(params.jsonData);
+ args.push(params.jsonData);
break;
case Ext.data.Api.actions.destroy:
- args.push(params.jsonData);
+ args.push(params.jsonData);
break;
}
@@ -26856,12 +26856,12 @@ Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
directFn.apply(window, args);
},
-
+
createCallback : function(action, rs, trans) {
var me = this;
return function(result, res) {
if (!res.status) {
-
+
if (action === Ext.data.Api.actions.read) {
me.fireEvent("loadexception", me, trans, res, null);
}
@@ -26877,14 +26877,14 @@ Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
};
},
-
+
onRead : function(action, trans, result, res) {
var records;
try {
records = trans.reader.readRecords(result);
}
catch (ex) {
-
+
this.fireEvent("loadexception", this, trans, res, ex);
this.fireEvent('exception', this, 'response', action, trans, res, ex);
@@ -26894,7 +26894,7 @@ Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
this.fireEvent("load", this, res, trans.request.arg);
trans.request.callback.call(trans.request.scope, records, trans.request.arg, true);
},
-
+
onWrite : function(action, trans, result, res, rs) {
var data = trans.reader.extractData(trans.reader.getRoot(result), false);
var success = trans.reader.getSuccess(result);
@@ -26910,7 +26910,7 @@ Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
Ext.data.DirectStore = Ext.extend(Ext.data.Store, {
constructor : function(config){
-
+
var c = Ext.apply({}, {
batchTransactions: false
}, config);
@@ -26923,9 +26923,9 @@ Ext.data.DirectStore = Ext.extend(Ext.data.Store, {
Ext.reg('directstore', Ext.data.DirectStore);
Ext.Direct = Ext.extend(Ext.util.Observable, {
-
-
+
+
exceptions: {
TRANSPORT: 'xhr',
PARSE: 'parse',
@@ -26933,19 +26933,19 @@ Ext.Direct = Ext.extend(Ext.util.Observable, {
SERVER: 'exception'
},
-
+
constructor: function(){
this.addEvents(
-
+
'event',
-
+
'exception'
);
this.transactions = {};
this.providers = {};
},
-
+
addProvider : function(provider){
var a = arguments;
if(a.length > 1){
@@ -26955,7 +26955,7 @@ Ext.Direct = Ext.extend(Ext.util.Observable, {
return;
}
-
+
if(!provider.events){
provider = new Ext.Direct.PROVIDERS[provider.type](provider);
}
@@ -26973,7 +26973,7 @@ Ext.Direct = Ext.extend(Ext.util.Observable, {
return provider;
},
-
+
getProvider : function(id){
return this.providers[id];
},
@@ -27071,39 +27071,39 @@ Ext.Direct.eventTypes = {
'exception': Ext.Direct.ExceptionEvent
};
-Ext.direct.Provider = Ext.extend(Ext.util.Observable, {
-
-
-
+Ext.direct.Provider = Ext.extend(Ext.util.Observable, {
+
+
+
priority: 1,
-
-
-
+
+
+
constructor : function(config){
Ext.apply(this, config);
this.addEvents(
-
+
'connect',
-
+
'disconnect',
-
+
'data',
-
+
'exception'
);
Ext.direct.Provider.superclass.constructor.call(this, config);
},
-
+
isConnected: function(){
return false;
},
-
+
connect: Ext.emptyFn,
-
-
+
+
disconnect: Ext.emptyFn
});
@@ -27143,34 +27143,34 @@ Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
}
});
Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
-
-
+
+
priority: 3,
-
+
interval: 3000,
-
-
-
+
+
+
constructor : function(config){
Ext.direct.PollingProvider.superclass.constructor.call(this, config);
this.addEvents(
-
+
'beforepoll',
-
+
'poll'
);
},
-
+
isConnected: function(){
return !!this.pollTask;
},
-
+
connect: function(){
if(this.url && !this.pollTask){
this.pollTask = Ext.TaskMgr.start({
@@ -27197,7 +27197,7 @@ Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
}
},
-
+
disconnect: function(){
if(this.pollTask){
Ext.TaskMgr.stop(this.pollTask);
@@ -27206,7 +27206,7 @@ Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
}
},
-
+
onData: function(opt, success, xhr){
if(success){
var events = this.getEvents(xhr);
@@ -27227,30 +27227,30 @@ Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
});
Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider;
-Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {
-
-
-
-
-
-
-
-
-
+Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {
+
+
+
+
+
+
+
+
+
enableBuffer: 10,
-
-
+
+
maxRetries: 1,
-
-
+
+
timeout: undefined,
constructor : function(config){
Ext.direct.RemotingProvider.superclass.constructor.call(this, config);
this.addEvents(
-
- 'beforecall',
-
+
+ 'beforecall',
+
'call'
);
this.namespace = (Ext.isString(this.namespace)) ? Ext.ns(this.namespace) : this.namespace || window;
@@ -27258,7 +27258,7 @@ Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {
this.callBuffer = [];
},
-
+
initAPI : function(){
var o = this.actions;
for(var c in o){
@@ -27271,7 +27271,7 @@ Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {
}
},
-
+
isConnected: function(){
return !!this.connected;
},
@@ -27434,9 +27434,9 @@ Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {
extType: 'rpc',
extUpload: String(isUpload)
};
-
-
-
+
+
+
Ext.apply(t, {
form: Ext.getDom(form),
isUpload: isUpload,
@@ -27446,7 +27446,7 @@ Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {
this.processForm(t);
}
},
-
+
processForm: function(t){
Ext.Ajax.request({
url: this.url,
@@ -27516,7 +27516,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
}
}
-
+
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');
@@ -27527,12 +27527,12 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
this.disableTrackOver = true;
this.el.addClass('x-resizable-pinned');
}
-
+
var position = this.el.getStyle('position');
if(position != 'absolute' && position != 'fixed'){
this.el.setStyle('position', 'relative');
}
- if(!this.handles){
+ if(!this.handles){
this.handles = 's,e,se';
if(this.multiDirectional){
this.handles += ',n,w';
@@ -27549,7 +27549,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent, this.handleCls);
}
}
-
+
this.corner = this.southeast;
if(this.handles.indexOf('n') != -1 || this.handles.indexOf('w') != -1){
@@ -27590,9 +27590,9 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
}
this.addEvents(
-
+
'beforeresize',
-
+
'resize'
);
@@ -27607,72 +27607,72 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
Ext.Resizable.superclass.constructor.call(this);
},
-
+
adjustments : [0, 0],
-
+
animate : false,
-
-
+
+
disableTrackOver : false,
-
+
draggable: false,
-
+
duration : 0.35,
-
+
dynamic : false,
-
+
easing : 'easeOutStrong',
-
+
enabled : true,
-
-
+
+
handles : false,
-
+
multiDirectional : false,
-
+
height : null,
-
+
width : null,
-
+
heightIncrement : 0,
-
+
widthIncrement : 0,
-
+
minHeight : 5,
-
+
minWidth : 5,
-
+
maxHeight : 10000,
-
+
maxWidth : 10000,
-
+
minX: 0,
-
+
minY: 0,
-
+
pinned : false,
-
+
preserveRatio : false,
-
+
resizeChild : false,
-
+
transparent: false,
-
-
-
-
+
+
+
+
resizeTo : function(width, height){
this.el.setSize(width, height);
this.updateChildSize();
this.fireEvent('resize', this, width, height, null);
},
-
+
startSizing : function(e, handle){
this.fireEvent('beforeresize', this, e);
- if(this.enabled){
+ if(this.enabled){
if(!this.overlay){
this.overlay = this.el.createProxy({tag: 'div', cls: 'x-resizable-overlay', html: ' '}, Ext.getBody());
@@ -27705,7 +27705,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
);
}
- this.proxy.setStyle('visibility', 'hidden');
+ this.proxy.setStyle('visibility', 'hidden');
this.proxy.show();
this.proxy.setBox(this.startBox);
if(!this.dynamic){
@@ -27714,7 +27714,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
}
},
-
+
onMouseDown : function(handle, e){
if(this.enabled){
e.stopEvent();
@@ -27723,7 +27723,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
}
},
-
+
onMouseUp : function(e){
this.activeHandle = null;
var size = this.resizeElement();
@@ -27734,7 +27734,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
this.fireEvent('resize', this, size.width, size.height, e);
},
-
+
updateChildSize : function(){
if(this.resizeChild){
var el = this.el;
@@ -27744,10 +27744,10 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
var b = el.getSize(true);
child.setSize(b.width+adj[0], b.height+adj[1]);
}
-
-
-
-
+
+
+
+
if(Ext.isIE9m){
setTimeout(function(){
if(el.dom.offsetWidth){
@@ -27759,7 +27759,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
}
},
-
+
snap : function(value, inc, min){
if(!inc || !value){
return value;
@@ -27776,7 +27776,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
return Math.max(min, newValue);
},
-
+
resizeElement : function(){
var box = this.proxy.getBox();
if(this.updateBox){
@@ -27795,7 +27795,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
return box;
},
-
+
constrain : function(v, diff, m, mx){
if(v - diff < m){
diff = v - m;
@@ -27805,7 +27805,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
return diff;
},
-
+
onMouseMove : function(e){
if(this.enabled && this.activeHandle){
try{
@@ -27814,7 +27814,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
return;
}
-
+
var curSize = this.curSize || this.startBox,
x = this.startBox.x, y = this.startBox.y,
ox = x,
@@ -27971,31 +27971,31 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, {
}
},
-
+
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(removeEl){
Ext.destroy(this.dd, this.overlay, this.proxy);
this.overlay = null;
@@ -28035,7 +28035,7 @@ Ext.Resizable.positions = {
Ext.Resizable.Handle = Ext.extend(Object, {
constructor : function(rz, pos, disableTrackOver, transparent, cls){
if(!this.tpl){
-
+
var tpl = Ext.DomHelper.createTemplate(
{tag: 'div', cls: 'x-resizable-handle x-resizable-handle-{0}'}
);
@@ -28062,23 +28062,23 @@ Ext.Resizable.Handle = Ext.extend(Object, {
}
},
-
+
afterResize : function(rz){
-
+
},
-
+
onMouseDown : function(e){
this.rz.onMouseDown(this, e);
},
-
+
onMouseOver : function(e){
this.rz.handleOver(this, e);
},
-
+
onMouseOut : function(e){
this.rz.handleOut(this, e);
},
-
+
destroy : function(){
Ext.destroy(this.el);
this.el = null;
@@ -28086,87 +28086,87 @@ Ext.Resizable.Handle = Ext.extend(Object, {
});
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;
}
@@ -28176,12 +28176,12 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
getState : function(){
return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox(true));
},
-
+
onRender : function(ct, position){
Ext.Window.superclass.onRender.call(this, ct, position);
@@ -28189,7 +28189,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
this.el.addClass('x-window-plain');
}
-
+
this.focusEl = this.el.createChild({
tag: 'a', href:'#', cls:'x-dlg-focus',
tabIndex:'-1', html: ' '});
@@ -28209,7 +28209,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
initEvents : function(){
Ext.Window.superclass.initEvents.call(this);
if(this.animateTarget){
@@ -28247,11 +28247,11 @@ Ext.Window = Ext.extend(Ext.Panel, {
},
initDraggable : function(){
-
+
this.dd = new Ext.Window.DD(this);
},
-
+
onEsc : function(k, e){
if (this.activeGhost) {
this.unghost();
@@ -28260,7 +28260,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
this[this.closeAction]();
},
-
+
beforeDestroy : function(){
if(this.rendered){
this.hide();
@@ -28276,7 +28276,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
Ext.Window.superclass.beforeDestroy.call(this);
},
-
+
onDestroy : function(){
if(this.manager){
this.manager.unregister(this);
@@ -28284,7 +28284,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
Ext.Window.superclass.onDestroy.call(this);
},
-
+
initTools : function(){
if(this.minimizable){
this.addTool({
@@ -28311,7 +28311,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
resizerAction : function(){
var box = this.proxy.getBox();
this.proxy.hide();
@@ -28319,14 +28319,14 @@ Ext.Window = Ext.extend(Ext.Panel, {
return box;
},
-
+
beforeResize : function(){
- this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40);
+ 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.isIE9m && this.resizer){
this.resizer.syncHandleHeight();
@@ -28334,7 +28334,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
handleResize : function(box){
var rz = this.resizeBox;
if(rz.x != box.x || rz.y != box.y){
@@ -28350,7 +28350,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
this.saveState();
},
-
+
focus : function(){
var f = this.focusEl,
db = this.defaultButton,
@@ -28377,13 +28377,13 @@ Ext.Window = Ext.extend(Ext.Panel, {
f.focus.defer(10, f);
},
-
+
setAnimateTarget : function(el){
el = Ext.get(el);
this.animateTarget = el;
},
-
+
beforeShow : function(){
delete this.el.lastXY;
delete this.el.lastLT;
@@ -28406,7 +28406,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
show : function(animateTarget, cb, scope){
if(!this.rendered){
this.render(Ext.getBody());
@@ -28434,7 +28434,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
return this;
},
-
+
afterShow : function(isAnim){
if (this.isDestroyed){
return false;
@@ -28445,7 +28445,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
if(this.maximized){
this.fitContainer();
}
- if(Ext.isMac && Ext.isGecko2){
+ if(Ext.isMac && Ext.isGecko2){
this.cascade(this.setAutoScroll);
}
@@ -28467,7 +28467,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
this.fireEvent('show', this);
},
-
+
animShow : function(){
this.proxy.show();
this.proxy.setBox(this.animateTarget.getBox());
@@ -28483,7 +28483,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
}));
},
-
+
hide : function(animateTarget, cb, scope){
if(this.hidden || this.fireEvent('beforehide', this) === false){
return this;
@@ -28508,7 +28508,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
return this;
},
-
+
afterHide : function(){
this.proxy.hide();
if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){
@@ -28521,7 +28521,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
this.fireEvent('hide', this);
},
-
+
animHide : function(){
this.proxy.setOpacity(0.5);
this.proxy.show();
@@ -28537,13 +28537,13 @@ Ext.Window = Ext.extend(Ext.Panel, {
}));
},
-
+
onShow : Ext.emptyFn,
-
+
onHide : Ext.emptyFn,
-
+
onWindowResize : function(){
if(this.maximized){
this.fitContainer();
@@ -28556,7 +28556,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
this.doConstrain();
},
-
+
doConstrain : function(){
if(this.constrain || this.constrainHeader){
var offsets;
@@ -28581,7 +28581,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
ghost : function(cls){
var ghost = this.createGhost(cls);
var box = this.getBox(true);
@@ -28592,7 +28592,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
return ghost;
},
-
+
unghost : function(show, matchPosition){
if(!this.activeGhost) {
return;
@@ -28600,7 +28600,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
if(show !== false){
this.el.show();
this.focus.defer(10, this);
- if(Ext.isMac && Ext.isGecko2){
+ if(Ext.isMac && Ext.isGecko2){
this.cascade(this.setAutoScroll);
}
}
@@ -28612,13 +28612,13 @@ Ext.Window = Ext.extend(Ext.Panel, {
delete this.activeGhost;
},
-
+
minimize : function(){
this.fireEvent('minimize', this);
return this;
},
-
+
close : function(){
if(this.fireEvent('beforeclose', this) !== false){
if(this.hidden){
@@ -28629,13 +28629,13 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
doClose : function(){
this.fireEvent('close', this);
this.destroy();
},
-
+
maximize : function(){
if(!this.maximized){
this.expand(false);
@@ -28664,7 +28664,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
return this;
},
-
+
restore : function(){
if(this.maximized){
var t = this.tools;
@@ -28696,19 +28696,19 @@ Ext.Window = Ext.extend(Ext.Panel, {
return this;
},
-
+
toggleMaximize : function(){
return this[this.maximized ? 'restore' : 'maximize']();
},
-
+
fitContainer : function(){
var vs = this.container.getViewSize(false);
this.setSize(vs.width, vs.height);
},
-
-
+
+
setZIndex : function(index){
if(this.modal){
this.mask.setStyle('z-index', index);
@@ -28723,14 +28723,14 @@ Ext.Window = Ext.extend(Ext.Panel, {
this.lastZIndex = index;
},
-
+
alignTo : function(element, position, offsets){
var xy = this.el.getAlignToXY(element, position, offsets);
this.setPagePosition(xy[0], xy[1]);
return this;
},
-
+
anchorTo : function(el, alignment, offsets, monitorScroll){
this.clearAnchor();
this.anchorTarget = {
@@ -28748,14 +28748,14 @@ Ext.Window = Ext.extend(Ext.Panel, {
return this.doAnchor();
},
-
+
doAnchor : function(){
var o = this.anchorTarget;
this.alignTo(o.el, o.alignment, o.offsets);
return this;
},
-
+
clearAnchor : function(){
if(this.anchorTarget){
Ext.EventManager.removeResizeListener(this.doAnchor, this);
@@ -28765,7 +28765,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
return this;
},
-
+
toFront : function(e){
if(this.manager.bringToFront(this)){
if(!e || !e.getTarget().focus){
@@ -28775,7 +28775,7 @@ Ext.Window = Ext.extend(Ext.Panel, {
return this;
},
-
+
setActive : function(active){
if(active){
if(!this.maximized){
@@ -28788,33 +28788,33 @@ Ext.Window = Ext.extend(Ext.Panel, {
}
},
-
+
toBack : function(){
this.manager.sendToBack(this);
return this;
},
-
+
center : function(){
var xy = this.el.getAlignToXY(this.container, 'c-c');
this.setPagePosition(xy[0], xy[1]);
return this;
}
-
+
});
Ext.reg('window', Ext.Window);
Ext.Window.DD = Ext.extend(Ext.dd.DD, {
-
+
constructor : function(win){
this.win = win;
Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id);
this.setHandleElId(win.header.id);
- this.scroll = false;
+ this.scroll = false;
},
-
+
moveOnly:true,
headerOffsets:[100, 25],
startDrag : function(){
@@ -28845,12 +28845,12 @@ Ext.WindowGroup = function(){
var accessList = [];
var front = null;
-
+
var sortWindows = function(d1, d2){
return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1;
};
-
+
var orderWindows = function(){
var a = accessList, len = a.length;
if(len > 0){
@@ -28866,7 +28866,7 @@ Ext.WindowGroup = function(){
activateLast();
};
-
+
var setActiveWin = function(win){
if(win != front){
if(front){
@@ -28879,7 +28879,7 @@ Ext.WindowGroup = function(){
}
};
-
+
var activateLast = function(){
for(var i = accessList.length-1; i >=0; --i) {
if(!accessList[i].hidden){
@@ -28887,15 +28887,15 @@ Ext.WindowGroup = function(){
return;
}
}
-
+
setActiveWin(null);
};
return {
-
+
zseed : 9000,
-
+
register : function(win){
if(win.manager){
win.manager.unregister(win);
@@ -28907,7 +28907,7 @@ Ext.WindowGroup = function(){
win.on('hide', activateLast);
},
-
+
unregister : function(win){
delete win.manager;
delete list[win.id];
@@ -28915,12 +28915,12 @@ Ext.WindowGroup = function(){
accessList.remove(win);
},
-
+
get : function(id){
return typeof id == "object" ? id : list[id];
},
-
+
bringToFront : function(win){
win = this.get(win);
if(win != front){
@@ -28931,7 +28931,7 @@ Ext.WindowGroup = function(){
return false;
},
-
+
sendToBack : function(win){
win = this.get(win);
win._lastAccess = -(new Date().getTime());
@@ -28939,7 +28939,7 @@ Ext.WindowGroup = function(){
return win;
},
-
+
hideAll : function(){
for(var id in list){
if(list[id] && typeof list[id] != "function" && list[id].isVisible()){
@@ -28948,12 +28948,12 @@ Ext.WindowGroup = function(){
}
},
-
+
getActive : function(){
return front;
},
-
+
getBy : function(fn, scope){
var r = [];
for(var i = accessList.length-1; i >=0; --i) {
@@ -28965,7 +28965,7 @@ Ext.WindowGroup = function(){
return r;
},
-
+
each : function(fn, scope){
for(var id in list){
if(list[id] && typeof list[id] != "function"){
@@ -28987,7 +28987,7 @@ Ext.MessageBox = function(){
buttons, activeTextEl, bwidth, bufferIcon = '', iconCls = '',
buttonNames = ['ok', 'yes', 'no', 'cancel'];
-
+
var handleButton = function(button){
buttons[button].blur();
if(dlg.isVisible()){
@@ -28997,15 +28997,15 @@ Ext.MessageBox = function(){
}
};
-
+
var handleHide = function(){
if(opt && opt.cls){
dlg.el.removeClass(opt.cls);
}
- progressBar.reset();
+ progressBar.reset();
};
-
+
var handleEsc = function(d, k, e){
if(opt && opt.closable !== false){
dlg.hide();
@@ -29016,7 +29016,7 @@ Ext.MessageBox = function(){
}
};
-
+
var updateButtons = function(b){
var width = 0,
cfg;
@@ -29041,11 +29041,11 @@ Ext.MessageBox = function(){
};
return {
-
+
getDialog : function(titleText){
if(!dlg){
var btns = [];
-
+
buttons = {};
Ext.each(buttonNames, function(name){
btns.push(buttons[name] = new Ext.Button({
@@ -29114,12 +29114,12 @@ Ext.MessageBox = function(){
return dlg;
},
-
+
updateText : function(text){
if(!dlg.isVisible() && !opt.width){
- dlg.setSize(this.maxWidth, 100);
+ dlg.setSize(this.maxWidth, 100);
}
-
+
msgEl.update(text ? text + ' ' : ' ');
var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0,
@@ -29127,7 +29127,7 @@ Ext.MessageBox = function(){
fw = dlg.getFrameWidth('lr'),
bw = dlg.body.getFrameWidth('lr'),
w;
-
+
w = Math.max(Math.min(opt.width || iw+mw+fw+bw, opt.maxWidth || this.maxWidth),
Math.max(opt.minWidth || this.minWidth, bwidth || 0));
@@ -29138,14 +29138,14 @@ Ext.MessageBox = function(){
progressBar.setSize(w-iw-fw-bw);
}
if(Ext.isIE9m && w == bwidth){
- w += 4;
+ w += 4;
}
msgEl.update(text || ' ');
dlg.setSize(w, 'auto').center();
return this;
},
-
+
updateProgress : function(value, progressText, msg){
progressBar.updateProgress(value, progressText);
if(msg){
@@ -29154,27 +29154,27 @@ Ext.MessageBox = function(){
return this;
},
-
+
isVisible : function(){
return dlg && dlg.isVisible();
},
-
+
hide : function(){
var proxy = dlg ? dlg.activeGhost : null;
if(this.isVisible() || proxy){
dlg.hide();
handleHide();
if (proxy){
-
-
+
+
dlg.unghost(false, false);
- }
+ }
}
return this;
},
-
+
show : function(options){
if(this.isVisible()){
this.hide();
@@ -29231,10 +29231,10 @@ Ext.MessageBox = function(){
d.modal = opt.modal !== false;
d.mask = opt.modal !== false ? mask : false;
if(!d.isVisible()){
-
+
document.body.appendChild(dlg.el.dom);
d.setAnimateTarget(opt.animEl);
-
+
d.on('show', function(){
if(allowClose === true){
d.keyMap.enable();
@@ -29250,7 +29250,7 @@ Ext.MessageBox = function(){
return this;
},
-
+
setIcon : function(icon){
if(!dlg){
bufferIcon = icon;
@@ -29270,7 +29270,7 @@ Ext.MessageBox = function(){
return this;
},
-
+
progress : function(title, msg, progressText){
this.show({
title : title,
@@ -29284,7 +29284,7 @@ Ext.MessageBox = function(){
return this;
},
-
+
wait : function(msg, title, config){
this.show({
title : title,
@@ -29299,7 +29299,7 @@ Ext.MessageBox = function(){
return this;
},
-
+
alert : function(title, msg, fn, scope){
this.show({
title : title,
@@ -29312,7 +29312,7 @@ Ext.MessageBox = function(){
return this;
},
-
+
confirm : function(title, msg, fn, scope){
this.show({
title : title,
@@ -29326,7 +29326,7 @@ Ext.MessageBox = function(){
return this;
},
-
+
prompt : function(title, msg, fn, scope, multiline, value){
this.show({
title : title,
@@ -29342,36 +29342,36 @@ Ext.MessageBox = function(){
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",
@@ -29384,39 +29384,39 @@ Ext.MessageBox = function(){
Ext.Msg = Ext.MessageBox;
Ext.dd.PanelProxy = Ext.extend(Object, {
-
+
constructor : function(panel, config){
this.panel = panel;
this.id = this.panel.id +'-ddproxy';
- Ext.apply(this, config);
+ Ext.apply(this, config);
},
-
-
+
+
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){
@@ -29429,7 +29429,7 @@ Ext.dd.PanelProxy = Ext.extend(Object, {
}
},
-
+
show : function(){
if(!this.ghost){
this.ghost = this.panel.createGhost(this.panel.initialConfig.cls, undefined, Ext.getBody());
@@ -29442,7 +29442,7 @@ Ext.dd.PanelProxy = Ext.extend(Object, {
}
},
-
+
repair : function(xy, callback, scope){
this.hide();
if(typeof callback == "function"){
@@ -29450,7 +29450,7 @@ Ext.dd.PanelProxy = Ext.extend(Object, {
}
},
-
+
moveProxy : function(parentNode, before){
if(this.proxy){
parentNode.insertBefore(this.proxy.dom, before);
@@ -29460,7 +29460,7 @@ Ext.dd.PanelProxy = Ext.extend(Object, {
Ext.Panel.DD = Ext.extend(Ext.dd.DragSource, {
-
+
constructor : function(panel, cfg){
this.panel = panel;
this.dragData = {panel: panel};
@@ -29473,9 +29473,9 @@ Ext.Panel.DD = Ext.extend(Ext.dd.DragSource, {
el = panel.header;
}
el.setStyle('cursor', 'move');
- this.scroll = false;
+ this.scroll = false;
},
-
+
showFrame: Ext.emptyFn,
startDrag: Ext.emptyFn,
b4StartDrag: function(x, y) {
@@ -29506,35 +29506,35 @@ Ext.Panel.DD = Ext.extend(Ext.dd.DragSource, {
}
});
Ext.state.Provider = Ext.extend(Ext.util.Observable, {
-
+
constructor : function(){
-
+
this.addEvents("statechange");
this.state = {};
Ext.state.Provider.superclass.constructor.call(this);
},
-
-
+
+
get : function(name, defaultValue){
return typeof this.state[name] == "undefined" ?
defaultValue : this.state[name];
},
-
+
clear : function(name){
delete this.state[name];
this.fireEvent("statechange", this, name, null);
},
-
+
set : function(name, value){
this.state[name] = value;
this.fireEvent("statechange", this, name, value);
},
-
+
decodeValue : function(cookie){
-
+
var re = /^(a|n|d|b|s|o|e)\:(.*)$/,
matches = re.exec(unescape(cookie)),
all,
@@ -29542,7 +29542,7 @@ Ext.state.Provider = Ext.extend(Ext.util.Observable, {
v,
kv;
if(!matches || !matches[1]){
- return;
+ return;
}
type = matches[1];
v = matches[2];
@@ -29577,7 +29577,7 @@ Ext.state.Provider = Ext.extend(Ext.util.Observable, {
}
},
-
+
encodeValue : function(v){
var enc,
flat = '',
@@ -29585,7 +29585,7 @@ Ext.state.Provider = Ext.extend(Ext.util.Observable, {
len,
key;
if(v == null){
- return 'e:1';
+ return 'e:1';
}else if(typeof v == 'number'){
enc = 'n:' + v;
}else if(typeof v == 'boolean'){
@@ -29618,27 +29618,27 @@ Ext.state.Manager = function(){
var provider = new Ext.state.Provider();
return {
-
+
setProvider : function(stateProvider){
provider = stateProvider;
},
-
+
get : function(key, defaultValue){
return provider.get(key, defaultValue);
},
-
+
set : function(key, value){
provider.set(key, value);
},
-
+
clear : function(key){
provider.clear(key);
},
-
+
getProvider : function(){
return provider;
}
@@ -29646,18 +29646,18 @@ Ext.state.Manager = function(){
}();
Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, {
-
+
constructor : function(config){
Ext.state.CookieProvider.superclass.constructor.call(this);
this.path = "/";
- this.expires = new Date(new Date().getTime()+(1000*60*60*24*7));
+ this.expires = new Date(new Date().getTime()+(1000*60*60*24*7));
this.domain = null;
this.secure = false;
Ext.apply(this, config);
this.state = this.readCookies();
},
-
-
+
+
set : function(name, value){
if(typeof value == "undefined" || value === null){
this.clear(name);
@@ -29667,13 +29667,13 @@ Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, {
Ext.state.CookieProvider.superclass.set.call(this, name, value);
},
-
+
clear : function(name){
this.clearCookie(name);
Ext.state.CookieProvider.superclass.clear.call(this, name);
},
-
+
readCookies : function(){
var cookies = {},
c = document.cookie + ";",
@@ -29691,7 +29691,7 @@ Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, {
return cookies;
},
-
+
setCookie : function(name, value){
document.cookie = "ys-"+ name + "=" + this.encodeValue(value) +
((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) +
@@ -29700,7 +29700,7 @@ Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, {
((this.secure == true) ? "; secure" : "");
},
-
+
clearCookie : function(name){
document.cookie = "ys-" + name + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" +
((this.path == null) ? "" : ("; path=" + this.path)) +
@@ -29709,31 +29709,31 @@ Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, {
}
});
Ext.DataView = Ext.extend(Ext.BoxComponent, {
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
selectedClass : "x-view-selected",
-
+
emptyText : "",
-
+
deferEmptyText: true,
-
+
trackOver: false,
-
-
+
+
blockRefresh: false,
-
+
last: false,
-
+
initComponent : function(){
Ext.DataView.superclass.initComponent.call(this);
if(Ext.isString(this.tpl) || Ext.isArray(this.tpl)){
@@ -29741,26 +29741,26 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
this.addEvents(
-
+
"beforeclick",
-
+
"click",
-
+
"mouseenter",
-
+
"mouseleave",
-
+
"containerclick",
-
+
"dblclick",
-
+
"contextmenu",
-
+
"containercontextmenu",
-
+
"selectionchange",
-
+
"beforeselect"
);
@@ -29769,7 +29769,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
this.selected = new Ext.CompositeElementLite();
},
-
+
afterRender : function(){
Ext.DataView.superclass.afterRender.call(this);
@@ -29793,12 +29793,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
refresh : function() {
this.clearSelections(false, true);
var el = this.getTemplateTarget(),
records = this.store.getRange();
-
+
el.update('');
if(records.length < 1){
if(!this.deferEmptyText || this.hasSkippedEmptyText){
@@ -29817,12 +29817,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
return this.el;
},
-
+
prepareData : function(data){
return data;
},
-
+
collectData : function(records, startIndex){
var r = [],
i = 0,
@@ -29833,14 +29833,14 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
return r;
},
-
+
bufferRender : function(records, index){
var div = document.createElement('div');
this.tpl.overwrite(div, this.collectData(records, index));
return Ext.query(this.itemSelector, div);
},
-
+
onUpdate : function(ds, record){
var index = this.store.indexOf(record);
if(index > -1){
@@ -29857,7 +29857,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onAdd : function(ds, records, index){
if(this.all.getCount() === 0){
this.refresh();
@@ -29874,7 +29874,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
this.updateIndexes(index);
},
-
+
onRemove : function(ds, record, index){
this.deselect(index);
this.all.removeElement(index, true);
@@ -29884,12 +29884,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
refreshNode : function(index){
this.onUpdate(this.store, this.store.getAt(index));
},
-
+
updateIndexes : function(startIndex, endIndex){
var ns = this.all.elements;
startIndex = startIndex || 0;
@@ -29898,13 +29898,13 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
ns[i].viewIndex = i;
}
},
-
-
+
+
getStore : function(){
return this.store;
},
-
+
bindStore : function(store, initial){
if(!initial && this.store){
if(store !== this.store && this.store.autoDestroy){
@@ -29938,20 +29938,20 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
this.refresh();
}
},
-
-
+
+
onDataChanged: function() {
if (this.blockRefresh !== true) {
this.refresh.apply(this, arguments);
}
},
-
+
findItemFromChild : function(node){
return Ext.fly(node).findParent(this.itemSelector, this.getTemplateTarget());
},
-
+
onClick : function(e){
var item = e.getTarget(this.itemSelector, this.getTemplateTarget()),
index;
@@ -29971,7 +29971,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
this.clearSelections();
},
-
+
onContextMenu : function(e){
var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
if(item){
@@ -29981,7 +29981,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onDblClick : function(e){
var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
if(item){
@@ -29989,7 +29989,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onMouseOver : function(e){
var item = e.getTarget(this.itemSelector, this.getTemplateTarget());
if(item && item !== this.lastItem){
@@ -29999,7 +29999,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onMouseOut : function(e){
if(this.lastItem){
if(!e.within(this.lastItem, true, true)){
@@ -30010,7 +30010,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onItemClick : function(item, index, e){
if(this.fireEvent("beforeclick", this, index, item, e) === false){
return false;
@@ -30025,7 +30025,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
return true;
},
-
+
doSingleSelection : function(item, index, e){
if(e.ctrlKey && this.isSelected(index)){
this.deselect(index);
@@ -30034,12 +30034,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
doMultiSelection : function(item, index, e){
if(e.shiftKey && this.last !== false){
var last = this.last;
this.selectRange(last, index, e.ctrlKey);
- this.last = last;
+ this.last = last;
}else{
if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){
this.deselect(index);
@@ -30049,52 +30049,52 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
getSelectionCount : function(){
return this.selected.getCount();
},
-
+
getSelectedNodes : function(){
return this.selected.elements;
},
-
+
getSelectedIndexes : function(){
- var indexes = [],
+ var indexes = [],
selected = this.selected.elements,
i = 0,
len = selected.length;
-
+
for(; i < len; i++){
indexes.push(selected[i].viewIndex);
}
return indexes;
},
-
+
getSelectedRecords : function(){
return this.getRecords(this.selected.elements);
},
-
+
getRecords : function(nodes){
- var records = [],
+ var records = [],
i = 0,
len = nodes.length;
-
+
for(; i < len; i++){
records[records.length] = this.store.getAt(nodes[i].viewIndex);
}
return records;
},
-
+
getRecord : function(node){
return this.store.getAt(node.viewIndex);
},
-
+
clearSelections : function(suppressEvent, skipUpdate){
if((this.multiSelect || this.singleSelect) && this.selected.getCount() > 0){
if(!skipUpdate){
@@ -30108,12 +30108,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
isSelected : function(node){
return this.selected.contains(this.getNode(node));
},
-
+
deselect : function(node){
if(this.isSelected(node)){
node = this.getNode(node);
@@ -30126,7 +30126,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
select : function(nodeInfo, keepExisting, suppressEvent){
if(Ext.isArray(nodeInfo)){
if(!keepExisting){
@@ -30156,7 +30156,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
}
},
-
+
selectRange : function(start, end, keepExisting){
if(!keepExisting){
this.clearSelections(true);
@@ -30164,7 +30164,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
this.select(this.getNodes(start, end), true);
},
-
+
getNode : function(nodeInfo){
if(Ext.isString(nodeInfo)){
return document.getElementById(nodeInfo);
@@ -30177,12 +30177,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
return nodeInfo;
},
-
+
getNodes : function(start, end){
var ns = this.all.elements,
nodes = [],
i;
-
+
start = start || 0;
end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end;
if(start <= end){
@@ -30197,7 +30197,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
return nodes;
},
-
+
indexOf : function(node){
node = this.getNode(node);
if(Ext.isNumber(node.viewIndex)){
@@ -30206,7 +30206,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, {
return this.all.indexOf(node);
},
-
+
onBeforeLoad : function(){
if(this.loadingText){
this.clearSelections(false, true);
@@ -30229,25 +30229,25 @@ 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.isIE9m ? 99 : 100,
initComponent : function(){
@@ -30313,7 +30313,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, {
cs = this.columns = columns;
-
+
if(colsWithWidth < len){
var remaining = len - colsWithWidth;
if(allocatedWidth < this.maxColumnWidth){
@@ -30349,7 +30349,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, {
return this.innerBody;
},
-
+
collectData : function(){
var rs = Ext.list.ListView.superclass.collectData.apply(this, arguments);
return {
@@ -30364,13 +30364,13 @@ Ext.list.ListView = Ext.extend(Ext.DataView, {
}
},
-
+
onResize : function(w, h){
var body = this.innerBody.dom,
header = this.innerHd.dom,
scrollWidth = w - Ext.num(this.scrollOffset, Ext.getScrollBarWidth()) + 'px',
parentNode;
-
+
if(!body){
return;
}
@@ -30402,7 +30402,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, {
findHeaderIndex : function(header){
header = header.dom || header;
- var parentNode = header.parentNode,
+ var parentNode = header.parentNode,
children = parentNode.parentNode.childNodes,
i = 0,
c;
@@ -30419,7 +30419,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, {
i = 0,
columns = this.columns,
len = columns.length;
-
+
for(; i < len; i++){
els[i].style.width = (columns[i].width*100) + '%';
}
@@ -30431,24 +30431,24 @@ Ext.reg('listview', Ext.list.ListView);
Ext.ListView = Ext.list.ListView;
Ext.list.Column = Ext.extend(Object, {
-
+
isColumn: true,
-
-
+
+
align: 'left',
-
+
header: '',
-
-
+
+
width: null,
-
+
cls: '',
-
-
-
-
+
+
+
+
constructor : function(c){
if(!c.tpl){
c.tpl = new Ext.XTemplate('{' + c.dataIndex + '}');
@@ -30456,7 +30456,7 @@ Ext.list.Column = Ext.extend(Object, {
else if(Ext.isString(c.tpl)){
c.tpl = new Ext.XTemplate(c.tpl);
}
-
+
Ext.apply(this, c);
}
});
@@ -30465,11 +30465,11 @@ Ext.reg('lvcolumn', Ext.list.Column);
Ext.list.NumberColumn = Ext.extend(Ext.list.Column, {
-
+
format: '0,000.00',
-
+
constructor : function(c) {
- c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':number("' + (c.format || this.format) + '")}');
+ c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':number("' + (c.format || this.format) + '")}');
Ext.list.NumberColumn.superclass.constructor.call(this, c);
}
});
@@ -30480,7 +30480,7 @@ Ext.reg('lvnumbercolumn', Ext.list.NumberColumn);
Ext.list.DateColumn = Ext.extend(Ext.list.Column, {
format: 'm/d/Y',
constructor : function(c) {
- c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':date("' + (c.format || this.format) + '")}');
+ c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':date("' + (c.format || this.format) + '")}');
Ext.list.DateColumn.superclass.constructor.call(this, c);
}
});
@@ -30488,16 +30488,16 @@ Ext.reg('lvdatecolumn', Ext.list.DateColumn);
Ext.list.BooleanColumn = Ext.extend(Ext.list.Column, {
-
+
trueText: 'true',
-
+
falseText: 'false',
-
+
undefinedText: ' ',
-
+
constructor : function(c) {
c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}');
-
+
var t = this.trueText, f = this.falseText, u = this.undefinedText;
c.tpl.format = function(v){
if(v === undefined){
@@ -30508,14 +30508,14 @@ Ext.list.BooleanColumn = Ext.extend(Ext.list.Column, {
}
return t;
};
-
+
Ext.list.DateColumn.superclass.constructor.call(this, c);
}
});
Ext.reg('lvbooleancolumn', Ext.list.BooleanColumn);
Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, {
-
+
minPct: .05,
constructor: function(config){
@@ -30569,28 +30569,28 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, {
},
onStart: function(e){
-
+
var me = this,
view = me.view,
dragHeader = me.dragHd,
- x = me.tracker.getXY()[0];
-
+ x = me.tracker.getXY()[0];
+
me.proxy = view.el.createChild({cls:'x-list-resizer'});
me.dragX = dragHeader.getX();
me.headerIndex = view.findHeaderIndex(dragHeader);
-
+
me.headersDisabled = view.disableHeaders;
view.disableHeaders = true;
-
+
me.proxy.setHeight(view.el.getHeight());
me.proxy.setX(me.dragX);
me.proxy.setWidth(x - me.dragX);
-
+
this.setBoundaries();
-
+
},
-
-
+
+
setBoundaries: function(relativeX){
var view = this.view,
headerIndex = this.headerIndex,
@@ -30603,7 +30603,7 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, {
minX = minWidth + relativeX,
maxX = maxWidth + relativeX,
header;
-
+
if (numColumns == 2) {
this.minX = minX;
this.maxX = maxX;
@@ -30612,10 +30612,10 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, {
this.minX = headers.item(headerIndex).getX() + minWidth;
this.maxX = header ? header.getX() - minWidth : maxX;
if (headerIndex == 0) {
-
+
this.minX = minX;
} else if (headerIndex == numColumns - 2) {
-
+
this.maxX = maxX;
}
}
@@ -30624,12 +30624,12 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, {
onDrag: function(e){
var me = this,
cursorX = me.tracker.getXY()[0].constrain(me.minX, me.maxX);
-
+
me.proxy.setWidth(cursorX - this.dragX);
},
onEnd: function(e){
-
+
var newWidth = this.proxy.getWidth(),
index = this.headerIndex,
view = this.view,
@@ -30645,11 +30645,11 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, {
headerCol.width = newPercent;
otherCol.width = totalPercent - newPercent;
-
+
delete this.dragHd;
view.setHdWidths();
view.refresh();
-
+
setTimeout(function(){
view.disableHeaders = disabled;
}, 100);
@@ -30659,7 +30659,7 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, {
Ext.ListView.ColumnResizer = Ext.list.ColumnResizer;
Ext.list.Sorter = Ext.extend(Ext.util.Observable, {
-
+
sortClasses : ["sort-asc", "sort-desc"],
constructor: function(config){
@@ -30716,68 +30716,68 @@ Ext.list.Sorter = Ext.extend(Ext.util.Observable, {
Ext.ListView.Sorter = Ext.list.Sorter;
Ext.TabPanel = Ext.extend(Ext.Panel, {
-
-
-
+
+
+
deferredRender : true,
-
+
tabWidth : 120,
-
+
minTabWidth : 30,
-
+
resizeTabs : false,
-
+
enableTabScroll : false,
-
+
scrollIncrement : 0,
-
+
scrollRepeatInterval : 400,
-
+
scrollDuration : 0.35,
-
+
animScroll : true,
-
+
tabPosition : 'top',
-
+
baseCls : 'x-tab-panel',
-
+
autoTabs : false,
-
+
autoTabSelector : 'div.x-tab',
-
+
activeTab : undefined,
-
+
tabMargin : 2,
-
+
plain : false,
-
+
wheelIncrement : 20,
-
+
idDelimiter : '__',
-
+
itemCls : 'x-tab-item',
-
+
elements : 'body',
headerAsText : false,
frame : false,
hideBorders :true,
-
+
initComponent : function(){
this.frame = false;
Ext.TabPanel.superclass.initComponent.call(this);
this.addEvents(
-
+
'beforetabchange',
-
+
'tabchange',
-
+
'contextmenu'
);
-
+
this.setLayout(new Ext.layout.CardLayout(Ext.apply({
layoutOnCardChange: this.layoutOnTabChange,
deferredRender: this.deferredRender
@@ -30796,7 +30796,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
this.initItems();
},
-
+
onRender : function(ct, position){
Ext.TabPanel.superclass.onRender.call(this, ct, position);
@@ -30814,13 +30814,13 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
st.createChild({cls:'x-tab-strip-spacer'}, beforeEl);
this.strip = new Ext.Element(this.stripWrap.dom.firstChild);
-
+
this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge', cn: [{tag: 'span', cls: 'x-tab-strip-text', cn: ' '}]});
this.strip.createChild({cls:'x-clear'});
this.body.addClass('x-tab-panel-body-'+this.tabPosition);
-
+
if(!this.itemTpl){
var tt = new Ext.Template(
' ',
@@ -30836,7 +30836,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
this.items.each(this.initTab, this);
},
-
+
afterRender : function(){
Ext.TabPanel.superclass.afterRender.call(this);
if(this.autoTabs){
@@ -30849,7 +30849,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
initEvents : function(){
Ext.TabPanel.superclass.initEvents.call(this);
this.mon(this.strip, {
@@ -30862,7 +30862,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
findTargets : function(e){
var item = null,
itemEl = e.getTarget('li:not(.x-tab-edge)', this.strip);
@@ -30884,7 +30884,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
};
},
-
+
onStripMouseDown : function(e){
if(e.button !== 0){
return;
@@ -30903,7 +30903,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onStripContextMenu : function(e){
e.preventDefault();
var t = this.findTargets(e);
@@ -30912,7 +30912,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
readTabs : function(removeExisting){
if(removeExisting === true){
this.items.each(function(item){
@@ -30931,7 +30931,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
initTab : function(item, index){
var before = this.strip.dom.childNodes[index],
p = this.getTemplateArgs(item),
@@ -30954,7 +30954,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
item.tabEl = el;
-
+
tabEl.select('a').on('click', function(e){
if(!e.getPageX()){
this.onStripMouseDown(e);
@@ -30973,7 +30973,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
-
+
getTemplateArgs : function(item) {
var cls = item.closable ? 'x-tab-strip-closable' : '';
if(item.disabled){
@@ -30994,7 +30994,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
};
},
-
+
onAdd : function(c){
Ext.TabPanel.superclass.onAdd.call(this, c);
if(this.rendered){
@@ -31004,7 +31004,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onBeforeAdd : function(item){
var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item);
if(existing){
@@ -31017,10 +31017,10 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
item.border = (item.border === true);
},
-
+
onRemove : function(c){
var te = Ext.get(c.tabEl);
-
+
if(te){
te.select('a').removeAllListeners();
Ext.destroy(te);
@@ -31048,7 +31048,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onBeforeShowItem : function(item){
if(item != this.activeTab){
this.setActiveTab(item);
@@ -31056,7 +31056,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onItemDisabled : function(item){
var el = this.getTabEl(item);
if(el){
@@ -31065,7 +31065,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
this.stack.remove(item);
},
-
+
onItemEnabled : function(item){
var el = this.getTabEl(item);
if(el){
@@ -31073,7 +31073,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onItemTitleChanged : function(item){
var el = this.getTabEl(item);
if(el){
@@ -31082,7 +31082,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onItemIconChanged : function(item, iconCls, oldCls){
var el = this.getTabEl(item);
if(el){
@@ -31093,30 +31093,30 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
getTabEl : function(item){
var c = this.getComponent(item);
return c ? c.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(item){
item = this.getComponent(item);
var el = this.getTabEl(item);
@@ -31127,7 +31127,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
this.stack.remove(item);
},
-
+
unhideTabStripItem : function(item){
item = this.getComponent(item);
var el = this.getTabEl(item);
@@ -31137,7 +31137,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
delegateUpdates : function(){
var rendered = this.rendered;
if(this.suspendUpdates){
@@ -31151,18 +31151,18 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
autoSizeTabs : function(){
var count = this.items.length,
ce = this.tabPosition != 'bottom' ? 'header' : 'footer',
ow = this[ce].dom.offsetWidth,
aw = this[ce].dom.clientWidth;
- if(!this.resizeTabs || count < 1 || !aw){
+ if(!this.resizeTabs || count < 1 || !aw){
return;
}
- var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth);
+ var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth);
this.lastTabWidth = each;
var lis = this.strip.query('li:not(.x-tab-edge)');
for(var i = 0, len = lis.length; i < len; i++) {
@@ -31174,7 +31174,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
adjustBodyWidth : function(w){
if(this.header){
this.header.setWidth(w);
@@ -31185,7 +31185,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
return w;
},
-
+
setActiveTab : function(item){
item = this.getComponent(item);
if(this.fireEvent('beforetabchange', this, item, this.activeTab) === false){
@@ -31209,7 +31209,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
this.stack.add(item);
this.layout.setActiveItem(item);
-
+
this.delegateUpdates();
if(this.scrolling){
this.scrollToTab(item, this.animScroll);
@@ -31219,17 +31219,17 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
getActiveTab : function(){
return this.activeTab || null;
},
-
+
getItem : function(item){
return this.getComponent(item);
},
-
+
autoScrollTabs : function(){
this.pos = this.tabPosition=='bottom' ? this.footer : this.header;
var count = this.items.length,
@@ -31241,11 +31241,11 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
pos = this.getScrollPos(),
l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos;
- if(!this.enableTabScroll || cw < 20){
+ if(!this.enableTabScroll || cw < 20){
return;
}
if(count == 0 || l <= tw){
-
+
wd.scrollLeft = 0;
wrap.setWidth(tw);
if(this.scrolling){
@@ -31253,7 +31253,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
this.pos.removeClass('x-tab-scrolling');
this.scrollLeft.hide();
this.scrollRight.hide();
-
+
if(Ext.isAir || Ext.isWebKit){
wd.style.marginLeft = '';
wd.style.marginRight = '';
@@ -31262,7 +31262,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}else{
if(!this.scrolling){
this.pos.addClass('x-tab-scrolling');
-
+
if(Ext.isAir || Ext.isWebKit){
wd.style.marginLeft = '18px';
wd.style.marginRight = '18px';
@@ -31279,21 +31279,21 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
}
this.scrolling = true;
- if(pos > (l-tw)){
+ if(pos > (l-tw)){
wd.scrollLeft = l-tw;
- }else{
+ }else{
this.scrollToTab(this.activeTab, false);
}
this.updateScrollButtons();
}
},
-
+
createScrollers : function(){
this.pos.addClass('x-tab-scrolling-' + this.tabPosition);
var h = this.stripWrap.dom.offsetHeight;
-
+
var sl = this.pos.insertFirst({
cls:'x-tab-scroller-left'
});
@@ -31306,7 +31306,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
});
this.scrollLeft = sl;
-
+
var sr = this.pos.insertFirst({
cls:'x-tab-scroller-right'
});
@@ -31320,32 +31320,32 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
this.scrollRight = sr;
},
-
+
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(item, animate){
if(!item){
@@ -31363,7 +31363,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
scrollTo : function(pos, animate){
this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false);
if(!animate){
@@ -31385,7 +31385,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onScrollRight : function(){
var sw = this.getScrollWidth()-this.getScrollArea(),
pos = this.getScrollPos(),
@@ -31395,7 +31395,7 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onScrollLeft : function(){
var pos = this.getScrollPos(),
s = Math.max(0, pos - this.getScrollIncrement());
@@ -31404,14 +31404,14 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
}
},
-
+
updateScrollButtons : function(){
var pos = this.getScrollPos();
this.scrollLeft[pos === 0 ? 'addClass' : 'removeClass']('x-tab-scroller-left-disabled');
this.scrollRight[pos >= (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');
@@ -31419,18 +31419,18 @@ Ext.TabPanel = Ext.extend(Ext.Panel, {
Ext.TabPanel.superclass.beforeDestroy.apply(this);
}
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
});
Ext.reg('tabpanel', Ext.TabPanel);
@@ -31465,99 +31465,99 @@ Ext.TabPanel.AccessStack = function(){
};
Ext.Button = Ext.extend(Ext.BoxComponent, {
-
+
hidden : false,
-
+
disabled : false,
-
+
pressed : false,
-
-
-
+
+
+
enableToggle : false,
-
-
-
+
+
+
menuAlign : 'tl-bl?',
-
-
-
+
+
+
type : 'button',
-
+
menuClassTarget : 'tr:nth(2)',
-
+
clickEvent : 'click',
-
+
handleMouseEvents : true,
-
+
tooltipType : 'qtip',
-
+
buttonSelector : 'button:first-child',
-
+
scale : 'small',
-
-
+
+
iconAlign : 'left',
-
+
arrowAlign : 'right',
-
-
-
-
+
+
+
+
initComponent : function(){
if(this.menu){
-
-
+
+
if (Ext.isArray(this.menu)){
this.menu = { items: this.menu };
}
-
-
-
+
+
+
if (Ext.isObject(this.menu)){
this.menu.ownerCt = this;
}
-
+
this.menu = Ext.menu.MenuMgr.get(this.menu);
this.menu.ownerCt = undefined;
}
-
+
Ext.Button.superclass.initComponent.call(this);
this.addEvents(
-
+
'click',
-
+
'toggle',
-
+
'mouseover',
-
+
'mouseout',
-
+
'menushow',
-
+
'menuhide',
-
+
'menutriggerover',
-
+
'menutriggerout'
);
-
+
if(Ext.isString(this.toggleGroup)){
this.enableToggle = true;
}
@@ -31568,7 +31568,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return [this.type, 'x-btn-' + this.scale + ' x-btn-icon-' + this.scale + '-' + this.iconAlign, this.getMenuClass(), this.cls, this.id];
},
-
+
setButtonClass : function(){
if(this.useSetClass){
if(!Ext.isEmpty(this.oldCls)){
@@ -31579,16 +31579,16 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}
},
-
+
getMenuClass : function(){
return this.menu ? (this.arrowAlign != 'bottom' ? 'x-btn-arrow' : 'x-btn-arrow-bottom') : '';
},
-
+
onRender : function(ct, position){
if(!this.template){
if(!Ext.Button.buttonTemplate){
-
+
Ext.Button.buttonTemplate = new Ext.Template(
'',
' ',
@@ -31607,7 +31607,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}else{
btn = this.template.append(ct, targs, true);
}
-
+
this.btnEl = btn.child(this.buttonSelector);
this.mon(this.btnEl, {
scope: this,
@@ -31620,7 +31620,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
Ext.ButtonToggleMgr.register(this);
},
-
+
initButtonEl : function(btn, btnEl){
this.el = btn;
this.setIcon(this.icon);
@@ -31640,8 +31640,8 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
mousedown: this.onMouseDown
});
-
-
+
+
}
if(this.menu){
@@ -31660,7 +31660,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}
},
-
+
afterRender : function(){
Ext.Button.superclass.afterRender.call(this);
this.useSetClass = true;
@@ -31669,7 +31669,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
this.doAutoWidth();
},
-
+
setIconClass : function(cls){
this.iconCls = cls;
if(this.el){
@@ -31680,7 +31680,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
setTooltip : function(tooltip, initial){
if(this.rendered){
if(!initial){
@@ -31700,14 +31700,14 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
clearTip : function(){
if(Ext.isObject(this.tooltip)){
Ext.QuickTips.unregister(this.btnEl);
}
},
-
+
beforeDestroy : function(){
if(this.rendered){
this.clearTip();
@@ -31718,7 +31718,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
Ext.destroy(this.repeater);
},
-
+
onDestroy : function(){
if(this.rendered){
this.doc.un('mouseover', this.monitorMouseOver, this);
@@ -31730,7 +31730,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
Ext.Button.superclass.onDestroy.call(this);
},
-
+
doAutoWidth : function(){
if(this.autoWidth !== false && this.el && this.text && this.width === undefined){
this.el.setWidth('auto');
@@ -31749,14 +31749,14 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}
},
-
+
setHandler : function(handler, scope){
this.handler = handler;
this.scope = scope;
return this;
},
-
+
setText : function(text){
this.text = text;
if(this.el){
@@ -31767,7 +31767,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
setIcon : function(icon){
this.icon = icon;
if(this.el){
@@ -31777,12 +31777,12 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
getText : function(){
return this.text;
},
-
+
toggle : function(state, suppressEvent){
state = state === undefined ? !this.pressed : !!state;
if(state != this.pressed){
@@ -31800,12 +31800,12 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
onDisable : function(){
this.onDisableChange(true);
},
-
+
onEnable : function(){
this.onDisableChange(false);
},
@@ -31820,7 +31820,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
this.disabled = disabled;
},
-
+
showMenu : function(){
if(this.rendered && this.menu){
if(this.tooltip){
@@ -31835,7 +31835,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
hideMenu : function(){
if(this.hasVisibleMenu()){
this.menu.hide();
@@ -31843,17 +31843,17 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
hasVisibleMenu : function(){
return this.menu && this.menu.ownerCt == this && this.menu.isVisible();
},
-
-
+
+
onRepeatClick : function(repeat, e){
this.onClick(e);
},
-
+
onClick : function(e){
if(e){
e.preventDefault();
@@ -31868,30 +31868,30 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}
this.fireEvent('click', this, e);
if(this.handler){
-
+
this.handler.call(this.scope || this, this, e);
}
}
},
-
-
+
+
doToggle: function(){
if (this.enableToggle && (this.allowDepress !== false || !this.pressed)) {
this.toggle();
}
},
-
+
isMenuTriggerOver : function(e, internal){
return this.menu && !internal;
},
-
+
isMenuTriggerOut : function(e, internal){
return this.menu && !internal;
},
-
+
onMouseOver : function(e){
if(!this.disabled){
var internal = e.within(this.el, true);
@@ -31909,7 +31909,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}
},
-
+
monitorMouseOver : function(e){
if(e.target != this.el.dom && !e.within(this.el)){
if(this.monitoringMouseOver){
@@ -31920,7 +31920,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}
},
-
+
onMouseOut : function(e){
var internal = e.within(this.el) && e.target != this.el.dom;
this.el.removeClass('x-btn-over');
@@ -31938,37 +31938,37 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
this.btnEl.blur();
},
-
+
onFocus : function(e){
if(!this.disabled){
this.el.addClass('x-btn-focus');
}
},
-
+
onBlur : function(e){
this.el.removeClass('x-btn-focus');
},
-
+
getClickEl : function(e, isUp){
return this.el;
},
-
+
onMouseDown : function(e){
if(!this.disabled && e.button === 0){
this.getClickEl(e).addClass('x-btn-click');
this.doc.on('mouseup', this.onMouseUp, this);
}
},
-
+
onMouseUp : function(e){
if(e.button === 0){
this.getClickEl(e, true).removeClass('x-btn-click');
this.doc.un('mouseup', this.onMouseUp, this);
}
},
-
+
onMenuShow : function(e){
if(this.menu.ownerCt == this){
this.menu.ownerCt = this;
@@ -31977,7 +31977,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
this.fireEvent('menushow', this, this.menu);
}
},
-
+
onMenuHide : function(e){
if(this.menu.ownerCt == this){
this.el.removeClass('x-btn-menu-active');
@@ -31987,17 +31987,17 @@ Ext.Button = Ext.extend(Ext.BoxComponent, {
}
},
-
+
restoreClick : function(){
this.ignoreNextClick = 0;
}
-
-
-
-
-
-
+
+
+
+
+
+
});
Ext.reg('button', Ext.Button);
@@ -32040,7 +32040,7 @@ Ext.ButtonToggleMgr = function(){
}
},
-
+
getPressed : function(group){
var g = groups[group];
if(g){
@@ -32056,18 +32056,18 @@ Ext.ButtonToggleMgr = function(){
}();
Ext.SplitButton = Ext.extend(Ext.Button, {
-
+
arrowSelector : 'em',
split: true,
-
+
initComponent : function(){
Ext.SplitButton.superclass.initComponent.call(this);
-
+
this.addEvents("arrowclick");
},
-
+
onRender : function(){
Ext.SplitButton.superclass.onRender.apply(this, arguments);
if(this.arrowTooltip){
@@ -32075,7 +32075,7 @@ Ext.SplitButton = Ext.extend(Ext.Button, {
}
},
-
+
setArrowHandler : function(handler, scope){
this.arrowHandler = handler;
this.scope = scope;
@@ -32095,7 +32095,7 @@ Ext.SplitButton = Ext.extend(Ext.Button, {
}
},
-
+
onClick : function(e, t){
e.preventDefault();
if(!this.disabled){
@@ -32117,12 +32117,12 @@ Ext.SplitButton = Ext.extend(Ext.Button, {
}
},
-
+
isMenuTriggerOver : function(e){
return this.menu && e.target.tagName == this.arrowSelector;
},
-
+
isMenuTriggerOut : function(e, internal){
return this.menu && e.target.tagName != this.arrowSelector;
}
@@ -32130,14 +32130,14 @@ Ext.SplitButton = Ext.extend(Ext.Button, {
Ext.reg('splitbutton', Ext.SplitButton);
Ext.CycleButton = Ext.extend(Ext.SplitButton, {
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
getItemText : function(item){
if(item && this.showText === true){
var text = '';
@@ -32150,7 +32150,7 @@ Ext.CycleButton = Ext.extend(Ext.SplitButton, {
return undefined;
},
-
+
setActiveItem : function(item, suppressEvent){
if(!Ext.isObject(item)){
item = this.menu.getComponent(item);
@@ -32179,15 +32179,15 @@ Ext.CycleButton = Ext.extend(Ext.SplitButton, {
}
},
-
+
getActiveItem : function(){
return this.activeItem;
},
-
+
initComponent : function(){
this.addEvents(
-
+
"change"
);
@@ -32218,28 +32218,28 @@ Ext.CycleButton = Ext.extend(Ext.SplitButton, {
this.setActiveItem(checked, true);
},
-
+
checkHandler : function(item, pressed){
if(pressed){
this.setActiveItem(item);
}
},
-
+
toggleSelected : function(){
var m = this.menu;
m.render();
-
+
if(!m.hasLayout){
m.doLayout();
}
-
+
var nextIdx, checkItem;
for (var i = 1; i < this.itemCount; i++) {
nextIdx = (this.activeItem.itemIndex + i) % this.itemCount;
-
+
checkItem = m.items.itemAt(nextIdx);
-
+
if (!checkItem.disabled) {
checkItem.setChecked(true);
break;
@@ -32270,12 +32270,12 @@ Ext.extend(T, Ext.Container, {
defaultType: 'button',
-
+
enableOverflow : false,
-
-
+
+
trackMenus : true,
internalDefaults: {removeMode: 'container', hideParent: true},
@@ -32284,11 +32284,11 @@ Ext.extend(T, Ext.Container, {
initComponent : function(){
T.superclass.initComponent.call(this);
-
+
this.addEvents('overflowchange');
},
-
+
onRender : function(ct, position){
if(!this.el){
if(!this.autoCreate){
@@ -32301,9 +32301,9 @@ Ext.extend(T, Ext.Container, {
}
},
-
-
+
+
lookupComponent : function(c){
if(Ext.isString(c)){
if(c == '-'){
@@ -32317,20 +32317,20 @@ Ext.extend(T, Ext.Container, {
}
this.applyDefaults(c);
}else{
- if(c.isFormField || c.render){
+ if(c.isFormField || c.render){
c = this.createComponent(c);
- }else if(c.tag){
+ }else if(c.tag){
c = new T.Item({autoEl: c});
- }else if(c.tagName){
+ }else if(c.tagName){
c = new T.Item({el:c});
- }else if(Ext.isObject(c)){
+ }else if(Ext.isObject(c)){
c = c.xtype ? this.createComponent(c) : this.constructButton(c);
}
}
return c;
},
-
+
applyDefaults : function(c){
if(!Ext.isString(c)){
c = Ext.Toolbar.superclass.applyDefaults.call(this, c);
@@ -32345,32 +32345,32 @@ Ext.extend(T, Ext.Container, {
return c;
},
-
+
addSeparator : function(){
return this.add(new T.Separator());
},
-
+
addSpacer : function(){
return this.add(new T.Spacer());
},
-
+
addFill : function(){
this.add(new T.Fill());
},
-
+
addElement : function(el){
return this.addItem(new T.Item({el:el}));
},
-
+
addItem : function(item){
return this.add.apply(this, arguments);
},
-
+
addButton : function(config){
if(Ext.isArray(config)){
var buttons = [];
@@ -32382,22 +32382,22 @@ Ext.extend(T, Ext.Container, {
return this.add(this.constructButton(config));
},
-
+
addText : function(text){
return this.addItem(new T.TextItem(text));
},
-
+
addDom : function(config){
return this.add(new T.Item({autoEl: config}));
},
-
+
addField : function(field){
return this.add(field);
},
-
+
insertButton : function(index, item){
if(Ext.isArray(item)){
var buttons = [];
@@ -32409,7 +32409,7 @@ Ext.extend(T, Ext.Container, {
return Ext.Toolbar.superclass.insert.call(this, index, item);
},
-
+
trackMenu : function(item, remove){
if(this.trackMenus && item.menu){
var method = remove ? 'mun' : 'mon';
@@ -32419,13 +32419,13 @@ Ext.extend(T, Ext.Container, {
}
},
-
+
constructButton : function(item){
var b = item.events ? item : this.createComponent(item, item.split ? 'splitbutton' : this.defaultType);
return b;
},
-
+
onAdd : function(c){
Ext.Toolbar.superclass.onAdd.call(this);
this.trackMenu(c);
@@ -32434,7 +32434,7 @@ Ext.extend(T, Ext.Container, {
}
},
-
+
onRemove : function(c){
Ext.Toolbar.superclass.onRemove.call(this);
if (c == this.activeMenuBtn) {
@@ -32443,7 +32443,7 @@ Ext.extend(T, Ext.Container, {
this.trackMenu(c, true);
},
-
+
onDisable : function(){
this.items.each(function(item){
if(item.disable){
@@ -32452,7 +32452,7 @@ Ext.extend(T, Ext.Container, {
});
},
-
+
onEnable : function(){
this.items.each(function(item){
if(item.enable){
@@ -32461,7 +32461,7 @@ Ext.extend(T, Ext.Container, {
});
},
-
+
onButtonTriggerOver : function(btn){
if(this.activeMenuBtn && this.activeMenuBtn != btn){
this.activeMenuBtn.hideMenu();
@@ -32470,12 +32470,12 @@ Ext.extend(T, Ext.Container, {
}
},
-
+
onButtonMenuShow : function(btn){
this.activeMenuBtn = btn;
},
-
+
onButtonMenuHide : function(btn){
delete this.activeMenuBtn;
}
@@ -32484,11 +32484,11 @@ Ext.reg('toolbar', Ext.Toolbar);
T.Item = Ext.extend(Ext.BoxComponent, {
- hideParent: true,
+ hideParent: true,
enable:Ext.emptyFn,
disable:Ext.emptyFn,
focus:Ext.emptyFn
-
+
});
Ext.reg('tbitem', T.Item);
@@ -32502,7 +32502,7 @@ Ext.reg('tbseparator', T.Separator);
T.Spacer = Ext.extend(T.Item, {
-
+
onRender : function(ct, position){
this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position);
@@ -32512,7 +32512,7 @@ Ext.reg('tbspacer', T.Spacer);
T.Fill = Ext.extend(T.Item, {
-
+
render : Ext.emptyFn,
isFill : true
});
@@ -32520,19 +32520,19 @@ Ext.reg('tbfill', T.Fill);
T.TextItem = Ext.extend(T.Item, {
-
+
constructor: function(config){
T.TextItem.superclass.constructor.call(this, Ext.isString(config) ? {text: config} : config);
},
-
+
onRender : function(ct, position) {
this.autoEl = {cls: 'xtb-text', html: this.text || ''};
T.TextItem.superclass.onRender.call(this, ct, position);
},
-
+
setText : function(t) {
if(this.rendered){
this.el.update(t);
@@ -32552,13 +32552,13 @@ Ext.reg('tbsplit', T.SplitButton);
})();
Ext.ButtonGroup = Ext.extend(Ext.Panel, {
-
-
+
+
baseCls: 'x-btn-group',
-
+
layout:'table',
defaultType: 'button',
-
+
frame: true,
internalDefaults: {removeMode: 'container', hideParent: true},
@@ -32591,7 +32591,7 @@ Ext.ButtonGroup = Ext.extend(Ext.Panel, {
this.body.setWidth(bodyWidth);
this.el.setWidth(bodyWidth + this.getFrameWidth());
}
-
+
});
Ext.reg('buttongroup', Ext.ButtonGroup);
@@ -32601,35 +32601,35 @@ Ext.reg('buttongroup', Ext.ButtonGroup);
var T = Ext.Toolbar;
Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
-
-
-
+
+
+
pageSize : 20,
-
-
+
+
displayMsg : 'Displaying {0} - {1} of {2}',
-
+
emptyMsg : 'No data to display',
-
+
beforePageText : 'Page',
-
+
afterPageText : 'of {0}',
-
+
firstText : 'First Page',
-
+
prevText : 'Previous Page',
-
+
nextText : 'Next Page',
-
+
lastText : 'Last Page',
-
+
refreshText : 'Refresh',
-
-
-
+
+
+
initComponent : function(){
var pagingItems = [this.first = new T.Button({
@@ -32697,9 +32697,9 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
}
Ext.PagingToolbar.superclass.initComponent.call(this);
this.addEvents(
-
+
'change',
-
+
'beforechange'
);
this.on('afterlayout', this.onFirstLayout, this, {single: true});
@@ -32707,14 +32707,14 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
this.bindStore(this.store, true);
},
-
+
onFirstLayout : function(){
if(this.dsLoaded){
this.onLoad.apply(this, this.dsLoaded);
}
},
-
+
updateInfo : function(){
if(this.displayItem){
var count = this.store.getCount();
@@ -32728,7 +32728,7 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
}
},
-
+
onLoad : function(store, r, o){
if(!this.rendered){
this.dsLoaded = [store, r, o];
@@ -32749,7 +32749,7 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
this.fireEvent('change', this, d);
},
-
+
getPageData : function(){
var total = this.store.getTotalCount();
return {
@@ -32759,12 +32759,12 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
};
},
-
+
changePage : function(page){
this.doLoad(((page-1) * this.pageSize).constrain(0, this.store.getTotalCount()));
},
-
+
onLoadError : function(){
if(!this.rendered){
return;
@@ -32772,7 +32772,7 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
this.refresh.enable();
},
-
+
readPage : function(d){
var v = this.inputItem.getValue(), pageNum;
if (!v || isNaN(pageNum = parseInt(v, 10))) {
@@ -32786,12 +32786,12 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
this.inputItem.select();
},
-
+
onPagingBlur : function(e){
this.inputItem.setValue(this.getPageData().activePage);
},
-
+
onPagingKeyDown : function(field, e){
var k = e.getKey(), d = this.getPageData(), pageNum;
if (k == e.RETURN) {
@@ -32820,20 +32820,20 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
}
},
-
+
getParams : function(){
-
+
return this.paramNames || this.store.paramNames;
},
-
+
beforeLoad : function(){
if(this.rendered && this.refresh){
this.refresh.disable();
}
},
-
+
doLoad : function(start){
var o = {}, pn = this.getParams();
o[pn.start] = start;
@@ -32843,22 +32843,22 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
}
},
-
+
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 total = this.store.getTotalCount(),
extra = total % this.pageSize;
@@ -32866,12 +32866,12 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
this.doLoad(extra ? (total - extra) : total - this.pageSize);
},
-
+
doRefresh : function(){
this.doLoad(this.cursor);
},
-
+
bindStore : function(store, initial){
var doLoad;
if(!initial && this.store){
@@ -32902,17 +32902,17 @@ Ext.PagingToolbar = Ext.extend(Ext.Toolbar, {
}
},
-
+
unbind : function(store){
this.bindStore(null);
},
-
+
bind : function(store){
this.bindStore(store);
},
-
+
onDestroy : function(){
this.bindStore(null);
Ext.PagingToolbar.superclass.onDestroy.call(this);
@@ -32929,7 +32929,7 @@ Ext.History = (function () {
function getHash() {
var href = location.href, i = href.indexOf("#"),
hash = i >= 0 ? href.substr(i + 1) : null;
-
+
if (Ext.isGecko) {
hash = decodeURIComponent(hash);
}
@@ -33018,14 +33018,14 @@ Ext.History = (function () {
}
return {
-
+
fieldId: 'x-history-field',
-
+
iframeId: 'x-history-frame',
events:{},
-
+
init: function (onReady, scope) {
if(ready) {
Ext.callback(onReady, scope, [this]);
@@ -33042,9 +33042,9 @@ Ext.History = (function () {
iframe = Ext.getDom(Ext.History.iframeId);
}
this.addEvents(
-
+
'ready',
-
+
'change'
);
if(onReady){
@@ -33053,7 +33053,7 @@ Ext.History = (function () {
startUp();
},
-
+
add: function (token, preventDup) {
if(preventDup !== false){
if(this.getToken() == token){
@@ -33068,17 +33068,17 @@ Ext.History = (function () {
}
},
-
+
back: function(){
history.go(-1);
},
-
+
forward: function(){
history.go(1);
},
-
+
getToken: function() {
return ready ? currentToken : getHash();
}
@@ -33086,20 +33086,20 @@ Ext.History = (function () {
})();
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',
@@ -33108,7 +33108,7 @@ Ext.Tip = Ext.extend(Ext.Panel, {
closeAction: 'hide',
-
+
initComponent : function(){
Ext.Tip.superclass.initComponent.call(this);
if(this.closable && !this.title){
@@ -33116,7 +33116,7 @@ Ext.Tip = Ext.extend(Ext.Panel, {
}
},
-
+
afterRender : function(){
Ext.Tip.superclass.afterRender.call(this);
if(this.closable){
@@ -33128,7 +33128,7 @@ Ext.Tip = Ext.extend(Ext.Panel, {
}
},
-
+
showAt : function(xy){
Ext.Tip.superclass.show.call(this);
if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){
@@ -33140,7 +33140,7 @@ Ext.Tip = Ext.extend(Ext.Panel, {
this.setPagePosition(xy[0], xy[1]);
},
-
+
doAutoWidth : function(adjust){
adjust = adjust || 0;
var bw = this.body.getTextWidth();
@@ -33149,15 +33149,15 @@ Ext.Tip = Ext.extend(Ext.Panel, {
}
bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + adjust;
this.setWidth(bw.constrain(this.minWidth, this.maxWidth));
-
-
+
+
if(Ext.isIE7 && !this.repainted){
this.el.repaint();
this.repainted = true;
}
},
-
+
showBy : function(el, pos){
if(!this.rendered){
this.render(Ext.getBody());
@@ -33194,30 +33194,30 @@ Ext.extend(Ext.Tip.DD, Ext.dd.DD, {
}
});
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();
@@ -33225,7 +33225,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
this.origAnchor = this.anchor;
},
-
+
onRender : function(ct, position){
Ext.ToolTip.superclass.onRender.call(this, ct, position);
this.anchorCls = 'x-tip-anchor-' + this.getAnchorPosition();
@@ -33234,13 +33234,13 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
});
},
-
+
afterRender : function(){
Ext.ToolTip.superclass.afterRender.call(this);
this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1).setVisibilityMode(Ext.Element.DISPLAY);
},
-
+
initTarget : function(target){
var t;
if((t = Ext.get(target))){
@@ -33263,7 +33263,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
onMouseMove : function(e){
var t = this.delegate ? e.getTarget(this.delegate) : this.triggerElement = true;
if (t) {
@@ -33282,7 +33282,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
getTargetXY : function(){
if(this.delegate){
this.anchorTarget = this.triggerElement;
@@ -33299,7 +33299,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
scrollY = (de.scrollTop || bd.scrollTop || 0) + 5,
axy = [xy[0] + offsets[0], xy[1] + offsets[1]],
sz = this.getSize();
-
+
this.anchorEl.removeClass(this.anchorCls);
if(this.targetCounter < 2){
@@ -33356,7 +33356,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
return offset;
},
-
+
getAnchorPosition : function(){
if(this.anchor){
this.tipAnchor = this.anchor.charAt(0);
@@ -33376,7 +33376,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
return 'left';
},
-
+
getAnchorAlign : function(){
switch(this.anchor){
case 'top' : return 'tl-bl';
@@ -33386,9 +33386,9 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
getOffsets : function(){
- var offsets,
+ var offsets,
ap = this.getAnchorPosition().charAt(0);
if(this.anchorToTarget && !this.trackMouse){
switch(ap){
@@ -33428,7 +33428,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
return offsets;
},
-
+
onTargetOver : function(e){
if(this.disabled || e.within(this.target.dom, true)){
return;
@@ -33442,7 +33442,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
delayShow : function(){
if(this.hidden && !this.showTimer){
if(this.lastActive.getElapsed() < this.quickShowInterval){
@@ -33455,7 +33455,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
onTargetOut : function(e){
if(this.disabled || e.within(this.target.dom, true)){
return;
@@ -33466,14 +33466,14 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
delayHide : function(){
if(!this.hidden && !this.hideTimer){
this.hideTimer = this.hide.defer(this.hideDelay, this);
}
},
-
+
hide: function(){
this.clearTimer('dismiss');
this.lastActive = new Date();
@@ -33484,11 +33484,11 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
delete this.triggerElement;
},
-
+
show : function(){
if(this.anchor){
-
-
+
+
this.showAt([-1000,-1000]);
this.origConstrainPosition = this.constrainPosition;
this.constrainPosition = false;
@@ -33505,7 +33505,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
showAt : function(xy){
this.lastActive = new Date();
this.clearTimers();
@@ -33521,7 +33521,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
syncAnchor : function(){
var anchorPos, targetPos, offset;
switch(this.tipAnchor.charAt(0)){
@@ -33549,7 +33549,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
this.anchorEl.alignTo(this.el, anchorPos+'-'+targetPos, offset);
},
-
+
setPagePosition : function(x, y){
Ext.ToolTip.superclass.setPagePosition.call(this, x, y);
if(this.anchor){
@@ -33557,54 +33557,54 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
},
-
+
clearTimer : function(name){
name = name + 'Timer';
clearTimeout(this[name]);
delete this[name];
},
-
+
clearTimers : function(){
this.clearTimer('show');
this.clearTimer('dismiss');
this.clearTimer('hide');
},
-
+
onShow : function(){
Ext.ToolTip.superclass.onShow.call(this);
Ext.getDoc().on('mousedown', this.onDocMouseDown, this);
},
-
+
onHide : function(){
Ext.ToolTip.superclass.onHide.call(this);
Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
},
-
+
onDocMouseDown : function(e){
if(this.autoHide !== true && !this.closable && !e.within(this.el.dom)){
this.disable();
this.doEnable.defer(100, this);
}
},
-
-
+
+
doEnable : function(){
if(!this.isDestroyed){
this.enable();
}
},
-
+
onDisable : function(){
this.clearTimers();
this.hide();
},
-
+
adjustPosition : function(x, y){
if(this.constrainPosition){
var ay = this.targetXY[1], h = this.getSize().height;
@@ -33614,7 +33614,7 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
}
return {x : x, y: y};
},
-
+
beforeDestroy : function(){
this.clearTimers();
Ext.destroy(this.anchorEl);
@@ -33622,10 +33622,10 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
delete this.target;
delete this.anchorTarget;
delete this.triggerElement;
- Ext.ToolTip.superclass.beforeDestroy.call(this);
+ Ext.ToolTip.superclass.beforeDestroy.call(this);
},
-
+
onDestroy : function(){
Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
Ext.ToolTip.superclass.onDestroy.call(this);
@@ -33634,11 +33634,11 @@ Ext.ToolTip = Ext.extend(Ext.Tip, {
Ext.reg('tooltip', Ext.ToolTip);
Ext.QuickTip = Ext.extend(Ext.ToolTip, {
-
-
+
+
interceptTitles : false,
-
+
tagConfig : {
namespace : "ext",
attribute : "qtip",
@@ -33651,14 +33651,14 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
anchor : "anchor"
},
-
+
initComponent : function(){
this.target = this.target || Ext.getDoc();
this.targets = this.targets || {};
Ext.QuickTip.superclass.initComponent.call(this);
},
-
+
register : function(config){
var cs = Ext.isArray(config) ? config : arguments;
for(var i = 0, len = cs.length; i < len; i++){
@@ -33676,12 +33676,12 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
}
},
-
+
unregister : function(el){
delete this.targets[Ext.id(el)];
},
-
-
+
+
cancelShow: function(el){
var at = this.activeTarget;
el = Ext.get(el).dom;
@@ -33693,10 +33693,10 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
this.clearTimer('show');
}
},
-
+
getTipCfg: function(e) {
- var t = e.getTarget(),
- ttp,
+ var t = e.getTarget(),
+ ttp,
cfg;
if(this.interceptTitles && t.title && Ext.isString(t.title)){
ttp = t.title;
@@ -33710,7 +33710,7 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
return ttp;
},
-
+
onTargetOver : function(e){
if(this.disabled){
return;
@@ -33746,7 +33746,7 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
title: et.getAttribute(cfg.title, ns),
cls: et.getAttribute(cfg.cls, ns),
align: et.getAttribute(cfg.align, ns)
-
+
};
this.anchor = et.getAttribute(cfg.anchor, ns);
if(this.anchor){
@@ -33756,10 +33756,10 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
}
},
-
+
onTargetOut : function(e){
-
+
if (this.activeTarget && e.within(this.activeTarget.el) && !this.getTipCfg(e)) {
return;
}
@@ -33770,7 +33770,7 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
}
},
-
+
showAt : function(xy){
var t = this.activeTarget;
if(t){
@@ -33799,7 +33799,7 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
}
if(this.anchor){
this.constrainPosition = false;
- }else if(t.align){
+ }else if(t.align){
xy = this.el.getAlignToXY(t.el, t.align);
this.constrainPosition = false;
}else{
@@ -33809,7 +33809,7 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
Ext.QuickTip.superclass.showAt.call(this, xy);
},
-
+
hide: function(){
delete this.activeTarget;
Ext.QuickTip.superclass.hide.call(this);
@@ -33819,9 +33819,9 @@ Ext.reg('quicktip', Ext.QuickTip);
Ext.QuickTips = function(){
var tip,
disabled = false;
-
+
return {
-
+
init : function(autoRender){
if(!tip){
if(!Ext.isReady){
@@ -33831,7 +33831,7 @@ Ext.QuickTips = function(){
return;
}
tip = new Ext.QuickTip({
- elements:'header,body',
+ elements:'header,body',
disabled: disabled
});
if(autoRender !== false){
@@ -33839,24 +33839,24 @@ Ext.QuickTips = function(){
}
}
},
-
-
+
+
ddDisable : function(){
-
+
if(tip && !disabled){
tip.disable();
- }
+ }
},
-
-
+
+
ddEnable : function(){
-
+
if(tip && !disabled){
tip.enable();
}
},
-
+
enable : function(){
if(tip){
tip.enable();
@@ -33864,7 +33864,7 @@ Ext.QuickTips = function(){
disabled = false;
},
-
+
disable : function(){
if(tip){
tip.disable();
@@ -33872,27 +33872,27 @@ Ext.QuickTips = function(){
disabled = true;
},
-
+
isEnabled : function(){
return tip !== undefined && !tip.disabled;
},
-
+
getQuickTip : function(){
return tip;
},
-
+
register : function(){
tip.register.apply(tip, arguments);
},
-
+
unregister : function(){
tip.unregister.apply(tip, arguments);
},
-
+
tips : function(){
tip.register.apply(tip, arguments);
}
@@ -33901,7 +33901,7 @@ Ext.QuickTips = function(){
Ext.slider.Tip = Ext.extend(Ext.Tip, {
minWidth: 10,
offsets : [0, -10],
-
+
init: function(slider) {
slider.on({
scope : this,
@@ -33911,8 +33911,8 @@ Ext.slider.Tip = Ext.extend(Ext.Tip, {
destroy : this.destroy
});
},
-
-
+
+
onSlide : function(slider, e, thumb) {
this.show();
this.body.update(this.getText(thumb));
@@ -33920,7 +33920,7 @@ Ext.slider.Tip = Ext.extend(Ext.Tip, {
this.el.alignTo(thumb.el, 'b-t?', this.offsets);
},
-
+
getText : function(thumb) {
return String(thumb.value);
}
@@ -33936,7 +33936,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
hlDrop : Ext.enableFx,
pathSeparator : '/',
-
+
bubbleEvents : [],
initComponent : function(){
@@ -33946,7 +33946,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
this.eventModel = new Ext.tree.TreeEventModel(this);
}
-
+
var l = this.loader;
if(!l){
l = new Ext.tree.TreeLoader({
@@ -33960,7 +33960,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
this.nodeHash = {};
-
+
if(this.root){
var r = this.root;
delete this.root;
@@ -33970,70 +33970,70 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
this.addEvents(
-
+
'append',
-
+
'remove',
-
+
'movenode',
-
+
'insert',
-
+
'beforeappend',
-
+
'beforeremove',
-
+
'beforemovenode',
-
+
'beforeinsert',
-
+
'beforeload',
-
+
'load',
-
+
'textchange',
-
+
'beforeexpandnode',
-
+
'beforecollapsenode',
-
+
'expandnode',
-
+
'disabledchange',
-
+
'collapsenode',
-
+
'beforeclick',
-
+
'click',
-
+
'containerclick',
-
+
'checkchange',
-
+
'beforedblclick',
-
+
'dblclick',
-
+
'containerdblclick',
-
+
'contextmenu',
-
+
'containercontextmenu',
-
+
'beforechildrenrendered',
-
+
'startdrag',
-
+
'enddrag',
-
+
'dragdrop',
-
+
'beforenodedrop',
-
+
'nodedrop',
-
+
'nodedragover'
);
if(this.singleExpand){
@@ -34041,25 +34041,25 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
}
},
-
+
proxyNodeEvent : function(ename, a1, a2, a3, a4, a5, a6){
if(ename == 'collapse' || ename == 'expand' || ename == 'beforecollapse' || ename == 'beforeexpand' || ename == 'move' || ename == 'beforemove'){
ename = ename+'node';
}
-
+
return this.fireEvent(ename, a1, a2, a3, a4, a5, a6);
},
-
+
getRootNode : function(){
return this.root;
},
-
+
setRootNode : function(node){
this.destroyRoot();
- if(!node.render){
+ if(!node.render){
node = this.loader.createNode(node);
}
this.root = node;
@@ -34076,12 +34076,12 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
}
return node;
},
-
+
clearInnerCt : function(){
- this.innerCt.update('');
+ this.innerCt.update('');
},
-
-
+
+
renderRoot : function(){
this.root.render();
if(!this.rootVisible){
@@ -34089,27 +34089,27 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
}
},
-
+
getNodeById : function(id){
return this.nodeHash[id];
},
-
+
registerNode : function(node){
this.nodeHash[node.id] = node;
},
-
+
unregisterNode : function(node){
delete this.nodeHash[node.id];
},
-
+
toString : function(){
return '[Tree'+(this.id?' '+this.id:'')+']';
},
-
+
restrictExpand : function(node){
var p = node.parentNode;
if(p){
@@ -34120,7 +34120,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
}
},
-
+
getChecked : function(a, startNode){
startNode = startNode || this.root;
var r = [];
@@ -34133,22 +34133,22 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
return r;
},
-
+
getLoader : function(){
return this.loader;
},
-
+
expandAll : function(){
this.root.expand(true);
},
-
+
collapseAll : function(){
this.root.collapse(true);
},
-
+
getSelectionModel : function(){
if(!this.selModel){
this.selModel = new Ext.tree.DefaultSelectionModel();
@@ -34156,7 +34156,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
return this.selModel;
},
-
+
expandPath : function(path, attr, callback){
if(Ext.isEmpty(path)){
if(callback){
@@ -34167,7 +34167,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
attr = attr || 'id';
var keys = path.split(this.pathSeparator);
var curNode = this.root;
- if(curNode.attributes[attr] != keys[1]){
+ if(curNode.attributes[attr] != keys[1]){
if(callback){
callback(false, null);
}
@@ -34194,7 +34194,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
curNode.expand(false, false, f);
},
-
+
selectPath : function(path, attr, callback){
if(Ext.isEmpty(path)){
if(callback){
@@ -34232,12 +34232,12 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
}
},
-
+
getTreeEl : function(){
return this.body;
},
-
+
onRender : function(ct, position){
Ext.tree.TreePanel.superclass.onRender.call(this, ct, position);
this.el.addClass('x-tree');
@@ -34246,7 +34246,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
(this.useArrows ? 'x-tree-arrows' : this.lines ? 'x-tree-lines' : 'x-tree-no-lines')});
},
-
+
initEvents : function(){
Ext.tree.TreePanel.superclass.initEvents.call(this);
@@ -34254,13 +34254,13 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
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
@@ -34269,7 +34269,7 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
this.getSelectionModel().init(this);
},
-
+
afterRender : function(){
Ext.tree.TreePanel.superclass.afterRender.call(this);
this.renderRoot();
@@ -34285,62 +34285,62 @@ Ext.tree.TreePanel = Ext.extend(Ext.Panel, {
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 = {};
@@ -34408,11 +34408,11 @@ Ext.tree.TreeEventModel.prototype = {
if(!this.beforeEvent(e)){
return;
}
- if(Ext.isGecko && !this.trackingDoc){
+ if(Ext.isGecko && !this.trackingDoc){
Ext.getBody().on('mouseover', this.trackExit, this);
this.trackingDoc = true;
}
- if(this.lastEcOver){
+ if(this.lastEcOver){
this.onIconOut(e, this.lastEcOver);
delete this.lastEcOver;
}
@@ -34470,13 +34470,13 @@ Ext.tree.TreeEventModel.prototype = {
this.checkContainerEvent(e, 'contextmenu');
}
},
-
+
checkContainerEvent: function(e, type){
if(this.disabled){
e.stopEvent();
return false;
}
- this.onContainerEvent(e, type);
+ this.onContainerEvent(e, type);
},
onContainerEvent: function(e, type){
@@ -34538,35 +34538,35 @@ Ext.tree.TreeEventModel.prototype = {
}
};
Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, {
-
+
constructor : function(config){
this.selNode = null;
-
+
this.addEvents(
-
+
'selectionchange',
-
+
'beforeselect'
);
Ext.apply(this, config);
- Ext.tree.DefaultSelectionModel.superclass.constructor.call(this);
+ Ext.tree.DefaultSelectionModel.superclass.constructor.call(this);
},
-
+
init : function(tree){
this.tree = tree;
tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this);
tree.on('click', this.onNodeClick, this);
},
-
+
onNodeClick : function(node, e){
this.select(node);
},
-
-
+
+
select : function(node, selectNextNode){
-
+
if (!Ext.fly(node.ui.wrap).isVisible() && selectNextNode) {
return selectNextNode.call(this, node);
}
@@ -34583,15 +34583,15 @@ Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, {
}
return node;
},
-
-
+
+
unselect : function(node, silent){
if(this.selNode == node){
this.clearSelections(silent);
- }
+ }
},
-
-
+
+
clearSelections : function(silent){
var n = this.selNode;
if(n){
@@ -34603,23 +34603,23 @@ Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, {
}
return n;
},
-
-
+
+
getSelectedNode : function(){
- return this.selNode;
+ return this.selNode;
},
-
-
+
+
isSelected : function(node){
- return this.selNode == node;
+ return this.selNode == node;
},
-
+
selectPrevious : function( s){
if(!(s = s || this.selNode || this.lastSelNode)){
return null;
}
-
+
var ps = s.previousSibling;
if(ps){
if(!ps.isExpanded() || ps.childNodes.length < 1){
@@ -34637,12 +34637,12 @@ Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, {
return null;
},
-
+
selectNext : function( s){
if(!(s = s || this.selNode || this.lastSelNode)){
return null;
}
-
+
if(s.firstChild && s.isExpanded() && Ext.fly(s.ui.wrap).isVisible()){
return this.select(s.firstChild, this.selectNext);
}else if(s.nextSibling){
@@ -34662,7 +34662,7 @@ Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, {
onKeyDown : function(e){
var s = this.selNode || this.lastSelNode;
-
+
var sm = this;
if(!s){
return;
@@ -34701,24 +34701,24 @@ Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, {
Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, {
-
+
constructor : function(config){
this.selNodes = [];
this.selMap = {};
this.addEvents(
-
+
'selectionchange'
);
Ext.apply(this, config);
- Ext.tree.MultiSelectionModel.superclass.constructor.call(this);
+ Ext.tree.MultiSelectionModel.superclass.constructor.call(this);
},
-
+
init : function(tree){
this.tree = tree;
tree.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this);
tree.on('click', this.onNodeClick, this);
},
-
+
onNodeClick : function(node, e){
if(e.ctrlKey && this.isSelected(node)){
this.unselect(node);
@@ -34726,8 +34726,8 @@ Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, {
this.select(node, e, e.ctrlKey);
}
},
-
-
+
+
select : function(node, e, keepExisting){
if(keepExisting !== true){
this.clearSelections(true);
@@ -34743,8 +34743,8 @@ Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, {
this.fireEvent('selectionchange', this, this.selNodes);
return node;
},
-
-
+
+
unselect : function(node){
if(this.selMap[node.id]){
node.ui.onSelectedChange(false);
@@ -34757,8 +34757,8 @@ Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, {
this.fireEvent('selectionchange', this, this.selNodes);
}
},
-
-
+
+
clearSelections : function(suppressEvent){
var sn = this.selNodes;
if(sn.length > 0){
@@ -34772,13 +34772,13 @@ Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, {
}
}
},
-
-
+
+
isSelected : function(node){
- return this.selMap[node.id] ? true : false;
+ return this.selMap[node.id] ? true : false;
},
-
-
+
+
getSelectedNodes : function(){
return this.selNodes.concat([]);
},
@@ -34790,49 +34790,49 @@ Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, {
selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious
});
Ext.data.Tree = Ext.extend(Ext.util.Observable, {
-
+
constructor: function(root){
this.nodeHash = {};
-
+
this.root = null;
if(root){
this.setRootNode(root);
}
this.addEvents(
-
+
"append",
-
+
"remove",
-
+
"move",
-
+
"insert",
-
+
"beforeappend",
-
+
"beforeremove",
-
+
"beforemove",
-
+
"beforeinsert"
);
- Ext.data.Tree.superclass.constructor.call(this);
+ Ext.data.Tree.superclass.constructor.call(this);
},
-
-
+
+
pathSeparator: "/",
-
+
proxyNodeEvent : function(){
return this.fireEvent.apply(this, arguments);
},
-
+
getRootNode : function(){
return this.root;
},
-
+
setRootNode : function(node){
this.root = node;
node.ownerTree = this;
@@ -34841,17 +34841,17 @@ Ext.data.Tree = Ext.extend(Ext.util.Observable, {
return node;
},
-
+
getNodeById : function(id){
return this.nodeHash[id];
},
-
+
registerNode : function(node){
this.nodeHash[node.id] = node;
},
-
+
unregisterNode : function(node){
delete this.nodeHash[node.id];
},
@@ -34863,59 +34863,59 @@ Ext.data.Tree = Ext.extend(Ext.util.Observable, {
Ext.data.Node = Ext.extend(Ext.util.Observable, {
-
+
constructor: function(attributes){
-
+
this.attributes = attributes || {};
this.leaf = this.attributes.leaf;
-
+
this.id = this.attributes.id;
if(!this.id){
this.id = Ext.id(null, "xnode-");
this.attributes.id = this.id;
}
-
+
this.childNodes = [];
-
+
this.parentNode = null;
-
+
this.firstChild = null;
-
+
this.lastChild = null;
-
+
this.previousSibling = null;
-
+
this.nextSibling = null;
this.addEvents({
-
+
"append" : true,
-
+
"remove" : true,
-
+
"move" : true,
-
+
"insert" : true,
-
+
"beforeappend" : true,
-
+
"beforeremove" : true,
-
+
"beforemove" : true,
-
+
"beforeinsert" : true
});
this.listeners = this.attributes.listeners;
- Ext.data.Node.superclass.constructor.call(this);
+ Ext.data.Node.superclass.constructor.call(this);
},
-
-
+
+
fireEvent : function(evtName){
-
+
if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){
return false;
}
-
+
var ot = this.getOwnerTree();
if(ot){
if(ot.proxyNodeEvent.apply(ot, arguments) === false){
@@ -34925,43 +34925,43 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return true;
},
-
+
isLeaf : function(){
return this.leaf === true;
},
-
+
setFirstChild : function(node){
this.firstChild = node;
},
-
+
setLastChild : function(node){
this.lastChild = node;
},
-
+
isLast : function(){
return (!this.parentNode ? true : this.parentNode.lastChild == this);
},
-
+
isFirst : function(){
return (!this.parentNode ? true : this.parentNode.firstChild == this);
},
-
+
hasChildNodes : function(){
return !this.isLeaf() && this.childNodes.length > 0;
},
-
+
isExpandable : function(){
return this.attributes.expandable || this.hasChildNodes();
},
-
+
appendChild : function(node){
var multi = false;
if(Ext.isArray(node)){
@@ -34969,7 +34969,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}else if(arguments.length > 1){
multi = arguments;
}
-
+
if(multi){
for(var i = 0, len = multi.length; i < len; i++) {
this.appendChild(multi[i]);
@@ -34980,7 +34980,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
var index = this.childNodes.length;
var oldParent = node.parentNode;
-
+
if(oldParent){
if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){
return false;
@@ -35011,7 +35011,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
removeChild : function(node, destroy){
var index = this.childNodes.indexOf(node);
if(index == -1){
@@ -35021,10 +35021,10 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return false;
}
-
+
this.childNodes.splice(index, 1);
-
+
if(node.previousSibling){
node.previousSibling.nextSibling = node.nextSibling;
}
@@ -35032,7 +35032,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
node.nextSibling.previousSibling = node.previousSibling;
}
-
+
if(this.firstChild == node){
this.setFirstChild(node.nextSibling);
}
@@ -35049,9 +35049,9 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return node;
},
-
+
clear : function(destroy){
-
+
this.setOwnerTree(null, destroy);
this.parentNode = this.previousSibling = this.nextSibling = null;
if(destroy){
@@ -35059,9 +35059,9 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
destroy : function( silent){
-
+
if(silent === true){
this.purgeListeners();
this.clear(true);
@@ -35074,12 +35074,12 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
insertBefore : function(node, refNode){
- if(!refNode){
+ if(!refNode){
return this.appendChild(node);
}
-
+
if(node == refNode){
return false;
}
@@ -35091,12 +35091,12 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
var oldParent = node.parentNode;
var refIndex = index;
-
+
if(oldParent == this && this.childNodes.indexOf(node) < index){
refIndex--;
}
-
+
if(oldParent){
if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){
return false;
@@ -35125,7 +35125,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return node;
},
-
+
remove : function(destroy){
if (this.parentNode) {
this.parentNode.removeChild(this, destroy);
@@ -35133,7 +35133,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
removeAll : function(destroy){
var cn = this.childNodes,
n;
@@ -35143,12 +35143,12 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
item : function(index){
return this.childNodes[index];
},
-
+
replaceChild : function(newChild, oldChild){
var s = oldChild ? oldChild.nextSibling : null;
this.removeChild(oldChild);
@@ -35156,14 +35156,14 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return oldChild;
},
-
+
indexOf : function(child){
return this.childNodes.indexOf(child);
},
-
+
getOwnerTree : function(){
-
+
if(!this.ownerTree){
var p = this;
while(p){
@@ -35177,7 +35177,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return this.ownerTree;
},
-
+
getDepth : function(){
var depth = 0;
var p = this;
@@ -35188,15 +35188,15 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return depth;
},
-
+
setOwnerTree : function(tree, destroy){
-
+
if(tree != this.ownerTree){
if(this.ownerTree){
this.ownerTree.unregisterNode(this);
}
this.ownerTree = tree;
-
+
if(destroy !== true){
Ext.each(this.childNodes, function(n){
n.setOwnerTree(tree);
@@ -35208,7 +35208,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
setId: function(id){
if(id !== this.id){
var t = this.ownerTree;
@@ -35223,10 +35223,10 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
onIdChange: Ext.emptyFn,
-
+
getPath : function(attr){
attr = attr || "id";
var p = this.parentNode;
@@ -35239,7 +35239,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return sep + b.join(sep);
},
-
+
bubble : function(fn, scope, args){
var p = this;
while(p){
@@ -35250,7 +35250,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
cascade : function(fn, scope, args){
if(fn.apply(scope || this, args || [this]) !== false){
var cs = this.childNodes;
@@ -35260,7 +35260,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
eachChild : function(fn, scope, args){
var cs = this.childNodes;
for(var i = 0, len = cs.length; i < len; i++) {
@@ -35270,14 +35270,14 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
findChild : function(attribute, value, deep){
return this.findChildBy(function(){
return this.attributes[attribute] == value;
}, null, deep);
},
-
+
findChildBy : function(fn, scope, deep){
var cs = this.childNodes,
len = cs.length,
@@ -35294,12 +35294,12 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
return res;
}
}
-
+
}
return null;
},
-
+
sort : function(fn, scope){
var cs = this.childNodes;
var len = cs.length;
@@ -35320,12 +35320,12 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
},
-
+
contains : function(node){
return node.isAncestor(this);
},
-
+
isAncestor : function(node){
var p = this.parentNode;
while(p){
@@ -35342,7 +35342,7 @@ Ext.data.Node = Ext.extend(Ext.util.Observable, {
}
});
Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
-
+
constructor : function(attributes){
attributes = attributes || {};
if(Ext.isString(attributes)){
@@ -35356,50 +35356,50 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
this.draggable = attributes.draggable !== false && attributes.allowDrag !== false;
this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false;
-
+
this.text = attributes.text;
-
+
this.disabled = attributes.disabled === true;
-
+
this.hidden = attributes.hidden === true;
-
+
this.addEvents(
-
+
'textchange',
-
+
'beforeexpand',
-
+
'beforecollapse',
-
+
'expand',
-
+
'disabledchange',
-
+
'collapse',
-
+
'beforeclick',
-
+
'click',
-
+
'checkchange',
-
+
'beforedblclick',
-
+
'dblclick',
-
+
'contextmenu',
-
+
'beforechildrenrendered'
);
-
+
var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI;
-
-
- this.ui = new uiClass(this);
+
+
+ this.ui = new uiClass(this);
},
-
+
preventHScroll : true,
-
+
isExpanded : function(){
return this.expanded;
},
@@ -35414,7 +35414,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
return this.loader || ((owner = this.getOwnerTree()) && owner.loader ? owner.loader : (this.loader = new Ext.tree.TreeLoader()));
},
-
+
setFirstChild : function(node){
var of = this.firstChild;
Ext.tree.TreeNode.superclass.setFirstChild.call(this, node);
@@ -35426,7 +35426,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
setLastChild : function(node){
var ol = this.lastChild;
Ext.tree.TreeNode.superclass.setLastChild.call(this, node);
@@ -35438,8 +35438,8 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
-
+
+
appendChild : function(n){
if(!n.render && !Ext.isArray(n)){
n = this.getLoader().createNode(n);
@@ -35452,14 +35452,14 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
return node;
},
-
+
removeChild : function(node, destroy){
this.ownerTree.getSelectionModel().unselect(node);
Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments);
-
+
if(!destroy){
var rendered = node.ui.rendered;
-
+
if(rendered){
node.ui.remove();
}
@@ -35475,7 +35475,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
return node;
},
-
+
insertBefore : function(node, refNode){
if(!node.render){
node = this.getLoader().createNode(node);
@@ -35488,17 +35488,17 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
return newNode;
},
-
+
setText : function(text){
var oldText = this.text;
this.text = this.attributes.text = text;
- if(this.rendered){
+ if(this.rendered){
this.ui.onTextChange(this, text, oldText);
}
this.fireEvent('textchange', this, text, oldText);
},
-
-
+
+
setIconCls : function(cls){
var old = this.attributes.iconCls;
this.attributes.iconCls = cls;
@@ -35506,8 +35506,8 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
this.ui.onIconClsChange(this, cls, old);
}
},
-
-
+
+
setTooltip : function(tip, title){
this.attributes.qtip = tip;
this.attributes.qtipTitle = title;
@@ -35515,16 +35515,16 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
this.ui.onTipChange(this, tip, title);
}
},
-
-
+
+
setIcon : function(icon){
this.attributes.icon = icon;
if(this.rendered){
this.ui.onIconChange(this, icon);
}
},
-
-
+
+
setHref : function(href, target){
this.attributes.href = href;
this.attributes.hrefTarget = target;
@@ -35532,8 +35532,8 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
this.ui.onHrefChange(this, href, target);
}
},
-
-
+
+
setCls : function(cls){
var old = this.attributes.cls;
this.attributes.cls = cls;
@@ -35542,7 +35542,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
select : function(){
var t = this.getOwnerTree();
if(t){
@@ -35550,7 +35550,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
unselect : function(silent){
var t = this.getOwnerTree();
if(t){
@@ -35558,13 +35558,13 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
isSelected : function(){
var t = this.getOwnerTree();
return t ? t.getSelectionModel().isSelected(this) : false;
},
-
+
expand : function(deep, anim, callback, scope){
if(!this.expanded){
if(this.fireEvent('beforeexpand', this, deep, anim) === false){
@@ -35606,7 +35606,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
return this.isRoot && !this.getOwnerTree().rootVisible;
},
-
+
collapse : function(deep, anim, callback, scope){
if(this.expanded && !this.isHiddenRoot()){
if(this.fireEvent('beforecollapse', this, deep, anim) === false){
@@ -35638,14 +35638,14 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
delayedExpand : function(delay){
if(!this.expandProcId){
this.expandProcId = this.expand.defer(delay, this);
}
},
-
+
cancelExpand : function(){
if(this.expandProcId){
clearTimeout(this.expandProcId);
@@ -35653,7 +35653,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
this.expandProcId = false;
},
-
+
toggle : function(){
if(this.expanded){
this.collapse();
@@ -35662,17 +35662,17 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
ensureVisible : function(callback, scope){
var tree = this.getOwnerTree();
tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){
- var node = tree.getNodeById(this.id);
+ var node = tree.getNodeById(this.id);
tree.getTreeEl().scrollChildIntoView(node.ui.anchor);
this.runCallback(callback, scope || this, [this]);
}.createDelegate(this));
},
-
+
expandChildNodes : function(deep, anim) {
var cs = this.childNodes,
i,
@@ -35682,7 +35682,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
collapseChildNodes : function(deep){
var cs = this.childNodes;
for(var i = 0, len = cs.length; i < len; i++) {
@@ -35690,26 +35690,26 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
disable : function(){
this.disabled = true;
this.unselect();
- if(this.rendered && this.ui.onDisableChange){
+ if(this.rendered && this.ui.onDisableChange){
this.ui.onDisableChange(this, true);
}
this.fireEvent('disabledchange', this, true);
},
-
+
enable : function(){
this.disabled = false;
- if(this.rendered && this.ui.onDisableChange){
+ if(this.rendered && this.ui.onDisableChange){
this.ui.onDisableChange(this, false);
}
this.fireEvent('disabledchange', this, false);
},
-
+
renderChildren : function(suppressEvent){
if(suppressEvent !== false){
this.fireEvent('beforechildrenrendered', this);
@@ -35721,7 +35721,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
this.childrenRendered = true;
},
-
+
sort : function(fn, scope){
Ext.tree.TreeNode.superclass.sort.apply(this, arguments);
if(this.childrenRendered){
@@ -35732,11 +35732,11 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
render : function(bulkRender){
this.ui.render(bulkRender);
if(!this.rendered){
-
+
this.getOwnerTree().registerNode(this);
this.rendered = true;
if(this.expanded){
@@ -35746,7 +35746,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
renderIndent : function(deep, refresh){
if(refresh){
this.ui.childIndent = null;
@@ -35770,7 +35770,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
}
},
-
+
destroy : function(silent){
if(silent === true){
this.unselect(true);
@@ -35780,7 +35780,7 @@ Ext.tree.TreeNode = Ext.extend(Ext.data.Node, {
this.ui = this.loader = null;
},
-
+
onIdChange : function(id){
this.ui.onIdChange(id);
}
@@ -35791,17 +35791,17 @@ Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;
this.loaded = config && config.loaded === true;
this.loading = false;
Ext.tree.AsyncTreeNode.superclass.constructor.apply(this, arguments);
-
+
this.addEvents('beforeload', 'load');
-
-
+
+
};
Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
expand : function(deep, anim, callback, scope){
- if(this.loading){
+ if(this.loading){
var timer;
var f = function(){
- if(!this.loading){
+ if(!this.loading){
clearInterval(timer);
this.expand(deep, anim, callback, scope);
}
@@ -35823,12 +35823,12 @@ Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
}
Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback, scope);
},
-
-
+
+
isLoading : function(){
- return this.loading;
+ return this.loading;
},
-
+
loadComplete : function(deep, anim, callback, scope){
this.loading = false;
this.loaded = true;
@@ -35836,12 +35836,12 @@ Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
this.fireEvent("load", this);
this.expand(deep, anim, callback, scope);
},
-
-
+
+
isLoaded : function(){
return this.loaded;
},
-
+
hasChildNodes : function(){
if(!this.isLeaf() && !this.loaded){
return true;
@@ -35850,7 +35850,7 @@ Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
}
},
-
+
reload : function(callback, scope){
this.collapse(false, false);
while(this.firstChild){
@@ -35867,7 +35867,7 @@ Ext.extend(Ext.tree.AsyncTreeNode, Ext.tree.TreeNode, {
Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode;
Ext.tree.TreeNodeUI = Ext.extend(Object, {
-
+
constructor : function(node){
Ext.apply(this, {
node: node,
@@ -35875,52 +35875,52 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
animating: false,
wasLeaf: true,
ecc: 'x-tree-ec-icon x-tree-elbow',
- emptyIcon: Ext.BLANK_IMAGE_URL
+ emptyIcon: Ext.BLANK_IMAGE_URL
});
},
-
-
+
+
removeChild : function(node){
if(this.rendered){
this.ctNode.removeChild(node.ui.getEl());
}
},
-
+
beforeLoad : function(){
this.addClass("x-tree-node-loading");
},
-
+
afterLoad : function(){
this.removeClass("x-tree-node-loading");
},
-
+
onTextChange : function(node, text, oldText){
if(this.rendered){
this.textNode.innerHTML = text;
}
},
-
-
+
+
onIconClsChange : function(node, cls, oldCls){
if(this.rendered){
Ext.fly(this.iconNode).replaceClass(oldCls, cls);
}
},
-
-
+
+
onIconChange : function(node, icon){
if(this.rendered){
-
+
var empty = Ext.isEmpty(icon);
this.iconNode.src = empty ? this.emptyIcon : icon;
Ext.fly(this.iconNode)[empty ? 'removeClass' : 'addClass']('x-tree-node-inline-icon');
}
},
-
-
+
+
onTipChange : function(node, tip, title){
if(this.rendered){
var hasTitle = Ext.isDefined(title);
@@ -35937,8 +35937,8 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
}
},
-
-
+
+
onHrefChange : function(node, href, target){
if(this.rendered){
this.anchor.href = this.getHref(href);
@@ -35947,15 +35947,15 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
}
},
-
-
+
+
onClsChange : function(node, cls, oldCls){
if(this.rendered){
Ext.fly(this.elNode).replaceClass(oldCls, cls);
- }
+ }
},
-
+
onDisableChange : function(node, state){
this.disabled = state;
if (this.checkbox) {
@@ -35964,18 +35964,18 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
this[state ? 'addClass' : 'removeClass']('x-tree-node-disabled');
},
-
+
onSelectedChange : function(state){
if(state){
this.focus();
this.addClass("x-tree-selected");
}else{
-
+
this.removeClass("x-tree-selected");
}
},
-
+
onMove : function(tree, node, oldParent, newParent, index, refNode){
this.childIndent = null;
if(this.rendered){
@@ -36009,7 +36009,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
remove : function(){
if(this.rendered){
this.holder = document.createElement("div");
@@ -36017,12 +36017,12 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
fireEvent : function(){
return this.node.fireEvent.apply(this.node, arguments);
},
-
+
initEvents : function(){
this.node.on("move", this.onMove, this);
@@ -36043,7 +36043,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
getDDHandles : function(){
return [this.iconNode, this.textNode, this.elNode];
},
@@ -36064,7 +36064,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
onContextMenu : function(e){
if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) {
e.preventDefault();
@@ -36073,7 +36073,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
onClick : function(e){
if(this.dropping){
e.stopEvent();
@@ -36102,7 +36102,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
onDblClick : function(e){
e.preventDefault();
if(this.disabled){
@@ -36127,41 +36127,41 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
this.removeClass('x-tree-node-over');
},
-
+
onCheckChange : function(){
var checked = this.checkbox.checked;
-
+
this.checkbox.defaultChecked = checked;
this.node.attributes.checked = checked;
this.fireEvent('checkchange', this.node, checked);
},
-
+
ecClick : function(e){
if(!this.animating && this.node.isExpandable()){
this.node.toggle();
}
},
-
+
startDrop : function(){
this.dropping = true;
},
-
+
endDrop : function(){
setTimeout(function(){
this.dropping = false;
}.createDelegate(this), 50);
},
-
+
expand : function(){
this.updateExpandIcon();
this.ctNode.style.display = "";
},
-
+
focus : function(){
if(!this.node.preventHScroll){
try{this.anchor.focus();
@@ -36185,14 +36185,14 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
blur : function(){
try{
this.anchor.blur();
}catch(e){}
},
-
+
animExpand : function(callback){
var ct = Ext.get(this.ctNode);
ct.stopFx();
@@ -36215,7 +36215,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
});
},
-
+
highlight : function(){
var tree = this.node.getOwnerTree();
Ext.fly(this.wrap).highlight(
@@ -36224,13 +36224,13 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
);
},
-
+
collapse : function(){
this.updateExpandIcon();
this.ctNode.style.display = "none";
},
-
+
animCollapse : function(callback){
var ct = Ext.get(this.ctNode);
ct.enableDisplayMode('block');
@@ -36249,7 +36249,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
});
},
-
+
getContainer : function(){
return this.ctNode;
},
@@ -36259,22 +36259,22 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
return this.wrap;
},
-
+
appendDDGhost : function(ghostNode){
ghostNode.appendChild(this.elNode.cloneNode(true));
},
-
+
getDDRepairXY : function(){
return Ext.lib.Dom.getXY(this.iconNode);
},
-
+
onRender : function(){
this.render();
},
-
+
render : function(bulkRender){
var n = this.node, a = n.attributes;
var targetNode = n.parentNode ?
@@ -36302,9 +36302,9 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
renderElements : function(n, a, targetNode, bulkRender){
-
+
this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
var cb = Ext.isBoolean(a.checked),
@@ -36335,15 +36335,15 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
var index = 3;
if(cb){
this.checkbox = cs[3];
-
+
this.checkbox.defaultChecked = this.checkbox.checked;
index++;
}
this.anchor = cs[index];
this.textNode = cs[index].firstChild;
},
-
-
+
+
getHref : function(href){
return Ext.isEmpty(href) ? (Ext.isGecko ? '' : '#') : href;
},
@@ -36368,7 +36368,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
return this.checkbox ? this.checkbox.checked : false;
},
-
+
updateExpandIcon : function(){
if(this.rendered){
var n = this.node,
@@ -36410,14 +36410,14 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
}
},
-
+
onIdChange: function(id){
if(this.rendered){
this.elNode.setAttribute('ext:tree-node-id', id);
}
},
-
+
getChildIndent : function(){
if(!this.childIndent){
var buf = [],
@@ -36437,7 +36437,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
return this.childIndent;
},
-
+
renderIndent : function(){
if(this.rendered){
var indent = "",
@@ -36445,7 +36445,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
if(p){
indent = p.ui.getChildIndent();
}
- if(this.indentMarkup != indent){
+ if(this.indentMarkup != indent){
this.indentNode.innerHTML = indent;
this.indentMarkup = indent;
}
@@ -36470,7 +36470,7 @@ Ext.tree.TreeNodeUI = Ext.extend(Object, {
Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
-
+
render : function(){
if(!this.rendered){
var targetNode = this.node.ownerTree.innerCt.dom;
@@ -36487,11 +36487,11 @@ Ext.tree.TreeLoader = function(config){
Ext.apply(this, config);
this.addEvents(
-
+
"beforeload",
-
+
"load",
-
+
"loadexception"
);
Ext.tree.TreeLoader.superclass.constructor.call(this);
@@ -36501,38 +36501,38 @@ Ext.tree.TreeLoader = function(config){
};
Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
-
-
-
-
-
-
-
+
+
+
+
+
+
+
uiProviders : {},
-
+
clearOnLoad : true,
-
+
paramOrder: undefined,
-
+
paramsAsHash: false,
-
+
nodeParameter: 'node',
-
+
directFn : undefined,
-
+
load : function(node, callback, scope){
if(this.clearOnLoad){
while(node.firstChild){
node.removeChild(node.firstChild);
}
}
- if(this.doPreload(node)){
+ if(this.doPreload(node)){
this.runCallback(callback, scope || node, [node]);
}else if(this.directFn || this.dataUrl || this.url){
this.requestData(node, callback, scope || node);
@@ -36541,7 +36541,7 @@ Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
doPreload : function(node){
if(node.attributes.children){
- if(node.childNodes.length < 1){
+ if(node.childNodes.length < 1){
var cs = node.attributes.children;
node.beginUpdate();
for(var i = 0, len = cs.length; i < len; i++){
@@ -36567,7 +36567,7 @@ Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
if(this.directFn){
var buf = [node.id];
if(po){
-
+
if(np && po.indexOf(np) > -1){
buf = [];
}
@@ -36602,8 +36602,8 @@ Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
});
}
}else{
-
-
+
+
this.runCallback(callback, scope || node, []);
}
},
@@ -36622,7 +36622,7 @@ Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
}
},
-
+
runCallback: function(cb, scope, args){
if(Ext.isFunction(cb)){
cb.apply(scope, args);
@@ -36639,9 +36639,9 @@ Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, {
}
},
-
+
createNode : function(attr){
-
+
if(this.baseAttrs){
Ext.applyIf(attr, this.baseAttrs);
}
@@ -36709,13 +36709,13 @@ Ext.tree.TreeFilter.prototype = {
autoClear:false,
remove:false,
-
+
filter : function(value, attr, startNode){
attr = attr || "text";
var f;
if(typeof value == "string"){
var vlen = value.length;
-
+
if(vlen == 0 && this.clearBlank){
this.clear();
return;
@@ -36724,7 +36724,7 @@ Ext.tree.TreeFilter.prototype = {
f = function(n){
return n.attributes[attr].substr(0, vlen).toLowerCase() == value;
};
- }else if(value.exec){
+ }else if(value.exec){
f = function(n){
return value.test(n.attributes[attr]);
};
@@ -36734,7 +36734,7 @@ Ext.tree.TreeFilter.prototype = {
this.filterBy(f, null, startNode);
},
-
+
filterBy : function(fn, scope, startNode){
startNode = startNode || this.tree.root;
if(this.autoClear){
@@ -36769,7 +36769,7 @@ Ext.tree.TreeFilter.prototype = {
}
},
-
+
clear : function(){
var t = this.tree;
var af = this.filtered;
@@ -36786,14 +36786,14 @@ Ext.tree.TreeFilter.prototype = {
};
Ext.tree.TreeSorter = Ext.extend(Object, {
-
+
constructor: function(tree, config){
-
-
-
-
-
-
+
+
+
+
+
+
Ext.apply(this, config);
tree.on({
@@ -36817,7 +36817,7 @@ Ext.tree.TreeSorter = Ext.extend(Object, {
this.sortFn = function(n1, n2){
var attr1 = n1.attributes,
attr2 = n2.attributes;
-
+
if(folderSort){
if(attr1[leafAttr] && !attr2[leafAttr]){
return 1;
@@ -36830,7 +36830,7 @@ Ext.tree.TreeSorter = Ext.extend(Object, {
prop2 = attr2[prop],
v1 = sortType ? sortType(prop1, n1) : (caseSensitive ? prop1 : prop1.toUpperCase()),
v2 = sortType ? sortType(prop2, n2) : (caseSensitive ? prop2 : prop2.toUpperCase());
-
+
if(v1 < v2){
return desc ? 1 : -1;
}else if(v1 > v2){
@@ -36839,7 +36839,7 @@ Ext.tree.TreeSorter = Ext.extend(Object, {
return 0;
};
},
-
+
doSort : function(node){
node.sort(this.sortFn);
},
@@ -36855,48 +36855,48 @@ Ext.tree.TreeSorter = Ext.extend(Object, {
if(p && p.childrenRendered){
this.doSort.defer(1, this, [p]);
}
- }
+ }
});
if(Ext.dd.DropZone){
-
+
Ext.tree.TreeDropZone = function(tree, config){
-
+
this.allowParentInsert = config.allowParentInsert || false;
-
+
this.allowContainerDrop = config.allowContainerDrop || false;
-
+
this.appendOnly = config.appendOnly || false;
Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.getTreeEl(), config);
-
+
this.tree = tree;
-
+
this.dragOverData = {};
-
+
this.lastInsertClass = "x-tree-no-status";
};
Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
-
+
ddGroup : "TreeDD",
-
+
expandDelay : 1000,
-
+
expandNode : function(node){
if(node.hasChildNodes() && !node.isExpanded()){
node.expand(false, null, this.triggerCacheRefresh.createDelegate(this));
}
},
-
+
queueExpand : function(node){
this.expandProcId = this.expandNode.defer(this.expandDelay, this, [node]);
},
-
+
cancelExpand : function(){
if(this.expandProcId){
clearTimeout(this.expandProcId);
@@ -36904,12 +36904,12 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
}
},
-
+
isValidDropPoint : function(n, pt, dd, e, data){
if(!n || !data){ return false; }
var targetNode = n.node;
var dropNode = data.node;
-
+
if(!(targetNode && targetNode.isTarget && pt)){
return false;
}
@@ -36922,7 +36922,7 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){
return false;
}
-
+
var overEvent = this.dragOverData;
overEvent.tree = this.tree;
overEvent.target = targetNode;
@@ -36931,16 +36931,16 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
overEvent.source = dd;
overEvent.rawEvent = e;
overEvent.dropNode = dropNode;
- overEvent.cancel = false;
+ overEvent.cancel = false;
var result = this.tree.fireEvent("nodedragover", overEvent);
return overEvent.cancel === false && result !== false;
},
-
+
getDropPoint : function(e, n, dd){
var tn = n.node;
if(tn.isRoot){
- return tn.allowChildren !== false ? "append" : false;
+ return tn.allowChildren !== false ? "append" : false;
}
var dragEl = n.ddel;
var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight;
@@ -36963,11 +36963,11 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
}
},
-
+
onNodeEnter : function(n, dd, e, data){
this.cancelExpand();
},
-
+
onContainerOver : function(dd, e, data) {
if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
return this.dropAllowed;
@@ -36975,19 +36975,19 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
return this.dropNotAllowed;
},
-
+
onNodeOver : function(n, dd, e, data){
var pt = this.getDropPoint(e, n, dd);
var node = n.node;
-
-
+
+
if(!this.expandProcId && pt == "append" && node.hasChildNodes() && !n.node.isExpanded()){
this.queueExpand(node);
}else if(pt != "append"){
this.cancelExpand();
}
-
-
+
+
var returnCls = this.dropNotAllowed;
if(this.isValidDropPoint(n, pt, dd, e, data)){
if(pt){
@@ -37012,13 +37012,13 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
return returnCls;
},
-
+
onNodeOut : function(n, dd, e, data){
this.cancelExpand();
this.removeDropIndicators(n);
},
-
+
onNodeDrop : function(n, dd, e, data){
var point = this.getDropPoint(e, n, dd);
var targetNode = n.node;
@@ -37027,22 +37027,22 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
targetNode.ui.endDrop();
return false;
}
-
+
var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null);
return this.processDrop(targetNode, data, point, dd, e, dropNode);
},
-
+
onContainerDrop : function(dd, e, data){
if (this.allowContainerDrop && this.isValidDropPoint({ ddel: this.tree.getRootNode().ui.elNode, node: this.tree.getRootNode() }, "append", dd, e, data)) {
- var targetNode = this.tree.getRootNode();
+ var targetNode = this.tree.getRootNode();
targetNode.ui.startDrop();
var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, 'append', e) : null);
return this.processDrop(targetNode, data, 'append', dd, e, dropNode);
}
return false;
},
-
-
+
+
processDrop: function(target, data, point, dd, e, dropNode){
var dropEvent = {
tree : this.tree,
@@ -37060,7 +37060,7 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
target.ui.endDrop();
return dropEvent.dropStatus;
}
-
+
target = dropEvent.target;
if(point == 'append' && !target.isExpanded()){
target.expand(false, null, function(){
@@ -37072,7 +37072,7 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
return true;
},
-
+
completeDrop : function(de){
var ns = de.dropNode, p = de.point, t = de.target;
if(!Ext.isArray(ns)){
@@ -37097,7 +37097,7 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
this.tree.fireEvent("nodedrop", de);
},
-
+
afterNodeMoved : function(dd, data, e, targetNode, dropNode){
if(Ext.enableFx && this.tree.hlDrop){
dropNode.ui.focus();
@@ -37106,12 +37106,12 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
this.tree.fireEvent("nodedrop", this.tree, targetNode, data, dd, e);
},
-
+
getTree : function(){
return this.tree;
},
-
+
removeDropIndicators : function(n){
if(n && n.ddel){
var el = n.ddel;
@@ -37123,40 +37123,40 @@ Ext.extend(Ext.tree.TreeDropZone, Ext.dd.DropZone, {
}
},
-
+
beforeDragDrop : function(target, e, id){
this.cancelExpand();
return true;
},
-
+
afterRepair : function(data){
if(data && Ext.enableFx){
data.node.ui.highlight();
}
this.hideProxy();
- }
+ }
});
}
if(Ext.dd.DragZone){
Ext.tree.TreeDragZone = function(tree, config){
Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.innerCt, config);
-
+
this.tree = tree;
};
Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, {
-
+
ddGroup : "TreeDD",
-
+
onBeforeDrag : function(data, e){
var n = data.node;
return n && n.draggable && !n.disabled;
},
-
+
onInitDrag : function(e){
var data = this.dragData;
this.tree.getSelectionModel().select(data.node);
@@ -37166,32 +37166,32 @@ Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, {
this.tree.fireEvent("startdrag", this.tree, data.node, e);
},
-
+
getRepairXY : function(e, data){
return data.node.ui.getDDRepairXY();
},
-
+
onEndDrag : function(data, e){
this.tree.eventModel.enable.defer(100, this.tree.eventModel);
this.tree.fireEvent("enddrag", this.tree, data.node, e);
},
-
+
onValidDrop : function(dd, e, id){
this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e);
this.hideProxy();
},
-
+
beforeInvalidDrop : function(e, id){
-
+
var sm = this.tree.getSelectionModel();
sm.clearSelections();
sm.select(this.dragData.node);
},
-
-
+
+
afterRepair : function(){
if (Ext.enableFx && this.tree.hlDrop) {
Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9");
@@ -37203,7 +37203,7 @@ Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, {
Ext.tree.TreeEditor = function(tree, fc, config){
fc = fc || {};
var field = fc.events ? fc : new Ext.form.TextField(fc);
-
+
Ext.tree.TreeEditor.superclass.constructor.call(this, field, config);
this.tree = tree;
@@ -37216,21 +37216,21 @@ Ext.tree.TreeEditor = function(tree, fc, config){
};
Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
-
+
alignment: "l-l",
-
+
autoSize: false,
-
+
hideEl : false,
-
+
cls: "x-small-editor x-tree-editor",
-
+
shim:false,
-
+
shadow:"frame",
-
+
maxWidth: 250,
-
+
editDelay : 350,
initEditor : function(tree){
@@ -37239,21 +37239,21 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
beforeclick: this.beforeNodeClick,
dblclick : this.onNodeDblClick
});
-
+
this.on({
scope : this,
complete : this.updateNode,
beforestartedit: this.fitToTree,
specialkey : this.onSpecialKey
});
-
+
this.on('startedit', this.bindScroll, this, {delay:10});
},
-
+
fitToTree : function(ed, el){
var td = this.tree.getTreeEl().dom, nd = el.dom;
- if(td.scrollLeft > nd.offsetLeft){
+ if(td.scrollLeft > nd.offsetLeft){
td.scrollLeft = nd.offsetLeft;
}
var w = Math.min(
@@ -37262,11 +37262,11 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
this.setSize(w, '');
},
-
+
triggerEdit : function(node, defer){
this.completeEdit();
if(node.attributes.editable !== false){
-
+
this.editNode = node;
if(this.tree.autoScroll){
Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body);
@@ -37280,12 +37280,12 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
}
},
-
+
bindScroll : function(){
this.tree.getTreeEl().on('scroll', this.cancelEdit, this);
},
-
+
beforeNodeClick : function(node, e){
clearTimeout(this.autoEditTimer);
if(this.tree.getSelectionModel().isSelected(node)){
@@ -37298,13 +37298,13 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
clearTimeout(this.autoEditTimer);
},
-
+
updateNode : function(ed, value){
this.tree.getTreeEl().un('scroll', this.cancelEdit, this);
this.editNode.setText(value);
},
-
+
onHide : function(){
Ext.tree.TreeEditor.superclass.onHide.call(this);
if(this.editNode){
@@ -37312,7 +37312,7 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
}
},
-
+
onSpecialKey : function(field, e){
var k = e.getKey();
if(k == e.ESC){
@@ -37323,7 +37323,7 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
this.completeEdit();
}
},
-
+
onDestroy : function(){
clearTimeout(this.autoEditTimer);
Ext.tree.TreeEditor.superclass.onDestroy.call(this);
@@ -37333,1494 +37333,50 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
}
});
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
-
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? (/win/).test(p) : /win/.test(u),
- mac = p ? (/mac/).test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
- ie = !+"\v1",
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) {
- plugin = true;
- ie = false;
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) {
- d = a.GetVariable("$version");
- if (d) {
- ie = true;
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
-
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) {
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) {
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!(/loaded|complete/).test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try {
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn;
- }
- }
-
-
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
-
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
-
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
-
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) {
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) {
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) {
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
-
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else {
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else {
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id);
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
-
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
-
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") {
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else {
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!(/%$/).test(att.width) && parseInt(att.width, 10) < 310)) {
- att.width = "310";
- }
-
- if (typeof att.height == UNDEF || (!(/%$/).test(att.height) && parseInt(att.height, 10) < 137)) {
- att.height = "137";
- }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
-
-
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
-
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
-
-
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj);
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
-
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) {
- attObj.id = id;
- }
- if (ua.ie && ua.win) {
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) {
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") {
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) {
- par += ' ';
- }
- }
- el.outerHTML = '' + par + ' ';
- objIdArr[objIdArr.length] = attObj.id;
- r = getElementById(attObj.id);
- }
- else {
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) {
- if (m.toLowerCase() == "styleclass") {
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") {
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") {
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
-
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
-
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
-
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
-
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0;
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
-
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; }
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
-
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
-
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
-
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
-
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
-
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
-
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
-
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- window.detachEvent('onunload', arguments.callee);
- });
- }
- }();
-
- return {
-
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += "";
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) {
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) {
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) {
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) {
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) {
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else {
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; }
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
-
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
-
-Ext.FlashComponent = Ext.extend(Ext.BoxComponent, {
-
- flashVersion : '9.0.115',
-
-
- backgroundColor: '#ffffff',
-
-
- wmode: 'opaque',
-
-
- flashVars: undefined,
-
-
- flashParams: undefined,
-
-
- url: undefined,
- swfId : undefined,
- swfWidth: '100%',
- swfHeight: '100%',
-
-
- expressInstall: false,
-
- initComponent : function(){
- Ext.FlashComponent.superclass.initComponent.call(this);
-
- this.addEvents(
-
- 'initialize'
- );
- },
-
- onRender : function(){
- Ext.FlashComponent.superclass.onRender.apply(this, arguments);
-
- var params = Ext.apply({
- allowScriptAccess: 'always',
- bgcolor: this.backgroundColor,
- wmode: this.wmode
- }, this.flashParams), vars = Ext.apply({
- allowedDomain: document.location.hostname,
- YUISwfId: this.getId(),
- YUIBridgeCallback: 'Ext.FlashEventProxy.onEvent'
- }, this.flashVars);
-
- new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion,
- this.expressInstall ? Ext.FlashComponent.EXPRESS_INSTALL_URL : undefined, vars, params);
-
- this.swf = Ext.getDom(this.id);
- this.el = Ext.get(this.swf);
- },
-
- getSwfId : function(){
- return this.swfId || (this.swfId = "extswf" + (++Ext.Component.AUTO_ID));
- },
-
- getId : function(){
- return this.id || (this.id = "extflashcmp" + (++Ext.Component.AUTO_ID));
- },
-
- onFlashEvent : function(e){
- switch(e.type){
- case "swfReady":
- this.initSwf();
- return;
- case "log":
- return;
- }
- e.component = this;
- this.fireEvent(e.type.toLowerCase().replace(/event$/, ''), e);
- },
-
- initSwf : function(){
- this.onSwfReady(!!this.isInitialized);
- this.isInitialized = true;
- this.fireEvent('initialize', this);
- },
-
- beforeDestroy: function(){
- if(this.rendered){
- swfobject.removeSWF(this.swf.id);
- }
- Ext.FlashComponent.superclass.beforeDestroy.call(this);
- },
-
- onSwfReady : Ext.emptyFn
-});
-
-
-Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf';
-
-Ext.reg('flash', Ext.FlashComponent);
-Ext.FlashEventProxy = {
- onEvent : function(id, e){
- var fp = Ext.getCmp(id);
- if(fp){
- fp.onFlashEvent(e);
- }else{
- arguments.callee.defer(10, this, [id, e]);
- }
- }
-};
-
- Ext.chart.Chart = Ext.extend(Ext.FlashComponent, {
- refreshBuffer: 100,
-
-
-
-
- chartStyle: {
- padding: 10,
- animationEnabled: true,
- font: {
- name: 'Tahoma',
- color: 0x444444,
- size: 11
- },
- dataTip: {
- padding: 5,
- border: {
- color: 0x99bbe8,
- size:1
- },
- background: {
- color: 0xDAE7F6,
- alpha: .9
- },
- font: {
- name: 'Tahoma',
- color: 0x15428B,
- size: 10,
- bold: true
- }
- }
- },
-
-
-
-
- extraStyle: null,
-
-
- seriesStyles: null,
-
-
- disableCaching: Ext.isIE || Ext.isOpera,
- disableCacheParam: '_dc',
-
- initComponent : function(){
- Ext.chart.Chart.superclass.initComponent.call(this);
- if(!this.url){
- this.url = Ext.chart.Chart.CHART_URL;
- }
- if(this.disableCaching){
- this.url = Ext.urlAppend(this.url, String.format('{0}={1}', this.disableCacheParam, new Date().getTime()));
- }
- this.addEvents(
- 'itemmouseover',
- 'itemmouseout',
- 'itemclick',
- 'itemdoubleclick',
- 'itemdragstart',
- 'itemdrag',
- 'itemdragend',
-
- 'beforerefresh',
-
- 'refresh'
- );
- this.store = Ext.StoreMgr.lookup(this.store);
- },
-
-
- setStyle: function(name, value){
- this.swf.setStyle(name, Ext.encode(value));
- },
-
-
- setStyles: function(styles){
- this.swf.setStyles(Ext.encode(styles));
- },
-
-
- setSeriesStyles: function(styles){
- this.seriesStyles = styles;
- var s = [];
- Ext.each(styles, function(style){
- s.push(Ext.encode(style));
- });
- this.swf.setSeriesStyles(s);
- },
-
- setCategoryNames : function(names){
- this.swf.setCategoryNames(names);
- },
-
- setLegendRenderer : function(fn, scope){
- var chart = this;
- scope = scope || chart;
- chart.removeFnProxy(chart.legendFnName);
- chart.legendFnName = chart.createFnProxy(function(name){
- return fn.call(scope, name);
- });
- chart.swf.setLegendLabelFunction(chart.legendFnName);
- },
-
- setTipRenderer : function(fn, scope){
- var chart = this;
- scope = scope || chart;
- chart.removeFnProxy(chart.tipFnName);
- chart.tipFnName = chart.createFnProxy(function(item, index, series){
- var record = chart.store.getAt(index);
- return fn.call(scope, chart, record, index, series);
- });
- chart.swf.setDataTipFunction(chart.tipFnName);
- },
-
- setSeries : function(series){
- this.series = series;
- this.refresh();
- },
-
-
- bindStore : function(store, initial){
- if(!initial && this.store){
- if(store !== this.store && this.store.autoDestroy){
- this.store.destroy();
- }else{
- this.store.un("datachanged", this.refresh, this);
- this.store.un("add", this.delayRefresh, this);
- this.store.un("remove", this.delayRefresh, this);
- this.store.un("update", this.delayRefresh, this);
- this.store.un("clear", this.refresh, this);
- }
- }
- if(store){
- store = Ext.StoreMgr.lookup(store);
- store.on({
- scope: this,
- datachanged: this.refresh,
- add: this.delayRefresh,
- remove: this.delayRefresh,
- update: this.delayRefresh,
- clear: this.refresh
- });
- }
- this.store = store;
- if(store && !initial){
- this.refresh();
- }
- },
-
- onSwfReady : function(isReset){
- Ext.chart.Chart.superclass.onSwfReady.call(this, isReset);
- var ref;
- this.swf.setType(this.type);
-
- if(this.chartStyle){
- this.setStyles(Ext.apply({}, this.extraStyle, this.chartStyle));
- }
-
- if(this.categoryNames){
- this.setCategoryNames(this.categoryNames);
- }
-
- if(this.tipRenderer){
- ref = this.getFunctionRef(this.tipRenderer);
- this.setTipRenderer(ref.fn, ref.scope);
- }
- if(this.legendRenderer){
- ref = this.getFunctionRef(this.legendRenderer);
- this.setLegendRenderer(ref.fn, ref.scope);
- }
- if(!isReset){
- this.bindStore(this.store, true);
- }
- this.refresh.defer(10, this);
- },
-
- delayRefresh : function(){
- if(!this.refreshTask){
- this.refreshTask = new Ext.util.DelayedTask(this.refresh, this);
- }
- this.refreshTask.delay(this.refreshBuffer);
- },
-
- refresh : function(){
- if(this.fireEvent('beforerefresh', this) !== false){
- var styleChanged = false;
-
- var data = [], rs = this.store.data.items;
- for(var j = 0, len = rs.length; j < len; j++){
- data[j] = rs[j].data;
- }
-
-
- var dataProvider = [];
- var seriesCount = 0;
- var currentSeries = null;
- var i = 0;
- if(this.series){
- seriesCount = this.series.length;
- for(i = 0; i < seriesCount; i++){
- currentSeries = this.series[i];
- var clonedSeries = {};
- for(var prop in currentSeries){
- if(prop == "style" && currentSeries.style !== null){
- clonedSeries.style = Ext.encode(currentSeries.style);
- styleChanged = true;
-
-
-
-
- } else{
- clonedSeries[prop] = currentSeries[prop];
- }
- }
- dataProvider.push(clonedSeries);
- }
- }
-
- if(seriesCount > 0){
- for(i = 0; i < seriesCount; i++){
- currentSeries = dataProvider[i];
- if(!currentSeries.type){
- currentSeries.type = this.type;
- }
- currentSeries.dataProvider = data;
- }
- } else{
- dataProvider.push({type: this.type, dataProvider: data});
- }
- this.swf.setDataProvider(dataProvider);
- if(this.seriesStyles){
- this.setSeriesStyles(this.seriesStyles);
- }
- this.fireEvent('refresh', this);
- }
- },
-
-
- createFnProxy : function(fn){
- var fnName = 'extFnProxy' + (++Ext.chart.Chart.PROXY_FN_ID);
- Ext.chart.Chart.proxyFunction[fnName] = fn;
- return 'Ext.chart.Chart.proxyFunction.' + fnName;
- },
-
-
- removeFnProxy : function(fn){
- if(!Ext.isEmpty(fn)){
- fn = fn.replace('Ext.chart.Chart.proxyFunction.', '');
- delete Ext.chart.Chart.proxyFunction[fn];
- }
- },
-
-
- getFunctionRef : function(val){
- if(Ext.isFunction(val)){
- return {
- fn: val,
- scope: this
- };
- }else{
- return {
- fn: val.fn,
- scope: val.scope || this
- };
- }
- },
-
-
- onDestroy: function(){
- if (this.refreshTask && this.refreshTask.cancel){
- this.refreshTask.cancel();
- }
- Ext.chart.Chart.superclass.onDestroy.call(this);
- this.bindStore(null);
- this.removeFnProxy(this.tipFnName);
- this.removeFnProxy(this.legendFnName);
- }
-});
-Ext.reg('chart', Ext.chart.Chart);
-Ext.chart.Chart.PROXY_FN_ID = 0;
-Ext.chart.Chart.proxyFunction = {};
-
-
-Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.8.2/build/charts/assets/charts.swf';
-
-
-Ext.chart.PieChart = Ext.extend(Ext.chart.Chart, {
- type: 'pie',
-
- onSwfReady : function(isReset){
- Ext.chart.PieChart.superclass.onSwfReady.call(this, isReset);
-
- this.setDataField(this.dataField);
- this.setCategoryField(this.categoryField);
- },
-
- setDataField : function(field){
- this.dataField = field;
- this.swf.setDataField(field);
- },
-
- setCategoryField : function(field){
- this.categoryField = field;
- this.swf.setCategoryField(field);
- }
-});
-Ext.reg('piechart', Ext.chart.PieChart);
-
-
-Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, {
- onSwfReady : function(isReset){
- Ext.chart.CartesianChart.superclass.onSwfReady.call(this, isReset);
- this.labelFn = [];
- if(this.xField){
- this.setXField(this.xField);
- }
- if(this.yField){
- this.setYField(this.yField);
- }
- if(this.xAxis){
- this.setXAxis(this.xAxis);
- }
- if(this.xAxes){
- this.setXAxes(this.xAxes);
- }
- if(this.yAxis){
- this.setYAxis(this.yAxis);
- }
- if(this.yAxes){
- this.setYAxes(this.yAxes);
- }
- if(Ext.isDefined(this.constrainViewport)){
- this.swf.setConstrainViewport(this.constrainViewport);
- }
- },
-
- setXField : function(value){
- this.xField = value;
- this.swf.setHorizontalField(value);
- },
-
- setYField : function(value){
- this.yField = value;
- this.swf.setVerticalField(value);
- },
-
- setXAxis : function(value){
- this.xAxis = this.createAxis('xAxis', value);
- this.swf.setHorizontalAxis(this.xAxis);
- },
-
- setXAxes : function(value){
- var axis;
- for(var i = 0; i < value.length; i++) {
- axis = this.createAxis('xAxis' + i, value[i]);
- this.swf.setHorizontalAxis(axis);
- }
- },
-
- setYAxis : function(value){
- this.yAxis = this.createAxis('yAxis', value);
- this.swf.setVerticalAxis(this.yAxis);
- },
-
- setYAxes : function(value){
- var axis;
- for(var i = 0; i < value.length; i++) {
- axis = this.createAxis('yAxis' + i, value[i]);
- this.swf.setVerticalAxis(axis);
- }
- },
-
- createAxis : function(axis, value){
- var o = Ext.apply({}, value),
- ref,
- old;
-
- if(this[axis]){
- old = this[axis].labelFunction;
- this.removeFnProxy(old);
- this.labelFn.remove(old);
- }
- if(o.labelRenderer){
- ref = this.getFunctionRef(o.labelRenderer);
- o.labelFunction = this.createFnProxy(function(v){
- return ref.fn.call(ref.scope, v);
- });
- delete o.labelRenderer;
- this.labelFn.push(o.labelFunction);
- }
- if(axis.indexOf('xAxis') > -1 && o.position == 'left'){
- o.position = 'bottom';
- }
- return o;
- },
-
- onDestroy : function(){
- Ext.chart.CartesianChart.superclass.onDestroy.call(this);
- Ext.each(this.labelFn, function(fn){
- this.removeFnProxy(fn);
- }, 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(config){
- Ext.apply(this, config);
-};
-
-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(config) { Ext.apply(this, config); };
-
-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.menu.Menu = Ext.extend(Ext.Container, {
-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',
+ hideMode : 'offsets',
scrollerHeight : 8,
- autoLayout : true,
+ autoLayout : true,
defaultType : 'menuitem',
bufferResize : false,
@@ -38829,13 +37385,13 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
Ext.apply(this, {items:this.initialConfig});
}
this.addEvents(
-
+
'click',
-
+
'mouseover',
-
+
'mouseout',
-
+
'itemclick'
);
Ext.menu.MenuMgr.register(this);
@@ -38857,12 +37413,12 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
getLayoutTarget : function() {
return this.ul;
},
-
+
onRender : function(ct, position){
if(!ct){
ct = Ext.getBody();
@@ -38893,7 +37449,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
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, {
@@ -38912,7 +37468,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
findTargetItem : function(e){
var t = e.getTarget('.x-menu-list-item', this.ul, true);
if(t && t.menuItemId){
@@ -38920,7 +37476,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
onClick : function(e){
var t = this.findTargetItem(e);
if(t){
@@ -38938,7 +37494,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
setActiveItem : function(item, autoExpand){
if(item != this.activeItem){
this.deactivateActive();
@@ -38956,7 +37512,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
var a = this.activeItem;
if(a){
if(a.isFormField){
-
+
if(a.collapse){
a.collapse();
}
@@ -38967,7 +37523,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
tryActivate : function(start, step){
var items = this.items;
for(var i = start, len = items.length; i >= 0 && i < len; i+= step){
@@ -38980,7 +37536,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
return false;
},
-
+
onMouseOver : function(e){
var t = this.findTargetItem(e);
if(t){
@@ -38992,7 +37548,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
this.fireEvent('mouseover', this, e, t);
},
-
+
onMouseOut : function(e){
var t = this.findTargetItem(e);
if(t){
@@ -39005,7 +37561,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
this.fireEvent('mouseout', this, e, t);
},
-
+
onScroll : function(e, t){
if(e){
e.stopEvent();
@@ -39017,7 +37573,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
onScrollerIn : function(e, t){
var ul = this.ul.dom, top = Ext.fly(t).is('.x-menu-scroller-top');
if(top ? ul.scrollTop > 0 : ul.scrollTop + this.activeMax < ul.scrollHeight){
@@ -39025,12 +37581,12 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
onScrollerOut : function(e, t){
Ext.fly(t).removeClass(['x-menu-item-active', 'x-menu-scroller-active']);
},
-
+
show : function(el, pos, parentMenu){
if(this.floating){
this.parentMenu = parentMenu;
@@ -39044,7 +37600,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
showAt : function(xy, parentMenu){
if(this.fireEvent('beforeshow', this) !== false){
this.parentMenu = parentMenu;
@@ -39052,20 +37608,20 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
this.render();
}
if(this.enableScrolling){
-
+
this.el.setXY(xy);
-
+
xy[1] = this.constrainScroll(xy[1]);
xy = [this.el.adjustForConstraints(xy)[0], xy[1]];
}else{
-
+
xy = this.el.adjustForConstraints(xy);
}
this.el.setXY(xy);
this.el.show();
Ext.menu.Menu.superclass.onShow.call(this);
if(Ext.isIE9m){
-
+
this.fireEvent('autosize', this);
if(!Ext.isIE8){
this.el.repaint();
@@ -39084,13 +37640,13 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
parentEl = Ext.fly(this.el.dom.parentNode);
scrollTop = parentEl.getScroll().top;
viewHeight = parentEl.getViewSize().height;
-
-
+
+
normalY = y - scrollTop;
max = this.maxHeight ? this.maxHeight : viewHeight - normalY;
if(full > viewHeight) {
max = viewHeight;
-
+
returnY = y - normalY;
} else if(max < full) {
returnY = y - (full - max);
@@ -39099,7 +37655,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}else{
max = this.getHeight();
}
-
+
if (this.maxHeight){
max = Math.min(this.maxHeight, max);
}
@@ -39169,7 +37725,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
hide : function(deep){
if (!this.isDestroyed) {
this.deepHide = deep;
@@ -39178,7 +37734,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
onHide : function(){
Ext.menu.Menu.superclass.onHide.call(this);
this.deactivateActive();
@@ -39195,7 +37751,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}
},
-
+
lookupComponent : function(c){
if(Ext.isString(c)){
c = (c == 'separator' || c == '-') ? new Ext.menu.Separator() : new Ext.menu.TextItem(c);
@@ -39203,7 +37759,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
}else{
if(Ext.isObject(c)){
c = this.getMenuItem(c);
- }else if(c.tagName || c.el){
+ }else if(c.tagName || c.el){
c = new Ext.BoxComponent({
el: c
});
@@ -39228,10 +37784,10 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
return c;
},
-
+
getMenuItem : function(config) {
config.ownerCt = this;
-
+
if (!config.isXType) {
if (!config.xtype && Ext.isBoolean(config.checked)) {
return new Ext.menu.CheckItem(config);
@@ -39241,34 +37797,34 @@ Ext.menu.Menu = Ext.extend(Ext.Container, {
return config;
},
-
+
addSeparator : function() {
return this.add(new Ext.menu.Separator());
},
-
+
addElement : function(el) {
return this.add(new Ext.menu.BaseItem({
el: el
}));
},
-
+
addItem : function(item) {
return this.add(item);
},
-
+
addMenuItem : function(config) {
return this.add(this.getMenuItem(config));
},
-
+
addText : function(text){
return this.add(new Ext.menu.TextItem(text));
},
-
+
onDestroy : function(){
Ext.EventManager.removeResizeListener(this.hide, this);
var pm = this.parentMenu;
@@ -39364,15 +37920,15 @@ Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){
}());
Ext.menu.MenuMgr = function(){
- var menus,
- active,
+ var menus,
+ active,
map,
- groups = {},
- attached = false,
+ groups = {},
+ attached = false,
lastShow = new Date();
-
-
+
+
function init(){
menus = {};
active = new Ext.util.MixedCollection();
@@ -39380,7 +37936,7 @@ Ext.menu.MenuMgr = function(){
map.disable();
}
-
+
function hideAll(){
if(active && active.length > 0){
var c = active.clone();
@@ -39392,7 +37948,7 @@ Ext.menu.MenuMgr = function(){
return false;
}
-
+
function onHide(m){
active.remove(m);
if(active.length < 1){
@@ -39402,7 +37958,7 @@ Ext.menu.MenuMgr = function(){
}
}
-
+
function onShow(m){
var last = active.last();
lastShow = new Date();
@@ -39420,7 +37976,7 @@ Ext.menu.MenuMgr = function(){
}
}
-
+
function onBeforeHide(m){
if(m.activeChild){
m.activeChild.hide();
@@ -39431,7 +37987,7 @@ Ext.menu.MenuMgr = function(){
}
}
-
+
function onBeforeShow(m){
var pm = m.parentMenu;
if(!pm && !m.allowOtherMenus){
@@ -39441,7 +37997,7 @@ Ext.menu.MenuMgr = function(){
}
}
-
+
function onMouseDown(e){
if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){
hideAll();
@@ -39450,12 +38006,12 @@ Ext.menu.MenuMgr = function(){
return {
-
+
hideAll : function(){
return hideAll();
},
-
+
register : function(menu){
if(!menus){
init();
@@ -39469,23 +38025,23 @@ Ext.menu.MenuMgr = function(){
});
},
-
+
get : function(menu){
- if(typeof menu == "string"){
- if(!menus){
+ if(typeof menu == "string"){
+ if(!menus){
return null;
}
return menus[menu];
- }else if(menu.events){
+ }else if(menu.events){
return menu;
- }else if(typeof menu.length == 'number'){
+ }else if(typeof menu.length == 'number'){
return new Ext.menu.Menu({items:menu});
- }else{
+ }else{
return Ext.create(menu, 'menu');
}
},
-
+
unregister : function(menu){
delete menus[menu.id];
menu.un("beforehide", onBeforeHide);
@@ -39494,7 +38050,7 @@ Ext.menu.MenuMgr = function(){
menu.un("show", onShow);
},
-
+
registerCheckable : function(menuItem){
var g = menuItem.group;
if(g){
@@ -39505,22 +38061,22 @@ Ext.menu.MenuMgr = function(){
}
},
-
+
unregisterCheckable : function(menuItem){
var g = menuItem.group;
if(g){
groups[g].remove(menuItem);
}
},
-
-
+
+
onCheckChange: function(item, state){
if(item.group && state){
var group = groups[item.group],
i = 0,
len = group.length,
current;
-
+
for(; i < len; i++){
current = group[i];
if(current != item){
@@ -39557,32 +38113,32 @@ Ext.menu.MenuMgr = function(){
}();
Ext.menu.BaseItem = Ext.extend(Ext.Component, {
-
-
-
-
+
+
+
+
canActivate : false,
-
+
activeClass : "x-menu-item-active",
-
+
hideOnClick : true,
-
+
clickHideDelay : 1,
-
+
ctype : "Ext.menu.BaseItem",
-
+
actionMode : "container",
initComponent : function(){
Ext.menu.BaseItem.superclass.initComponent.call(this);
this.addEvents(
-
+
'click',
-
+
'activate',
-
+
'deactivate'
);
if(this.handler){
@@ -39590,7 +38146,7 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, {
}
},
-
+
onRender : function(container, position){
Ext.menu.BaseItem.superclass.onRender.apply(this, arguments);
if(this.ownerCt && this.ownerCt instanceof Ext.menu.Menu){
@@ -39606,7 +38162,7 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, {
}
},
-
+
setHandler : function(handler, scope){
if(this.handler){
this.un("click", this.handler, this.scope);
@@ -39614,7 +38170,7 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, {
this.on("click", this.handler = handler, this.scope = scope);
},
-
+
onClick : function(e){
if(!this.disabled && this.fireEvent("click", this, e) !== false
&& (this.parentMenu && this.parentMenu.fireEvent("itemclick", this, e) !== false)){
@@ -39624,7 +38180,7 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, {
}
},
-
+
activate : function(){
if(this.disabled){
return false;
@@ -39636,18 +38192,18 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, {
return true;
},
-
+
deactivate : function(){
this.container.removeClass(this.activeClass);
this.fireEvent("deactivate", this);
},
-
+
shouldDeactivate : function(e){
return !this.region || !this.region.contains(e.getPoint());
},
-
+
handleClick : function(e){
var pm = this.parentMenu;
if(this.hideOnClick){
@@ -39658,26 +38214,26 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, {
}
}
},
-
+
beforeDestroy: function(){
clearTimeout(this.clickHideDelayTimer);
- Ext.menu.BaseItem.superclass.beforeDestroy.call(this);
+ Ext.menu.BaseItem.superclass.beforeDestroy.call(this);
},
-
+
expandMenu : Ext.emptyFn,
-
+
hideMenu : Ext.emptyFn
});
Ext.reg('menubaseitem', Ext.menu.BaseItem);
Ext.menu.TextItem = Ext.extend(Ext.menu.BaseItem, {
-
-
+
+
hideOnClick : false,
-
+
itemCls : "x-menu-text",
-
+
constructor : function(config) {
if (typeof config == 'string') {
config = {
@@ -39687,7 +38243,7 @@ Ext.menu.TextItem = Ext.extend(Ext.menu.BaseItem, {
Ext.menu.TextItem.superclass.constructor.call(this, config);
},
-
+
onRender : function() {
var s = document.createElement("span");
s.className = this.itemCls;
@@ -39698,15 +38254,15 @@ Ext.menu.TextItem = Ext.extend(Ext.menu.BaseItem, {
});
Ext.reg('menutextitem', Ext.menu.TextItem);
Ext.menu.Separator = Ext.extend(Ext.menu.BaseItem, {
-
+
itemCls : "x-menu-sep",
-
+
hideOnClick : false,
-
-
+
+
activeClass: '',
-
+
onRender : function(li){
var s = document.createElement("span");
s.className = this.itemCls;
@@ -39718,50 +38274,50 @@ Ext.menu.Separator = Ext.extend(Ext.menu.BaseItem, {
});
Ext.reg('menuseparator', Ext.menu.Separator);
Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
itemCls : 'x-menu-item',
-
+
canActivate : true,
-
+
showDelay: 200,
-
-
+
+
altText: '',
-
-
+
+
hideDelay: 200,
-
+
ctype: 'Ext.menu.Item',
initComponent : function(){
Ext.menu.Item.superclass.initComponent.call(this);
if(this.menu){
-
-
+
+
if (Ext.isArray(this.menu)){
this.menu = { items: this.menu };
}
-
-
-
+
+
+
if (Ext.isObject(this.menu)){
this.menu.ownerCt = this;
}
-
+
this.menu = Ext.menu.MenuMgr.get(this.menu);
this.menu.ownerCt = undefined;
}
},
-
+
onRender : function(container, position){
if (!this.itemTpl) {
this.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate(
@@ -39779,7 +38335,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
this.el = position ? this.itemTpl.insertBefore(position, a, true) : this.itemTpl.append(container, a, true);
this.iconEl = this.el.child('img.x-menu-item-icon');
this.textEl = this.el.child('.x-menu-item-text');
- if(!this.href) {
+ if(!this.href) {
this.mon(this.el, 'click', Ext.emptyFn, null, { preventDefault: true });
}
Ext.menu.Item.superclass.onRender.call(this, container, position);
@@ -39798,7 +38354,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
};
},
-
+
setText : function(text){
this.text = text||' ';
if(this.rendered){
@@ -39807,7 +38363,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
}
},
-
+
setIconClass : function(cls){
var oldCls = this.iconCls;
this.iconCls = cls;
@@ -39816,7 +38372,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
}
},
-
+
beforeDestroy: function(){
clearTimeout(this.showTimer);
clearTimeout(this.hideTimer);
@@ -39827,15 +38383,15 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
Ext.menu.Item.superclass.beforeDestroy.call(this);
},
-
+
handleClick : function(e){
- if(!this.href){
+ if(!this.href){
e.stopEvent();
}
Ext.menu.Item.superclass.handleClick.apply(this, arguments);
},
-
+
activate : function(autoExpand){
if(Ext.menu.Item.superclass.activate.apply(this, arguments)){
this.focus();
@@ -39846,7 +38402,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
return true;
},
-
+
shouldDeactivate : function(e){
if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){
if(this.menu && this.menu.isVisible()){
@@ -39857,13 +38413,13 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
return false;
},
-
+
deactivate : function(){
Ext.menu.Item.superclass.deactivate.apply(this, arguments);
this.hideMenu();
},
-
+
expandMenu : function(autoActivate){
if(!this.disabled && this.menu){
clearTimeout(this.hideTimer);
@@ -39876,7 +38432,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
}
},
-
+
deferExpand : function(autoActivate){
delete this.showTimer;
this.menu.show(this.container, this.parentMenu.subMenuAlign || 'tl-tr?', this.parentMenu);
@@ -39885,7 +38441,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
}
},
-
+
hideMenu : function(){
clearTimeout(this.showTimer);
delete this.showTimer;
@@ -39894,7 +38450,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
}
},
-
+
deferHide : function(){
delete this.hideTimer;
if(this.menu.over){
@@ -39906,34 +38462,34 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, {
});
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(c){
Ext.menu.CheckItem.superclass.onRender.apply(this, arguments);
if(this.group){
@@ -39945,13 +38501,13 @@ Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, {
}
},
-
+
destroy : function(){
Ext.menu.MenuMgr.unregisterCheckable(this);
Ext.menu.CheckItem.superclass.destroy.apply(this, arguments);
},
-
+
setChecked : function(state, suppressEvent){
var suppress = suppressEvent === true;
if(this.checked != state && (suppress || this.fireEvent("beforecheckchange", this, state) !== false)){
@@ -39966,7 +38522,7 @@ Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, {
}
},
-
+
handleClick : function(e){
if(!this.disabled && !(this.checked && this.group)){
this.setChecked(!this.checked);
@@ -39976,24 +38532,24 @@ Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, {
});
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);
@@ -40011,7 +38567,7 @@ Ext.reg('menucheckitem', Ext.menu.CheckItem);
});
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);
@@ -40034,34 +38590,34 @@ Ext.reg('menucheckitem', Ext.menu.CheckItem);
onShow : function(){
var el = this.picker.getEl();
- el.setWidth(el.getWidth());
+ el.setWidth(el.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,
@@ -40072,7 +38628,7 @@ Ext.reg('menucheckitem', Ext.menu.CheckItem);
});
this.palette.purgeListeners();
Ext.menu.ColorMenu.superclass.initComponent.call(this);
-
+
this.relayEvents(this.palette, ['select']);
this.on('select', this.menuHide, this);
if(this.handler){
@@ -40089,75 +38645,75 @@ Ext.reg('menucheckitem', Ext.menu.CheckItem);
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(ct, position){
if(!this.el){
var cfg = this.getAutoCreate();
@@ -40191,23 +38747,23 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
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;
@@ -40215,7 +38771,7 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
return String(this.getValue()) !== String(this.originalValue);
},
-
+
setReadOnly : function(readOnly){
if(this.rendered){
this.el.dom.readOnly = readOnly;
@@ -40223,40 +38779,40 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
this.readOnly = readOnly;
},
-
+
afterRender : function(){
Ext.form.Field.superclass.afterRender.call(this);
this.initEvents();
this.initValue();
},
-
+
fireKey : function(e){
if(e.isSpecialKey()){
this.fireEvent('specialkey', this, e);
}
},
-
+
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){
@@ -40264,16 +38820,16 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
}
if(!this.hasFocus){
this.hasFocus = true;
-
+
this.startValue = this.getValue();
this.fireEvent('focus', this);
}
},
-
+
beforeBlur : Ext.emptyFn,
-
+
onBlur : function(){
this.beforeBlur();
if(this.focusClass){
@@ -40291,10 +38847,10 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
this.postBlur();
},
-
+
postBlur : Ext.emptyFn,
-
+
isValid : function(preventMark){
if(this.disabled){
return true;
@@ -40306,7 +38862,7 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
return v;
},
-
+
validate : function(){
if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){
this.clearInvalid();
@@ -40315,14 +38871,14 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
return false;
},
-
+
processValue : function(value){
return value;
},
-
+
validateValue : function(value) {
-
+
var error = this.getErrors(value)[0];
if (error == undefined) {
@@ -40332,20 +38888,20 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
return false;
}
},
-
-
+
+
getErrors: function() {
return [];
},
-
+
getActiveError : function(){
return this.activeError || '';
},
-
+
markInvalid : function(msg){
-
+
if (this.rendered && !this.preventMark) {
msg = msg || this.invalidText;
@@ -40361,13 +38917,13 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
}
}
}
-
+
this.setActiveError(msg);
},
-
-
+
+
clearInvalid : function(){
-
+
if (this.rendered && !this.preventMark) {
this.el.removeClass(this.invalidClass);
var mt = this.getMessageHandler();
@@ -40382,44 +38938,44 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
}
}
}
-
+
this.unsetActiveError();
},
-
+
setActiveError: function(msg, suppressEvent) {
this.activeError = msg;
if (suppressEvent !== true) this.fireEvent('invalid', this, msg);
},
-
-
+
+
unsetActiveError: function(suppressEvent) {
delete this.activeError;
if (suppressEvent !== 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);
+ 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 v = this.rendered ? this.el.getValue() : Ext.value(this.value, '');
if(v === this.emptyText){
@@ -40428,7 +38984,7 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
return v;
},
-
+
getValue : function(){
if(!this.rendered) {
return this.value;
@@ -40440,12 +38996,12 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
return v;
},
-
+
setRawValue : function(v){
return this.rendered ? (this.el.dom.value = (Ext.isEmpty(v) ? '' : v)) : '';
},
-
+
setValue : function(v){
this.value = v;
if(this.rendered){
@@ -40455,15 +39011,15 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, {
return this;
},
-
+
append : function(v){
this.setValue([this.getValue(), v].join(''));
}
-
-
-
+
+
+
});
@@ -40473,7 +39029,7 @@ Ext.form.MessageTargets = {
field.el.addClass(field.invalidClass);
field.el.dom.qtip = msg;
field.el.dom.qclass = 'x-form-invalid-tip';
- if(Ext.QuickTips){
+ if(Ext.QuickTips){
Ext.QuickTips.enable();
}
},
@@ -40496,7 +39052,7 @@ Ext.form.MessageTargets = {
field.el.addClass(field.invalidClass);
if(!field.errorEl){
var elp = field.getErrorCt();
- if(!elp){
+ if(!elp){
field.el.dom.title = msg;
return;
}
@@ -40524,7 +39080,7 @@ Ext.form.MessageTargets = {
field.el.addClass(field.invalidClass);
if(!field.errorIcon){
var elp = field.getErrorCt();
-
+
if(!elp){
field.el.dom.title = msg;
return;
@@ -40593,63 +39149,63 @@ Ext.form.Field.msgFx = {
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'){
@@ -40659,9 +39215,9 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
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){
+ if(this.selectOnFocus || this.emptyText){
this.mon(this.el, 'mousedown', this.onMouseDown, this);
-
+
if(this.emptyText){
this.applyEmptyText();
}
@@ -40682,7 +39238,7 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
});
}
},
-
+
onMouseDown: function(e){
if(!this.hasFocus){
this.mon(this.el, 'mouseup', Ext.emptyFn, this, { single: true, preventDefault: true });
@@ -40705,16 +39261,16 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
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){
@@ -40722,34 +39278,34 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
}
},
-
+
onKeyUpBuffered : function(e){
if(this.doAutoSize(e)){
this.autoSize();
}
},
-
-
+
+
doAutoSize : function(e){
return !e.isNavKeyPress();
},
-
+
onKeyUp : function(e){
this.fireEvent('keyup', this, e);
},
-
+
onKeyDown : function(e){
this.fireEvent('keydown', this, e);
},
-
+
onKeyPress : function(e){
this.fireEvent('keypress', this, e);
},
-
+
reset : function(){
Ext.form.TextField.superclass.reset.call(this);
this.applyEmptyText();
@@ -40762,7 +39318,7 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
}
},
-
+
preFocus : function(){
var el = this.el,
isEmpty;
@@ -40778,12 +39334,12 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
}
},
-
+
postBlur : function(){
this.applyEmptyText();
},
-
+
filterKeys : function(e){
if(e.ctrlKey){
return;
@@ -40811,55 +39367,55 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
return this;
},
-
+
getErrors: function(value) {
var errors = Ext.form.TextField.superclass.getErrors.apply(this, arguments);
-
- value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue());
-
+
+ value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue());
+
if (Ext.isFunction(this.validator)) {
var msg = this.validator(value);
if (msg !== true) {
errors.push(msg);
}
}
-
+
if (value.length < 1 || value === this.emptyText) {
if (this.allowBlank) {
-
+
return errors;
} else {
errors.push(this.blankText);
}
}
-
- if (!this.allowBlank && (value.length < 1 || value === this.emptyText)) {
+
+ if (!this.allowBlank && (value.length < 1 || value === this.emptyText)) {
errors.push(this.blankText);
}
-
+
if (value.length < this.minLength) {
errors.push(String.format(this.minLengthText, this.minLength));
}
-
+
if (value.length > this.maxLength) {
errors.push(String.format(this.maxLengthText, this.maxLength));
}
-
+
if (this.vtype) {
var vt = Ext.form.VTypes;
if(!vt[this.vtype](value, this)){
errors.push(this.vtypeText || vt[this.vtype +'Text']);
}
}
-
+
if (this.regex && !this.regex.test(value)) {
errors.push(this.regexText);
}
-
+
return errors;
},
-
+
selectText : function(start, end){
var v = this.getRawValue();
var doFocus = false;
@@ -40884,7 +39440,7 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
}
},
-
+
autoSize : function(){
if(!this.grow || !this.rendered){
return;
@@ -40904,7 +39460,7 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
this.el.setWidth(w);
this.fireEvent('autosize', this, w);
},
-
+
onDestroy: function(){
if(this.validationTask){
this.validationTask.cancel();
@@ -40916,32 +39472,32 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, {
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(w, h){
Ext.form.TriggerField.superclass.onResize.call(this, w, h);
var tw = this.getTriggerWidth();
@@ -40959,14 +39515,14 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
return tw;
},
-
+
alignErrorIcon : function(){
if(this.wrap){
this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
}
},
-
+
onRender : function(ct, position){
this.doc = Ext.isIE ? Ext.getBody() : Ext.getDoc();
Ext.form.TriggerField.superclass.onRender.call(this, ct, position);
@@ -41008,7 +39564,7 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
}
},
-
+
setHideTrigger: function(hideTrigger){
if(hideTrigger != this.hideTrigger){
this.hideTrigger = hideTrigger;
@@ -41016,7 +39572,7 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
}
},
-
+
setEditable: function(editable){
if(editable != this.editable){
this.editable = editable;
@@ -41024,7 +39580,7 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
}
},
-
+
setReadOnly: function(readOnly){
if(readOnly != this.readOnly){
this.readOnly = readOnly;
@@ -41037,14 +39593,14 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
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){
@@ -41054,7 +39610,7 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
Ext.form.TriggerField.superclass.onDestroy.call(this);
},
-
+
onFocus : function(){
Ext.form.TriggerField.superclass.onFocus.call(this);
if(!this.mimicing){
@@ -41067,24 +39623,24 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
}
},
-
+
checkTab : function(me, e){
if(e.getKey() == e.TAB){
this.triggerBlur();
}
},
-
+
onBlur : Ext.emptyFn,
-
+
mimicBlur : function(e){
if(!this.isDestroyed && !this.wrap.contains(e.target) && this.validateBlur(e)){
this.triggerBlur();
}
},
-
+
triggerBlur : function(){
this.mimicing = false;
this.doc.un('mousedown', this.mimicBlur, this);
@@ -41099,25 +39655,25 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, {
beforeBlur : Ext.emptyFn,
-
-
+
+
validateBlur : function(e){
return true;
},
-
+
onTriggerClick : Ext.emptyFn
-
-
-
+
+
+
});
Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, {
-
-
-
+
+
+
initComponent : function(){
Ext.form.TwinTriggerField.superclass.initComponent.call(this);
@@ -41132,25 +39688,25 @@ Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, {
getTrigger : function(index){
return this.triggers[index];
},
-
+
afterRender: function(){
Ext.form.TwinTriggerField.superclass.afterRender.call(this);
var triggers = this.triggers,
i = 0,
len = triggers.length;
-
+
for(; i < len; ++i){
if(this['hideTrigger' + (i + 1)]){
triggers[i].hide();
}
- }
+ }
},
initTrigger : function(){
var ts = this.trigger.select('.x-form-trigger', true),
triggerField = this;
-
+
ts.each(function(t, all, index){
var triggerIndex = 'Trigger'+(index+1);
t.hide = function(){
@@ -41186,33 +39742,33 @@ Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, {
return tw;
},
-
+
onDestroy : function() {
Ext.destroy(this.triggers);
Ext.form.TwinTriggerField.superclass.onDestroy.call(this);
},
-
+
onTrigger1Click : Ext.emptyFn,
-
+
onTrigger2Click : Ext.emptyFn
});
Ext.reg('trigger', Ext.form.TriggerField);
Ext.reg('twintrigger', Ext.form.TwinTriggerField);
Ext.form.TextArea = Ext.extend(Ext.form.TextField, {
-
+
growMin : 60,
-
+
growMax: 1000,
growAppend : ' \n ',
enterIsSpecial : false,
-
+
preventScrollbars: false,
-
-
+
+
onRender : function(ct, position){
if(!this.el){
this.defaultAutoCreate = {
@@ -41243,20 +39799,20 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, {
this.fireEvent("specialkey", this, e);
}
},
-
-
+
+
doAutoSize : function(e){
return !e.isNavKeyPress() || e.getKey() == e.ENTER;
},
-
-
- filterValidation: function(e) {
+
+
+ filterValidation: function(e) {
if(!e.isNavKeyPress() || (!this.enterIsSpecial && e.keyCode == e.ENTER)){
this.validationTask.delay(this.validationDelay);
}
},
-
+
autoSize: function(){
if(!this.grow || !this.textSizeEl){
return;
@@ -41265,7 +39821,7 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, {
v = Ext.util.Format.htmlEncode(el.dom.value),
ts = this.textSizeEl,
h;
-
+
Ext.fly(ts).setWidth(this.el.getWidth());
if(v.length < 1){
v = " ";
@@ -41286,45 +39842,45 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, {
});
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 allowed = this.baseChars + '';
if (this.allowDecimals) {
@@ -41338,36 +39894,36 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, {
if (this.autoStripChars) {
this.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi');
}
-
+
Ext.form.NumberField.superclass.initEvents.call(this);
},
-
-
+
+
getErrors: function(value) {
var errors = Ext.form.NumberField.superclass.getErrors.apply(this, arguments);
-
+
value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue());
-
- if (value.length < 1) {
+
+ if (value.length < 1) {
return errors;
}
-
+
value = String(value).replace(this.decimalSeparator, ".");
-
+
if(isNaN(value)){
errors.push(String.format(this.nanText, value));
}
-
+
var num = this.parseValue(value);
-
+
if (num < this.minValue) {
errors.push(String.format(this.minText, this.minValue));
}
-
+
if (num > this.maxValue) {
errors.push(String.format(this.maxText, this.maxValue));
}
-
+
return errors;
},
@@ -41381,37 +39937,37 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, {
v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator);
return Ext.form.NumberField.superclass.setValue.call(this, v);
},
-
-
+
+
setMinValue : function(value) {
this.minValue = Ext.num(value, Number.NEGATIVE_INFINITY);
},
-
-
+
+
setMaxValue : function(value) {
- this.maxValue = Ext.num(value, Number.MAX_VALUE);
+ this.maxValue = Ext.num(value, Number.MAX_VALUE);
},
-
+
parseValue : function(value) {
value = parseFloat(String(value).replace(this.decimalSeparator, "."));
return isNaN(value) ? '' : value;
},
-
+
fixPrecision : function(value) {
var nan = isNaN(value);
-
+
if (!this.allowDecimals || this.decimalPrecision == -1 || nan || !value) {
return nan ? '' : value;
}
-
+
return parseFloat(parseFloat(value).toFixed(this.decimalPrecision));
},
beforeBlur : function() {
var v = this.parseValue(this.getRawValue());
-
+
if (!Ext.isEmpty(v)) {
this.setValue(v);
}
@@ -41421,52 +39977,52 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, {
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',
+
+
+ initTime: '12',
initTimeFormat: 'H',
-
+
safeParse : function(value, format) {
if (Date.formatContainsHourInfo(format)) {
-
+
return Date.parseDate(value, format);
} else {
-
+
var parsedDate = Date.parseDate(value + ' ' + this.initTime, format + ' ' + this.initTimeFormat);
-
+
if (parsedDate) {
return parsedDate.clearTime();
}
@@ -41477,7 +40033,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
Ext.form.DateField.superclass.initComponent.call(this);
this.addEvents(
-
+
'select'
);
@@ -41503,7 +40059,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
},
-
+
initDisabledDays : function(){
if(this.disabledDates){
var dd = this.disabledDates,
@@ -41520,7 +40076,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
setDisabledDates : function(dd){
this.disabledDates = dd;
this.initDisabledDays();
@@ -41529,7 +40085,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
setDisabledDays : function(dd){
this.disabledDays = dd;
if(this.menu){
@@ -41537,7 +40093,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
setMinValue : function(dt){
this.minValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
if(this.menu){
@@ -41545,7 +40101,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
setMaxValue : function(dt){
this.maxValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
if(this.menu){
@@ -41553,13 +40109,13 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
getErrors: function(value) {
var errors = Ext.form.DateField.superclass.getErrors.apply(this, arguments);
value = this.formatDate(value || this.processValue(this.getRawValue()));
- if (value.length < 1) {
+ if (value.length < 1) {
return errors;
}
@@ -41598,23 +40154,23 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
return errors;
},
-
-
+
+
validateBlur : function(){
return !this.menu || !this.menu.isVisible();
},
-
+
getValue : function(){
return this.parseDate(Ext.form.DateField.superclass.getValue.call(this)) || "";
},
-
+
setValue : function(date){
return Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date)));
},
-
+
parseDate : function(value) {
if(!value || Ext.isDate(value)){
return value;
@@ -41634,20 +40190,20 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
return v;
},
-
+
onDestroy : function(){
Ext.destroy(this.menu, this.keyNav);
Ext.form.DateField.superclass.onDestroy.call(this);
},
-
+
formatDate : function(date){
return Ext.isDate(date) ? date.dateFormat(this.format) : date;
},
-
-
-
+
+
+
onTriggerClick : function(){
if(this.disabled){
return;
@@ -41677,7 +40233,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
this.menuEvents('on');
},
-
+
menuEvents: function(method){
this.menu[method]('select', this.onSelect, this);
this.menu[method]('hide', this.onMenuHide, this);
@@ -41695,7 +40251,7 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
this.menuEvents('un');
},
-
+
beforeBlur : function(){
var v = this.parseDate(this.getRawValue());
if(v){
@@ -41703,10 +40259,10 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
}
}
-
-
-
-
+
+
+
+
});
Ext.reg('datefield', Ext.form.DateField);
@@ -41714,12 +40270,12 @@ Ext.form.DisplayField = Ext.extend(Ext.form.Field, {
validationEvent : false,
validateOnBlur : false,
defaultAutoCreate : {tag: "div"},
-
+
fieldClass : "x-form-display-field",
-
+
htmlEncode: false,
-
+
initEvents : Ext.emptyFn,
isValid : function(){
@@ -41744,7 +40300,7 @@ Ext.form.DisplayField = Ext.extend(Ext.form.Field, {
getValue : function(){
return this.getRawValue();
},
-
+
getName: function() {
return this.name;
},
@@ -41760,106 +40316,106 @@ Ext.form.DisplayField = Ext.extend(Ext.form.Field, {
this.setRawValue(v);
return this;
}
-
-
-
-
-
-
+
+
+
+
+
+
});
Ext.reg('displayfield', Ext.form.DisplayField);
Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
-
-
-
-
-
-
+
+
+
+
+
+
defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"},
-
-
-
-
-
-
-
+
+
+
+
+
+
+
listClass : '',
-
+
selectedClass : 'x-combo-selected',
-
+
listEmptyText: '',
-
+
triggerClass : 'x-form-arrow-trigger',
-
+
shadow : 'sides',
-
+
listAlign : 'tl-bl?',
-
+
maxHeight : 300,
-
+
minHeight : 90,
-
+
triggerAction : 'query',
-
+
minChars : 4,
-
+
autoSelect : true,
-
+
typeAhead : false,
-
+
queryDelay : 500,
-
+
pageSize : 0,
-
+
selectOnFocus : false,
-
+
queryParam : 'query',
-
+
loadingText : 'Loading...',
-
+
resizable : false,
-
+
handleHeight : 8,
-
+
allQuery: '',
-
+
mode: 'remote',
-
+
minListWidth : 70,
-
+
forceSelection : false,
-
+
typeAheadDelay : 250,
-
-
+
+
lazyInit : true,
-
+
clearFilterOnReset : true,
-
+
submitValue: undefined,
-
-
+
+
initComponent : function(){
Ext.form.ComboBox.superclass.initComponent.call(this);
this.addEvents(
-
+
'expand',
-
+
'collapse',
-
+
'beforeselect',
-
+
'select',
-
+
'beforequery'
);
if(this.transform){
@@ -41887,7 +40443,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
this.valueField = 'value';
this.displayField = 'text';
}
- s.name = Ext.id();
+ s.name = Ext.id();
if(!this.lazyRender){
this.target = true;
this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate);
@@ -41895,7 +40451,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
Ext.removeNode(s);
}
-
+
else if(this.store){
this.store = Ext.StoreMgr.lookup(this.store);
if(this.store.autoCreated){
@@ -41918,7 +40474,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
onRender : function(ct, position){
if(this.hiddenName && !Ext.isDefined(this.submitValue)){
this.submitValue = false;
@@ -41940,7 +40496,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
initValue : function(){
Ext.form.ComboBox.superclass.initValue.call(this);
if(this.hiddenField){
@@ -41969,7 +40525,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
return (zindex || 12000) + 5;
},
-
+
initList : function(){
if(!this.list){
var cls = 'x-combo-list',
@@ -42011,12 +40567,12 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
if(!this.tpl){
-
+
this.tpl = '{' + this.displayField + '}
';
-
+
}
-
+
this.view = new Ext.DataView({
applyTo: this.innerList,
tpl: this.tpl,
@@ -42051,17 +40607,17 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
getListParent : function() {
return document.body;
},
-
+
getStore : function(){
return this.store;
},
-
+
bindStore : function(store, initial){
if(this.store && !initial){
if(this.store !== store && this.store.autoDestroy){
@@ -42110,11 +40666,11 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
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(e){
this.inKeyMode = true;
@@ -42151,10 +40707,10 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
doRelay : function(e, h, hname){
if(hname == 'down' || this.scope.isExpanded()){
-
+
var relay = Ext.KeyNav.prototype.doRelay.apply(this, arguments);
if((((Ext.isIE9 && Ext.isStrict) || Ext.isIE10p) || !Ext.isIE) && Ext.EventManager.useKeydown){
-
+
this.scope.fireKey(e);
}
return relay;
@@ -42177,7 +40733,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
},
-
+
onDestroy : function(){
if (this.dqTask){
this.dqTask.cancel();
@@ -42194,14 +40750,14 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
Ext.form.ComboBox.superclass.onDestroy.call(this);
},
-
+
fireKey : function(e){
if (!this.isExpanded()) {
Ext.form.ComboBox.superclass.fireKey.call(this, e);
}
},
-
+
onResize : function(w, h){
Ext.form.ComboBox.superclass.onResize.apply(this, arguments);
if(!isNaN(w) && this.isVisible() && this.list){
@@ -42219,7 +40775,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
onEnable : function(){
Ext.form.ComboBox.superclass.onEnable.apply(this, arguments);
if(this.hiddenField){
@@ -42227,7 +40783,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
onDisable : function(){
Ext.form.ComboBox.superclass.onDisable.apply(this, arguments);
if(this.hiddenField){
@@ -42235,7 +40791,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
onBeforeLoad : function(){
if(!this.hasFocus){
return;
@@ -42246,7 +40802,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
this.selectedIndex = -1;
},
-
+
onLoad : function(){
if(!this.hasFocus){
return;
@@ -42276,7 +40832,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
},
-
+
onTypeAhead : function(){
if(this.store.getCount() > 0){
var r = this.store.getAt(0);
@@ -42290,7 +40846,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
assertValue : function(){
var val = this.getRawValue(),
rec;
@@ -42310,9 +40866,9 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
}else{
if(rec && this.valueField){
-
-
-
+
+
+
if (this.value == val){
return;
}
@@ -42322,7 +40878,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
onSelect : function(record, index){
if(this.fireEvent('beforeselect', this, record, index) !== false){
this.setValue(record.data[this.valueField || this.displayField]);
@@ -42331,13 +40887,13 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
getName: function(){
var hf = this.hiddenField;
return hf && hf.name ? hf.name : this.hiddenName || Ext.form.ComboBox.superclass.getName.call(this);
},
-
+
getValue : function(){
if(this.valueField){
return Ext.isDefined(this.value) ? this.value : '';
@@ -42346,7 +40902,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
clearValue : function(){
if(this.hiddenField){
this.hiddenField.value = '';
@@ -42357,7 +40913,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
this.value = '';
},
-
+
setValue : function(v){
var text = v;
if(this.valueField){
@@ -42377,7 +40933,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
return this;
},
-
+
findRecord : function(prop, value){
var record;
if(this.store.getCount() > 0){
@@ -42391,14 +40947,14 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
return record;
},
-
+
onViewMove : function(e, t){
this.inKeyMode = false;
},
-
+
onViewOver : function(e, t){
- if(this.inKeyMode){
+ if(this.inKeyMode){
return;
}
var item = this.view.findItemFromChild(t);
@@ -42408,7 +40964,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
onViewClick : function(doFocus){
var index = this.view.getSelectedIndexes()[0],
s = this.store,
@@ -42424,7 +40980,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
},
-
+
restrictHeight : function(){
this.innerList.dom.style.height = '';
var inner = this.innerList.dom,
@@ -42443,12 +40999,12 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
this.list.endUpdate();
},
-
+
isExpanded : function(){
return this.list && this.list.isVisible();
},
-
+
selectByValue : function(v, scrollIntoView){
if(!Ext.isEmpty(v, true)){
var r = this.findRecord(this.valueField || this.displayField, v);
@@ -42460,7 +41016,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
return false;
},
-
+
select : function(index, scrollIntoView){
this.selectedIndex = index;
this.view.select(index);
@@ -42473,7 +41029,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
},
-
+
selectNext : function(){
var ct = this.store.getCount();
if(ct > 0){
@@ -42485,7 +41041,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
selectPrev : function(){
var ct = this.store.getCount();
if(ct > 0){
@@ -42497,7 +41053,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
onKeyUp : function(e){
var k = e.getKey();
if(this.editable !== false && this.readOnly !== true && (k == e.BACKSPACE || !e.isSpecialKey())){
@@ -42508,29 +41064,29 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
Ext.form.ComboBox.superclass.onKeyUp.call(this, e);
},
-
+
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(q, forceAll){
q = Ext.isEmpty(q) ? '' : q;
var qe = {
@@ -42569,7 +41125,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
},
-
+
getParams : function(q){
var params = {},
paramNames = this.store.paramNames;
@@ -42580,7 +41136,7 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
return params;
},
-
+
collapse : function(){
if(!this.isExpanded()){
return;
@@ -42591,14 +41147,14 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
this.fireEvent('collapse', this);
},
-
+
collapseIf : function(e){
if(!this.isDestroyed && !e.within(this.wrap) && !e.within(this.list)){
this.collapse();
}
},
-
+
expand : function(){
if(this.isExpanded() || !this.hasFocus){
return;
@@ -42620,11 +41176,11 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
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.innerList.setOverflow('auto');
}
this.mon(Ext.getDoc(), {
scope: this,
@@ -42634,9 +41190,9 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
this.fireEvent('expand', this);
},
-
-
-
+
+
+
onTriggerClick : function(){
if(this.readOnly || this.disabled){
return;
@@ -42655,42 +41211,42 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, {
}
}
-
-
-
-
+
+
+
+
});
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){
@@ -42698,7 +41254,7 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, {
}
},
-
+
initEvents : function(){
Ext.form.Checkbox.superclass.initEvents.call(this);
this.mon(this.el, {
@@ -42708,12 +41264,12 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, {
});
},
-
+
markInvalid : Ext.emptyFn,
-
+
clearInvalid : Ext.emptyFn,
-
+
onRender : function(ct, position){
Ext.form.Checkbox.superclass.onRender.call(this, ct, position);
if(this.inputValue !== undefined){
@@ -42728,25 +41284,25 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, {
}else{
this.checked = this.el.dom.checked;
}
-
+
if (Ext.isIEQuirks) {
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;
@@ -42754,24 +41310,24 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, {
return this.checked;
},
-
+
onClick : function(){
if(this.el.dom.checked != this.checked){
this.setValue(this.el.dom.checked);
}
},
-
+
setValue : function(v){
var checked = this.checked,
inputVal = this.inputValue;
-
+
if (v === false) {
this.checked = false;
} else {
this.checked = (v === true || v === 'true' || v == '1' || (inputVal ? v == inputVal : String(v).toLowerCase() == 'on'));
}
-
+
if(this.rendered){
this.el.dom.checked = this.checked;
this.el.dom.defaultChecked = this.checked;
@@ -42788,33 +41344,33 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, {
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(ct, position){
if(!this.el){
var panelCfg = {
@@ -42824,7 +41380,7 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, {
cls: this.groupCls,
layout: 'column',
renderTo: ct,
- bufferResize: false
+ bufferResize: false
};
var colCfg = {
xtype: 'container',
@@ -42838,7 +41394,7 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, {
if(this.items[0].items){
-
+
Ext.apply(panelCfg, {
layoutConfig: {columns: this.items.length},
@@ -42851,25 +41407,25 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, {
}else{
-
-
+
+
var numCols, cols = [];
- if(typeof this.columns == 'string'){
+ if(typeof this.columns == 'string'){
this.columns = this.items.length;
}
if(!Ext.isArray(this.columns)){
var cs = [];
for(var i=0; i ");
},
-
+
sortErrors: function() {
var fields = this.items;
@@ -43371,34 +41927,34 @@ Ext.form.CompositeField = Ext.extend(Ext.form.Field, {
});
},
-
+
reset: function() {
this.eachItem(function(item) {
item.reset();
});
-
-
+
+
(function() {
this.clearInvalid();
}).defer(50, this);
},
-
-
+
+
clearInvalidChildren: function() {
this.eachItem(function(item) {
item.clearInvalid();
});
},
-
+
buildLabel: function(segments) {
return Ext.clean(segments).join(this.labelConnector);
},
-
+
isDirty: function(){
-
+
if (this.disabled || !this.rendered) {
return false;
}
@@ -43413,14 +41969,14 @@ Ext.form.CompositeField = Ext.extend(Ext.form.Field, {
return dirty;
},
-
+
eachItem: function(fn, scope) {
if(this.items && this.items.each){
this.items.each(fn, scope || this);
}
},
-
+
onResize: function(adjWidth, adjHeight, rawWidth, rawHeight) {
var innerCt = this.innerCt;
@@ -43431,7 +41987,7 @@ Ext.form.CompositeField = Ext.extend(Ext.form.Field, {
Ext.form.CompositeField.superclass.onResize.apply(this, arguments);
},
-
+
doLayout: function(shallow, force) {
if (this.rendered) {
var innerCt = this.innerCt;
@@ -43441,14 +41997,14 @@ Ext.form.CompositeField = Ext.extend(Ext.form.Field, {
}
},
-
+
beforeDestroy: function(){
Ext.destroy(this.innerCt);
Ext.form.CompositeField.superclass.beforeDestroy.call(this);
},
-
+
setReadOnly : function(readOnly) {
if (readOnly == undefined) {
readOnly = true;
@@ -43468,14 +42024,14 @@ Ext.form.CompositeField = Ext.extend(Ext.form.Field, {
this.doLayout();
},
-
+
onDisable : function(){
this.eachItem(function(item){
item.disable();
});
},
-
+
onEnable : function(){
this.eachItem(function(item){
item.enable();
@@ -43487,19 +42043,19 @@ Ext.reg('compositefield', Ext.form.CompositeField);
Ext.form.Radio = Ext.extend(Ext.form.Checkbox, {
inputType: 'radio',
-
+
markInvalid : Ext.emptyFn,
-
+
clearInvalid : Ext.emptyFn,
-
+
getGroupValue : function(){
var p = this.el.up('form') || Ext.getBody();
var c = p.child('input[name="'+this.el.dom.name+'"]:checked', true);
return c ? c.value : null;
},
-
+
setValue : function(v){
var checkEl,
els,
@@ -43525,7 +42081,7 @@ Ext.form.Radio = Ext.extend(Ext.form.Checkbox, {
return this;
},
-
+
getCheckEl: function(){
if(this.inGroup){
return this.el.up('.x-form-radio-group');
@@ -43536,21 +42092,21 @@ Ext.form.Radio = Ext.extend(Ext.form.Checkbox, {
Ext.reg('radio', Ext.form.Radio);
Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
-
-
+
+
allowBlank : true,
-
+
blankText : 'You must select one item in this group',
-
-
+
+
defaultType : 'radio',
-
-
+
+
groupCls : 'x-form-radio-group',
-
-
-
-
+
+
+
+
getValue : function(){
var out = null;
this.eachItem(function(item){
@@ -43561,8 +42117,8 @@ Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
});
return out;
},
-
-
+
+
onSetValue : function(id, value){
if(arguments.length > 1){
var f = this.getBox(id);
@@ -43580,23 +42136,23 @@ Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
this.setValueForItem(id);
}
},
-
+
setValueForItem : function(val){
val = String(val).split(',')[0];
this.eachItem(function(item){
item.setValue(val == item.inputValue);
});
},
-
-
+
+
fireChecked : function(){
if(!this.checkTask){
this.checkTask = new Ext.util.DelayedTask(this.bufferChecked, this);
}
this.checkTask.delay(10);
},
-
-
+
+
bufferChecked : function(){
var out = null;
this.eachItem(function(item){
@@ -43607,7 +42163,7 @@ Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
});
this.fireEvent('change', this, out);
},
-
+
onDestroy : function(){
if(this.checkTask){
this.checkTask.cancel();
@@ -43621,22 +42177,22 @@ Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, {
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,
@@ -43653,16 +42209,16 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
if(Ext.isString(this.paramOrder)){
this.paramOrder = this.paramOrder.split(/[\s,|]/);
}
-
+
this.items = new Ext.util.MixedCollection(false, function(o){
return o.getItemId();
});
this.addEvents(
-
+
'beforeaction',
-
+
'actionfailed',
-
+
'actioncomplete'
);
@@ -43672,36 +42228,36 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
Ext.form.BasicForm.superclass.constructor.call(this);
},
-
-
-
-
-
-
-
+
+
+
+
+
+
+
timeout: 30,
-
-
+
+
paramOrder: undefined,
-
+
paramsAsHash: false,
-
+
waitTitle: 'Please Wait...',
-
+
activeAction : null,
-
+
trackResetOnLoad : false,
-
-
-
+
+
+
initEl : function(el){
this.el = Ext.get(el);
this.id = this.el.id || Ext.id();
@@ -43711,17 +42267,17 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
this.el.addClass('x-form');
},
-
+
getEl: function(){
return this.el;
},
-
+
onSubmit : function(e){
e.stopEvent();
},
-
+
destroy: function(bound){
if(bound !== true){
this.items.each(function(f){
@@ -43733,7 +42289,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
this.purgeListeners();
},
-
+
isValid : function(){
var valid = true;
this.items.each(function(f){
@@ -43744,7 +42300,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return valid;
},
-
+
isDirty : function(){
var dirty = false;
this.items.each(function(f){
@@ -43756,7 +42312,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return dirty;
},
-
+
doAction : function(action, options){
if(Ext.isString(action)){
action = new Ext.form.Action.ACTION_TYPES[action](this, options);
@@ -43768,7 +42324,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
submit : function(options){
options = options || {};
if(this.standardSubmit){
@@ -43787,14 +42343,14 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
load : function(options){
var loadAction = String.format('{0}load', this.api ? 'direct' : '');
this.doAction(loadAction, options);
return this;
},
-
+
updateRecord : function(record){
record.beginEdit();
var fs = record.fields,
@@ -43819,15 +42375,15 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
loadRecord : function(record){
this.setValues(record.data);
return this;
},
-
+
beforeAction : function(action){
-
+
this.items.each(function(f){
if(f.isFormField && f.syncValue){
f.syncValue();
@@ -43846,7 +42402,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
}
},
-
+
afterAction : function(action, success){
this.activeAction = null;
var o = action.options;
@@ -43872,12 +42428,12 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
}
},
-
+
findField : function(id) {
var field = this.items.get(id);
if (!Ext.isObject(field)) {
-
+
var findMatchingField = function(f) {
if (f.isFormField) {
if (f.dataIndex == id || f.id == id || f.getName() == id) {
@@ -43897,7 +42453,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
},
-
+
markInvalid : function(errors){
if (Ext.isArray(errors)) {
for(var i = 0, len = errors.length; i < len; i++){
@@ -43919,9 +42475,9 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
setValues : function(values){
- if(Ext.isArray(values)){
+ if(Ext.isArray(values)){
for(var i = 0, len = values.length; i < len; i++){
var v = values[i];
var f = this.findField(v.id);
@@ -43932,7 +42488,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
}
}
}
- }else{
+ }else{
var field, id;
for(id in values){
if(!Ext.isFunction(values[id]) && (field = this.findField(id))){
@@ -43946,7 +42502,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
getValues : function(asString){
var fs = Ext.lib.Ajax.serializeForm(this.el.dom);
if(asString === true){
@@ -43955,7 +42511,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return Ext.urlDecode(fs);
},
-
+
getFieldValues : function(dirtyOnly){
var o = {},
n,
@@ -43981,7 +42537,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return o;
},
-
+
clearInvalid : function(){
this.items.each(function(f){
f.clearInvalid();
@@ -43989,7 +42545,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
reset : function(){
this.items.each(function(f){
f.reset();
@@ -43997,34 +42553,34 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
add : function(){
this.items.addAll(Array.prototype.slice.call(arguments, 0));
return this;
},
-
+
remove : function(field){
this.items.remove(field);
return this;
},
-
+
cleanDestroyed : function() {
this.items.filterBy(function(o) { return !!o.isDestroyed; }).each(this.remove, this);
},
-
+
render : function(){
this.items.each(function(f){
- if(f.isFormField && !f.rendered && document.getElementById(f.id)){
+ if(f.isFormField && !f.rendered && document.getElementById(f.id)){
f.applyToMarkup(f.id);
}
});
return this;
},
-
+
applyToFields : function(o){
this.items.each(function(f){
Ext.apply(f, o);
@@ -44032,7 +42588,7 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
return this;
},
-
+
applyIfToFields : function(o){
this.items.each(function(f){
Ext.applyIf(f, o);
@@ -44055,31 +42611,31 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
Ext.BasicForm = Ext.form.BasicForm;
Ext.FormPanel = Ext.extend(Ext.Panel, {
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
minButtonWidth : 75,
-
+
labelAlign : 'left',
-
+
monitorValid : false,
-
+
monitorPoll : 200,
-
+
layout : 'form',
-
+
initComponent : function(){
this.form = this.createForm();
Ext.FormPanel.superclass.initComponent.call(this);
@@ -44096,20 +42652,20 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
this.initItems();
this.addEvents(
-
+
'clientvalidation'
);
this.relayEvents(this.form, ['beforeaction', 'actionfailed', 'actioncomplete']);
},
-
+
createForm : function(){
var config = Ext.applyIf({listeners: {}}, this.initialConfig);
return new Ext.form.BasicForm(null, config);
},
-
+
initFields : function(){
var f = this.form;
var formPanel = this;
@@ -44118,7 +42674,7 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
f.add(c);
}else if(c.findBy && c != formPanel){
formPanel.applySettings(c);
-
+
if(c.items && c.items.each){
c.items.each(fn, this);
}
@@ -44127,7 +42683,7 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
this.items.each(fn, this);
},
-
+
applySettings: function(c){
var ct = c.ownerCt;
Ext.applyIf(c, {
@@ -44137,75 +42693,75 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
});
},
-
+
getLayoutTarget : function(){
return this.form.el;
},
-
+
getForm : function(){
return this.form;
},
-
+
onRender : function(ct, position){
this.initFields();
Ext.FormPanel.superclass.onRender.call(this, ct, position);
this.form.initEl(this.body);
},
-
+
beforeDestroy : function(){
this.stopMonitoring();
this.form.destroy(true);
Ext.FormPanel.superclass.beforeDestroy.call(this);
},
-
+
isField : function(c) {
return !!c.setValue && !!c.getValue && !!c.markInvalid && !!c.clearInvalid;
},
-
+
initEvents : function(){
Ext.FormPanel.superclass.initEvents.call(this);
-
+
this.on({
scope: this,
add: this.onAddEvent,
remove: this.onRemoveEvent
});
- if(this.monitorValid){
+ if(this.monitorValid){
this.startMonitoring();
}
},
-
+
onAdd: function(c){
Ext.FormPanel.superclass.onAdd.call(this, c);
this.processAdd(c);
},
-
+
onAddEvent: function(ct, c){
if(ct !== this){
this.processAdd(c);
}
},
-
+
processAdd : function(c){
-
+
if(this.isField(c)){
this.form.add(c);
-
+
}else if(c.findBy){
this.applySettings(c);
this.form.add.apply(this.form, c.findBy(this.isField));
}
},
-
+
onRemove: function(c){
Ext.FormPanel.superclass.onRemove.call(this, c);
this.processRemove(c);
@@ -44217,22 +42773,22 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
}
},
-
+
processRemove: function(c){
if(!this.destroying){
-
+
if(this.isField(c)){
this.form.remove(c);
-
+
}else if (c.findBy){
Ext.each(c.findBy(this.isField), this.form.remove, this.form);
-
+
this.form.cleanDestroyed();
}
}
},
-
+
startMonitoring : function(){
if(!this.validTask){
this.validTask = new Ext.util.TaskRunner();
@@ -44244,7 +42800,7 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
}
},
-
+
stopMonitoring : function(){
if(this.validTask){
this.validTask.stopAll();
@@ -44252,12 +42808,12 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
}
},
-
+
load : function(){
this.form.load.apply(this.form, arguments);
},
-
+
onDisable : function(){
Ext.FormPanel.superclass.onDisable.call(this);
if(this.form){
@@ -44267,7 +42823,7 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
}
},
-
+
onEnable : function(){
Ext.FormPanel.superclass.onEnable.call(this);
if(this.form){
@@ -44277,7 +42833,7 @@ Ext.FormPanel = Ext.extend(Ext.Panel, {
}
},
-
+
bindHandler : function(){
var valid = true;
this.form.items.each(function(f){
@@ -44303,19 +42859,19 @@ Ext.reg('form', Ext.FormPanel);
Ext.form.FormPanel = Ext.FormPanel;
Ext.form.FieldSet = Ext.extend(Ext.Panel, {
-
-
-
-
-
-
+
+
+
+
+
+
baseCls : 'x-fieldset',
-
+
layout : 'form',
-
+
animCollapse : false,
-
+
onRender : function(ct, position){
if(!this.el){
this.el = document.createElement('fieldset');
@@ -44337,7 +42893,7 @@ Ext.form.FieldSet = Ext.extend(Ext.Panel, {
}
},
-
+
onCollapse : function(doAnim, animArg){
if(this.checkbox){
this.checkbox.dom.checked = false;
@@ -44346,7 +42902,7 @@ Ext.form.FieldSet = Ext.extend(Ext.Panel, {
},
-
+
onExpand : function(doAnim, animArg){
if(this.checkbox){
this.checkbox.dom.checked = true;
@@ -44354,70 +42910,70 @@ Ext.form.FieldSet = Ext.extend(Ext.Panel, {
Ext.form.FieldSet.superclass.onExpand.call(this, doAnim, animArg);
},
-
+
onCheckClick : function(){
this[this.checkbox.dom.checked ? 'expand' : 'collapse']();
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
});
Ext.reg('fieldset', Ext.form.FieldSet);
Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
-
+
enableFormat : true,
-
+
enableFontSize : true,
-
+
enableColors : true,
-
+
enableAlignments : true,
-
+
enableLists : true,
-
+
enableSourceEdit : true,
-
+
enableLinks : true,
-
+
enableFont : true,
-
+
createLinkText : 'Please enter the URL for the link:',
-
+
defaultLinkValue : 'http:/'+'/',
-
+
fontFamilies : [
'Arial',
'Courier New',
@@ -44426,10 +42982,10 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
'Verdana'
],
defaultFont: 'tahoma',
-
+
defaultValue: (Ext.isOpera || Ext.isIE6) ? ' ' : '',
-
+
actionMode: 'wrap',
validationEvent : false,
deferHeight: true,
@@ -44445,28 +43001,28 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
autocomplete: "off"
},
-
+
initComponent : function(){
this.addEvents(
-
+
'initialize',
-
+
'activate',
-
+
'beforesync',
-
+
'beforepush',
-
+
'sync',
-
+
'push',
-
+
'editmodechange'
);
Ext.form.HtmlEditor.superclass.initComponent.call(this);
},
-
+
createFontOptions : function(){
var buf = [], fs = this.fontFamilies, ff, lc;
for(var i = 0, len = fs.length; i< len; i++){
@@ -44482,7 +43038,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
return buf.join('');
},
-
+
createToolbar : function(editor){
var items = [];
var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
@@ -44624,7 +43180,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
}
-
+
var tb = new Ext.Toolbar({
renderTo: this.wrap.dom.firstChild,
items: items
@@ -44640,7 +43196,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}, this);
}
-
+
this.mon(tb.el, 'click', function(e){
e.preventDefault();
});
@@ -44676,35 +43232,35 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
getDocMarkup : function(){
var h = Ext.fly(this.iframe).getHeight() - this.iframePad * 2;
return String.format('', this.iframePad, h);
},
-
+
getEditorBody : function(){
var doc = this.getDoc();
return doc.body || doc.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(ct, position){
Ext.form.HtmlEditor.superclass.onRender.call(this, ct, position);
this.el.dom.style.border = '0 none';
this.el.dom.setAttribute('tabIndex', -1);
this.el.addClass('x-hidden');
- if(Ext.isIE){
+ if(Ext.isIE){
this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;');
}
this.wrap = this.el.wrap({
@@ -44752,7 +43308,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
doc.write(this.getDocMarkup());
doc.close();
- this.readyTask = {
+ this.readyTask = {
run : function(){
var doc = this.getDoc();
if(doc.body || doc.readyState == 'complete'){
@@ -44781,7 +43337,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
setDesignMode : function(mode){
var doc = this.getDoc();
if (doc) {
@@ -44793,7 +43349,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
},
-
+
getDesignMode : function(){
var doc = this.getDoc();
if(!doc){ return ''; }
@@ -44812,7 +43368,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
});
},
-
+
onResize : function(w, h){
Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments);
if(this.el && this.iframe){
@@ -44834,7 +43390,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
toggleSourceEdit : function(sourceEditMode){
var iframeHeight,
elHeight;
@@ -44852,7 +43408,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
}
if (this.sourceEditMode) {
-
+
this.previousSize = this.getSize();
iframeHeight = Ext.get(this.iframe).getHeight();
@@ -44883,7 +43439,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
this.fireEvent('editmodechange', this, this.sourceEditMode);
},
-
+
createLink : function() {
var url = prompt(this.createLinkText, this.defaultLinkValue);
if(url && url != 'http:/'+'/'){
@@ -44891,45 +43447,45 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
initEvents : function(){
this.originalValue = this.getValue();
},
-
+
markInvalid : Ext.emptyFn,
-
+
clearInvalid : Ext.emptyFn,
-
+
setValue : function(v){
Ext.form.HtmlEditor.superclass.setValue.call(this, v);
this.pushValue();
return this;
},
-
+
cleanHtml: function(html) {
html = String(html);
- if(Ext.isWebKit){
+ if(Ext.isWebKit){
html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
}
-
+
if(html.charCodeAt(0) == this.defaultValue.replace(/\D/g, '')){
html = html.substring(1);
}
return html;
},
-
+
syncValue : function(){
if(this.initialized){
var bd = this.getEditorBody();
var html = bd.innerHTML;
if(Ext.isWebKit){
- var bs = bd.getAttribute('style');
+ var bs = bd.getAttribute('style');
var m = bs.match(/text-align:(.*?);/i);
if(m && m[1]){
html = '' + html + '
';
@@ -44943,13 +43499,13 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
getValue : function() {
this[this.sourceEditMode ? 'pushValue' : 'syncValue']();
return Ext.form.HtmlEditor.superclass.getValue.call(this);
},
-
+
pushValue : function(){
if(this.initialized){
var v = this.el.dom.value;
@@ -44959,8 +43515,8 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
if(this.fireEvent('beforepush', this, v) !== false){
this.getEditorBody().innerHTML = v;
if(Ext.isGecko){
-
- this.setDesignMode(false);
+
+ this.setDesignMode(false);
this.setDesignMode(true);
}
this.fireEvent('push', this, v);
@@ -44969,12 +43525,12 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
deferFocus : function(){
this.focus.defer(10, this);
},
-
+
focus : function(){
if(this.win && !this.sourceEditMode){
this.win.focus();
@@ -44983,17 +43539,17 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
initEditor : function(){
-
+
try{
var dbody = this.getEditorBody(),
ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat', 'background-color', 'color'),
doc,
fn;
- ss['background-attachment'] = 'fixed';
- dbody.bgProperties = 'fixed';
+ ss['background-attachment'] = 'fixed';
+ dbody.bgProperties = 'fixed';
Ext.DomHelper.applyStyles(dbody, ss);
@@ -45005,7 +43561,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}catch(e){}
}
-
+
fn = this.onEditorEvent.createDelegate(this);
Ext.EventManager.on(doc, {
mousedown: fn,
@@ -45029,7 +43585,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}catch(e){}
},
-
+
beforeDestroy : function(){
if(this.monitorTask){
Ext.TaskMgr.stop(this.monitorTask);
@@ -45057,11 +43613,11 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
Ext.form.HtmlEditor.superclass.beforeDestroy.call(this);
},
-
+
onFirstFocus : function(){
this.activated = true;
this.disableItems(this.readOnly);
- if(Ext.isGecko){
+ if(Ext.isGecko){
this.win.focus();
var s = this.win.getSelection();
if(!s.focusNode || s.focusNode.nodeType != 3){
@@ -45078,14 +43634,14 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
this.fireEvent('activate', this);
},
-
+
adjustFont: function(btn){
var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1,
doc = this.getDoc(),
v = parseInt(doc.queryCommandValue('FontSize') || 2, 10);
if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
-
-
+
+
if(v <= 10){
v = 1 + adjust;
}else if(v <= 13){
@@ -45101,7 +43657,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
v = v.constrain(1, 6);
}else{
- if(Ext.isSafari){
+ if(Ext.isSafari){
adjust *= 2;
}
v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
@@ -45109,13 +43665,13 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
this.execCmd('FontSize', v);
},
-
+
onEditorEvent : function(e){
this.updateToolbar();
},
-
+
updateToolbar: function(){
if(this.readOnly){
@@ -45156,12 +43712,12 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
this.syncValue();
},
-
+
relayBtnCmd : function(btn){
this.relayCmd(btn.getItemId());
},
-
+
relayCmd : function(cmd, value){
(function(){
this.focus();
@@ -45170,14 +43726,14 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}).defer(10, this);
},
-
+
execCmd : function(cmd, value){
var doc = this.getDoc();
doc.execCommand(cmd, false, value === undefined ? null : value);
this.syncValue();
},
-
+
applyCommand : function(e){
if(e.ctrlKey){
var c = e.getCharCode(), cmd;
@@ -45204,7 +43760,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
+
insertAtCursor : function(text){
if(!this.activated){
return;
@@ -45225,8 +43781,8 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
},
-
- fixKeys : function(){
+
+ fixKeys : function(){
if(Ext.isIE){
return function(e){
var k = e.getKey(),
@@ -45279,12 +43835,12 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
}(),
-
+
getToolbar : function(){
return this.tb;
},
-
+
buttonTips : {
bold : {
title: 'Bold (Ctrl+B)',
@@ -45358,76 +43914,76 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, {
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
});
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);
@@ -45441,19 +43997,19 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
Ext.form.TimeField.superclass.initComponent.call(this);
},
-
+
setMinValue: function(value, initial){
this.setLimit(value, true, initial);
return this;
},
-
+
setMaxValue: function(value, initial){
this.setLimit(value, false, initial);
return this;
},
-
+
generateStore: function(initial){
var min = this.minValue || new Date(this.initDate).clearTime(),
max = this.maxValue || new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1),
@@ -45466,7 +44022,7 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
this.bindStore(times, initial);
},
-
+
setLimit: function(value, isMin, initial){
var d;
if(Ext.isString(value)){
@@ -45484,18 +44040,18 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
}
},
-
+
getValue : function(){
var v = Ext.form.TimeField.superclass.getValue.call(this);
return this.formatDate(this.parseDate(v)) || '';
},
-
+
setValue : function(value){
return Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value)));
},
-
+
validateValue : Ext.form.DateField.prototype.validateValue,
formatDate : Ext.form.DateField.prototype.formatDate,
@@ -45507,7 +44063,7 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
var id = this.initDate + ' ',
idf = this.initDateFormat + ' ',
- v = Date.parseDate(id + value, idf + this.format),
+ v = Date.parseDate(id + value, idf + this.format),
af = this.altFormats;
if (!v && af) {
@@ -45524,120 +44080,120 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, {
});
Ext.reg('timefield', Ext.form.TimeField);
Ext.form.SliderField = Ext.extend(Ext.form.Field, {
-
-
+
+
useTips : true,
-
-
+
+
tipText : null,
-
-
+
+
actionMode: 'wrap',
-
-
+
+
initComponent : function() {
var cfg = Ext.copyTo({
id: this.id + '-slider'
}, this.initialConfig, ['vertical', 'minValue', 'maxValue', 'decimalPrecision', 'keyIncrement', 'increment', 'clickToChange', 'animate']);
-
-
+
+
if (this.useTips) {
var plug = this.tipText ? {getText: this.tipText} : {};
cfg.plugins = [new Ext.slider.Tip(plug)];
}
this.slider = new Ext.Slider(cfg);
Ext.form.SliderField.superclass.initComponent.call(this);
- },
-
-
+ },
+
+
onRender : function(ct, position){
this.autoCreate = {
id: this.id,
name: this.name,
type: 'hidden',
- tag: 'input'
+ tag: 'input'
};
Ext.form.SliderField.superclass.onRender.call(this, ct, position);
this.wrap = this.el.wrap({cls: 'x-form-field-wrap'});
this.resizeEl = this.positionEl = this.wrap;
this.slider.render(this.wrap);
},
-
-
+
+
onResize : function(w, h, aw, ah){
Ext.form.SliderField.superclass.onResize.call(this, w, h, aw, ah);
- this.slider.setSize(w, h);
+ this.slider.setSize(w, h);
},
-
-
+
+
initEvents : function(){
Ext.form.SliderField.superclass.initEvents.call(this);
- this.slider.on('change', this.onChange, this);
+ this.slider.on('change', this.onChange, this);
},
-
-
+
+
onChange : function(slider, v){
this.setValue(v, undefined, true);
},
-
-
+
+
onEnable : function(){
Ext.form.SliderField.superclass.onEnable.call(this);
this.slider.enable();
},
-
-
+
+
onDisable : function(){
Ext.form.SliderField.superclass.onDisable.call(this);
- this.slider.disable();
+ this.slider.disable();
},
-
-
+
+
beforeDestroy : function(){
Ext.destroy(this.slider);
Ext.form.SliderField.superclass.beforeDestroy.call(this);
},
-
-
+
+
alignErrorIcon : function(){
this.errorIcon.alignTo(this.slider.el, 'tl-tr', [2, 0]);
},
-
-
+
+
setMinValue : function(v){
this.slider.setMinValue(v);
- return this;
+ return this;
},
-
-
+
+
setMaxValue : function(v){
this.slider.setMaxValue(v);
- return this;
+ return this;
},
-
-
+
+
setValue : function(v, animate, silent){
-
-
+
+
if(!silent){
this.slider.setValue(v, animate);
}
return Ext.form.SliderField.superclass.setValue.call(this, this.slider.getValue());
},
-
-
+
+
getValue : function(){
- return this.slider.getValue();
+ return this.slider.getValue();
}
});
Ext.reg('sliderfield', Ext.form.SliderField);
Ext.form.Label = Ext.extend(Ext.BoxComponent, {
-
-
-
-
+
+
+
+
onRender : function(ct, position){
if(!this.el){
this.el = document.createElement('label');
@@ -45650,7 +44206,7 @@ Ext.form.Label = Ext.extend(Ext.BoxComponent, {
Ext.form.Label.superclass.onRender.call(this, ct, position);
},
-
+
setText : function(t, encode){
var e = encode === false;
this[!e ? 'text' : 'html'] = t;
@@ -45694,34 +44250,34 @@ Ext.form.Action.prototype = {
type : 'default',
-
-
-
+
+
+
run : function(options){
},
-
+
success : function(response){
},
-
+
handleResponse : function(response){
},
-
+
failure : function(response){
this.response = response;
this.failureType = Ext.form.Action.CONNECT_FAILURE;
this.form.afterAction(this, false);
},
-
-
-
+
+
+
processResponse : function(response){
this.response = response;
if(!response.responseText && !response.responseXML){
@@ -45730,16 +44286,16 @@ Ext.form.Action.prototype = {
this.result = this.handleResponse(response);
return this.result;
},
-
+
decodeResponse: function(response) {
try {
return Ext.decode(response.responseText);
} catch(e) {
return false;
- }
+ }
},
-
+
getUrl : function(appendParams){
var url = this.options.url || this.form.url || this.form.el.dom.action;
if(appendParams){
@@ -45751,12 +44307,12 @@ Ext.form.Action.prototype = {
return url;
},
-
+
getMethod : function(){
return (this.options.method || this.form.method || this.form.el.dom.method || 'POST').toUpperCase();
},
-
+
getParams : function(){
var bp = this.form.baseParams;
var p = this.options.params;
@@ -45772,7 +44328,7 @@ Ext.form.Action.prototype = {
return p;
},
-
+
createCallback : function(opts){
var opts = opts || {};
return {
@@ -45791,11 +44347,11 @@ Ext.form.Action.Submit = function(form, options){
};
Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
-
-
+
+
type : 'submit',
-
+
run : function(){
var o = this.options,
method = this.getMethod(),
@@ -45813,7 +44369,7 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
f.items.each(setupEmptyFields);
}
};
-
+
fields.each(setupEmptyFields);
}
Ext.Ajax.request(Ext.apply(this.createCallback(o), {
@@ -45831,13 +44387,13 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
}
});
}
- }else if (o.clientValidation !== false){
+ }else if (o.clientValidation !== false){
this.failureType = Ext.form.Action.CLIENT_INVALID;
this.form.afterAction(this, false);
}
},
-
+
success : function(response){
var result = this.processResponse(response);
if(result === true || result.success){
@@ -45851,7 +44407,7 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
this.form.afterAction(this, false);
},
-
+
handleResponse : function(response){
if(this.form.errorReader){
var rs = this.form.errorReader.read(response);
@@ -45882,10 +44438,10 @@ Ext.form.Action.Load = function(form, options){
};
Ext.extend(Ext.form.Action.Load, Ext.form.Action, {
-
+
type : 'load',
-
+
run : function(){
Ext.Ajax.request(Ext.apply(
this.createCallback(this.options), {
@@ -45896,7 +44452,7 @@ Ext.extend(Ext.form.Action.Load, Ext.form.Action, {
}));
},
-
+
success : function(response){
var result = this.processResponse(response);
if(result === true || !result.success || !result.data){
@@ -45909,7 +44465,7 @@ Ext.extend(Ext.form.Action.Load, Ext.form.Action, {
this.form.afterAction(this, true);
},
-
+
handleResponse : function(response){
if(this.form.reader){
var rs = this.form.reader.read(response);
@@ -45953,9 +44509,9 @@ Ext.form.Action.DirectLoad = Ext.extend(Ext.form.Action.Load, {
}
return buf;
},
-
-
-
+
+
+
processResponse : function(result) {
this.result = result;
return result;
@@ -45975,15 +44531,15 @@ Ext.form.Action.DirectSubmit = Ext.extend(Ext.form.Action.Submit, {
Ext.form.Action.DirectSubmit.superclass.constructor.call(this, form, opts);
},
type : 'directsubmit',
-
+
run : function(){
var o = this.options;
if(o.clientValidation === false || this.form.isValid()){
-
-
+
+
this.success.params = this.getParams();
this.form.api.submit(this.form.el.dom, this.success, this);
- }else if (o.clientValidation !== false){
+ }else if (o.clientValidation !== false){
this.failureType = Ext.form.Action.CLIENT_INVALID;
this.form.afterAction(this, false);
}
@@ -45996,9 +44552,9 @@ Ext.form.Action.DirectSubmit = Ext.extend(Ext.form.Action.Submit, {
Ext.apply(o, p, bp);
return o;
},
-
-
-
+
+
+
processResponse : function(result) {
this.result = result;
return result;
@@ -46020,21 +44576,21 @@ Ext.form.Action.ACTION_TYPES = {
};
Ext.form.VTypes = function(){
-
+
var alpha = /^[a-zA-Z_]+$/,
alphanum = /^[a-zA-Z0-9_]+$/,
email = /^(\w+)([\-+.\'][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,}$/,
url = /(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@`~=%!]*)(\.\w{2,})?)*\/?)/i;
-
+
return {
-
+
'email' : function(v){
return email.test(v);
},
-
+
'emailText' : 'This field should be an e-mail address in the format "user@example.com"',
-
+
'emailMask' : /[a-z0-9_\.\-\+\'@]/i,
/**
@@ -46188,85 +44744,85 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
* See {@link #autoExpandMax} and {@link #autoExpandMin} also.
*/
autoExpandColumn : false,
-
-
+
+
autoExpandMax : 1000,
-
-
+
+
autoExpandMin : 50,
-
-
+
+
columnLines : false,
-
-
-
-
-
-
+
+
+
+
+
+
ddText : '{0} selected row{1}',
-
-
+
+
deferRowRender : true,
-
-
-
-
+
+
+
+
enableColumnHide : true,
-
-
+
+
enableColumnMove : true,
-
-
+
+
enableDragDrop : false,
-
-
+
+
enableHdMenu : true,
-
-
-
+
+
+
loadMask : false,
-
-
-
+
+
+
minColumnWidth : 25,
-
-
-
-
-
+
+
+
+
+
stripeRows : false,
-
-
+
+
trackMouseOver : true,
-
-
+
+
stateEvents : ['columnmove', 'columnresize', 'sortchange', 'groupchange'],
-
-
+
+
view : null,
-
+
bubbleEvents: [],
-
-
+
+
rendered : false,
-
-
+
+
viewReady : false,
-
+
initComponent : function() {
Ext.grid.GridPanel.superclass.initComponent.call(this);
if (this.columnLines) {
this.cls = (this.cls || '') + ' x-grid-with-col-lines';
}
-
-
+
+
this.autoScroll = false;
this.autoWidth = false;
@@ -46275,7 +44831,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
delete this.columns;
}
-
+
if(this.ds){
this.store = this.ds;
delete this.ds;
@@ -46291,99 +44847,99 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
this.store = Ext.StoreMgr.lookup(this.store);
this.addEvents(
-
-
+
+
'click',
-
+
'dblclick',
-
+
'contextmenu',
-
+
'mousedown',
-
+
'mouseup',
-
+
'mouseover',
-
+
'mouseout',
-
+
'keypress',
-
+
'keydown',
-
-
+
+
'cellmousedown',
-
+
'rowmousedown',
-
+
'headermousedown',
-
+
'groupmousedown',
-
+
'rowbodymousedown',
-
+
'containermousedown',
-
+
'cellclick',
-
+
'celldblclick',
-
+
'rowclick',
-
+
'rowdblclick',
-
+
'headerclick',
-
+
'headerdblclick',
-
+
'groupclick',
-
+
'groupdblclick',
-
+
'containerclick',
-
+
'containerdblclick',
-
+
'rowbodyclick',
-
+
'rowbodydblclick',
-
+
'rowcontextmenu',
-
+
'cellcontextmenu',
-
+
'headercontextmenu',
-
+
'groupcontextmenu',
-
+
'containercontextmenu',
-
+
'rowbodycontextmenu',
-
+
'bodyscroll',
-
+
'columnresize',
-
+
'columnmove',
-
+
'sortchange',
-
+
'groupchange',
-
+
'reconfigure',
-
+
'viewready'
);
},
-
+
onRender : function(ct, position){
Ext.grid.GridPanel.superclass.onRender.apply(this, arguments);
@@ -46407,7 +44963,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
this.getSelectionModel().init(this);
},
-
+
initEvents : function(){
Ext.grid.GridPanel.superclass.initEvents.call(this);
@@ -46499,7 +45055,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
return o;
},
-
+
afterRender : function(){
Ext.grid.GridPanel.superclass.afterRender.call(this);
var v = this.view;
@@ -46516,7 +45072,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
this.viewReady = true;
},
-
+
reconfigure : function(store, colModel){
var rendered = this.rendered;
if(rendered){
@@ -46537,7 +45093,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
this.fireEvent('reconfigure', this, store, colModel);
},
-
+
onDestroy : function(){
if (this.deferRowRenderTask && this.deferRowRenderTask.cancel){
this.deferRowRenderTask.cancel();
@@ -46552,32 +45108,32 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
Ext.grid.GridPanel.superclass.onDestroy.call(this);
},
-
+
processEvent : function(name, e){
this.view.processEvent(name, e);
},
-
+
onClick : function(e){
this.processEvent('click', e);
},
-
+
onMouseDown : function(e){
this.processEvent('mousedown', e);
},
-
+
onContextMenu : function(e, t){
this.processEvent('contextmenu', e);
},
-
+
onDblClick : function(e){
this.processEvent('dblclick', e);
},
-
+
walkCells : function(row, col, step, fn, scope){
var cm = this.colModel,
clen = cm.getColumnCount(),
@@ -46625,15 +45181,15 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
return null;
},
-
+
getGridEl : function(){
return this.body;
},
-
+
stopEditing : Ext.emptyFn,
-
+
getSelectionModel : function(){
if(!this.selModel){
this.selModel = new Ext.grid.RowSelectionModel(
@@ -46642,115 +45198,115 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
return this.selModel;
},
-
+
getStore : function(){
return this.store;
},
-
+
getColumnModel : function(){
return this.colModel;
},
-
+
getView : function() {
if (!this.view) {
this.view = new Ext.grid.GridView(this.viewConfig);
}
-
+
return this.view;
},
-
+
getDragDropText : function(){
var count = this.selModel.getCount ? this.selModel.getCount() : 1;
return String.format(this.ddText, count, count == 1 ? '' : 's');
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
});
Ext.reg('grid', Ext.grid.GridPanel);
Ext.grid.PivotGrid = Ext.extend(Ext.grid.GridPanel, {
-
-
+
+
aggregator: 'sum',
-
-
+
+
renderer: undefined,
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
initComponent: function() {
Ext.grid.PivotGrid.superclass.initComponent.apply(this, arguments);
-
+
this.initAxes();
-
-
+
+
this.enableColumnResize = false;
-
+
this.viewConfig = Ext.apply(this.viewConfig || {}, {
forceFit: true
});
-
-
-
+
+
+
this.colModel = new Ext.grid.ColumnModel({});
},
-
-
+
+
getAggregator: function() {
if (typeof this.aggregator == 'string') {
return Ext.grid.PivotAggregatorMgr.types[this.aggregator];
@@ -46758,41 +45314,41 @@ Ext.grid.PivotGrid = Ext.extend(Ext.grid.GridPanel, {
return this.aggregator;
}
},
-
-
+
+
setAggregator: function(aggregator) {
this.aggregator = aggregator;
},
-
-
+
+
setMeasure: function(measure) {
this.measure = measure;
},
-
-
+
+
setLeftAxis: function(axis, refresh) {
-
+
this.leftAxis = axis;
-
+
if (refresh) {
this.view.refresh();
}
},
-
-
+
+
setTopAxis: function(axis, refresh) {
-
+
this.topAxis = axis;
-
+
if (refresh) {
this.view.refresh();
}
},
-
-
+
+
initAxes: function() {
var PivotAxis = Ext.grid.PivotAxis;
-
+
if (!(this.leftAxis instanceof PivotAxis)) {
this.setLeftAxis(new PivotAxis({
orientation: 'vertical',
@@ -46800,7 +45356,7 @@ Ext.grid.PivotGrid = Ext.extend(Ext.grid.GridPanel, {
store : this.store
}));
};
-
+
if (!(this.topAxis instanceof PivotAxis)) {
this.setTopAxis(new PivotAxis({
orientation: 'horizontal',
@@ -46809,34 +45365,34 @@ Ext.grid.PivotGrid = Ext.extend(Ext.grid.GridPanel, {
}));
};
},
-
-
+
+
extractData: function() {
var records = this.store.data.items,
recCount = records.length,
cells = [],
record, i, j, k;
-
+
if (recCount == 0) {
return [];
}
-
+
var leftTuples = this.leftAxis.getTuples(),
leftCount = leftTuples.length,
topTuples = this.topAxis.getTuples(),
topCount = topTuples.length,
aggregator = this.getAggregator();
-
+
for (i = 0; i < recCount; i++) {
record = records[i];
-
+
for (j = 0; j < leftCount; j++) {
cells[j] = cells[j] || [];
-
+
if (leftTuples[j].matcher(record) === true) {
for (k = 0; k < topCount; k++) {
cells[j][k] = cells[j][k] || [];
-
+
if (topTuples[k].matcher(record)) {
cells[j][k].push(record);
}
@@ -46844,28 +45400,28 @@ Ext.grid.PivotGrid = Ext.extend(Ext.grid.GridPanel, {
}
}
}
-
+
var rowCount = cells.length,
colCount, row;
-
+
for (i = 0; i < rowCount; i++) {
row = cells[i];
colCount = row.length;
-
+
for (j = 0; j < colCount; j++) {
cells[i][j] = aggregator(cells[i][j], this.measure);
}
}
-
+
return cells;
},
-
-
+
+
getView: function() {
if (!this.view) {
this.view = new Ext.grid.PivotGridView(this.viewConfig);
}
-
+
return this.view;
}
});
@@ -46879,11 +45435,11 @@ Ext.grid.PivotAggregatorMgr.registerType('sum', function(records, measure) {
var length = records.length,
total = 0,
i;
-
+
for (i = 0; i < length; i++) {
total += records[i].get(measure);
}
-
+
return total;
});
@@ -46891,11 +45447,11 @@ Ext.grid.PivotAggregatorMgr.registerType('avg', function(records, measure) {
var length = records.length,
total = 0,
i;
-
+
for (i = 0; i < length; i++) {
total += records[i].get(measure);
}
-
+
return (total / length) || 'n/a';
});
@@ -46903,11 +45459,11 @@ Ext.grid.PivotAggregatorMgr.registerType('min', function(records, measure) {
var data = [],
length = records.length,
i;
-
+
for (i = 0; i < length; i++) {
data.push(records[i].get(measure));
}
-
+
return Math.min.apply(this, data) || 'n/a';
});
@@ -46915,11 +45471,11 @@ Ext.grid.PivotAggregatorMgr.registerType('max', function(records, measure) {
var data = [],
length = records.length,
i;
-
+
for (i = 0; i < length; i++) {
data.push(records[i].get(measure));
}
-
+
return Math.max.apply(this, data) || 'n/a';
});
@@ -46927,117 +45483,117 @@ Ext.grid.PivotAggregatorMgr.registerType('count', function(records, measure) {
return records.length;
});
Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
-
-
-
-
-
-
+
+
+
+
+
+
deferEmptyText : true,
-
+
scrollOffset : undefined,
-
+
autoFill : false,
-
+
forceFit : false,
-
+
sortClasses : ['sort-asc', 'sort-desc'],
-
+
sortAscText : 'Sort Ascending',
-
+
sortDescText : 'Sort Descending',
-
-
+
+
hideSortIcons: false,
-
+
columnsText : 'Columns',
-
+
selectedRowClass : 'x-grid3-row-selected',
-
+
borderWidth : 2,
tdClass : 'x-grid3-cell',
hdCls : 'x-grid3-hd',
-
-
-
+
+
+
markDirty : true,
-
+
cellSelectorDepth : 4,
-
-
+
+
rowSelectorDepth : 10,
-
+
rowBodySelectorDepth : 10,
-
+
cellSelector : 'td.x-grid3-cell',
-
-
+
+
rowSelector : 'div.x-grid3-row',
-
+
rowBodySelector : 'div.x-grid3-row-body',
-
+
firstRowCls: 'x-grid3-row-first',
lastRowCls: 'x-grid3-row-last',
rowClsRe: /(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g,
-
-
+
+
headerMenuOpenCls: 'x-grid3-hd-menu-open',
-
-
+
+
rowOverCls: 'x-grid3-row-over',
constructor : function(config) {
Ext.apply(this, config);
-
-
+
+
this.addEvents(
-
+
'beforerowremoved',
-
-
+
+
'beforerowsinserted',
-
-
+
+
'beforerefresh',
-
-
+
+
'rowremoved',
-
-
+
+
'rowsinserted',
-
-
+
+
'rowupdated',
-
-
+
+
'refresh'
);
-
+
Ext.grid.GridView.superclass.constructor.call(this);
},
-
-
-
+
+
+
masterTpl: new Ext.Template(
'',
'
',
@@ -47056,8 +45612,8 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
'
',
'
'
),
-
-
+
+
headerTpl: new Ext.Template(
'
',
'',
@@ -47065,32 +45621,32 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
' ',
'
'
),
-
-
+
+
bodyTpl: new Ext.Template('{rows}'),
-
-
+
+
cellTpl: new Ext.Template(
'
',
'{value}
',
' '
),
-
-
+
+
initTemplates : function() {
var templates = this.templates || {},
template, name,
-
+
headerCellTpl = new Ext.Template(
'
',
- '',
+ '
',
this.grid.enableHdMenu ? '
' : '',
'{value}',
'
',
'
',
'
'
),
-
+
rowBodyText = [
'
',
'',
@@ -47098,7 +45654,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
' ',
' '
].join(""),
-
+
innerText = [
'
',
'',
@@ -47107,7 +45663,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
' ',
'
'
].join("");
-
+
Ext.applyIf(templates, {
hcell : headerCellTpl,
cell : this.cellTpl,
@@ -47120,7 +45676,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
for (name in templates) {
template = templates[name];
-
+
if (template && Ext.isFunction(template.compile) && !template.compiled) {
template.disableFormats = true;
template.compile();
@@ -47131,7 +45687,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
this.colRe = new RegExp('x-grid3-td-([^\\s]+)', '');
},
-
+
fly : function(el) {
if (!this._flyweight) {
this._flyweight = new Ext.Element.Flyweight(document.body);
@@ -47140,29 +45696,29 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return this._flyweight;
},
-
+
getEditorParent : function() {
return this.scroller.dom;
},
-
+
initElements : function() {
var Element = Ext.Element,
el = Ext.get(this.grid.getGridEl().dom.firstChild),
mainWrap = new Element(el.child('div.x-grid3-viewport')),
mainHd = new Element(mainWrap.child('div.x-grid3-header')),
scroller = new Element(mainWrap.child('div.x-grid3-scroller'));
-
+
if (this.grid.hideHeaders) {
mainHd.setDisplayed(false);
}
-
+
if (this.forceFit) {
scroller.setStyle('overflow-x', 'hidden');
}
-
-
-
+
+
+
Ext.apply(this, {
el : el,
mainWrap: mainWrap,
@@ -47171,22 +45727,22 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
innerHd : mainHd.child('div.x-grid3-header-inner').dom,
mainBody: new Element(Element.fly(scroller).child('div.x-grid3-body')),
focusEl : new Element(Element.fly(scroller).child('a')),
-
+
resizeMarker: new Element(el.child('div.x-grid3-resize-marker')),
resizeProxy : new Element(el.child('div.x-grid3-resize-proxy'))
});
-
+
this.focusEl.swallowEvent('click', true);
},
-
+
getRows : function() {
return this.hasRows() ? this.mainBody.dom.childNodes : [];
},
-
-
+
+
findCell : function(el) {
if (!el) {
return false;
@@ -47194,11 +45750,11 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return this.fly(el).findParent(this.cellSelector, this.cellSelectorDepth);
},
-
+
findCellIndex : function(el, requiredCls) {
var cell = this.findCell(el),
hasCls;
-
+
if (cell) {
hasCls = this.fly(cell).hasClass(requiredCls);
if (!requiredCls || hasCls) {
@@ -47208,11 +45764,11 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return false;
},
-
+
getCellIndex : function(el) {
if (el) {
var match = el.className.match(this.colRe);
-
+
if (match && match[1]) {
return this.cm.getIndexById(match[1]);
}
@@ -47220,18 +45776,18 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return false;
},
-
+
findHeaderCell : function(el) {
var cell = this.findCell(el);
return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null;
},
-
+
findHeaderIndex : function(el){
return this.findCellIndex(el, this.hdCls);
},
-
+
findRow : function(el) {
if (!el) {
return false;
@@ -47239,41 +45795,41 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return this.fly(el).findParent(this.rowSelector, this.rowSelectorDepth);
},
-
+
findRowIndex : function(el) {
var row = this.findRow(el);
return row ? row.rowIndex : false;
},
-
+
findRowBody : function(el) {
if (!el) {
return false;
}
-
+
return this.fly(el).findParent(this.rowBodySelector, this.rowBodySelectorDepth);
},
-
-
+
+
getRow : function(row) {
return this.getRows()[row];
},
-
+
getCell : function(row, col) {
- return Ext.fly(this.getRow(row)).query(this.cellSelector)[col];
+ return Ext.fly(this.getRow(row)).query(this.cellSelector)[col];
},
-
+
getHeaderCell : function(index) {
return this.mainHd.dom.getElementsByTagName('td')[index];
},
-
-
+
+
addRowClass : function(rowId, cls) {
var row = this.getRow(rowId);
if (row) {
@@ -47281,7 +45837,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
removeRowClass : function(row, cls) {
var r = this.getRow(row);
if(r){
@@ -47289,77 +45845,77 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
removeRow : function(row) {
Ext.removeNode(this.getRow(row));
this.syncFocusEl(row);
},
-
+
removeRows : function(firstRow, lastRow) {
var bd = this.mainBody.dom,
rowIndex;
-
+
for (rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){
Ext.removeNode(bd.childNodes[firstRow]);
}
-
+
this.syncFocusEl(firstRow);
},
-
-
-
+
+
+
getScrollState : function() {
var sb = this.scroller.dom;
-
+
return {
- left: sb.scrollLeft,
+ left: sb.scrollLeft,
top : sb.scrollTop
};
},
-
+
restoreScroll : function(state) {
var sb = this.scroller.dom;
sb.scrollLeft = state.left;
sb.scrollTop = state.top;
},
-
+
scrollToTop : function() {
var dom = this.scroller.dom;
-
+
dom.scrollTop = 0;
dom.scrollLeft = 0;
},
-
+
syncScroll : function() {
this.syncHeaderScroll();
var mb = this.scroller.dom;
this.grid.fireEvent('bodyscroll', mb.scrollLeft, mb.scrollTop);
},
-
+
syncHeaderScroll : function() {
var innerHd = this.innerHd,
scrollLeft = this.scroller.dom.scrollLeft;
-
+
+ innerHd.scrollLeft = scrollLeft;
innerHd.scrollLeft = scrollLeft;
- innerHd.scrollLeft = scrollLeft;
},
-
-
+
+
updateSortIcon : function(col, dir) {
var sortClasses = this.sortClasses,
sortClass = sortClasses[dir == "DESC" ? 1 : 0],
headers = this.mainHd.select('td').removeClass(sortClasses);
-
+
headers.item(col).addClass(sortClass);
},
-
+
updateAllColumnWidths : function() {
var totalWidth = this.getTotalWidth(),
colCount = this.cm.getColumnCount(),
@@ -47367,33 +45923,33 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
rowCount = rows.length,
widths = [],
row, rowFirstChild, trow, i, j;
-
+
for (i = 0; i < colCount; i++) {
widths[i] = this.getColumnWidth(i);
this.getHeaderCell(i).style.width = widths[i];
}
-
+
this.updateHeaderWidth();
-
+
for (i = 0; i < rowCount; i++) {
row = rows[i];
row.style.width = totalWidth;
rowFirstChild = row.firstChild;
-
+
if (rowFirstChild) {
rowFirstChild.style.width = totalWidth;
trow = rowFirstChild.rows[0];
-
+
for (j = 0; j < colCount; j++) {
trow.childNodes[j].style.width = widths[j];
}
}
}
-
+
this.onAllColumnWidthsUpdated(widths, totalWidth);
},
-
+
updateColumnWidth : function(column, width) {
var columnWidth = this.getColumnWidth(column),
totalWidth = this.getTotalWidth(),
@@ -47401,25 +45957,25 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
nodes = this.getRows(),
nodeCount = nodes.length,
row, i, firstChild;
-
+
this.updateHeaderWidth();
headerCell.style.width = columnWidth;
-
+
for (i = 0; i < nodeCount; i++) {
row = nodes[i];
firstChild = row.firstChild;
-
+
row.style.width = totalWidth;
if (firstChild) {
firstChild.style.width = totalWidth;
firstChild.rows[0].childNodes[column].style.width = columnWidth;
}
}
-
+
this.onColumnWidthUpdated(column, columnWidth, totalWidth);
},
-
-
+
+
updateColumnHidden : function(col, hidden) {
var totalWidth = this.getTotalWidth(),
display = hidden ? 'none' : '',
@@ -47427,34 +45983,34 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
nodes = this.getRows(),
nodeCount = nodes.length,
row, rowFirstChild, i;
-
+
this.updateHeaderWidth();
headerCell.style.display = display;
-
+
for (i = 0; i < nodeCount; i++) {
row = nodes[i];
row.style.width = totalWidth;
rowFirstChild = row.firstChild;
-
+
if (rowFirstChild) {
rowFirstChild.style.width = totalWidth;
rowFirstChild.rows[0].childNodes[col].style.display = display;
}
}
-
+
this.onColumnHiddenUpdated(col, hidden, totalWidth);
- delete this.lastViewWidth;
+ delete this.lastViewWidth;
this.layout();
},
-
+
doRender : function(columns, records, store, startRow, colCount, stripe) {
var templates = this.templates,
cellTemplate = templates.cell,
rowTemplate = templates.row,
last = colCount - 1,
tstyle = 'width:' + this.getTotalWidth() + ';',
-
+
rowBuffer = [],
colBuffer = [],
rowParams = {tstyle: tstyle},
@@ -47464,17 +46020,17 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
column,
record, i, j, rowIndex;
-
+
for (j = 0; j < len; j++) {
record = records[j];
colBuffer = [];
rowIndex = j + startRow;
-
+
for (i = 0; i < colCount; i++) {
column = columns[i];
-
+
meta.id = column.id;
meta.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : '');
meta.attr = meta.cellAttr = '';
@@ -47493,7 +46049,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
alt = [];
-
+
if (stripe && ((rowIndex + 1) % 2 === 0)) {
alt[0] = 'x-grid3-row-alt';
}
@@ -47517,7 +46073,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return rowBuffer.join('');
},
-
+
processRows : function(startRow, skipStripe) {
if (!this.ds || this.ds.getCount() < 1) {
return;
@@ -47543,37 +46099,37 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
}
-
+
if (startRow === 0) {
Ext.fly(rows[0]).addClass(this.firstRowCls);
}
Ext.fly(rows[length - 1]).addClass(this.lastRowCls);
},
-
-
+
+
afterRender : function() {
if (!this.ds || !this.cm) {
return;
}
-
+
this.mainBody.dom.innerHTML = this.renderBody() || ' ';
this.processRows(0, true);
if (this.deferEmptyText !== true) {
this.applyEmptyText();
}
-
+
this.grid.fireEvent('viewready', this.grid);
},
-
-
+
+
afterRenderUI: function() {
var grid = this.grid;
-
+
this.initElements();
-
+
Ext.fly(this.innerHd).on('click', this.handleHdDown, this);
this.mainHd.on({
@@ -47584,7 +46140,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
});
this.scroller.on('scroll', this.syncScroll, this);
-
+
if (grid.enableColumnResize !== false) {
this.splitZone = new Ext.grid.GridView.SplitDragZone(grid, this.mainHd.dom);
}
@@ -47640,7 +46196,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
this.updateHeaderSortState();
},
-
+
renderUI : function() {
var templates = this.templates;
@@ -47652,7 +46208,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
});
},
-
+
processEvent : function(name, e) {
var target = e.getTarget(),
grid = this.grid,
@@ -47689,10 +46245,10 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
layout : function(initial) {
if (!this.mainBody) {
- return;
+ return;
}
var grid = this.grid,
@@ -47702,31 +46258,31 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
gridHeight = gridSize.height,
scroller = this.scroller,
scrollStyle, headerHeight, scrollHeight;
-
+
if (gridWidth < 20 || gridHeight < 20) {
return;
}
-
+
if (grid.autoHeight) {
scrollStyle = scroller.dom.style;
scrollStyle.overflow = 'visible';
-
+
if (Ext.isWebKit) {
scrollStyle.position = 'static';
}
} else {
this.el.setSize(gridWidth, gridHeight);
-
+
headerHeight = this.mainHd.getHeight();
scrollHeight = gridHeight - headerHeight;
-
+
scroller.setSize(gridWidth, scrollHeight);
-
+
if (this.innerHd) {
this.innerHd.style.width = (gridWidth) + "px";
}
}
-
+
if (this.forceFit || (initial === true && this.autoFill)) {
if (this.lastViewWidth != gridWidth) {
this.fitColumns(false, false);
@@ -47736,38 +46292,38 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
this.autoExpand();
this.syncHeaderScroll();
}
-
+
this.onLayout(gridWidth, scrollHeight);
},
-
-
+
+
onLayout : function(vw, vh) {
-
+
},
onColumnWidthUpdated : function(col, w, tw) {
-
+
},
onAllColumnWidthsUpdated : function(ws, tw) {
-
+
},
onColumnHiddenUpdated : function(col, hidden, tw) {
-
+
},
updateColumnText : function(col, text) {
-
+
},
afterMove : function(colIndex) {
-
+
},
-
-
+
+
init : function(grid) {
this.grid = grid;
@@ -47776,22 +46332,22 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
this.initUI(grid);
},
-
+
getColumnId : function(index){
return this.cm.getColumnId(index);
},
-
+
getOffsetWidth : function() {
return (this.cm.getTotalWidth() + this.getScrollOffset()) + 'px';
},
-
+
getScrollOffset: function() {
return Ext.num(this.scrollOffset, Ext.getScrollBarWidth());
},
-
+
renderHeaders : function() {
var colModel = this.cm,
templates = this.templates,
@@ -47801,14 +46357,14 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
last = colCount - 1,
cells = [],
i, cssCls;
-
+
for (i = 0; i < colCount; i++) {
if (i == 0) {
cssCls = 'x-grid3-cell-first ';
} else {
cssCls = i == last ? 'x-grid3-cell-last ' : '';
}
-
+
properties = {
id : colModel.getColumnId(i),
value : colModel.getColumnHeader(i) || '',
@@ -47816,23 +46372,23 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
css : cssCls,
tooltip: this.getColumnTooltip(i)
};
-
+
if (colModel.config[i].align == 'right') {
properties.istyle = 'padding-right: 16px;';
} else {
delete properties.istyle;
}
-
+
cells[i] = headerTpl.apply(properties);
}
-
+
return templates.header.apply({
cells : cells.join(""),
tstyle: String.format("width: {0};", this.getTotalWidth())
});
},
-
+
getColumnTooltip : function(i) {
var tooltip = this.cm.getColumnTooltip(i);
if (tooltip) {
@@ -47842,46 +46398,46 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return 'title="' + tooltip + '"';
}
}
-
+
return '';
},
-
+
beforeUpdate : function() {
this.grid.stopEditing(true);
},
-
+
updateHeaders : function() {
this.innerHd.firstChild.innerHTML = this.renderHeaders();
-
+
this.updateHeaderWidth(false);
},
-
-
+
+
updateHeaderWidth: function(updateMain) {
var innerHdChild = this.innerHd.firstChild,
totalWidth = this.getTotalWidth();
-
+
innerHdChild.style.width = this.getOffsetWidth();
innerHdChild.firstChild.style.width = totalWidth;
-
+
if (updateMain !== false) {
this.mainBody.dom.style.width = totalWidth;
}
},
-
+
focusRow : function(row) {
this.focusCell(row, 0, false);
},
-
+
focusCell : function(row, col, hscroll) {
this.syncFocusEl(this.ensureVisible(row, col, hscroll));
-
+
var focusEl = this.focusEl;
-
+
if (Ext.isGecko) {
focusEl.focus();
} else {
@@ -47889,16 +46445,16 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
resolveCell : function(row, col, hscroll) {
if (!Ext.isNumber(row)) {
row = row.rowIndex;
}
-
+
if (!this.ds) {
return null;
}
-
+
if (row < 0 || row >= this.ds.getCount()) {
return null;
}
@@ -47908,27 +46464,27 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
colModel = this.cm,
colCount = colModel.getColumnCount(),
cellEl;
-
+
if (!(hscroll === false && col === 0)) {
while (col < colCount && colModel.isHidden(col)) {
col++;
}
-
+
cellEl = this.getCell(row, col);
}
return {row: rowEl, cell: cellEl};
},
-
+
getResolvedXY : function(resolved) {
if (!resolved) {
return null;
}
-
+
var cell = resolved.cell,
row = resolved.row;
-
+
if (cell) {
return Ext.fly(cell).getXY();
} else {
@@ -47936,27 +46492,27 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
syncFocusEl : function(row, col, hscroll) {
var xy = row;
-
+
if (!Ext.isArray(xy)) {
row = Math.min(row, Math.max(0, this.getRows().length-1));
-
+
if (isNaN(row)) {
return;
}
-
+
xy = this.getResolvedXY(this.resolveCell(row, col, hscroll));
}
-
+
this.focusEl.setXY(xy || this.scroller.getXY());
},
-
+
ensureVisible : function(row, col, hscroll) {
var resolved = this.resolveCell(row, col, hscroll);
-
+
if (!resolved || !resolved.row) {
return null;
}
@@ -47992,18 +46548,18 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
cright = cleft + cellEl.offsetWidth,
sleft = parseInt(c.scrollLeft, 10),
sright = sleft + c.clientWidth;
-
+
if (cleft < sleft) {
c.scrollLeft = cleft;
} else if(cright > sright) {
c.scrollLeft = cright-c.clientWidth;
}
}
-
+
return this.getResolvedXY(resolved);
},
-
+
insertRows : function(dm, firstRow, lastRow, isUpdate) {
var last = dm.getCount() - 1;
if( !isUpdate && firstRow === 0 && lastRow >= last) {
@@ -48032,14 +46588,14 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
this.processRows(firstRow);
this.fireEvent('rowsinserted', this, firstRow, lastRow);
} else if (firstRow === 0 || firstRow >= last) {
-
+
Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls);
}
}
this.syncFocusEl(firstRow);
},
-
+
deleteRows : function(dm, firstRow, lastRow) {
if (dm.getRowCount() < 1) {
this.refresh();
@@ -48053,31 +46609,31 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
getColumnStyle : function(colIndex, isHeader) {
var colModel = this.cm,
colConfig = colModel.config,
style = isHeader ? '' : colConfig[colIndex].css || '',
align = colConfig[colIndex].align;
-
+
style += String.format("width: {0};", this.getColumnWidth(colIndex));
-
+
if (colModel.isHidden(colIndex)) {
style += 'display: none; ';
}
-
+
if (align) {
style += String.format("text-align: {0};", align);
}
-
+
return style;
},
-
+
getColumnWidth : function(column) {
var columnWidth = this.cm.getColumnWidth(column),
borderWidth = this.borderWidth;
-
+
if (Ext.isNumber(columnWidth)) {
if (Ext.isBorderBox) {
return columnWidth + "px";
@@ -48089,12 +46645,12 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
getTotalWidth : function() {
return this.cm.getTotalWidth() + 'px';
},
-
+
fitColumns : function(preventRefresh, onlyExpand, omitColumn) {
var grid = this.grid,
colModel = this.cm,
@@ -48105,79 +46661,79 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
extraCol = 0,
width = 0,
colWidth, fraction, i;
-
-
+
+
if (gridWidth < 20 || extraWidth === 0) {
return false;
}
-
+
var visibleColCount = colModel.getColumnCount(true),
totalColCount = colModel.getColumnCount(false),
adjCount = visibleColCount - (Ext.isNumber(omitColumn) ? 1 : 0);
-
+
if (adjCount === 0) {
adjCount = 1;
omitColumn = undefined;
}
-
-
+
+
for (i = 0; i < totalColCount; i++) {
if (!colModel.isFixed(i) && i !== omitColumn) {
colWidth = colModel.getColumnWidth(i);
columns.push(i, colWidth);
-
+
if (!colModel.isHidden(i)) {
extraCol = i;
width += colWidth;
}
}
}
-
+
fraction = (gridWidth - colModel.getTotalWidth()) / width;
-
+
while (columns.length) {
colWidth = columns.pop();
i = columns.pop();
-
+
colModel.setColumnWidth(i, Math.max(grid.minColumnWidth, Math.floor(colWidth + colWidth * fraction)), true);
}
-
-
+
+
totalColWidth = colModel.getTotalWidth(false);
-
+
if (totalColWidth > gridWidth) {
var adjustCol = (adjCount == visibleColCount) ? extraCol : omitColumn,
newWidth = Math.max(1, colModel.getColumnWidth(adjustCol) - (totalColWidth - gridWidth));
-
+
colModel.setColumnWidth(adjustCol, newWidth, true);
}
-
+
if (preventRefresh !== true) {
this.updateAllColumnWidths();
}
-
+
return true;
},
-
+
autoExpand : function(preventUpdate) {
var grid = this.grid,
colModel = this.cm,
gridWidth = this.getGridInnerWidth(),
totalColumnWidth = colModel.getTotalWidth(false),
autoExpandColumn = grid.autoExpandColumn;
-
+
if (!this.userResized && autoExpandColumn) {
if (gridWidth != totalColumnWidth) {
-
+
var colIndex = colModel.getIndexById(autoExpandColumn),
currentWidth = colModel.getColumnWidth(colIndex),
desiredWidth = gridWidth - totalColumnWidth + currentWidth,
newWidth = Math.min(Math.max(desiredWidth, grid.autoExpandMin), grid.autoExpandMax);
-
+
if (currentWidth != newWidth) {
colModel.setColumnWidth(colIndex, newWidth, true);
-
+
if (preventUpdate !== true) {
this.updateColumnWidth(colIndex, newWidth);
}
@@ -48185,23 +46741,23 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
}
},
-
-
+
+
getGridInnerWidth: function() {
return this.grid.getGridEl().getWidth(true) - this.getScrollOffset();
},
-
+
getColumnData : function() {
var columns = [],
colModel = this.cm,
colCount = colModel.getColumnCount(),
fields = this.ds.fields,
i, name;
-
+
for (i = 0; i < colCount; i++) {
name = colModel.getDataIndex(i);
-
+
columns[i] = {
name : Ext.isDefined(name) ? name : (fields.get(i) ? fields.get(i).name : undefined),
renderer: colModel.getRenderer(i),
@@ -48210,11 +46766,11 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
style : this.getColumnStyle(i)
};
}
-
+
return columns;
},
-
+
renderRows : function(startRow, endRow) {
var grid = this.grid,
store = grid.store,
@@ -48223,25 +46779,25 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
colCount = colModel.getColumnCount(),
rowCount = store.getCount(),
records;
-
+
if (rowCount < 1) {
return '';
}
-
+
startRow = startRow || 0;
endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1;
records = store.getRange(startRow, endRow);
-
+
return this.doRender(this.getColumnData(), records, store, startRow, colCount, stripe);
},
-
+
renderBody : function(){
var markup = this.renderRows() || ' ';
return this.templates.body.apply({rows: markup});
},
-
+
refreshRow: function(record) {
var store = this.ds,
colCount = this.cm.getColumnCount(),
@@ -48254,29 +46810,29 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
colBuffer = [],
cellTpl = this.templates.cell,
rowIndex, row, column, meta, css, i;
-
+
if (Ext.isNumber(record)) {
rowIndex = record;
record = store.getAt(rowIndex);
} else {
rowIndex = store.indexOf(record);
}
-
-
+
+
if (!record || rowIndex < 0) {
return;
}
-
-
+
+
for (i = 0; i < colCount; i++) {
column = columns[i];
-
+
if (i == 0) {
css = 'x-grid3-cell-first';
} else {
css = (i == last) ? 'x-grid3-cell-last ' : '';
}
-
+
meta = {
id : column.id,
style : column.style,
@@ -48284,40 +46840,40 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
attr : "",
cellAttr: ""
};
-
+
meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store);
-
+
if (Ext.isEmpty(meta.value)) {
meta.value = ' ';
}
-
+
if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') {
meta.css += ' x-grid3-dirty-cell';
}
-
+
colBuffer[i] = cellTpl.apply(meta);
}
-
+
row = this.getRow(rowIndex);
row.className = '';
-
+
if (this.grid.stripeRows && ((rowIndex + 1) % 2 === 0)) {
cls.push('x-grid3-row-alt');
}
-
+
if (this.getRowClass) {
rowParams.cols = colCount;
cls.push(this.getRowClass(record, rowIndex, rowParams, store));
}
-
+
this.fly(row).addClass(cls).setStyle(rowParams.tstyle);
rowParams.cells = colBuffer.join("");
row.innerHTML = this.templates.rowInner.apply(rowParams);
-
+
this.fireEvent('rowupdated', this, rowIndex, record);
},
-
+
refresh : function(headersToo) {
this.fireEvent('beforerefresh', this);
this.grid.stopEditing(true);
@@ -48334,14 +46890,14 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
this.fireEvent('refresh', this);
},
-
+
applyEmptyText : function() {
if (this.emptyText && !this.hasRows()) {
this.mainBody.update('
' + this.emptyText + '
');
}
},
-
+
updateHeaderSortState : function() {
var state = this.ds.getSortState();
if (!state) {
@@ -48361,7 +46917,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
clearHeaderSortState : function() {
if (!this.sortState) {
return;
@@ -48371,7 +46927,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
delete this.sortState;
},
-
+
destroy : function() {
var me = this,
grid = me.grid,
@@ -48383,16 +46939,16 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
scrollToTopTask = me.scrollToTopTask,
columnDragData,
columnDragProxy;
-
+
if (scrollToTopTask && scrollToTopTask.cancel) {
scrollToTopTask.cancel();
}
-
+
Ext.destroyMembers(me, 'colMenu', 'hmenu');
me.initData(null, null);
me.purgeListeners();
-
+
Ext.fly(me.innerHd).un("click", me.handleHdDown, me);
if (grid.enableColumnMove) {
@@ -48408,16 +46964,16 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
columnDragData.ddel,
columnDragData.header
);
-
+
if (columnDragProxy.anim) {
Ext.destroy(columnDragProxy.anim);
}
-
+
delete columnDragProxy.ghost;
delete columnDragData.ddel;
delete columnDragData.header;
columnDrag.destroy();
-
+
delete Ext.dd.DDM.locationCache[columnDrag.id];
delete columnDrag._domRef;
@@ -48429,7 +46985,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
delete Ext.dd.DDM.ids[columnDrop.ddGroup];
}
- if (splitZone) {
+ if (splitZone) {
splitZone.destroy();
delete splitZone._domRef;
delete Ext.dd.DDM.ids["gridSplitters" + gridEl.id];
@@ -48466,16 +47022,16 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
Ext.EventManager.removeResizeListener(me.onWindowResize, me);
},
-
+
onDenyColumnHide : function() {
},
-
+
render : function() {
if (this.autoFill) {
var ct = this.grid.ownerCt;
-
+
if (ct && ct.getLayout()) {
ct.on('afterlayout', function() {
this.fitColumns(true, true);
@@ -48488,33 +47044,33 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
} else if (this.grid.autoExpandColumn) {
this.autoExpand(true);
}
-
+
this.grid.getGridEl().dom.innerHTML = this.renderUI();
-
+
this.afterRenderUI();
},
-
-
-
+
+
+
initData : function(newStore, newColModel) {
var me = this;
-
+
if (me.ds) {
var oldStore = me.ds;
-
+
oldStore.un('add', me.onAdd, me);
oldStore.un('load', me.onLoad, me);
oldStore.un('clear', me.onClear, me);
oldStore.un('remove', me.onRemove, me);
oldStore.un('update', me.onUpdate, me);
oldStore.un('datachanged', me.onDataChange, me);
-
+
if (oldStore !== newStore && oldStore.autoDestroy) {
oldStore.destroy();
}
}
-
+
if (newStore) {
newStore.on({
scope : me,
@@ -48526,20 +47082,20 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
datachanged: me.onDataChange
});
}
-
+
if (me.cm) {
var oldColModel = me.cm;
-
+
oldColModel.un('configchange', me.onColConfigChange, me);
oldColModel.un('widthchange', me.onColWidthChange, me);
oldColModel.un('headerchange', me.onHeaderChange, me);
oldColModel.un('hiddenchange', me.onHiddenChange, me);
oldColModel.un('columnmoved', me.onColumnMove, me);
}
-
+
if (newColModel) {
delete me.lastViewWidth;
-
+
newColModel.on({
scope : me,
configchange: me.onColConfigChange,
@@ -48549,42 +47105,42 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
columnmoved : me.onColumnMove
});
}
-
+
me.ds = newStore;
me.cm = newColModel;
},
-
+
onDataChange : function(){
this.refresh(true);
this.updateHeaderSortState();
this.syncFocusEl(0);
},
-
+
onClear : function() {
this.refresh();
this.syncFocusEl(0);
},
-
+
onUpdate : function(store, record) {
this.refreshRow(record);
},
-
+
onAdd : function(store, records, index) {
this.insertRows(store, index, index + (records.length-1));
},
-
+
onRemove : function(store, record, index, isUpdate) {
if (isUpdate !== true) {
this.fireEvent('beforerowremoved', this, index, record);
}
-
+
this.removeRow(index);
-
+
if (isUpdate !== true) {
this.processRows(index);
this.applyEmptyText();
@@ -48592,7 +47148,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
onLoad : function() {
if (Ext.isGecko) {
if (!this.scrollToTopTask) {
@@ -48604,48 +47160,48 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
onColWidthChange : function(cm, col, width) {
this.updateColumnWidth(col, width);
},
-
+
onHeaderChange : function(cm, col, text) {
this.updateHeaders();
},
-
+
onHiddenChange : function(cm, col, hidden) {
this.updateColumnHidden(col, hidden);
},
-
+
onColumnMove : function(cm, oldIndex, newIndex) {
this.indexMap = null;
this.refresh(true);
this.restoreScroll(this.getScrollState());
-
+
this.afterMove(newIndex);
this.grid.fireEvent('columnmove', oldIndex, newIndex);
},
-
+
onColConfigChange : function() {
delete this.lastViewWidth;
this.indexMap = null;
this.refresh(true);
},
-
-
+
+
initUI : function(grid) {
grid.on('headerclick', this.onHeaderClick, this);
},
-
+
initEvents : Ext.emptyFn,
-
+
onHeaderClick : function(g, index) {
if (this.headersDisabled || !this.cm.isSortable(index)) {
return;
@@ -48654,35 +47210,35 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
g.store.sort(this.cm.getDataIndex(index));
},
-
+
onRowOver : function(e, target) {
var row = this.findRowIndex(target);
-
+
if (row !== false) {
this.addRowClass(row, this.rowOverCls);
}
},
-
+
onRowOut : function(e, target) {
var row = this.findRowIndex(target);
-
+
if (row !== false && !e.within(this.getRow(row), true)) {
this.removeRowClass(row, this.rowOverCls);
}
},
-
+
onRowSelect : function(row) {
this.addRowClass(row, this.selectedRowClass);
},
-
+
onRowDeselect : function(row) {
this.removeRowClass(row, this.selectedRowClass);
},
-
+
onCellSelect : function(row, col) {
var cell = this.getCell(row, col);
if (cell) {
@@ -48690,7 +47246,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
onCellDeselect : function(row, col) {
var cell = this.getCell(row, col);
if (cell) {
@@ -48698,12 +47254,12 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
handleWheel : function(e) {
e.stopPropagation();
},
-
+
onColumnSplitterMoved : function(cellIndex, width) {
this.userResized = true;
this.grid.colModel.setColumnWidth(cellIndex, width, true);
@@ -48719,7 +47275,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
this.grid.fireEvent('columnresize', cellIndex, width);
},
-
+
beforeColMenuShow : function() {
var colModel = this.cm,
colCount = colModel.getColumnCount(),
@@ -48740,8 +47296,8 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
}
},
-
-
+
+
handleHdMenuClick : function(item) {
var store = this.ds,
dataIndex = this.cm.getDataIndex(this.hdCtxIndex);
@@ -48758,8 +47314,8 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
return true;
},
-
-
+
+
handleHdMenuClickDefault: function(item) {
var colModel = this.cm,
itemId = item.getItemId(),
@@ -48774,11 +47330,11 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
handleHdDown : function(e, target) {
if (Ext.fly(target).hasClass('x-grid3-hd-btn')) {
e.stopEvent();
-
+
var colModel = this.cm,
header = this.findHeaderCell(target),
index = this.getCellIndex(header),
@@ -48787,34 +47343,34 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
menuItems = menu.items,
menuCls = this.headerMenuOpenCls,
sep;
-
+
this.hdCtxIndex = index;
-
+
Ext.fly(header).addClass(menuCls);
if (this.hideSortIcons) {
menuItems.get('asc').setVisible(sortable);
menuItems.get('desc').setVisible(sortable);
sep = menuItems.get('sortSep');
if (sep) {
- sep.setVisible(sortable);
+ sep.setVisible(sortable);
}
} else {
menuItems.get('asc').setDisabled(!sortable);
menuItems.get('desc').setDisabled(!sortable);
}
-
+
menu.on('hide', function() {
Ext.fly(header).removeClass(menuCls);
}, this, {single:true});
-
+
menu.show(target, 'tl-bl?');
}
},
-
+
handleHdMove : function(e) {
var header = this.findHeaderCell(this.activeHdRef);
-
+
if (header && !this.headersDisabled) {
var handleWidth = this.splitHandleWidth || 5,
activeRegion = this.activeHdRegion,
@@ -48822,7 +47378,7 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
colModel = this.cm,
cursor = '',
pageX = e.getPageX();
-
+
if (this.grid.enableColumnResize !== false) {
var activeHeaderIndex = this.activeHdIndex,
previousVisible = this.getPreviousVisible(activeHeaderIndex),
@@ -48830,19 +47386,19 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
previousResizable = previousVisible && colModel.isResizable(previousVisible),
inLeftResizer = pageX - activeRegion.left <= handleWidth,
inRightResizer = activeRegion.right - pageX <= (!this.activeHdBtn ? handleWidth : 2);
-
+
if (inLeftResizer && previousResizable) {
- cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize';
+ cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize';
} else if (inRightResizer && currentResizable) {
cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize';
}
}
-
+
headerStyle.cursor = cursor;
}
},
-
-
+
+
getPreviousVisible: function(index) {
while (index > 0) {
if (!this.cm.isHidden(index - 1)) {
@@ -48853,21 +47409,21 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
return undefined;
},
-
+
handleHdOver : function(e, target) {
var header = this.findHeaderCell(target);
-
+
if (header && !this.headersDisabled) {
var fly = this.fly(header);
-
+
this.activeHdRef = target;
this.activeHdIndex = this.getCellIndex(header);
this.activeHdRegion = fly.getRegion();
-
+
if (!this.isMenuDisabled(this.activeHdIndex, fly)) {
fly.addClass('x-grid3-hd-over');
this.activeHdBtn = fly.child('.x-grid3-hd-btn');
-
+
if (this.activeHdBtn) {
this.activeHdBtn.dom.style.height = (header.firstChild.offsetHeight - 1) + 'px';
}
@@ -48875,34 +47431,34 @@ Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
}
},
-
+
handleHdOut : function(e, target) {
var header = this.findHeaderCell(target);
-
+
if (header && (!Ext.isIE9m || !e.within(header, true))) {
this.activeHdRef = null;
this.fly(header).removeClass('x-grid3-hd-over');
header.style.cursor = '';
}
},
-
-
+
+
isMenuDisabled: function(cellIndex, el) {
return this.cm.isMenuDisabled(cellIndex);
},
-
+
hasRows : function() {
var fc = this.mainBody.dom.firstChild;
return fc && fc.nodeType == 1 && fc.className != 'x-grid-empty';
},
-
-
+
+
isHideableColumn : function(c) {
return !c.hidden;
},
-
+
bind : function(d, c) {
this.initData(d, c);
}
@@ -48952,13 +47508,13 @@ Ext.grid.GridView.SplitDragZone = Ext.extend(Ext.dd.DDProxy, {
handleMouseDown : function(e){
var t = this.view.findHeaderCell(e.getTarget());
if(t && this.allowHeaderDrag(e)){
- var xy = this.view.fly(t).getXY(),
+ var xy = this.view.fly(t).getXY(),
x = xy[0],
- exy = e.getXY(),
+ exy = e.getXY(),
ex = exy[0],
- w = t.offsetWidth,
+ w = t.offsetWidth,
adjust = false;
-
+
if((ex - x) <= this.hw){
adjust = -1;
}else if((x+w) - ex <= this.hw){
@@ -48995,7 +47551,7 @@ Ext.grid.GridView.SplitDragZone = Ext.extend(Ext.dd.DDProxy, {
endX = Math.max(this.minX, e.getPageX()),
diff = endX - this.startPos,
disabled = this.dragHeadersDisabled;
-
+
v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff);
setTimeout(function(){
v.headersDisabled = disabled;
@@ -49008,26 +47564,26 @@ Ext.grid.GridView.SplitDragZone = Ext.extend(Ext.dd.DDProxy, {
});
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(startRow, endRow) {
var grid = this.grid,
rows = grid.extractData(),
@@ -49043,18 +47599,18 @@ Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, {
meta = {},
tstyle = 'width:' + this.getGridInnerWidth() + 'px;',
colBuffer, colCount, column, i, row;
-
+
startRow = startRow || 0;
endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1;
-
+
for (i = 0; i < rowCount; i++) {
row = rows[i];
colCount = row.length;
colBuffer = [];
-
-
+
+
for (var j = 0; j < colCount; j++) {
-
+
meta.id = i + '-' + j;
meta.css = j === 0 ? 'x-grid3-cell-first ' : (j == (colCount - 1) ? 'x-grid3-cell-last ' : '');
meta.attr = meta.cellAttr = '';
@@ -49063,18 +47619,18 @@ Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, {
if (Ext.isEmpty(meta.value)) {
meta.value = ' ';
}
-
+
if (hasRenderer) {
meta.value = renderer(meta.value);
}
-
+
if (hasGetCellCls) {
meta.css += getCellCls(meta.value) + ' ';
}
colBuffer[colBuffer.length] = cellTemplate.apply(meta);
}
-
+
rowBuffer[rowBuffer.length] = rowTemplate.apply({
tstyle: tstyle,
cols : colCount,
@@ -49082,11 +47638,11 @@ Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, {
alt : ''
});
}
-
+
return rowBuffer.join("");
},
-
-
+
+
masterTpl: new Ext.Template(
'
',
'
',
@@ -49107,104 +47663,104 @@ Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, {
'
',
'
'
),
-
-
+
+
initTemplates: function() {
Ext.grid.PivotGridView.superclass.initTemplates.apply(this, arguments);
-
+
var templates = this.templates || {};
if (!templates.gcell) {
templates.gcell = new Ext.XTemplate(
''
);
}
-
+
this.templates = templates;
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 previousWidth = Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this, arguments);
-
+
return previousWidth - this.getTotalRowHeaderWidth();
},
-
-
+
+
getTotalRowHeaderWidth: function() {
var headers = this.getRowHeaders(),
length = headers.length,
total = 0,
i;
-
+
for (i = 0; i< length; i++) {
total += headers[i].width;
}
-
+
return total;
},
-
-
+
+
getTotalColumnHeaderHeight: function() {
return this.getColumnHeaders().length * 21;
},
-
-
+
+
getCellIndex : function(el) {
if (el) {
var match = el.className.match(this.colRe),
data;
-
+
if (match && (data = match[1])) {
return parseInt(data.split('-')[1], 10);
}
}
return false;
},
-
-
-
+
+
+
renderUI : function() {
var templates = this.templates,
innerWidth = this.getGridInnerWidth();
-
+
return templates.master.apply({
body : templates.body.apply({rows:' '}),
ostyle: 'width:' + innerWidth + 'px',
bstyle: 'width:' + innerWidth + 'px'
});
},
-
-
+
+
onLayout: function(width, height) {
Ext.grid.PivotGridView.superclass.onLayout.apply(this, arguments);
-
+
var width = this.getGridInnerWidth();
-
+
this.resizeColumnHeaders(width);
this.resizeAllRows(width);
},
-
-
+
+
refresh : function(headersToo) {
this.fireEvent('beforerefresh', this);
this.grid.stopEditing(true);
-
+
var result = this.renderBody();
this.mainBody.update(result).setWidth(this.getGridInnerWidth());
if (headersToo === true) {
@@ -49216,113 +47772,113 @@ Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, {
this.applyEmptyText();
this.fireEvent('refresh', this);
},
-
-
+
+
renderHeaders: Ext.emptyFn,
-
-
+
+
fitColumns: Ext.emptyFn,
-
-
+
+
resizeColumnHeaders: function(width) {
var topAxis = this.grid.topAxis;
-
+
if (topAxis.rendered) {
topAxis.el.setWidth(width);
}
},
-
-
+
+
resizeRowHeaders: function() {
var rowHeaderWidth = this.getTotalRowHeaderWidth(),
marginStyle = String.format("margin-left: {0}px;", rowHeaderWidth);
-
+
this.rowHeadersEl.setWidth(rowHeaderWidth);
this.mainBody.applyStyles(marginStyle);
Ext.fly(this.innerHd).applyStyles(marginStyle);
-
+
this.headerTitleEl.setWidth(rowHeaderWidth);
this.headerTitleEl.setHeight(this.getTotalColumnHeaderHeight());
},
-
-
+
+
resizeAllRows: function(width) {
var rows = this.getRows(),
length = rows.length,
i;
-
+
for (i = 0; i < length; i++) {
Ext.fly(rows[i]).setWidth(width);
Ext.fly(rows[i]).child('table').setWidth(width);
}
},
-
-
+
+
updateHeaders: function() {
this.renderGroupRowHeaders();
this.renderGroupColumnHeaders();
},
-
-
+
+
renderGroupRowHeaders: function() {
var leftAxis = this.grid.leftAxis;
-
+
this.resizeRowHeaders();
leftAxis.rendered = false;
leftAxis.render(this.rowHeadersEl);
-
+
this.setTitle(this.title);
},
-
-
+
+
setTitle: function(title) {
this.headerTitleEl.child('span').dom.innerHTML = title;
},
-
-
+
+
renderGroupColumnHeaders: function() {
var topAxis = this.grid.topAxis;
-
+
topAxis.rendered = false;
topAxis.render(this.innerHd.firstChild);
},
-
-
+
+
isMenuDisabled: function(cellIndex, el) {
return true;
}
});
Ext.grid.PivotAxis = Ext.extend(Ext.Component, {
-
+
orientation: 'horizontal',
-
-
+
+
defaultHeaderWidth: 80,
-
-
+
+
paddingWidth: 7,
-
-
+
+
setDimensions: function(dimensions) {
this.dimensions = dimensions;
},
-
-
+
+
onRender: function(ct, position) {
var rows = this.orientation == 'horizontal'
? this.renderHorizontalRows()
: this.renderVerticalRows();
-
+
this.el = Ext.DomHelper.overwrite(ct.dom, {tag: 'table', cn: rows}, true);
},
-
-
+
+
renderHorizontalRows: function() {
var headers = this.buildHeaders(),
rowCount = headers.length,
rows = [],
cells, cols, colCount, i, j;
-
+
for (i = 0; i < rowCount; i++) {
cells = [];
cols = headers[i].items;
@@ -49341,26 +47897,26 @@ Ext.grid.PivotAxis = Ext.extend(Ext.Component, {
cn: cells
};
}
-
+
return rows;
},
-
-
+
+
renderVerticalRows: function() {
var headers = this.buildHeaders(),
colCount = headers.length,
rowCells = [],
rows = [],
rowCount, col, row, colWidth, i, j;
-
+
for (i = 0; i < colCount; i++) {
col = headers[i];
colWidth = col.width || 80;
rowCount = col.items.length;
-
+
for (j = 0; j < rowCount; j++) {
row = col.items[j];
-
+
rowCells[row.start] = rowCells[row.start] || [];
rowCells[row.start].push({
tag : 'td',
@@ -49370,7 +47926,7 @@ Ext.grid.PivotAxis = Ext.extend(Ext.Component, {
});
}
}
-
+
rowCount = rowCells.length;
for (i = 0; i < rowCount; i++) {
rows[i] = {
@@ -49378,75 +47934,75 @@ Ext.grid.PivotAxis = Ext.extend(Ext.Component, {
cn : rowCells[i]
};
}
-
+
return rows;
},
-
-
+
+
getTuples: function() {
var newStore = new Ext.data.Store({});
-
+
newStore.data = this.store.data.clone();
newStore.fields = this.store.fields;
-
+
var sorters = [],
dimensions = this.dimensions,
length = dimensions.length,
i;
-
+
for (i = 0; i < length; i++) {
sorters.push({
field : dimensions[i].dataIndex,
direction: dimensions[i].direction || 'ASC'
});
}
-
+
newStore.sort(sorters);
-
+
var records = newStore.data.items,
hashes = [],
tuples = [],
recData, hash, info, data, key;
-
+
length = records.length;
-
+
for (i = 0; i < length; i++) {
info = this.getRecordInfo(records[i]);
data = info.data;
hash = "";
-
+
for (key in data) {
hash += data[key] + '---';
}
-
+
if (hashes.indexOf(hash) == -1) {
hashes.push(hash);
tuples.push(info);
}
}
-
+
newStore.destroy();
-
+
return tuples;
},
-
-
+
+
getRecordInfo: function(record) {
var dimensions = this.dimensions,
length = dimensions.length,
data = {},
dimension, dataIndex, i;
-
-
+
+
for (i = 0; i < length; i++) {
dimension = dimensions[i];
dataIndex = dimension.dataIndex;
-
+
data[dataIndex] = record.get(dataIndex);
}
-
-
-
+
+
+
var createMatcherFunction = function(data) {
return function(record) {
for (var dataIndex in data) {
@@ -49454,18 +48010,18 @@ Ext.grid.PivotAxis = Ext.extend(Ext.Component, {
return false;
}
}
-
+
return true;
};
};
-
+
return {
data: data,
matcher: createMatcherFunction(data)
};
},
-
-
+
+
buildHeaders: function() {
var tuples = this.getTuples(),
rowCount = tuples.length,
@@ -49474,58 +48030,58 @@ Ext.grid.PivotAxis = Ext.extend(Ext.Component, {
colCount = dimensions.length,
headers = [],
tuple, rows, currentHeader, previousHeader, span, start, isLast, changed, i, j;
-
+
for (i = 0; i < colCount; i++) {
dimension = dimensions[i];
rows = [];
span = 0;
start = 0;
-
+
for (j = 0; j < rowCount; j++) {
tuple = tuples[j];
isLast = j == (rowCount - 1);
currentHeader = tuple.data[dimension.dataIndex];
-
-
+
+
changed = previousHeader != undefined && previousHeader != currentHeader;
if (i > 0 && j > 0) {
changed = changed || tuple.data[dimensions[i-1].dataIndex] != tuples[j-1].data[dimensions[i-1].dataIndex];
}
-
- if (changed) {
+
+ if (changed) {
rows.push({
header: previousHeader,
span : span,
start : start
});
-
+
start += span;
span = 0;
}
-
+
if (isLast) {
rows.push({
header: currentHeader,
span : span + 1,
start : start
});
-
+
start += span;
span = 0;
}
-
+
previousHeader = currentHeader;
span++;
}
-
+
headers.push({
items: rows,
width: dimension.width || this.defaultHeaderWidth
});
-
+
previousHeader = undefined;
}
-
+
return headers;
}
});
@@ -49533,7 +48089,7 @@ Ext.grid.PivotAxis = Ext.extend(Ext.Component, {
Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, {
maxDragWidth: 120,
-
+
constructor : function(grid, hd, hd2){
this.grid = grid;
this.view = grid.getView();
@@ -49545,7 +48101,7 @@ Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, {
}
this.scroll = false;
},
-
+
getDragData : function(e){
var t = Ext.lib.Event.getTarget(e),
h = this.view.findHeaderCell(t);
@@ -49556,7 +48112,7 @@ Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, {
},
onInitDrag : function(e){
-
+
this.dragHeadersDisabled = this.view.headersDisabled;
this.view.headersDisabled = true;
var clone = this.dragData.ddel.cloneNode(true);
@@ -49573,7 +48129,7 @@ Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, {
afterInvalidDrop : function(){
this.completeDrop();
},
-
+
completeDrop: function(){
var v = this.view,
disabled = this.dragHeadersDisabled;
@@ -49588,11 +48144,11 @@ Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, {
Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, {
proxyOffsets : [-4, -9],
fly: Ext.Element.fly,
-
+
constructor : function(grid, hd, hd2){
this.grid = grid;
this.view = grid.getView();
-
+
this.proxyTop = Ext.DomHelper.append(document.body, {
cls:"col-move-top", html:" "
}, true);
@@ -49604,8 +48160,8 @@ Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, {
this.setStyle("visibility", "hidden");
};
this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
-
-
+
+
Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom);
},
@@ -49644,8 +48200,8 @@ Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, {
positionIndicator : function(h, n, e){
var x = Ext.lib.Event.getPageX(e),
r = Ext.lib.Dom.getRegion(n.firstChild),
- px,
- pt,
+ px,
+ pt,
py = r.top + this.proxyOffsets[1];
if((r.right - x) <= (r.right-r.left)/2){
px = r.right+this.view.borderWidth;
@@ -49716,12 +48272,12 @@ Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, {
});
Ext.grid.GridView.ColumnDragZone = Ext.extend(Ext.grid.HeaderDragZone, {
-
+
constructor : function(grid, hd){
Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null);
this.proxy.el.addClass('x-grid3-col-dd');
},
-
+
handleMouseDown : function(e){
},
@@ -49732,7 +48288,7 @@ Ext.grid.GridView.ColumnDragZone = Ext.extend(Ext.grid.HeaderDragZone, {
Ext.grid.SplitDragZone = Ext.extend(Ext.dd.DDProxy, {
fly: Ext.Element.fly,
-
+
constructor : function(grid, hd, hd2){
this.grid = grid;
this.view = grid.getView();
@@ -49792,14 +48348,14 @@ Ext.grid.GridDragZone = function(grid, config){
this.grid = grid;
this.ddel = document.createElement('div');
this.ddel.className = 'x-grid-dd-wrap';
-
+
this.preventDefault = true;
};
Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
ddGroup : "GridDD",
-
+
getDragData : function(e){
var t = Ext.lib.Event.getTarget(e),
sm,
@@ -49811,8 +48367,8 @@ Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
if (rowIndex !== false){
sm = this.grid.selModel;
-
-
+
+
if (sm.getSelectedCell) {
cellIndex = this.view.findCellIndex(t);
selectedCell = sm.getSelectedCell();
@@ -49820,13 +48376,13 @@ Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
sm.handleMouseDown(this.grid, rowIndex, cellIndex, e);
}
if (this.grid.dragCell) {
-
+
selection = sm.getSelectedCell();
if (!this.grid.hasOwnProperty('ddText')) {
this.grid.ddText = '{0} selected cell{1}';
}
} else {
-
+
selection = [this.grid.store.getAt(rowIndex)];
}
} else {
@@ -49840,30 +48396,30 @@ Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
return false;
},
-
+
onInitDrag : function(e){
var data = this.dragData;
this.ddel.innerHTML = this.grid.getDragDropText();
this.proxy.update(this.ddel);
-
+
},
-
+
afterRepair : function(){
this.dragging = false;
},
-
+
getRepairXY : function(e, data){
return false;
},
onEndDrag : function(data, e){
-
+
},
onValidDrop : function(dd, e, id){
-
+
this.hideProxy();
},
@@ -49873,46 +48429,46 @@ Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, {
});
Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
-
+
defaultWidth: 100,
-
+
defaultSortable: false,
-
-
+
+
constructor : function(config) {
-
+
if (config.columns) {
Ext.apply(this, config);
this.setConfig(config.columns, true);
} else {
this.setConfig(config, true);
}
-
+
this.addEvents(
-
+
"widthchange",
-
-
+
+
"headerchange",
-
-
+
+
"hiddenchange",
-
-
+
+
"columnmoved",
-
-
+
+
"configchange"
);
-
+
Ext.grid.ColumnModel.superclass.constructor.call(this);
},
-
+
getColumnId : function(index) {
return this.config[index].id;
},
@@ -49921,24 +48477,24 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
return this.config[index];
},
-
+
setConfig : function(config, initial) {
var i, c, len;
-
- if (!initial) {
+
+ if (!initial) {
delete this.totalWidth;
-
+
for (i = 0, len = this.config.length; i < len; i++) {
c = this.config[i];
-
+
if (c.setEditor) {
-
+
c.setEditor(null);
}
}
}
-
+
this.defaults = Ext.apply({
width: this.defaultWidth,
sortable: this.defaultSortable
@@ -49949,32 +48505,32 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
for (i = 0, len = config.length; i < len; i++) {
c = Ext.applyIf(config[i], this.defaults);
-
-
+
+
if (Ext.isEmpty(c.id)) {
c.id = i;
}
-
+
if (!c.isColumn) {
var Cls = Ext.grid.Column.types[c.xtype || 'gridcolumn'];
c = new Cls(c);
config[i] = c;
}
-
+
this.lookup[c.id] = c;
}
-
+
if (!initial) {
this.fireEvent('configchange', this);
}
},
-
+
getColumnById : function(id) {
return this.lookup[id];
},
-
+
getIndexById : function(id) {
for (var i = 0, len = this.config.length; i < len; i++) {
if (this.config[i].id == id) {
@@ -49984,65 +48540,65 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
return -1;
},
-
+
moveColumn : function(oldIndex, newIndex) {
var config = this.config,
c = config[oldIndex];
-
+
config.splice(oldIndex, 1);
config.splice(newIndex, 0, c);
this.dataMap = null;
this.fireEvent("columnmoved", this, oldIndex, newIndex);
},
-
+
getColumnCount : function(visibleOnly) {
var length = this.config.length,
c = 0,
i;
-
+
if (visibleOnly === true) {
for (i = 0; i < length; i++) {
if (!this.isHidden(i)) {
c++;
}
}
-
+
return c;
}
-
+
return length;
},
-
+
getColumnsBy : function(fn, scope) {
var config = this.config,
length = config.length,
result = [],
i, c;
-
+
for (i = 0; i < length; i++){
c = config[i];
-
+
if (fn.call(scope || this, c, i) === true) {
result[result.length] = c;
}
}
-
+
return result;
},
-
+
isSortable : function(col) {
return !!this.config[col].sortable;
},
-
+
isMenuDisabled : function(col) {
return !!this.config[col].menuDisabled;
},
-
+
getRenderer : function(col) {
return this.config[col].renderer || Ext.grid.ColumnModel.defaultRenderer;
},
@@ -50051,12 +48607,12 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
return this.config[col].scope;
},
-
+
setRenderer : function(col, fn) {
this.config[col].renderer = fn;
},
-
+
getColumnWidth : function(col) {
var width = this.config[col].width;
if(typeof width != 'number'){
@@ -50065,17 +48621,17 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
return width;
},
-
+
setColumnWidth : function(col, width, suppressEvent) {
this.config[col].width = width;
this.totalWidth = null;
-
+
if (!suppressEvent) {
this.fireEvent("widthchange", this, col, width);
}
},
-
+
getTotalWidth : function(includeHidden) {
if (!this.totalWidth) {
this.totalWidth = 0;
@@ -50088,37 +48644,37 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
return this.totalWidth;
},
-
+
getColumnHeader : function(col) {
return this.config[col].header;
},
-
+
setColumnHeader : function(col, header) {
this.config[col].header = header;
this.fireEvent("headerchange", this, col, header);
},
-
+
getColumnTooltip : function(col) {
return this.config[col].tooltip;
},
-
+
setColumnTooltip : function(col, tooltip) {
this.config[col].tooltip = tooltip;
},
-
+
getDataIndex : function(col) {
return this.config[col].dataIndex;
},
-
+
setDataIndex : function(col, dataIndex) {
this.config[col].dataIndex = dataIndex;
},
-
+
findColumnIndex : function(dataIndex) {
var c = this.config;
for(var i = 0, len = c.length; i < len; i++){
@@ -50129,41 +48685,41 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
return -1;
},
-
+
isCellEditable : function(colIndex, rowIndex) {
var c = this.config[colIndex],
ed = c.editable;
-
+
return !!(ed || (!Ext.isDefined(ed) && c.editor));
},
-
+
getCellEditor : function(colIndex, rowIndex) {
return this.config[colIndex].getCellEditor(rowIndex);
},
-
+
setEditable : function(col, editable) {
this.config[col].editable = editable;
},
-
+
isHidden : function(colIndex) {
- return !!this.config[colIndex].hidden;
+ return !!this.config[colIndex].hidden;
},
-
+
isFixed : function(colIndex) {
return !!this.config[colIndex].fixed;
},
-
+
isResizable : function(colIndex) {
return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true;
},
-
-
+
+
setHidden : function(colIndex, hidden) {
var c = this.config[colIndex];
if(c.hidden !== hidden){
@@ -50173,25 +48729,25 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, {
}
},
-
+
setEditor : function(col, editor) {
this.config[col].setEditor(editor);
},
-
+
destroy : function() {
var length = this.config.length,
i = 0;
for (; i < length; i++){
- this.config[i].destroy();
+ this.config[i].destroy();
}
delete this.config;
delete this.lookup;
this.purgeListeners();
},
-
+
setState : function(col, state) {
state = Ext.applyIf(state, this.defaults);
Ext.apply(this.config[col], state);
@@ -50206,14 +48762,14 @@ Ext.grid.ColumnModel.defaultRenderer = function(value) {
return value;
};
Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable, {
-
+
constructor : function(){
this.locked = false;
Ext.grid.AbstractSelectionModel.superclass.constructor.call(this);
},
-
+
init : function(grid){
this.grid = grid;
if(this.lockOnInit){
@@ -50224,11 +48780,11 @@ Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable, {
this.initEvents();
},
-
+
lock : function(){
if(!this.locked){
this.locked = true;
-
+
var g = this.grid;
if(g){
g.getView().on({
@@ -50242,35 +48798,35 @@ Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable, {
}
},
-
+
sortLock : function() {
this.locked = true;
},
-
+
sortUnLock : function() {
this.locked = false;
},
-
+
unlock : function(){
if(this.locked){
this.locked = false;
var g = this.grid,
gv;
-
-
+
+
if(g){
gv = g.getView();
gv.un('beforerefresh', this.sortUnLock, this);
- gv.un('refresh', this.sortLock, this);
+ gv.un('refresh', this.sortLock, this);
}else{
delete this.lockOnInit;
}
}
},
-
+
isLocked : function(){
return this.locked;
},
@@ -50281,9 +48837,9 @@ Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable, {
}
});
Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
-
+
singleSelect : false,
-
+
constructor : function(config){
Ext.apply(this, config);
this.selections = new Ext.util.MixedCollection(false, function(o){
@@ -50294,20 +48850,20 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
this.lastActive = false;
this.addEvents(
-
+
'selectionchange',
-
+
'beforerowselect',
-
+
'rowselect',
-
+
'rowdeselect'
);
Ext.grid.RowSelectionModel.superclass.constructor.call(this);
},
-
-
+
+
initEvents : function(){
if(!this.grid.enableDragDrop && !this.grid.enableDrag){
@@ -50315,7 +48871,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), {
- up: this.onKeyPress,
+ up: this.onKeyPress,
down: this.onKeyPress,
scope: this
});
@@ -50327,7 +48883,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
rowremoved: this.onRemove
});
},
-
+
onKeyPress : function(e, name){
var up = name == 'up',
method = up ? 'selectPrevious' : 'selectNext',
@@ -50347,14 +48903,14 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
onRefresh : function(){
var ds = this.grid.store,
s = this.getSelections(),
i = 0,
- len = s.length,
+ len = s.length,
index, r;
-
+
this.silent = true;
this.clearSelections(true);
for(; i < len; i++){
@@ -50369,21 +48925,21 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
this.silent = false;
},
-
+
onRemove : function(v, index, r){
if(this.selections.remove(r) !== false){
this.fireEvent('selectionchange', this);
}
},
-
+
onRowUpdated : function(v, index, r){
if(this.isSelected(r)){
v.onRowSelect(index);
}
},
-
+
selectRecords : function(records, keepExisting){
if(!keepExisting){
this.clearSelections();
@@ -50396,22 +48952,22 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
getCount : function(){
return this.selections.length;
},
-
+
selectFirstRow : function(){
this.selectRow(0);
},
-
+
selectLastRow : function(keepExisting){
this.selectRow(this.grid.store.getCount() - 1, keepExisting);
},
-
+
selectNext : function(keepExisting){
if(this.hasNext()){
this.selectRow(this.last+1, keepExisting);
@@ -50421,7 +48977,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
return false;
},
-
+
selectPrevious : function(keepExisting){
if(this.hasPrevious()){
this.selectRow(this.last-1, keepExisting);
@@ -50431,33 +48987,33 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
return false;
},
-
+
hasNext : function(){
return this.last !== false && (this.last+1) < this.grid.store.getCount();
},
-
+
hasPrevious : function(){
return !!this.last;
},
-
+
getSelections : function(){
return [].concat(this.selections.items);
},
-
+
getSelected : function(){
return this.selections.itemAt(0);
},
-
+
each : function(fn, scope){
var s = this.getSelections(),
i = 0,
len = s.length;
-
+
for(; i < len; i++){
if(fn.call(scope || this, s[i], i) === false){
return false;
@@ -50466,7 +49022,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
return true;
},
-
+
clearSelections : function(fast){
if(this.isLocked()){
return;
@@ -50485,7 +49041,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
},
-
+
selectAll : function(){
if(this.isLocked()){
return;
@@ -50496,23 +49052,23 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
hasSelection : function(){
return this.selections.length > 0;
},
-
+
isSelected : function(index){
var r = Ext.isNumber(index) ? this.grid.store.getAt(index) : index;
return (r && this.selections.key(r.id) ? true : false);
},
-
+
isIdSelected : function(id){
return (this.selections.key(id) ? true : false);
},
-
+
handleMouseDown : function(g, rowIndex, e){
if(e.button !== 0 || this.isLocked()){
return;
@@ -50521,7 +49077,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
if(e.shiftKey && !this.singleSelect && this.last !== false){
var last = this.last;
this.selectRange(last, rowIndex, e.ctrlKey);
- this.last = last;
+ this.last = last;
view.focusRow(rowIndex);
}else{
var isSelected = this.isSelected(rowIndex);
@@ -50534,7 +49090,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
selectRows : function(rows, keepExisting){
if(!keepExisting){
this.clearSelections();
@@ -50544,7 +49100,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
selectRange : function(startRow, endRow, keepExisting){
var i;
if(this.isLocked()){
@@ -50564,7 +49120,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
deselectRange : function(startRow, endRow, preventViewNotify){
if(this.isLocked()){
return;
@@ -50574,7 +49130,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
selectRow : function(index, keepExisting, preventViewNotify){
if(this.isLocked() || (index < 0 || index >= this.grid.store.getCount()) || (keepExisting && this.isSelected(index))){
return;
@@ -50596,7 +49152,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
deselectRow : function(index, preventViewNotify){
if(this.isLocked()){
return;
@@ -50618,21 +49174,21 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
acceptsNav : function(row, col, cm){
return !cm.isHidden(col) && cm.isCellEditable(col, row);
},
-
+
onEditorKey : function(field, e){
- var k = e.getKey(),
- newCell,
- g = this.grid,
+ var k = e.getKey(),
+ newCell,
+ g = this.grid,
last = g.lastEdit,
ed = g.activeEditor,
shift = e.shiftKey,
ae, last, r, c;
-
+
if(k == e.TAB){
e.stopEvent();
ed.completeEdit();
@@ -50656,23 +49212,23 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
this.onEditorSelect(r, last.row);
- if(g.isEditor && g.editing){
+ if(g.isEditor && g.editing){
ae = g.activeEditor;
if(ae && ae.field.triggerBlur){
-
+
ae.field.triggerBlur();
}
}
g.startEditing(r, c);
}
},
-
+
onEditorSelect: function(row, lastRow){
if(lastRow != row){
- this.selectRow(row);
+ this.selectRow(row);
}
},
-
+
destroy : function(){
Ext.destroy(this.rowNav);
this.rowNav = null;
@@ -50681,30 +49237,30 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
});
Ext.grid.Column = Ext.extend(Ext.util.Observable, {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
isColumn : true,
constructor : function(config){
@@ -50724,24 +49280,24 @@ Ext.grid.Column = Ext.extend(Ext.util.Observable, {
delete this.editor;
this.setEditor(ed);
this.addEvents(
-
+
'click',
-
+
'contextmenu',
-
+
'dblclick',
-
+
'mousedown'
);
Ext.grid.Column.superclass.constructor.call(this);
},
-
+
processEvent : function(name, e, grid, rowIndex, colIndex){
return this.fireEvent(name, this, grid, rowIndex, e);
},
-
+
destroy: function() {
if(this.setEditor){
this.setEditor(null);
@@ -50749,17 +49305,17 @@ Ext.grid.Column = Ext.extend(Ext.util.Observable, {
this.purgeListeners();
},
-
+
renderer : function(value){
return value;
},
-
+
getEditor: function(rowIndex){
return this.editable !== false ? this.editor : null;
},
-
+
setEditor : function(editor){
var ed = this.editor;
if(ed){
@@ -50772,7 +49328,7 @@ Ext.grid.Column = Ext.extend(Ext.util.Observable, {
}
this.editor = null;
if(editor){
-
+
if(!editor.isXType){
editor = Ext.create(editor, 'textfield');
}
@@ -50780,7 +49336,7 @@ Ext.grid.Column = Ext.extend(Ext.util.Observable, {
}
},
-
+
getCellEditor: function(rowIndex){
var ed = this.getEditor(rowIndex);
if(ed){
@@ -50797,11 +49353,11 @@ Ext.grid.Column = Ext.extend(Ext.util.Observable, {
Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, {
-
+
trueText: 'true',
-
+
falseText: 'false',
-
+
undefinedText: ' ',
constructor: function(cfg){
@@ -50821,7 +49377,7 @@ Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, {
Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, {
-
+
format : '0,000.00',
constructor: function(cfg){
Ext.grid.NumberColumn.superclass.constructor.call(this, cfg);
@@ -50831,7 +49387,7 @@ Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, {
Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, {
-
+
format : 'm/d/Y',
constructor: function(cfg){
Ext.grid.DateColumn.superclass.constructor.call(this, cfg);
@@ -50841,7 +49397,7 @@ Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, {
Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, {
-
+
constructor: function(cfg){
Ext.grid.TemplateColumn.superclass.constructor.call(this, cfg);
var tpl = (!Ext.isPrimitive(this.tpl) && this.tpl.compile) ? this.tpl : new Ext.XTemplate(this.tpl);
@@ -50854,19 +49410,19 @@ Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, {
Ext.grid.ActionColumn = Ext.extend(Ext.grid.Column, {
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
header: ' ',
actionIdRe: /x-action-col-(\d+)/,
-
-
+
+
altText: '',
constructor: function(cfg) {
@@ -50902,7 +49458,7 @@ Ext.grid.ActionColumn = Ext.extend(Ext.grid.Column, {
return Ext.grid.ActionColumn.superclass.destroy.apply(this, arguments);
},
-
+
processEvent : function(name, e, grid, rowIndex, colIndex){
var m = e.getTarget().className.match(this.actionIdRe),
item, fn;
@@ -50927,13 +49483,13 @@ Ext.grid.Column.types = {
actioncolumn: Ext.grid.ActionColumn
};
Ext.grid.RowNumberer = Ext.extend(Object, {
-
+
header: "",
-
+
width: 23,
-
+
sortable: false,
-
+
constructor : function(config){
Ext.apply(this, config);
if(this.rowspan){
@@ -50941,7 +49497,7 @@ Ext.grid.RowNumberer = Ext.extend(Object, {
}
},
-
+
fixed:true,
hideable: false,
menuDisabled:true,
@@ -50949,7 +49505,7 @@ Ext.grid.RowNumberer = Ext.extend(Object, {
id: 'numberer',
rowspan: undefined,
-
+
renderer : function(v, p, record, rowIndex){
if(this.rowspan){
p.cellAttr = 'rowspan="'+this.rowspan+'"';
@@ -50959,21 +49515,21 @@ Ext.grid.RowNumberer = Ext.extend(Object, {
});
Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
-
-
+
+
header : '
',
-
+
width : 20,
-
+
sortable : false,
-
+
menuDisabled : true,
fixed : true,
hideable: false,
dataIndex : '',
id : 'checker',
- isColumn: true,
+ isColumn: true,
constructor : function(){
Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments);
@@ -50982,7 +49538,7 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
}
},
-
+
initEvents : function(){
Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);
this.grid.on('render', function(){
@@ -50990,7 +49546,7 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
}, this);
},
-
+
processEvent : function(name, e, grid, rowIndex, colIndex){
if (name == 'mousedown') {
this.onMouseDown(e, e.getTarget());
@@ -51000,9 +49556,9 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
}
},
-
+
onMouseDown : function(e, t){
- if(e.button === 0 && t.className == 'x-grid3-row-checker'){
+ if(e.button === 0 && t.className == 'x-grid3-row-checker'){
e.stopEvent();
var row = e.getTarget('.x-grid3-row');
if(row){
@@ -51017,7 +49573,7 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
}
},
-
+
onHdMouseDown : function(e, t) {
if(t.className == 'x-grid3-hd-checker'){
e.stopEvent();
@@ -51033,37 +49589,37 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, {
}
},
-
+
renderer : function(v, p, record){
return '
';
},
-
+
onEditorSelect: function(row, lastRow){
if(lastRow != row && !this.checkOnly){
- this.selectRow(row);
+ this.selectRow(row);
}
}
});
Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
-
+
constructor : function(config){
Ext.apply(this, config);
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);
@@ -51079,29 +49635,29 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
beforeEdit : function(e){
this.select(e.row, e.column, false, true, e.record);
},
-
+
onRowUpdated : function(v, index, r){
if(this.selection && this.selection.record == r){
v.onCellSelect(index, this.selection.cell[1]);
}
},
-
+
onViewChange : function(){
this.clearSelections(true);
},
-
+
getSelectedCell : function(){
return this.selection ? this.selection.cell : null;
},
-
+
clearSelections : function(preventNotify){
var s = this.selection;
if(s){
@@ -51113,12 +49669,12 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
hasSelection : function(){
return this.selection ? true : false;
},
-
+
handleMouseDown : function(g, row, cell, e){
if(e.button !== 0 || this.isLocked()){
return;
@@ -51126,7 +49682,7 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
this.select(row, cell);
},
-
+
select : function(rowIndex, colIndex, preventViewNotify, preventFocus, r){
if(this.fireEvent("beforecellselect", this, rowIndex, colIndex) !== false){
this.clearSelections();
@@ -51147,24 +49703,24 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
},
-
+
isSelectable : function(rowIndex, colIndex, cm){
return !cm.isHidden(colIndex);
},
-
-
+
+
onEditorKey: function(field, e){
if(e.getKey() == e.TAB){
this.handleKeyDown(e);
}
},
-
+
handleKeyDown : function(e){
if(!e.isNavKeyPress()){
return;
}
-
+
var k = e.getKey(),
g = this.grid,
s = this.selection,
@@ -51174,7 +49730,7 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
row,
col,
step,
- g.isEditor && g.editing ? sm.acceptsNav : sm.isSelectable,
+ g.isEditor && g.editing ? sm.acceptsNav : sm.isSelectable,
sm
);
},
@@ -51184,26 +49740,26 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
case e.ESC:
case e.PAGE_UP:
case e.PAGE_DOWN:
-
+
break;
default:
-
+
e.stopEvent();
break;
}
if(!s){
- cell = walk(0, 0, 1);
+ cell = walk(0, 0, 1);
if(cell){
this.select(cell[0], cell[1]);
}
return;
}
- cell = s.cell;
- r = cell[0];
- c = cell[1];
-
+ cell = s.cell;
+ r = cell[0];
+ c = cell[1];
+
switch(k){
case e.TAB:
if(e.shiftKey){
@@ -51233,16 +49789,16 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
if(newCell){
-
+
r = newCell[0];
c = newCell[1];
- this.select(r, c);
+ this.select(r, c);
- if(g.isEditor && g.editing){
+ if(g.isEditor && g.editing){
ae = g.activeEditor;
if(ae && ae.field.triggerBlur){
-
+
ae.field.triggerBlur();
}
g.startEditing(r, c);
@@ -51255,46 +49811,46 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, {
}
});
Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
-
+
clicksToEdit: 2,
-
+
forceValidation: false,
-
+
isEditor : true,
-
+
detectEdit: false,
-
+
autoEncode : false,
-
-
- trackMouseOver: 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);
@@ -51320,12 +49876,12 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
}
},
-
+
onCellDblClick : function(g, row, col){
this.startEditing(row, col);
},
-
+
onAutoEditClick : function(e, t){
if(e.button !== 0){
return;
@@ -51334,7 +49890,7 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
col = this.view.findCellIndex(t);
if(row !== false && col !== false){
this.stopEditing();
- if(this.selModel.getSelectedCell){
+ if(this.selModel.getSelectedCell){
var sc = this.selModel.getSelectedCell();
if(sc && sc[0] === row && sc[1] === col){
this.startEditing(row, col);
@@ -51347,7 +49903,7 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
}
},
-
+
onEditComplete : function(ed, value, startValue){
this.editing = false;
this.lastActiveEditor = this.activeEditor;
@@ -51376,7 +49932,7 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
this.view.focusCell(ed.row, ed.col);
},
-
+
startEditing : function(row, col){
this.stopEditing();
if(this.colModel.isCellEditable(col, row)){
@@ -51428,22 +49984,22 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
this.activeEditor = ed;
if (ed.field.isXType('checkbox')) {
ed.allowBlur = false;
- this.setupCheckbox(ed.field);
+ this.setupCheckbox(ed.field);
}
-
-
+
+
ed.selectSameEditor = (this.activeEditor == this.lastActiveEditor);
var v = this.preEditValue(r, field);
ed.startEdit(this.view.getCell(row, col).firstChild, Ext.isDefined(v) ? v : '');
-
+
(function(){
delete ed.selectSameEditor;
}).defer(50);
}
}
},
-
+
setupCheckbox: function(field){
var me = this,
fn = function() {
@@ -51455,28 +50011,28 @@ Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, {
field.on('render', fn, null, {single: true});
}
},
-
+
onCheckClick: function(){
var ed = this.activeEditor;
ed.allowBlur = true;
- ed.field.focus(false, 10);
+ ed.field.focus(false, 10);
},
-
+
preEditValue : function(r, field){
var value = r.data[field];
return this.autoEncode && Ext.isString(value) ? Ext.util.Format.htmlDecode(value) : value;
},
-
+
postEditValue : function(value, originalValue, r, field){
return this.autoEncode && Ext.isString(value) ? Ext.util.Format.htmlEncode(value) : value;
},
-
+
stopEditing : function(cancel){
if(this.editing){
-
+
var ae = this.lastActiveEditor = this.activeEditor;
if(ae){
ae[cancel === true ? 'cancelEdit' : 'completeEdit']();
@@ -51508,7 +50064,7 @@ Ext.grid.PropertyRecord = Ext.data.Record.create([
Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, {
-
+
constructor : function(grid, source){
this.grid = grid;
this.store = new Ext.data.Store({
@@ -51518,10 +50074,10 @@ Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, {
if(source){
this.setSource(source);
}
- Ext.grid.PropertyStore.superclass.constructor.call(this);
+ Ext.grid.PropertyStore.superclass.constructor.call(this);
},
-
-
+
+
setSource : function(o){
this.source = o;
this.store.removeAll();
@@ -51534,7 +50090,7 @@ Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, {
this.store.loadRecords({records: data}, {}, true);
},
-
+
onUpdate : function(ds, record, type){
if(type == Ext.data.Record.EDIT){
var v = record.data.value;
@@ -51549,32 +50105,32 @@ Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, {
}
},
-
+
getProperty : function(row){
return this.store.getAt(row);
},
-
+
isEditableValue: function(val){
return Ext.isPrimitive(val) || Ext.isDate(val);
},
-
+
setValue : function(prop, value, create){
var r = this.getRec(prop);
if(r){
r.set('value', value);
this.source[prop] = value;
}else if(create){
-
+
this.source[prop] = value;
r = new Ext.grid.PropertyRecord({name: prop, value: value}, prop);
this.store.add(r);
}
},
-
-
+
+
remove : function(prop){
var r = this.getRec(prop);
if(r){
@@ -51582,13 +50138,13 @@ Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, {
delete this.source[prop];
}
},
-
-
+
+
getRec : function(prop){
return this.store.getById(prop);
},
-
+
getSource : function(){
return this.source;
}
@@ -51596,24 +50152,24 @@ Ext.grid.PropertyStore = Ext.extend(Ext.util.Observable, {
Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, {
-
+
nameText : 'Name',
valueText : 'Value',
dateFormat : 'm/j/Y',
trueText: 'true',
falseText: 'false',
-
+
constructor : function(grid, store){
var g = Ext.grid,
f = Ext.form;
-
+
this.grid = grid;
g.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 = store;
-
+
var bfield = new f.Field({
autoCreate: {tag: 'select', children: [
{tag: 'option', value: 'true', html: this.trueText},
@@ -51635,33 +50191,33 @@ Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, {
this.renderPropDelegate = this.renderProp.createDelegate(this);
},
-
+
renderDate : function(dateVal){
return dateVal.dateFormat(this.dateFormat);
},
-
+
renderBool : function(bVal){
return this[bVal ? 'trueText' : 'falseText'];
},
-
+
isCellEditable : function(colIndex, rowIndex){
return colIndex == 1;
},
-
+
getRenderer : function(col){
return col == 1 ?
this.renderCellDelegate : this.renderPropDelegate;
},
-
+
renderProp : function(v){
return this.getPropertyName(v);
},
-
+
renderCell : function(val, meta, rec){
var renderer = this.grid.customRenderers[rec.get('name')];
if(renderer){
@@ -51676,16 +50232,16 @@ Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, {
return Ext.util.Format.htmlEncode(rv);
},
-
+
getPropertyName : function(name){
var pn = this.grid.propertyNames;
return pn && pn[name] ? pn[name] : name;
},
-
+
getCellEditor : function(colIndex, rowIndex){
var p = this.store.getProperty(rowIndex),
- n = p.data.name,
+ n = p.data.name,
val = p.data.value;
if(this.grid.customEditors[n]){
return this.grid.customEditors[n];
@@ -51701,13 +50257,13 @@ Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, {
}
},
-
+
destroy : function(){
Ext.grid.PropertyColumnModel.superclass.destroy.call(this);
this.destroyEditors(this.editors);
this.destroyEditors(this.grid.customEditors);
},
-
+
destroyEditors: function(editors){
for(var ed in editors){
Ext.destroy(editors[ed]);
@@ -51717,12 +50273,12 @@ Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, {
Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
-
-
-
-
-
+
+
+
+
+
enableColumnMove:false,
stripeRows:false,
trackMouseOver: false,
@@ -51732,7 +50288,7 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
forceFit:true
},
-
+
initComponent : function(){
this.customRenderers = this.customRenderers || {};
this.customEditors = this.customEditors || {};
@@ -51742,9 +50298,9 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
var cm = new Ext.grid.PropertyColumnModel(this, store);
store.store.sort('name', 'ASC');
this.addEvents(
-
+
'beforepropertychange',
-
+
'propertychange'
);
this.cm = cm;
@@ -51759,14 +50315,14 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
}, 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){
@@ -51774,67 +50330,67 @@ Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, {
}
},
-
+
setSource : function(source){
this.propStore.setSource(source);
},
-
+
getSource : function(){
return this.propStore.getSource();
},
-
-
+
+
setProperty : function(prop, value, create){
- this.propStore.setValue(prop, value, create);
+ this.propStore.setValue(prop, value, create);
},
-
-
+
+
removeProperty : function(prop){
this.propStore.remove(prop);
}
-
-
-
-
+
+
+
+
});
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 = {};
@@ -51857,17 +50413,17 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
findGroup : function(el){
return Ext.fly(el).up('.x-grid-group', this.mainBody.dom);
},
-
+
getGroups : function(){
return this.hasRows() ? this.mainBody.dom.childNodes : [];
},
-
+
onAdd : function(ds, records, index) {
if (this.canGroup() && !this.ignoreAdd) {
var ss = this.getScrollState();
@@ -51880,7 +50436,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
onRemove : function(ds, record, index, isUpdate){
Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments);
var g = document.getElementById(record._groupId);
@@ -51890,7 +50446,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
this.applyEmptyText();
},
-
+
refreshRow : function(record){
if(this.ds.getCount()==1){
this.refresh();
@@ -51901,7 +50457,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
beforeMenuShow : function(){
var item, items = this.hmenu.items, disabled = this.cm.config[this.hdCtxIndex].groupable === false;
if((item = items.get('groupBy'))){
@@ -51913,7 +50469,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
renderUI : function(){
var markup = Ext.grid.GroupingView.superclass.renderUI.call(this);
@@ -51943,16 +50499,16 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
if(hd){
-
+
var field = this.getGroupField(),
prefix = this.getPrefix(field),
groupValue = hd.id.substring(prefix.length),
emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd');
-
+
groupValue = groupValue.substr(0, groupValue.length - 3);
-
-
+
+
if(groupValue || emptyRe.test(hd.id)){
this.grid.fireEvent('group' + name, this.grid, field, groupValue, e);
}
@@ -51963,17 +50519,17 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
},
-
+
onGroupByClick : function(){
var grid = this.grid;
this.enableGrouping = true;
grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));
grid.fireEvent('groupchange', grid, grid.store.getGroupState());
- this.beforeMenuShow();
+ this.beforeMenuShow();
this.refresh();
},
-
+
onShowGroupsClick : function(mi, checked){
this.enableGrouping = checked;
if(checked){
@@ -51984,7 +50540,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
toggleRowIndex : function(rowIndex, expanded){
if(!this.canGroup()){
return;
@@ -51995,11 +50551,11 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
toggleGroup : function(group, expanded){
var gel = Ext.get(group),
id = Ext.util.Format.htmlEncode(gel.id);
-
+
expanded = Ext.isDefined(expanded) ? expanded : gel.hasClass('x-grid-group-collapsed');
if(this.state[id] !== expanded){
if (this.cancelEditOnToggle !== false) {
@@ -52010,7 +50566,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
toggleAllGroups : function(expanded){
var groups = this.getGroups();
for(var i = 0, len = groups.length; i < len; i++){
@@ -52018,17 +50574,17 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
expandAllGroups : function(){
this.toggleAllGroups(true);
},
-
+
collapseAllGroups : function(){
this.toggleAllGroups(false);
},
-
+
getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){
var column = this.cm.config[colIndex],
g = groupRenderer ? groupRenderer.call(column.scope, v, {}, r, rowIndex, colIndex, ds) : String(v);
@@ -52038,12 +50594,12 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
return g;
},
-
+
getGroupField : function(){
return this.grid.store.getGroupState();
},
-
+
afterRender : function(){
if(!this.ds || !this.cm){
return;
@@ -52053,7 +50609,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
this.updateGroupWidths();
}
},
-
+
afterRenderUI: function () {
Ext.grid.GroupingView.superclass.afterRenderUI.call(this);
@@ -52065,7 +50621,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
scope: this,
iconCls:'x-group-by-icon'
});
-
+
if (this.enableNoGroups) {
this.hmenu.add({
itemId:'showGroups',
@@ -52075,16 +50631,16 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
scope: this
});
}
-
+
this.hmenu.on('beforeshow', this.beforeMenuShow, this);
}
},
-
+
renderRows : function(){
var groupField = this.getGroupField();
var eg = !!groupField;
-
+
if(this.hideGroupedColumn) {
var colIndex = this.cm.findColumnIndex(groupField),
hasLastGroupField = Ext.isDefined(this.lastGroupField);
@@ -52107,7 +50663,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
this, arguments);
},
-
+
doRender : function(cs, rs, ds, startRow, colCount, stripe){
if(rs.length < 1){
return '';
@@ -52135,8 +50691,8 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds);
if(!curGroup || curGroup.group != g){
gid = this.constructId(gvalue, groupField, colIndex);
-
-
+
+
this.state[gid] = !(Ext.isDefined(this.state[gid]) ? !this.state[gid] : this.startCollapsed);
curGroup = {
group: g,
@@ -52167,13 +50723,13 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
return buf.join('');
},
-
+
getGroupId : function(value){
var field = this.getGroupField();
return this.constructId(value, field, this.cm.findColumnIndex(field));
},
-
+
constructId : function(value, field, idx){
var cfg = this.cm.config[idx],
groupRenderer = cfg.groupRenderer || cfg.renderer,
@@ -52182,27 +50738,27 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
return this.getPrefix(field) + Ext.util.Format.htmlEncode(val);
},
-
+
canGroup : function(){
return this.enableGrouping && !!this.getGroupField();
},
-
+
getPrefix: function(field){
return this.grid.getGridEl().id + '-gp-' + field + '-';
},
-
+
doGroupStart : function(buf, g, cs, ds, colCount){
buf[buf.length] = this.startGroup.apply(g);
},
-
+
doGroupEnd : function(buf, g, cs, ds, colCount){
buf[buf.length] = this.endGroup;
},
-
+
getRows : function(){
if(!this.canGroup()){
return Ext.grid.GroupingView.superclass.getRows.call(this);
@@ -52226,7 +50782,7 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
return r;
},
-
+
updateGroupWidths : function(){
if(!this.canGroup() || !this.hasRows()){
return;
@@ -52238,30 +50794,30 @@ Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, {
}
},
-
+
onColumnWidthUpdated : function(col, w, tw){
Ext.grid.GroupingView.superclass.onColumnWidthUpdated.call(this, col, w, tw);
this.updateGroupWidths();
},
-
+
onAllColumnWidthsUpdated : function(ws, tw){
Ext.grid.GroupingView.superclass.onAllColumnWidthsUpdated.call(this, ws, tw);
this.updateGroupWidths();
},
-
+
onColumnHiddenUpdated : function(col, hidden, tw){
Ext.grid.GroupingView.superclass.onColumnHiddenUpdated.call(this, col, hidden, tw);
this.updateGroupWidths();
},
-
+
onLayout : function(){
this.updateGroupWidths();
},
-
+
onBeforeRowSelect : function(sm, rowIndex){
this.toggleRowIndex(rowIndex, true);
}
diff --git a/manager/assets/ext3/ext-all.js b/manager/assets/ext3/ext-all.js
index 7f80d86f8cc..d2d14b407fc 100644
--- a/manager/assets/ext3/ext-all.js
+++ b/manager/assets/ext3/ext-all.js
@@ -1,5 +1,5 @@
/*
-This file is part of Ext JS 3.4
+This file is part of Ext JS 3.4 (without the flash based components)
Copyright (c) 2011-2013 Sencha Inc
@@ -16,6 +16,6 @@ requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
-Build date: 2013-04-03 15:07:25
+Build date: 2020-10-28 16:35:00
*/
-(function(){var h=Ext.util,j=Ext.each,g=true,i=false;h.Observable=function(){var k=this,l=k.events;if(k.listeners){k.on(k.listeners);delete k.listeners}k.events=l||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var k=Array.prototype.slice.call(arguments,0),m=k[0].toLowerCase(),n=this,l=g,p=n.events[m],s,o,r;if(n.eventsSuspended===g){if(o=n.eventQueue){o.push(k)}}else{if(typeof p=="object"){if(p.bubble){if(p.fire.apply(p,k.slice(1))===i){return i}r=n.getBubbleTarget&&n.getBubbleTarget();if(r&&r.enableBubble){s=r.events[m];if(!s||typeof s!="object"||!s.bubble){r.enableBubble(m)}return r.fireEvent.apply(r,k)}}else{k.shift();l=p.fire.apply(p,k)}}}return l},addListener:function(k,m,l,r){var n=this,q,s,p;if(typeof k=="object"){r=k;for(q in r){s=r[q];if(!n.filterOptRe.test(q)){n.addListener(q,s.fn||s,s.scope||r.scope,s.fn?s:r)}}}else{k=k.toLowerCase();p=n.events[k]||g;if(typeof p=="boolean"){n.events[k]=p=new h.Event(n,k)}p.addListener(m,l,typeof r=="object"?r:{})}},removeListener:function(k,m,l){var n=this.events[k.toLowerCase()];if(typeof n=="object"){n.removeListener(m,l)}},purgeListeners:function(){var m=this.events,k,l;for(l in m){k=m[l];if(typeof k=="object"){k.clearListeners()}}},addEvents:function(n){var m=this;m.events=m.events||{};if(typeof n=="string"){var k=arguments,l=k.length;while(l--){m.events[k[l]]=m.events[k[l]]||g}}else{Ext.applyIf(m.events,n)}},hasListener:function(k){var l=this.events[k.toLowerCase()];return typeof l=="object"&&l.listeners.length>0},suspendEvents:function(k){this.eventsSuspended=g;if(k&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var k=this,l=k.eventQueue||[];k.eventsSuspended=i;delete k.eventQueue;j(l,function(m){k.fireEvent.apply(k,m)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(k){k.fireEvent=d.fireEvent};function e(l,m,k){return function(){if(m.target==arguments[0]){l.apply(k,Array.prototype.slice.call(arguments,0))}}}function b(n,p,k,m){k.task=new h.DelayedTask();return function(){k.task.delay(p.buffer,n,m,Array.prototype.slice.call(arguments,0))}}function c(m,n,l,k){return function(){n.removeListener(l,k);return m.apply(k,arguments)}}function a(n,p,k,m){return function(){var l=new h.DelayedTask(),o=Array.prototype.slice.call(arguments,0);if(!k.tasks){k.tasks=[]}k.tasks.push(l);l.delay(p.delay||10,function(){k.tasks.remove(l);n.apply(m,o)},m)}}h.Event=function(l,k){this.name=k;this.obj=l;this.listeners=[]};h.Event.prototype={addListener:function(o,n,m){var p=this,k;n=n||p.obj;if(!p.isListening(o,n)){k=p.createListener(o,n,m);if(p.firing){p.listeners=p.listeners.slice(0)}p.listeners.push(k)}},createListener:function(p,n,q){q=q||{};n=n||this.obj;var k={fn:p,scope:n,options:q},m=p;if(q.target){m=e(m,q,n)}if(q.delay){m=a(m,q,k,n)}if(q.single){m=c(m,this,p,n)}if(q.buffer){m=b(m,q,k,n)}k.fireFn=m;return k},findListener:function(o,n){var p=this.listeners,m=p.length,k;n=n||this.obj;while(m--){k=p[m];if(k){if(k.fn==o&&k.scope==n){return m}}}return -1},isListening:function(l,k){return this.findListener(l,k)!=-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 n=this,k=n.listeners,m=k.length;while(m--){n.removeListener(k[m].fn,k[m].scope)}},fire:function(){var q=this,p=q.listeners,k=p.length,o=0,m;if(k>0){q.firing=g;var n=Array.prototype.slice.call(arguments,0);for(;o
",i="
",b=a+"",j=" "+i,l=b+"",w=" "+j;function h(B,D,C,E,A,y){var z=r.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 "}else{z+=">";if((E=D.children||D.cn)){z+=u(E)}else{if(D.html){z+=D.html}}z+=""+D.tag+">"}}}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,p,"nextSibling")},insertFirst:function(y,A,z){return h(y,A,z,n,"firstChild")},append:function(y,A,z){return h(y,A,z,q,"",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 r}();Ext.Template=function(h){var j=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?(["']?)(.*?)\4)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{5}", "{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,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var h=document;Ext.Element=function(l,m){var n=typeof l=="string"?h.getElementById(l):l,o;if(!n){return null}o=n.id;if(!m&&o&&Ext.elCache[o]){return Ext.elCache[o].el}this.dom=n;this.id=o||Ext.id(n)};var d=Ext.DomHelper,e=Ext.Element,a=Ext.elCache;e.prototype={set:function(q,m){var n=this.dom,l,p,m=(m!==false)&&!!n.setAttribute;for(l in q){if(q.hasOwnProperty(l)){p=q[l];if(l=="style"){d.applyStyles(n,p)}else{if(l=="cls"){n.className=p}else{if(m){n.setAttribute(l,p)}else{n[l]=p}}}}}return this},defaultUnit:"px",is:function(l){return Ext.DomQuery.is(this.dom,l)},focus:function(o,n){var l=this,n=n||l.dom;try{if(Number(o)){l.focus.defer(o,null,[null,n])}else{n.focus()}}catch(m){}return l},blur:function(){try{this.dom.blur()}catch(l){}return this},getValue:function(l){var m=this.dom.value;return l?parseInt(m,10):m},addListener:function(l,o,n,m){Ext.EventManager.on(this.dom,l,o,n||this,m);return this},removeListener:function(l,n,m){Ext.EventManager.removeListener(this.dom,l,n,m||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(l){if(l===""||l=="auto"||l===undefined){l=l||""}else{if(!isNaN(l)||!i.test(l)){l=l+(this.defaultUnit||"px")}}return l},load:function(m,n,l){Ext.Ajax.request(Ext.apply({params:n,url:m.url||m,callback:l,el:this.dom,indicatorText:m.indicatorText||""},Ext.isObject(m)?m:{}));return this},isBorderBox:function(){return Ext.isBorderBox||Ext.isForcedBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var l=this,m=l.dom;if(m){delete l.dom;Ext.removeNode(m)}},hover:function(m,l,o,n){var p=this;p.on("mouseenter",m,o||p.dom,n);p.on("mouseleave",l,o||p.dom,n);return p},contains:function(l){return !l?false:Ext.lib.Dom.isAncestor(this.dom,l.dom?l.dom:l)},getAttributeNS:function(m,l){return this.getAttribute(l,m)},getAttribute:(function(){var p=document.createElement("table"),o=false,m="getAttribute" in p,l=/undefined|unknown/;if(m){try{p.getAttribute("ext:qtip")}catch(n){o=true}return function(q,s){var r=this.dom,t;if(r.getAttributeNS){t=r.getAttributeNS(s,q)||null}if(t==null){if(s){if(o&&r.tagName.toUpperCase()=="TABLE"){try{t=r.getAttribute(s+":"+q)}catch(u){t=""}}else{t=r.getAttribute(s+":"+q)}}else{t=r.getAttribute(q)||r[q]}}return t||""}}else{return function(q,s){var r=this.om,u,t;if(s){t=r[s+":"+q];u=l.test(typeof t)?undefined:t}else{u=r[q]}return u||""}}p=null})(),update:function(l){if(this.dom){this.dom.innerHTML=l}return this}};var k=e.prototype;e.addMethods=function(l){Ext.apply(k,l)};k.on=k.addListener;k.un=k.removeListener;k.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(m){var l,p,o;if(!m){return null}if(typeof m=="string"){if(!(p=h.getElementById(m))){return null}if(a[m]&&a[m].el){l=a[m].el;l.dom=p}else{l=e.addToCache(new e(p))}return l}else{if(m.tagName){if(!(o=m.id)){o=Ext.id(m)}if(a[o]&&a[o].el){l=a[o].el;l.dom=m}else{l=e.addToCache(new e(m))}return l}else{if(m instanceof e){if(m!=c){if(Ext.isIE&&(m.id==undefined||m.id=="")){m.dom=m.dom}else{m.dom=h.getElementById(m.id)||m.dom}}return m}else{if(m.isComposite){return m}else{if(Ext.isArray(m)){return e.select(m)}else{if(m==h){if(!c){var n=function(){};n.prototype=e.prototype;c=new n();c.dom=h}return c}}}}}}return null};e.addToCache=function(l,m){m=m||l.id;a[m]={el:l,data:{},events:{}};return l};e.data=function(m,l,n){m=e.get(m);if(!m){return null}var o=a[m.id].data;if(arguments.length==2){return o[l]}else{return(o[l]=n)}};function j(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var l,n,q,p;for(l in a){p=a[l];if(p.skipGC){Ext.EventManager.removeFromSpecialCache(p.el);continue}n=p.el;q=n.dom;if(!q||!q.parentNode||(!q.offsetParent&&!h.getElementById(l))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}delete a[l]}}if(Ext.isIE){var m={};for(l in a){m[l]=a[l]}a=Ext.elCache=m}}}e.collectorThreadId=setInterval(j,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(l){this.dom=l};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(n,l){var m=null;l=l||"_global";if(n=Ext.getDom(n)){(e._flyweights[l]=e._flyweights[l]||new e.Flyweight()).dom=n;m=e._flyweights[l]}return m};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(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE}while(j&&j.nodeType==1&&k "+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,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[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 A=Ext.supports,h={},x=/(-[a-z])/gi,s=document.defaultView,D=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,B=Ext.Element,u=/\s+/,b=/\w/g,d="padding",c="margin",y="border",t="-left",q="-right",w="-top",o="-bottom",j="-width",r=Math,z="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",C="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+o+j},g={l:d+t,r:d+q,t:d+w,b:d+o},a={l:c+t,r:c+q,t:c+w,b:c+o},E=Ext.Element.data;function p(F,G){return G.charAt(1).toUpperCase()}function v(F){return h[F]||(h[F]=F=="float"?(A.cssFloat?"cssFloat":"styleFloat"):F.replace(x,p))}return{adjustWidth:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("lr")+G.getPadding("lr"))}return(H&&F<0)?0:F},adjustHeight:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("tb")+G.getPadding("tb"))}return(H&&F<0)?0:F},addClass:function(J){var K=this,I,F,H,G=[];if(!Ext.isArray(J)){if(typeof J=="string"&&!this.hasClass(J)){K.dom.className+=" "+J}}else{for(I=0,F=J.length;I5?H.toLowerCase():G)},setStyle:function(I,H){var F,G;if(typeof I!="object"){F={};F[I]=H;I=F}for(G in I){H=I[G];G=="opacity"?this.setOpacity(H):this.dom.style[v(G)]=H}return this},setOpacity:function(G,F){var J=this,H=J.dom.style;if(!F||!J.anim){if(Ext.isIE9m){var I=G<1?"alpha(opacity="+G*100+")":"",K=H.filter.replace(D,"").replace(l,"");H.zoom=1;H.filter=K+(K.length>0?" ":"")+I}else{H.opacity=G}}else{J.anim({opacity:{to:G}},J.preanim(arguments,1),null,0.35,"easeIn")}return J},clearOpacity:function(){var F=this.dom.style;if(Ext.isIE9m){if(!Ext.isEmpty(F.filter)){F.filter=F.filter.replace(D,"").replace(l,"")}}else{F.opacity=F["-moz-opacity"]=F["-khtml-opacity"]=""}return this},getHeight:function(H){var G=this,J=G.dom,I=Ext.isIE9m&&G.isStyle("display","none"),F=r.max(J.offsetHeight,I?0:J.clientHeight)||0;F=!H?F:F-G.getBorderWidth("tb")-G.getPadding("tb");return F<0?0:F},getWidth:function(G){var H=this,J=H.dom,I=Ext.isIE9m&&H.isStyle("display","none"),F=r.max(J.offsetWidth,I?0:J.clientWidth)||0;F=!G?F:F-H.getBorderWidth("lr")-H.getPadding("lr");return F<0?0:F},setWidth:function(G,F){var H=this;G=H.adjustWidth(G);!F||!H.anim?H.dom.style.width=H.addUnits(G):H.anim({width:{to:G}},H.preanim(arguments,1));return H},setHeight:function(F,G){var H=this;F=H.adjustHeight(F);!G||!H.anim?H.dom.style.height=H.addUnits(F):H.anim({height:{to:F}},H.preanim(arguments,1));return H},getBorderWidth:function(F){return this.addStyles(F,i)},getPadding:function(F){return this.addStyles(F,g)},clip:function(){var F=this,G=F.dom;if(!E(G,e)){E(G,e,true);E(G,C,{o:F.getStyle(k),x:F.getStyle(n),y:F.getStyle(m)});F.setStyle(k,z);F.setStyle(n,z);F.setStyle(m,z)}return F},unclip:function(){var F=this,H=F.dom;if(E(H,e)){E(H,e,false);var G=E(H,C);if(G.o){F.setStyle(k,G.o)}if(G.x){F.setStyle(n,G.x)}if(G.y){F.setStyle(m,G.y)}}return F},addStyles:function(M,L){var J=0,K=M.match(b),I,H,G,F=K.length;for(G=0;Ga.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,p="opacity",j="visibility",g="display",d="hidden",n="offsets",k="asclass",m="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,l=function(r){var q=i(r,b);if(q===undefined){i(r,b,q="")}return q},o=function(r){var q=i(r,c);if(q===undefined){i(r,c,q=1)}return q};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(q){i(this.dom,c,q);return this},animate:function(r,t,s,u,q){this.anim(r,{duration:t,callback:s,easing:u},q);return this},anim:function(t,u,r,w,s,q){r=r||"run";u=u||{};var v=this,x=Ext.lib.Anim[r](v.dom,t,(u.duration||w)||0.35,(u.easing||s)||"easeOut",function(){if(q){q.call(v)}if(u.callback){u.callback.call(u.scope||v,v,u)}},v);u.anim=x;return x},preanim:function(q,r){return !q[r]?false:(typeof q[r]=="object"?q[r]:{duration:q[r+1],callback:q[r+2],easing:q[r+3]})},isVisible:function(){var q=this,s=q.dom,r=i(s,h);if(typeof r=="boolean"){return r}r=!q.isStyle(j,d)&&!q.isStyle(g,m)&&!((o(s)==e.ASCLASS)&&q.hasClass(q.visibilityCls||e.visibilityCls));i(s,h,r);return r},setVisible:function(t,q){var w=this,r,y,x,v,u=w.dom,s=o(u);if(typeof q=="string"){switch(q){case g:s=e.DISPLAY;break;case j:s=e.VISIBILITY;break;case n:s=e.OFFSETS;break;case a:case k:s=e.ASCLASS;break}w.setVisibilityMode(s);q=false}if(!q||!w.anim){if(s==e.ASCLASS){w[t?"removeClass":"addClass"](w.visibilityCls||e.visibilityCls)}else{if(s==e.DISPLAY){return w.setDisplayed(t)}else{if(s==e.OFFSETS){if(!t){w.hideModeStyles={position:w.getStyle("position"),top:w.getStyle("top"),left:w.getStyle("left")};w.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{w.applyStyles(w.hideModeStyles||{position:"",top:"",left:""});delete w.hideModeStyles}}else{w.fixDisplay();u.style.visibility=t?"visible":d}}}}else{if(t){w.setOpacity(0.01);w.setVisible(true)}w.anim({opacity:{to:(t?1:0)}},w.preanim(arguments,1),null,0.35,"easeIn",function(){t||w.setVisible(false).setOpacity(1)})}i(u,h,t);return w},hasMetrics:function(){var q=this.dom;return this.isVisible()||(o(q)==e.VISIBILITY)},toggle:function(q){var r=this;r.setVisible(!r.isVisible(),r.preanim(arguments,0));return r},setDisplayed:function(q){if(typeof q=="boolean"){q=q?l(this.dom):m}this.setStyle(g,q);return this},fixDisplay:function(){var q=this;if(q.isStyle(g,m)){q.setStyle(j,d);q.setStyle(g,l(this.dom));if(q.isStyle(g,m)){q.setStyle(g,"block")}}},hide:function(q){if(typeof q=="string"){this.setVisible(false,q);return this}this.setVisible(false,this.preanim(arguments,0));return this},show:function(q){if(typeof q=="string"){this.setVisible(true,q);return this}this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=p(this.dom);if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(C,F,E){var D=this.dom;p(D).clearPositioning();p(D).setPositioning(F);if(!E.wrap){var B=p(C).dom.parentNode;B.insertBefore(D,C);p(C).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,D=B.id;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(C.callback){C.callback.call(C.scope,p(B))}if(!C.concurrent){c(D).shift();p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};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(j){Ext.apply(this,j);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(n){var s=this;if(s.fireEvent(b,s,n)){if(n.el){if(!Ext.isEmpty(n.indicatorText)){s.indicatorText=''+n.indicatorText+"
"}if(s.indicatorText){Ext.getDom(n.el).innerHTML=s.indicatorText}n.success=(Ext.isFunction(n.success)?n.success:function(){}).createInterceptor(function(o){Ext.getDom(n.el).innerHTML=o.responseText})}var l=n.params,k=n.url||s.url,j,q={success:s.handleResponse,failure:s.handleFailure,scope:s,argument:{options:n},timeout:Ext.num(n.timeout,s.timeout)},m,t;if(Ext.isFunction(l)){l=l.call(n.scope||g,n)}l=Ext.urlEncode(s.extraParams,Ext.isObject(l)?Ext.urlEncode(l):l);if(Ext.isFunction(k)){k=k.call(n.scope||g,n)}if((m=Ext.getDom(n.form))){k=k||m.action;if(n.isUpload||(/multipart\/form-data/i.test(m.getAttribute("enctype")))){return s.doFormUpload.call(s,n,l,k)}t=Ext.lib.Ajax.serializeForm(m);l=l?(l+"&"+t):t}j=n.method||s.method||((l||n.xmlData||n.jsonData)?i:a);if(j===a&&(s.disableCaching&&n.disableCaching!==false)||n.disableCaching===true){var r=n.disableCachingParam||s.disableCachingParam;k=Ext.urlAppend(k,r+"="+(new Date().getTime()))}n.headers=Ext.applyIf(n.headers||{},s.defaultHeaders||{});if(n.autoAbort===true||s.autoAbort){s.abort()}if((j==a||n.xmlData||n.jsonData)&&l){k=Ext.urlAppend(k,l);l=""}return(s.transId=Ext.lib.Ajax.request(j,k,q,l,n))}else{return n.callback?n.callback.apply(n.scope,[n,h,h]):null}},isLoading:function(j){return j?Ext.lib.Ajax.isCallInProgress(j):!!this.transId},abort:function(j){if(j||this.isLoading()){Ext.lib.Ajax.abort(j||this.transId)}},handleResponse:function(j){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(e,this,j,k);if(k.success){k.success.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,true,j)}},handleFailure:function(j,l){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(d,this,j,k,l);if(k.failure){k.failure.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,false,j)}},doFormUpload:function(q,j,k){var l=Ext.id(),v=document,r=v.createElement("iframe"),m=Ext.getDom(q.form),u=[],t,p="multipart/form-data",n={target:m.target,method:m.method,encoding:m.encoding,enctype:m.enctype,action:m.action};Ext.fly(r).set({id:l,name:l,cls:"x-hidden",src:Ext.SSL_SECURE_URL});v.body.appendChild(r);if(Ext.isIE){document.frames[l].name=l}Ext.fly(m).set({target:l,method:i,enctype:p,encoding:p,action:k||n.action});Ext.iterate(Ext.urlDecode(j,false),function(w,o){t=v.createElement("input");Ext.fly(t).set({type:"hidden",value:o,name:w});m.appendChild(t);u.push(t)});function s(){var x=this,w={responseText:"",responseXML:null,argument:q.argument},A,z;try{A=r.contentWindow.document||r.contentDocument||g.frames[l].document;if(A){if(A.body){if(/textarea/i.test((z=A.body.firstChild||{}).tagName)){w.responseText=z.value}else{w.responseText=A.body.innerHTML}}w.responseXML=A.XMLDocument||A}}catch(y){}Ext.EventManager.removeListener(r,c,s,x);x.fireEvent(e,x,w,q);function o(D,C,B){if(Ext.isFunction(D)){D.apply(C,B)}}o(q.success,q.scope,[w,q]);o(q.callback,q.scope,[q,true,w]);if(!x.debugUploads){setTimeout(function(){Ext.removeNode(r)},100)}}Ext.EventManager.on(r,c,s,this);m.submit();Ext.fly(m).set(n);Ext.each(u,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 json?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(j,i,k,c){var k=k||this,g=document.getElementsByTagName("head")[0],b=document.createDocumentFragment(),a=j.length,h=0,e=this;var l=function(m){g.appendChild(e.buildScriptTag(j[m],d))};var d=function(){h++;if(a==h&&typeof i=="function"){i.call(k)}else{if(c===true){l(h)}}};if(c===true){l.call(this,0)}else{Ext.each(j,function(n,m){b.appendChild(this.buildScriptTag(n,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.boxOverflow","Ext.app","Ext.ux","Ext.chart","Ext.direct","Ext.slider");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,j=[];for(var h=0;h
h?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(j,k,h){g[(e&&e(j,k,h))||(!e&&j)?0:1].push(j)});return g},invoke:function(d,e){var h=[],g=Array.prototype.slice.call(arguments,2);Ext.each(d,function(j,k){if(j&&typeof j[e]=="function"){h.push(j[e].apply(j,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(m,p,n,q,l,j){m=Ext.getDom(m);var k;if(e.useDom){k=c(p,null);if(j){m.appendChild(k)}else{(l=="firstChild"?m:m.parentNode).insertBefore(k,m[l]||m)}}else{k=Ext.DomHelper.insertHtml(q,m,Ext.DomHelper.createHtml(p))}return n?Ext.get(k,true):k}function c(j,r){var k,u=document,p,s,m,t;if(Ext.isArray(j)){k=u.createDocumentFragment();for(var q=0,n=j.length;q0){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(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if((c=l.apply(k||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[j]=function(){var l=Array.prototype.slice.call(arguments,0),k;d=c=undefined;g=false;for(var m=0,e=i.before.length;m=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{_unload:function(){Ext.EventManager.un(window,"resize",this.fireWindowResize,this);c.call(Ext.EventManager)},doResizeEvent:function(){var m=a.getViewHeight(),l=a.getViewWidth();if(h!=m||i!=l){d.fire(i=l,h=m)}},onWindowResize:function(n,m,l){if(!d){d=new Ext.util.Event();k=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}d.addListener(n,m,l)},fireWindowResize:function(){if(d){k.delay(100)}},onTextResize:function(o,n,l){if(!g){g=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){g.fire(b,b=m.dom.offsetHeight)}},this.textResizeInterval)}g.addListener(o,n,l)},removeResizeListener:function(m,l){if(d){d.removeListener(m,l)}},fireResize:function(){if(d){d.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,getKeyEvent:function(){return e?"keydown":"keypress"},useKeydown:e}}());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=/(?: