Index: openacs-4/packages/ajaxhelper/www/resources/ext2/CHANGELOG.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/CHANGELOG.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/CHANGELOG.txt 4 Dec 2007 02:48:29 -0000 1.1 @@ -0,0 +1,148 @@ +//===================================== +// Ext JS Release Notes +//===================================== +// Release Date: October 11, 2007 +// Current Version: 2.0-beta-1a (rev 1177) +// Previous Version: 2.0-alpha-1 (rev 1032) +//===================================== + +===== Added ===== +src/widgets/layout/ + AbsoluteLayout - New layout type for absolute XY positioning of contained items + AccordionLayout - Renamed from AccordianLayout, no code changes + +===== Removed ===== +src/widgets/layout/ + AccordianLayout - Renamed to AccordionLayout + +===== Modified ===== +src/core/ + CompositeElement - Refactored node removal in removeElement() and replaceElement() + DomHelper - Refactored insertFirst + Element - Fixes in getHeight()/getWidth() to return 0 for negative values, doc updates + EventManager - Refactored onWindowResize(), added body CSS classes for "ie6" and "ie7", doc updates + Ext - Added removeNode() for generic DOM node removal, added isIE6 property + +src/locale/ + ext-lang-en - Added Date.monthNumbers and several DatePicker strings + +src/util/ + ClickRepeater - Changes to handle repeat acceleration + Date - Added 'u' format for milliseconds w/ leading zeroes, refactored getWeekOfYear(), doc updates + Format - Added stripScripts() + MixedCollection - Fix in findIndex, doc updates + +src/widgets/ + BoxComponent - Fix in setPosition()/setPagePosition() to check for null x value + Button - Fix in afterRender() for IE6 check to defer autoWidth call + Component + - Change in onRender() to handle auto element creation + - Fix in isVisible() to return false if not rendered + - New XType methods getXType, isXType, getXTypes + - Doc updates + Container + - Fix in render to do layout only when there is no owning container + - Change to remove item borders on add if hideBorders = true + - New functions find, findBy, findById, findByType to retrieve child components + - Doc updates + DatePicker - Added logic to init disabled days on picker init + Layer - Refactored destroy() + PagingToolbar - Changed various internal CSS class prefixes to "x-tbar" + Panel - Fix in createGhost() to add 'px' to ghost width, doc updates + PanelDD - Fix in show() to position the ghost element correctly on show + Resizable - Fix to append the proxy element to the document body + SplitBar - Refactored destroy() + SplitButton - Fix in onEnable()/onDisable() for IE6 check when adding/removing x-item-disabled class + Window - Various fixes for modal dialog mask resizing on window resize + +src/widgets/form/ + BasicForm - Fix in render() to apply to existing markup correctly + Checkbox - Replaced constructor with initComponent + Combo - Replaced constructor with initComponent, doc updates + DateField - Added logic to init disabled days on picker init, doc updates + Field - Fix for input width for IE6 with strict doc type, doc updates + Form - Added onEnable()/onDisable() with logic to cascade to fields + HtmlEditor - Fix in toggleEditSource() to preserve the editor size when toggling + NumberField - Added baseChars config + Radio - Replaced constructor with initComponent + TextArea - Removed previously-deprecated minHeight and maxHeight configs (replace with growMin and growMax), refactored onDestroy + TextField - Replaced constructor with initComponent, doc updates + TriggerField - Fix to resize the wrapping element on resize, mimic blur fixes, doc updates + +src/widgets/grid/ + GridPanel - Change in onDestroy() to destroy the load mask even when the grid is not rendered, doc updates + GridView - Added resize marker, various minor fixes and doc updates + GroupingView - Refactored logic for showing groups in beforeMenuShow() + +src/widgets/layout/ + BorderLayout - Change in onLayout() to restore previous collapsed state, doc updates + BorderLayout.Region - Fix in tool template to add the semicolon to  , fix in applyLayout() for incorrect check of current collapsed state + ColumnLayout - Fixes in onLayout() for column sizing, doc update + ContainerLayout - Fix in renderItem() for case when position is not specified + FitLayout - Fixes to check that the container is not collapsed before resizing + +src/widgets/tips/ + QuickTips - Fix in showAt() to set dismiss properties correctly, doc updates + Tip - Fix to add header element when closable with no title, doc updates + +src/widgets/tree/ + TreeNode - Fix in removeChild() for case where tree has a hidden root node + TreeNodeUI - Added destroy(), doc updates + TreePanel - Fix to set internal beforeexpandnode event handler correctly, added onDestroy(), doc updates + +===== Doc updates only ===== +src/core/ + DomQuery + +src/data/ + ArrayReader + Connection + DataReader + JsonReader + Record + +src/dd/ + DDCore + +src/util/ + Observable + TaskMgr + XTemplate + +src/widgets/ + ComponentMgr + DataView + MessageBox + ProgressBar + TabPanel + WindowMgr + +src/widgets/form/ + Action + TimeField + +src/widgets/grid/ + CellSelectionModel + ColumnModel + PropertyGrid + +src/widgets/layout/ + AnchorLayout + FormLayout + TableLayout + +src/widgets/menu/ + Adapter + CheckItem + Item + MenuMgr + +src/widgets/tips/ + QuickTips + ToolTip + +src/widgets/tree/ + TreeDragZone + TreeDropZone + TreeEditor + TreeLoader \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/INCLUDE_ORDER.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/INCLUDE_ORDER.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/INCLUDE_ORDER.txt 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,36 @@ +All adapter related files below are located in +/adapters// of this zip file. + +Your include order should be: + +Ext Stand-alone +------------------------------------------------------------------- +ext-base.js +ext-all.js (or your choice of files) + + +Yahoo! UI (.12+) +------------------------------------------------------------------- +yui-utilities.js +ext-yui-adapter.js +ext-all.js (or your choice of files) + + +jQuery (1.1+) +------------------------------------------------------------------- +jquery.js +jquery-plugins.js // required jQuery plugins +ext-jquery-adapter.js +ext-all.js (or your choice of files) + + +Prototype (1.5+) / Scriptaculous (1.7+) +------------------------------------------------------------------- +prototype.js +scriptaculous.js?load=effects (or whatever you want to load) +ext-prototype-adapter.js +ext-all.js (or your choice of files) + + + +See the examples folders for more examples. \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/LICENSE.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/LICENSE.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/LICENSE.txt 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,50 @@ +Ext JS - JavaScript Library +Copyright (c) 2006-2007, Ext JS, LLC +All rights reserved. +licensing@extjs.com + +http://extjs.com/license + + +License of CSS and Graphics ("Assets") +------------------------------------------------------------------------------------------ +The Assets distributed with Ext are licensed for use ONLY +with their associated Ext JavaScript component ("Component"). Use of the Assets in +any way that does not also include the Component is prohibited without explicit +permission from Ext JS, LLC. Deriving images and CSS from the Assets in an effort +to bypass this license is also prohibited. + + +Open Source License +------------------------------------------------------------------------------------------ +Ext is also licensed under the terms of the Open Source LGPL 3.0 license. You may use +our open source license if you: + * Want to use Ext in an open source project that precludes using non-open source software + * Plan to use Ext in a personal, educational or non-profit manner + * Are using Ext in a commercial application that is not a software development library +or toolkit, you will meet LGPL requirements and you do not wish to support the project + +http://www.gnu.org/licenses/lgpl.html + + +Commercial License +------------------------------------------------------------------------------------------ +If you are using this library for commercial purposes, we encourage you to purchase +a commercial license. Please visit http://extjs.com/license for more details. + + +OEM / Reseller License +------------------------------------------------------------------------------------------ +If you plan to distribute Ext in a product that will be packaged or sold as a software +development library, toolkit or plug-in-based framework ("LIBRARY"), we require that you +work with us to establish a specific license that is appropriate. Use of the open source +license in a LIBRARY is not permitted without explicit permission from Ext JS, LLC. + +For more details, please visit: http://extjs.com/license. + +-- + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/ext-all-debug.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/ext-all-debug.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/ext-all-debug.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,33420 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + + +Ext.DomHelper = function(){ + var tempTableEl = null; + var emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i; + var tableRe = /^table|tbody|tr|td$/i; + + + + var createHtml = function(o){ + if(typeof o == 'string'){ + return o; + } + var b = ""; + if(!o.tag){ + o.tag = "div"; + } + b += "<" + o.tag; + for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || typeof o[attr] == "function") continue; + if(attr == "style"){ + var s = o["style"]; + if(typeof s == "function"){ + s = s.call(); + } + if(typeof s == "string"){ + b += ' style="' + s + '"'; + }else if(typeof s == "object"){ + b += ' style="'; + for(var key in s){ + if(typeof s[key] != "function"){ + b += key + ":" + s[key] + ";"; + } + } + b += '"'; + } + }else{ + if(attr == "cls"){ + b += ' class="' + o["cls"] + '"'; + }else if(attr == "htmlFor"){ + b += ' for="' + o["htmlFor"] + '"'; + }else{ + b += " " + attr + '="' + o[attr] + '"'; + } + } + } + if(emptyTags.test(o.tag)){ + b += "/>"; + }else{ + b += ">"; + var cn = o.children || o.cn; + if(cn){ + if(cn instanceof Array){ + for(var i = 0, len = cn.length; i < len; i++) { + b += createHtml(cn[i], b); + } + }else{ + b += createHtml(cn, b); + } + } + if(o.html){ + b += o.html; + } + b += ""; + } + return b; + }; + + + + var createDom = function(o, parentNode){ + var el = document.createElement(o.tag||'div'); + var useSet = el.setAttribute ? true : false; + for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || attr == "style" || typeof o[attr] == "function") continue; + if(attr=="cls"){ + el.className = o["cls"]; + }else{ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + Ext.DomHelper.applyStyles(el, o.style); + var cn = o.children || o.cn; + if(cn){ + if(cn instanceof Array){ + for(var i = 0, len = cn.length; i < len; i++) { + createDom(cn[i], el); + } + }else{ + createDom(cn, el); + } + } + if(o.html){ + el.innerHTML = o.html; + } + if(parentNode){ + parentNode.appendChild(el); + } + return el; + }; + + var ieTable = function(depth, s, h, e){ + tempTableEl.innerHTML = [s, h, e].join(''); + var i = -1, el = tempTableEl; + while(++i < depth){ + el = el.firstChild; + } + return el; + }; + + + var ts = '', + te = '
', + tbs = ts+'', + tbe = ''+te, + trs = tbs + '', + tre = ''+tbe; + + + var insertIntoTable = function(tag, where, el, html){ + if(!tempTableEl){ + tempTableEl = document.createElement('div'); + } + var node; + var before = null; + if(tag == 'td'){ + if(where == 'afterbegin' || where == 'beforeend'){ + return; + } + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + } else{ + before = el.nextSibling; + el = el.parentNode; + } + node = ieTable(4, trs, html, tre); + } + else if(tag == 'tr'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else{ + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(4, trs, html, tre); + } + } else if(tag == 'tbody'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else{ + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(3, tbs, html, tbe); + } + } else{ + if(where == 'beforebegin' || where == 'afterend'){ + return; + } + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(2, ts, html, te); + } + el.insertBefore(node, before); + return node; + }; + + + return { + + useDom : false, + + + markup : function(o){ + return createHtml(o); + }, + + + applyStyles : function(el, styles){ + if(styles){ + el = Ext.fly(el); + if(typeof styles == "string"){ + var re = /\s?([a-z\-]*)\:\s?([^;]*);?/gi; + var matches; + while ((matches = re.exec(styles)) != null){ + el.setStyle(matches[1], matches[2]); + } + }else if (typeof styles == "object"){ + for (var style in styles){ + el.setStyle(style, styles[style]); + } + }else if (typeof styles == "function"){ + Ext.DomHelper.applyStyles(el, styles.call()); + } + } + }, + + + insertHtml : function(where, el, html){ + where = where.toLowerCase(); + if(el.insertAdjacentHTML){ + if(tableRe.test(el.tagName)){ + var rs; + if(rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html)){ + return rs; + } + } + switch(where){ + case "beforebegin": + el.insertAdjacentHTML('BeforeBegin', html); + return el.previousSibling; + case "afterbegin": + el.insertAdjacentHTML('AfterBegin', html); + return el.firstChild; + case "beforeend": + el.insertAdjacentHTML('BeforeEnd', html); + return el.lastChild; + case "afterend": + el.insertAdjacentHTML('AfterEnd', html); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + } + var range = el.ownerDocument.createRange(); + var frag; + switch(where){ + case "beforebegin": + range.setStartBefore(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el); + return el.previousSibling; + case "afterbegin": + if(el.firstChild){ + range.setStartBefore(el.firstChild); + frag = range.createContextualFragment(html); + el.insertBefore(frag, el.firstChild); + return el.firstChild; + }else{ + el.innerHTML = html; + return el.firstChild; + } + case "beforeend": + if(el.lastChild){ + range.setStartAfter(el.lastChild); + frag = range.createContextualFragment(html); + el.appendChild(frag); + return el.lastChild; + }else{ + el.innerHTML = html; + return el.lastChild; + } + case "afterend": + range.setStartAfter(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el.nextSibling); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + }, + + + insertBefore : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "beforeBegin"); + }, + + + insertAfter : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling"); + }, + + + insertFirst : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterBegin", "firstChild"); + }, + + + doInsert : function(el, o, returnElement, pos, sibling){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + (sibling === "firstChild" ? el : el.parentNode).insertBefore(newNode, sibling ? el[sibling] : el); + }else{ + var html = createHtml(o); + newNode = this.insertHtml(pos, el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + + append : function(el, o, returnElement){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + el.appendChild(newNode); + }else{ + var html = createHtml(o); + newNode = this.insertHtml("beforeEnd", el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + + overwrite : function(el, o, returnElement){ + el = Ext.getDom(el); + el.innerHTML = createHtml(o); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + }, + + + createTemplate : function(o){ + var html = createHtml(o); + return new Ext.Template(html); + } + }; +}(); + + +Ext.Template = function(html){ + var a = arguments; + if(html instanceof Array){ + html = html.join(""); + }else if(a.length > 1){ + var buf = []; + for(var i = 0, len = a.length; i < len; i++){ + if(typeof a[i] == 'object'){ + Ext.apply(this, a[i]); + }else{ + buf[buf.length] = a[i]; + } + } + html = buf.join(''); + } + + this.html = html; + if(this.compiled){ + this.compile(); + } +}; +Ext.Template.prototype = { + + applyTemplate : function(values){ + if(this.compiled){ + return this.compiled(values); + } + var useF = this.disableFormats !== true; + var fm = Ext.util.Format, tpl = this; + var fn = function(m, name, format, args){ + if(format && useF){ + if(format.substr(0, 5) == "this."){ + return tpl.call(format.substr(5), values[name], values); + }else{ + if(args){ + + + + var re = /^\s*['"](.*)["']\s*$/; + args = args.split(','); + for(var i = 0, len = args.length; i < len; i++){ + args[i] = args[i].replace(re, "$1"); + } + args = [values[name]].concat(args); + }else{ + args = [values[name]]; + } + return fm[format].apply(fm, args); + } + }else{ + return values[name] !== undefined ? values[name] : ""; + } + }; + return this.html.replace(this.re, fn); + }, + + + set : function(html, compile){ + this.html = html; + this.compiled = null; + if(compile){ + this.compile(); + } + return this; + }, + + + disableFormats : false, + + + re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, + + + compile : function(){ + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + var sep = Ext.isGecko ? "+" : ","; + var fn = function(m, name, format, args){ + if(format && useF){ + args = args ? ',' + args : ""; + if(format.substr(0, 5) != "this."){ + format = "fm." + format + '('; + }else{ + format = 'this.call("'+ format.substr(5) + '", '; + args = ", values"; + } + }else{ + args= ''; format = "(values['" + name + "'] == undefined ? '' : "; + } + return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; + }; + var body; + + if(Ext.isGecko){ + body = "this.compiled = function(values){ return '" + + this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + + "';};"; + }else{ + body = ["this.compiled = function(values){ return ['"]; + body.push(this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return this; + }, + + + call : function(fnName, value, allValues){ + return this[fnName](value, allValues); + }, + + + 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); + }, + + doInsert : function(where, el, values, returnEl){ + el = Ext.getDom(el); + var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values)); + return returnEl ? Ext.get(newNode, true) : newNode; + }, + + + overwrite : function(el, values, returnElement){ + el = Ext.getDom(el); + el.innerHTML = this.applyTemplate(values); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + } +}; + +Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; + + +Ext.DomHelper.Template = Ext.Template; + + +Ext.Template.from = function(el, config){ + el = Ext.getDom(el); + return new Ext.Template(el.value || el.innerHTML, config || ''); +}; + + +Ext.DomQuery = function(){ + var cache = {}, simpleCache = {}, valueCache = {}; + var nonSpace = /\S/; + var trimRe = /^\s+|\s+$/g; + var tplRe = /\{(\d+)\}/g; + var modeRe = /^(\s?[\/>+~]\s?|\s|$)/; + var tagTokenRe = /^(#)?([\w-\*]+)/; + var nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/; + + function child(p, index){ + var i = 0; + var n = p.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(d){ + var n = d.firstChild, ni = -1; + while(n){ + var nx = n.nextSibling; + if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ + d.removeChild(n); + }else{ + n.nodeIndex = ++ni; + } + n = nx; + } + return this; + }; + + function byClassName(c, a, v){ + if(!v){ + return c; + } + var r = [], ri = -1, cn; + for(var i = 0, ci; ci = c[i]; i++){ + if((' '+ci.className+' ').indexOf(v) != -1){ + r[++ri] = ci; + } + } + return r; + }; + + 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.children || 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 == "~"){ + for(var i = 0, n; n = ns[i]; i++){ + while((n = n.nextSibling) && (n.nodeType != 1 || (tagName == '*' || n.tagName.toLowerCase()!=tagName))); + if(n){ + result[++ri] = n; + } + } + } + return result; + }; + + function concat(a, b){ + if(b.slice){ + return a.concat(b); + } + for(var i = 0, l = b.length; i < l; i++){ + a[a.length] = b[i]; + } + return a; + } + + function byTag(cs, tagName){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!tagName){ + return cs; + } + var r = [], ri = -1; + tagName = tagName.toLowerCase(); + for(var i = 0, ci; ci = cs[i]; i++){ + if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ + r[++ri] = ci; + } + } + return r; + }; + + function byId(cs, attr, id){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!id){ + return cs; + } + var r = [], ri = -1; + for(var i = 0,ci; ci = cs[i]; i++){ + if(ci && ci.id == id){ + r[++ri] = ci; + return r; + } + } + return r; + }; + + function byAttribute(cs, attr, value, op, custom){ + var r = [], ri = -1, st = custom=="{"; + var f = Ext.DomQuery.operators[op]; + for(var i = 0, ci; ci = cs[i]; i++){ + var a; + if(st){ + a = Ext.DomQuery.getStyle(ci, attr); + } + else if(attr == "class" || attr == "className"){ + a = ci.className; + }else if(attr == "for"){ + a = ci.htmlFor; + }else if(attr == "href"){ + a = ci.getAttribute("href", 2); + }else{ + a = ci.getAttribute(attr); + } + if((f && f(a, value)) || (!f && a)){ + r[++ri] = ci; + } + } + return r; + }; + + function byPseudo(cs, name, value){ + return Ext.DomQuery.pseudos[name](cs, value); + }; + + + + + var isIE = window.ActiveXObject ? true : false; + + + + eval("var batch = 30803;"); + + var key = 30803; + + function nodupIEXml(cs){ + var d = ++key; + cs[0].setAttribute("_nodup", d); + var r = [cs[0]]; + for(var i = 1, len = cs.length; i < len; i++){ + var c = cs[i]; + if(!c.getAttribute("_nodup") != d){ + c.setAttribute("_nodup", d); + r[r.length] = c; + } + } + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].removeAttribute("_nodup"); + } + return r; + } + + function nodup(cs){ + if(!cs){ + return []; + } + var len = cs.length, c, i, r = cs, cj, ri = -1; + if(!len || typeof cs.nodeType != "undefined" || len == 1){ + return cs; + } + if(isIE && typeof cs[0].selectSingleNode != "undefined"){ + return nodupIEXml(cs); + } + var d = ++key; + cs[0]._nodup = d; + for(i = 1; c = cs[i]; i++){ + if(c._nodup != d){ + c._nodup = d; + }else{ + r = []; + for(var j = 0; j < i; j++){ + r[++ri] = cs[j]; + } + for(j = i+1; cj = cs[j]; j++){ + if(cj._nodup != d){ + cj._nodup = d; + r[++ri] = cj; + } + } + return r; + } + } + return r; + } + + function quickDiffIEXml(c1, c2){ + var d = ++key; + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].setAttribute("_qdiff", d); + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i].getAttribute("_qdiff") != d){ + r[r.length] = c2[i]; + } + } + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].removeAttribute("_qdiff"); + } + return r; + } + + function quickDiff(c1, c2){ + var len1 = c1.length; + if(!len1){ + return c2; + } + if(isIE && c1[0].selectSingleNode){ + return quickDiffIEXml(c1, c2); + } + var d = ++key; + for(var i = 0; i < len1; i++){ + c1[i]._qdiff = d; + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i]._qdiff != d){ + r[r.length] = c2[i]; + } + } + return r; + } + + function quickId(ns, mode, root, id){ + if(ns == root){ + var d = root.ownerDocument || root; + return d.getElementById(id); + } + ns = getNodes(ns, mode, "*"); + return byId(ns, null, id); + } + + return { + 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"]; + var q = path, mode, lq; + var tk = Ext.DomQuery.matchers; + var tklen = tk.length; + var mm; + + + var lmode = q.match(modeRe); + if(lmode && lmode[1]){ + fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; + q = q.replace(lmode[1], ""); + } + + while(path.substr(0, 1)=="/"){ + path = path.substr(1); + } + + while(q && lq != q){ + lq = q; + var tm = q.match(tagTokenRe); + if(type == "select"){ + if(tm){ + if(tm[1] == "#"){ + fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; + }else{ + fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; + } + q = q.replace(tm[0], ""); + }else if(q.substr(0, 1) != '@'){ + fn[fn.length] = 'n = getNodes(n, mode, "*");'; + } + }else{ + if(tm){ + if(tm[1] == "#"){ + fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");'; + }else{ + fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");'; + } + q = q.replace(tm[0], ""); + } + } + while(!(mm = q.match(modeRe))){ + var matched = false; + for(var j = 0; j < tklen; j++){ + var t = tk[j]; + var m = q.match(t.re); + if(m){ + fn[fn.length] = t.select.replace(tplRe, function(x, i){ + return m[i]; + }); + q = q.replace(m[0], ""); + matched = true; + break; + } + } + + if(!matched){ + throw 'Error parsing selector, parsing failed at "' + q + '"'; + } + } + if(mm[1]){ + fn[fn.length] = 'mode="'+mm[1].replace(trimRe, "")+'";'; + q = q.replace(mm[1], ""); + } + } + fn[fn.length] = "return nodup(n);\n}"; + eval(fn.join("")); + return f; + }, + + + select : function(path, root, type){ + if(!root || root == document){ + root = document; + } + if(typeof root == "string"){ + root = document.getElementById(root); + } + var paths = path.split(","); + var results = []; + for(var i = 0, len = paths.length; i < len; i++){ + var p = paths[i].replace(trimRe, ""); + if(!cache[p]){ + cache[p] = Ext.DomQuery.compile(p); + if(!cache[p]){ + throw p + " is not a valid selector"; + } + } + var result = cache[p](root); + if(result && result != document){ + results = results.concat(result); + } + } + if(paths.length > 1){ + return nodup(results); + } + return results; + }, + + + 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); + n = n[0] ? n[0] : n; + var 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 = (el instanceof Array); + var 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, null, " {1} ");' + }, { + re: /^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, + select: 'n = byPseudo(n, "{1}", "{2}");' + },{ + re: /^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/, + select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");' + }, { + re: /^#([\w-]+)/, + select: 'n = byId(n, null, "{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; + var m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a); + var 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('|'); + var 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; + var 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; + var 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; + var 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.Observable = function(){ + + if(this.listeners){ + this.on(this.listeners); + delete this.listeners; + } +}; +Ext.util.Observable.prototype = { + + fireEvent : function(){ + if(this.eventsSuspended !== true){ + var ce = this.events[arguments[0].toLowerCase()]; + if(typeof ce == "object"){ + return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); + } + } + return true; + }, + + filterOptRe : /^(?:scope|delay|buffer|single)$/, + + + addListener : function(eventName, fn, scope, o){ + if(typeof eventName == "object"){ + o = eventName; + for(var e in o){ + if(this.filterOptRe.test(e)){ + continue; + } + if(typeof o[e] == "function"){ + this.addListener(e, o[e], o.scope, o); + }else{ + this.addListener(e, o[e].fn, o[e].scope, o[e]); + } + } + return; + } + o = (!o || typeof o == "boolean") ? {} : o; + eventName = eventName.toLowerCase(); + var ce = this.events[eventName] || true; + if(typeof ce == "boolean"){ + ce = new Ext.util.Event(this, eventName); + this.events[eventName] = ce; + } + ce.addListener(fn, scope, o); + }, + + + removeListener : function(eventName, fn, scope){ + var ce = this.events[eventName.toLowerCase()]; + if(typeof ce == "object"){ + ce.removeListener(fn, scope); + } + }, + + + purgeListeners : function(){ + for(var evt in this.events){ + if(typeof this.events[evt] == "object"){ + this.events[evt].clearListeners(); + } + } + }, + + relayEvents : function(o, events){ + var createHandler = function(ename){ + return function(){ + return this.fireEvent.apply(this, Ext.combine(ename, Array.prototype.slice.call(arguments, 0))); + }; + }; + for(var i = 0, len = events.length; i < len; i++){ + var ename = events[i]; + if(!this.events[ename]){ this.events[ename] = true; }; + o.on(ename, createHandler(ename), this); + } + }, + + + addEvents : function(o){ + if(!this.events){ + this.events = {}; + } + if(typeof o == 'string'){ + for(var i = 0, a = arguments, v; v = a[i]; i++){ + if(!this.events[a[i]]){ + o[a[i]] = true; + } + } + }else{ + Ext.applyIf(this.events, o); + } + }, + + + hasListener : function(eventName){ + var e = this.events[eventName]; + return typeof e == "object" && e.listeners.length > 0; + }, + + + suspendEvents : function(){ + this.eventsSuspended = true; + }, + + + resumeEvents : function(){ + this.eventsSuspended = false; + }, + + getMethodEvent : function(method){ + if(!this.methodEvents){ + this.methodEvents = {}; + } + var e = this.methodEvents[method]; + if(!e){ + e = {}; + this.methodEvents[method] = e; + + e.originalFn = this[method]; + e.methodName = method; + e.before = []; + e.after = []; + + + var returnValue, v, cancel; + var obj = this; + + var makeCall = function(fn, scope, args){ + if((v = fn.apply(scope || obj, args)) !== undefined){ + if(typeof v === 'object'){ + if(v.returnValue !== undefined){ + returnValue = v.returnValue; + }else{ + returnValue = v; + } + if(v.cancel === true){ + cancel = true; + } + }else if(v === false){ + cancel = true; + }else { + returnValue = v; + } + } + } + + this[method] = function(){ + returnValue = v = undefined; cancel = false; + var args = Array.prototype.slice.call(arguments, 0); + for(var i = 0, len = e.before.length; i < len; i++){ + makeCall(e.before[i].fn, e.before[i].scope, args); + if(cancel){ + return returnValue; + } + } + + if((v = e.originalFn.apply(obj, args)) !== undefined){ + returnValue = v; + } + + for(var i = 0, len = e.after.length; i < len; i++){ + makeCall(e.after[i].fn, e.after[i].scope, args); + if(cancel){ + return returnValue; + } + } + return returnValue; + }; + } + return e; + }, + + beforeMethod : function(method, fn, scope){ + var e = this.getMethodEvent(method); + e.before.push({fn: fn, scope: scope}); + }, + + afterMethod : function(method, fn, scope){ + var e = this.getMethodEvent(method); + e.after.push({fn: fn, scope: scope}); + }, + + removeMethodListener : function(method, fn, scope){ + var e = this.getMethodEvent(method); + for(var i = 0, len = e.before.length; i < len; i++){ + if(e.before[i].fn == fn && e.before[i].scope == scope){ + e.before.splice(i, 1); + return; + } + } + for(var i = 0, len = e.after.length; i < len; i++){ + if(e.after[i].fn == fn && e.after[i].scope == scope){ + e.after.splice(i, 1); + return; + } + } + } +}; + +Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener; + +Ext.util.Observable.prototype.un = Ext.util.Observable.prototype.removeListener; + + +Ext.util.Observable.capture = function(o, fn, scope){ + o.fireEvent = o.fireEvent.createInterceptor(fn, scope); +}; + + +Ext.util.Observable.releaseCapture = function(o){ + o.fireEvent = Ext.util.Observable.prototype.fireEvent; +}; + +(function(){ + + var createBuffered = function(h, o, scope){ + var task = new Ext.util.DelayedTask(); + return function(){ + task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0)); + }; + }; + + var createSingle = function(h, e, fn, scope){ + return function(){ + e.removeListener(fn, scope); + return h.apply(scope, arguments); + }; + }; + + var createDelayed = function(h, o, scope){ + return function(){ + var args = Array.prototype.slice.call(arguments, 0); + setTimeout(function(){ + h.apply(scope, args); + }, o.delay || 10); + }; + }; + + Ext.util.Event = function(obj, name){ + this.name = name; + this.obj = obj; + this.listeners = []; + }; + + Ext.util.Event.prototype = { + addListener : function(fn, scope, options){ + scope = scope || this.obj; + if(!this.isListening(fn, scope)){ + var l = this.createListener(fn, scope, options); + if(!this.firing){ + this.listeners.push(l); + }else{ this.listeners = this.listeners.slice(0); + this.listeners.push(l); + } + } + }, + + createListener : function(fn, scope, o){ + o = o || {}; + scope = scope || this.obj; + var l = {fn: fn, scope: scope, options: o}; + var h = fn; + if(o.delay){ + h = createDelayed(h, o, scope); + } + if(o.single){ + h = createSingle(h, this, fn, scope); + } + if(o.buffer){ + h = createBuffered(h, o, scope); + } + l.fireFn = h; + return l; + }, + + findListener : function(fn, scope){ + scope = scope || this.obj; + var ls = this.listeners; + for(var i = 0, len = ls.length; i < len; i++){ + var l = ls[i]; + if(l.fn == fn && l.scope == scope){ + return i; + } + } + return -1; + }, + + isListening : function(fn, scope){ + return this.findListener(fn, scope) != -1; + }, + + removeListener : function(fn, scope){ + var index; + if((index = this.findListener(fn, scope)) != -1){ + if(!this.firing){ + this.listeners.splice(index, 1); + }else{ + this.listeners = this.listeners.slice(0); + this.listeners.splice(index, 1); + } + return true; + } + return false; + }, + + clearListeners : function(){ + this.listeners = []; + }, + + fire : function(){ + var ls = this.listeners, scope, len = ls.length; + if(len > 0){ + this.firing = true; + var args = Array.prototype.slice.call(arguments, 0); + for(var i = 0; i < len; i++){ + var l = ls[i]; + if(l.fireFn.apply(l.scope||this.obj||window, arguments) === false){ + this.firing = false; + return false; + } + } + this.firing = false; + } + return true; + } + }; +})(); + +Ext.EventManager = function(){ + var docReadyEvent, docReadyProcId, docReadyState = false; + var resizeEvent, resizeTask, textEvent, textSize; + var E = Ext.lib.Event; + var D = Ext.lib.Dom; + + + var fireDocReady = function(){ + if(!docReadyState){ + docReadyState = true; + Ext.isReady = true; + if(docReadyProcId){ + clearInterval(docReadyProcId); + } + if(Ext.isGecko || Ext.isOpera) { + document.removeEventListener("DOMContentLoaded", fireDocReady, false); + } + if(Ext.isIE){ + var defer = document.getElementById("ie-deferred-loader"); + if(defer){ + defer.onreadystatechange = null; + defer.parentNode.removeChild(defer); + } + } + if(docReadyEvent){ + docReadyEvent.fire(); + docReadyEvent.clearListeners(); + } + } + }; + + var initDocReady = function(){ + docReadyEvent = new Ext.util.Event(); + if(Ext.isGecko || Ext.isOpera) { + document.addEventListener("DOMContentLoaded", fireDocReady, false); + }else if(Ext.isIE){ + document.write(""); + var defer = document.getElementById("ie-deferred-loader"); + defer.onreadystatechange = function(){ + if(this.readyState == "complete"){ + fireDocReady(); + } + }; + }else if(Ext.isSafari){ + docReadyProcId = setInterval(function(){ + var rs = document.readyState; + if(rs == "complete") { + fireDocReady(); + } + }, 10); + } + + E.on(window, "load", fireDocReady); + }; + + var createBuffered = function(h, o){ + var task = new Ext.util.DelayedTask(h); + return function(e){ + + e = new Ext.EventObjectImpl(e); + task.delay(o.buffer, h, null, [e]); + }; + }; + + var createSingle = function(h, el, ename, fn){ + return function(e){ + Ext.EventManager.removeListener(el, ename, fn); + h(e); + }; + }; + + var createDelayed = function(h, o){ + return function(e){ + + e = new Ext.EventObjectImpl(e); + setTimeout(function(){ + h(e); + }, o.delay || 10); + }; + }; + + var listen = function(element, ename, opt, fn, scope){ + var o = (!opt || typeof opt == "boolean") ? {} : opt; + fn = fn || o.fn; scope = scope || o.scope; + var el = Ext.getDom(element); + if(!el){ + throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; + } + var h = function(e){ + e = Ext.EventObject.setEvent(e); + var t; + if(o.delegate){ + t = e.getTarget(o.delegate, el); + if(!t){ + return; + } + }else{ + t = e.target; + } + if(o.stopEvent === true){ + e.stopEvent(); + } + if(o.preventDefault === true){ + e.preventDefault(); + } + if(o.stopPropagation === true){ + e.stopPropagation(); + } + + if(o.normalized === false){ + e = e.browserEvent; + } + + fn.call(scope || el, e, t, o); + }; + if(o.delay){ + h = createDelayed(h, o); + } + if(o.single){ + h = createSingle(h, el, ename, fn); + } + if(o.buffer){ + h = createBuffered(h, o); + } + fn._handlers = fn._handlers || []; + fn._handlers.push([Ext.id(el), ename, h]); + + E.on(el, ename, h); + if(ename == "mousewheel" && el.addEventListener){ + el.addEventListener("DOMMouseScroll", h, false); + E.on(window, 'unload', function(){ + el.removeEventListener("DOMMouseScroll", h, false); + }); + } + if(ename == "mousedown" && el == document){ + Ext.EventManager.stoppedMouseDownEvent.addListener(h); + } + return h; + }; + + var stopListening = function(el, ename, fn){ + var id = Ext.id(el), hds = fn._handlers, hd = fn; + if(hds){ + for(var i = 0, len = hds.length; i < len; i++){ + var h = hds[i]; + if(h[0] == id && h[1] == ename){ + hd = h[2]; + hds.splice(i, 1); + break; + } + } + } + E.un(el, ename, hd); + el = Ext.getDom(el); + if(ename == "mousewheel" && el.addEventListener){ + el.removeEventListener("DOMMouseScroll", hd, false); + } + if(ename == "mousedown" && el == document){ + Ext.EventManager.stoppedMouseDownEvent.removeListener(hd); + } + }; + + var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/; + var pub = { + + + addListener : function(element, eventName, fn, scope, options){ + if(typeof eventName == "object"){ + var o = eventName; + for(var e in o){ + if(propRe.test(e)){ + continue; + } + if(typeof o[e] == "function"){ + + listen(element, e, o, o[e], o.scope); + }else{ + + listen(element, e, o[e]); + } + } + return; + } + return listen(element, eventName, options, fn, scope); + }, + + + removeListener : function(element, eventName, fn){ + return stopListening(element, eventName, fn); + }, + + + onDocumentReady : function(fn, scope, options){ + if(docReadyState){ + docReadyEvent.addListener(fn, scope, options); + docReadyEvent.fire(); + docReadyEvent.clearListeners(); + return; + } + if(!docReadyEvent){ + initDocReady(); + } + docReadyEvent.addListener(fn, scope, options); + }, + + + onWindowResize : function(fn, scope, options){ + if(!resizeEvent){ + resizeEvent = new Ext.util.Event(); + resizeTask = new Ext.util.DelayedTask(function(){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + }); + E.on(window, "resize", this.fireWindowResize, this); + } + resizeEvent.addListener(fn, scope, options); + }, + + + fireWindowResize : function(){ + if(resizeEvent){ + if((Ext.isIE||Ext.isAir) && resizeTask){ + resizeTask.delay(50); + }else{ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + } + } + }, + + + onTextResize : function(fn, scope, options){ + if(!textEvent){ + textEvent = new Ext.util.Event(); + var textEl = new Ext.Element(document.createElement('div')); + textEl.dom.className = 'x-text-resize'; + textEl.dom.innerHTML = 'X'; + textEl.appendTo(document.body); + textSize = textEl.dom.offsetHeight; + setInterval(function(){ + if(textEl.dom.offsetHeight != textSize){ + textEvent.fire(textSize, textSize = textEl.dom.offsetHeight); + } + }, this.textResizeInterval); + } + 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()); + } + }, + + ieDeferSrc : false, + + textResizeInterval : 50 + }; + + pub.on = pub.addListener; + + pub.un = pub.removeListener; + + pub.stoppedMouseDownEvent = new Ext.util.Event(); + return pub; +}(); + +Ext.onReady = Ext.EventManager.onDocumentReady; + +Ext.onReady(function(){ + var bd = Ext.getBody(); + if(!bd){ return; } + + var cls = [ + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') + : Ext.isGecko ? "ext-gecko" + : Ext.isOpera ? "ext-opera" + : Ext.isSafari ? "ext-safari" : ""]; + + if(Ext.isMac){ + cls.push("ext-mac"); + } + if(Ext.isLinux){ + cls.push("ext-linux"); + } + if(Ext.isBorderBox){ + cls.push('ext-border-box'); + } + if(Ext.isStrict){ + var p = bd.dom.parentNode; + if(p){ + p.className += ' ext-strict'; + } + } + bd.addClass(cls.join(' ')); +}); + + +Ext.EventObject = function(){ + + var E = Ext.lib.Event; + + + var safariKeys = { + 63234 : 37, + 63235 : 39, + 63232 : 38, + 63233 : 40, + 63276 : 33, + 63277 : 34, + 63272 : 46, + 63273 : 36, + 63275 : 35 + }; + + + var btnMap = Ext.isIE ? {1:0,4:1,2:2} : + (Ext.isSafari ? {1:0,2:1,3:2} : {0:0,1:1,2:2}); + + Ext.EventObjectImpl = function(e){ + if(e){ + this.setEvent(e.browserEvent || e); + } + }; + Ext.EventObjectImpl.prototype = { + + browserEvent : null, + + button : -1, + + shiftKey : false, + + ctrlKey : false, + + altKey : false, + + + BACKSPACE : 8, + + TAB : 9, + + RETURN : 13, + + ENTER : 13, + + SHIFT : 16, + + CONTROL : 17, + + ESC : 27, + + SPACE : 32, + + PAGEUP : 33, + + PAGEDOWN : 34, + + END : 35, + + HOME : 36, + + LEFT : 37, + + UP : 38, + + RIGHT : 39, + + DOWN : 40, + + DELETE : 46, + + F5 : 116, + + + setEvent : function(e){ + if(e == this || (e && e.browserEvent)){ + return e; + } + this.browserEvent = e; + if(e){ + + this.button = e.button ? btnMap[e.button] : (e.which ? e.which-1 : -1); + if(e.type == 'click' && this.button == -1){ + this.button = 0; + } + this.type = e.type; + this.shiftKey = e.shiftKey; + + this.ctrlKey = e.ctrlKey || e.metaKey; + this.altKey = e.altKey; + + this.keyCode = e.keyCode; + this.charCode = e.charCode; + + this.target = E.getTarget(e); + + this.xy = E.getXY(e); + }else{ + this.button = -1; + this.shiftKey = false; + this.ctrlKey = false; + this.altKey = false; + this.keyCode = 0; + this.charCode =0; + this.target = null; + this.xy = [0, 0]; + } + return this; + }, + + + stopEvent : function(){ + if(this.browserEvent){ + if(this.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(this); + } + E.stopEvent(this.browserEvent); + } + }, + + + preventDefault : function(){ + if(this.browserEvent){ + E.preventDefault(this.browserEvent); + } + }, + + + isNavKeyPress : function(){ + var k = this.keyCode; + k = Ext.isSafari ? (safariKeys[k] || k) : k; + return (k >= 33 && k <= 40) || k == this.RETURN || k == this.TAB || k == this.ESC; + }, + + isSpecialKey : function(){ + var k = this.keyCode; + return (this.type == 'keypress' && this.ctrlKey) || k == 9 || k == 13 || k == 40 || k == 27 || + (k == 16) || (k == 17) || + (k >= 18 && k <= 20) || + (k >= 33 && k <= 35) || + (k >= 36 && k <= 39) || + (k >= 44 && k <= 45); + }, + + stopPropagation : function(){ + if(this.browserEvent){ + if(this.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(this); + } + E.stopPropagation(this.browserEvent); + } + }, + + + getCharCode : function(){ + return this.charCode || this.keyCode; + }, + + + getKey : function(){ + var k = this.keyCode || this.charCode; + return Ext.isSafari ? (safariKeys[k] || k) : k; + }, + + + getPageX : function(){ + return this.xy[0]; + }, + + + getPageY : function(){ + return this.xy[1]; + }, + + + getTime : function(){ + if(this.browserEvent){ + return E.getTime(this.browserEvent); + } + return null; + }, + + + getXY : function(){ + return this.xy; + }, + + + getTarget : function(selector, maxDepth, returnEl){ + var t = Ext.get(this.target); + return selector ? t.findParent(selector, maxDepth, returnEl) : (returnEl ? t : this.target); + }, + + + getRelatedTarget : function(){ + if(this.browserEvent){ + return E.getRelatedTarget(this.browserEvent); + } + return null; + }, + + + getWheelDelta : function(){ + var e = this.browserEvent; + var delta = 0; + if(e.wheelDelta){ + delta = e.wheelDelta/120; + }else if(e.detail){ + delta = -e.detail/3; + } + return delta; + }, + + + hasModifier : function(){ + return ((this.ctrlKey || this.altKey) || this.shiftKey) ? true : false; + }, + + + within : function(el, related){ + var t = this[related ? "getRelatedTarget" : "getTarget"](); + return t && Ext.fly(el).contains(t); + }, + + getPoint : function(){ + return new Ext.lib.Point(this.xy[0], this.xy[1]); + } + }; + + return new Ext.EventObjectImpl(); +}(); + +(function(){ +var D = Ext.lib.Dom; +var E = Ext.lib.Event; +var A = Ext.lib.Anim; + + +var propCache = {}; +var camelRe = /(-[a-z])/gi; +var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; +var view = document.defaultView; + +Ext.Element = function(element, forceNew){ + var dom = typeof element == "string" ? + document.getElementById(element) : element; + if(!dom){ + return null; + } + var id = dom.id; + if(forceNew !== true && id && Ext.Element.cache[id]){ + return Ext.Element.cache[id]; + } + + + this.dom = dom; + + + this.id = id || Ext.id(dom); +}; + +var El = Ext.Element; + +El.prototype = { + + originalDisplay : "", + + visibilityMode : 1, + + defaultUnit : "px", + + setVisibilityMode : function(visMode){ + this.visibilityMode = visMode; + return this; + }, + + enableDisplayMode : function(display){ + this.setVisibilityMode(El.DISPLAY); + if(typeof display != "undefined") this.originalDisplay = display; + return this; + }, + + + findParent : function(simpleSelector, maxDepth, returnEl){ + var p = this.dom, b = document.body, depth = 0, dq = Ext.DomQuery, stopEl; + maxDepth = maxDepth || 50; + if(typeof maxDepth != "number"){ + stopEl = Ext.getDom(maxDepth); + maxDepth = 10; + } + while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ + if(dq.is(p, simpleSelector)){ + return returnEl ? Ext.get(p) : p; + } + depth++; + p = p.parentNode; + } + 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); + }, + + + + + is : function(simpleSelector){ + return Ext.DomQuery.is(this.dom, simpleSelector); + }, + + + 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 || {}; + var anim = Ext.lib.Anim[animType]( + this.dom, args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || 'easeOut', + function(){ + Ext.callback(cb, this); + Ext.callback(opt.callback, opt.scope || this, [this, opt]); + }, + this + ); + opt.anim = anim; + 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]}); + }, + + + clean : function(forceReclean){ + if(this.isCleaned && forceReclean !== true){ + return this; + } + var ns = /\S/; + var d = this.dom, n = d.firstChild, ni = -1; + while(n){ + var nx = n.nextSibling; + if(n.nodeType == 3 && !ns.test(n.nodeValue)){ + d.removeChild(n); + }else{ + n.nodeIndex = ++ni; + } + n = nx; + } + this.isCleaned = true; + return this; + }, + + + scrollIntoView : function(container, hscroll){ + var c = Ext.getDom(container) || Ext.getBody().dom; + var el = this.dom; + + var o = this.getOffsetsTo(c), + l = o[0] + c.scrollLeft, + t = o[1] + c.scrollTop, + b = t+el.offsetHeight, + r = l+el.offsetWidth; + + var ch = c.clientHeight; + var ct = parseInt(c.scrollTop, 10); + var cl = parseInt(c.scrollLeft, 10); + var cb = ct + ch; + var cr = cl + c.clientWidth; + + if(el.offsetHeight > ch || t < ct){ + c.scrollTop = t; + }else if(b > cb){ + c.scrollTop = b-ch; + } + c.scrollTop = c.scrollTop; + + if(hscroll !== false){ + if(el.offsetWidth > c.clientWidth || l < cl){ + c.scrollLeft = l; + }else if(r > cr){ + c.scrollLeft = r-c.clientWidth; + } + c.scrollLeft = c.scrollLeft; + } + return this; + }, + + + scrollChildIntoView : function(child, hscroll){ + Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); + }, + + + autoHeight : function(animate, duration, onComplete, easing){ + var oldHeight = this.getHeight(); + this.clip(); + this.setHeight(1); + setTimeout(function(){ + var height = parseInt(this.dom.scrollHeight, 10); + if(!animate){ + this.setHeight(height); + this.unclip(); + if(typeof onComplete == "function"){ + onComplete(); + } + }else{ + this.setHeight(oldHeight); + this.setHeight(height, animate, duration, function(){ + this.unclip(); + if(typeof onComplete == "function") onComplete(); + }.createDelegate(this), easing); + } + }.createDelegate(this), 0); + return this; + }, + + + contains : function(el){ + if(!el){return false;} + return D.isAncestor(this.dom, el.dom ? el.dom : el); + }, + + + isVisible : function(deep) { + var vis = !(this.getStyle("visibility") == "hidden" || this.getStyle("display") == "none"); + if(deep !== true || !vis){ + return vis; + } + var p = this.dom.parentNode; + while(p && p.tagName.toLowerCase() != "body"){ + if(!Ext.fly(p, '_isVisible').isVisible()){ + return false; + } + p = p.parentNode; + } + return true; + }, + + + select : function(selector, unique){ + return El.select(selector, unique, this.dom); + }, + + + query : function(selector, unique){ + return Ext.DomQuery.select(selector, this.dom); + }, + + + child : function(selector, returnDom){ + var n = Ext.DomQuery.selectNode(selector, this.dom); + return returnDom ? n : Ext.get(n); + }, + + + down : function(selector, returnDom){ + var n = Ext.DomQuery.selectNode(" > " + selector, this.dom); + return returnDom ? n : Ext.get(n); + }, + + + 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); + }, + + + setVisible : function(visible, animate){ + if(!animate || !A){ + if(this.visibilityMode == El.DISPLAY){ + this.setDisplayed(visible); + }else{ + this.fixDisplay(); + this.dom.style.visibility = visible ? "visible" : "hidden"; + } + }else{ + + var dom = this.dom; + var visMode = this.visibilityMode; + if(visible){ + this.setOpacity(.01); + this.setVisible(true); + } + this.anim({opacity: { to: (visible?1:0) }}, + this.preanim(arguments, 1), + null, .35, 'easeIn', function(){ + if(!visible){ + if(visMode == El.DISPLAY){ + dom.style.display = "none"; + }else{ + dom.style.visibility = "hidden"; + } + Ext.get(dom).setOpacity(1); + } + }); + } + return this; + }, + + + isDisplayed : function() { + return this.getStyle("display") != "none"; + }, + + + toggle : function(animate){ + this.setVisible(!this.isVisible(), this.preanim(arguments, 0)); + return this; + }, + + + setDisplayed : function(value) { + if(typeof value == "boolean"){ + value = value ? this.originalDisplay : "none"; + } + this.setStyle("display", value); + return this; + }, + + + focus : function() { + try{ + this.dom.focus(); + }catch(e){} + return this; + }, + + + blur : function() { + try{ + this.dom.blur(); + }catch(e){} + return this; + }, + + + addClass : function(className){ + if(className instanceof Array){ + for(var i = 0, len = className.length; i < len; i++) { + this.addClass(className[i]); + } + }else{ + if(className && !this.hasClass(className)){ + this.dom.className = this.dom.className + " " + className; + } + } + return this; + }, + + + radioClass : function(className){ + var siblings = this.dom.parentNode.childNodes; + for(var i = 0; i < siblings.length; i++) { + var s = siblings[i]; + if(s.nodeType == 1){ + Ext.get(s).removeClass(className); + } + } + this.addClass(className); + return this; + }, + + + removeClass : function(className){ + if(!className || !this.dom.className){ + return this; + } + if(className instanceof Array){ + for(var i = 0, len = className.length; i < len; i++) { + this.removeClass(className[i]); + } + }else{ + if(this.hasClass(className)){ + var re = this.classReCache[className]; + if (!re) { + re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', "g"); + this.classReCache[className] = re; + } + this.dom.className = + this.dom.className.replace(re, " "); + } + } + return this; + }, + + + classReCache: {}, + + + toggleClass : function(className){ + if(this.hasClass(className)){ + this.removeClass(className); + }else{ + this.addClass(className); + } + return this; + }, + + + hasClass : function(className){ + return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; + }, + + + replaceClass : function(oldClassName, newClassName){ + this.removeClass(oldClassName); + this.addClass(newClassName); + return this; + }, + + + getStyles : function(){ + var a = arguments, len = a.length, r = {}; + for(var i = 0; i < len; i++){ + r[a[i]] = this.getStyle(a[i]); + } + return r; + }, + + + getStyle : function(){ + return view && view.getComputedStyle ? + function(prop){ + var el = this.dom, v, cs, camel; + if(prop == 'float'){ + prop = "cssFloat"; + } + if(v = el.style[prop]){ + return v; + } + if(cs = view.getComputedStyle(el, "")){ + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + return cs[camel]; + } + return null; + } : + function(prop){ + var el = this.dom, v, cs, camel; + if(prop == 'opacity'){ + if(typeof el.style.filter == 'string'){ + var m = el.style.filter.match(/alpha\(opacity=(.*)\)/i); + if(m){ + var fv = parseFloat(m[1]); + if(!isNaN(fv)){ + return fv ? fv / 100 : 0; + } + } + } + return 1; + }else if(prop == 'float'){ + prop = "styleFloat"; + } + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + if(v = el.style[camel]){ + return v; + } + if(cs = el.currentStyle){ + return cs[camel]; + } + return null; + }; + }(), + + + setStyle : function(prop, value){ + if(typeof prop == "string"){ + var camel; + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + if(camel == 'opacity') { + this.setOpacity(value); + }else{ + this.dom.style[camel] = value; + } + }else{ + for(var style in prop){ + if(typeof prop[style] != "function"){ + this.setStyle(style, prop[style]); + } + } + } + return this; + }, + + + applyStyles : function(style){ + Ext.DomHelper.applyStyles(this.dom, style); + return this; + }, + + + 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(); + var e = Ext.fly(el, '_internal').getXY(); + return [o[0]-e[0],o[1]-e[1]]; + }, + + + setX : function(x, animate){ + if(!animate || !A){ + D.setX(this.dom, x); + }else{ + this.setXY([x, this.getY()], this.preanim(arguments, 1)); + } + return this; + }, + + + setY : function(y, animate){ + if(!animate || !A){ + D.setY(this.dom, y); + }else{ + this.setXY([this.getX(), y], this.preanim(arguments, 1)); + } + return this; + }, + + + 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){ + if(!animate || !A){ + D.setXY(this.dom, pos); + }else{ + this.anim({points: {to: pos}}, this.preanim(arguments, 1), 'motion'); + } + return this; + }, + + + setLocation : function(x, y, animate){ + this.setXY([x, y], this.preanim(arguments, 2)); + return this; + }, + + + moveTo : function(x, y, animate){ + this.setXY([x, y], this.preanim(arguments, 2)); + return this; + }, + + + getRegion : function(){ + return D.getRegion(this.dom); + }, + + + getHeight : function(contentHeight){ + var h = this.dom.offsetHeight || 0; + h = contentHeight !== true ? h : h-this.getBorderWidth("tb")-this.getPadding("tb"); + return h < 0 ? 0 : h; + }, + + + getWidth : function(contentWidth){ + var w = this.dom.offsetWidth || 0; + w = contentWidth !== true ? w : w-this.getBorderWidth("lr")-this.getPadding("lr"); + return w < 0 ? 0 : w; + }, + + + getComputedHeight : function(){ + var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight); + if(!h){ + h = parseInt(this.getStyle('height'), 10) || 0; + if(!this.isBorderBox()){ + h += this.getFrameWidth('tb'); + } + } + return h; + }, + + + getComputedWidth : function(){ + var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); + if(!w){ + w = parseInt(this.getStyle('width'), 10) || 0; + if(!this.isBorderBox()){ + w += this.getFrameWidth('lr'); + } + } + return w; + }, + + + getSize : function(contentSize){ + return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; + }, + + getStyleSize : function(){ + var w, h, d = this.dom, s = d.style; + if(s.width && s.width != 'auto'){ + w = parseInt(s.width, 10); + if(Ext.isBorderBox){ + w -= this.getFrameWidth('lr'); + } + } + if(s.height && s.height != 'auto'){ + h = parseInt(s.height, 10); + if(Ext.isBorderBox){ + h -= this.getFrameWidth('tb'); + } + } + return {width: w || this.getWidth(true), height: h || this.getHeight(true)}; + + }, + + + getViewSize : function(){ + var d = this.dom, doc = document, aw = 0, ah = 0; + if(d == doc || d == doc.body){ + return {width : D.getViewWidth(), height: D.getViewHeight()}; + }else{ + return { + width : d.clientWidth, + height: d.clientHeight + }; + } + }, + + + getValue : function(asNumber){ + return asNumber ? parseInt(this.dom.value, 10) : this.dom.value; + }, + + + adjustWidth : function(width){ + if(typeof width == "number"){ + if(this.autoBoxAdjust && !this.isBorderBox()){ + width -= (this.getBorderWidth("lr") + this.getPadding("lr")); + } + if(width < 0){ + width = 0; + } + } + return width; + }, + + + adjustHeight : function(height){ + if(typeof height == "number"){ + if(this.autoBoxAdjust && !this.isBorderBox()){ + height -= (this.getBorderWidth("tb") + this.getPadding("tb")); + } + if(height < 0){ + height = 0; + } + } + return height; + }, + + + setWidth : function(width, animate){ + width = this.adjustWidth(width); + if(!animate || !A){ + this.dom.style.width = this.addUnits(width); + }else{ + this.anim({width: {to: width}}, this.preanim(arguments, 1)); + } + return this; + }, + + + setHeight : function(height, animate){ + height = this.adjustHeight(height); + if(!animate || !A){ + this.dom.style.height = this.addUnits(height); + }else{ + this.anim({height: {to: height}}, this.preanim(arguments, 1)); + } + return this; + }, + + + setSize : function(width, height, animate){ + if(typeof width == "object"){ + height = width.height; width = width.width; + } + width = this.adjustWidth(width); height = this.adjustHeight(height); + if(!animate || !A){ + this.dom.style.width = this.addUnits(width); + this.dom.style.height = this.addUnits(height); + }else{ + this.anim({width: {to: width}, height: {to: height}}, this.preanim(arguments, 2)); + } + return this; + }, + + + setBounds : function(x, y, width, height, animate){ + if(!animate || !A){ + this.setSize(width, height); + this.setLocation(x, y); + }else{ + width = this.adjustWidth(width); height = this.adjustHeight(height); + this.anim({points: {to: [x, y]}, width: {to: width}, height: {to: height}}, + this.preanim(arguments, 4), 'motion'); + } + return this; + }, + + + setRegion : function(region, animate){ + this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.preanim(arguments, 1)); + return this; + }, + + + addListener : function(eventName, fn, scope, options){ + Ext.EventManager.on(this.dom, eventName, fn, scope || this, options); + }, + + + removeListener : function(eventName, fn){ + Ext.EventManager.removeListener(this.dom, eventName, fn); + return this; + }, + + + removeAllListeners : function(){ + E.purgeElement(this.dom); + return this; + }, + + + relayEvent : function(eventName, observable){ + this.on(eventName, function(e){ + observable.fireEvent(eventName, e); + }); + }, + + + setOpacity : function(opacity, animate){ + if(!animate || !A){ + var s = this.dom.style; + if(Ext.isIE){ + s.zoom = 1; + s.filter = (s.filter || '').replace(/alpha\([^\)]*\)/gi,"") + + (opacity == 1 ? "" : " alpha(opacity=" + opacity * 100 + ")"); + }else{ + s.opacity = opacity; + } + }else{ + this.anim({opacity: {to: opacity}}, this.preanim(arguments, 1), null, .35, 'easeIn'); + } + return this; + }, + + + getLeft : function(local){ + if(!local){ + return this.getX(); + }else{ + return parseInt(this.getStyle("left"), 10) || 0; + } + }, + + + getRight : function(local){ + if(!local){ + return this.getX() + this.getWidth(); + }else{ + return (this.getLeft(true) + this.getWidth()) || 0; + } + }, + + + getTop : function(local) { + if(!local){ + return this.getY(); + }else{ + return parseInt(this.getStyle("top"), 10) || 0; + } + }, + + + getBottom : function(local){ + if(!local){ + return this.getY() + this.getHeight(); + }else{ + return (this.getTop(true) + this.getHeight()) || 0; + } + }, + + + position : function(pos, zIndex, x, y){ + if(!pos){ + if(this.getStyle('position') == 'static'){ + this.setStyle('position', 'relative'); + } + }else{ + this.setStyle("position", pos); + } + if(zIndex){ + this.setStyle("z-index", zIndex); + } + if(x !== undefined && y !== undefined){ + this.setXY([x, y]); + }else if(x !== undefined){ + this.setX(x); + }else if(y !== undefined){ + this.setY(y); + } + }, + + + clearPositioning : function(value){ + value = value ||''; + this.setStyle({ + "left": value, + "right": value, + "top": value, + "bottom": value, + "z-index": "", + "position" : "static" + }); + return this; + }, + + + getPositioning : function(){ + var l = this.getStyle("left"); + var t = this.getStyle("top"); + return { + "position" : this.getStyle("position"), + "left" : l, + "right" : l ? "" : this.getStyle("right"), + "top" : t, + "bottom" : t ? "" : this.getStyle("bottom"), + "z-index" : this.getStyle("z-index") + }; + }, + + + getBorderWidth : function(side){ + return this.addStyles(side, El.borders); + }, + + + getPadding : function(side){ + return this.addStyles(side, El.paddings); + }, + + + setPositioning : function(pc){ + this.applyStyles(pc); + if(pc.right == "auto"){ + this.dom.style.right = ""; + } + if(pc.bottom == "auto"){ + this.dom.style.bottom = ""; + } + return this; + }, + + + fixDisplay : function(){ + if(this.getStyle("display") == "none"){ + this.setStyle("visibility", "hidden"); + this.setStyle("display", this.originalDisplay); + if(this.getStyle("display") == "none"){ + this.setStyle("display", "block"); + } + } + }, + + + setLeftTop : function(left, top){ + this.dom.style.left = this.addUnits(left); + this.dom.style.top = this.addUnits(top); + return this; + }, + + + move : function(direction, distance, animate){ + var xy = this.getXY(); + direction = direction.toLowerCase(); + switch(direction){ + case "l": + case "left": + this.moveTo(xy[0]-distance, xy[1], this.preanim(arguments, 2)); + break; + case "r": + case "right": + this.moveTo(xy[0]+distance, xy[1], this.preanim(arguments, 2)); + break; + case "t": + case "top": + case "up": + this.moveTo(xy[0], xy[1]-distance, this.preanim(arguments, 2)); + break; + case "b": + case "bottom": + case "down": + this.moveTo(xy[0], xy[1]+distance, this.preanim(arguments, 2)); + break; + } + return this; + }, + + + clip : function(){ + if(!this.isClipped){ + this.isClipped = true; + this.originalClip = { + "o": this.getStyle("overflow"), + "x": this.getStyle("overflow-x"), + "y": this.getStyle("overflow-y") + }; + this.setStyle("overflow", "hidden"); + this.setStyle("overflow-x", "hidden"); + this.setStyle("overflow-y", "hidden"); + } + return this; + }, + + + unclip : function(){ + if(this.isClipped){ + this.isClipped = false; + var o = this.originalClip; + if(o.o){this.setStyle("overflow", o.o);} + if(o.x){this.setStyle("overflow-x", o.x);} + if(o.y){this.setStyle("overflow-y", o.y);} + } + return this; + }, + + + + getAnchorXY : function(anchor, local, s){ + + + + var w, h, vp = false; + if(!s){ + var d = this.dom; + if(d == document.body || d == document){ + vp = true; + w = D.getViewWidth(); h = D.getViewHeight(); + }else{ + w = this.getWidth(); h = this.getHeight(); + } + }else{ + w = s.width; h = s.height; + } + var x = 0, y = 0, r = Math.round; + switch((anchor || "tl").toLowerCase()){ + case "c": + x = r(w*.5); + y = r(h*.5); + break; + case "t": + x = r(w*.5); + y = 0; + break; + case "l": + x = 0; + y = r(h*.5); + break; + case "r": + x = w; + y = r(h*.5); + break; + case "b": + x = r(w*.5); + y = h; + break; + case "tl": + x = 0; + y = 0; + break; + case "bl": + x = 0; + y = h; + break; + case "br": + x = w; + y = h; + break; + case "tr": + x = w; + y = 0; + break; + } + if(local === true){ + return [x, y]; + } + if(vp){ + var sc = this.getScroll(); + return [x + sc.left, y + sc.top]; + } + + var o = this.getXY(); + return [x+o[0], y+o[1]]; + }, + + + getAlignToXY : function(el, p, o){ + el = Ext.get(el); + if(!el || !el.dom){ + throw "Element.alignToXY with an element that doesn't exist"; + } + var d = this.dom; + var c = false; + var p1 = "", p2 = ""; + o = o || [0,0]; + + if(!p){ + p = "tl-bl"; + }else if(p == "?"){ + p = "tl-bl?"; + }else if(p.indexOf("-") == -1){ + p = "tl-" + p; + } + p = p.toLowerCase(); + var m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); + if(!m){ + throw "Element.alignTo with an invalid alignment " + p; + } + p1 = m[1]; p2 = m[2]; c = !!m[3]; + + + + var a1 = this.getAnchorXY(p1, true); + var a2 = el.getAnchorXY(p2, false); + + var x = a2[0] - a1[0] + o[0]; + var y = a2[1] - a1[1] + o[1]; + + if(c){ + + var w = this.getWidth(), h = this.getHeight(), r = el.getRegion(); + + var dw = D.getViewWidth()-5, dh = D.getViewHeight()-5; + + + + + var p1y = p1.charAt(0), p1x = p1.charAt(p1.length-1); + var p2y = p2.charAt(0), p2x = p2.charAt(p2.length-1); + var swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); + var swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); + + var doc = document; + var scrollX = (doc.documentElement.scrollLeft || doc.body.scrollLeft || 0)+5; + var scrollY = (doc.documentElement.scrollTop || doc.body.scrollTop || 0)+5; + + if((x+w) > dw + scrollX){ + x = swapX ? r.left-w : dw+scrollX-w; + } + if(x < scrollX){ + x = swapX ? r.right : scrollX; + } + if((y+h) > dh + scrollY){ + y = swapY ? r.top-h : dh+scrollY-h; + } + if (y < scrollY){ + y = swapY ? r.bottom : scrollY; + } + } + return [x,y]; + }, + + + getConstrainToXY : function(){ + var os = {top:0, left:0, bottom:0, right: 0}; + + return function(el, local, offsets, proposedXY){ + el = Ext.get(el); + offsets = offsets ? Ext.applyIf(offsets, os) : os; + + var vw, vh, vx = 0, vy = 0; + if(el.dom == document.body || el.dom == document){ + vw = Ext.lib.Dom.getViewWidth(); + vh = Ext.lib.Dom.getViewHeight(); + }else{ + vw = el.dom.clientWidth; + vh = el.dom.clientHeight; + if(!local){ + var vxy = el.getXY(); + vx = vxy[0]; + vy = vxy[1]; + } + } + + var s = el.getScroll(); + + vx += offsets.left + s.left; + vy += offsets.top + s.top; + + vw -= offsets.right; + vh -= offsets.bottom; + + var vr = vx+vw; + var vb = vy+vh; + + var xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]); + var x = xy[0], y = xy[1]; + var w = this.dom.offsetWidth, h = this.dom.offsetHeight; + + + var moved = false; + + + if((x + w) > vr){ + x = vr - w; + moved = true; + } + if((y + h) > vb){ + y = vb - h; + moved = true; + } + + if(x < vx){ + x = vx; + moved = true; + } + if(y < vy){ + y = vy; + moved = true; + } + return moved ? [x, y] : false; + }; + }(), + + + adjustForConstraints : function(xy, parent, offsets){ + return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; + }, + + + alignTo : function(element, position, offsets, animate){ + var xy = this.getAlignToXY(element, position, offsets); + this.setXY(xy, this.preanim(arguments, 3)); + return this; + }, + + + anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){ + var action = function(){ + this.alignTo(el, alignment, offsets, animate); + Ext.callback(callback, this); + }; + Ext.EventManager.onWindowResize(action, this); + var tm = typeof monitorScroll; + if(tm != 'undefined'){ + Ext.EventManager.on(window, 'scroll', action, this, + {buffer: tm == 'number' ? monitorScroll : 50}); + } + action.call(this); + return this; + }, + + clearOpacity : function(){ + if (window.ActiveXObject) { + if(typeof this.dom.style.filter == 'string' && (/alpha/i).test(this.dom.style.filter)){ + this.dom.style.filter = ""; + } + } else { + this.dom.style.opacity = ""; + this.dom.style["-moz-opacity"] = ""; + this.dom.style["-khtml-opacity"] = ""; + } + return this; + }, + + + hide : function(animate){ + this.setVisible(false, this.preanim(arguments, 0)); + return this; + }, + + + show : function(animate){ + this.setVisible(true, this.preanim(arguments, 0)); + return this; + }, + + + addUnits : function(size){ + return Ext.Element.addUnits(size, this.defaultUnit); + }, + + + update : function(html, loadScripts, callback){ + if(typeof html == "undefined"){ + html = ""; + } + if(loadScripts !== true){ + this.dom.innerHTML = html; + if(typeof callback == "function"){ + callback(); + } + return this; + } + var id = Ext.id(); + var dom = this.dom; + + html += ''; + + E.onAvailable(id, function(){ + var hd = document.getElementsByTagName("head")[0]; + var re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig; + var srcRe = /\ssrc=([\'\"])(.*?)\1/i; + var typeRe = /\stype=([\'\"])(.*?)\1/i; + + var match; + while(match = re.exec(html)){ + var attrs = match[1]; + var srcMatch = attrs ? attrs.match(srcRe) : false; + if(srcMatch && srcMatch[2]){ + var s = document.createElement("script"); + s.src = srcMatch[2]; + var typeMatch = attrs.match(typeRe); + if(typeMatch && typeMatch[2]){ + s.type = typeMatch[2]; + } + hd.appendChild(s); + }else if(match[2] && match[2].length > 0){ + if(window.execScript) { + window.execScript(match[2]); + } else { + window.eval(match[2]); + } + } + } + var el = document.getElementById(id); + if(el){Ext.removeNode(el);} + if(typeof callback == "function"){ + callback(); + } + }); + dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); + return this; + }, + + + load : function(){ + var um = this.getUpdater(); + um.update.apply(um, arguments); + return this; + }, + + + getUpdater : function(){ + if(!this.updateManager){ + this.updateManager = new Ext.Updater(this); + } + return this.updateManager; + }, + + + unselectable : function(){ + this.dom.unselectable = "on"; + this.swallowEvent("selectstart", true); + this.applyStyles("-moz-user-select:none;-khtml-user-select:none;"); + this.addClass("x-unselectable"); + return this; + }, + + + getCenterXY : function(){ + return this.getAlignToXY(document, 'c-c'); + }, + + + center : function(centerIn){ + this.alignTo(centerIn || document, 'c-c'); + return this; + }, + + + isBorderBox : function(){ + return noBoxAdjust[this.dom.tagName.toLowerCase()] || Ext.isBorderBox; + }, + + + getBox : function(contentBox, local){ + var xy; + if(!local){ + xy = this.getXY(); + }else{ + var left = parseInt(this.getStyle("left"), 10) || 0; + var top = parseInt(this.getStyle("top"), 10) || 0; + xy = [left, top]; + } + var el = this.dom, w = el.offsetWidth, h = el.offsetHeight, bx; + if(!contentBox){ + bx = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: w, height: h}; + }else{ + var l = this.getBorderWidth("l")+this.getPadding("l"); + var r = this.getBorderWidth("r")+this.getPadding("r"); + var t = this.getBorderWidth("t")+this.getPadding("t"); + var b = this.getBorderWidth("b")+this.getPadding("b"); + bx = {x: xy[0]+l, y: xy[1]+t, 0: xy[0]+l, 1: xy[1]+t, width: w-(l+r), height: h-(t+b)}; + } + bx.right = bx.x + bx.width; + bx.bottom = bx.y + bx.height; + return bx; + }, + + + getFrameWidth : function(sides, onlyContentBox){ + return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); + }, + + + setBox : function(box, adjust, animate){ + var w = box.width, h = box.height; + if((adjust && !this.autoBoxAdjust) && !this.isBorderBox()){ + w -= (this.getBorderWidth("lr") + this.getPadding("lr")); + h -= (this.getBorderWidth("tb") + this.getPadding("tb")); + } + this.setBounds(box.x, box.y, w, h, this.preanim(arguments, 2)); + return this; + }, + + + repaint : function(){ + var dom = this.dom; + this.addClass("x-repaint"); + setTimeout(function(){ + Ext.get(dom).removeClass("x-repaint"); + }, 1); + return this; + }, + + + getMargins : function(side){ + if(!side){ + return { + top: parseInt(this.getStyle("margin-top"), 10) || 0, + left: parseInt(this.getStyle("margin-left"), 10) || 0, + bottom: parseInt(this.getStyle("margin-bottom"), 10) || 0, + right: parseInt(this.getStyle("margin-right"), 10) || 0 + }; + }else{ + return this.addStyles(side, El.margins); + } + }, + + + addStyles : function(sides, styles){ + var val = 0, v, w; + for(var i = 0, len = sides.length; i < len; i++){ + v = this.getStyle(styles[sides.charAt(i)]); + if(v){ + w = parseInt(v, 10); + if(w){ val += (w >= 0 ? w : -1 * w); } + } + } + return val; + }, + + + createProxy : function(config, renderTo, matchBox){ + config = typeof config == "object" ? + config : {tag : "div", cls: config}; + + var proxy; + if(renderTo){ + proxy = Ext.DomHelper.append(renderTo, config, true); + }else { + proxy = Ext.DomHelper.insertBefore(this.dom, config, true); + } + if(matchBox){ + proxy.setBox(this.getBox()); + } + return proxy; + }, + + + mask : function(msg, msgCls){ + if(this.getStyle("position") == "static"){ + this.setStyle("position", "relative"); + } + if(this._maskMsg){ + this._maskMsg.remove(); + } + if(this._mask){ + this._mask.remove(); + } + + this._mask = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask"}, true); + + this.addClass("x-masked"); + this._mask.setDisplayed(true); + if(typeof msg == 'string'){ + this._maskMsg = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask-msg", cn:{tag:'div'}}, true); + var mm = this._maskMsg; + mm.dom.className = msgCls ? "ext-el-mask-msg " + msgCls : "ext-el-mask-msg"; + mm.dom.firstChild.innerHTML = msg; + mm.setDisplayed(true); + mm.center(this); + } + if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && this.getStyle('height') == 'auto'){ + this._mask.setSize(this.dom.clientWidth, this.getHeight()); + } + return this._mask; + }, + + + unmask : function(){ + if(this._mask){ + if(this._maskMsg){ + this._maskMsg.remove(); + delete this._maskMsg; + } + this._mask.remove(); + delete this._mask; + } + this.removeClass("x-masked"); + }, + + + isMasked : function(){ + return this._mask && this._mask.isVisible(); + }, + + + createShim : function(){ + var el = document.createElement('iframe'); + el.frameBorder = 'no'; + el.className = 'ext-shim'; + if(Ext.isIE && Ext.isSecure){ + el.src = Ext.SSL_SECURE_URL; + } + var shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); + shim.autoBoxAdjust = false; + return shim; + }, + + + remove : function(){ + Ext.removeNode(this.dom); + delete El.cache[this.dom.id]; + }, + + + hover : function(overFn, outFn, scope){ + var preOverFn = function(e){ + if(!e.within(this, true)){ + overFn.apply(scope || this, arguments); + } + }; + var preOutFn = function(e){ + if(!e.within(this, true)){ + outFn.apply(scope || this, arguments); + } + }; + this.on("mouseover", preOverFn, this.dom); + this.on("mouseout", preOutFn, this.dom); + return this; + }, + + + addClassOnOver : function(className, preventFlicker){ + this.hover( + function(){ + Ext.fly(this, '_internal').addClass(className); + }, + function(){ + Ext.fly(this, '_internal').removeClass(className); + } + ); + return this; + }, + + + addClassOnFocus : function(className){ + this.on("focus", function(){ + Ext.fly(this, '_internal').addClass(className); + }, this.dom); + this.on("blur", function(){ + Ext.fly(this, '_internal').removeClass(className); + }, this.dom); + return this; + }, + + addClassOnClick : function(className){ + var dom = this.dom; + this.on("mousedown", function(){ + Ext.fly(dom, '_internal').addClass(className); + var d = Ext.getDoc(); + var fn = function(){ + Ext.fly(dom, '_internal').removeClass(className); + d.removeListener("mouseup", fn); + }; + d.on("mouseup", fn); + }); + return this; + }, + + + swallowEvent : function(eventName, preventDefault){ + var fn = function(e){ + e.stopPropagation(); + if(preventDefault){ + e.preventDefault(); + } + }; + if(eventName instanceof Array){ + for(var i = 0, len = eventName.length; i < len; i++){ + this.on(eventName[i], fn); + } + return this; + } + this.on(eventName, fn); + return this; + }, + + + 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){ + if(n.nodeType == 1 && (!selector || Ext.DomQuery.is(n, selector))){ + return !returnDom ? Ext.get(n) : n; + } + n = n[dir]; + } + return null; + }, + + + appendChild: function(el){ + el = Ext.get(el); + el.appendTo(this); + return this; + }, + + + createChild: function(config, insertBefore, returnDom){ + config = config || {tag:'div'}; + if(insertBefore){ + return Ext.DomHelper.insertBefore(insertBefore, config, returnDom !== true); + } + return Ext.DomHelper[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); + }, + + + appendTo: function(el){ + el = Ext.getDom(el); + el.appendChild(this.dom); + return this; + }, + + + insertBefore: function(el){ + el = Ext.getDom(el); + el.parentNode.insertBefore(this.dom, el); + return this; + }, + + + insertAfter: function(el){ + el = Ext.getDom(el); + el.parentNode.insertBefore(this.dom, el.nextSibling); + return this; + }, + + + insertFirst: function(el, returnDom){ + el = el || {}; + if(typeof el == 'object' && !el.nodeType){ + return this.createChild(el, this.dom.firstChild, returnDom); + }else{ + el = Ext.getDom(el); + this.dom.insertBefore(el, this.dom.firstChild); + return !returnDom ? Ext.get(el) : el; + } + }, + + + insertSibling: function(el, where, returnDom){ + var rt; + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++){ + rt = this.insertSibling(el[i], where, returnDom); + } + return rt; + } + where = where ? where.toLowerCase() : 'before'; + el = el || {}; + var refNode = where == 'before' ? this.dom : this.dom.nextSibling; + + if(typeof el == 'object' && !el.nodeType){ + if(where == 'after' && !this.dom.nextSibling){ + rt = Ext.DomHelper.append(this.dom.parentNode, el, !returnDom); + }else{ + rt = Ext.DomHelper[where == 'after' ? 'insertAfter' : 'insertBefore'](this.dom, el, !returnDom); + } + + }else{ + rt = this.dom.parentNode.insertBefore(Ext.getDom(el), refNode); + if(!returnDom){ + rt = Ext.get(rt); + } + } + return rt; + }, + + + wrap: function(config, returnDom){ + if(!config){ + config = {tag: "div"}; + } + var newEl = Ext.DomHelper.insertBefore(this.dom, config, !returnDom); + newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); + return newEl; + }, + + + replace: function(el){ + el = Ext.get(el); + this.insertBefore(el); + el.remove(); + return this; + }, + + + replaceWith: function(el){ + if(typeof el == 'object' && !el.nodeType){ + el = this.insertSibling(el, 'before'); + }else{ + el = Ext.getDom(el); + this.dom.parentNode.insertBefore(el, this.dom); + } + El.uncache(this.id); + this.dom.parentNode.removeChild(this.dom); + this.dom = el; + this.id = Ext.id(el); + El.cache[this.id] = this; + return this; + }, + + + insertHtml : function(where, html, returnEl){ + var el = Ext.DomHelper.insertHtml(where, this.dom, html); + return returnEl ? Ext.get(el) : el; + }, + + + set : function(o, useSet){ + var el = this.dom; + useSet = typeof useSet == 'undefined' ? (el.setAttribute ? true : false) : useSet; + for(var attr in o){ + if(attr == "style" || typeof o[attr] == "function") continue; + if(attr=="cls"){ + el.className = o["cls"]; + }else if(o.hasOwnProperty(attr)){ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + if(o.style){ + Ext.DomHelper.applyStyles(el, o.style); + } + return this; + }, + + + addKeyListener : function(key, fn, scope){ + var config; + if(typeof key != "object" || key instanceof Array){ + config = { + key: key, + fn: fn, + scope: scope + }; + }else{ + config = { + key : key.key, + shift : key.shift, + ctrl : key.ctrl, + alt : key.alt, + fn: fn, + scope: scope + }; + } + return new Ext.KeyMap(this, config); + }, + + + addKeyMap : function(config){ + return new Ext.KeyMap(this, config); + }, + + + isScrollable : function(){ + var dom = this.dom; + return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth; + }, + + + scrollTo : function(side, value, animate){ + var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop"; + if(!animate || !A){ + this.dom[prop] = value; + }else{ + var to = prop == "scrollLeft" ? [value, this.dom.scrollTop] : [this.dom.scrollLeft, value]; + this.anim({scroll: {"to": to}}, this.preanim(arguments, 2), 'scroll'); + } + return this; + }, + + + scroll : function(direction, distance, animate){ + if(!this.isScrollable()){ + return; + } + var el = this.dom; + var l = el.scrollLeft, t = el.scrollTop; + var w = el.scrollWidth, h = el.scrollHeight; + var cw = el.clientWidth, ch = el.clientHeight; + direction = direction.toLowerCase(); + var scrolled = false; + var a = this.preanim(arguments, 2); + switch(direction){ + case "l": + case "left": + if(w - l > cw){ + var v = Math.min(l + distance, w-cw); + this.scrollTo("left", v, a); + scrolled = true; + } + break; + case "r": + case "right": + if(l > 0){ + var v = Math.max(l - distance, 0); + this.scrollTo("left", v, a); + scrolled = true; + } + break; + case "t": + case "top": + case "up": + if(t > 0){ + var v = Math.max(t - distance, 0); + this.scrollTo("top", v, a); + scrolled = true; + } + break; + case "b": + case "bottom": + case "down": + if(h - t > ch){ + var v = Math.min(t + distance, h-ch); + this.scrollTo("top", v, a); + scrolled = true; + } + break; + } + return scrolled; + }, + + + translatePoints : function(x, y){ + if(typeof x == 'object' || x instanceof Array){ + y = x[1]; x = x[0]; + } + var p = this.getStyle('position'); + var o = this.getXY(); + + var l = parseInt(this.getStyle('left'), 10); + var t = parseInt(this.getStyle('top'), 10); + + if(isNaN(l)){ + l = (p == "relative") ? 0 : this.dom.offsetLeft; + } + if(isNaN(t)){ + t = (p == "relative") ? 0 : this.dom.offsetTop; + } + + return {left: (x - o[0] + l), top: (y - o[1] + t)}; + }, + + + getScroll : function(){ + var d = this.dom, doc = document; + if(d == doc || d == doc.body){ + var l, t; + if(Ext.isIE && Ext.isStrict){ + l = doc.documentElement.scrollLeft || (doc.body.scrollLeft || 0); + t = doc.documentElement.scrollTop || (doc.body.scrollTop || 0); + }else{ + l = window.pageXOffset || (doc.body.scrollLeft || 0); + t = window.pageYOffset || (doc.body.scrollTop || 0); + } + return {left: l, top: t}; + }else{ + return {left: d.scrollLeft, top: d.scrollTop}; + } + }, + + + getColor : function(attr, defaultValue, prefix){ + var v = this.getStyle(attr); + if(!v || v == "transparent" || v == "inherit") { + return defaultValue; + } + var color = typeof prefix == "undefined" ? "#" : prefix; + if(v.substr(0, 4) == "rgb("){ + var rvs = v.slice(4, v.length -1).split(","); + for(var i = 0; i < 3; i++){ + var h = parseInt(rvs[i]); + var s = h.toString(16); + if(h < 16){ + s = "0" + s; + } + color += s; + } + } else { + if(v.substr(0, 1) == "#"){ + if(v.length == 4) { + for(var i = 1; i < 4; i++){ + var c = v.charAt(i); + color += c + c; + } + }else if(v.length == 7){ + color += v.substr(1); + } + } + } + return(color.length > 5 ? color.toLowerCase() : defaultValue); + }, + + + boxWrap : function(cls){ + cls = cls || 'x-box'; + var el = Ext.get(this.insertHtml('beforeBegin', String.format('
'+El.boxMarkup+'
', cls))); + el.child('.'+cls+'-mc').dom.appendChild(this.dom); + return el; + }, + + + getAttributeNS : Ext.isIE ? function(ns, name){ + var d = this.dom; + var type = typeof d[ns+":"+name]; + if(type != 'undefined' && type != 'unknown'){ + return d[ns+":"+name]; + } + return d[name]; + } : function(ns, name){ + var d = this.dom; + return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name]; + }, + + 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); + } +}; + +var ep = El.prototype; + + +ep.on = ep.addListener; + +ep.mon = ep.addListener; + +ep.getUpdateManager = ep.getUpdater; + + +ep.un = ep.removeListener; + + +ep.autoBoxAdjust = true; + + +El.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i; + + +El.addUnits = function(v, defaultUnit){ + if(v === "" || v == "auto"){ + return v; + } + if(v === undefined){ + return ''; + } + if(typeof v == "number" || !El.unitPattern.test(v)){ + return v + (defaultUnit || 'px'); + } + return v; +}; + + +El.boxMarkup = '
'; + +El.VISIBILITY = 1; + +El.DISPLAY = 2; + +El.borders = {l: "border-left-width", r: "border-right-width", t: "border-top-width", b: "border-bottom-width"}; +El.paddings = {l: "padding-left", r: "padding-right", t: "padding-top", b: "padding-bottom"}; +El.margins = {l: "margin-left", r: "margin-right", t: "margin-top", b: "margin-bottom"}; + + + + +El.cache = {}; + +var docEl; + + +El.get = function(el){ + var ex, elm, id; + if(!el){ return null; } + if(typeof el == "string"){ + if(!(elm = document.getElementById(el))){ + return null; + } + if(ex = El.cache[el]){ + ex.dom = elm; + }else{ + ex = El.cache[el] = new El(elm); + } + return ex; + }else if(el.tagName){ + if(!(id = el.id)){ + id = Ext.id(el); + } + if(ex = El.cache[id]){ + ex.dom = el; + }else{ + ex = El.cache[id] = new El(el); + } + return ex; + }else if(el instanceof El){ + if(el != docEl){ + el.dom = document.getElementById(el.id) || el.dom; + + El.cache[el.id] = el; + } + return el; + }else if(el.isComposite){ + return el; + }else if(el instanceof Array){ + return El.select(el); + }else if(el == document){ + + if(!docEl){ + var f = function(){}; + f.prototype = El.prototype; + docEl = new f(); + docEl.dom = document; + } + return docEl; + } + return null; +}; + + +El.uncache = function(el){ + for(var i = 0, a = arguments, len = a.length; i < len; i++) { + if(a[i]){ + delete El.cache[a[i].id || a[i]]; + } + } +}; + + + + +El.garbageCollect = function(){ + if(!Ext.enableGarbageCollector){ + clearInterval(El.collectorThread); + return; + } + for(var eid in El.cache){ + var el = El.cache[eid], d = el.dom; + + + + + + + + + + + + + + + + + + if(!d || !d.parentNode || (!d.offsetParent && !document.getElementById(eid))){ + delete El.cache[eid]; + if(d && Ext.enableListenerCollection){ + E.purgeElement(d); + } + } + } +} +El.collectorThreadId = setInterval(El.garbageCollect, 30000); + +var flyFn = function(){}; +flyFn.prototype = El.prototype; +var _cls = new flyFn(); + + +El.Flyweight = function(dom){ + this.dom = dom; +}; + +El.Flyweight.prototype = _cls; +El.Flyweight.prototype.isFlyweight = true; + +El._flyweights = {}; + +El.fly = function(el, named){ + named = named || '_global'; + el = Ext.getDom(el); + if(!el){ + return null; + } + if(!El._flyweights[named]){ + El._flyweights[named] = new El.Flyweight(); + } + El._flyweights[named].dom = el; + return El._flyweights[named]; +}; + + +Ext.get = El.get; + +Ext.fly = El.fly; + + +var noBoxAdjust = Ext.isStrict ? { + select:1 +} : { + input:1, select:1, textarea:1 +}; +if(Ext.isIE || Ext.isGecko){ + noBoxAdjust['button'] = 1; +} + + +Ext.EventManager.on(window, 'unload', function(){ + delete El.cache; + delete El._flyweights; +}); +})(); + +Ext.enableFx = true; + + +Ext.Fx = { + + slideIn : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + + anchor = anchor || "t"; + + this.fixDisplay(); + + var r = this.getFxRestore(); + var b = this.getBox(); + this.setSize(b); + + var wrap = this.fxWrap(r.pos, o, "hidden"); + + var st = this.dom.style; + st.visibility = "visible"; + st.position = "absolute"; + + var after = function(){ + el.fxUnwrap(wrap, r.pos, o); + st.width = r.width; + st.height = r.height; + el.afterFx(o); + }; + var a, pt = {to: [b.x, b.y]}, bw = {to: b.width}, bh = {to: b.height}; + + switch(anchor.toLowerCase()){ + case "t": + wrap.setSize(b.width, 0); + st.left = st.bottom = "0"; + a = {height: bh}; + break; + case "l": + wrap.setSize(0, b.height); + st.right = st.top = "0"; + a = {width: bw}; + break; + case "r": + wrap.setSize(0, b.height); + wrap.setX(b.right); + st.left = st.top = "0"; + a = {width: bw, points: pt}; + break; + case "b": + wrap.setSize(b.width, 0); + wrap.setY(b.bottom); + st.left = st.top = "0"; + a = {height: bh, points: pt}; + break; + case "tl": + wrap.setSize(0, 0); + st.right = st.bottom = "0"; + a = {width: bw, height: bh}; + break; + case "bl": + wrap.setSize(0, 0); + wrap.setY(b.y+b.height); + st.right = st.top = "0"; + a = {width: bw, height: bh, points: pt}; + break; + case "br": + wrap.setSize(0, 0); + wrap.setXY([b.right, b.bottom]); + st.left = st.top = "0"; + a = {width: bw, height: bh, points: pt}; + break; + case "tr": + wrap.setSize(0, 0); + wrap.setX(b.x+b.width); + st.left = st.bottom = "0"; + a = {width: bw, height: bh, points: pt}; + break; + } + this.dom.style.visibility = "visible"; + wrap.show(); + + arguments.callee.anim = wrap.fxanim(a, + o, + 'motion', + .5, + 'easeOut', after); + }); + return this; + }, + + + slideOut : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + + anchor = anchor || "t"; + + var r = this.getFxRestore(); + + var b = this.getBox(); + this.setSize(b); + + var wrap = this.fxWrap(r.pos, o, "visible"); + + var st = this.dom.style; + st.visibility = "visible"; + st.position = "absolute"; + + wrap.setSize(b); + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.fxUnwrap(wrap, r.pos, o); + + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + var a, zero = {to: 0}; + switch(anchor.toLowerCase()){ + case "t": + st.left = st.bottom = "0"; + a = {height: zero}; + break; + case "l": + st.right = st.top = "0"; + a = {width: zero}; + break; + case "r": + st.left = st.top = "0"; + a = {width: zero, points: {to:[b.right, b.y]}}; + break; + case "b": + st.left = st.top = "0"; + a = {height: zero, points: {to:[b.x, b.bottom]}}; + break; + case "tl": + st.right = st.bottom = "0"; + a = {width: zero, height: zero}; + break; + case "bl": + st.right = st.top = "0"; + a = {width: zero, height: zero, points: {to:[b.x, b.bottom]}}; + break; + case "br": + st.left = st.top = "0"; + a = {width: zero, height: zero, points: {to:[b.x+b.width, b.bottom]}}; + break; + case "tr": + st.left = st.bottom = "0"; + a = {width: zero, height: zero, points: {to:[b.right, b.y]}}; + break; + } + + arguments.callee.anim = wrap.fxanim(a, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + + puff : function(o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + this.clearOpacity(); + this.show(); + + var r = this.getFxRestore(); + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + st.fontSize = ''; + el.afterFx(o); + }; + + var width = this.getWidth(); + var height = this.getHeight(); + + arguments.callee.anim = this.fxanim({ + width : {to: this.adjustWidth(width * 2)}, + height : {to: this.adjustHeight(height * 2)}, + points : {by: [-(width * .5), -(height * .5)]}, + opacity : {to: 0}, + fontSize: {to:200, unit: "%"} + }, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + + switchOff : function(o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + this.clearOpacity(); + this.clip(); + + var r = this.getFxRestore(); + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + this.fxanim({opacity:{to:0.3}}, null, null, .1, null, function(){ + this.clearOpacity(); + (function(){ + this.fxanim({ + height:{to:1}, + points:{by:[0, this.getHeight() * .5]} + }, o, 'motion', 0.3, 'easeIn', after); + }).defer(100, this); + }); + }); + return this; + }, + + + highlight : function(color, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + color = color || "ffff9c"; + var attr = o.attr || "backgroundColor"; + + this.clearOpacity(); + this.show(); + + var origColor = this.getColor(attr); + var restoreColor = this.dom.style[attr]; + var endColor = (o.endColor || origColor) || "ffffff"; + + var after = function(){ + el.dom.style[attr] = restoreColor; + el.afterFx(o); + }; + + var a = {}; + a[attr] = {from: color, to: endColor}; + arguments.callee.anim = this.fxanim(a, + o, + 'color', + 1, + 'easeIn', after); + }); + return this; + }, + + + frame : function(color, count, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + color = color || "#C3DAF9"; + if(color.length == 6){ + color = "#" + color; + } + count = count || 1; + var duration = o.duration || 1; + this.show(); + + var b = this.getBox(); + var animFn = function(){ + var proxy = Ext.getBody().createChild({ + style:{ + visbility:"hidden", + position:"absolute", + "z-index":"35000", border:"0px solid " + color + } + }); + var scale = Ext.isBorderBox ? 2 : 1; + proxy.animate({ + top:{from:b.y, to:b.y - 20}, + left:{from:b.x, to:b.x - 20}, + borderWidth:{from:0, to:10}, + opacity:{from:1, to:0}, + height:{from:b.height, to:(b.height + (20*scale))}, + width:{from:b.width, to:(b.width + (20*scale))} + }, duration, function(){ + proxy.remove(); + if(--count > 0){ + animFn(); + }else{ + el.afterFx(o); + } + }); + }; + animFn.call(this); + }); + return this; + }, + + + pause : function(seconds){ + var el = this.getFxEl(); + var o = {}; + + el.queueFx(o, function(){ + setTimeout(function(){ + el.afterFx(o); + }, seconds * 1000); + }); + return this; + }, + + + fadeIn : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + this.setOpacity(0); + this.fixDisplay(); + this.dom.style.visibility = 'visible'; + var to = o.endOpacity || 1; + arguments.callee.anim = this.fxanim({opacity:{to:to}}, + o, null, .5, "easeOut", function(){ + if(to == 1){ + this.clearOpacity(); + } + el.afterFx(o); + }); + }); + return this; + }, + + + fadeOut : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, + o, null, .5, "easeOut", function(){ + if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ + this.dom.style.display = "none"; + }else{ + this.dom.style.visibility = "hidden"; + } + this.clearOpacity(); + el.afterFx(o); + }); + }); + return this; + }, + + + scale : function(w, h, o){ + this.shift(Ext.apply({}, o, { + width: w, + height: h + })); + return this; + }, + + + shift : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + var a = {}, w = o.width, h = o.height, x = o.x, y = o.y, op = o.opacity; + if(w !== undefined){ + a.width = {to: this.adjustWidth(w)}; + } + if(h !== undefined){ + a.height = {to: this.adjustHeight(h)}; + } + if(x !== undefined || y !== undefined){ + a.points = {to: [ + x !== undefined ? x : this.getX(), + y !== undefined ? y : this.getY() + ]}; + } + if(op !== undefined){ + a.opacity = {to: op}; + } + if(o.xy !== undefined){ + a.points = {to: o.xy}; + } + arguments.callee.anim = this.fxanim(a, + o, 'motion', .35, "easeOut", function(){ + el.afterFx(o); + }); + }); + return this; + }, + + + ghost : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + anchor = anchor || "b"; + + var r = this.getFxRestore(); + var w = this.getWidth(), + h = this.getHeight(); + + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + var a = {opacity: {to: 0}, points: {}}, pt = a.points; + switch(anchor.toLowerCase()){ + case "t": + pt.by = [0, -h]; + break; + case "l": + pt.by = [-w, 0]; + break; + case "r": + pt.by = [w, 0]; + break; + case "b": + pt.by = [0, h]; + break; + case "tl": + pt.by = [-w, -h]; + break; + case "bl": + pt.by = [-w, h]; + break; + case "br": + pt.by = [w, h]; + break; + case "tr": + pt.by = [w, -h]; + break; + } + + arguments.callee.anim = this.fxanim(a, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + + syncFx : function(){ + this.fxDefaults = Ext.apply(this.fxDefaults || {}, { + block : false, + concurrent : true, + stopFx : false + }); + return this; + }, + + + sequenceFx : function(){ + this.fxDefaults = Ext.apply(this.fxDefaults || {}, { + block : false, + concurrent : false, + stopFx : false + }); + return this; + }, + + + nextFx : function(){ + var ef = this.fxQueue[0]; + if(ef){ + ef.call(this); + } + }, + + + hasActiveFx : function(){ + return this.fxQueue && this.fxQueue[0]; + }, + + + stopFx : function(){ + if(this.hasActiveFx()){ + var cur = this.fxQueue[0]; + if(cur && cur.anim && cur.anim.isAnimated()){ + this.fxQueue = [cur]; cur.anim.stop(true); + } + } + return this; + }, + + + beforeFx : function(o){ + if(this.hasActiveFx() && !o.concurrent){ + if(o.stopFx){ + this.stopFx(); + return true; + } + return false; + } + return true; + }, + + + hasFxBlock : function(){ + var q = this.fxQueue; + return q && q[0] && q[0].block; + }, + + + queueFx : function(o, fn){ + if(!this.fxQueue){ + this.fxQueue = []; + } + if(!this.hasFxBlock()){ + Ext.applyIf(o, this.fxDefaults); + if(!o.concurrent){ + var run = this.beforeFx(o); + fn.block = o.block; + this.fxQueue.push(fn); + if(run){ + this.nextFx(); + } + }else{ + fn.call(this); + } + } + return this; + }, + + + fxWrap : function(pos, o, vis){ + var wrap; + if(!o.wrap || !(wrap = Ext.get(o.wrap))){ + var wrapXY; + if(o.fixPosition){ + wrapXY = this.getXY(); + } + var div = document.createElement("div"); + div.style.visibility = vis; + wrap = Ext.get(this.dom.parentNode.insertBefore(div, this.dom)); + wrap.setPositioning(pos); + if(wrap.getStyle("position") == "static"){ + wrap.position("relative"); + } + this.clearPositioning('auto'); + wrap.clip(); + wrap.dom.appendChild(this.dom); + if(wrapXY){ + wrap.setXY(wrapXY); + } + } + return wrap; + }, + + + fxUnwrap : function(wrap, pos, o){ + this.clearPositioning(); + this.setPositioning(pos); + if(!o.wrap){ + wrap.dom.parentNode.insertBefore(this.dom, wrap.dom); + wrap.remove(); + } + }, + + + getFxRestore : function(){ + var st = this.dom.style; + return {pos: this.getPositioning(), width: st.width, height : st.height}; + }, + + + afterFx : function(o){ + if(o.afterStyle){ + this.applyStyles(o.afterStyle); + } + if(o.afterCls){ + this.addClass(o.afterCls); + } + if(o.remove === true){ + this.remove(); + } + Ext.callback(o.callback, o.scope, [this]); + if(!o.concurrent){ + this.fxQueue.shift(); + this.nextFx(); + } + }, + + + getFxEl : function(){ return Ext.get(this.dom); + }, + + + fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){ + animType = animType || 'run'; + opt = opt || {}; + var anim = Ext.lib.Anim[animType]( + this.dom, args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || 'easeOut', + function(){ + Ext.callback(cb, this); + }, + this + ); + opt.anim = anim; + return anim; + } +}; + +Ext.Fx.resize = Ext.Fx.scale; + +Ext.apply(Ext.Element.prototype, Ext.Fx); + + +Ext.CompositeElement = function(els){ + this.elements = []; + this.addElements(els); +}; +Ext.CompositeElement.prototype = { + isComposite: true, + addElements : function(els){ + if(!els) return this; + if(typeof els == "string"){ + els = Ext.Element.selectorFunction(els); + } + var yels = this.elements; + var index = yels.length-1; + for(var i = 0, len = els.length; i < len; i++) { + yels[++index] = Ext.get(els[i]); + } + return this; + }, + + + fill : function(els){ + this.elements = []; + this.add(els); + return this; + }, + + + filter : function(selector){ + var els = []; + this.each(function(el){ + if(el.is(selector)){ + els[els.length] = el.dom; + } + }); + this.fill(els); + return this; + }, + + invoke : function(fn, args){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++) { + Ext.Element.prototype[fn].apply(els[i], args); + } + return this; + }, + + add : function(els){ + if(typeof els == "string"){ + this.addElements(Ext.Element.selectorFunction(els)); + }else if(els.length !== undefined){ + this.addElements(els); + }else{ + this.addElements([els]); + } + return this; + }, + + each : function(fn, scope){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++){ + if(fn.call(scope || els[i], els[i], this, i) === false) { + break; + } + } + return this; + }, + + + item : function(index){ + return this.elements[index] || null; + }, + + + first : function(){ + return this.item(0); + }, + + + last : function(){ + return this.item(this.elements.length-1); + }, + + + getCount : function(){ + return this.elements.length; + }, + + + contains : function(el){ + return this.indexOf(el) !== -1; + }, + + + indexOf : function(el){ + return this.elements.indexOf(Ext.get(el)); + }, + + + + removeElement : function(el, removeDom){ + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++){ + this.removeElement(el[i]); + } + return this; + } + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1 && this.elements[index]){ + if(removeDom){ + var d = this.elements[index]; + if(d.dom){ + d.remove(); + }else{ + Ext.removeNode(d); + } + } + this.elements.splice(index, 1); + } + return this; + }, + + + replaceElement : function(el, replacement, domReplace){ + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1){ + if(domReplace){ + this.elements[index].replaceWith(replacement); + }else{ + this.elements.splice(index, 1, Ext.get(replacement)) + } + } + return this; + }, + + + clear : function(){ + this.elements = []; + } +}; +(function(){ +Ext.CompositeElement.createCall = function(proto, fnName){ + if(!proto[fnName]){ + proto[fnName] = function(){ + return this.invoke(fnName, arguments); + }; + } +}; +for(var fnName in Ext.Element.prototype){ + if(typeof Ext.Element.prototype[fnName] == "function"){ + Ext.CompositeElement.createCall(Ext.CompositeElement.prototype, fnName); + } +}; +})(); + + +Ext.CompositeElementLite = function(els){ + Ext.CompositeElementLite.superclass.constructor.call(this, els); + this.el = new Ext.Element.Flyweight(); +}; +Ext.extend(Ext.CompositeElementLite, Ext.CompositeElement, { + addElements : function(els){ + if(els){ + if(els instanceof Array){ + this.elements = this.elements.concat(els); + }else{ + var yels = this.elements; + var index = yels.length-1; + for(var i = 0, len = els.length; i < len; i++) { + yels[++index] = els[i]; + } + } + } + return this; + }, + invoke : function(fn, args){ + var els = this.elements; + var el = this.el; + for(var i = 0, len = els.length; i < len; i++) { + el.dom = els[i]; + Ext.Element.prototype[fn].apply(el, args); + } + return this; + }, + + item : function(index){ + if(!this.elements[index]){ + return null; + } + this.el.dom = this.elements[index]; + return this.el; + }, + + + addListener : function(eventName, handler, scope, opt){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++) { + Ext.EventManager.on(els[i], eventName, handler, scope || els[i], opt); + } + return this; + }, + + + each : function(fn, scope){ + var els = this.elements; + var el = this.el; + for(var i = 0, len = els.length; i < len; i++){ + el.dom = els[i]; + if(fn.call(scope || el, el, this, i) === false){ + break; + } + } + return this; + }, + + indexOf : function(el){ + return this.elements.indexOf(Ext.getDom(el)); + }, + + replaceElement : function(el, replacement, domReplace){ + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1){ + replacement = Ext.getDom(replacement); + if(domReplace){ + var d = this.elements[index]; + d.parentNode.insertBefore(replacement, d); + Ext.removeNode(d); + } + this.elements.splice(index, 1, replacement); + } + return this; + } +}); +Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; +if(Ext.DomQuery){ + Ext.Element.selectorFunction = Ext.DomQuery.select; +} + +Ext.Element.select = function(selector, unique, root){ + var els; + if(typeof selector == "string"){ + els = Ext.Element.selectorFunction(selector, root); + }else if(selector.length !== undefined){ + els = selector; + }else{ + throw "Invalid selector"; + } + if(unique === true){ + return new Ext.CompositeElement(els); + }else{ + return new Ext.CompositeElementLite(els); + } +}; + +Ext.select = Ext.Element.select; + +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, + + + request : function(o){ + if(this.fireEvent("beforerequest", this, o) !== false){ + var p = o.params; + + if(typeof p == "function"){ + p = p.call(o.scope||window, o); + } + if(typeof p == "object"){ + p = Ext.urlEncode(p); + } + if(this.extraParams){ + var extras = Ext.urlEncode(this.extraParams); + p = p ? (p + '&' + extras) : extras; + } + + var url = o.url || this.url; + if(typeof url == 'function'){ + url = url.call(o.scope||window, o); + } + + if(o.form){ + var form = Ext.getDom(o.form); + url = url || form.action; + + var enctype = form.getAttribute("enctype"); + if(o.isUpload || (enctype && enctype.toLowerCase() == 'multipart/form-data')){ + return this.doFormUpload(o, p, url); + } + var f = Ext.lib.Ajax.serializeForm(form); + p = p ? (p + '&' + f) : f; + } + + var hs = o.headers; + if(this.defaultHeaders){ + hs = Ext.apply(hs || {}, this.defaultHeaders); + if(!o.headers){ + o.headers = hs; + } + } + + var cb = { + success: this.handleResponse, + failure: this.handleFailure, + scope: this, + argument: {options: o}, + timeout : this.timeout + }; + + var method = o.method||this.method||(p ? "POST" : "GET"); + + if(method == 'GET' && (this.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ + url += (url.indexOf('?') != -1 ? '&' : '?') + '_dc=' + (new Date().getTime()); + } + + if(typeof o.autoAbort == 'boolean'){ + if(o.autoAbort){ + this.abort(); + } + }else if(this.autoAbort !== false){ + this.abort(); + } + if((method == 'GET' && p) || o.xmlData || o.jsonData){ + url += (url.indexOf('?') != -1 ? '&' : '?') + p; + p = ''; + } + this.transId = Ext.lib.Ajax.request(method, url, cb, p, o); + return this.transId; + }else{ + Ext.callback(o.callback, o.scope, [o, null, null]); + return null; + } + }, + + + isLoading : function(transId){ + if(transId){ + return Ext.lib.Ajax.isCallInProgress(transId); + }else{ + return this.transId ? true : false; + } + }, + + + 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; + response.argument = options ? options.argument : null; + this.fireEvent("requestcomplete", this, response, options); + Ext.callback(options.success, options.scope, [response, options]); + Ext.callback(options.callback, options.scope, [options, true, response]); + }, + + + handleFailure : function(response, e){ + this.transId = false; + var options = response.argument.options; + response.argument = options ? options.argument : null; + this.fireEvent("requestexception", this, response, options, e); + Ext.callback(options.failure, options.scope, [response, options]); + Ext.callback(options.callback, options.scope, [options, false, response]); + }, + + + doFormUpload : function(o, ps, url){ + var id = Ext.id(); + var frame = document.createElement('iframe'); + frame.id = id; + frame.name = id; + frame.className = 'x-hidden'; + if(Ext.isIE){ + frame.src = Ext.SSL_SECURE_URL; + } + document.body.appendChild(frame); + + if(Ext.isIE){ + document.frames[id].name = id; + } + + var form = Ext.getDom(o.form); + form.target = id; + form.method = 'POST'; + form.enctype = form.encoding = 'multipart/form-data'; + if(url){ + form.action = url; + } + + var hiddens, hd; + if(ps){ + hiddens = []; + ps = Ext.urlDecode(ps, false); + for(var k in ps){ + if(ps.hasOwnProperty(k)){ + hd = document.createElement('input'); + hd.type = 'hidden'; + hd.name = k; + hd.value = ps[k]; + form.appendChild(hd); + hiddens.push(hd); + } + } + } + + function cb(){ + var r = { + responseText : '', + responseXML : null + }; + + r.argument = o ? o.argument : null; + + try { + var doc; + if(Ext.isIE){ + doc = frame.contentWindow.document; + }else { + doc = (frame.contentDocument || window.frames[id].document); + } + if(doc && doc.body){ + r.responseText = doc.body.innerHTML; + } + if(doc && doc.XMLDocument){ + r.responseXML = doc.XMLDocument; + }else { + r.responseXML = doc; + } + } + catch(e) { + + } + + Ext.EventManager.removeListener(frame, 'load', cb, this); + + this.fireEvent("requestcomplete", this, r, o); + + Ext.callback(o.success, o.scope, [r, o]); + Ext.callback(o.callback, o.scope, [o, true, r]); + + setTimeout(function(){Ext.removeNode(frame);}, 100); + } + + Ext.EventManager.on(frame, 'load', cb, this); + form.submit(); + + if(hiddens){ + for(var i = 0, len = hiddens.length; i < len; i++){ + Ext.removeNode(hiddens[i]); + } + } + } +}); + + +Ext.Ajax = new Ext.data.Connection({ + + + + + + + + + + + + + + + + + + autoAbort : false, + + + serializeForm : function(form){ + return Ext.lib.Ajax.serializeForm(form); + } +}); + +Ext.Updater = function(el, forceNew){ + el = Ext.get(el); + if(!forceNew && el.updateManager){ + return el.updateManager; + } + + this.el = el; + + this.defaultUrl = null; + + this.addEvents( + + "beforeupdate", + + "update", + + "failure" + ); + var d = Ext.Updater.defaults; + + this.sslBlankUrl = d.sslBlankUrl; + + this.disableCaching = d.disableCaching; + + this.indicatorText = d.indicatorText; + + this.showLoadIndicator = d.showLoadIndicator; + + this.timeout = d.timeout; + + + this.loadScripts = d.loadScripts; + + + this.transaction = null; + + + this.autoRefreshProcId = null; + + this.refreshDelegate = this.refresh.createDelegate(this); + + this.updateDelegate = this.update.createDelegate(this); + + this.formUpdateDelegate = this.formUpdate.createDelegate(this); + + if(!this.renderer){ + + this.renderer = new Ext.Updater.BasicRenderer(); + } + Ext.Updater.superclass.constructor.call(this); +}; + +Ext.extend(Ext.Updater, Ext.util.Observable, { + + getEl : function(){ + return this.el; + }, + + update : function(url, params, callback, discardUrl){ + if(this.fireEvent("beforeupdate", this.el, url, params) !== false){ + var method = this.method, cfg, callerScope; + if(typeof url == "object"){ + cfg = url; + url = cfg.url; + params = params || cfg.params; + callback = callback || cfg.callback; + discardUrl = discardUrl || cfg.discardUrl; + callerScope = cfg.scope; + if(typeof cfg.method != "undefined"){method = cfg.method;}; + if(typeof cfg.nocache != "undefined"){this.disableCaching = cfg.nocache;}; + if(typeof cfg.text != "undefined"){this.indicatorText = '
'+cfg.text+"
";}; + if(typeof cfg.scripts != "undefined"){this.loadScripts = cfg.scripts;}; + if(typeof cfg.timeout != "undefined"){this.timeout = cfg.timeout;}; + } + this.showLoading(); + if(!discardUrl){ + this.defaultUrl = url; + } + if(typeof url == "function"){ + url = url.call(this); + } + + method = method || (params ? "POST" : "GET"); + if(method == "GET"){ + url = this.prepareUrl(url); + } + + var o = Ext.apply(cfg ||{}, { + url : url, + params: (typeof params == "function" && callerScope) ? params.createDelegate(callerScope) : params, + success: this.processSuccess, + failure: this.processFailure, + scope: this, + callback: undefined, + timeout: (this.timeout*1000), + argument: { + "options": cfg, + "url": url, + "form": null, + "callback": callback, + "scope": callerScope || window, + "params": params + } + }); + + this.transaction = Ext.Ajax.request(o); + } + }, + + + formUpdate : function(form, url, reset, callback){ + if(this.fireEvent("beforeupdate", this.el, form, url) !== false){ + if(typeof url == "function"){ + url = url.call(this); + } + form = Ext.getDom(form) + this.transaction = Ext.Ajax.request({ + form: form, + url:url, + success: this.processSuccess, + failure: this.processFailure, + scope: this, + timeout: (this.timeout*1000), + argument: { + "url": url, + "form": form, + "callback": callback, + "reset": reset + } + }); + this.showLoading.defer(1, this); + } + }, + + + refresh : function(callback){ + if(this.defaultUrl == null){ + return; + } + this.update(this.defaultUrl, null, callback, true); + }, + + + startAutoRefresh : function(interval, url, params, callback, refreshNow){ + if(refreshNow){ + this.update(url || this.defaultUrl, params, callback, true); + } + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + } + this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000); + }, + + + stopAutoRefresh : function(){ + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + delete this.autoRefreshProcId; + } + }, + + isAutoRefreshing : function(){ + return this.autoRefreshProcId ? true : false; + }, + + showLoading : function(){ + if(this.showLoadIndicator){ + this.el.update(this.indicatorText); + } + }, + + + prepareUrl : function(url){ + if(this.disableCaching){ + var append = "_dc=" + (new Date().getTime()); + if(url.indexOf("?") !== -1){ + url += "&" + append; + }else{ + url += "?" + append; + } + } + return url; + }, + + + processSuccess : function(response){ + this.transaction = null; + if(response.argument.form && response.argument.reset){ + try{ + response.argument.form.reset(); + }catch(e){} + } + if(this.loadScripts){ + this.renderer.render(this.el, response, this, + this.updateComplete.createDelegate(this, [response])); + }else{ + this.renderer.render(this.el, response, this); + this.updateComplete(response); + } + }, + + updateComplete : function(response){ + this.fireEvent("update", this.el, response); + if(typeof response.argument.callback == "function"){ + response.argument.callback.call(response.argument.scope, this.el, true, response, response.argument.options); + } + }, + + + processFailure : function(response){ + this.transaction = null; + this.fireEvent("failure", this.el, response); + if(typeof response.argument.callback == "function"){ + response.argument.callback.call(response.argument.scope, this.el, false, response, response.argument.options); + } + }, + + + setRenderer : function(renderer){ + this.renderer = renderer; + }, + + getRenderer : function(){ + return this.renderer; + }, + + + setDefaultUrl : function(defaultUrl){ + this.defaultUrl = defaultUrl; + }, + + + abort : function(){ + if(this.transaction){ + Ext.Ajax.abort(this.transaction); + } + }, + + + isUpdating : function(){ + if(this.transaction){ + return Ext.Ajax.isLoading(this.transaction); + } + return false; + } +}); + + + Ext.Updater.defaults = { + + timeout : 30, + + + loadScripts : false, + + + sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false"), + + disableCaching : false, + + showLoadIndicator : true, + + indicatorText : '
Loading...
' + }; + + +Ext.Updater.updateElement = function(el, url, params, options){ + var um = Ext.get(el).getUpdater(); + Ext.apply(um, options); + um.update(url, params, options ? options.callback : null); +}; + +Ext.Updater.update = Ext.Updater.updateElement; + +Ext.Updater.BasicRenderer = function(){}; + +Ext.Updater.BasicRenderer.prototype = { + + render : function(el, response, updateManager, callback){ + el.update(response.responseText, updateManager.loadScripts, callback); + } +}; + +Ext.UpdateManager = Ext.Updater; + + + + + +Date.parseFunctions = {count:0}; +Date.parseRegexes = []; +Date.formatFunctions = {count:0}; + +Date.prototype.dateFormat = function(format) { + if (Date.formatFunctions[format] == null) { + Date.createNewFormat(format); + } + var func = Date.formatFunctions[format]; + return this[func](); +}; + + + +Date.prototype.format = Date.prototype.dateFormat; + +Date.createNewFormat = function(format) { + var funcName = "format" + Date.formatFunctions.count++; + Date.formatFunctions[format] = funcName; + var code = "Date.prototype." + funcName + " = function(){return "; + var special = false; + var ch = ''; + for (var i = 0; i < format.length; ++i) { + ch = format.charAt(i); + if (!special && ch == "\\") { + special = true; + } + else if (special) { + special = false; + code += "'" + String.escape(ch) + "' + "; + } + else { + code += Date.getFormatCode(ch); + } + } + eval(code.substring(0, code.length - 3) + ";}"); +}; + +Date.getFormatCode = function(character) { + switch (character) { + case "d": + return "String.leftPad(this.getDate(), 2, '0') + "; + case "D": + return "Date.getShortDayName(this.getDay()) + "; case "j": + return "this.getDate() + "; + case "l": + return "Date.dayNames[this.getDay()] + "; + case "N": + return "(this.getDay() ? this.getDay() : 7) + "; + case "S": + return "this.getSuffix() + "; + case "w": + return "this.getDay() + "; + case "z": + return "this.getDayOfYear() + "; + case "W": + return "String.leftPad(this.getWeekOfYear(), 2, '0') + "; + case "F": + return "Date.monthNames[this.getMonth()] + "; + case "m": + return "String.leftPad(this.getMonth() + 1, 2, '0') + "; + case "M": + return "Date.getShortMonthName(this.getMonth()) + "; case "n": + return "(this.getMonth() + 1) + "; + case "t": + return "this.getDaysInMonth() + "; + case "L": + return "(this.isLeapYear() ? 1 : 0) + "; + case "o": + return "(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0))) + "; + case "Y": + return "this.getFullYear() + "; + case "y": + return "('' + this.getFullYear()).substring(2, 4) + "; + case "a": + return "(this.getHours() < 12 ? 'am' : 'pm') + "; + case "A": + return "(this.getHours() < 12 ? 'AM' : 'PM') + "; + case "g": + return "((this.getHours() % 12) ? this.getHours() % 12 : 12) + "; + case "G": + return "this.getHours() + "; + case "h": + return "String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0') + "; + case "H": + return "String.leftPad(this.getHours(), 2, '0') + "; + case "i": + return "String.leftPad(this.getMinutes(), 2, '0') + "; + case "s": + return "String.leftPad(this.getSeconds(), 2, '0') + "; + case "u": + return "String.leftPad(this.getMilliseconds(), 3, '0') + "; + case "O": + return "this.getGMTOffset() + "; + case "P": + return "this.getGMTOffset(true) + "; + case "T": + return "this.getTimezone() + "; + case "Z": + return "(this.getTimezoneOffset() * -60) + "; + case "c": + for (var df = Date.getFormatCode, c = "Y-m-dTH:i:sP", code = "", i = 0, l = c.length; i < l; ++i) { + var e = c.charAt(i); + code += e == "T" ? "'T' + " : df(e); } + return code; + case "U": + return "Math.round(this.getTime() / 1000) + "; + default: + return "'" + String.escape(character) + "' + "; + } +}; + + +Date.parseDate = function(input, format) { + if (Date.parseFunctions[format] == null) { + Date.createParser(format); + } + var func = Date.parseFunctions[format]; + return Date[func](input); +}; + +Date.createParser = function(format) { + var funcName = "parse" + Date.parseFunctions.count++; + var regexNum = Date.parseRegexes.length; + var currentGroup = 1; + Date.parseFunctions[format] = funcName; + + var code = "Date." + funcName + " = function(input){\n" + + "var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, ms = -1, o, z, u, v;\n" + + "var d = new Date();\n" + + "y = d.getFullYear();\n" + + "m = d.getMonth();\n" + + "d = d.getDate();\n" + + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n" + + "if (results && results.length > 0) {"; + var regex = ""; + + var special = false; + var ch = ''; + for (var i = 0; i < format.length; ++i) { + ch = format.charAt(i); + if (!special && ch == "\\") { + special = true; + } + else if (special) { + special = false; + regex += String.escape(ch); + } + else { + var obj = Date.formatCodeToRegex(ch, currentGroup); + currentGroup += obj.g; + regex += obj.s; + if (obj.g && obj.c) { + code += obj.c; + } + } + } + + code += "if (u)\n" + + "{v = new Date(u * 1000);}" + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0)\n" + + "{v = new Date(y, m, d, h, i, s, ms);}\n" + + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n" + + "{v = new Date(y, m, d, h, i, s);}\n" + + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n" + + "{v = new Date(y, m, d, h, i);}\n" + + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n" + + "{v = new Date(y, m, d, h);}\n" + + "else if (y >= 0 && m >= 0 && d > 0)\n" + + "{v = new Date(y, m, d);}\n" + + "else if (y >= 0 && m >= 0)\n" + + "{v = new Date(y, m);}\n" + + "else if (y >= 0)\n" + + "{v = new Date(y);}\n" + + "}return (v && (z || o))?\n" + " (z ? v.add(Date.SECOND, (v.getTimezoneOffset() * 60) + (z*1)) :\n" + " v.add(Date.HOUR, (v.getGMTOffset() / 100) + (o / -100))) : v\n" + ";}"; + + Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i"); + eval(code); +}; + +Date.formatCodeToRegex = function(character, currentGroup) { + + switch (character) { + case "d": + return {g:1, + c:"d = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; case "D": + for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); return {g:0, + c:null, + s:"(?:" + a.join("|") +")"}; + case "j": + return {g:1, + c:"d = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{1,2})"}; case "l": + return {g:0, + c:null, + s:"(?:" + Date.dayNames.join("|") + ")"}; + case "N": + return {g:0, + c:null, + s:"[1-7]"}; case "S": + return {g:0, + c:null, + s:"(?:st|nd|rd|th)"}; + case "w": + return {g:0, + c:null, + s:"[0-6]"}; case "z": + return {g:0, + c:null, + s:"(?:\\d{1,3}"}; case "W": + return {g:0, + c:null, + s:"(?:\\d{2})"}; case "F": + return {g:1, + c:"m = parseInt(Date.getMonthNumber(results[" + currentGroup + "]), 10);\n", s:"(" + Date.monthNames.join("|") + ")"}; + case "m": + return {g:1, + c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n", + s:"(\\d{2})"}; case "M": + for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); return {g:1, + c:"m = parseInt(Date.getMonthNumber(results[" + currentGroup + "]), 10);\n", s:"(" + a.join("|") + ")"}; + case "n": + return {g:1, + c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n", + s:"(\\d{1,2})"}; case "t": + return {g:0, + c:null, + s:"(?:\\d{2})"}; case "L": + return {g:0, + c:null, + s:"(?:1|0)"}; + case "o": + case "Y": + return {g:1, + c:"y = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{4})"}; case "y": + return {g:1, + c:"var ty = parseInt(results[" + currentGroup + "], 10);\n" + + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", + s:"(\\d{1,2})"}; case "a": + return {g:1, + c:"if (results[" + currentGroup + "] == 'am') {\n" + + "if (h == 12) { h = 0; }\n" + + "} else { if (h < 12) { h += 12; }}", + s:"(am|pm)"}; + case "A": + return {g:1, + c:"if (results[" + currentGroup + "] == 'AM') {\n" + + "if (h == 12) { h = 0; }\n" + + "} else { if (h < 12) { h += 12; }}", + s:"(AM|PM)"}; + case "g": + case "G": + return {g:1, + c:"h = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{1,2})"}; case "h": + case "H": + return {g:1, + c:"h = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; case "i": + return {g:1, + c:"i = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; case "s": + return {g:1, + c:"s = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; case "u": + return {g:1, + c:"ms = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{3})"}; case "O": + return {g:1, + c:[ + "o = results[", currentGroup, "];\n", + "var sn = o.substring(0,1);\n", "var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n", "var mn = o.substring(3,5) % 60;\n", "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n", " (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n" + ].join(""), + s: "([+\-]\\d{4})"}; case "P": + return {g:1, + c:[ + "o = results[", currentGroup, "];\n", + "var sn = o.substring(0,1);\n", "var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n", "var mn = o.substring(4,6) % 60;\n", "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n", " (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n" + ].join(""), + s: "([+\-]\\d{2}:\\d{2})"}; case "T": + return {g:0, + c:null, + s:"[A-Z]{1,4}"}; case "Z": + return {g:1, + c:"z = results[" + currentGroup + "] * 1;\n" + "z = (-43200 <= z && z <= 50400)? z : null;\n", + s:"([+\-]?\\d{1,5})"}; case "c": + var df = Date.formatCodeToRegex, calc = []; + var arr = [df("Y", 1), df("m", 2), df("d", 3), df("h", 4), df("i", 5), df("s", 6), df("P", 7)]; + for (var i = 0, l = arr.length; i < l; ++i) { + calc.push(arr[i].c); + } + return {g:1, + c:calc.join(""), + s:arr[0].s + "-" + arr[1].s + "-" + arr[2].s + "T" + arr[3].s + ":" + arr[4].s + ":" + arr[5].s + arr[6].s}; + case "U": + return {g:1, + c:"u = parseInt(results[" + currentGroup + "], 10);\n", + s:"(-?\\d+)"}; default: + return {g:0, + c:null, + s:Ext.escapeRe(character)}; + } +}; + + +Date.prototype.getTimezone = function() { + return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, ""); +}; + + +Date.prototype.getGMTOffset = function(colon) { + return (this.getTimezoneOffset() > 0 ? "-" : "+") + + String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset() / 60)), 2, "0") + + (colon ? ":" : "") + + String.leftPad(this.getTimezoneOffset() % 60, 2, "0"); +}; + + +Date.prototype.getDayOfYear = function() { + var num = 0; + Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; + for (var i = 0; i < this.getMonth(); ++i) { + num += Date.daysInMonth[i]; + } + return num + this.getDate() - 1; +}; + + +Date.prototype.getWeekOfYear = function() { + var ms1d = 864e5; var ms7d = 7 * ms1d; var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d; var AWN = Math.floor(DC3 / 7); var Wyr = new Date(AWN * ms7d).getUTCFullYear(); + return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1; +}; + + +Date.prototype.isLeapYear = function() { + var year = this.getFullYear(); + return ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year))); +}; + + +Date.prototype.getFirstDayOfMonth = function() { + var day = (this.getDay() - (this.getDate() - 1)) % 7; + return (day < 0) ? (day + 7) : day; +}; + + +Date.prototype.getLastDayOfMonth = function() { + var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7; + return (day < 0) ? (day + 7) : day; +}; + + + +Date.prototype.getFirstDateOfMonth = function() { + return new Date(this.getFullYear(), this.getMonth(), 1); +}; + + +Date.prototype.getLastDateOfMonth = function() { + return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth()); +}; + +Date.prototype.getDaysInMonth = function() { + Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; + return Date.daysInMonth[this.getMonth()]; +}; + + +Date.prototype.getSuffix = function() { + switch (this.getDate()) { + case 1: + case 21: + case 31: + return "st"; + case 2: + case 22: + return "nd"; + case 3: + case 23: + return "rd"; + default: + return "th"; + } +}; + +Date.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31]; + + +Date.monthNames = + ["January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"]; + + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +} + + +Date.dayNames = + ["Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday"]; + + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +} + +Date.y2kYear = 50; + + +Date.monthNumbers = { + Jan:0, + Feb:1, + Mar:2, + Apr:3, + May:4, + Jun:5, + Jul:6, + Aug:7, + Sep:8, + Oct:9, + Nov:10, + Dec:11}; + + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +} + + +Date.prototype.clone = function() { + return new Date(this.getTime()); +}; + + +Date.prototype.clearTime = function(clone){ + if(clone){ + return this.clone().clearTime(); + } + this.setHours(0); + this.setMinutes(0); + this.setSeconds(0); + this.setMilliseconds(0); + return this; +}; + +if(Ext.isSafari){ + Date.brokenSetMonth = Date.prototype.setMonth; + Date.prototype.setMonth = function(num){ + if(num <= -1){ + var n = Math.ceil(-num); + var back_year = Math.ceil(n/12); + var month = (n % 12) ? 12 - n % 12 : 0 ; + this.setFullYear(this.getFullYear() - back_year); + return Date.brokenSetMonth.call(this, month); + } else { + return Date.brokenSetMonth.apply(this, arguments); + } + }; +} + + +Date.MILLI = "ms"; + +Date.SECOND = "s"; + +Date.MINUTE = "mi"; + +Date.HOUR = "h"; + +Date.DAY = "d"; + +Date.MONTH = "mo"; + +Date.YEAR = "y"; + + +Date.prototype.add = function(interval, value){ + var d = this.clone(); + if (!interval || value === 0) return d; + switch(interval.toLowerCase()){ + case Date.MILLI: + d.setMilliseconds(this.getMilliseconds() + value); + break; + case Date.SECOND: + d.setSeconds(this.getSeconds() + value); + break; + case Date.MINUTE: + d.setMinutes(this.getMinutes() + value); + break; + case Date.HOUR: + d.setHours(this.getHours() + value); + break; + case Date.DAY: + d.setDate(this.getDate() + value); + break; + case Date.MONTH: + var day = this.getDate(); + if(day > 28){ + day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate()); + } + d.setDate(day); + d.setMonth(this.getMonth() + value); + break; + case Date.YEAR: + d.setFullYear(this.getFullYear() + value); + break; + } + return d; +}; + + +Date.prototype.between = function(start, end){ + var t = this.getTime(); + return start.getTime() <= t && t <= end.getTime(); +} + +Ext.util.DelayedTask = function(fn, scope, args){ + var id = null, d, t; + + var call = function(){ + var now = new Date().getTime(); + if(now - t >= d){ + clearInterval(id); + id = null; + fn.apply(scope, args || []); + } + }; + + this.delay = function(delay, newFn, newScope, newArgs){ + if(id && delay != d){ + this.cancel(); + } + d = delay; + t = new Date().getTime(); + fn = newFn || fn; + scope = newScope || scope; + args = newArgs || args; + if(!id){ + id = setInterval(call, d); + } + }; + + + this.cancel = function(){ + if(id){ + clearInterval(id); + id = null; + } + }; +}; + +Ext.util.TaskRunner = function(interval){ + interval = interval || 10; + var tasks = [], removeQueue = []; + var id = 0; + var running = false; + + var stopThread = function(){ + running = false; + clearInterval(id); + id = 0; + }; + + var startThread = function(){ + if(!running){ + running = true; + id = setInterval(runTasks, interval); + } + }; + + var removeTask = function(t){ + removeQueue.push(t); + if(t.onStop){ + t.onStop.apply(t.scope || t); + } + }; + + var runTasks = function(){ + if(removeQueue.length > 0){ + for(var i = 0, len = removeQueue.length; i < len; i++){ + tasks.remove(removeQueue[i]); + } + removeQueue = []; + if(tasks.length < 1){ + stopThread(); + return; + } + } + var now = new Date().getTime(); + for(var i = 0, len = tasks.length; i < len; ++i){ + var t = tasks[i]; + var itime = now - t.taskRunTime; + if(t.interval <= itime){ + var rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]); + t.taskRunTime = now; + if(rt === false || t.taskRunCount === t.repeat){ + removeTask(t); + return; + } + } + if(t.duration && t.duration <= (now - t.taskStartTime)){ + removeTask(t); + } + } + }; + + + this.start = function(task){ + tasks.push(task); + task.taskStartTime = new Date().getTime(); + task.taskRunTime = 0; + task.taskRunCount = 0; + startThread(); + return task; + }; + + + this.stop = function(task){ + removeTask(task); + return task; + }; + + + this.stopAll = function(){ + stopThread(); + for(var i = 0, len = tasks.length; i < len; i++){ + if(tasks[i].onStop){ + tasks[i].onStop(); + } + } + tasks = []; + removeQueue = []; + }; +}; + + +Ext.TaskMgr = new Ext.util.TaskRunner(); + +Ext.util.MixedCollection = function(allowFunctions, keyFn){ + this.items = []; + this.map = {}; + this.keys = []; + this.length = 0; + this.addEvents( + + "clear", + + "add", + + "replace", + + "remove", + "sort" + ); + this.allowFunctions = allowFunctions === true; + if(keyFn){ + this.getKey = keyFn; + } + Ext.util.MixedCollection.superclass.constructor.call(this); +}; + +Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { + allowFunctions : false, + + + add : function(key, o){ + if(arguments.length == 1){ + o = arguments[0]; + key = this.getKey(o); + } + if(typeof key == "undefined" || key === null){ + this.length++; + this.items.push(o); + this.keys.push(null); + }else{ + var old = this.map[key]; + if(old){ + return this.replace(key, o); + } + this.length++; + this.items.push(o); + this.map[key] = o; + this.keys.push(key); + } + this.fireEvent("add", this.length-1, o, key); + return o; + }, + + + getKey : function(o){ + return o.id; + }, + + + replace : function(key, o){ + if(arguments.length == 1){ + o = arguments[0]; + key = this.getKey(o); + } + var old = this.item(key); + if(typeof key == "undefined" || key === null || typeof old == "undefined"){ + return this.add(key, o); + } + var index = this.indexOfKey(key); + this.items[index] = o; + this.map[key] = o; + this.fireEvent("replace", key, old, o); + return o; + }, + + + addAll : function(objs){ + if(arguments.length > 1 || objs instanceof Array){ + var args = arguments.length > 1 ? arguments : objs; + for(var i = 0, len = args.length; i < len; i++){ + this.add(args[i]); + } + }else{ + for(var key in objs){ + if(this.allowFunctions || typeof objs[key] != "function"){ + this.add(key, objs[key]); + } + } + } + }, + + + each : function(fn, scope){ + 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; + } + } + }, + + + 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])){ + return this.items[i]; + } + } + return null; + }, + + + insert : function(index, key, o){ + if(arguments.length == 2){ + o = arguments[1]; + key = this.getKey(o); + } + if(index >= this.length){ + return this.add(key, o); + } + this.length++; + this.items.splice(index, 0, o); + if(typeof key != "undefined" && key != null){ + this.map[key] = o; + } + this.keys.splice(index, 0, key); + this.fireEvent("add", index, o, key); + return o; + }, + + + remove : function(o){ + return this.removeAt(this.indexOf(o)); + }, + + + removeAt : function(index){ + if(index < this.length && index >= 0){ + this.length--; + var o = this.items[index]; + this.items.splice(index, 1); + var key = this.keys[index]; + if(typeof key != "undefined"){ + delete this.map[key]; + } + this.keys.splice(index, 1); + this.fireEvent("remove", o, key); + return o; + } + 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 item = typeof this.map[key] != "undefined" ? this.map[key] : this.items[key]; + 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 = []; + this.keys = []; + this.map = {}; + this.fireEvent("clear"); + }, + + + first : function(){ + return this.items[0]; + }, + + + last : function(){ + return this.items[this.length-1]; + }, + + + _sort : function(property, dir, fn){ + var dsc = String(dir).toUpperCase() == "DESC" ? -1 : 1; + fn = fn || function(a, b){ + return a-b; + }; + var c = [], k = this.keys, items = this.items; + for(var i = 0, len = items.length; i < len; i++){ + c[c.length] = {key: k[i], value: items[i], index: i}; + } + c.sort(function(a, b){ + var v = fn(a[property], b[property]) * dsc; + if(v == 0){ + v = (a.index < b.index ? -1 : 1); + } + return v; + }); + for(var i = 0, len = c.length; i < len; i++){ + items[i] = c[i].value; + k[i] = c[i].key; + } + this.fireEvent("sort", this); + }, + + + sort : function(dir, fn){ + this._sort("value", dir, fn); + }, + + + keySort : function(dir, fn){ + this._sort("key", dir, fn || function(a, b){ + return String(a).toUpperCase()-String(b).toUpperCase(); + }); + }, + + + getRange : function(start, end){ + var items = this.items; + if(items.length < 1){ + return []; + } + start = start || 0; + end = Math.min(typeof end == "undefined" ? this.length-1 : end, this.length-1); + var r = []; + if(start <= end){ + for(var i = start; i <= end; i++) { + r[r.length] = items[i]; + } + }else{ + for(var i = start; i >= end; i--) { + r[r.length] = items[i]; + } + } + return r; + }, + + + filter : function(property, value, anyMatch, caseSensitive){ + if(Ext.isEmpty(value, false)){ + return this.clone(); + } + value = this.createValueMatcher(value, anyMatch, caseSensitive); + return this.filterBy(function(o){ + return o && value.test(o[property]); + }); + }, + + + filterBy : function(fn, scope){ + var r = new Ext.util.MixedCollection(); + r.getKey = this.getKey; + var k = this.keys, it = this.items; + for(var i = 0, len = it.length; i < len; i++){ + if(fn.call(scope||this, it[i], k[i])){ + r.add(k[i], it[i]); + } + } + return r; + }, + + + findIndex : function(property, value, start, anyMatch, caseSensitive){ + if(Ext.isEmpty(value, false)){ + return -1; + } + value = this.createValueMatcher(value, anyMatch, caseSensitive); + return this.findIndexBy(function(o){ + return o && value.test(o[property]); + }, 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++){ + if(fn.call(scope||this, it[i], k[i])){ + return i; + } + } + if(typeof start == 'number' && start > 0){ + for(var i = 0; i < start; i++){ + if(fn.call(scope||this, it[i], k[i])){ + return i; + } + } + } + return -1; + }, + + + createValueMatcher : function(value, anyMatch, caseSensitive){ + if(!value.exec){ + value = String(value); + value = new RegExp((anyMatch === true ? '' : '^') + Ext.escapeRe(value), caseSensitive ? '' : 'i'); + } + return value; + }, + + + clone : function(){ + var r = new Ext.util.MixedCollection(); + var k = this.keys, it = this.items; + for(var i = 0, len = it.length; i < len; i++){ + r.add(k[i], it[i]); + } + r.getKey = this.getKey; + return r; + } +}); + +Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item; + +Ext.util.JSON = new (function(){ + var useHasOwn = {}.hasOwnProperty ? true : false; + + + + + var pad = function(n) { + return n < 10 ? "0" + n : n; + }; + + var m = { + "\b": '\\b', + "\t": '\\t', + "\n": '\\n', + "\f": '\\f', + "\r": '\\r', + '"' : '\\"', + "\\": '\\\\' + }; + + var 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 + '"'; + }; + + var encodeArray = function(o){ + var a = ["["], b, i, l = o.length, v; + for (i = 0; i < l; i += 1) { + v = o[i]; + switch (typeof v) { + case "undefined": + case "function": + case "unknown": + break; + default: + if (b) { + a.push(','); + } + a.push(v === null ? "null" : Ext.util.JSON.encode(v)); + b = true; + } + } + a.push("]"); + return a.join(""); + }; + + var encodeDate = function(o){ + return '"' + o.getFullYear() + "-" + + pad(o.getMonth() + 1) + "-" + + pad(o.getDate()) + "T" + + pad(o.getHours()) + ":" + + pad(o.getMinutes()) + ":" + + pad(o.getSeconds()) + '"'; + }; + + + this.encode = function(o){ + if(typeof o == "undefined" || o === null){ + return "null"; + }else if(o instanceof Array){ + return encodeArray(o); + }else if(o instanceof Date){ + return encodeDate(o); + }else if(typeof o == "string"){ + return encodeString(o); + }else if(typeof o == "number"){ + return isFinite(o) ? String(o) : "null"; + }else if(typeof o == "boolean"){ + return String(o); + }else { + var a = ["{"], b, i, v; + for (i in o) { + 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(this.encode(i), ":", + v === null ? "null" : this.encode(v)); + b = true; + } + } + } + a.push("}"); + return a.join(""); + } + }; + + + this.decode = function(json){ + return eval("(" + json + ')'); + }; +})(); + +Ext.encode = Ext.util.JSON.encode; + +Ext.decode = Ext.util.JSON.decode; + + +Ext.util.Format = function(){ + var trimRe = /^\s+|\s+$/g; + return { + + ellipsis : function(value, len){ + if(value && value.length > len){ + return value.substr(0, len-3)+"..."; + } + return value; + }, + + + undef : function(value){ + return value !== undefined ? value : ""; + }, + + + defaultValue : function(value, defaultValue){ + return value !== undefined && value !== '' ? value : defaultValue; + }, + + + htmlEncode : function(value){ + return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/").replace(/</g, "<").replace(/"/g, '"'); + }, + + + trim : function(value){ + return String(value).replace(trimRe, ""); + }, + + + substr : function(value, start, length){ + return String(value).substr(start, length); + }, + + + lowercase : function(value){ + return String(value).toLowerCase(); + }, + + + uppercase : function(value){ + return String(value).toUpperCase(); + }, + + + capitalize : function(value){ + return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase(); + }, + + + call : function(value, fn){ + if(arguments.length > 2){ + var args = Array.prototype.slice.call(arguments, 2); + args.unshift(value); + return eval(fn).apply(window, args); + }else{ + return eval(fn).call(window, value); + } + }, + + + usMoney : function(v){ + v = (Math.round((v-0)*100))/100; + v = (v == Math.floor(v)) ? v + ".00" : ((v*10 == Math.floor(v*10)) ? v + "0" : v); + v = String(v); + var ps = v.split('.'); + var whole = ps[0]; + var sub = ps[1] ? '.'+ ps[1] : '.00'; + var r = /(\d+)(\d{3})/; + while (r.test(whole)) { + whole = whole.replace(r, '$1' + ',' + '$2'); + } + v = whole + sub; + if(v.charAt(0) == '-'){ + return '-$' + v.substr(1); + } + return "$" + v; + }, + + + date : function(v, format){ + if(!v){ + return ""; + } + if(!(v instanceof Date)){ + v = new Date(Date.parse(v)); + } + return v.dateFormat(format || "m/d/Y"); + }, + + + dateRenderer : function(format){ + return function(v){ + return Ext.util.Format.date(v, format); + }; + }, + + + stripTagsRE : /<\/?[^>]+>/gi, + + + stripTags : function(v){ + return !v ? v : String(v).replace(this.stripTagsRE, ""); + }, + + stripScriptsRe : /(?:)((\n|\r|.)*?)(?:<\/script>)/ig, + + + stripScripts : function(v){ + return !v ? v : String(v).replace(this.stripScriptsRe, ""); + }, + + + fileSize : function(size){ + if(size < 1024) { + return size + " bytes"; + } else if(size < 1048576) { + return (Math.round(((size*10) / 1024))/10) + " KB"; + } else { + return (Math.round(((size*10) / 1048576))/10) + " MB"; + } + }, + + math : function(){ + var fns = {}; + return function(v, a){ + if(!fns[a]){ + fns[a] = new Function('v', 'return v ' + a + ';'); + } + return fns[a](v); + } + }() + }; +}(); + +Ext.XTemplate = function(){ + Ext.XTemplate.superclass.constructor.apply(this, arguments); + var s = this.html; + + s = ['', s, ''].join(''); + + var re = /]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/; + + var nameRe = /^]*?for="(.*?)"/; + var ifRe = /^]*?if="(.*?)"/; + var execRe = /^]*?exec="(.*?)"/; + var m, id = 0; + var tpls = []; + + while(m = s.match(re)){ + var m2 = m[0].match(nameRe); + var m3 = m[0].match(ifRe); + var m4 = m[0].match(execRe); + var exp = null, fn = null, exec = null; + var name = m2 && m2[1] ? m2[1] : ''; + if(m3){ + exp = m3 && m3[1] ? m3[1] : null; + if(exp){ + fn = new Function('values', 'parent', 'xindex', 'xcount', 'with(values){ return '+(Ext.util.Format.htmlDecode(exp))+'; }'); + } + } + if(m4){ + exp = m4 && m4[1] ? m4[1] : null; + if(exp){ + exec = new Function('values', 'parent', 'xindex', 'xcount', 'with(values){ '+(Ext.util.Format.htmlDecode(exp))+'; }'); + } + } + if(name){ + switch(name){ + case '.': name = new Function('values', 'parent', 'with(values){ return values; }'); break; + case '..': name = new Function('values', 'parent', 'with(values){ return parent; }'); break; + default: name = new Function('values', 'parent', 'with(values){ return '+name+'; }'); + } + } + tpls.push({ + id: id, + target: name, + exec: exec, + test: fn, + body: m[1]||'' + }); + s = s.replace(m[0], '{xtpl'+ id + '}'); + ++id; + } + for(var i = tpls.length-1; i >= 0; --i){ + this.compileTpl(tpls[i]); + } + this.master = tpls[tpls.length-1]; + this.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 t = this.tpls[id]; + if(t.test && !t.test.call(this, values, parent, xindex, xcount)){ + return ''; + } + if(t.exec && t.exec.call(this, values, parent, xindex, xcount)){ + return ''; + } + var vs = t.target ? t.target.call(this, values, parent) : values; + parent = t.target ? values : parent; + if(t.target && vs instanceof Array){ + var buf = []; + for(var i = 0, len = vs.length; i < len; i++){ + buf[buf.length] = t.compiled.call(this, vs[i], parent, i+1, len); + } + return buf.join(''); + } + return t.compiled.call(this, vs, parent, xindex, xcount); + }, + + + compileTpl : function(tpl){ + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + var sep = Ext.isGecko ? "+" : ","; + var fn = function(m, name, format, args, math){ + if(name.substr(0, 4) == 'xtpl'){ + return "'"+ sep +'this.applySubTemplate('+name.substr(4)+', values, parent, xindex, xcount)'+sep+"'"; + } + var v; + if(name === '.'){ + v = 'values'; + }else if(name === '#'){ + v = 'xindex'; + }else if(name.indexOf('.') != -1){ + v = name; + }else{ + v = "values['" + name + "']"; + } + if(math){ + v = '(' + v + math + ')'; + } + if(format && useF){ + args = args ? ',' + args : ""; + if(format.substr(0, 5) != "this."){ + format = "fm." + format + '('; + }else{ + format = 'this.call("'+ format.substr(5) + '", '; + args = ", values"; + } + }else{ + args= ''; format = "("+v+" === undefined ? '' : "; + } + return "'"+ sep + format + v + args + ")"+sep+"'"; + }; + var codeFn = function(m, code){ + return "'"+ sep +'('+code+')'+sep+"'"; + }; + + var body; + + 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) + + "';};"; + }else{ + body = ["tpl.compiled = function(values, parent, xindex, xcount){ return ['"]; + body.push(tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return this; + }, + + + apply : function(values){ + return this.master.compiled.call(this, values, {}, 1, 1); + }, + + + applyTemplate : function(values){ + return this.master.compiled.call(this, values, {}, 1, 1); + }, + + + compile : function(){return this;} + + + + + +}); + + +Ext.XTemplate.from = function(el){ + el = Ext.getDom(el); + return new Ext.XTemplate(el.value || el.innerHTML); +}; + +Ext.util.CSS = function(){ + var rules = null; + var doc = document; + + var camelRe = /(-[a-z])/gi; + var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; + + return { + + createStyleSheet : function(cssText, id){ + var ss; + var head = doc.getElementsByTagName("head")[0]; + var rules = doc.createElement("style"); + rules.setAttribute("type", "text/css"); + if(id){ + rules.setAttribute("id", id); + } + if(Ext.isIE){ + head.appendChild(rules); + ss = rules.styleSheet; + ss.cssText = cssText; + }else{ + try{ + rules.appendChild(doc.createTextNode(cssText)); + }catch(e){ + rules.cssText = cssText; + } + head.appendChild(rules); + ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]); + } + this.cacheStyleSheet(ss); + return ss; + }, + + + removeStyleSheet : function(id){ + var existing = doc.getElementById(id); + if(existing){ + existing.parentNode.removeChild(existing); + } + }, + + + swapStyleSheet : function(id, url){ + this.removeStyleSheet(id); + var ss = doc.createElement("link"); + ss.setAttribute("rel", "stylesheet"); + ss.setAttribute("type", "text/css"); + ss.setAttribute("id", id); + ss.setAttribute("href", url); + doc.getElementsByTagName("head")[0].appendChild(ss); + }, + + + refreshCache : function(){ + return this.getRules(true); + }, + + + cacheStyleSheet : function(ss){ + if(!rules){ + rules = {}; + } + try{ + var ssRules = ss.cssRules || ss.rules; + for(var j = ssRules.length-1; j >= 0; --j){ + rules[ssRules[j].selectorText] = ssRules[j]; + } + }catch(e){} + }, + + + getRules : function(refreshCache){ + if(rules == null || refreshCache){ + rules = {}; + var ds = doc.styleSheets; + for(var i =0, len = ds.length; i < len; i++){ + try{ + this.cacheStyleSheet(ds[i]); + }catch(e){} + } + } + return rules; + }, + + + getRule : function(selector, refreshCache){ + var rs = this.getRules(refreshCache); + if(!(selector instanceof Array)){ + return rs[selector]; + } + for(var i = 0; i < selector.length; i++){ + if(rs[selector[i]]){ + return rs[selector[i]]; + } + } + return null; + }, + + + + updateRule : function(selector, property, value){ + if(!(selector instanceof Array)){ + var rule = this.getRule(selector); + if(rule){ + rule.style[property.replace(camelRe, camelFn)] = value; + return true; + } + }else{ + for(var i = 0; i < selector.length; i++){ + if(this.updateRule(selector[i], property, value)){ + return true; + } + } + } + return false; + } + }; +}(); + +Ext.util.ClickRepeater = function(el, config) +{ + this.el = Ext.get(el); + this.el.unselectable(); + + Ext.apply(this, config); + + this.addEvents( + + "mousedown", + + "click", + + "mouseup" + ); + + this.el.on("mousedown", this.handleMouseDown, this); + if(this.preventDefault || this.stopDefault){ + this.el.on("click", function(e){ + if(this.preventDefault){ + e.preventDefault(); + } + if(this.stopDefault){ + e.stopEvent(); + } + }, this); + } + + if(this.handler){ + this.on("click", this.handler, this.scope || this); + } + + Ext.util.ClickRepeater.superclass.constructor.call(this); +}; + +Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { + interval : 20, + delay: 250, + preventDefault : true, + stopDefault : false, + timer : 0, + + handleMouseDown : function(){ + clearTimeout(this.timer); + this.el.blur(); + if(this.pressClass){ + this.el.addClass(this.pressClass); + } + this.mousedownTime = new Date(); + + Ext.getDoc().on("mouseup", this.handleMouseUp, this); + this.el.on("mouseout", this.handleMouseOut, this); + + this.fireEvent("mousedown", this); + this.fireEvent("click", this); + + if (this.accelerate) { + this.delay = 400; + } + this.timer = this.click.defer(this.delay || this.interval, this); + }, + + click : function(){ + this.fireEvent("click", this); + this.timer = this.click.defer(this.accelerate ? + this.easeOutExpo(this.mousedownTime.getElapsed(), + 400, + -390, + 12000) : + this.interval, this); + }, + + easeOutExpo : function (t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + + handleMouseOut : function(){ + clearTimeout(this.timer); + if(this.pressClass){ + this.el.removeClass(this.pressClass); + } + this.el.on("mouseover", this.handleMouseReturn, this); + }, + + handleMouseReturn : function(){ + this.el.un("mouseover", this.handleMouseReturn); + if(this.pressClass){ + this.el.addClass(this.pressClass); + } + this.click(); + }, + + handleMouseUp : function(){ + clearTimeout(this.timer); + this.el.un("mouseover", this.handleMouseReturn); + this.el.un("mouseout", this.handleMouseOut); + Ext.getDoc().un("mouseup", this.handleMouseUp); + this.el.removeClass(this.pressClass); + this.fireEvent("mouseup", this); + } +}); + +Ext.KeyNav = function(el, config){ + this.el = Ext.get(el); + Ext.apply(this, config); + if(!this.disabled){ + this.disabled = true; + this.enable(); + } +}; + +Ext.KeyNav.prototype = { + + disabled : false, + + defaultEventAction: "stopEvent", + + forceKeyDown : false, + + prepareEvent : function(e){ + var k = e.getKey(); + var h = this.keyToHandler[k]; + if(Ext.isSafari && h && k >= 37 && k <= 40){ + e.stopEvent(); + } + }, + + relay : function(e){ + var k = e.getKey(); + var h = this.keyToHandler[k]; + if(h && this[h]){ + if(this.doRelay(e, this[h], h) !== true){ + e[this.defaultEventAction](); + } + } + }, + + doRelay : function(e, h, hname){ + return h.call(this.scope || this, e); + }, + + enter : false, + left : false, + right : false, + up : false, + down : false, + tab : false, + esc : false, + pageUp : false, + pageDown : false, + del : false, + home : false, + end : false, + + keyToHandler : { + 37 : "left", + 39 : "right", + 38 : "up", + 40 : "down", + 33 : "pageUp", + 34 : "pageDown", + 46 : "del", + 36 : "home", + 35 : "end", + 13 : "enter", + 27 : "esc", + 9 : "tab" + }, + + + enable: function(){ + if(this.disabled){ + if(this.forceKeyDown || Ext.isIE || Ext.isAir){ + this.el.on("keydown", this.relay, this); + }else{ + this.el.on("keydown", this.prepareEvent, this); + this.el.on("keypress", this.relay, this); + } + this.disabled = false; + } + }, + + + disable: function(){ + if(!this.disabled){ + if(this.forceKeyDown || Ext.isIE || Ext.isAir){ + this.el.un("keydown", this.relay); + }else{ + this.el.un("keydown", this.prepareEvent); + this.el.un("keypress", this.relay); + } + this.disabled = true; + } + } +}; + +Ext.KeyMap = function(el, config, eventName){ + this.el = Ext.get(el); + this.eventName = eventName || "keydown"; + this.bindings = []; + if(config){ + this.addBinding(config); + } + this.enable(); +}; + +Ext.KeyMap.prototype = { + + stopEvent : false, + + + addBinding : function(config){ + if(config instanceof Array){ + for(var i = 0, len = config.length; i < len; i++){ + this.addBinding(config[i]); + } + return; + } + var keyCode = config.key, + shift = config.shift, + ctrl = config.ctrl, + alt = config.alt, + fn = config.fn || config.handler, + scope = config.scope; + + if(typeof keyCode == "string"){ + var ks = []; + var keyString = keyCode.toUpperCase(); + for(var j = 0, len = keyString.length; j < len; j++){ + ks.push(keyString.charCodeAt(j)); + } + keyCode = ks; + } + var keyArray = keyCode instanceof Array; + + var handler = function(e){ + if((!shift || e.shiftKey) && (!ctrl || e.ctrlKey) && (!alt || e.altKey)){ + var k = e.getKey(); + if(keyArray){ + for(var i = 0, len = keyCode.length; i < len; i++){ + if(keyCode[i] == k){ + if(this.stopEvent){ + e.stopEvent(); + } + fn.call(scope || window, k, e); + return; + } + } + }else{ + if(k == keyCode){ + if(this.stopEvent){ + e.stopEvent(); + } + fn.call(scope || window, k, e); + } + } + } + }; + this.bindings.push(handler); + }, + + + on : function(key, fn, scope){ + var keyCode, shift, ctrl, alt; + if(typeof key == "object" && !(key instanceof Array)){ + keyCode = key.key; + shift = key.shift; + ctrl = key.ctrl; + alt = key.alt; + }else{ + keyCode = key; + } + this.addBinding({ + key: keyCode, + shift: shift, + ctrl: ctrl, + alt: alt, + fn: fn, + scope: scope + }) + }, + + + handleKeyDown : function(e){ + if(this.enabled){ + var b = this.bindings; + for(var i = 0, len = b.length; i < len; i++){ + b[i].call(this, e); + } + } + }, + + + isEnabled : function(){ + return this.enabled; + }, + + + enable: function(){ + if(!this.enabled){ + this.el.on(this.eventName, this.handleKeyDown, this); + this.enabled = true; + } + }, + + + disable: function(){ + if(this.enabled){ + this.el.removeListener(this.eventName, this.handleKeyDown, this); + this.enabled = false; + } + } +}; + +Ext.util.TextMetrics = function(){ + var shared; + return { + + measure : function(el, text, fixedWidth){ + if(!shared){ + shared = Ext.util.TextMetrics.Instance(el, fixedWidth); + } + shared.bind(el); + shared.setFixedWidth(fixedWidth || 'auto'); + return shared.getSize(text); + }, + + + createInstance : function(el, fixedWidth){ + return Ext.util.TextMetrics.Instance(el, fixedWidth); + } + }; +}(); + +Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){ + var ml = new Ext.Element(document.createElement('div')); + document.body.appendChild(ml.dom); + ml.position('absolute'); + ml.setLeftTop(-1000, -1000); + ml.hide(); + + if(fixedWidth){ + ml.setWidth(fixedWidth); + } + + var instance = { + + getSize : function(text){ + ml.update(text); + var s = ml.getSize(); + ml.update(''); + return s; + }, + + + bind : function(el){ + ml.setStyle( + Ext.fly(el).getStyles('font-size','font-style', 'font-weight', 'font-family','line-height') + ); + }, + + + 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; + } + }; + + instance.bind(bindTo); + + return instance; +}; + +Ext.Element.measureText = Ext.util.TextMetrics.measure; + + +(function() { + +var Event=Ext.EventManager; +var Dom=Ext.lib.Dom; + + +Ext.dd.DragDrop = function(id, sGroup, config) { + if(id) { + this.init(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; }, + + + 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(typeof pad == "number"){ + pad = {left: pad, right:pad, top:pad, bottom:pad}; + } + pad = pad || this.defaultPadding; + var b = Ext.get(this.getEl()).getBox(); + var ce = Ext.get(constrainTo); + var s = ce.getScroll(); + var 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()}; + }else{ + var xy = ce.getXY(); + c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight}; + } + + + var topSpace = b.y - c.y; + var leftSpace = b.x - c.x; + + this.resetConstraints(); + 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.yTickSize + ); + }, + + + getEl: function() { + if (!this._domRef) { + this._domRef = Ext.getDom(this.id); + } + + 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 = []; + + this.applyConfig(); + + this.handleOnAvailable(); + }, + + + applyConfig: function() { + + + + this.padding = this.config.padding || [0, 0, 0, 0]; + this.isTarget = (this.config.isTarget !== false); + this.maintainOffset = (this.config.maintainOffset); + this.primaryButtonOnly = (this.config.primaryButtonOnly !== false); + + }, + + + handleOnAvailable: function() { + this.available = true; + this.resetConstraints(); + this.onAvailable(); + }, + + + setPadding: function(iTop, iRight, iBot, iLeft) { + + if (!iRight && 0 !== iRight) { + this.padding = [iTop, iTop, iTop, iTop]; + } else if (!iBot && 0 !== iBot) { + this.padding = [iTop, iRight, iTop, iRight]; + } else { + this.padding = [iTop, iRight, iBot, iLeft]; + } + }, + + + setInitPosition: function(diffX, diffY) { + var el = this.getEl(); + + if (!this.DDM.verifyEl(el)) { + return; + } + + var dx = diffX || 0; + var dy = diffY || 0; + + var p = Dom.getXY( el ); + + this.initPageX = p[0] - dx; + this.initPageY = p[1] - dy; + + this.lastPageX = p[0]; + this.lastPageY = p[1]; + + + this.setStartPosition(p); + }, + + + setStartPosition: function(pos) { + var p = pos || Dom.getXY( this.getEl() ); + this.deltaSetXY = null; + + this.startPageX = p[0]; + 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]; + } + + this.DDM.removeDDFromGroup(this, sGroup); + }, + + + setDragElId: function(id) { + this.dragElId = id; + }, + + + setHandleElId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + this.handleElId = id; + this.DDM.regHandle(this.id, id); + }, + + + setOuterHandleElId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + Event.on(id, "mousedown", + this.handleMouseDown, this); + this.setHandleElId(id); + + this.hasOuterHandles = true; + }, + + + unreg: function() { + Event.un(this.id, "mousedown", + this.handleMouseDown); + this._domRef = null; + this.DDM._remove(this); + }, + + destroy : function(){ + this.unreg(); + }, + + + isLocked: function() { + return (this.DDM.isLocked() || this.locked); + }, + + + handleMouseDown: function(e, oDD){ + if (this.primaryButtonOnly && e.button != 0) { + return; + } + + if (this.isLocked()) { + return; + } + + this.DDM.refreshCache(this.groups); + + var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e)); + if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) ) { + } else { + if (this.clickValidator(e)) { + + + this.setStartPosition(); + + + this.b4MouseDown(e); + this.onMouseDown(e); + + this.DDM.handleMouseDown(e, this); + + this.DDM.stopEvent(e); + } else { + + + } + } + }, + + clickValidator: function(e) { + var target = e.getTarget(); + return ( this.isValidHandleChild(target) && + (this.id == this.handleElId || + 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); + } + 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); + } + delete this.invalidHandleIds[id]; + }, + + + removeInvalidHandleClass: function(cssClass) { + for (var i=0, len=this.invalidHandleClasses.length; i= this.minX; i = i - iTickSize) { + if (!tickMap[i]) { + this.xTicks[this.xTicks.length] = i; + tickMap[i] = true; + } + } + + for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) { + if (!tickMap[i]) { + this.xTicks[this.xTicks.length] = i; + tickMap[i] = true; + } + } + + this.xTicks.sort(this.DDM.numericSort) ; + }, + + + setYTicks: function(iStartY, iTickSize) { + this.yTicks = []; + this.yTickSize = iTickSize; + + var tickMap = {}; + + for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) { + if (!tickMap[i]) { + this.yTicks[this.yTicks.length] = i; + tickMap[i] = true; + } + } + + for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) { + if (!tickMap[i]) { + this.yTicks[this.yTicks.length] = i; + tickMap[i] = true; + } + } + + this.yTicks.sort(this.DDM.numericSort) ; + }, + + + setXConstraint: function(iLeft, iRight, iTickSize) { + this.leftConstraint = iLeft; + this.rightConstraint = iRight; + + this.minX = this.initPageX - iLeft; + this.maxX = this.initPageX + iRight; + if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); } + + this.constrainX = true; + }, + + + clearConstraints: function() { + this.constrainX = false; + this.constrainY = false; + this.clearTicks(); + }, + + + clearTicks: function() { + this.xTicks = null; + this.yTicks = null; + this.xTickSize = 0; + this.yTickSize = 0; + }, + + + setYConstraint: function(iUp, iDown, iTickSize) { + this.topConstraint = iUp; + this.bottomConstraint = iDown; + + this.minY = this.initPageY - iUp; + this.maxY = this.initPageY + iDown; + if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); } + + this.constrainY = true; + + }, + + + resetConstraints: function() { + + + + if (this.initPageX || this.initPageX === 0) { + + var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0; + var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0; + + this.setInitPosition(dx, dy); + + + } else { + this.setInitPosition(); + } + + if (this.constrainX) { + this.setXConstraint( this.leftConstraint, + this.rightConstraint, + this.xTickSize ); + } + + if (this.constrainY) { + this.setYConstraint( this.topConstraint, + this.bottomConstraint, + this.yTickSize ); + } + }, + + + getTick: function(val, tickArray) { + + if (!tickArray) { + + + return val; + } else if (tickArray[0] >= val) { + + + return tickArray[0]; + } else { + for (var i=0, len=tickArray.length; i= val) { + var diff1 = val - tickArray[i]; + var diff2 = tickArray[next] - val; + return (diff2 > diff1) ? tickArray[i] : tickArray[next]; + } + } + + + + return tickArray[tickArray.length - 1]; + } + }, + + + toString: function() { + return ("DragDrop " + this.id); + } + +}; + +})(); + + + + +if (!Ext.dd.DragDropMgr) { + + +Ext.dd.DragDropMgr = function() { + + var Event = Ext.EventManager; + + return { + + + ids: {}, + + + handleIds: {}, + + + dragCurrent: null, + + + dragOvers: {}, + + + deltaX: 0, + + + deltaY: 0, + + + preventDefault: true, + + + stopPropagation: true, + + + initalized: false, + + + locked: false, + + + init: function() { + this.initialized = true; + }, + + + POINT: 0, + + + INTERSECT: 1, + + + mode: 0, + + + _execOnAll: function(sMethod, args) { + for (var i in this.ids) { + for (var j in this.ids[i]) { + var oDD = this.ids[i][j]; + if (! this.isTypeOfDD(oDD)) { + continue; + } + oDD[sMethod].apply(oDD, args); + } + } + }, + + + _onLoad: function() { + + this.init(); + + + Event.on(document, "mouseup", this.handleMouseUp, this, true); + Event.on(document, "mousemove", this.handleMouseMove, this, true); + Event.on(window, "unload", this._onUnload, this, true); + Event.on(window, "resize", this._onResize, this, true); + + + }, + + + _onResize: function(e) { + this._execOnAll("resetConstraints", []); + }, + + + lock: function() { this.locked = true; }, + + + unlock: function() { this.locked = false; }, + + + isLocked: function() { return this.locked; }, + + + locationCache: {}, + + + useCache: true, + + + clickPixelThresh: 3, + + + clickTimeThresh: 350, + + + dragThreshMet: false, + + + clickTimeout: null, + + + startX: 0, + + + startY: 0, + + + regDragDrop: function(oDD, sGroup) { + if (!this.initialized) { this.init(); } + + if (!this.ids[sGroup]) { + this.ids[sGroup] = {}; + } + this.ids[sGroup][oDD.id] = oDD; + }, + + + removeDDFromGroup: function(oDD, sGroup) { + if (!this.ids[sGroup]) { + this.ids[sGroup] = {}; + } + + var obj = this.ids[sGroup]; + if (obj && obj[oDD.id]) { + delete obj[oDD.id]; + } + }, + + + _remove: function(oDD) { + for (var g in oDD.groups) { + if (g && this.ids[g][oDD.id]) { + delete this.ids[g][oDD.id]; + } + } + delete this.handleIds[oDD.id]; + }, + + + regHandle: function(sDDId, sHandleId) { + if (!this.handleIds[sDDId]) { + this.handleIds[sDDId] = {}; + } + this.handleIds[sDDId][sHandleId] = sHandleId; + }, + + + isDragDrop: function(id) { + return ( this.getDDById(id) ) ? true : false; + }, + + + getRelated: function(p_oDD, bTargetsOnly) { + var oDDs = []; + for (var i in p_oDD.groups) { + for (j in this.ids[i]) { + var dd = this.ids[i][j]; + if (! this.isTypeOfDD(dd)) { + continue; + } + if (!bTargetsOnly || dd.isTarget) { + oDDs[oDDs.length] = dd; + } + } + } + + return oDDs; + }, + + + isLegalTarget: function (oDD, oTargetDD) { + var targets = this.getRelated(oDD, true); + for (var i=0, len=targets.length;i this.clickPixelThresh || + diffY > this.clickPixelThresh) { + this.startDrag(this.startX, this.startY); + } + } + + if (this.dragThreshMet) { + this.dragCurrent.b4Drag(e); + this.dragCurrent.onDrag(e); + if(!this.dragCurrent.moveOnly){ + this.fireEvents(e, false); + } + } + + this.stopEvent(e); + + return true; + }, + + + fireEvents: function(e, isDrop) { + var dc = this.dragCurrent; + + + + if (!dc || dc.isLocked()) { + return; + } + + var pt = e.getPoint(); + + + var oldOvers = []; + + var outEvts = []; + var overEvts = []; + var dropEvts = []; + var enterEvts = []; + + + + for (var i in this.dragOvers) { + + var ddo = this.dragOvers[i]; + + if (! this.isTypeOfDD(ddo)) { + continue; + } + + if (! this.isOverTarget(pt, ddo, this.mode)) { + outEvts.push( ddo ); + } + + oldOvers[i] = true; + delete this.dragOvers[i]; + } + + for (var sGroup in dc.groups) { + + if ("string" != typeof sGroup) { + continue; + } + + for (i in this.ids[sGroup]) { + var oDD = this.ids[sGroup][i]; + if (! this.isTypeOfDD(oDD)) { + continue; + } + + if (oDD.isTarget && !oDD.isLocked() && oDD != dc) { + if (this.isOverTarget(pt, oDD, this.mode)) { + + if (isDrop) { + dropEvts.push( oDD ); + + } else { + + + if (!oldOvers[oDD.id]) { + enterEvts.push( oDD ); + + } else { + overEvts.push( oDD ); + } + + this.dragOvers[oDD.id] = oDD; + } + } + } + } + } + + if (this.mode) { + if (outEvts.length) { + dc.b4DragOut(e, outEvts); + dc.onDragOut(e, outEvts); + } + + if (enterEvts.length) { + dc.onDragEnter(e, enterEvts); + } + + if (overEvts.length) { + dc.b4DragOver(e, overEvts); + dc.onDragOver(e, overEvts); + } + + if (dropEvts.length) { + dc.b4DragDrop(e, dropEvts); + dc.onDragDrop(e, dropEvts); + } + + } else { + + var len = 0; + for (i=0, len=outEvts.length; i 2000) { + } else { + setTimeout(DDM._addListeners, 10); + if (document && document.body) { + DDM._timeoutCount += 1; + } + } + } + }, + + + handleWasClicked: function(node, id) { + if (this.isHandle(id, node.id)) { + return true; + } else { + + var p = node.parentNode; + + while (p) { + if (this.isHandle(id, p.id)) { + return true; + } else { + p = p.parentNode; + } + } + } + + return false; + } + + }; + +}(); + + +Ext.dd.DDM = Ext.dd.DragDropMgr; +Ext.dd.DDM._addListeners(); + +} + + +Ext.dd.DD = function(id, sGroup, config) { + if (id) { + this.init(id, sGroup, config); + } +}; + +Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, { + + + scroll: true, + + + autoOffset: function(iPageX, iPageY) { + var x = iPageX - this.startPageX; + var y = iPageY - this.startPageY; + this.setDelta(x, y); + }, + + + setDelta: function(iDeltaX, iDeltaY) { + this.deltaX = iDeltaX; + this.deltaY = iDeltaY; + }, + + + setDragElPos: function(iPageX, iPageY) { + + + + var el = this.getDragEl(); + this.alignElWithMouse(el, iPageX, iPageY); + }, + + + alignElWithMouse: function(el, iPageX, iPageY) { + var oCoord = this.getTargetCoord(iPageX, iPageY); + var fly = el.dom ? el : Ext.fly(el, '_dd'); + if (!this.deltaSetXY) { + var aCoord = [oCoord.x, oCoord.y]; + fly.setXY(aCoord); + var newLeft = fly.getLeft(true); + var newTop = fly.getTop(true); + this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ]; + } else { + fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]); + } + + this.cachePosition(oCoord.x, oCoord.y); + this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth); + return oCoord; + }, + + + cachePosition: function(iPageX, iPageY) { + if (iPageX) { + this.lastPageX = iPageX; + this.lastPageY = iPageY; + } else { + var aCoord = Ext.lib.Dom.getXY(this.getEl()); + this.lastPageX = aCoord[0]; + this.lastPageY = aCoord[1]; + } + }, + + + autoScroll: function(x, y, h, w) { + + if (this.scroll) { + + var clientH = Ext.lib.Dom.getViewHeight(); + + + var clientW = Ext.lib.Dom.getViewWidth(); + + + var st = this.DDM.getScrollTop(); + + + var sl = this.DDM.getScrollLeft(); + + + var bot = h + y; + + + var right = w + x; + + + + + var toBot = (clientH + st - y - this.deltaY); + + + var toRight = (clientW + sl - x - this.deltaX); + + + + + var thresh = 40; + + + + + var scrAmt = (document.all) ? 80 : 30; + + + + if ( bot > 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; + + if (this.constrainX) { + if (x < this.minX) { x = this.minX; } + if (x > this.maxX) { x = this.maxX; } + } + + if (this.constrainY) { + if (y < this.minY) { y = this.minY; } + if (y > this.maxY) { y = this.maxY; } + } + + x = this.getTick(x, this.xTicks); + y = this.getTick(y, this.yTicks); + + + 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()); + }, + + toString: function() { + return ("DD " + this.id); + } + + + + + + +}); + +Ext.dd.DDProxy = function(id, sGroup, config) { + if (id) { + this.init(id, sGroup, config); + this.initFrame(); + } +}; + + +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; + + if (!body || !body.firstChild) { + setTimeout( function() { self.createFrame(); }, 50 ); + return; + } + + var div = this.getDragEl(); + + if (!div) { + div = document.createElement("div"); + div.id = this.dragElId; + var s = div.style; + + s.position = "absolute"; + s.visibility = "hidden"; + s.cursor = "move"; + s.border = "2px solid #aaa"; + s.zIndex = 999; + + + + + body.insertBefore(div, body.firstChild); + } + }, + + + initFrame: function() { + this.createFrame(); + }, + + applyConfig: function() { + Ext.dd.DDProxy.superclass.applyConfig.call(this); + + this.resizeFrame = (this.config.resizeFrame !== false); + this.centerFrame = (this.config.centerFrame); + this.setDragElId(this.config.dragElId || Ext.dd.DDProxy.dragElId); + }, + + + showFrame: function(iPageX, iPageY) { + var el = this.getEl(); + var dragEl = this.getDragEl(); + var s = dragEl.style; + + this._resizeProxy(); + + if (this.centerFrame) { + this.setDelta( Math.round(parseInt(s.width, 10)/2), + Math.round(parseInt(s.height, 10)/2) ); + } + + this.setDragElPos(iPageX, iPageY); + + Ext.fly(dragEl).show(); + }, + + + _resizeProxy: function() { + if (this.resizeFrame) { + var el = this.getEl(); + Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight); + } + }, + + + b4MouseDown: function(e) { + var x = e.getPageX(); + var y = e.getPageY(); + this.autoOffset(x, y); + 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"; + lel.style.visibility = ""; + + this.afterDrag(); + }, + + beforeMove : function(){ + + }, + + afterDrag : function(){ + + }, + + toString: function() { + return ("DDProxy " + this.id); + } + +}); + +Ext.dd.DDTarget = function(id, sGroup, config) { + if (id) { + this.initTarget(id, sGroup, config); + } +}; + + +Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, { + toString: function() { + return ("DDTarget " + this.id); + } +}); + +Ext.dd.DragTracker = 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); + } +} + +Ext.extend(Ext.dd.DragTracker, Ext.util.Observable, { + active: false, + tolerance: 5, + autoStart: false, + + initEl: function(el){ + this.el = Ext.get(el); + el.on('mousedown', this.onMouseDown, this, + this.delegate ? {delegate: this.delegate} : undefined); + }, + + destroy : function(){ + this.el.un('mousedown', this.onMouseDown, this); + }, + + onMouseDown: function(e, target){ + if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){ + this.startXY = this.lastXY = e.getXY(); + this.dragTarget = this.delegate ? target : this.el.dom; + e.preventDefault(); + var doc = Ext.getDoc(); + doc.on('mouseup', this.onMouseUp, this); + doc.on('mousemove', this.onMouseMove, this); + doc.on('selectstart', this.stopSelect, this); + if(this.autoStart){ + this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this); + } + } + }, + + onMouseMove: function(e, target){ + e.preventDefault(); + var xy = e.getXY(), s = this.startXY; + this.lastXY = xy; + if(!this.active){ + if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){ + this.triggerStart(); + }else{ + return; + } + } + this.fireEvent('mousemove', this, e); + this.onDrag(e); + this.fireEvent('drag', this, e); + }, + + onMouseUp: function(e){ + var doc = Ext.getDoc(); + doc.un('mousemove', this.onMouseMove, this); + doc.un('mouseup', this.onMouseUp, this); + doc.un('selectstart', this.stopSelect, this); + e.preventDefault(); + this.clearStart(); + this.active = false; + delete this.elRegion; + this.fireEvent('mouseup', this, e); + this.onEnd(e); + this.fireEvent('dragend', this, e); + }, + + triggerStart: function(isTimer){ + this.clearStart(); + this.active = true; + this.onStart(this.startXY); + this.fireEvent('dragstart', this, this.startXY); + }, + + clearStart : function(){ + if(this.timer){ + clearTimeout(this.timer); + delete this.timer; + } + }, + + stopSelect : function(e){ + e.stopEvent(); + return false; + }, + + onBeforeStart : function(e){ + + }, + + onStart : function(xy){ + + }, + + onDrag : function(e){ + + }, + + onEnd : function(e){ + + }, + + getDragTarget : function(){ + return this.dragTarget; + }, + + getDragCt : function(){ + return this.el; + }, + + getXY : function(constrain){ + return constrain ? + this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY; + }, + + getOffset : function(constrain){ + var xy = this.getXY(constrain); + var s = this.startXY; + return [s[0]-xy[0], s[1]-xy[1]]; + }, + + constrainModes: { + 'point' : function(xy){ + + if(!this.elRegion){ + this.elRegion = this.getDragCt().getRegion(); + } + + var dr = this.dragRegion; + + dr.left = xy[0]; + dr.top = xy[1]; + dr.right = xy[0]; + dr.bottom = xy[1]; + + dr.constrainTo(this.elRegion); + + return [dr.left, dr.top]; + } + } +}); + +Ext.dd.ScrollManager = function(){ + var ddm = Ext.dd.DragDropMgr; + 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; + var inc = proc.el.ddScrollConfig ? + proc.el.ddScrollConfig.increment : dds.increment; + if(!dds.animate){ + if(proc.el.scroll(proc.dir, inc)){ + triggerRefresh(); + } + }else{ + proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh); + } + } + }; + + var clearProc = function(){ + if(proc.id){ + clearInterval(proc.id); + } + proc.id = 0; + proc.el = null; + proc.dir = ""; + }; + + var startProc = function(el, dir){ + clearProc(); + proc.el = el; + proc.dir = dir; + proc.id = setInterval(doScroll, Ext.dd.ScrollManager.frequency); + }; + + 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){ + var el = els[id], r = el._region; + var c = el.ddScrollConfig ? el.ddScrollConfig : dds; + if(r && r.contains(pt) && el.isScrollable()){ + if(r.bottom - pt.y <= c.vthresh){ + if(proc.el != el){ + startProc(el, "down"); + } + return; + }else if(r.right - pt.x <= c.hthresh){ + if(proc.el != el){ + startProc(el, "left"); + } + return; + }else if(pt.y - r.top <= c.vthresh){ + if(proc.el != el){ + startProc(el, "up"); + } + return; + }else if(pt.x - r.left <= c.hthresh){ + if(proc.el != el){ + startProc(el, "right"); + } + return; + } + } + } + clearProc(); + }; + + ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm); + ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm); + + return { + + register : function(el){ + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++) { + this.register(el[i]); + } + }else{ + el = Ext.get(el); + els[el.id] = el; + } + }, + + + unregister : function(el){ + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++) { + this.unregister(el[i]); + } + }else{ + el = Ext.get(el); + delete els[el.id]; + } + }, + + + vthresh : 25, + + hthresh : 25, + + + increment : 100, + + + frequency : 500, + + + animate: true, + + + animDuration: .4, + + + refreshCache : function(){ + for(var id in els){ + if(typeof els[id] == 'object'){ + els[id]._region = els[id].getRegion(); + } + } + } + }; +}(); + +Ext.dd.Registry = function(){ + var elements = {}; + var handles = {}; + var autoIdSeed = 0; + + var getId = function(el, autogen){ + if(typeof el == "string"){ + return el; + } + var id = el.id; + if(!id && autogen !== false){ + id = "extdd-" + (++autoIdSeed); + el.id = id; + } + return id; + }; + + return { + + register : function(el, data){ + data = data || {}; + if(typeof el == "string"){ + el = document.getElementById(el); + } + data.ddel = el; + elements[getId(el)] = data; + if(data.isHandle !== false){ + handles[data.ddel.id] = data; + } + if(data.handles){ + var hs = data.handles; + for(var i = 0, len = hs.length; i < len; i++){ + handles[getId(hs[i])] = data; + } + } + }, + + + unregister : function(el){ + var id = getId(el, false); + var data = elements[id]; + if(data){ + delete elements[id]; + if(data.handles){ + var hs = data.handles; + for(var i = 0, len = hs.length; i < len; i++){ + delete handles[getId(hs[i], false)]; + } + } + } + }, + + + getHandle : function(id){ + 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"){ + 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; + } + }; +}(); + +Ext.dd.StatusProxy = function(config){ + Ext.apply(this, config); + this.id = this.id || Ext.id(); + this.el = new Ext.Layer({ + dh: { + id: this.id, tag: "div", cls: "x-dd-drag-proxy "+this.dropNotAllowed, children: [ + {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]); + this.dropStatus = this.dropNotAllowed; +}; + +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){ + this.el.replaceClass(this.dropStatus, cssClass); + this.dropStatus = cssClass; + } + }, + + + reset : function(clearGhost){ + this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed; + this.dropStatus = this.dropNotAllowed; + if(clearGhost){ + this.ghost.update(""); + } + }, + + + update : function(html){ + if(typeof html == "string"){ + this.ghost.update(html); + }else{ + this.ghost.update(""); + html.style.margin = "0"; + this.ghost.dom.appendChild(html); + } + }, + + + getEl : function(){ + return this.el; + }, + + + getGhost : function(){ + return this.ghost; + }, + + + hide : function(clear){ + this.el.hide(); + if(clear){ + this.reset(true); + } + }, + + + 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; + if(xy && this.animRepair !== false){ + this.el.addClass("x-dd-drag-repair"); + this.el.hideUnders(true); + this.anim = this.el.shift({ + duration: this.repairDuration || .5, + easing: 'easeOut', + xy: xy, + stopFx: true, + callback: this.afterRepair, + scope: this + }); + }else{ + this.afterRepair(); + } + }, + + + afterRepair : function(){ + this.hide(true); + if(typeof this.callback == "function"){ + this.callback.call(this.scope || this); + } + this.callback = null; + this.scope = null; + } +}; + +Ext.dd.DragSource = function(el, config){ + this.el = Ext.get(el); + 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, + {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; + if(this.beforeDragEnter(target, e, id) !== false){ + if(target.isNotifyTarget){ + var status = target.notifyEnter(this, e, this.dragData); + this.proxy.setStatus(status); + }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){ + if(target.isNotifyTarget){ + var status = target.notifyOver(this, e, this.dragData); + this.proxy.setStatus(status); + } + + 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){ + if(target.isNotifyTarget){ + target.notifyOut(this, e, this.dragData); + } + 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)){ + this.onValidDrop(target, e, id); + }else{ + this.onInvalidDrop(target, e, id); + } + }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(); + }, + + + onInvalidDrop : function(target, e, id){ + this.beforeInvalidDrop(target, e, id); + if(this.cachedTarget){ + if(this.cachedTarget.isNotifyTarget){ + this.cachedTarget.notifyOut(this, e, this.dragData); + } + this.cacheTarget = null; + } + 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"); + } + this.dragging = false; + }, + + + beforeInvalidDrop : function(target, e, id){ + return true; + }, + + + handleMouseDown : function(e){ + if(this.dragging) { + return; + } + var data = this.getDragData(e); + if(data && this.onBeforeDrag(data, e) !== false){ + 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; + this.proxy.update(""); + this.onInitDrag(x, y); + this.proxy.show(); + }, + + + onInitDrag : function(x, y){ + var clone = this.el.dom.cloneNode(true); + clone.id = Ext.id(); + this.proxy.update(clone); + this.onStartDrag(x, y); + return true; + }, + + + getProxy : function(){ + return this.proxy; + }, + + + hideProxy : function(){ + 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); + } +}); + +Ext.dd.DropTarget = 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.extend(Ext.dd.DropTarget, Ext.dd.DDTarget, { + + + + 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); + } + 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; + } +}); + +Ext.dd.DragZone = function(el, config){ + Ext.dd.DragZone.superclass.constructor.call(this, el, config); + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.el); + } +}; + +Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, { + + + + + 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"); + } + this.dragging = false; + }, + + + getRepairXY : function(e){ + return Ext.Element.fly(this.dragData.ddel).getXY(); + } +}); + +Ext.dd.DropZone = function(el, config){ + Ext.dd.DropZone.superclass.constructor.call(this, 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(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + return this.onContainerOver(dd, e, data); + } + if(this.lastOverNode != n){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + } + this.onNodeEnter(n, dd, e, data); + this.lastOverNode = n; + } + return this.onNodeOver(n, dd, e, data); + }, + + + notifyOut : function(dd, e, data){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + }, + + + notifyDrop : function(dd, e, data){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + var n = this.getTargetFromEvent(e); + return n ? + this.onNodeDrop(n, dd, e, data) : + this.onContainerDrop(dd, e, data); + }, + + + triggerCacheRefresh : function(){ + Ext.dd.DDM.refreshCache(this.groups); + } +}); + + +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; + } + if(s instanceof Date){ + return s.getTime(); + } + return Date.parse(String(s)); + }, + + + asFloat : function(s) { + var val = parseFloat(String(s).replace(/,/g, "")); + if(isNaN(val)) val = 0; + return val; + }, + + + asInt : function(s) { + var val = parseInt(String(s).replace(/,/g, "")); + if(isNaN(val)) val = 0; + return val; + } +}; + +Ext.data.Record = function(data, id){ + this.id = (id || id === 0) ? id : ++Ext.data.Record.AUTO_ID; + this.data = data; +}; + + +Ext.data.Record.create = function(o){ + var f = Ext.extend(Ext.data.Record, {}); + var p = f.prototype; + p.fields = new Ext.util.MixedCollection(false, function(field){ + return field.name; + }); + for(var i = 0, len = o.length; i < len; i++){ + p.fields.add(new Ext.data.Field(o[i])); + } + f.getField = function(name){ + return p.fields.get(name); + }; + return f; +}; + +Ext.data.Record.AUTO_ID = 1000; +Ext.data.Record.EDIT = 'edit'; +Ext.data.Record.REJECT = 'reject'; +Ext.data.Record.COMMIT = 'commit'; + +Ext.data.Record.prototype = { + + + + dirty : false, + editing : false, + error: null, + + modified: null, + + + join : function(store){ + this.store = store; + }, + + + set : function(name, value){ + if(String(this.data[name]) == String(value)){ + return; + } + this.dirty = true; + if(!this.modified){ + this.modified = {}; + } + if(typeof this.modified[name] == 'undefined'){ + this.modified[name] = this.data[name]; + } + this.data[name] = value; + if(!this.editing){ + this.store.afterEdit(this); + } + }, + + + get : function(name){ + return this.data[name]; + }, + + + beginEdit : function(){ + this.editing = true; + this.modified = {}; + }, + + + cancelEdit : function(){ + this.editing = false; + delete this.modified; + }, + + + endEdit : function(){ + this.editing = false; + if(this.dirty && this.store){ + this.store.afterEdit(this); + } + }, + + + reject : function(silent){ + var m = this.modified; + for(var n in m){ + if(typeof m[n] != "function"){ + this.data[n] = m[n]; + } + } + this.dirty = false; + delete this.modified; + this.editing = false; + if(this.store && silent !== true){ + this.store.afterReject(this); + } + }, + + + commit : function(silent){ + this.dirty = false; + delete this.modified; + this.editing = false; + if(this.store && silent !== true){ + this.store.afterCommit(this); + } + }, + + + getChanges : function(){ + var m = this.modified, cs = {}; + for(var n in m){ + if(m.hasOwnProperty(n)){ + cs[n] = this.data[n]; + } + } + 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); + } +}; + +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){ + return typeof id == "object" ? id : this.get(id); + }, + + + getKey : function(o){ + return o.storeId || o.id; + } +}); + +Ext.data.Store = function(config){ + this.data = new Ext.util.MixedCollection(false); + this.data.getKey = function(o){ + return o.id; + }; + + this.baseParams = {}; + + this.paramNames = { + "start" : "start", + "limit" : "limit", + "sort" : "sort", + "dir" : "dir" + }; + + if(config && config.data){ + this.inlineData = config.data; + delete config.data; + } + + Ext.apply(this, config); + + if(this.url && !this.proxy){ + this.proxy = new Ext.data.HttpProxy({url: this.url}); + } + + if(this.reader){ + if(!this.recordType){ + this.recordType = this.reader.recordType; + } + if(this.reader.onMetaChange){ + this.reader.onMetaChange = this.onMetaChange.createDelegate(this); + } + } + + if(this.recordType){ + this.fields = this.recordType.prototype.fields; + } + this.modified = []; + + this.addEvents( + + 'datachanged', + + 'metachange', + + 'add', + + 'remove', + + 'update', + + 'clear', + + 'beforeload', + + 'load', + + 'loadexception' + ); + + if(this.proxy){ + this.relayEvents(this.proxy, ["loadexception"]); + } + this.sortToggle = {}; + + Ext.data.Store.superclass.constructor.call(this); + + if(this.storeId || this.id){ + Ext.StoreMgr.register(this); + } + if(this.inlineData){ + this.loadData(this.inlineData); + delete this.inlineData; + }else if(this.autoLoad){ + this.load.defer(10, this, [ + typeof this.autoLoad == 'object' ? + this.autoLoad : undefined]); + } +}; +Ext.extend(Ext.data.Store, Ext.util.Observable, { + + + + + + + + + + remoteSort : false, + + + pruneModifiedRecords : false, + + + lastOptions : null, + + destroy : function(){ + if(this.id){ + Ext.StoreMgr.unregister(this); + } + this.data = null; + this.purgeListeners(); + }, + + + add : function(records){ + records = [].concat(records); + if(records.length < 1){ + return; + } + for(var i = 0, len = records.length; i < len; i++){ + records[i].join(this); + } + var index = this.data.length; + this.data.addAll(records); + if(this.snapshot){ + this.snapshot.addAll(records); + } + this.fireEvent("add", this, records, index); + }, + + + addSorted : function(record){ + var index = this.findInsertIndex(record); + this.insert(index, record); + }, + + + remove : function(record){ + var index = this.data.indexOf(record); + this.data.removeAt(index); + if(this.pruneModifiedRecords){ + this.modified.remove(record); + } + if(this.snapshot){ + this.snapshot.remove(record); + } + this.fireEvent("remove", this, record, index); + }, + + + removeAll : function(){ + this.data.clear(); + if(this.snapshot){ + this.snapshot.clear(); + } + if(this.pruneModifiedRecords){ + this.modified = []; + } + this.fireEvent("clear", this); + }, + + + insert : function(index, records){ + records = [].concat(records); + for(var i = 0, len = records.length; i < len; i++){ + this.data.insert(index, records[i]); + records[i].join(this); + } + 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.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; + delete o.scope; + this.lastOptions = o; + }, + + + load : function(options){ + options = options || {}; + if(this.fireEvent("beforeload", this, options) !== false){ + this.storeOptions(options); + var p = Ext.apply(options.params || {}, this.baseParams); + if(this.sortInfo && this.remoteSort){ + var pn = this.paramNames; + p[pn["sort"]] = this.sortInfo.field; + p[pn["dir"]] = this.sortInfo.direction; + } + this.proxy.load(p, this.reader, this.loadRecords, this, options); + } + }, + + + reload : function(options){ + this.load(Ext.applyIf(options||{}, this.lastOptions)); + }, + + + + loadRecords : function(o, options, success){ + if(!o || success === false){ + if(success !== false){ + this.fireEvent("load", this, [], options); + } + if(options.callback){ + options.callback.call(options.scope || this, [], options, false); + } + return; + } + var r = o.records, t = o.totalRecords || r.length; + if(!options || options.add !== true){ + if(this.pruneModifiedRecords){ + this.modified = []; + } + for(var i = 0, len = r.length; i < len; i++){ + r[i].join(this); + } + if(this.snapshot){ + this.data = this.snapshot; + delete this.snapshot; + } + this.data.clear(); + this.data.addAll(r); + this.totalLength = t; + this.applySort(); + this.fireEvent("datachanged", this); + }else{ + this.totalLength = Math.max(t, this.data.length+r.length); + this.add(r); + } + this.fireEvent("load", this, r, options); + if(options.callback){ + options.callback.call(options.scope || this, r, options, true); + } + }, + + + loadData : function(o, append){ + 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.remoteSort){ + var s = this.sortInfo, f = s.field; + this.sortData(f, s.direction); + } + }, + + + sortData : function(f, direction){ + direction = direction || 'ASC'; + var st = this.fields.get(f).sortType; + var fn = function(r1, r2){ + var v1 = st(r1.data[f]), v2 = st(r2.data[f]); + return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); + }; + this.data.sort(direction, fn); + if(this.snapshot && this.snapshot != this.data){ + this.snapshot.sort(direction, fn); + } + }, + + + setDefaultSort : function(field, dir){ + dir = dir ? dir.toUpperCase() : "ASC"; + this.sortInfo = {field: field, direction: dir}; + this.sortToggle[field] = dir; + }, + + + sort : function(fieldName, dir){ + var f = this.fields.get(fieldName); + if(!f){ + return false; + } + if(!dir){ + if(this.sortInfo && this.sortInfo.field == f.name){ + dir = (this.sortToggle[f.name] || "ASC").toggle("ASC", "DESC"); + }else{ + dir = f.sortDir; + } + } + this.sortToggle[f.name] = dir; + this.sortInfo = {field: f.name, direction: dir}; + if(!this.remoteSort){ + this.applySort(); + this.fireEvent("datachanged", this); + }else{ + this.load(this.lastOptions); + } + }, + + + each : function(fn, scope){ + this.data.each(fn, scope); + }, + + + getModifiedRecords : function(){ + return this.modified; + }, + + + createFilterFn : function(property, value, anyMatch, caseSensitive){ + if(Ext.isEmpty(value, false)){ + return false; + } + value = this.data.createValueMatcher(value, anyMatch, caseSensitive); + return function(r){ + return value.test(r.data[property]); + }; + }, + + + sum : function(property, start, end){ + var rs = this.data.items, v = 0; + start = start || 0; + end = (end || end === 0) ? end : rs.length-1; + + for(var i = start; i <= end; i++){ + v += (rs[i].data[property] || 0); + } + return v; + }, + + + filter : function(property, value, anyMatch, caseSensitive){ + var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); + 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); + }, + + + 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; + }, + + + 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; + var v, sv, r = [], l = {}; + for(var i = 0, len = d.length; i < len; i++){ + v = d[i].data[dataIndex]; + sv = String(v); + if((allowNull || !Ext.isEmpty(v)) && !l[sv]){ + l[sv] = true; + r[r.length] = v; + } + } + return r; + }, + + + clearFilter : function(suppressEvent){ + if(this.isFiltered()){ + this.data = this.snapshot; + delete this.snapshot; + if(suppressEvent !== true){ + this.fireEvent("datachanged", this); + } + } + }, + + + isFiltered : function(){ + return this.snapshot && this.snapshot != this.data; + }, + + + afterEdit : function(record){ + if(this.modified.indexOf(record) == -1){ + this.modified.push(record); + } + 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 m = this.modified.slice(0); + this.modified = []; + for(var i = 0, len = m.length; i < len; i++){ + m[i].commit(); + } + }, + + + rejectChanges : function(){ + var m = this.modified.slice(0); + this.modified = []; + for(var i = 0, len = m.length; i < len; i++){ + m[i].reject(); + } + }, + + + onMetaChange : function(meta, rtype, o){ + this.recordType = rtype; + this.fields = rtype.prototype.fields; + delete this.snapshot; + this.sortInfo = meta.sortInfo; + this.modified = []; + this.fireEvent('metachange', this, this.reader.meta); + }, + + + findInsertIndex : function(record){ + this.suspendEvents(); + var data = this.data.clone(); + this.data.add(record); + this.applySort(); + var index = this.data.indexOf(record); + this.data = data; + this.resumeEvents(); + return index; + } +}); + +Ext.data.SimpleStore = function(config){ + Ext.data.SimpleStore.superclass.constructor.call(this, Ext.apply(config, { + reader: new Ext.data.ArrayReader({ + id: config.id + }, + Ext.data.Record.create(config.fields) + ) + })); +}; +Ext.extend(Ext.data.SimpleStore, Ext.data.Store, { + loadData : function(data, append){ + if(this.expandData === true){ + var r = []; + for(var i = 0, len = data.length; i < len; i++){ + r[r.length] = [data[i]]; + } + data = r; + } + Ext.data.SimpleStore.superclass.loadData.call(this, data, append); + } +}); + +Ext.data.JsonStore = function(c){ + Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(c, { + proxy: !c.data ? new Ext.data.HttpProxy({url: c.url}) : undefined, + reader: new Ext.data.JsonReader(c, c.fields) + })); +}; +Ext.extend(Ext.data.JsonStore, Ext.data.Store); + + + +Ext.data.Field = function(config){ + if(typeof config == "string"){ + config = {name: config}; + } + Ext.apply(this, config); + + if(!this.type){ + this.type = "auto"; + } + + var st = Ext.data.SortTypes; + + if(typeof this.sortType == "string"){ + this.sortType = st[this.sortType]; + } + + + if(!this.sortType){ + switch(this.type){ + case "string": + this.sortType = st.asUCString; + break; + case "date": + this.sortType = st.asDate; + break; + default: + this.sortType = st.none; + } + } + + + var stripRe = /[\$,%]/g; + + + + if(!this.convert){ + var cv, dateFormat = this.dateFormat; + switch(this.type){ + case "": + case "auto": + case undefined: + cv = function(v){ return v; }; + break; + case "string": + cv = function(v){ return (v === undefined || v === null) ? '' : String(v); }; + break; + case "int": + cv = function(v){ + return v !== undefined && v !== null && v !== '' ? + parseInt(String(v).replace(stripRe, ""), 10) : ''; + }; + break; + case "float": + cv = function(v){ + return v !== undefined && v !== null && v !== '' ? + parseFloat(String(v).replace(stripRe, ""), 10) : ''; + }; + break; + case "bool": + case "boolean": + cv = function(v){ return v === true || v === "true" || v == 1; }; + break; + case "date": + cv = function(v){ + if(!v){ + return ''; + } + if(v instanceof Date){ + return v; + } + if(dateFormat){ + if(dateFormat == "timestamp"){ + return new Date(v*1000); + } + if(dateFormat == "time"){ + return new Date(parseInt(v, 10)); + } + return Date.parseDate(v, dateFormat); + } + var parsed = Date.parse(v); + return parsed ? new Date(parsed) : null; + }; + break; + + } + this.convert = cv; + } +}; + +Ext.data.Field.prototype = { + dateFormat: null, + defaultValue: "", + mapping: null, + sortType : null, + sortDir : "ASC" +}; + +Ext.data.DataReader = function(meta, recordType){ + + this.meta = meta; + this.recordType = recordType instanceof Array ? + Ext.data.Record.create(recordType) : recordType; +}; + +Ext.data.DataReader.prototype = { + +}; + +Ext.data.DataProxy = function(){ + this.addEvents( + + 'beforeload', + + 'load', + + 'loadexception' + ); + Ext.data.DataProxy.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.DataProxy, Ext.util.Observable); + +Ext.data.MemoryProxy = function(data){ + Ext.data.MemoryProxy.superclass.constructor.call(this); + this.data = data; +}; + +Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, { + + load : function(params, reader, callback, scope, arg){ + params = params || {}; + var result; + try { + result = reader.readRecords(this.data); + }catch(e){ + this.fireEvent("loadexception", this, arg, null, e); + callback.call(scope, null, arg, false); + return; + } + callback.call(scope, result, arg, true); + }, + + + update : function(params, records){ + + } +}); + +Ext.data.HttpProxy = function(conn){ + Ext.data.HttpProxy.superclass.constructor.call(this); + + this.conn = conn; + this.useAjax = !conn || !conn.events; +}; + +Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { + + getConnection : function(){ + return this.useAjax ? Ext.Ajax : this.conn; + }, + + + load : function(params, reader, callback, scope, arg){ + if(this.fireEvent("beforeload", this, params) !== false){ + var o = { + params : params || {}, + request: { + callback : callback, + scope : scope, + arg : arg + }, + reader: reader, + callback : this.loadResponse, + scope: this + }; + if(this.useAjax){ + Ext.applyIf(o, this.conn); + if(this.activeRequest){ + Ext.Ajax.abort(this.activeRequest); + } + this.activeRequest = Ext.Ajax.request(o); + }else{ + this.conn.request(o); + } + }else{ + callback.call(scope||this, null, arg, false); + } + }, + + + loadResponse : function(o, success, response){ + delete this.activeRequest; + if(!success){ + this.fireEvent("loadexception", this, o, response); + o.request.callback.call(o.request.scope, null, o.request.arg, false); + return; + } + var result; + try { + result = o.reader.read(response); + }catch(e){ + this.fireEvent("loadexception", this, o, response, e); + o.request.callback.call(o.request.scope, null, o.request.arg, false); + return; + } + this.fireEvent("load", this, o, o.request.arg); + o.request.callback.call(o.request.scope, result, o.request.arg, true); + }, + + + update : function(dataSet){ + + }, + + + updateResponse : function(dataSet){ + + } +}); + +Ext.data.ScriptTagProxy = function(config){ + Ext.data.ScriptTagProxy.superclass.constructor.call(this); + Ext.apply(this, 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, + + + load : function(params, reader, callback, scope, arg){ + if(this.fireEvent("beforeload", this, params) !== false){ + + var p = Ext.urlEncode(Ext.apply(params, this.extraParams)); + + var url = this.url; + url += (url.indexOf("?") != -1 ? "&" : "?") + p; + if(this.nocache){ + url += "&_dc=" + (new Date().getTime()); + } + var transId = ++Ext.data.ScriptTagProxy.TRANS_ID; + var trans = { + id : transId, + cb : "stcCallback"+transId, + scriptId : "stcScript"+transId, + params : params, + arg : arg, + url : url, + callback : callback, + scope : scope, + reader : reader + }; + var conn = this; + + window[trans.cb] = function(o){ + conn.handleResponse(o, trans); + }; + + url += String.format("&{0}={1}", this.callbackParam, trans.cb); + + if(this.autoAbort !== false){ + this.abort(); + } + + trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]); + + var script = document.createElement("script"); + script.setAttribute("src", url); + script.setAttribute("type", "text/javascript"); + script.setAttribute("id", trans.scriptId); + this.head.appendChild(script); + + this.trans = trans; + }else{ + callback.call(scope||this, null, arg, false); + } + }, + + + 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); + if(isLoaded){ + window[trans.cb] = undefined; + try{ + delete window[trans.cb]; + }catch(e){} + }else{ + + window[trans.cb] = function(){ + window[trans.cb] = undefined; + try{ + delete window[trans.cb]; + }catch(e){} + }; + } + }, + + + handleResponse : function(o, trans){ + this.trans = false; + this.destroyTrans(trans, true); + var result; + try { + result = trans.reader.readRecords(o); + }catch(e){ + this.fireEvent("loadexception", this, o, trans.arg, e); + trans.callback.call(trans.scope||window, null, trans.arg, false); + return; + } + this.fireEvent("load", this, o, trans.arg); + trans.callback.call(trans.scope||window, result, trans.arg, true); + }, + + + handleFailure : function(trans){ + this.trans = false; + this.destroyTrans(trans, false); + this.fireEvent("loadexception", this, null, trans.arg); + trans.callback.call(trans.scope||window, null, trans.arg, false); + } +}); + +Ext.data.JsonReader = function(meta, recordType){ + meta = meta || {}; + 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 = eval("("+json+")"); + if(!o) { + throw {message: "JsonReader.read: Json object not found"}; + } + if(o.metaData){ + delete this.ef; + this.meta = o.metaData; + this.recordType = Ext.data.Record.create(o.metaData.fields); + this.onMetaChange(this.meta, this.recordType, o); + } + return this.readRecords(o); + }, + + + onMetaChange : function(meta, recordType, o){ + + }, + + + simpleAccess: function(obj, subsc) { + return obj[subsc]; + }, + + + getJsonAccessor: function(){ + var re = /[\[\.]/; + return function(expr) { + try { + return(re.test(expr)) + ? new Function("obj", "return obj." + expr) + : function(obj){ + return obj[expr]; + }; + } catch(e){} + return Ext.emptyFn; + }; + }(), + + + readRecords : function(o){ + + this.jsonData = o; + var s = this.meta, Record = this.recordType, + f = Record.prototype.fields, fi = f.items, fl = f.length; + + + if (!this.ef) { + if(s.totalProperty) { + this.getTotal = this.getJsonAccessor(s.totalProperty); + } + if(s.successProperty) { + this.getSuccess = this.getJsonAccessor(s.successProperty); + } + this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;}; + if (s.id) { + var g = this.getJsonAccessor(s.id); + this.getId = function(rec) { + var r = g(rec); + return (r === undefined || r === "") ? null : r; + }; + } else { + this.getId = function(){return null;}; + } + this.ef = []; + for(var i = 0; i < fl; i++){ + f = fi[i]; + var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name; + this.ef[i] = this.getJsonAccessor(map); + } + } + + var root = this.getRoot(o), c = root.length, totalRecords = c, success = true; + if(s.totalProperty){ + var v = parseInt(this.getTotal(o), 10); + if(!isNaN(v)){ + totalRecords = v; + } + } + if(s.successProperty){ + var v = this.getSuccess(o); + if(v === false || v === 'false'){ + success = false; + } + } + var records = []; + for(var i = 0; i < c; i++){ + var n = root[i]; + var values = {}; + var id = this.getId(n); + for(var j = 0; j < fl; j++){ + f = fi[j]; + var v = this.ef[j](n); + values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue); + } + var record = new Record(values, id); + record.json = n; + records[i] = record; + } + return { + success : success, + records : records, + totalRecords : totalRecords + }; + } +}); + +Ext.data.XmlReader = function(meta, recordType){ + meta = meta || {}; + 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) { + throw {message: "XmlReader.read: XML Document not available"}; + } + return this.readRecords(doc); + }, + + + readRecords : function(doc){ + + this.xmlData = doc; + var root = doc.documentElement || doc; + var q = Ext.DomQuery; + var recordType = this.recordType, fields = recordType.prototype.fields; + var sid = this.meta.id; + var totalRecords = 0, success = true; + if(this.meta.totalRecords){ + totalRecords = q.selectNumber(this.meta.totalRecords, root, 0); + } + + if(this.meta.success){ + var sv = q.selectValue(this.meta.success, root, true); + success = sv !== false && sv !== 'false'; + } + var records = []; + var ns = q.select(this.meta.record, root); + for(var i = 0, len = ns.length; i < len; i++) { + var n = ns[i]; + var values = {}; + var id = sid ? q.selectValue(sid, n) : undefined; + for(var j = 0, jlen = fields.length; j < jlen; j++){ + var f = fields.items[j]; + var v = q.selectValue(f.mapping || f.name, n, f.defaultValue); + v = f.convert(v); + values[f.name] = v; + } + var record = new recordType(values, id); + record.node = n; + records[records.length] = record; + } + + return { + success : success, + records : records, + totalRecords : totalRecords || records.length + }; + } +}); + +Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { + + readRecords : function(o){ + var sid = this.meta ? this.meta.id : null; + var recordType = this.recordType, fields = recordType.prototype.fields; + var records = []; + var root = o; + for(var i = 0; i < root.length; i++){ + var n = root[i]; + var values = {}; + var id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null); + for(var j = 0, jlen = fields.length; j < jlen; j++){ + var f = fields.items[j]; + var k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j; + var v = n[k] !== undefined ? n[k] : f.defaultValue; + v = f.convert(v); + values[f.name] = v; + } + var record = new recordType(values, id); + record.json = n; + records[records.length] = record; + } + return { + records : records, + totalRecords : records.length + }; + } +}); + +Ext.data.Tree = 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.extend(Ext.data.Tree, Ext.util.Observable, { + + pathSeparator: "/", + + + proxyNodeEvent : function(){ + return this.fireEvent.apply(this, arguments); + }, + + + getRootNode : function(){ + return this.root; + }, + + + setRootNode : function(node){ + this.root = node; + node.ownerTree = this; + node.isRoot = true; + this.registerNode(node); + 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]; + }, + + toString : function(){ + return "[Tree"+(this.id?" "+this.id:"")+"]"; + } +}); + + +Ext.data.Node = function(attributes){ + + this.attributes = attributes || {}; + this.leaf = this.attributes.leaf; + + this.id = this.attributes.id; + if(!this.id){ + this.id = Ext.id(null, "ynode-"); + this.attributes.id = this.id; + } + + this.childNodes = []; + if(!this.childNodes.indexOf){ + this.childNodes.indexOf = function(o){ + for(var i = 0, len = this.length; i < len; i++){ + if(this[i] == o) return i; + } + return -1; + }; + } + + 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.extend(Ext.data.Node, Ext.util.Observable, { + + 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){ + return false; + } + } + 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; + }, + + + appendChild : function(node){ + var multi = false; + if(node instanceof Array){ + multi = node; + }else if(arguments.length > 1){ + multi = arguments; + } + + if(multi){ + for(var i = 0, len = multi.length; i < len; i++) { + this.appendChild(multi[i]); + } + }else{ + if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){ + return false; + } + var index = this.childNodes.length; + var oldParent = node.parentNode; + + if(oldParent){ + if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){ + return false; + } + oldParent.removeChild(node); + } + index = this.childNodes.length; + if(index == 0){ + this.setFirstChild(node); + } + this.childNodes.push(node); + node.parentNode = this; + var ps = this.childNodes[index-1]; + if(ps){ + node.previousSibling = ps; + ps.nextSibling = node; + }else{ + node.previousSibling = null; + } + node.nextSibling = null; + this.setLastChild(node); + node.setOwnerTree(this.getOwnerTree()); + this.fireEvent("append", this.ownerTree, this, node, index); + if(oldParent){ + node.fireEvent("move", this.ownerTree, node, oldParent, this, index); + } + return node; + } + }, + + + removeChild : function(node){ + var index = this.childNodes.indexOf(node); + if(index == -1){ + return false; + } + if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){ + return false; + } + + + this.childNodes.splice(index, 1); + + + if(node.previousSibling){ + node.previousSibling.nextSibling = node.nextSibling; + } + if(node.nextSibling){ + node.nextSibling.previousSibling = node.previousSibling; + } + + + if(this.firstChild == node){ + this.setFirstChild(node.nextSibling); + } + if(this.lastChild == node){ + this.setLastChild(node.previousSibling); + } + + node.setOwnerTree(null); + + node.parentNode = null; + node.previousSibling = null; + node.nextSibling = null; + this.fireEvent("remove", this.ownerTree, this, node); + return node; + }, + + + insertBefore : function(node, refNode){ + if(!refNode){ + return this.appendChild(node); + } + + if(node == refNode){ + return false; + } + + if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){ + return false; + } + var index = this.childNodes.indexOf(refNode); + 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; + } + oldParent.removeChild(node); + } + if(refIndex == 0){ + this.setFirstChild(node); + } + this.childNodes.splice(refIndex, 0, node); + node.parentNode = this; + var ps = this.childNodes[refIndex-1]; + if(ps){ + node.previousSibling = ps; + ps.nextSibling = node; + }else{ + node.previousSibling = null; + } + node.nextSibling = refNode; + refNode.previousSibling = node; + node.setOwnerTree(this.getOwnerTree()); + this.fireEvent("insert", this.ownerTree, this, node, refNode); + if(oldParent){ + node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode); + } + return node; + }, + + + remove : function(){ + this.parentNode.removeChild(this); + return this; + }, + + + item : function(index){ + return this.childNodes[index]; + }, + + + replaceChild : function(newChild, oldChild){ + this.insertBefore(newChild, oldChild); + this.removeChild(oldChild); + return oldChild; + }, + + + indexOf : function(child){ + return this.childNodes.indexOf(child); + }, + + + getOwnerTree : function(){ + + if(!this.ownerTree){ + var p = this; + while(p){ + if(p.ownerTree){ + this.ownerTree = p.ownerTree; + break; + } + p = p.parentNode; + } + } + return this.ownerTree; + }, + + + getDepth : function(){ + var depth = 0; + var p = this; + while(p.parentNode){ + ++depth; + p = p.parentNode; + } + return depth; + }, + + + setOwnerTree : function(tree){ + + if(tree != this.ownerTree){ + if(this.ownerTree){ + this.ownerTree.unregisterNode(this); + } + this.ownerTree = tree; + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].setOwnerTree(tree); + } + if(tree){ + tree.registerNode(this); + } + } + }, + + + getPath : function(attr){ + attr = attr || "id"; + var p = this.parentNode; + var b = [this.attributes[attr]]; + while(p){ + b.unshift(p.attributes[attr]); + p = p.parentNode; + } + var sep = this.getOwnerTree().pathSeparator; + return sep + b.join(sep); + }, + + + bubble : function(fn, scope, args){ + var p = this; + while(p){ + if(fn.apply(scope || p, args || [p]) === false){ + break; + } + p = p.parentNode; + } + }, + + + cascade : function(fn, scope, args){ + if(fn.apply(scope || this, args || [this]) !== false){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].cascade(fn, scope, args); + } + } + }, + + + eachChild : function(fn, scope, args){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + if(fn.apply(scope || this, args || [cs[i]]) === false){ + break; + } + } + }, + + + findChild : function(attribute, value){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + if(cs[i].attributes[attribute] == value){ + return cs[i]; + } + } + return null; + }, + + + findChildBy : function(fn, scope){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + if(fn.call(scope||cs[i], cs[i]) === true){ + return cs[i]; + } + } + return null; + }, + + + sort : function(fn, scope){ + var cs = this.childNodes; + var len = cs.length; + if(len > 0){ + var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn; + cs.sort(sortFn); + for(var i = 0; i < len; i++){ + var n = cs[i]; + n.previousSibling = cs[i-1]; + n.nextSibling = cs[i+1]; + if(i == 0){ + this.setFirstChild(n); + } + if(i == len-1){ + this.setLastChild(n); + } + } + } + }, + + + contains : function(node){ + return node.isAncestor(this); + }, + + + isAncestor : function(node){ + var p = this.parentNode; + while(p){ + if(p == node){ + return true; + } + p = p.parentNode; + } + return false; + }, + + toString : function(){ + return "[Node"+(this.id?" "+this.id:"")+"]"; + } +}); + +Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { + + + remoteGroup : false, + + groupOnSort:false, + + + clearGrouping : function(){ + this.groupField = false; + if(this.remoteGroup){ + if(this.baseParams){ + delete this.baseParams.groupBy; + } + this.reload(); + }else{ + this.applySort(); + this.fireEvent('datachanged', this); + } + }, + + + groupBy : function(field, forceRegroup){ + if(this.groupField == field && !forceRegroup){ + return; + } + this.groupField = field; + if(this.remoteGroup){ + if(!this.baseParams){ + this.baseParams = {}; + } + this.baseParams['groupBy'] = field; + } + if(this.groupOnSort){ + this.sort(field); + return; + } + if(this.remoteGroup){ + this.reload(); + }else{ + var si = this.sortInfo || {}; + if(si.field != field){ + this.applySort(); + }else{ + this.sortData(field); + } + this.fireEvent('datachanged', this); + } + }, + + + applySort : function(){ + Ext.data.GroupingStore.superclass.applySort.call(this); + if(!this.groupOnSort && !this.remoteGroup){ + var gs = this.getGroupState(); + if(gs && gs != this.sortInfo.field){ + this.sortData(this.groupField); + } + } + }, + + + applyGrouping : function(alwaysFireChange){ + if(this.groupField !== false){ + this.groupBy(this.groupField, true); + return true; + }else{ + if(alwaysFireChange === true){ + this.fireEvent('datachanged', this); + } + return false; + } + }, + + + getGroupState : function(){ + return this.groupOnSort && this.groupField !== false ? + (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField; + } +}); + +Ext.ComponentMgr = function(){ + var all = new Ext.util.MixedCollection(); + var types = {}; + + 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){ + fn.call(scope || o, o); + all.un("add", fn, scope); + } + }); + }, + + + all : all, + + + registerType : function(xtype, cls){ + types[xtype] = cls; + cls.xtype = xtype; + }, + + + create : function(config, defaultType){ + return new types[config.xtype || defaultType](config); + } + }; +}(); + + + +Ext.reg = Ext.ComponentMgr.registerType; + +Ext.Component = function(config){ + config = config || {}; + if(config.initialConfig){ + if(config.isAction){ this.baseAction = config; + } + config = config.initialConfig; }else if(config.tagName || config.dom || typeof config == "string"){ config = {applyTo: config, id: config.id || config}; + } + + + this.initialConfig = config; + + Ext.apply(this, config); + this.addEvents( + + 'disable', + + 'enable', + + 'beforeshow', + + 'show', + + 'beforehide', + + 'hide', + + 'beforerender', + + 'render', + + 'beforedestroy', + + 'destroy', + + 'beforestaterestore', + + 'staterestore', + + 'beforestatesave', + + 'statesave' + ); + this.getId(); + Ext.ComponentMgr.register(this); + Ext.Component.superclass.constructor.call(this); + + if(this.baseAction){ + this.baseAction.addComponent(this); + } + + this.initComponent(); + + if(this.plugins){ + if(this.plugins instanceof Array){ + for(var i = 0, len = this.plugins.length; i < len; i++){ + this.plugins[i].init(this); + } + }else{ + this.plugins.init(this); + } + } + + if(this.stateful !== false){ + this.initState(config); + } + + if(this.applyTo){ + this.applyToMarkup(this.applyTo); + delete this.applyTo; + }else if(this.renderTo){ + this.render(this.renderTo); + delete this.renderTo; + } +}; + +Ext.Component.AUTO_ID = 1000; + +Ext.extend(Ext.Component, Ext.util.Observable, { + + + + + + + + + + + + + + disabledClass : "x-item-disabled", + + allowDomMove : true, + + autoShow : false, + + hideMode: 'display', + + hideParent: false, + + + + hidden : false, + + disabled : false, + + rendered : false, + + ctype : "Ext.Component", + + actionMode : "el", + + getActionEl : function(){ + return this[this.actionMode]; + }, + + + initComponent : Ext.emptyFn, + + + render : function(container, position){ + if(!this.rendered && this.fireEvent("beforerender", this) !== false){ + if(!container && this.el){ + this.el = Ext.get(this.el); + container = this.el.dom.parentNode; + this.allowDomMove = false; + } + this.container = Ext.get(container); + if(this.ctCls){ + this.container.addClass(this.ctCls); + } + this.rendered = true; + if(position !== undefined){ + if(typeof position == 'number'){ + position = this.container.dom.childNodes[position]; + }else{ + position = Ext.getDom(position); + } + } + this.onRender(this.container, position || null); + if(this.autoShow){ + this.el.removeClass(['x-hidden','x-hide-' + this.hideMode]); + } + if(this.cls){ + this.el.addClass(this.cls); + delete this.cls; + } + if(this.style){ + this.el.applyStyles(this.style); + delete this.style; + } + this.fireEvent("render", this); + this.afterRender(this.container); + if(this.hidden){ + this.hide(); + } + if(this.disabled){ + this.disable(); + } + + this.initStateEvents(); + } + return this; + }, + + initState : function(config){ + if(Ext.state.Manager){ + var state = Ext.state.Manager.get(this.stateId || this.id); + if(state){ + if(this.fireEvent('beforestaterestore', this, state) !== false){ + this.applyState(state); + this.fireEvent('staterestore', this, state); + } + } + } + }, + + initStateEvents : function(){ + if(this.stateEvents){ + for(var i = 0, e; e = this.stateEvents[i]; i++){ + this.on(e, this.saveState, this, {delay:100}); + } + } + }, + + applyState : function(state, config){ + if(state){ + Ext.apply(this, state); + } + }, + + getState : function(){ + return null; + }, + + saveState : function(){ + if(Ext.state.Manager){ + var state = this.getState(); + if(this.fireEvent('beforestatesave', this, state) !== false){ + Ext.state.Manager.set(this.stateId || this.id, state); + this.fireEvent('statesave', this, state); + } + } + }, + + + 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); + }else{ + this.cls = this.cls ? this.cls + ' ' + cls : cls; + } + }, + + + removeClass : function(cls){ + if(this.el){ + this.el.removeClass(cls); + }else if(this.cls){ + this.cls = this.cls.split(' ').remove(cls).join(' '); + } + }, + + onRender : function(ct, position){ + if(this.autoEl){ + if(typeof this.autoEl == 'string'){ + this.el = document.createElement(this.autoEl); + }else{ + var div = document.createElement('div'); + Ext.DomHelper.overwrite(div, this.autoEl); + this.el = div.firstChild; + } + } + if(this.el){ + this.el = Ext.get(this.el); + if(this.allowDomMove !== false){ + ct.dom.insertBefore(this.el.dom, position); + } + } + }, + + getAutoCreate : function(){ + var cfg = typeof this.autoCreate == "object" ? + this.autoCreate : Ext.apply({}, this.defaultAutoCreate); + if(this.id && !cfg.id){ + cfg.id = this.id; + } + return cfg; + }, + + afterRender : Ext.emptyFn, + + + destroy : function(){ + if(this.fireEvent("beforedestroy", this) !== false){ + this.beforeDestroy(); + if(this.rendered){ + this.el.removeAllListeners(); + this.el.remove(); + if(this.actionMode == "container"){ + this.container.remove(); + } + } + this.onDestroy(); + Ext.ComponentMgr.unregister(this); + this.fireEvent("destroy", this); + this.purgeListeners(); + } + }, + + beforeDestroy : Ext.emptyFn, + + onDestroy : Ext.emptyFn, + + + getEl : 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.focus.defer(typeof delay == 'number' ? delay : 10, this, [selectText, false]); + return; + } + if(this.rendered){ + this.el.focus(); + if(selectText === true){ + this.el.dom.select(); + } + } + return this; + }, + + blur : function(){ + if(this.rendered){ + this.el.blur(); + } + return this; + }, + + + disable : function(){ + if(this.rendered){ + this.onDisable(); + } + this.disabled = true; + this.fireEvent("disable", this); + return this; + }, + + onDisable : function(){ + this.getActionEl().addClass(this.disabledClass); + this.el.dom.disabled = true; + }, + + + enable : function(){ + if(this.rendered){ + this.onEnable(); + } + this.disabled = false; + this.fireEvent("enable", this); + return this; + }, + + onEnable : function(){ + this.getActionEl().removeClass(this.disabledClass); + this.el.dom.disabled = false; + }, + + + setDisabled : function(disabled){ + this[disabled ? "disable" : "enable"](); + }, + + + show: function(){ + if(this.fireEvent("beforeshow", this) !== false){ + this.hidden = false; + if(this.autoRender){ + this.render(typeof this.autoRender == 'boolean' ? Ext.getBody() : this.autoRender); + } + if(this.rendered){ + this.onShow(); + } + this.fireEvent("show", this); + } + return this; + }, + + onShow : function(){ + if(this.hideParent){ + this.container.removeClass('x-hide-' + this.hideMode); + }else{ + this.getActionEl().removeClass('x-hide-' + this.hideMode); + } + + }, + + + hide: function(){ + if(this.fireEvent("beforehide", this) !== false){ + this.hidden = true; + if(this.rendered){ + this.onHide(); + } + this.fireEvent("hide", this); + } + return this; + }, + + onHide : function(){ + if(this.hideParent){ + this.container.addClass('x-hide-' + this.hideMode); + }else{ + this.getActionEl().addClass('x-hide-' + this.hideMode); + } + }, + + + setVisible: function(visible){ + if(visible) { + this.show(); + }else{ + this.hide(); + } + return this; + }, + + + isVisible : function(){ + return this.rendered && this.getActionEl().isVisible(); + }, + + + cloneConfig : function(overrides){ + overrides = overrides || {}; + var id = overrides.id || Ext.id(); + var cfg = Ext.applyIf(overrides, this.initialConfig); + cfg.id = id; return new this.constructor(cfg); + }, + + + getXType : function(){ + return this.constructor.xtype; + }, + + + isXType : function(xtype, shallow){ + return !shallow ? + ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : + this.constructor.xtype == xtype; + }, + + + getXTypes : function(){ + var tc = this.constructor; + if(!tc.xtypes){ + var c = [], sc = this; + while(sc && sc.constructor.xtype){ + c.unshift(sc.constructor.xtype); + sc = sc.constructor.superclass; + } + tc.xtypeChain = c; + tc.xtypes = c.join('/'); + } + return tc.xtypes; + } +}); + +Ext.reg('component', Ext.Component); + + +Ext.Action = function(config){ + this.initialConfig = config; + this.items = []; +} + +Ext.Action.prototype = { + + + + + + + + + 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++){ + cs[i][fnName].apply(cs[i], args); + } + }, + + + addComponent : function(comp){ + this.items.push(comp); + comp.on('destroy', this.removeComponent, this); + }, + + + removeComponent : function(comp){ + this.items.remove(comp); + } +}; + +(function(){ +Ext.Layer = function(config, existingEl){ + config = config || {}; + var dh = Ext.DomHelper; + var cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body; + if(existingEl){ + this.dom = Ext.getDom(existingEl); + } + if(!this.dom){ + var o = config.dh || {tag: "div", cls: "x-layer"}; + this.dom = dh.append(pel, o); + } + if(config.cls){ + this.addClass(config.cls); + } + this.constrain = config.constrain !== false; + this.visibilityMode = Ext.Element.VISIBILITY; + if(config.id){ + this.id = this.dom.id = config.id; + }else{ + this.id = Ext.id(this.dom); + } + this.zindex = config.zindex || this.getZIndex(); + this.position("absolute", this.zindex); + if(config.shadow){ + this.shadowOffset = config.shadowOffset || 4; + this.shadow = new Ext.Shadow({ + offset : this.shadowOffset, + mode : config.shadow + }); + }else{ + this.shadowOffset = 0; + } + this.useShim = config.shim !== false && Ext.useShims; + this.useDisplay = config.useDisplay; + this.hide(); +}; + +var supr = Ext.Element.prototype; + + +var shims = []; + +Ext.extend(Ext.Layer, Ext.Element, { + + getZIndex : function(){ + return this.zindex || parseInt(this.getStyle("z-index"), 10) || 11000; + }, + + getShim : function(){ + if(!this.useShim){ + return null; + } + if(this.shim){ + return this.shim; + } + var shim = shims.shift(); + if(!shim){ + shim = this.createShim(); + shim.enableDisplayMode('block'); + shim.dom.style.display = 'none'; + shim.dom.style.visibility = 'visible'; + } + var pn = this.dom.parentNode; + if(shim.dom.parentNode != pn){ + pn.insertBefore(shim.dom, this.dom); + } + shim.setStyle('z-index', this.getZIndex()-2); + this.shim = shim; + return shim; + }, + + hideShim : function(){ + if(this.shim){ + this.shim.setDisplayed(false); + shims.push(this.shim); + delete this.shim; + } + }, + + disableShadow : function(){ + if(this.shadow){ + this.shadowDisabled = true; + this.shadow.hide(); + this.lastShadowOffset = this.shadowOffset; + this.shadowOffset = 0; + } + }, + + enableShadow : function(show){ + if(this.shadow){ + this.shadowDisabled = false; + this.shadowOffset = this.lastShadowOffset; + delete this.lastShadowOffset; + if(show){ + this.sync(true); + } + } + }, + + + + + sync : function(doShow){ + var sw = this.shadow; + if(!this.updating && this.isVisible() && (sw || this.useShim)){ + var sh = this.getShim(); + + var w = this.getWidth(), + h = this.getHeight(); + + var l = this.getLeft(true), + t = this.getTop(true); + + if(sw && !this.shadowDisabled){ + if(doShow && !sw.isVisible()){ + sw.show(this); + }else{ + sw.realign(l, t, w, h); + } + if(sh){ + if(doShow){ + sh.show(); + } + + var a = sw.adjusts, s = sh.dom.style; + s.left = (Math.min(l, l+a.l))+"px"; + s.top = (Math.min(t, t+a.t))+"px"; + s.width = (w+a.w)+"px"; + s.height = (h+a.h)+"px"; + } + }else if(sh){ + if(doShow){ + sh.show(); + } + sh.setSize(w, h); + sh.setLeftTop(l, t); + } + + } + }, + + + destroy : function(){ + this.hideShim(); + if(this.shadow){ + this.shadow.hide(); + } + this.removeAllListeners(); + Ext.removeNode(this.dom); + Ext.Element.uncache(this.id); + }, + + remove : function(){ + this.destroy(); + }, + + + beginUpdate : function(){ + this.updating = true; + }, + + + endUpdate : function(){ + this.updating = false; + this.sync(true); + }, + + + hideUnders : function(negOffset){ + if(this.shadow){ + this.shadow.hide(); + } + this.hideShim(); + }, + + + constrainXY : function(){ + if(this.constrain){ + var vw = Ext.lib.Dom.getViewWidth(), + vh = Ext.lib.Dom.getViewHeight(); + var s = Ext.getDoc().getScroll(); + + var xy = this.getXY(); + var x = xy[0], y = xy[1]; + var w = this.dom.offsetWidth+this.shadowOffset, h = this.dom.offsetHeight+this.shadowOffset; + + var moved = false; + + if((x + w) > vw+s.left){ + x = vw - w - this.shadowOffset; + moved = true; + } + if((y + h) > vh+s.top){ + y = vh - h - this.shadowOffset; + moved = true; + } + + if(x < s.left){ + x = s.left; + moved = true; + } + if(y < s.top){ + y = s.top; + moved = true; + } + if(moved){ + if(this.avoidY){ + var ay = this.avoidY; + if(y <= ay && (y+h) >= ay){ + y = ay-h-5; + } + } + xy = [x, y]; + this.storeXY(xy); + supr.setXY.call(this, xy); + this.sync(); + } + } + }, + + isVisible : function(){ + return this.visible; + }, + + + showAction : function(){ + this.visible = true; + if(this.useDisplay === true){ + this.setDisplayed(""); + }else if(this.lastXY){ + supr.setXY.call(this, this.lastXY); + }else if(this.lastLT){ + supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]); + } + }, + + + hideAction : function(){ + this.visible = false; + if(this.useDisplay === true){ + this.setDisplayed(false); + }else{ + this.setLeftTop(-10000,-10000); + } + }, + + + setVisible : function(v, a, d, c, e){ + if(v){ + this.showAction(); + } + if(a && v){ + var cb = function(){ + this.sync(true); + if(c){ + c(); + } + }.createDelegate(this); + supr.setVisible.call(this, true, true, d, cb, e); + }else{ + if(!v){ + this.hideUnders(true); + } + var cb = c; + if(a){ + cb = function(){ + this.hideAction(); + if(c){ + c(); + } + }.createDelegate(this); + } + supr.setVisible.call(this, v, a, d, cb, e); + if(v){ + this.sync(true); + }else if(!a){ + this.hideAction(); + } + } + }, + + storeXY : function(xy){ + delete this.lastLT; + this.lastXY = xy; + }, + + storeLeftTop : function(left, top){ + delete this.lastXY; + 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); + this.sync(); + }, + + setTop : function(top){ + this.storeLeftTop(this.getLeft(true), top); + supr.setTop.apply(this, arguments); + this.sync(); + }, + + setLeftTop : function(left, top){ + this.storeLeftTop(left, top); + supr.setLeftTop.apply(this, arguments); + this.sync(); + }, + + setXY : function(xy, a, d, c, e){ + this.fixDisplay(); + this.beforeAction(); + this.storeXY(xy); + var cb = this.createCB(c); + supr.setXY.call(this, xy, a, d, cb, e); + if(!a){ + cb(); + } + }, + + + createCB : function(c){ + var el = this; + return function(){ + el.constrainXY(); + el.sync(true); + if(c){ + c(); + } + }; + }, + + + setX : function(x, a, d, c, e){ + this.setXY([x, this.getY()], a, d, c, e); + }, + + + setY : function(y, a, d, c, e){ + this.setXY([this.getX(), y], a, d, c, e); + }, + + + setSize : function(w, h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setSize.call(this, w, h, a, d, cb, e); + if(!a){ + cb(); + } + }, + + + setWidth : function(w, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setWidth.call(this, w, a, d, cb, e); + if(!a){ + cb(); + } + }, + + + setHeight : function(h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setHeight.call(this, h, a, d, cb, e); + if(!a){ + cb(); + } + }, + + + setBounds : function(x, y, w, h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + if(!a){ + this.storeXY([x, y]); + supr.setXY.call(this, [x, y]); + supr.setSize.call(this, w, h, a, d, cb, e); + cb(); + }else{ + supr.setBounds.call(this, x, y, w, h, a, d, cb, e); + } + return this; + }, + + + setZIndex : function(zindex){ + this.zindex = zindex; + this.setStyle("z-index", zindex + 2); + if(this.shadow){ + this.shadow.setZIndex(zindex + 1); + } + if(this.shim){ + this.shim.setStyle("z-index", zindex); + } + } +}); +})(); + +Ext.Shadow = function(config){ + Ext.apply(this, config); + if(typeof this.mode != "string"){ + this.mode = this.defaultMode; + } + var o = this.offset, a = {h: 0}; + var rad = Math.floor(this.offset/2); + switch(this.mode.toLowerCase()){ case "drop": + a.w = 0; + a.l = a.t = o; + a.t -= 1; + if(Ext.isIE){ + a.l -= this.offset + rad; + a.t -= this.offset + rad; + a.w -= rad; + a.h -= rad; + a.t += 1; + } + break; + case "sides": + a.w = (o*2); + a.l = -o; + a.t = o-1; + if(Ext.isIE){ + a.l -= (this.offset - rad); + a.t -= this.offset + rad; + a.l += 1; + a.w -= (this.offset - rad)*2; + a.w -= rad + 1; + a.h -= 1; + } + break; + case "frame": + a.w = a.h = (o*2); + a.l = a.t = -o; + a.t += 1; + a.h -= 2; + if(Ext.isIE){ + a.l -= (this.offset - rad); + a.t -= (this.offset - rad); + a.l += 1; + a.w -= (this.offset + rad + 1); + a.h -= (this.offset + rad); + a.h += 1; + } + break; + }; + + this.adjusts = a; +}; + +Ext.Shadow.prototype = { + + + offset: 4, + + defaultMode: "drop", + + + show : function(target){ + target = Ext.get(target); + if(!this.el){ + this.el = Ext.Shadow.Pool.pull(); + if(this.el.dom.nextSibling != target.dom){ + this.el.insertBefore(target); + } + } + this.el.setStyle("z-index", this.zIndex || parseInt(target.getStyle("z-index"), 10)-1); + if(Ext.isIE){ + this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"; + } + this.realign( + target.getLeft(true), + target.getTop(true), + target.getWidth(), + target.getHeight() + ); + this.el.dom.style.display = "block"; + }, + + + isVisible : function(){ + return this.el ? true : false; + }, + + + realign : function(l, t, w, h){ + if(!this.el){ + return; + } + var a = this.adjusts, d = this.el.dom, s = d.style; + var iea = 0; + s.left = (l+a.l)+"px"; + s.top = (t+a.t)+"px"; + var sw = (w+a.w), sh = (h+a.h), sws = sw +"px", shs = sh + "px"; + if(s.width != sws || s.height != shs){ + s.width = sws; + s.height = shs; + if(!Ext.isIE){ + var cn = d.childNodes; + var sww = Math.max(0, (sw-12))+"px"; + cn[0].childNodes[1].style.width = sww; + cn[1].childNodes[1].style.width = sww; + cn[2].childNodes[1].style.width = sww; + cn[1].style.height = Math.max(0, (sh-12))+"px"; + } + } + }, + + + hide : function(){ + if(this.el){ + this.el.dom.style.display = "none"; + Ext.Shadow.Pool.push(this.el); + delete this.el; + } + }, + + + setZIndex : function(z){ + this.zIndex = z; + if(this.el){ + this.el.setStyle("z-index", z); + } + } +}; + +Ext.Shadow.Pool = function(){ + var p = []; + var markup = Ext.isIE ? + '
' : + '
'; + return { + pull : function(){ + var sh = p.shift(); + if(!sh){ + sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup)); + sh.autoBoxAdjust = false; + } + return sh; + }, + + push : function(sh){ + p.push(sh); + } + }; +}(); + +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; + } + if(!this.boxReady){ + this.width = w; + this.height = h; + return this; + } + + if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){ + return this; + } + this.lastSize = {width: w, height: h}; + var adj = this.adjustSize(w, h); + var aw = adj.width, ah = adj.height; + if(aw !== undefined || ah !== undefined){ var rz = this.getResizeEl(); + if(!this.deferHeight && aw !== undefined && ah !== undefined){ + rz.setSize(aw, ah); + }else if(!this.deferHeight && ah !== undefined){ + rz.setHeight(ah); + }else if(aw !== undefined){ + rz.setWidth(aw); + } + this.onResize(aw, ah, w, h); + this.fireEvent('resize', this, aw, ah, w, h); + } + return this; + }, + + + setWidth : function(width){ + return this.setSize(width); + }, + + + setHeight : function(height){ + return this.setSize(undefined, height); + }, + + + getSize : function(){ + return this.el.getSize(); + }, + + + getPosition : function(local){ + if(local === true){ + return [this.el.getLeft(true), this.el.getTop(true)]; + } + return this.xy || this.el.getXY(); + }, + + + getBox : function(local){ + var s = this.el.getSize(); + if(local === true){ + s.x = this.el.getLeft(true); + s.y = this.el.getTop(true); + }else{ + var xy = this.xy || this.el.getXY(); + s.x = xy[0]; + s.y = xy[1]; + } + 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; + }, + + getPositionEl : function(){ + return this.positionEl || this.el; + }, + + + setPosition : function(x, y){ + if(x && typeof x[1] == 'number'){ + y = x[1]; + x = x[0]; + } + this.x = x; + this.y = y; + if(!this.boxReady){ + return this; + } + var adj = this.adjustPosition(x, y); + var ax = adj.x, ay = adj.y; + + var el = this.getPositionEl(); + if(ax !== undefined || ay !== undefined){ + if(ax !== undefined && ay !== undefined){ + el.setLeftTop(ax, ay); + }else if(ax !== undefined){ + el.setLeft(ax); + }else if(ay !== undefined){ + el.setTop(ay); + } + this.onPosition(ax, ay); + this.fireEvent('move', this, ax, ay); + } + return this; + }, + + + setPagePosition : function(x, y){ + if(x && typeof x[1] == 'number'){ + y = x[1]; + x = x[0]; + } + this.pageX = x; + this.pageY = y; + if(!this.boxReady){ + return; + } + if(x === undefined || y === undefined){ return; + } + var p = this.el.translatePoints(x, y); + this.setPosition(p.left, p.top); + return this; + }, + + onRender : function(ct, position){ + Ext.BoxComponent.superclass.onRender.call(this, ct, position); + if(this.resizeEl){ + this.resizeEl = Ext.get(this.resizeEl); + } + if(this.positionEl){ + this.positionEl = Ext.get(this.positionEl); + } + }, + + afterRender : function(){ + Ext.BoxComponent.superclass.afterRender.call(this); + this.boxReady = true; + this.setSize(this.width, this.height); + if(this.x || this.y){ + this.setPosition(this.x, this.y); + }else if(this.pageX || this.pageY){ + this.setPagePosition(this.pageX, this.pageY); + } + }, + + + syncSize : function(){ + delete this.lastSize; + this.setSize(this.autoWidth ? undefined : this.el.getWidth(), this.autoHeight ? undefined : this.el.getHeight()); + return this; + }, + + + onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ + + }, + + + onPosition : function(x, y){ + + }, + + adjustSize : function(w, h){ + if(this.autoWidth){ + w = 'auto'; + } + if(this.autoHeight){ + h = 'auto'; + } + return {width : w, height: h}; + }, + + adjustPosition : function(x, y){ + return {x : x, y: y}; + } +}); +Ext.reg('box', Ext.BoxComponent); + +Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){ + + + this.el = Ext.get(dragElement, true); + this.el.dom.unselectable = "on"; + + 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" + ); + + Ext.SplitBar.superclass.constructor.call(this); +}; + +Ext.extend(Ext.SplitBar, Ext.util.Observable, { + onStartProxyDrag : function(x, y){ + this.fireEvent("beforeresize", this); + this.overlay = Ext.DomHelper.append(document.body, {cls: "x-drag-overlay", html: " "}, true); + this.overlay.unselectable(); + this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.overlay.show(); + Ext.get(this.proxy).setDisplayed("block"); + var size = this.adapter.getElementSize(this); + this.activeMinSize = this.getMinimumSize();; + this.activeMaxSize = this.getMaximumSize();; + var c1 = size - this.activeMinSize; + var c2 = Math.max(this.activeMaxSize - size, 0); + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + this.dd.resetConstraints(); + this.dd.setXConstraint( + this.placement == Ext.SplitBar.LEFT ? c1 : c2, + this.placement == Ext.SplitBar.LEFT ? c2 : c1 + ); + this.dd.setYConstraint(0, 0); + }else{ + this.dd.resetConstraints(); + this.dd.setXConstraint(0, 0); + this.dd.setYConstraint( + this.placement == Ext.SplitBar.TOP ? c1 : c2, + this.placement == Ext.SplitBar.TOP ? c2 : c1 + ); + } + this.dragSpecs.startSize = size; + this.dragSpecs.startPoint = [x, y]; + 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); + if(this.overlay){ + this.overlay.remove(); + delete this.overlay; + } + var newSize; + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + newSize = this.dragSpecs.startSize + + (this.placement == Ext.SplitBar.LEFT ? + endPoint[0] - this.dragSpecs.startPoint[0] : + this.dragSpecs.startPoint[0] - endPoint[0] + ); + }else{ + newSize = this.dragSpecs.startSize + + (this.placement == Ext.SplitBar.TOP ? + endPoint[1] - this.dragSpecs.startPoint[1] : + this.dragSpecs.startPoint[1] - endPoint[1] + ); + } + newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize); + if(newSize != this.dragSpecs.startSize){ + if(this.fireEvent('beforeapply', this, newSize) !== false){ + this.adapter.setElementSize(this, newSize); + this.fireEvent("moved", this, newSize); + this.fireEvent("resize", this, newSize); + } + } + }, + + + 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; + this.adapter.setElementSize(this, size); + this.animate = oldAnimate; + }, + + + destroy : function(removeEl){ + if(this.shim){ + this.shim.remove(); + } + this.dd.unreg(); + Ext.removeNode(this.proxy); + if(removeEl){ + this.el.remove(); + } + } +}); + + +Ext.SplitBar.createProxy = function(dir){ + var proxy = new Ext.Element(document.createElement("div")); + proxy.unselectable(); + var cls = 'x-splitbar-proxy'; + proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v')); + document.body.appendChild(proxy.dom); + return proxy.dom; +}; + + +Ext.SplitBar.BasicLayoutAdapter = function(){ +}; + +Ext.SplitBar.BasicLayoutAdapter.prototype = { + + init : function(s){ + + }, + + getElementSize : function(s){ + if(s.orientation == Ext.SplitBar.HORIZONTAL){ + return s.resizingEl.getWidth(); + }else{ + return s.resizingEl.getHeight(); + } + }, + + + setElementSize : function(s, newSize, onComplete){ + if(s.orientation == Ext.SplitBar.HORIZONTAL){ + if(!s.animate){ + s.resizingEl.setWidth(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut'); + } + }else{ + + if(!s.animate){ + s.resizingEl.setHeight(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut'); + } + } + } +}; + + +Ext.SplitBar.AbsoluteLayoutAdapter = function(container){ + this.basic = new Ext.SplitBar.BasicLayoutAdapter(); + this.container = Ext.get(container); +}; + +Ext.SplitBar.AbsoluteLayoutAdapter.prototype = { + init : function(s){ + this.basic.init(s); + }, + + getElementSize : function(s){ + return this.basic.getElementSize(s); + }, + + setElementSize : function(s, newSize, onComplete){ + this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s])); + }, + + moveSplitter : function(s){ + var yes = Ext.SplitBar; + switch(s.placement){ + case yes.LEFT: + s.el.setX(s.resizingEl.getRight()); + break; + case yes.RIGHT: + s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px"); + break; + case yes.TOP: + s.el.setY(s.resizingEl.getBottom()); + break; + case yes.BOTTOM: + s.el.setY(s.resizingEl.getTop() - s.el.getHeight()); + break; + } + } +}; + + +Ext.SplitBar.VERTICAL = 1; + + +Ext.SplitBar.HORIZONTAL = 2; + + +Ext.SplitBar.LEFT = 1; + + +Ext.SplitBar.RIGHT = 2; + + +Ext.SplitBar.TOP = 3; + + +Ext.SplitBar.BOTTOM = 4; + + +Ext.Container = Ext.extend(Ext.BoxComponent, { + + + + + + + + + + autoDestroy: true, + + + defaultType: 'panel', + + initComponent : function(){ + Ext.Container.superclass.initComponent.call(this); + + this.addEvents( + + 'afterlayout', + + 'beforeadd', + + 'beforeremove', + + 'add', + + 'remove' + ); + + + var items = this.items; + if(items){ + delete this.items; + if(items instanceof Array){ + this.add.apply(this, items); + }else{ + this.add(items); + } + } + }, + + initItems : function(){ + if(!this.items){ + this.items = new Ext.util.MixedCollection(false, this.getComponentId); + this.getLayout(); } + }, + + setLayout : function(layout){ + if(this.layout && this.layout != layout){ + this.layout.setContainer(null); + } + this.initItems(); + this.layout = layout; + layout.setContainer(this); + }, + + render : function(){ + Ext.Container.superclass.render.apply(this, arguments); + if(this.layout){ + if(typeof this.layout == 'string'){ + this.layout = new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig); + } + this.setLayout(this.layout); + + if(this.activeItem !== undefined){ + var item = this.activeItem; + delete this.activeItem; + this.layout.setActiveItem(item); + return; + } + } + if(!this.ownerCt){ + this.doLayout(); + } + if(this.monitorResize === true){ + Ext.EventManager.onWindowResize(this.doLayout, this); + } + }, + + getLayoutTarget : function(){ + return this.el; + }, + + getComponentId : function(comp){ + return comp.itemId || comp.id; + }, + + + add : function(comp){ + if(!this.items){ + this.initItems(); + } + var a = arguments, len = a.length; + if(len > 1){ + for(var i = 0; i < len; i++) { + this.add(a[i]); + } + return; + } + var c = this.lookupComponent(this.applyDefaults(comp)); + var pos = this.items.length; + if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){ + this.items.add(c); + c.ownerCt = this; + this.fireEvent('add', this, c, pos); + } + return c; + }, + + + insert : function(index, comp){ + if(!this.items){ + this.initItems(); + } + var a = arguments, len = a.length; + if(len > 2){ + for(var i = len-1; i >= 1; --i) { + this.insert(index, a[i]); + } + return; + } + var c = this.lookupComponent(this.applyDefaults(comp)); + + if(c.ownerCt == this && this.items.indexOf(c) < index){ + --index; + } + + if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){ + this.items.insert(index, c); + c.ownerCt = this; + this.fireEvent('add', this, c, index); + } + return c; + }, + + applyDefaults : function(c){ + if(this.defaults){ + if(typeof c == 'string'){ + c = Ext.ComponentMgr.get(c); + Ext.apply(c, this.defaults); + }else if(!c.events){ + Ext.applyIf(c, this.defaults); + }else{ + Ext.apply(c, this.defaults); + } + } + return c; + }, + + onBeforeAdd : function(item){ + if(item.ownerCt){ + item.ownerCt.remove(item, false); + } + if(this.hideBorders === true){ + item.border = (item.border === true); + } + }, + + + remove : function(comp, autoDestroy){ + var c = this.getComponent(comp); + if(c && this.fireEvent('beforeremove', this, c) !== false){ + this.items.remove(c); + delete c.ownerCt; + if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){ + c.destroy(); + } + if(this.layout && this.layout.activeItem == c){ + delete this.layout.activeItem; + } + this.fireEvent('remove', this, c); + } + return c; + }, + + + getComponent : function(comp){ + if(typeof comp == 'object'){ + return comp; + } + return this.items.get(comp); + }, + + lookupComponent : function(comp){ + if(typeof comp == 'string'){ + return Ext.ComponentMgr.get(comp); + }else if(!comp.events){ + return this.createComponent(comp); + } + return comp; + }, + + createComponent : function(config){ + return Ext.ComponentMgr.create(config, this.defaultType); + }, + + + doLayout : function(){ + if(this.rendered && this.layout){ + this.layout.layout(); + } + if(this.items){ + var cs = this.items.items; + for(var i = 0, len = cs.length; i < len; i++) { + var c = cs[i]; + if(c.doLayout){ + c.doLayout(); + } + } + } + }, + + + getLayout : function(){ + if(!this.layout){ + var layout = new Ext.layout.ContainerLayout(this.layoutConfig); + this.setLayout(layout); + } + return this.layout; + }, + + onDestroy : function(){ + if(this.items){ + var cs = this.items.items; + for(var i = 0, len = cs.length; i < len; i++) { + Ext.destroy(cs[i]); + } + } + if(this.monitorResize){ + Ext.EventManager.removeResizeListener(this.doLayout, this); + } + Ext.Container.superclass.onDestroy.call(this); + }, + + + bubble : function(fn, scope, args){ + var p = this; + while(p){ + if(fn.apply(scope || p, args || [p]) === false){ + break; + } + p = p.ownerCt; + } + }, + + + cascade : function(fn, scope, args){ + if(fn.apply(scope || this, args || [this]) !== false){ + if(this.items){ + var cs = this.items.items; + for(var i = 0, len = cs.length; i < len; i++){ + if(cs[i].cascade){ + cs[i].cascade(fn, scope, args); + }else{ + fn.apply(scope || this, args || [cs[i]]); + } + } + } + } + }, + + + findById : function(id){ + var m, ct = this; + this.cascade(function(c){ + if(ct != c && c.id === id){ + m = c; + return false; + } + }); + return m || null; + }, + + + findByType : function(xtype){ + return typeof xtype == 'function' ? + this.findBy(function(c){ + return c.constructor === xtype; + }) : + this.findBy(function(c){ + return c.constructor.xtype === xtype; + }); + }, + + + 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){ + if(ct != c && fn.call(scope || c, c, ct) === true){ + m.push(c); + } + }); + return m; + } +}); + +Ext.Container.LAYOUTS = {}; +Ext.reg('container', Ext.Container); + +Ext.layout.ContainerLayout = function(config){ + Ext.apply(this, config); +}; + +Ext.layout.ContainerLayout.prototype = { + + + + + + monitorResize:false, + activeItem : null, + + layout : function(){ + var target = this.container.getLayoutTarget(); + this.onLayout(this.container, target); + this.container.fireEvent('afterlayout', this.container, this); + }, + + onLayout : function(ct, target){ + this.renderAll(ct, target); + }, + + isValidParent : function(c, target){ + var el = c.getPositionEl ? c.getPositionEl() : c.getEl(); + return el.dom.parentNode == target.dom; + }, + + renderAll : function(ct, target){ + var items = ct.items.items; + for(var i = 0, len = items.length; i < len; i++) { + var c = items[i]; + if(c && (!c.rendered || !this.isValidParent(c, target))){ + this.renderItem(c, i, target); + } + } + }, + + renderItem : function(c, position, target){ + if(c && !c.rendered){ + if(this.extraCls){ + c.addClass(this.extraCls); + } + c.render(target, position); + if (this.renderHidden && c != this.activeItem) { + c.hide(); + } + }else if(c && !this.isValidParent(c, target)){ + if(this.extraCls){ + c.addClass(this.extraCls); + } + if(typeof position == 'number'){ + position = target.dom.childNodes[position]; + } + target.dom.insertBefore(c.getEl().dom, position || null); + if (this.renderHidden && c != this.activeItem) { + c.hide(); + } + } + }, + + onResize: function(){ + if(this.container.collapsed){ + return; + } + var b = this.container.bufferResize; + if(b){ + if(!this.resizeTask){ + this.resizeTask = new Ext.util.DelayedTask(this.layout, this); + this.resizeBuffer = typeof b == 'number' ? b : 100; + } + this.resizeTask.delay(this.resizeBuffer); + }else{ + this.layout(); + } + }, + + setContainer : function(ct){ + if(this.monitorResize && ct != this.container){ + if(this.container){ + this.container.un('resize', this.onResize, this); + } + if(ct){ + ct.on('resize', this.onResize, this); + } + } + this.container = ct; + }, + + parseMargins : function(v){ + var ms = v.split(' '); + var len = ms.length; + if(len == 1){ + ms[1] = ms[0]; + ms[2] = ms[0]; + ms[3] = ms[0]; + } + if(len == 2){ + ms[2] = ms[0]; + ms[3] = ms[1]; + } + return { + top:parseInt(ms[0], 10) || 0, + right:parseInt(ms[1], 10) || 0, + bottom:parseInt(ms[2], 10) || 0, + left:parseInt(ms[3], 10) || 0 + }; + } +}; +Ext.Container.LAYOUTS['auto'] = Ext.layout.ContainerLayout; + +Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, { + + monitorResize:true, + + + onLayout : function(ct, target){ + Ext.layout.FitLayout.superclass.onLayout.call(this, ct, target); + if(!this.container.collapsed){ + this.setItemSize(this.activeItem || ct.items.itemAt(0), target.getStyleSize()); + } + }, + + + setItemSize : function(item, size){ + 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, + + + renderHidden : true, + + + setActiveItem : function(item){ + item = this.container.getComponent(item); + if(this.activeItem != item){ + if(this.activeItem){ + this.activeItem.hide(); + } + this.activeItem = item; + item.show(); + this.layout(); + } + }, + + + renderAll : function(ct, target){ + if(this.deferredRender){ + this.renderItem(this.activeItem, undefined, target); + }else{ + Ext.layout.CardLayout.superclass.renderAll.call(this, ct, target); + } + } +}); +Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout; + +Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, { + + monitorResize:true, + + + getAnchorViewSize : function(ct, target){ + return target.dom == document.body ? + target.getViewSize() : target.getStyleSize(); + }, + + + onLayout : function(ct, target){ + Ext.layout.AnchorLayout.superclass.onLayout.call(this, ct, target); + + var size = this.getAnchorViewSize(ct, target); + + var w = size.width, h = size.height; + + if(w < 20 || h < 20){ + return; + } + + + var aw, ah; + if(ct.anchorSize){ + if(typeof ct.anchorSize == 'number'){ + aw = ct.anchorSize; + }else{ + aw = ct.anchorSize.width; + ah = ct.anchorSize.height; + } + }else{ + aw = ct.initialConfig.width; + ah = ct.initialConfig.height; + } + + var cs = ct.items.items, len = cs.length, i, c, a, cw, ch; + for(i = 0; i < len; i++){ + c = cs[i]; + if(c.anchor){ + a = c.anchorSpec; + if(!a){ + var vs = c.anchor.split(' '); + c.anchorSpec = a = { + right: this.parseAnchor(vs[0], c.initialConfig.width, aw), + bottom: this.parseAnchor(vs[1], c.initialConfig.height, ah) + }; + } + cw = a.right ? this.adjustWidthAnchor(a.right(w), c) : undefined; + ch = a.bottom ? this.adjustHeightAnchor(a.bottom(h), c) : undefined; + + if(cw || ch){ + c.setSize(cw || undefined, ch || undefined); + } + } + } + }, + + + parseAnchor : function(a, start, cstart){ + if(a && a != 'none'){ + var last; + if(/^(r|right|b|bottom)$/i.test(a)){ + var diff = cstart - start; + return function(v){ + if(v !== last){ + last = v; + return v - diff; + } + } + }else if(a.indexOf('%') != -1){ + var ratio = parseFloat(a.replace('%', ''))*.01; + return function(v){ + if(v !== last){ + last = v; + return Math.floor(v*ratio); + } + } + }else{ + a = parseInt(a, 10); + if(!isNaN(a)){ + return function(v){ + if(v !== last){ + last = v; + return v + a; + } + } + } + } + } + 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, + + extraCls: 'x-column', + + scrollOffset : 0, + + + isValidParent : function(c, target){ + return c.getEl().dom.parentNode == this.innerCt.dom; + }, + + + onLayout : function(ct, target){ + var cs = ct.items.items, len = cs.length, c, i; + + if(!this.innerCt){ + target.addClass('x-column-layout-ct'); + + + + this.innerCt = target.createChild({cls:'x-column-inner'}); + + this.renderAll(ct, this.innerCt); + + this.innerCt.createChild({cls:'x-clear'}); + + } + + var size = target.getViewSize(); + + if(size.width < 1 && size.height < 1){ + return; + } + + var w = size.width - target.getPadding('lr') - this.scrollOffset, + h = size.height - target.getPadding('tb'), + pw = w; + + this.innerCt.setWidth(w); + + + + + for(i = 0; i < len; i++){ + c = cs[i]; + if(!c.columnWidth){ + pw -= (c.getSize().width + c.getEl().getMargins('lr')); + } + } + + pw = pw < 0 ? 0 : pw; + + for(i = 0; i < len; i++){ + c = cs[i]; + if(c.columnWidth){ + c.setSize(Math.floor(c.columnWidth*pw) - c.getEl().getMargins('lr')); + } + } + } + + +}); + +Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout; + +Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, { + monitorResize:true, + rendered : false, + + onLayout : function(ct, target){ + var collapsed; + if(!this.rendered){ + target.position(); + target.addClass('x-border-layout-ct'); + var items = ct.items.items; + collapsed = []; + for(var i = 0, len = items.length; i < len; i++) { + var c = items[i]; + var pos = c.region; + if(c.collapsed){ + collapsed.push(c); + } + c.collapsed = false; + if(!c.rendered){ + c.cls = c.cls ? c.cls +' x-border-panel' : 'x-border-panel'; + c.render(target, i); + } + this[pos] = pos != 'center' && c.split ? + new Ext.layout.BorderLayout.SplitRegion(this, c.initialConfig, pos) : + new Ext.layout.BorderLayout.Region(this, c.initialConfig, pos); + this[pos].render(target, c); + } + this.rendered = true; + } + + var size = target.getViewSize(); + if(size.width < 20 || size.height < 20){ if(collapsed){ + this.restoreCollapsed = collapsed; + } + return; + }else if(this.restoreCollapsed){ + collapsed = this.restoreCollapsed; + delete this.restoreCollapsed; + } + + var w = size.width, h = size.height; + var centerW = w, centerH = h, centerY = 0, centerX = 0; + + var n = this.north, s = this.south, west = this.west, e = this.east, c = this.center; + if(!c){ + throw 'No center region defined in BorderLayout ' + ct.id; + } + + if(n && n.isVisible()){ + var b = n.getSize(); + var m = n.getMargins(); + b.width = w - (m.left+m.right); + b.x = m.left; + b.y = m.top; + centerY = b.height + b.y + m.bottom; + centerH -= centerY; + n.applyLayout(b); + } + if(s && s.isVisible()){ + var b = s.getSize(); + var m = s.getMargins(); + b.width = w - (m.left+m.right); + b.x = m.left; + var totalHeight = (b.height + m.top + m.bottom); + b.y = h - totalHeight + m.top; + centerH -= totalHeight; + s.applyLayout(b); + } + if(west && west.isVisible()){ + var b = west.getSize(); + var m = west.getMargins(); + b.height = centerH - (m.top+m.bottom); + b.x = m.left; + b.y = centerY + m.top; + var totalWidth = (b.width + m.left + m.right); + centerX += totalWidth; + centerW -= totalWidth; + west.applyLayout(b); + } + if(e && e.isVisible()){ + var b = e.getSize(); + var m = e.getMargins(); + b.height = centerH - (m.top+m.bottom); + var totalWidth = (b.width + m.left + m.right); + b.x = w - totalWidth + m.left; + b.y = centerY + m.top; + centerW -= totalWidth; + e.applyLayout(b); + } + + var m = c.getMargins(); + var centerBox = { + x: centerX + m.left, + y: centerY + m.top, + width: centerW - (m.left+m.right), + height: centerH - (m.top+m.bottom) + }; + c.applyLayout(centerBox); + + if(collapsed){ + for(var i = 0, len = collapsed.length; i < len; i++){ + collapsed[i].collapse(false); + } + } + + if(Ext.isIE && Ext.isStrict){ target.repaint(); + } + } + + +}); + + +Ext.layout.BorderLayout.Region = function(layout, config, pos){ + Ext.apply(this, config); + this.layout = layout; + this.position = pos; + this.state = {}; + if(typeof this.margins == 'string'){ + this.margins = this.layout.parseMargins(this.margins); + } + this.margins = Ext.applyIf(this.margins || {}, this.defaultMargins); + if(this.collapsible){ + if(typeof this.cmargins == 'string'){ + this.cmargins = this.layout.parseMargins(this.cmargins); + } + if(this.collapseMode == 'mini' && !this.cmargins){ + this.cmargins = {left:0,top:0,right:0,bottom:0}; + }else{ + this.cmargins = Ext.applyIf(this.cmargins || {}, + pos == 'north' || pos == 'south' ? this.defaultNSCMargins : this.defaultEWCMargins); + } + } +}; + +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}, + + + isCollapsed : false, + + + + + + render : function(ct, p){ + this.panel = p; + p.el.enableDisplayMode(); + this.targetEl = ct; + this.el = p.el; + + var gs = p.getState, ps = this.position; + p.getState = function(){ + return Ext.apply(gs.call(p) || {}, this.state); + }.createDelegate(this); + + if(ps != 'center'){ + p.allowQueuedExpand = false; + p.on({ + beforecollapse: this.beforeCollapse, + collapse: this.onCollapse, + beforeexpand: this.beforeExpand, + expand: this.onExpand, + hide: this.onHide, + show: this.onShow, + scope: this + }); + if(this.collapsible){ + p.collapseEl = 'el'; + p.slideAnchor = this.getSlideAnchor(); + } + if(p.tools && p.tools.toggle){ + p.tools.toggle.addClass('x-tool-collapse-'+ps); + p.tools.toggle.addClassOnOver('x-tool-collapse-'+ps+'-over'); + } + } + }, + + getCollapsedEl : function(){ + if(!this.collapsedEl){ + if(!this.toolTemplate){ + var tt = new Ext.Template( + '
 
' + ); + tt.disableFormats = true; + tt.compile(); + Ext.layout.BorderLayout.Region.prototype.toolTemplate = tt; + } + this.collapsedEl = this.targetEl.createChild({ + cls: "x-layout-collapsed x-layout-collapsed-"+this.position + }); + this.collapsedEl.enableDisplayMode('block'); + + if(this.collapseMode == 'mini'){ + this.collapsedEl.addClass('x-layout-cmini-'+this.position); + this.miniCollapsedEl = this.collapsedEl.createChild({ + cls: "x-layout-mini x-layout-mini-"+this.position, html: " " + }); + this.miniCollapsedEl.addClassOnOver('x-layout-mini-over'); + this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); + this.collapsedEl.on('click', this.onExpandClick, this, {stopEvent:true}); + }else { + var t = this.toolTemplate.append( + this.collapsedEl.dom, + {id:'expand-'+this.position}, true); + t.addClassOnOver('x-tool-expand-'+this.position+'-over'); + t.on('click', this.onExpandClick, this, {stopEvent:true}); + + if(this.floatable !== false){ + this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); + this.collapsedEl.on("click", this.collapseClick, this); + } + } + } + return this.collapsedEl; + }, + + onExpandClick : function(e){ + if(this.isSlid){ + this.afterSlideIn(); + this.panel.expand(false); + }else{ + this.panel.expand(); + } + }, + + onCollapseClick : function(e){ + this.panel.collapse(); + }, + + beforeCollapse : function(p, animate){ + this.lastAnim = animate; + if(this.splitEl){ + this.splitEl.hide(); + } + this.getCollapsedEl().show(); + this.panel.el.setStyle('z-index', 100); + this.isCollapsed = true; + this.layout.layout(); + }, + + onCollapse : function(animate){ + this.panel.el.setStyle('z-index', 1); + if(this.lastAnim === false || this.panel.animCollapse === false){ + this.getCollapsedEl().dom.style.visibility = 'visible'; + }else{ + this.getCollapsedEl().slideIn(this.panel.slideAnchor, {duration:.2}); + } + this.state.collapsed = true; + this.panel.saveState(); + }, + + beforeExpand : function(animate){ + var c = this.getCollapsedEl(); + this.el.show(); + if(this.position == 'east' || this.position == 'west'){ + this.panel.setSize(undefined, c.getHeight()); + }else{ + this.panel.setSize(c.getWidth(), undefined); + } + c.hide(); + c.dom.style.visibility = 'hidden'; + this.panel.el.setStyle('z-index', 100); + }, + + onExpand : function(){ + this.isCollapsed = false; + if(this.splitEl){ + this.splitEl.show(); + } + this.layout.layout(); + this.panel.el.setStyle('z-index', 1); + this.state.collapsed = false; + this.panel.saveState(); + }, + + collapseClick : function(e){ + if(this.isSlid){ + e.stopPropagation(); + this.slideIn(); + }else{ + e.stopPropagation(); + this.slideOut(); + } + }, + + onHide : function(){ + if(this.isCollapsed){ + this.getCollapsedEl().hide(); + }else if(this.splitEl){ + this.splitEl.hide(); + } + }, + + onShow : function(){ + if(this.isCollapsed){ + this.getCollapsedEl().show(); + }else if(this.splitEl){ + this.splitEl.show(); + } + }, + + + isVisible : function(){ + return !this.panel.hidden; + }, + + + getMargins : function(){ + return this.isCollapsed && this.cmargins ? this.cmargins : this.margins; + }, + + + getSize : function(){ + return this.isCollapsed ? this.getCollapsedEl().getSize() : this.panel.getSize(); + }, + + + setPanel : function(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); + }else{ + this.panel.setPosition(box.x, box.y); + this.panel.setSize(box.width, box.height); + } + }, + + beforeSlide: function(){ + this.panel.beforeEffect(); + }, + + afterSlide : function(){ + this.panel.afterEffect(); + }, + + initAutoHide : function(){ + if(this.autoHide !== false){ + if(!this.autoHideHd){ + var st = new Ext.util.DelayedTask(this.slideIn, this); + this.autoHideHd = { + "mouseout": function(e){ + if(!e.within(this.el, true)){ + st.delay(500); + } + }, + "mouseover" : function(e){ + st.cancel(); + }, + scope : this + }; + } + this.el.on(this.autoHideHd); + } + }, + + clearAutoHide : function(){ + if(this.autoHide !== false){ + this.el.un("mouseout", this.autoHideHd.mouseout); + this.el.un("mouseover", this.autoHideHd.mouseover); + } + }, + + clearMonitor : function(){ + Ext.getDoc().un("click", this.slideInIf, this); + }, + + slideOut : function(){ + if(this.isSlid || this.el.hasActiveFx()){ + return; + } + this.isSlid = true; + var ts = this.panel.tools; + if(ts && ts.toggle){ + ts.toggle.hide(); + } + this.el.show(); + if(this.position == 'east' || this.position == 'west'){ + this.panel.setSize(undefined, this.collapsedEl.getHeight()); + }else{ + this.panel.setSize(this.collapsedEl.getWidth(), undefined); + } + this.restoreLT = [this.el.dom.style.left, this.el.dom.style.top]; + this.el.alignTo(this.collapsedEl, this.getCollapseAnchor()); + this.el.setStyle("z-index", 102); + if(this.animFloat !== false){ + this.beforeSlide(); + this.el.slideIn(this.getSlideAnchor(), { + callback: function(){ + this.afterSlide(); + this.initAutoHide(); + Ext.getDoc().on("click", this.slideInIf, this); + }, + scope: this, + block: true + }); + }else{ + this.initAutoHide(); + Ext.getDoc().on("click", this.slideInIf, this); + } + }, + + afterSlideIn : function(){ + this.clearAutoHide(); + this.isSlid = false; + this.clearMonitor(); + this.el.setStyle("z-index", ""); + this.el.dom.style.left = this.restoreLT[0]; + this.el.dom.style.top = this.restoreLT[1]; + + var ts = this.panel.tools; + if(ts && ts.toggle){ + ts.toggle.show(); + } + }, + + slideIn : function(cb){ + if(!this.isSlid || this.el.hasActiveFx()){ + Ext.callback(cb); + return; + } + this.isSlid = false; + if(this.animFloat !== false){ + this.beforeSlide(); + this.el.slideOut(this.getSlideAnchor(), { + callback: function(){ + this.el.hide(); + this.afterSlide(); + this.afterSlideIn(); + Ext.callback(cb); + }, + scope: this, + block: true + }); + }else{ + this.el.hide(); + this.afterSlideIn(); + } + }, + + slideInIf : function(e){ + if(!e.within(this.el)){ + this.slideIn(); + } + }, + + anchors : { + "west" : "left", + "east" : "right", + "north" : "top", + "south" : "bottom" + }, + + sanchors : { + "west" : "l", + "east" : "r", + "north" : "t", + "south" : "b" + }, + + canchors : { + "west" : "tl-tr", + "east" : "tr-tl", + "north" : "tl-bl", + "south" : "bl-tl" + }, + + getAnchor : function(){ + return this.anchors[this.position]; + }, + + getCollapseAnchor : function(){ + return this.canchors[this.position]; + }, + + getSlideAnchor : function(){ + return this.sanchors[this.position]; + }, + + getAlignAdj : function(){ + var cm = this.cmargins; + switch(this.position){ + case "west": + return [0, 0]; + break; + case "east": + return [0, 0]; + break; + case "north": + return [0, 0]; + break; + case "south": + return [0, 0]; + break; + } + }, + + getExpandAdj : function(){ + var c = this.collapsedEl, cm = this.cmargins; + switch(this.position){ + case "west": + return [-(cm.right+c.getWidth()+cm.left), 0]; + break; + case "east": + return [cm.right+c.getWidth()+cm.left, 0]; + break; + case "north": + return [0, -(cm.top+cm.bottom+c.getHeight())]; + break; + case "south": + return [0, cm.top+cm.bottom+c.getHeight()]; + break; + } + } +}; + + +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, + placement: Ext.SplitBar.TOP, + maxFn : 'getVMaxSize', + minProp: 'minHeight', + maxProp: 'maxHeight' + }, + south : { + orientation: Ext.SplitBar.VERTICAL, + placement: Ext.SplitBar.BOTTOM, + maxFn : 'getVMaxSize', + minProp: 'minHeight', + maxProp: 'maxHeight' + }, + east : { + orientation: Ext.SplitBar.HORIZONTAL, + placement: Ext.SplitBar.RIGHT, + maxFn : 'getHMaxSize', + minProp: 'minWidth', + maxProp: 'maxWidth' + }, + west : { + orientation: Ext.SplitBar.HORIZONTAL, + placement: Ext.SplitBar.LEFT, + maxFn : 'getHMaxSize', + minProp: 'minWidth', + maxProp: 'maxWidth' + } + }, + + applyFns : { + west : function(box){ + if(this.isCollapsed){ + return this.applyLayoutCollapsed(box); + } + var sd = this.splitEl.dom, s = sd.style; + this.panel.setPosition(box.x, box.y); + var sw = sd.offsetWidth; + s.left = (box.x+box.width-sw)+'px'; + s.top = (box.y)+'px'; + s.height = Math.max(0, box.height)+'px'; + this.panel.setSize(box.width-sw, box.height); + }, + east : function(box){ + if(this.isCollapsed){ + return this.applyLayoutCollapsed(box); + } + var sd = this.splitEl.dom, s = sd.style; + var sw = sd.offsetWidth; + this.panel.setPosition(box.x+sw, box.y); + s.left = (box.x)+'px'; + s.top = (box.y)+'px'; + s.height = Math.max(0, box.height)+'px'; + this.panel.setSize(box.width-sw, box.height); + }, + north : function(box){ + if(this.isCollapsed){ + return this.applyLayoutCollapsed(box); + } + var sd = this.splitEl.dom, s = sd.style; + var sh = sd.offsetHeight; + this.panel.setPosition(box.x, box.y); + s.left = (box.x)+'px'; + s.top = (box.y+box.height-sh)+'px'; + s.width = Math.max(0, box.width)+'px'; + this.panel.setSize(box.width, box.height-sh); + }, + south : function(box){ + if(this.isCollapsed){ + return this.applyLayoutCollapsed(box); + } + var sd = this.splitEl.dom, s = sd.style; + var sh = sd.offsetHeight; + this.panel.setPosition(box.x, box.y+sh); + s.left = (box.x)+'px'; + s.top = (box.y)+'px'; + s.width = Math.max(0, box.width)+'px'; + this.panel.setSize(box.width, box.height-sh); + } + }, + + render : function(ct, p){ + Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p); + + var ps = this.position; + + this.splitEl = ct.createChild({ + cls: "x-layout-split x-layout-split-"+ps, html: " " + }); + + if(this.collapseMode == 'mini'){ + this.miniSplitEl = this.splitEl.createChild({ + cls: "x-layout-mini x-layout-mini-"+ps, html: " " + }); + this.miniSplitEl.addClassOnOver('x-layout-mini-over'); + this.miniSplitEl.on('click', this.onCollapseClick, this, {stopEvent:true}); + } + + var s = this.splitSettings[ps]; + + this.split = new Ext.SplitBar(this.splitEl.dom, p.el, s.orientation); + this.split.placement = s.placement; + this.split.getMaximumSize = this[s.maxFn].createDelegate(this); + this.split.minSize = this.minSize || this[s.minProp]; + this.split.on("beforeapply", this.onSplitMove, this); + this.split.useShim = this.useShim === true; + this.maxSize = this.maxSize || this[s.maxProp]; + + if(p.hidden){ + this.splitEl.hide(); + } + + if(this.useSplitTips){ + this.splitEl.dom.title = this.collapsible ? this.collapsibleSplitTip : this.splitTip; + } + if(this.collapsible){ + this.splitEl.on("dblclick", this.onCollapseClick, this); + } + }, + + getSize : function(){ + if(this.isCollapsed){ + return this.collapsedEl.getSize(); + } + var s = this.panel.getSize(); + if(this.position == 'north' || this.position == 'south'){ + s.height += this.splitEl.dom.offsetHeight; + }else{ + s.width += this.splitEl.dom.offsetWidth; + } + 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; + if(this.position == 'north' || this.position == 'south'){ + this.panel.setSize(s.width, newSize); + this.state.height = newSize; + }else{ + this.panel.setSize(newSize, s.height); + this.state.width = newSize; + } + this.layout.layout(); + this.panel.saveState(); + return false; + }, + + + getSplitBar : function(){ + return this.split; + } +}); + +Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout; + +Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { + + + + labelSeparator : ':', + + getAnchorViewSize : function(ct, target){ + return ct.body.getStyleSize(); + }, + + setContainer : function(ct){ + Ext.layout.FormLayout.superclass.setContainer.call(this, ct); + + if(ct.labelAlign){ + ct.addClass('x-form-label-'+ct.labelAlign); + } + + if(ct.hideLabels){ + this.labelStyle = "display:none"; + this.elementStyle = "padding-left:0;"; + this.labelAdjust = 0; + }else{ + this.labelSeparator = ct.labelSeparator || this.labelSeparator; + if(typeof ct.labelWidth == 'number'){ + var pad = (typeof ct.labelPad == 'number' ? ct.labelPad : 5); + this.labelAdjust = ct.labelWidth+pad; + this.labelStyle = "width:"+ct.labelWidth+"px;"; + this.elementStyle = "padding-left:"+(ct.labelWidth+pad)+'px'; + } + if(ct.labelAlign == 'top'){ + this.labelStyle = "width:auto;"; + this.labelAdjust = 0; + this.elementStyle = "padding-left:0;"; + } + } + + if(!this.fieldTpl){ + var t = new Ext.Template( + '
', + '', + '
', + '
', + '
' + ); + t.disableFormats = true; + t.compile(); + Ext.layout.FormLayout.prototype.fieldTpl = t; + } + }, + + renderItem : function(c, position, target){ + if(c && !c.rendered && c.isFormField && c.inputType != 'hidden'){ + var args = [ + c.id, c.fieldLabel, + c.labelStyle||this.labelStyle||'', + this.elementStyle||'', + typeof c.labelSeparator == 'undefined' ? this.labelSeparator : c.labelSeparator, + (c.itemCls||this.container.itemCls||'') + (c.hideLabel ? ' x-hide-label' : ''), + c.clearCls || 'x-form-clear-left' + ]; + if(typeof position == 'number'){ + position = target.dom.childNodes[position] || null; + } + if(position){ + this.fieldTpl.insertBefore(position, args); + }else{ + this.fieldTpl.append(target, args); + } + c.render('x-form-el-'+c.id); + }else { + Ext.layout.FormLayout.superclass.renderItem.apply(this, arguments); + } + }, + + adjustWidthAnchor : function(value, comp){ + return value - (comp.hideLabel ? 0 : this.labelAdjust); + }, + + isValidParent : function(c, target){ + return true; + } + + +}); + +Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout; + +Ext.layout.Accordion = Ext.extend(Ext.layout.FitLayout, { + + fill : true, + + autoWidth : true, + + titleCollapse : true, + + hideCollapseTool : false, + + collapseFirst : false, + + animate : false, + + sequence : false, + + activeOnTop : false, + + renderItem : function(c){ + if(this.animate === false){ + c.animCollapse = false; + } + c.collapsible = true; + if(this.autoWidth){ + c.autoWidth = true; + } + if(this.titleCollapse){ + c.titleCollapse = true; + } + if(this.hideCollapseTool){ + c.hideCollapseTool = true; + } + if(this.collapseFirst !== undefined){ + c.collapseFirst = this.collapseFirst; + } + if(!this.activeItem && !c.collapsed){ + this.activeItem = c; + }else if(this.activeItem){ + c.collapsed = true; + } + Ext.layout.Accordion.superclass.renderItem.apply(this, arguments); + c.header.addClass('x-accordion-hd'); + c.on('beforeexpand', this.beforeExpand, this); + }, + + + beforeExpand : function(p, anim){ + var ai = this.activeItem; + if(ai){ + if(this.sequence){ + delete this.activeItem; + ai.collapse({callback:function(){ + p.expand(anim || true); + }, scope: this}); + return false; + }else{ + ai.collapse(this.animate); + } + } + this.activeItem = p; + 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 items = this.container.items.items; + var hh = 0; + for(var i = 0, len = items.length; i < len; i++){ + var p = items[i]; + if(p != item){ + hh += (p.getSize().height - p.bwrap.getHeight()); + } + } + size.height -= hh; + item.setSize(size); + } + } +}); +Ext.Container.LAYOUTS['accordion'] = Ext.layout.Accordion; + +Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, { + + + + monitorResize:false, + + + setContainer : function(ct){ + Ext.layout.TableLayout.superclass.setContainer.call(this, ct); + + this.currentRow = 0; + this.currentColumn = 0; + this.spanCells = []; + }, + + + onLayout : function(ct, target){ + var cs = ct.items.items, len = cs.length, c, i; + + if(!this.table){ + target.addClass('x-table-layout-ct'); + + this.table = target.createChild( + {tag:'table', cls:'x-table-layout', cellspacing: 0, cn: {tag: 'tbody'}}, null, true); + + this.renderAll(ct, target); + } + }, + + + getRow : function(index){ + var row = this.table.tBodies[0].childNodes[index]; + if(!row){ + row = document.createElement('tr'); + this.table.tBodies[0].appendChild(row); + } + return row; + }, + + + getNextCell : function(c){ + var td = document.createElement('td'), row, colIndex; + if(!this.columns){ + row = this.getRow(0); + }else { + colIndex = this.currentColumn; + if(colIndex !== 0 && (colIndex % this.columns === 0)){ + this.currentRow++; + colIndex = (c.colspan || 1); + }else{ + colIndex += (c.colspan || 1); + } + + + var cell = this.getNextNonSpan(colIndex, this.currentRow); + this.currentColumn = cell[0]; + if(cell[1] != this.currentRow){ + + this.currentRow = cell[1]; + if(c.colspan){ + + + + + this.currentColumn += c.colspan - 1; + } + } + row = this.getRow(this.currentRow); + } + if(c.colspan){ + td.colSpan = c.colspan; + } + td.className = 'x-table-layout-cell'; + if(c.rowspan){ + td.rowSpan = c.rowspan; + var rowIndex = this.currentRow, colspan = c.colspan || 1; + + for(var r = rowIndex+1; r < rowIndex+c.rowspan; r++){ + for(var col=this.currentColumn-colspan+1; col <= this.currentColumn; col++){ + if(!this.spanCells[col]){ + this.spanCells[col] = []; + } + this.spanCells[col][r] = 1; + } + } + } + row.appendChild(td); + return td; + }, + + + getNextNonSpan: function(colIndex, rowIndex){ + var c = (colIndex <= this.columns ? colIndex : this.columns), r = rowIndex; + for(var i=c; i <= this.columns; i++){ + if(this.spanCells[i] && this.spanCells[i][r]){ + if(++c > this.columns){ + + return this.getNextNonSpan(1, ++r); + } + }else{ + break; + } + } + return [c,r]; + }, + + + renderItem : function(c, position, target){ + if(c && !c.rendered){ + c.render(this.getNextCell(c)); + } + }, + + + isValidParent : function(c, target){ + return true; + } + + +}); + +Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout; + +Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, { + extraCls: 'x-abs-layout-item', + onLayout : function(ct, target){ + target.position(); + Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target); + } + +}); +Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout; + +Ext.Viewport = Ext.extend(Ext.Container, { + + + + + + + + + + + + + initComponent : function() { + Ext.Viewport.superclass.initComponent.call(this); + document.getElementsByTagName('html')[0].className += ' x-viewport'; + this.el = Ext.getBody(); + this.el.setHeight = Ext.emptyFn; + this.el.setWidth = Ext.emptyFn; + this.el.setSize = Ext.emptyFn; + this.el.dom.scroll = 'no'; + this.allowDomMove = false; + this.autoWidth = true; + this.autoHeight = true; + Ext.EventManager.onWindowResize(this.fireResize, this); + this.renderTo = this.el; + }, + + fireResize : function(w, h){ + this.fireEvent('resize', this, w, h, w, h); + } +}); +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', + + toolTarget : 'header', + collapseEl : 'bwrap', + slideAnchor : 't', + + deferHeight: true, + expandDefaults: { + duration:.25 + }, + collapseDefaults: { + duration:.25 + }, + + initComponent : function(){ + Ext.Panel.superclass.initComponent.call(this); + + this.addEvents( + + 'bodyresize', + + 'titlechange', + + 'collapse', + + 'expand', + + 'beforecollapse', + + 'beforeexpand', + + 'beforeclose', + + 'close', + + 'activate', + + 'deactivate' + ); + + if(this.tbar){ + this.elements += ',tbar'; + if(typeof this.tbar == 'object'){ + this.topToolbar = this.tbar; + } + delete this.tbar; + } + if(this.bbar){ + this.elements += ',bbar'; + if(typeof this.bbar == 'object'){ + this.bottomToolbar = this.bbar; + } + delete this.bbar; + } + + if(this.header === true){ + this.elements += ',header'; + delete this.header; + }else if(this.title && this.header !== false){ + this.elements += ',header'; + } + + if(this.footer === true){ + this.elements += ',footer'; + delete this.footer; + } + + if(this.buttons){ + var btns = this.buttons; + + this.buttons = []; + for(var i = 0, len = btns.length; i < len; i++) { + if(btns[i].render){ this.buttons.push(btns[i]); + }else{ + this.addButton(btns[i]); + } + } + } + if(this.autoLoad){ + this.on('render', this.doAutoLoad, this, {delay:10}); + } + }, + + createElement : function(name, pnode){ + if(this[name]){ + pnode.appendChild(this[name].dom); + return; + } + + if(name === 'bwrap' || this.elements.indexOf(name) != -1){ + if(this[name+'Cfg']){ + this[name] = Ext.fly(pnode).createChild(this[name+'Cfg']); + }else{ + var el = document.createElement('div'); + el.className = this[name+'Cls']; + this[name] = Ext.get(pnode.appendChild(el)); + } + } + }, + + onRender : function(ct, position){ + Ext.Panel.superclass.onRender.call(this, ct, position); + + this.createClasses(); + + if(this.el){ this.el.addClass(this.baseCls); + this.header = this.el.down('.'+this.headerCls); + this.bwrap = this.el.down('.'+this.bwrapCls); + var cp = this.bwrap ? this.bwrap : this.el; + this.tbar = cp.down('.'+this.tbarCls); + this.body = cp.down('.'+this.bodyCls); + this.bbar = cp.down('.'+this.bbarCls); + this.footer = cp.down('.'+this.footerCls); + this.fromMarkup = true; + }else{ + this.el = ct.createChild({ + id: this.id, + cls: this.baseCls + }, position); + } + var el = this.el, d = el.dom; + + if(this.cls){ + this.el.addClass(this.cls); + } + + if(this.buttons){ + 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); + + var bw = this.bwrap.dom; + var ml = d.childNodes[1], bl = d.childNodes[2]; + bw.appendChild(ml); + bw.appendChild(bl); + + var mc = bw.firstChild.firstChild.firstChild; + this.createElement('tbar', mc); + this.createElement('body', mc); + this.createElement('bbar', mc); + this.createElement('footer', bw.lastChild.firstChild.firstChild); + + if(!this.footer){ + this.bwrap.dom.lastChild.className += ' x-panel-nofooter'; + } + }else{ + this.createElement('header', d); + this.createElement('bwrap', d); + + var bw = this.bwrap.dom; + this.createElement('tbar', bw); + this.createElement('body', bw); + this.createElement('bbar', bw); + this.createElement('footer', bw); + + if(!this.header){ + this.body.addClass(this.bodyCls + '-noheader'); + if(this.tbar){ + this.tbar.addClass(this.tbarCls + '-noheader'); + } + } + } + + if(this.border === false){ + this.el.addClass(this.baseCls + '-noborder'); + this.body.addClass(this.bodyCls + '-noborder'); + if(this.header){ + this.header.addClass(this.headerCls + '-noborder'); + } + if(this.footer){ + this.footer.addClass(this.footerCls + '-noborder'); + } + if(this.tbar){ + this.tbar.addClass(this.tbarCls + '-noborder'); + } + if(this.bbar){ + this.bbar.addClass(this.bbarCls + '-noborder'); + } + } + + if(this.bodyBorder === false){ + this.body.addClass(this.bodyCls + '-noborder'); + } + + if(this.bodyStyle){ + this.body.applyStyles(this.bodyStyle); + } + + this.bwrap.enableDisplayMode('block'); + + if(this.header){ + this.header.unselectable(); + + if(this.headerAsText){ + this.header.dom.innerHTML = + ''+this.header.dom.innerHTML+''; + + if(this.iconCls){ + this.setIconClass(this.iconCls); + } + } + } + + if(this.floating){ + this.makeFloating(this.floating); + } + + if(this.collapsible){ + this.tools = this.tools ? this.tools.slice(0) : []; + if(!this.hideCollapseTool){ + this.tools[this.collapseFirst?'unshift':'push']({ + id: 'toggle', + handler : this.toggleCollapse, + scope: this + }); + } + if(this.titleCollapse && this.header){ + this.header.on('click', this.toggleCollapse, this); + this.header.setStyle('cursor', 'pointer'); + } + } + if(this.tools){ + var ts = this.tools; + this.tools = {}; + this.addTool.apply(this, ts); + }else{ + this.tools = {}; + } + + if(this.buttons && this.buttons.length > 0){ + var tb = this.footer.createChild({cls:'x-panel-btns-ct', cn: { + cls:"x-panel-btns x-panel-btns-"+this.buttonAlign, + html:'
' + }}, null, true); + var tr = tb.getElementsByTagName('tr')[0]; + for(var i = 0, len = this.buttons.length; i < len; i++) { + var b = this.buttons[i]; + var td = document.createElement('td'); + td.className = 'x-panel-btn-td'; + b.render(tr.appendChild(td)); + } + } + + if(this.tbar && this.topToolbar){ + if(this.topToolbar instanceof Array){ + this.topToolbar = new Ext.Toolbar(this.topToolbar); + } + this.topToolbar.render(this.tbar); + } + if(this.bbar && this.bottomToolbar){ + if(this.bottomToolbar instanceof Array){ + this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar); + } + this.bottomToolbar.render(this.bbar); + } + }, + + + setIconClass : function(cls){ + var old = this.iconCls; + this.iconCls = cls; + if(this.rendered){ + if(this.frame){ + this.header.addClass('x-panel-icon'); + this.header.replaceClass(old, this.iconCls); + }else{ + var hd = this.header.dom; + var img = hd.firstChild && String(hd.firstChild.tagName).toLowerCase() == 'img' ? hd.firstChild : null; + if(img){ + Ext.fly(img).replaceClass(old, this.iconCls); + }else{ + Ext.DomHelper.insertBefore(hd.firstChild, { + tag:'img', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls + }); + } + } + } + }, + + makeFloating : function(cfg){ + this.floating = true; + this.el = new Ext.Layer( + typeof cfg == 'object' ? cfg : { + shadow: this.shadow !== undefined ? this.shadow : 'sides', + shadowOffset: this.shadowOffset, + constrain:false, + shim: this.shim === false ? false : undefined + }, this.el + ); + }, + + + getTopToolbar : function(){ + return this.topToolbar; + }, + + + getBottomToolbar : function(){ + return this.bottomToolbar; + }, + + + addButton : function(config, handler, scope){ + var bc = { + handler: handler, + scope: scope, + minWidth: this.minButtonWidth, + hideParent:true + }; + if(typeof config == "string"){ + bc.text = config; + }else{ + Ext.apply(bc, config); + } + var btn = new Ext.Button(bc); + if(!this.buttons){ + this.buttons = []; + } + this.buttons.push(btn); + return btn; + }, + + addTool : function(){ + if(!this[this.toolTarget]) { return; + } + if(!this.toolTemplate){ + var tt = new Ext.Template( + '
 
' + ); + tt.disableFormats = true; + tt.compile(); + Ext.Panel.prototype.toolTemplate = tt; + } + for(var i = 0, a = arguments, len = a.length; i < len; i++) { + var tc = a[i], overCls = 'x-tool-'+tc.id+'-over'; + var t = this.toolTemplate.insertFirst(this[this.toolTarget], tc, true); + this.tools[tc.id] = t; + t.enableDisplayMode('block'); + t.on('click', this.createToolHandler(t, tc, overCls, this)); + if(tc.on){ + t.on(tc.on); + } + if(tc.hidden){ + t.hide(); + } + if(tc.qtip){ + if(typeof tc.qtip == 'object'){ + Ext.QuickTips.register(Ext.apply({ + target: t.id + }, tc.qtip)); + } else { + t.dom.qtip = tc.qtip; + } + } + t.addClassOnOver(overCls); + } + }, + + onShow : function(){ + if(this.floating){ + return this.el.show(); + } + Ext.Panel.superclass.onShow.call(this); + }, + + onHide : function(){ + if(this.floating){ + return this.el.hide(); + } + Ext.Panel.superclass.onHide.call(this); + }, + + createToolHandler : function(t, tc, overCls, panel){ + return function(e){ + t.removeClass(overCls); + e.stopEvent(); + if(tc.handler){ + tc.handler.call(tc.scope || t, e, t, panel); + } + }; + }, + + afterRender : function(){ + if(this.fromMarkup && this.height === undefined && !this.autoHeight){ + this.height = this.el.getHeight(); + } + if(this.floating && !this.hidden && !this.initHidden){ + this.el.show(); + } + if(this.title){ + this.setTitle(this.title); + } + if(this.autoScroll){ + this.body.dom.style.overflow = 'auto'; + } + if(this.html){ + this.body.update(typeof this.html == 'object' ? + Ext.DomHelper.markup(this.html) : + this.html); + delete this.html; + } + if(this.contentEl){ + var ce = Ext.getDom(this.contentEl); + Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']); + this.body.dom.appendChild(ce); + } + if(this.collapsed){ + this.collapsed = false; + this.collapse(false); + } + Ext.Panel.superclass.afterRender.call(this); this.initEvents(); + }, + + getKeyMap : function(){ + if(!this.keyMap){ + this.keyMap = new Ext.KeyMap(this.el, this.keys); + } + return this.keyMap; + }, + + initEvents : function(){ + if(this.keys){ + this.getKeyMap(); + } + if(this.draggable){ + this.initDraggable(); + } + }, + + initDraggable : function(){ + this.dd = new Ext.Panel.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); + }, + + beforeEffect : function(){ + if(this.floating){ + this.el.beforeAction(); + } + this.el.addClass('x-panel-animated'); + }, + + afterEffect : function(){ + this.syncShadow(); + this.el.removeClass('x-panel-animated'); + }, + + createEffect : function(a, cb, scope){ + var o = { + scope:scope, + block:true + }; + if(a === true){ + o.callback = cb; + return o; + }else if(!a.callback){ + o.callback = cb; + }else { o.callback = function(){ + cb.call(scope); + Ext.callback(a.callback, a.scope); + }; + } + return Ext.applyIf(o, a); + }, + + + collapse : function(animate){ + if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){ + return; + } + var doAnim = animate === true || (animate !== false && this.animCollapse); + this.beforeEffect(); + this.onCollapse(doAnim, animate); + return this; + }, + + onCollapse : function(doAnim, animArg){ + if(doAnim){ + this[this.collapseEl].slideOut(this.slideAnchor, + Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this), + this.collapseDefaults)); + }else{ + this[this.collapseEl].hide(); + this.afterCollapse(); + } + }, + + afterCollapse : function(){ + this.collapsed = true; + this.el.addClass(this.collapsedCls); + this.afterEffect(); + this.fireEvent('collapse', this); + }, + + + expand : function(animate){ + if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){ + return; + } + var doAnim = animate === true || (animate !== false && this.animCollapse); + this.el.removeClass(this.collapsedCls); + this.beforeEffect(); + this.onExpand(doAnim, animate); + return this; + }, + + onExpand : function(doAnim, animArg){ + if(doAnim){ + this[this.collapseEl].slideIn(this.slideAnchor, + Ext.apply(this.createEffect(animArg||true, this.afterExpand, this), + this.expandDefaults)); + }else{ + this[this.collapseEl].show(); + this.afterExpand(); + } + }, + + afterExpand : function(){ + this.collapsed = false; + this.afterEffect(); + 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(); + } + Ext.Panel.superclass.onDisable.call(this); + }, + + onEnable : function(){ + if(this.rendered && this.maskDisabled){ + this.el.unmask(); + } + Ext.Panel.superclass.onEnable.call(this); + }, + + onResize : function(w, h){ + if(w !== undefined || h !== undefined){ + if(!this.collapsed){ + if(typeof w == 'number'){ + this.body.setWidth( + this.adjustBodyWidth(w - this.getFrameWidth())); + }else if(w == 'auto'){ + this.body.setWidth(w); + } + + if(typeof h == 'number'){ + this.body.setHeight( + this.adjustBodyHeight(h - this.getFrameHeight())); + }else if(h == 'auto'){ + this.body.setHeight(h); + } + }else{ + this.queuedBodySize = {width: w, height: h}; + if(!this.queuedExpand && this.allowQueuedExpand !== false){ + this.queuedExpand = true; + this.on('expand', function(){ + delete this.queuedExpand; + this.onResize(this.queuedBodySize.width, this.queuedBodySize.height); + this.doLayout(); + }, this, {single:true}); + } + } + this.fireEvent('bodyresize', this, w, h); + } + this.syncShadow(); + }, + + adjustBodyHeight : function(h){ + return h; + }, + + adjustBodyWidth : function(w){ + return w; + }, + + onPosition : function(){ + this.syncShadow(); + }, + + onDestroy : function(){ + if(this.tools){ + for(var k in this.tools){ + Ext.destroy(this.tools[k]); + } + } + if(this.buttons){ + for(var b in this.buttons){ + Ext.destroy(this.buttons[b]); + } + } + Ext.destroy( + this.topToolbar, + this.bottomToolbar + ); + Ext.Panel.superclass.onDestroy.call(this); + }, + + + getFrameWidth : function(){ + var w = this.el.getFrameWidth('lr'); + + if(this.frame){ + var l = this.bwrap.dom.firstChild; + w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r')); + var mc = this.bwrap.dom.firstChild.firstChild.firstChild; + w += Ext.fly(mc).getFrameWidth('lr'); + } + return w; + }, + + + getFrameHeight : function(){ + var h = this.el.getFrameWidth('tb'); + h += (this.tbar ? this.tbar.getHeight() : 0) + + (this.bbar ? this.bbar.getHeight() : 0); + + if(this.frame){ + var hd = this.el.dom.firstChild; + var ft = this.bwrap.dom.lastChild; + h += (hd.offsetHeight + ft.offsetHeight); + var mc = this.bwrap.dom.firstChild.firstChild.firstChild; + h += Ext.fly(mc).getFrameWidth('tb'); + }else{ + h += (this.header ? this.header.getHeight() : 0) + + (this.footer ? this.footer.getHeight() : 0); + } + return h; + }, + + + getInnerWidth : function(){ + return this.getSize().width - this.getFrameWidth(); + }, + + + getInnerHeight : function(){ + return this.getSize().height - this.getFrameHeight(); + }, + + syncShadow : function(){ + if(this.floating){ + this.el.sync(true); + } + }, + + getLayoutTarget : function(){ + return this.body; + }, + + + setTitle : function(title, iconCls){ + this.title = title; + if(this.header && this.headerAsText){ + this.header.child('span').update(title); + } + if(iconCls){ + this.setIconClass(iconCls); + } + this.fireEvent('titlechange', this, title); + 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.Element.uncache( + this.header, + this.tbar, + this.bbar, + this.footer, + this.body + ); + }, + + createClasses : function(){ + this.headerCls = this.baseCls + '-header'; + this.headerTextCls = this.baseCls + '-header-text'; + this.bwrapCls = this.baseCls + '-bwrap'; + this.tbarCls = this.baseCls + '-tbar'; + this.bodyCls = this.baseCls + '-body'; + this.bbarCls = this.baseCls + '-bbar'; + this.footerCls = this.baseCls + '-footer'; + }, + + createGhost : function(cls, useShim, appendTo){ + var el = document.createElement('div'); + el.className = 'x-panel-ghost ' + (cls ? cls : ''); + if(this.header){ + el.appendChild(this.el.dom.firstChild.cloneNode(true)); + } + Ext.fly(el.appendChild(document.createElement('ul'))).setHeight(this.bwrap.getHeight()); + el.style.width = this.el.dom.offsetWidth + 'px';; + if(!appendTo){ + this.container.dom.appendChild(el); + }else{ + Ext.getDom(appendTo).appendChild(el); + } + if(useShim !== false && this.el.useShim !== false){ + var layer = new Ext.Layer({shadow:false, useDisplay:true, constrain:false}, el); + layer.show(); + return layer; + }else{ + return new Ext.Element(el); + } + }, + + doAutoLoad : function(){ + this.body.load( + typeof this.autoLoad == 'object' ? + this.autoLoad : {url: this.autoLoad}); + } +}); +Ext.reg('panel', Ext.Panel); + + +Ext.Window = Ext.extend(Ext.Panel, { + + + + + + + + baseCls : 'x-window', + + resizable:true, + + draggable:true, + + closable : true, + + constrain:false, + + constrainHeader:false, + + plain:false, + + minimizable : false, + + maximizable : false, + + minHeight: 100, + + minWidth: 200, + + expandOnShow: true, + + closeAction: 'close', + + collapsible:false, + + initHidden : true, + + monitorResize : true, + + + elements: 'header,body', + + frame:true, + + floating:true, + + initComponent : function(){ + Ext.Window.superclass.initComponent.call(this); + this.addEvents( + + + + 'resize', + + 'maximize', + + 'minimize', + + 'restore' + ); + }, + + getState : function(){ + return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox()); + }, + + onRender : function(ct, position){ + Ext.Window.superclass.onRender.call(this, ct, position); + + if(this.plain){ + this.el.addClass('x-window-plain'); + } + + this.focusEl = this.el.createChild({ + tag: "a", href:"#", cls:"x-dlg-focus", + tabIndex:"-1", html: " "}); + this.focusEl.swallowEvent('click', true); + + this.proxy = this.el.createProxy("x-window-proxy"); + this.proxy.enableDisplayMode('block'); + + if(this.modal){ + this.mask = this.container.createChild({cls:"ext-el-mask"}, this.el.dom); + this.mask.enableDisplayMode("block"); + this.mask.hide(); + } + }, + + initEvents : function(){ + Ext.Window.superclass.initEvents.call(this); + if(this.animateTarget){ + this.setAnimateTarget(this.animateTarget); + } + + if(this.resizable){ + this.resizer = new Ext.Resizable(this.el, { + minWidth: this.minWidth, + minHeight:this.minHeight, + handles: this.resizeHandles || "all", + pinned: true, + resizeElement : this.resizerAction + }); + this.resizer.window = this; + this.resizer.on("beforeresize", this.beforeResize, this); + } + + if(this.draggable){ + this.header.addClass("x-window-draggable"); + } + this.initTools(); + + this.el.on("mousedown", this.toFront, this); + this.manager = this.manager || Ext.WindowMgr; + this.manager.register(this); + this.hidden = true; + if(this.maximized){ + this.maximized = false; + this.maximize(); + } + if(this.closable){ + var km = this.getKeyMap(); + km.on(27, this.onEsc, this); + km.disable(); + } + }, + + initDraggable : function(){ + this.dd = new Ext.Window.DD(this); + }, + + onEsc : function(){ + this[this.closeAction](); + }, + + beforeDestroy : function(){ + Ext.destroy( + this.resizer, + this.dd, + this.proxy + ); + Ext.Window.superclass.beforeDestroy.call(this); + }, + + onDestroy : function(){ + if(this.manager){ + this.manager.unregister(this); + } + Ext.Window.superclass.onDestroy.call(this); + }, + + initTools : function(){ + if(this.minimizable){ + this.addTool({ + id: 'minimize', + handler: this.minimize.createDelegate(this, []) + }); + } + if(this.maximizable){ + this.addTool({ + id: 'maximize', + handler: this.maximize.createDelegate(this, []) + }); + this.addTool({ + id: 'restore', + handler: this.restore.createDelegate(this, []), + hidden:true + }); + this.header.on('dblclick', this.toggleMaximize, this); + } + if(this.closable){ + this.addTool({ + id: 'close', + handler: this[this.closeAction].createDelegate(this, []) + }); + } + }, + + resizerAction : function(){ + var box = this.proxy.getBox(); + this.proxy.hide(); + this.window.handleResize(box); + return box; + }, + + beforeResize : function(){ + this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40); + this.resizeBox = this.el.getBox(); + }, + + updateHandles : function(){ + if(Ext.isIE && this.resizer){ + this.resizer.syncHandleHeight(); + this.el.repaint(); + } + }, + + handleResize : function(box){ + var rz = this.resizeBox; + if(rz.x != box.x || rz.y != box.y){ + this.updateBox(box); + }else{ + this.setSize(box); + } + this.focus(); + this.updateHandles(); + this.saveState(); + this.fireEvent("resize", this, box.width, box.height); + }, + + + focus : function(){ + var f = this.focusEl, db = this.defaultButton, t = typeof db; + if(t != 'undefined'){ + if(t == 'number'){ + f = this.buttons[db]; + }else if(t == 'string'){ + f = Ext.getCmp(db); + }else{ + f = db; + } + } + 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; + if(this.x === undefined || this.y === undefined){ + var xy = this.el.getAlignToXY(this.container, 'c-c'); + var pos = this.el.translatePoints(xy[0], xy[1]); + this.x = this.x === undefined? pos.left : this.x; + this.y = this.y === undefined? pos.top : this.y; + } + this.el.setLeftTop(this.x, this.y); + + if(this.expandOnShow){ + this.expand(false); + } + + if(this.modal){ + Ext.getBody().addClass("x-body-masked"); + this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.mask.show(); + } + }, + + + show : function(animateTarget, cb, scope){ + if(!this.rendered){ + this.render(Ext.getBody()); + } + if(this.hidden === false){ + this.toFront(); + return; + } + if(this.fireEvent("beforeshow", this) === false){ + return; + } + if(cb){ + this.on('show', cb, scope, {single:true}); + } + this.hidden = false; + if(animateTarget !== undefined){ + this.setAnimateTarget(animateTarget); + } + this.beforeShow(); + if(this.animateTarget){ + this.animShow(); + }else{ + this.afterShow(); + } + }, + + afterShow : function(){ + this.proxy.hide(); + this.el.setStyle('display', 'block'); + this.el.show(); + if(this.maximized){ + this.fitContainer(); + } + + if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ + Ext.EventManager.onWindowResize(this.onWindowResize, this); + } + this.doConstrain(); + if(this.layout){ + this.doLayout(); + } + if(this.keyMap){ + this.keyMap.enable(); + } + this.toFront(); + this.updateHandles(); + this.fireEvent("show", this); + }, + + animShow : function(){ + this.proxy.show(); + this.proxy.setBox(this.animateTarget.getBox()); + this.proxy.setOpacity(0); + var b = this.getBox(false); + b.callback = this.afterShow; + b.scope = this; + b.duration = .25; + b.easing = 'easeNone'; + b.opacity = .5; + b.block = true; + this.el.setStyle('display', 'none'); + this.proxy.shift(b); + }, + + + hide : function(animateTarget, cb, scope){ + if(this.hidden || this.fireEvent("beforehide", this) === false){ + return; + } + if(cb){ + this.on('hide', cb, scope, {single:true}); + } + this.hidden = true; + if(animateTarget !== undefined){ + this.setAnimateTarget(animateTarget); + } + if(this.animateTarget){ + this.animHide(); + }else{ + this.el.hide(); + this.afterHide(); + } + }, + + afterHide : function(){ + this.proxy.hide(); + if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ + Ext.EventManager.removeResizeListener(this.onWindowResize, this); + } + if(this.modal){ + this.mask.hide(); + Ext.getBody().removeClass("x-body-masked"); + } + if(this.keyMap){ + this.keyMap.disable(); + } + this.fireEvent("hide", this); + }, + + animHide : function(){ + this.proxy.setOpacity(.5); + this.proxy.show(); + var tb = this.getBox(false); + this.proxy.setBox(tb); + this.el.hide(); + var b = this.animateTarget.getBox(); + b.callback = this.afterHide; + b.scope = this; + b.duration = .25; + b.easing = 'easeNone'; + b.block = true; + b.opacity = 0; + this.proxy.shift(b); + }, + + onWindowResize : function(){ + if(this.maximized){ + this.fitContainer(); + } + if(this.modal){ + this.mask.setSize('100%', '100%'); + var force = this.mask.dom.offsetHeight; + this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + } + this.doConstrain(); + }, + + doConstrain : function(){ + if(this.constrain || this.constrainHeader){ + var offsets; + if(this.constrain){ + offsets = { + right:this.el.shadowOffset, + left:this.el.shadowOffset, + bottom:this.el.shadowOffset + }; + }else { + var s = this.getSize(); + offsets = { + right:-(s.width - 100), + bottom:-(s.height - 25) + }; + } + + var xy = this.el.getConstrainToXY(this.container, true, offsets); + if(xy){ + this.setPosition(xy[0], xy[1]); + } + } + }, + + ghost : function(cls){ + var ghost = this.createGhost(cls); + var box = this.getBox(true); + ghost.setLeftTop(box.x, box.y); + ghost.setWidth(box.width); + this.el.hide(); + this.activeGhost = ghost; + return ghost; + }, + + unghost : function(show, matchPosition){ + if(show !== false){ + this.el.show(); + this.focus(); + } + if(matchPosition !== false){ + this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true)); + } + this.activeGhost.hide(); + this.activeGhost.remove(); + delete this.activeGhost; + }, + + + minimize : function(){ + this.fireEvent('minimize', this); + }, + + + close : function(){ + if(this.fireEvent("beforeclose", this) !== false){ + this.hide(null, function(){ + this.fireEvent('close', this); + this.destroy(); + }, this); + } + }, + + + maximize : function(){ + if(!this.maximized){ + this.expand(false); + this.restoreSize = this.getSize(); + this.restorePos = this.getPosition(true); + this.tools.maximize.hide(); + this.tools.restore.show(); + this.maximized = true; + this.el.disableShadow(); + + if(this.dd){ + this.dd.lock(); + } + if(this.collapsible){ + this.tools.toggle.hide(); + } + this.el.addClass('x-window-maximized'); + this.container.addClass('x-window-maximized-ct'); + + this.setPosition(0, 0); + this.fitContainer(); + this.fireEvent('maximize', this); + } + }, + + + restore : function(){ + if(this.maximized){ + this.el.removeClass('x-window-maximized'); + this.tools.restore.hide(); + this.tools.maximize.show(); + this.setPosition(this.restorePos[0], this.restorePos[1]); + this.setSize(this.restoreSize.width, this.restoreSize.height); + delete this.restorePos; + delete this.restoreSize; + this.maximized = false; + this.el.enableShadow(true); + + if(this.dd){ + this.dd.unlock(); + } + if(this.collapsible){ + this.tools.toggle.show(); + } + this.container.removeClass('x-window-maximized-ct'); + + this.doConstrain(); + this.fireEvent('restore', this); + } + }, + + + toggleMaximize : function(){ + this[this.maximized ? 'restore' : 'maximize'](); + }, + + fitContainer : function(){ + var vs = this.container.getViewSize(); + this.setSize(vs.width, vs.height); + }, + + setZIndex : function(index){ + if(this.modal){ + this.mask.setStyle("z-index", index); + } + this.el.setZIndex(++index); + index += 5; + + if(this.resizer){ + this.resizer.proxy.setStyle("z-index", ++index); + } + + 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, _pname){ + var action = function(){ + this.alignTo(el, alignment, offsets); + }; + Ext.EventManager.onWindowResize(action, this); + var tm = typeof monitorScroll; + if(tm != 'undefined'){ + Ext.EventManager.on(window, 'scroll', action, this, + {buffer: tm == 'number' ? monitorScroll : 50}); + } + action.call(this); + this[_pname] = action; + return this; + }, + + + toFront : function(){ + if(this.manager.bringToFront(this)){ + this.focus(); + } + return this; + }, + + + setActive : function(active){ + if(active){ + if(!this.maximized){ + this.el.enableShadow(true); + } + this.fireEvent('activate', this); + }else{ + this.el.disableShadow(); + this.fireEvent('deactivate', this); + } + }, + + + toBack : function(){ + this.manager.sendToBack(this); + return this; + }, + + + center : function(){ + var xy = this.el.getAlignToXY(this.container, 'c-c'); + this.setPagePosition(xy[0], xy[1]); + return this; + } +}); +Ext.reg('window', Ext.Window); + +Ext.Window.DD = 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; +}; + +Ext.extend(Ext.Window.DD, Ext.dd.DD, { + moveOnly:true, + headerOffsets:[100, 25], + startDrag : function(){ + var w = this.win; + this.proxy = w.ghost(); + if(w.constrain !== false){ + var so = w.el.shadowOffset; + this.constrainTo(w.container, {right: so, left: so, bottom: so}); + }else if(w.constrainHeader !== false){ + var s = this.proxy.getSize(); + this.constrainTo(w.container, {right: -(s.width-this.headerOffsets[0]), bottom: -(s.height-this.headerOffsets[1])}); + } + }, + b4Drag : Ext.emptyFn, + + onDrag : function(e){ + this.alignElWithMouse(this.proxy, e.getPageX(), e.getPageY()); + }, + + endDrag : function(e){ + this.win.unghost(); + this.win.saveState(); + } +}); + +Ext.WindowGroup = function(){ + var list = {}; + 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){ + a.sort(sortWindows); + var seed = a[0].manager.zseed; + for(var i = 0; i < len; i++){ + var win = a[i]; + if(win && !win.hidden){ + win.setZIndex(seed + (i*10)); + } + } + } + activateLast(); + }; + + var setActiveWin = function(win){ + if(win != front){ + if(front){ + front.setActive(false); + } + front = win; + if(win){ + win.setActive(true); + } + } + }; + + var activateLast = function(){ + for(var i = accessList.length-1; i >=0; --i) { + if(!accessList[i].hidden){ + setActiveWin(accessList[i]); + return; + } + } + setActiveWin(null); + }; + + return { + + zseed : 9000, + + register : function(win){ + list[win.id] = win; + accessList.push(win); + win.on('hide', activateLast); + }, + + unregister : function(win){ + delete list[win.id]; + win.un('hide', activateLast); + accessList.remove(win); + }, + + + get : function(id){ + return typeof id == "object" ? id : list[id]; + }, + + + bringToFront : function(win){ + win = this.get(win); + if(win != front){ + win._lastAccess = new Date().getTime(); + orderWindows(); + return true; + } + return false; + }, + + + sendToBack : function(win){ + win = this.get(win); + win._lastAccess = -(new Date().getTime()); + orderWindows(); + return win; + }, + + + hideAll : function(){ + for(var id in list){ + if(list[id] && typeof list[id] != "function" && list[id].isVisible()){ + list[id].hide(); + } + } + }, + + + getActive : function(){ + return front; + }, + + + getBy : function(fn, scope){ + var r = []; + for(var i = accessList.length-1; i >=0; --i) { + var win = accessList[i]; + if(fn.call(scope||win, win) !== false){ + r.push(win); + } + } + return r; + }, + + + each : function(fn, scope){ + for(var id in list){ + if(list[id] && typeof list[id] != "function"){ + if(fn.call(scope || list[id], list[id]) === false){ + return; + } + } + } + } + }; +}; + + + +Ext.WindowMgr = new Ext.WindowGroup(); + +Ext.dd.PanelProxy = function(panel, config){ + this.panel = panel; + this.id = this.panel.id +'-ddproxy'; + Ext.apply(this, config); +}; + +Ext.dd.PanelProxy.prototype = { + + insertProxy : true, + + + setStatus : Ext.emptyFn, + reset : Ext.emptyFn, + update : Ext.emptyFn, + stop : Ext.emptyFn, + sync: Ext.emptyFn, + + + getEl : function(){ + return this.ghost; + }, + + + getGhost : function(){ + return this.ghost; + }, + + + getProxy : function(){ + return this.proxy; + }, + + + hide : function(){ + if(this.ghost){ + if(this.proxy){ + this.proxy.remove(); + delete this.proxy; + } + this.panel.el.dom.style.display = ''; + this.ghost.remove(); + delete this.ghost; + } + }, + + + show : function(){ + if(!this.ghost){ + this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody()); + this.ghost.setXY(this.panel.el.getXY()) + if(this.insertProxy){ + this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'}); + this.proxy.setSize(this.panel.getSize()); + } + this.panel.el.dom.style.display = 'none'; + } + }, + + + repair : function(xy, callback, scope){ + this.hide(); + if(typeof callback == "function"){ + callback.call(scope || this); + } + }, + + + moveProxy : function(parentNode, before){ + if(this.proxy){ + parentNode.insertBefore(this.proxy.dom, before); + } + } +}; + + +Ext.Panel.DD = function(panel, cfg){ + this.panel = panel; + this.dragData = {panel: panel}; + this.proxy = new Ext.dd.PanelProxy(panel, cfg); + Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); + this.setHandleElId(panel.header.id); + panel.header.setStyle('cursor', 'move'); + this.scroll = false; +}; + +Ext.extend(Ext.Panel.DD, Ext.dd.DragSource, { + showFrame: Ext.emptyFn, + startDrag: Ext.emptyFn, + b4StartDrag: function(x, y) { + this.proxy.show(); + }, + b4MouseDown: function(e) { + var x = e.getPageX(); + var y = e.getPageY(); + this.autoOffset(x, y); + }, + onInitDrag : function(x, y){ + this.onStartDrag(x, y); + return true; + }, + createFrame : Ext.emptyFn, + getDragEl : function(e){ + return this.proxy.ghost.dom; + }, + endDrag : function(e){ + this.proxy.hide(); + this.panel.saveState(); + }, + + autoOffset : function(x, y) { + x -= this.startPageX; + y -= this.startPageY; + this.setDelta(x, y); + } +}); + +Ext.state.Provider = function(){ + + this.addEvents("statechange"); + this.state = {}; + Ext.state.Provider.superclass.constructor.call(this); +}; +Ext.extend(Ext.state.Provider, Ext.util.Observable, { + + 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)\:(.*)$/; + var matches = re.exec(unescape(cookie)); + if(!matches || !matches[1]) return; + var type = matches[1]; + var v = matches[2]; + switch(type){ + case "n": + return parseFloat(v); + case "d": + return new Date(Date.parse(v)); + case "b": + return (v == "1"); + case "a": + var all = []; + var values = v.split("^"); + for(var i = 0, len = values.length; i < len; i++){ + all.push(this.decodeValue(values[i])); + } + return all; + case "o": + var all = {}; + var values = v.split("^"); + for(var i = 0, len = values.length; i < len; i++){ + var kv = values[i].split("="); + all[kv[0]] = this.decodeValue(kv[1]); + } + return all; + default: + return v; + } + }, + + + encodeValue : function(v){ + var enc; + if(typeof v == "number"){ + enc = "n:" + v; + }else if(typeof v == "boolean"){ + enc = "b:" + (v ? "1" : "0"); + }else if(v instanceof Date){ + enc = "d:" + v.toGMTString(); + }else if(v instanceof Array){ + var flat = ""; + for(var i = 0, len = v.length; i < len; i++){ + flat += this.encodeValue(v[i]); + if(i != len-1) flat += "^"; + } + enc = "a:" + flat; + }else if(typeof v == "object"){ + var flat = ""; + for(var key in v){ + if(typeof v[key] != "function" && v[key] !== undefined){ + flat += key + "=" + this.encodeValue(v[key]) + "^"; + } + } + enc = "o:" + flat.substring(0, flat.length-1); + }else{ + enc = "s:" + v; + } + return escape(enc); + } +}); + + +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; + } + }; +}(); + + +Ext.state.CookieProvider = function(config){ + Ext.state.CookieProvider.superclass.constructor.call(this); + this.path = "/"; + 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(); +}; + +Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, { + + set : function(name, value){ + if(typeof value == "undefined" || value === null){ + this.clear(name); + return; + } + this.setCookie(name, value); + 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 = {}; + var c = document.cookie + ";"; + var re = /\s?(.*?)=(.*?);/g; + var matches; + while((matches = re.exec(c)) != null){ + var name = matches[1]; + var value = matches[2]; + if(name && name.substring(0,3) == "ys-"){ + cookies[name.substr(3)] = this.decodeValue(value); + } + } + return cookies; + }, + + + setCookie : function(name, value){ + document.cookie = "ys-"+ name + "=" + this.encodeValue(value) + + ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) + + ((this.path == null) ? "" : ("; path=" + this.path)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((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)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((this.secure == true) ? "; secure" : ""); + } +}); + +Ext.DataView = Ext.extend(Ext.BoxComponent, { + + + + + + + + + + selectedClass : "x-view-selected", + + emptyText : "", + + + last: false, + + + initComponent : function(){ + Ext.DataView.superclass.initComponent.call(this); + if(typeof this.tpl == "string"){ + this.tpl = new Ext.XTemplate(this.tpl); + } + + this.addEvents( + + "beforeclick", + + "click", + + "containerclick", + + "dblclick", + + "contextmenu", + + "selectionchange", + + + "beforeselect" + ); + + this.all = new Ext.CompositeElementLite(); + this.selected = new Ext.CompositeElementLite(); + }, + + + onRender : function(){ + if(!this.el){ + this.el = document.createElement('div'); + } + Ext.DataView.superclass.onRender.apply(this, arguments); + }, + + + afterRender : function(){ + Ext.DataView.superclass.afterRender.call(this); + + this.el.on({ + "click": this.onClick, + "dblclick": this.onDblClick, + "contextmenu": this.onContextMenu, + scope:this + }); + + if(this.overClass){ + this.el.on({ + "mouseover": this.onMouseOver, + "mouseout": this.onMouseOut, + scope:this + }); + } + + if(this.store){ + this.setStore(this.store, true); + } + }, + + + refresh : function(){ + this.clearSelections(false, true); + this.el.update(""); + var html = []; + var records = this.store.getRange(); + if(records.length < 1){ + this.el.update(this.emptyText); + this.all.clear(); + return; + } + this.tpl.overwrite(this.el, this.collectData(records, 0)); + this.all.fill(Ext.query(this.itemSelector, this.el.dom)); + this.updateIndexes(0); + }, + + + prepareData : function(data){ + return data; + }, + + + collectData : function(records, startIndex){ + var r = []; + for(var i = 0, len = records.length; i < len; i++){ + r[r.length] = this.prepareData(records[i].data, startIndex+i, records[i]); + } + return r; + }, + + + bufferRender : function(records){ + var div = document.createElement('div'); + this.tpl.overwrite(div, this.collectData(records)); + return Ext.query(this.itemSelector, div); + }, + + + onUpdate : function(ds, record){ + var index = this.store.indexOf(record); + var sel = this.isSelected(index); + var original = this.all.elements[index]; + var node = this.bufferRender([record], index)[0]; + + this.all.replaceElement(index, node, true); + if(sel){ + this.selected.replaceElement(original, node); + this.all.item(index).addClass(this.selectedClass); + } + this.updateIndexes(index, index); + }, + + + onAdd : function(ds, records, index){ + if(this.all.getCount() == 0){ + this.refresh(); + return; + } + var nodes = this.bufferRender(records, index), n; + if(index < this.all.getCount()){ + n = this.all.item(index).insertSibling(nodes, 'before', true); + this.all.elements.splice(index, 0, n); + }else{ + n = this.all.last().insertSibling(nodes, 'after', true); + this.all.elements.push(n); + } + this.updateIndexes(index); + }, + + + onRemove : function(ds, record, index){ + this.deselect(index); + this.all.removeElement(index, true); + this.updateIndexes(index); + }, + + + refreshNode : function(index){ + this.onUpdate(this.store, this.store.getAt(index)); + }, + + + updateIndexes : function(startIndex, endIndex){ + var ns = this.all.elements; + startIndex = startIndex || 0; + endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1)); + for(var i = startIndex; i <= endIndex; i++){ + ns[i].viewIndex = i; + } + }, + + + setStore : function(store, initial){ + if(!initial && this.store){ + this.store.un("beforeload", this.onBeforeLoad, this); + this.store.un("datachanged", this.refresh, this); + this.store.un("add", this.onAdd, this); + this.store.un("remove", this.onRemove, this); + this.store.un("update", this.onUpdate, this); + this.store.un("clear", this.refresh, this); + } + if(store){ + store = Ext.StoreMgr.lookup(store); + store.on("beforeload", this.onBeforeLoad, this); + store.on("datachanged", this.refresh, this); + store.on("add", this.onAdd, this); + store.on("remove", this.onRemove, this); + store.on("update", this.onUpdate, this); + store.on("clear", this.refresh, this); + } + this.store = store; + if(store){ + this.refresh(); + } + }, + + + findItemFromChild : function(node){ + return Ext.fly(node).findParent(this.itemSelector, this.el); + }, + + + onClick : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item){ + var index = this.indexOf(item); + if(this.onItemClick(item, index, e) !== false){ + this.fireEvent("click", this, index, item, e); + } + }else{ + if(this.fireEvent("containerclick", this, e) !== false){ + this.clearSelections(); + } + } + }, + + + onContextMenu : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item){ + this.fireEvent("contextmenu", this, this.indexOf(item), item, e); + } + }, + + + onDblClick : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item){ + this.fireEvent("dblclick", this, this.indexOf(item), item, e); + } + }, + + + onMouseOver : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item && item !== this.lastItem){ + this.lastItem = item; + Ext.fly(item).addClass(this.overClass); + } + }, + + + onMouseOut : function(e){ + if(this.lastItem){ + if(!e.within(this.lastItem, true)){ + Ext.fly(this.lastItem).removeClass(this.overClass); + delete this.lastItem; + } + } + }, + + + onItemClick : function(item, index, e){ + if(this.fireEvent("beforeclick", this, index, item, e) === false){ + return false; + } + if(this.multiSelect){ + this.doMultiSelection(item, index, e); + e.preventDefault(); + }else if(this.singleSelect){ + this.doSingleSelection(item, index, e); + e.preventDefault(); + } + return true; + }, + + + doSingleSelection : function(item, index, e){ + if(e.ctrlKey && this.isSelected(index)){ + this.deselect(index); + }else{ + this.select(index, false); + } + }, + + + doMultiSelection : function(item, index, e){ + if(e.shiftKey && this.last !== false){ + var last = this.last; + this.selectRange(last, index, e.ctrlKey); + this.last = last; + }else{ + if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){ + this.deselect(index); + }else{ + this.select(index, e.ctrlKey || e.shiftKey || this.simpleSelect); + } + } + }, + + + getSelectionCount : function(){ + return this.selected.getCount() + }, + + + getSelectedNodes : function(){ + return this.selected.elements; + }, + + + getSelectedIndexes : function(){ + var indexes = [], s = this.selected.elements; + for(var i = 0, len = s.length; i < len; i++){ + indexes.push(s[i].viewIndex); + } + return indexes; + }, + + + getSelectedRecords : function(){ + var r = [], s = this.selected.elements; + for(var i = 0, len = s.length; i < len; i++){ + r[r.length] = this.store.getAt(s[i].viewIndex); + } + return r; + }, + + + getRecords : function(nodes){ + var r = [], s = nodes; + for(var i = 0, len = s.length; i < len; i++){ + r[r.length] = this.store.getAt(s[i].viewIndex); + } + return r; + }, + + + getRecord : function(node){ + return this.store.getAt(node.viewIndex); + }, + + + clearSelections : function(suppressEvent, skipUpdate){ + if(this.multiSelect || this.singleSelect){ + if(!skipUpdate){ + this.selected.removeClass(this.selectedClass); + } + this.selected.clear(); + this.last = false; + if(!suppressEvent){ + this.fireEvent("selectionchange", this, this.selected.elements); + } + } + }, + + + isSelected : function(node){ + return this.selected.contains(this.getNode(node)); + }, + + + deselect : function(node){ + if(this.isSelected(node)){ + var node = this.getNode(node); + this.selected.removeElement(node); + if(this.last == node.viewIndex){ + this.last = false; + } + Ext.fly(node).removeClass(this.selectedClass); + this.fireEvent("selectionchange", this, this.selected.elements); + } + }, + + + select : function(nodeInfo, keepExisting, suppressEvent){ + if(nodeInfo instanceof Array){ + if(!keepExisting){ + this.clearSelections(true); + } + for(var i = 0, len = nodeInfo.length; i < len; i++){ + this.select(nodeInfo[i], true, true); + } + } else{ + var node = this.getNode(nodeInfo); + if(!keepExisting){ + this.clearSelections(true); + } + if(node && !this.isSelected(node)){ + if(this.fireEvent("beforeselect", this, node, this.selected.elements) !== false){ + Ext.fly(node).addClass(this.selectedClass); + this.selected.add(node); + this.last = node.viewIndex; + if(!suppressEvent){ + this.fireEvent("selectionchange", this, this.selected.elements); + } + } + } + } + }, + + + selectRange : function(start, end, keepExisting){ + if(!keepExisting){ + this.clearSelections(true); + } + this.select(this.getNodes(start, end), true); + }, + + + getNode : function(nodeInfo){ + if(typeof nodeInfo == "string"){ + return document.getElementById(nodeInfo); + }else if(typeof nodeInfo == "number"){ + return this.all.elements[nodeInfo]; + } + return nodeInfo; + }, + + + getNodes : function(start, end){ + var ns = this.all.elements; + start = start || 0; + end = typeof end == "undefined" ? ns.length - 1 : end; + var nodes = [], i; + if(start <= end){ + for(i = start; i <= end; i++){ + nodes.push(ns[i]); + } + } else{ + for(i = start; i >= end; i--){ + nodes.push(ns[i]); + } + } + return nodes; + }, + + + indexOf : function(node){ + node = this.getNode(node); + if(typeof node.viewIndex == "number"){ + return node.viewIndex; + } + return this.all.indexOf(node); + }, + + + onBeforeLoad : function(){ + if(this.loadingText){ + this.clearSelections(false, true); + this.el.update('
'+this.loadingText+'
'); + this.all.clear(); + } + } +}); + +Ext.reg('dataview', Ext.DataView); + +Ext.ColorPalette = function(config){ + Ext.ColorPalette.superclass.constructor.call(this, config); + this.addEvents( + + 'select' + ); + + if(this.handler){ + this.on("select", this.handler, this.scope, true); + } +}; +Ext.extend(Ext.ColorPalette, Ext.Component, { + + itemCls : "x-color-palette", + + value : null, + clickEvent:'click', + ctype: "Ext.ColorPalette", + + + allowReselect : false, + + + colors : [ + "000000", "993300", "333300", "003300", "003366", "000080", "333399", "333333", + "800000", "FF6600", "808000", "008000", "008080", "0000FF", "666699", "808080", + "FF0000", "FF9900", "99CC00", "339966", "33CCCC", "3366FF", "800080", "969696", + "FF00FF", "FFCC00", "FFFF00", "00FF00", "00FFFF", "00CCFF", "993366", "C0C0C0", + "FF99CC", "FFCC99", "FFFF99", "CCFFCC", "CCFFFF", "99CCFF", "CC99FF", "FFFFFF" + ], + + onRender : function(container, position){ + var t = new Ext.XTemplate( + ' ' + ); + var el = document.createElement("div"); + el.className = this.itemCls; + t.overwrite(el, this.colors); + container.dom.insertBefore(el, position); + this.el = Ext.get(el); + this.el.on(this.clickEvent, this.handleClick, this, {delegate: "a"}); + if(this.clickEvent != 'click'){ + this.el.on('click', Ext.emptyFn, this, {delegate: "a", preventDefault:true}); + } + }, + + afterRender : function(){ + Ext.ColorPalette.superclass.afterRender.call(this); + if(this.value){ + var s = this.value; + this.value = null; + this.select(s); + } + }, + + handleClick : function(e, t){ + e.preventDefault(); + if(!this.disabled){ + var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1]; + this.select(c.toUpperCase()); + } + }, + + + select : function(color){ + color = color.replace("#", ""); + if(color != this.value || this.allowReselect){ + var el = this.el; + if(this.value){ + el.child("a.color-"+this.value).removeClass("x-color-palette-sel"); + } + el.child("a.color-"+color).addClass("x-color-palette-sel"); + this.value = color; + this.fireEvent("select", this, color); + } + } +}); +Ext.reg('colorpalette', Ext.ColorPalette); + +Ext.DatePicker = Ext.extend(Ext.Component, { + + todayText : "Today", + + okText : " OK ", + + cancelText : "Cancel", + + todayTip : "{0} (Spacebar)", + + minDate : null, + + maxDate : null, + + minText : "This date is before the minimum date", + + maxText : "This date is after the maximum date", + + format : "m/d/y", + + disabledDays : null, + + disabledDaysText : "", + + disabledDatesRE : null, + + disabledDatesText : "", + + constrainToViewport : true, + + 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, + + initComponent : function(){ + Ext.DatePicker.superclass.initComponent.call(this); + + this.value = this.value ? + this.value.clearTime() : new Date().clearTime(); + + this.addEvents( + + 'select' + ); + + if(this.handler){ + this.on("select", this.handler, this.scope || this); + } + + this.initDisabledDays(); + }, + + + initDisabledDays : function(){ + if(!this.disabledDatesRE && this.disabledDates){ + var dd = this.disabledDates; + var re = "(?:"; + for(var i = 0; i < dd.length; i++){ + re += dd[i]; + if(i != dd.length-1) re += "|"; + } + this.disabledDatesRE = new RegExp(re + ")"); + } + }, + + + setValue : function(value){ + var old = this.value; + this.value = value.clearTime(true); + if(this.el){ + this.update(this.value); + } + }, + + + getValue : function(){ + return this.value; + }, + + + focus : function(){ + if(this.el){ + this.update(this.activeDate); + } + }, + + + onRender : function(container, position){ + var m = [ + '', + '', + '
  
']; + var dn = this.dayNames; + for(var i = 0; i < 7; i++){ + var d = this.startDay+i; + if(d > 6){ + d = d-7; + } + m.push(""); + } + m[m.length] = ""; + for(var i = 0; i < 42; i++) { + if(i % 7 == 0 && i != 0){ + m[m.length] = ""; + } + m[m.length] = ''; + } + m[m.length] = '
", dn[d].substr(0,1), "
'; + + var el = document.createElement("div"); + el.className = "x-date-picker"; + el.innerHTML = m.join(""); + + container.dom.insertBefore(el, position); + + this.el = Ext.get(el); + this.eventEl = Ext.get(el.firstChild); + + new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"), { + handler: this.showPrevMonth, + scope: this, + preventDefault:true, + stopDefault:true + }); + + new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"), { + handler: this.showNextMonth, + scope: this, + preventDefault:true, + stopDefault:true + }); + + this.eventEl.on("mousewheel", this.handleMouseWheel, this); + + this.monthPicker = this.el.down('div.x-date-mp'); + this.monthPicker.enableDisplayMode('block'); + + var kn = new Ext.KeyNav(this.eventEl, { + "left" : function(e){ + e.ctrlKey ? + this.showPrevMonth() : + this.update(this.activeDate.add("d", -1)); + }, + + "right" : function(e){ + e.ctrlKey ? + this.showNextMonth() : + this.update(this.activeDate.add("d", 1)); + }, + + "up" : function(e){ + e.ctrlKey ? + this.showNextYear() : + this.update(this.activeDate.add("d", -7)); + }, + + "down" : function(e){ + e.ctrlKey ? + this.showPrevYear() : + this.update(this.activeDate.add("d", 7)); + }, + + "pageUp" : function(e){ + this.showNextMonth(); + }, + + "pageDown" : function(e){ + this.showPrevMonth(); + }, + + "enter" : function(e){ + e.stopPropagation(); + return true; + }, + + scope : this + }); + + this.eventEl.on("click", this.handleDateClick, this, {delegate: "a.x-date-date"}); + + this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday, this); + + this.el.unselectable(); + + this.cells = this.el.select("table.x-date-inner tbody td"); + this.textNodes = this.el.query("table.x-date-inner tbody span"); + + this.mbtn = new Ext.Button({ + text: " ", + tooltip: this.monthYearText, + renderTo: this.el.child("td.x-date-middle", true) + }); + + this.mbtn.on('click', this.showMonthPicker, this); + this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu"); + + + var today = (new Date()).dateFormat(this.format); + var todayBtn = new Ext.Button({ + renderTo: this.el.child("td.x-date-bottom", true), + text: String.format(this.todayText, today), + tooltip: String.format(this.todayTip, today), + handler: this.selectToday, + scope: this + }); + + if(Ext.isIE){ + this.el.repaint(); + } + this.update(this.value); + }, + + createMonthPicker : function(){ + if(!this.monthPicker.dom.firstChild){ + var buf = ['']; + for(var i = 0; i < 6; i++){ + buf.push( + '', + '', + i == 0 ? + '' : + '' + ); + } + buf.push( + '', + '
', this.monthNames[i].substr(0, 3), '', this.monthNames[i+6].substr(0, 3), '
' + ); + this.monthPicker.update(buf.join('')); + this.monthPicker.on('click', this.onMonthClick, this); + this.monthPicker.on('dblclick', this.onMonthDblClick, this); + + this.mpMonths = this.monthPicker.select('td.x-date-mp-month'); + this.mpYears = this.monthPicker.select('td.x-date-mp-year'); + + this.mpMonths.each(function(m, a, i){ + i += 1; + if((i%2) == 0){ + m.dom.xmonth = 5 + Math.round(i * .5); + }else{ + m.dom.xmonth = Math.round((i-1) * .5); + } + }); + } + }, + + showMonthPicker : function(){ + this.createMonthPicker(); + var size = this.el.getSize(); + this.monthPicker.setSize(size); + this.monthPicker.child('table').setSize(size); + + this.mpSelMonth = (this.activeDate || this.value).getMonth(); + this.updateMPMonth(this.mpSelMonth); + this.mpSelYear = (this.activeDate || this.value).getFullYear(); + this.updateMPYear(this.mpSelYear); + + this.monthPicker.slideIn('t', {duration:.2}); + }, + + updateMPYear : function(y){ + this.mpyear = y; + var ys = this.mpYears.elements; + for(var i = 1; i <= 10; i++){ + var td = ys[i-1], y2; + if((i%2) == 0){ + y2 = y + Math.round(i * .5); + td.firstChild.innerHTML = y2; + td.xyear = y2; + }else{ + y2 = y - (5-Math.round(i * .5)); + td.firstChild.innerHTML = y2; + td.xyear = y2; + } + this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel'); + } + }, + + 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; + if(el.is('button.x-date-mp-cancel')){ + this.hideMonthPicker(); + } + else if(el.is('button.x-date-mp-ok')){ + this.update(new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + else if(pn = el.up('td.x-date-mp-month', 2)){ + this.mpMonths.removeClass('x-date-mp-sel'); + pn.addClass('x-date-mp-sel'); + this.mpSelMonth = pn.dom.xmonth; + } + else if(pn = el.up('td.x-date-mp-year', 2)){ + this.mpYears.removeClass('x-date-mp-sel'); + pn.addClass('x-date-mp-sel'); + this.mpSelYear = pn.dom.xyear; + } + else if(el.is('a.x-date-mp-prev')){ + this.updateMPYear(this.mpyear-10); + } + else if(el.is('a.x-date-mp-next')){ + this.updateMPYear(this.mpyear+10); + } + }, + + onMonthDblClick : function(e, t){ + e.stopEvent(); + var el = new Ext.Element(t), pn; + if(pn = el.up('td.x-date-mp-month', 2)){ + this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + else if(pn = el.up('td.x-date-mp-year', 2)){ + this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + }, + + hideMonthPicker : function(disableAnim){ + if(this.monthPicker){ + if(disableAnim === true){ + this.monthPicker.hide(); + }else{ + this.monthPicker.slideOut('t', {duration:.2}); + } + } + }, + + + 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){ + var delta = e.getWheelDelta(); + if(delta > 0){ + this.showPrevMonth(); + e.stopEvent(); + } else if(delta < 0){ + this.showNextMonth(); + e.stopEvent(); + } + }, + + + handleDateClick : function(e, t){ + e.stopEvent(); + if(t.dateValue && !Ext.fly(t.parentNode).hasClass("x-date-disabled")){ + this.setValue(new Date(t.dateValue)); + this.fireEvent("select", this, this.value); + } + }, + + + selectToday : function(){ + this.setValue(new Date().clearTime()); + this.fireEvent("select", this, this.value); + }, + + + update : function(date){ + var vd = this.activeDate; + this.activeDate = date; + if(vd && this.el){ + var t = date.getTime(); + if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){ + this.cells.removeClass("x-date-selected"); + this.cells.each(function(c){ + if(c.dom.firstChild.dateValue == t){ + c.addClass("x-date-selected"); + setTimeout(function(){ + try{c.dom.firstChild.focus();}catch(e){} + }, 50); + return false; + } + }); + return; + } + } + var days = date.getDaysInMonth(); + var firstOfMonth = date.getFirstDateOfMonth(); + var startingPos = firstOfMonth.getDay()-this.startDay; + + if(startingPos <= this.startDay){ + startingPos += 7; + } + + var pm = date.add("mo", -1); + var prevStart = pm.getDaysInMonth()-startingPos; + + var cells = this.cells.elements; + var textEls = this.textNodes; + days += startingPos; + + + var day = 86400000; + var d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime(); + var today = new Date().clearTime().getTime(); + var sel = date.clearTime().getTime(); + var min = this.minDate ? this.minDate.clearTime() : Number.NEGATIVE_INFINITY; + var max = this.maxDate ? this.maxDate.clearTime() : Number.POSITIVE_INFINITY; + var ddMatch = this.disabledDatesRE; + var ddText = this.disabledDatesText; + var ddays = this.disabledDays ? this.disabledDays.join("") : false; + var ddaysText = this.disabledDaysText; + var format = this.format; + + var setCellClass = function(cal, cell){ + cell.title = ""; + var t = d.getTime(); + cell.firstChild.dateValue = t; + if(t == today){ + cell.className += " x-date-today"; + cell.title = cal.todayText; + } + if(t == sel){ + cell.className += " x-date-selected"; + setTimeout(function(){ + try{cell.firstChild.focus();}catch(e){} + }, 50); + } + + if(t < min) { + cell.className = " x-date-disabled"; + cell.title = cal.minText; + return; + } + if(t > max) { + cell.className = " x-date-disabled"; + cell.title = cal.maxText; + return; + } + if(ddays){ + if(ddays.indexOf(d.getDay()) != -1){ + cell.title = ddaysText; + cell.className = " x-date-disabled"; + } + } + if(ddMatch && format){ + var fvalue = d.dateFormat(format); + if(ddMatch.test(fvalue)){ + cell.title = ddText.replace("%0", fvalue); + cell.className = " x-date-disabled"; + } + } + }; + + var i = 0; + for(; i < startingPos; i++) { + textEls[i].innerHTML = (++prevStart); + d.setDate(d.getDate()+1); + cells[i].className = "x-date-prevday"; + setCellClass(this, cells[i]); + } + for(; i < days; i++){ + intDay = i - startingPos + 1; + textEls[i].innerHTML = (intDay); + d.setDate(d.getDate()+1); + cells[i].className = "x-date-active"; + setCellClass(this, cells[i]); + } + var extraDays = 0; + for(; i < 42; i++) { + textEls[i].innerHTML = (++extraDays); + d.setDate(d.getDate()+1); + cells[i].className = "x-date-nextday"; + setCellClass(this, cells[i]); + } + + this.mbtn.setText(this.monthNames[date.getMonth()] + " " + date.getFullYear()); + + if(!this.internalRender){ + var main = this.el.dom.firstChild; + var w = main.offsetWidth; + 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; + this.update.defer(10, this, [date]); + } + } + } +}); +Ext.reg('datepicker', Ext.DatePicker); + +Ext.TabPanel = Ext.extend(Ext.Panel, { + + + monitorResize : true, + + deferredRender : true, + + tabWidth: 120, + + minTabWidth: 30, + + resizeTabs:false, + + enableTabScroll: false, + + scrollIncrement : 0, + + scrollRepeatInterval : 400, + + scrollDuration : .35, + + animScroll : true, + + tabPosition: 'top', + + baseCls: 'x-tab-panel', + + autoTabs : false, + + autoTabSelector:'div.x-tab', + itemCls : 'x-tab-item', + + activeTab : null, + + tabMargin : 2, + + plain: false, + + + wheelIncrement : 20, + + 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({ + deferredRender: this.deferredRender + })); + if(this.tabPosition == 'top'){ + this.elements += ',header'; + this.stripTarget = 'header'; + }else { + this.elements += ',footer'; + this.stripTarget = 'footer'; + } + if(!this.stack){ + this.stack = Ext.TabPanel.AccessStack(); + } + this.initItems(); + }, + + render : function(){ + Ext.TabPanel.superclass.render.apply(this, arguments); + if(this.activeTab !== undefined){ + var item = this.activeTab; + delete this.activeTab; + this.setActiveTab(item); + } + }, + + onRender : function(ct, position){ + Ext.TabPanel.superclass.onRender.call(this, ct, position); + + if(this.plain){ + var pos = this.tabPosition == 'top' ? 'header' : 'footer'; + this[pos].addClass('x-tab-panel-'+pos+'-plain'); + } + + var st = this[this.stripTarget]; + + this.stripWrap = st.createChild({cls:'x-tab-strip-wrap', cn:{ + tag:'ul', cls:'x-tab-strip x-tab-strip-'+this.tabPosition}}); + this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}); + this.strip = new Ext.Element(this.stripWrap.dom.firstChild); + + this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge'}); + this.strip.createChild({cls:'x-clear'}); + + this.body.addClass('x-tab-panel-body-'+this.tabPosition); + + if(!this.itemTpl){ + var tt = new Ext.Template( + '
  • ', + '', + '{text}', + '
  • ' + ); + tt.disableFormats = true; + tt.compile(); + Ext.TabPanel.prototype.itemTpl = tt; + } + + this.items.each(this.initTab, this); + }, + + afterRender : function(){ + Ext.TabPanel.superclass.afterRender.call(this); + if(this.autoTabs){ + this.readTabs(false); + } + }, + + initEvents : function(){ + Ext.TabPanel.superclass.initEvents.call(this); + this.on('add', this.onAdd, this); + this.on('remove', this.onRemove, this); + + this.strip.on('mousedown', this.onStripMouseDown, this); + this.strip.on('click', this.onStripClick, this); + this.strip.on('contextmenu', this.onStripContextMenu, this); + if(this.enableTabScroll){ + this.strip.on('mousewheel', this.onWheel, this); + } + }, + + findTargets : function(e){ + var item = null; + var itemEl = e.getTarget('li', this.strip); + if(itemEl){ + item = this.getComponent(itemEl.id.split('__')[1]); + if(item.disabled){ + return { + close : null, + item : null, + el : null + }; + } + } + return { + close : e.getTarget('.x-tab-strip-close', this.strip), + item : item, + el : itemEl + }; + }, + + onStripMouseDown : function(e){ + e.preventDefault(); + if(e.button != 0){ + return; + } + var t = this.findTargets(e); + if(t.close){ + this.remove(t.item); + return; + } + if(t.item && t.item != this.activeTab){ + this.setActiveTab(t.item); + } + }, + + onStripClick : function(e){ + var t = this.findTargets(e); + if(!t.close && t.item && t.item != this.activeTab){ + this.setActiveTab(t.item); + } + }, + + onStripContextMenu : function(e){ + e.preventDefault(); + var t = this.findTargets(e); + if(t.item){ + this.fireEvent('contextmenu', this, t.item, e); + } + }, + + + readTabs : function(removeExisting){ + if(removeExisting === true){ + this.items.each(function(item){ + this.remove(item); + }, this); + } + var tabs = this.el.query(this.autoTabSelector); + for(var i = 0, len = tabs.length; i < len; i++){ + var tab = tabs[i]; + var title = tab.getAttribute('title'); + tab.removeAttribute('title'); + this.add({ + title: title, + el: tab + }); + } + }, + + initTab : function(item, index){ + var before = this.strip.dom.childNodes[index]; + var cls = item.closable ? 'x-tab-strip-closable' : ''; + if(item.disabled){ + cls += ' x-item-disabled'; + } + if(item.iconCls){ + cls += ' x-tab-with-icon'; + } + var p = { + id: this.id + '__' + item.getItemId(), + text: item.title, + cls: cls, + iconCls: item.iconCls || '' + }; + var el = before ? + this.itemTpl.insertBefore(before, p) : + this.itemTpl.append(this.strip, p); + + Ext.fly(el).addClassOnOver('x-tab-strip-over'); + + if(item.tabTip){ + Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip; + } + item.on('disable', this.onItemDisabled, this); + item.on('enable', this.onItemEnabled, this); + item.on('titlechange', this.onItemTitleChanged, this); + item.on('beforeshow', this.onBeforeShowItem, this); + }, + + onAdd : function(tp, item, index){ + this.initTab(item, index); + if(this.items.getCount() == 1){ + this.syncSize(); + } + this.delegateUpdates(); + }, + + onBeforeAdd : function(item){ + var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item); + if(existing){ + this.setActiveTab(item); + return false; + } + Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments); + var es = item.elements; + item.elements = es ? es.replace(',header', '') : es; + item.border = (item.border === true); + }, + + onRemove : function(tp, item){ + Ext.removeNode(this.getTabEl(item)); + this.stack.remove(item); + if(item == this.activeTab){ + var next = this.stack.next(); + if(next){ + this.setActiveTab(next); + }else{ + this.setActiveTab(0); + } + } + this.delegateUpdates(); + }, + + onBeforeShowItem : function(item){ + if(item != this.activeTab){ + this.setActiveTab(item); + return false; + } + }, + + onItemDisabled : function(item){ + var el = this.getTabEl(item); + if(el){ + Ext.fly(el).addClass('x-item-disabled'); + } + this.stack.remove(item); + }, + + onItemEnabled : function(item){ + var el = this.getTabEl(item); + if(el){ + Ext.fly(el).removeClass('x-item-disabled'); + } + }, + + onItemTitleChanged : function(item){ + var el = this.getTabEl(item); + if(el){ + Ext.fly(el).child('span.x-tab-strip-text', true).innerHTML = item.title; + } + }, + + + getTabEl : function(item){ + return document.getElementById(this.id+'__'+item.getItemId()); + }, + + 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); + if(el){ + el.style.display = 'none'; + this.delegateUpdates(); + } + }, + + + unhideTabStripItem : function(item){ + item = this.getComponent(item); + var el = this.getTabEl(item); + if(el){ + el.style.display = ''; + this.delegateUpdates(); + } + }, + + delegateUpdates : function(){ + if(this.suspendUpdates){ + return; + } + if(this.resizeTabs && this.rendered){ + this.autoSizeTabs(); + } + if(this.enableTabScroll && this.rendered){ + this.autoScrollTabs(); + } + }, + + autoSizeTabs : function(){ + var count = this.items.length; + var ce = this.tabPosition != 'bottom' ? 'header' : 'footer'; + var ow = this[ce].dom.offsetWidth; + var aw = this[ce].dom.clientWidth; + + if(!this.resizeTabs || count < 1 || !aw){ return; + } + + var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); this.lastTabWidth = each; + var lis = this.stripWrap.dom.getElementsByTagName('li'); + for(var i = 0, len = lis.length-1; i < len; i++) { var li = lis[i]; + var inner = li.childNodes[1].firstChild.firstChild; + var tw = li.offsetWidth; + var iw = inner.offsetWidth; + inner.style.width = (each - (tw-iw)) + 'px'; + } + }, + + adjustBodyWidth : function(w){ + if(this.header){ + this.header.setWidth(w); + } + if(this.footer){ + this.footer.setWidth(w); + } + return w; + }, + + + setActiveTab : function(item){ + item = this.getComponent(item); + if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){ + return; + } + if(!this.rendered){ + this.activeTab = item; + return; + } + if(this.activeTab != item){ + if(this.activeTab){ + var oldEl = this.getTabEl(this.activeTab); + if(oldEl){ + Ext.fly(oldEl).removeClass('x-tab-strip-active'); + } + this.activeTab.fireEvent('deactivate', this.activeTab); + } + var el = this.getTabEl(item); + Ext.fly(el).addClass('x-tab-strip-active'); + this.activeTab = item; + this.stack.add(item); + + this.layout.setActiveItem(item); + if(this.layoutOnTabChange && item.doLayout){ + item.doLayout(); + } + if(this.scrolling){ + this.scrollToTab(item, this.animScroll); + } + + item.fireEvent('activate', item); + this.fireEvent('tabchange', this, item); + } + }, + + + getActiveTab : function(){ + return this.activeTab || null; + }, + + + getItem : function(item){ + return this.getComponent(item); + }, + + autoScrollTabs : function(){ + var count = this.items.length; + var ow = this.header.dom.offsetWidth; + var tw = this.header.dom.clientWidth; + + var wrap = this.stripWrap; + var cw = wrap.dom.offsetWidth; + var pos = this.getScrollPos(); + var l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos; + + if(!this.enableTabScroll || count < 1 || cw < 20){ return; + } + if(l <= tw){ + wrap.dom.scrollLeft = 0; + wrap.setWidth(tw); + if(this.scrolling){ + this.scrolling = false; + this.header.removeClass('x-tab-scrolling'); + this.scrollLeft.hide(); + this.scrollRight.hide(); + } + }else{ + if(!this.scrolling){ + this.header.addClass('x-tab-scrolling'); + } + tw -= wrap.getMargins('lr'); + wrap.setWidth(tw > 20 ? tw : 20); + if(!this.scrolling){ + if(!this.scrollLeft){ + this.createScrollers(); + }else{ + this.scrollLeft.show(); + this.scrollRight.show(); + } + } + this.scrolling = true; + if(pos > (l-tw)){ wrap.dom.scrollLeft = l-tw; + }else{ this.scrollToTab(this.activeTab, false); + } + this.updateScrollButtons(); + } + }, + + createScrollers : function(){ + var h = this.stripWrap.dom.offsetHeight; + + var sl = this.header.insertFirst({ + cls:'x-tab-scroller-left' + }); + sl.setHeight(h); + sl.addClassOnOver('x-tab-scroller-left-over'); + this.leftRepeater = new Ext.util.ClickRepeater(sl, { + interval : this.scrollRepeatInterval, + handler: this.onScrollLeft, + scope: this + }); + this.scrollLeft = sl; + + var sr = this.header.insertFirst({ + cls:'x-tab-scroller-right' + }); + sr.setHeight(h); + sr.addClassOnOver('x-tab-scroller-right-over'); + this.rightRepeater = new Ext.util.ClickRepeater(sr, { + interval : this.scrollRepeatInterval, + handler: this.onScrollRight, + scope: this + }); + 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){ return; } + var el = this.getTabEl(item); + var pos = this.getScrollPos(), area = this.getScrollArea(); + var left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos; + var right = left + el.offsetWidth; + if(left < pos){ + this.scrollTo(left, animate); + }else if(right > (pos + area)){ + this.scrollTo(right - area, animate); + } + }, + + scrollTo : function(pos, animate){ + this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false); + if(!animate){ + this.updateScrollButtons(); + } + }, + + onWheel : function(e){ + var d = e.getWheelDelta()*this.wheelIncrement*-1; + e.stopEvent(); + + var pos = this.getScrollPos(); + var newpos = pos + d; + var sw = this.getScrollWidth()-this.getScrollArea(); + + var s = Math.max(0, Math.min(sw, newpos)); + if(s != pos){ + this.scrollTo(s, false); + } + }, + + onScrollRight : function(){ + var sw = this.getScrollWidth()-this.getScrollArea(); + var pos = this.getScrollPos(); + var s = Math.min(sw, pos + this.getScrollIncrement()); + if(s != pos){ + this.scrollTo(s, this.animScroll); + } + }, + + onScrollLeft : function(){ + var pos = this.getScrollPos(); + var s = Math.max(0, pos - this.getScrollIncrement()); + if(s != pos){ + this.scrollTo(s, this.animScroll); + } + }, + + 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'); + } + + + + + +}); +Ext.reg('tabpanel', Ext.TabPanel); + + +Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab; + +Ext.TabPanel.AccessStack = function(){ + var items = []; + return { + add : function(item){ + items.push(item); + if(items.length > 10){ + items.shift(); + } + }, + + remove : function(item){ + var s = []; + for(var i = 0, len = items.length; i < len; i++) { + if(items[i] != item){ + s.push(items[i]); + } + } + items = s; + }, + + next : function(){ + return items.pop(); + } + }; +}; + + + +Ext.Button = Ext.extend(Ext.Component, { + + hidden : false, + + disabled : false, + + pressed : false, + + + + + enableToggle: false, + + + menuAlign : "tl-bl?", + + + + type : 'button', + + + menuClassTarget: 'tr', + + + clickEvent : 'click', + + + handleMouseEvents : true, + + + tooltipType : 'qtip', + + buttonSelector : "button:first", + + + + + initComponent : function(){ + Ext.Button.superclass.initComponent.call(this); + + this.addEvents( + + "click", + + "toggle", + + 'mouseover', + + 'mouseout', + + 'menushow', + + 'menuhide', + + 'menutriggerover', + + 'menutriggerout' + ); + if(this.menu){ + this.menu = Ext.menu.MenuMgr.get(this.menu); + } + if(typeof this.toggleGroup === 'string'){ + this.enableToggle = true; + } + }, + + + onRender : function(ct, position){ + if(!this.template){ + if(!Ext.Button.buttonTemplate){ + + Ext.Button.buttonTemplate = new Ext.Template( + '', + '', + "
      
    "); + } + this.template = Ext.Button.buttonTemplate; + } + var btn, targs = [this.text || ' ', this.type]; + + if(position){ + btn = this.template.insertBefore(position, targs, true); + }else{ + btn = this.template.append(ct, targs, true); + } + var btnEl = btn.child(this.buttonSelector); + btnEl.on('focus', this.onFocus, this); + btnEl.on('blur', this.onBlur, this); + + this.initButtonEl(btn, btnEl); + + if(this.menu){ + this.el.child(this.menuClassTarget).addClass("x-btn-with-menu"); + } + Ext.ButtonToggleMgr.register(this); + }, + + + initButtonEl : function(btn, btnEl){ + + this.el = btn; + btn.addClass("x-btn"); + + if(this.icon){ + btnEl.setStyle('background-image', 'url(' +this.icon +')'); + } + if(this.iconCls){ + btnEl.addClass(this.iconCls); + if(!this.cls){ + btn.addClass(this.text ? 'x-btn-text-icon' : 'x-btn-icon'); + } + } + if(this.tabIndex !== undefined){ + btnEl.dom.tabIndex = this.tabIndex; + } + if(this.tooltip){ + if(typeof this.tooltip == 'object'){ + Ext.QuickTips.register(Ext.apply({ + target: btnEl.id + }, this.tooltip)); + } else { + btnEl.dom[this.tooltipType] = this.tooltip; + } + } + + if(this.pressed){ + this.el.addClass("x-btn-pressed"); + } + + if(this.handleMouseEvents){ + btn.on("mouseover", this.onMouseOver, this); + + + btn.on("mousedown", this.onMouseDown, this); + } + + if(this.menu){ + this.menu.on("show", this.onMenuShow, this); + this.menu.on("hide", this.onMenuHide, this); + } + + if(this.id){ + this.el.dom.id = this.el.id = this.id; + } + + if(this.repeat){ + var repeater = new Ext.util.ClickRepeater(btn, + typeof this.repeat == "object" ? this.repeat : {} + ); + repeater.on("click", this.onClick, this); + } + + btn.on(this.clickEvent, this.onClick, this); + }, + + + afterRender : function(){ + Ext.Button.superclass.afterRender.call(this); + if(Ext.isIE6){ + this.autoWidth.defer(1, this); + }else{ + this.autoWidth(); + } + }, + + + setIconClass : function(cls){ + if(this.el){ + this.el.child(this.buttonSelector).replaceClass(this.iconCls, cls); + } + this.iconCls = cls; + }, + + + beforeDestroy: function(){ + var btn = this.el.child(this.buttonSelector); + if(btn){ + btn.removeAllListeners(); + } + if(this.menu){ + Ext.destroy(this.menu); + } + }, + + + onDestroy : function(){ + if(this.rendered){ + Ext.ButtonToggleMgr.unregister(this); + } + }, + + + autoWidth : function(){ + if(this.el){ + this.el.setWidth("auto"); + if(Ext.isIE7 && Ext.isStrict){ + var ib = this.el.child(this.buttonSelector); + if(ib && ib.getWidth() > 20){ + ib.clip(); + ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr')); + } + } + if(this.minWidth){ + if(this.el.getWidth() < this.minWidth){ + this.el.setWidth(this.minWidth); + } + } + } + }, + + + setHandler : function(handler, scope){ + this.handler = handler; + this.scope = scope; + }, + + + setText : function(text){ + this.text = text; + if(this.el){ + this.el.child("td.x-btn-center " + this.buttonSelector).update(text); + } + this.autoWidth(); + }, + + + getText : function(){ + return this.text; + }, + + + toggle : function(state){ + state = state === undefined ? !this.pressed : state; + if(state != this.pressed){ + if(state){ + this.el.addClass("x-btn-pressed"); + this.pressed = true; + this.fireEvent("toggle", this, true); + }else{ + this.el.removeClass("x-btn-pressed"); + this.pressed = false; + this.fireEvent("toggle", this, false); + } + if(this.toggleHandler){ + this.toggleHandler.call(this.scope || this, this, state); + } + } + }, + + + focus : function(){ + this.el.child(this.buttonSelector).focus(); + }, + + + onDisable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.addClass("x-item-disabled"); + } + this.el.dom.disabled = true; + } + this.disabled = true; + }, + + + onEnable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.removeClass("x-item-disabled"); + } + this.el.dom.disabled = false; + } + this.disabled = false; + }, + + + showMenu : function(){ + if(this.menu){ + this.menu.show(this.el, this.menuAlign); + } + return this; + }, + + + hideMenu : function(){ + if(this.menu){ + this.menu.hide(); + } + return this; + }, + + + hasVisibleMenu : function(){ + return this.menu && this.menu.isVisible(); + }, + + + onClick : function(e){ + if(e){ + e.preventDefault(); + } + if(e.button != 0){ + return; + } + if(!this.disabled){ + if(this.enableToggle && (this.allowDepress !== false || !this.pressed)){ + this.toggle(); + } + if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ + this.showMenu(); + } + this.fireEvent("click", this, e); + if(this.handler){ + + this.handler.call(this.scope || this, this, e); + } + } + }, + + + 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); + if(!internal){ + this.el.addClass("x-btn-over"); + Ext.getDoc().on('mouseover', this.monitorMouseOver, this); + this.fireEvent('mouseover', this, e); + } + if(this.isMenuTriggerOver(e, internal)){ + this.fireEvent('menutriggerover', this, this.menu, e); + } + } + }, + + + monitorMouseOver : function(e){ + if(e.target != this.el.dom && !e.within(this.el)){ + Ext.getDoc().un('mouseover', this.monitorMouseOver, this); + this.onMouseOut(e); + } + }, + + + onMouseOut : function(e){ + var internal = e.within(this.el) && e.target != this.el.dom; + this.el.removeClass("x-btn-over"); + this.fireEvent('mouseout', this, e); + if(this.isMenuTriggerOut(e), internal){ + this.fireEvent('menutriggerout', this, this.menu, e); + } + }, + + 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"); + Ext.getDoc().on('mouseup', this.onMouseUp, this); + } + }, + + onMouseUp : function(e){ + if(e.button == 0){ + this.getClickEl(e, true).removeClass("x-btn-click"); + Ext.getDoc().un('mouseup', this.onMouseUp, this); + } + }, + + onMenuShow : function(e){ + this.ignoreNextClick = 0; + this.el.addClass("x-btn-menu-active"); + this.fireEvent('menushow', this, this.menu); + }, + + onMenuHide : function(e){ + this.el.removeClass("x-btn-menu-active"); + this.ignoreNextClick = this.restoreClick.defer(250, this); + this.fireEvent('menuhide', this, this.menu); + }, + + + restoreClick : function(){ + this.ignoreNextClick = 0; + } +}); +Ext.reg('button', Ext.Button); + + +Ext.ButtonToggleMgr = function(){ + var groups = {}; + + function toggleGroup(btn, state){ + if(state){ + var g = groups[btn.toggleGroup]; + for(var i = 0, l = g.length; i < l; i++){ + if(g[i] != btn){ + g[i].toggle(false); + } + } + } + } + + return { + register : function(btn){ + if(!btn.toggleGroup){ + return; + } + var g = groups[btn.toggleGroup]; + if(!g){ + g = groups[btn.toggleGroup] = []; + } + g.push(btn); + btn.on("toggle", toggleGroup); + }, + + unregister : function(btn){ + if(!btn.toggleGroup){ + return; + } + var g = groups[btn.toggleGroup]; + if(g){ + g.remove(btn); + btn.un("toggle", toggleGroup); + } + } + }; +}(); + +Ext.SplitButton = Ext.extend(Ext.Button, { + arrowSelector : 'button:last', + + initComponent : function(){ + Ext.SplitButton.superclass.initComponent.call(this); + + this.addEvents("arrowclick"); + }, + + onRender : function(ct, position){ + + var tpl = new Ext.Template( + '
    ', + '', + '', + "
     
    ", + '', + '', + "
     
    " + ); + var btn, targs = [this.text || ' ', this.type]; + if(position){ + btn = tpl.insertBefore(position, targs, true); + }else{ + btn = tpl.append(ct, targs, true); + } + var btnEl = btn.child(this.buttonSelector); + + this.initButtonEl(btn, btnEl); + this.arrowBtnTable = btn.child("table:last"); + if(this.arrowTooltip){ + btn.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip; + } + }, + + + autoWidth : function(){ + if(this.el){ + var tbl = this.el.child("table:first"); + var tbl2 = this.el.child("table:last"); + this.el.setWidth("auto"); + tbl.setWidth("auto"); + if(Ext.isIE7 && Ext.isStrict){ + var ib = this.el.child(this.buttonSelector); + if(ib && ib.getWidth() > 20){ + ib.clip(); + ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr')); + } + } + if(this.minWidth){ + if((tbl.getWidth()+tbl2.getWidth()) < this.minWidth){ + tbl.setWidth(this.minWidth-tbl2.getWidth()); + } + } + this.el.setWidth(tbl.getWidth()+tbl2.getWidth()); + } + }, + + + setArrowHandler : function(handler, scope){ + this.arrowHandler = handler; + this.scope = scope; + }, + + + onClick : function(e){ + e.preventDefault(); + if(!this.disabled){ + if(e.getTarget(".x-btn-menu-arrow-wrap")){ + if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ + this.showMenu(); + } + this.fireEvent("arrowclick", this, e); + if(this.arrowHandler){ + this.arrowHandler.call(this.scope || this, this, e); + } + }else{ + if(this.enableToggle){ + this.toggle(); + } + this.fireEvent("click", this, e); + if(this.handler){ + this.handler.call(this.scope || this, this, e); + } + } + } + }, + + getClickEl : function(e, isUp){ + if(!isUp){ + return (this.lastClickEl = e.getTarget("table", 10, true)); + } + return this.lastClickEl; + }, + + onDisable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.addClass("x-item-disabled"); + } + this.el.child(this.buttonSelector).dom.disabled = true; + this.el.child(this.arrowSelector).dom.disabled = true; + } + this.disabled = true; + }, + + onEnable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.removeClass("x-item-disabled"); + } + this.el.child(this.buttonSelector).dom.disabled = false; + this.el.child(this.arrowSelector).dom.disabled = false; + } + this.disabled = false; + }, + + isMenuTriggerOver : function(e){ + return this.menu && e.within(this.arrowBtnTable) && !e.within(this.arrowBtnTable, true); + }, + + isMenuTriggerOut : function(e, internal){ + return this.menu && !e.within(this.arrowBtnTable); + }, + + onDestroy : function(){ + Ext.destroy(this.arrowBtnTable); + Ext.SplitButton.superclass.onDestroy.call(this); + } +}); + + +Ext.MenuButton = Ext.SplitButton; + + +Ext.reg('splitbutton', Ext.SplitButton); + +Ext.CycleButton = Ext.extend(Ext.SplitButton, { + + + + + + + getItemText : function(item){ + if(item && this.showText === true){ + var text = ''; + if(this.prependText){ + text += this.prependText; + } + text += item.text; + return text; + } + return undefined; + }, + + + setActiveItem : function(item, suppressEvent){ + if(item){ + if(!this.rendered){ + this.text = this.getItemText(item); + this.iconCls = item.iconCls; + }else{ + var t = this.getItemText(item); + if(t){ + this.setText(t); + } + this.setIconClass(item.iconCls); + } + this.activeItem = item; + if(!suppressEvent){ + this.fireEvent('change', this, item); + } + } + }, + + + getActiveItem : function(){ + return this.activeItem; + }, + + + initComponent : function(){ + this.addEvents( + + "change" + ); + + if(this.changeHandler){ + this.on('change', this.changeHandler, this.scope||this); + delete this.changeHandler; + } + + this.itemCount = this.items.length; + + this.menu = {cls:'x-cycle-menu', items:[]}; + var checked; + for(var i = 0, len = this.itemCount; i < len; i++){ + var item = this.items[i]; + item.group = item.group || this.id; + item.itemIndex = i; + item.checkHandler = this.checkHandler; + item.scope = this; + item.checked = item.checked || false; + this.menu.items.push(item); + if(item.checked){ + checked = item; + } + } + this.setActiveItem(checked, true); + Ext.CycleButton.superclass.initComponent.call(this); + + this.on('click', this.toggleSelected, this); + }, + + + checkHandler : function(item, pressed){ + if(pressed){ + this.setActiveItem(item); + } + }, + + + toggleSelected : function(){ + this.menu.render(); + + var nextIdx, checkItem; + for (var i = 1; i < this.itemCount; i++) { + nextIdx = (this.activeItem.itemIndex + i) % this.itemCount; + + checkItem = this.menu.items.itemAt(nextIdx); + + if (!checkItem.disabled) { + checkItem.setChecked(true); + break; + } + } + } +}); +Ext.reg('cycle', Ext.CycleButton); + + Ext.Toolbar = function(config){ + if(config instanceof Array){ + config = {buttons:config}; + } + Ext.Toolbar.superclass.constructor.call(this, config); +}; + +(function(){ + +var T = Ext.Toolbar; + +Ext.extend(T, Ext.BoxComponent, { + + trackMenus : true, + + + initComponent : function(){ + T.superclass.initComponent.call(this); + + if(this.items){ + this.buttons = this.items; + } + this.items = new Ext.util.MixedCollection(false, function(o){ + return o.itemId || o.id || Ext.id(); + }); + }, + + + autoCreate: { + cls:'x-toolbar x-small-editor', + html:'
    ' + }, + + + onRender : function(ct, position){ + this.el = ct.createChild(this.autoCreate, position); + this.tr = this.el.child("tr", true); + }, + + + afterRender : function(){ + T.superclass.afterRender.call(this); + if(this.buttons){ + this.add.apply(this, this.buttons); + delete this.buttons; + } + }, + + + add : function(){ + var a = arguments, l = a.length; + for(var i = 0; i < l; i++){ + var el = a[i]; + if(el.isFormField){ + this.addField(el); + }else if(el.render){ + this.addItem(el); + }else if(typeof el == "string"){ + if(el == "separator" || el == "-"){ + this.addSeparator(); + }else if(el == " "){ + this.addSpacer(); + }else if(el == "->"){ + this.addFill(); + }else{ + this.addText(el); + } + }else if(el.tagName){ + this.addElement(el); + }else if(typeof el == "object"){ + if(el.xtype){ + this.addField(Ext.ComponentMgr.create(el, 'button')); + }else{ + this.addButton(el); + } + } + } + }, + + + addSeparator : function(){ + return this.addItem(new T.Separator()); + }, + + + addSpacer : function(){ + return this.addItem(new T.Spacer()); + }, + + + addFill : function(){ + return this.addItem(new T.Fill()); + }, + + + addElement : function(el){ + return this.addItem(new T.Item(el)); + }, + + + addItem : function(item){ + var td = this.nextBlock(); + this.initMenuTracking(item); + item.render(td); + this.items.add(item); + return item; + }, + + + addButton : function(config){ + if(config instanceof Array){ + var buttons = []; + for(var i = 0, len = config.length; i < len; i++) { + buttons.push(this.addButton(config[i])); + } + return buttons; + } + var b = config; + if(!(config instanceof T.Button)){ + b = config.split ? + new T.SplitButton(config) : + new T.Button(config); + } + var td = this.nextBlock(); + this.initMenuTracking(b); + b.render(td); + this.items.add(b); + return b; + }, + + + initMenuTracking : function(item){ + if(this.trackMenus && item.menu){ + item.on({ + 'menutriggerover' : this.onButtonTriggerOver, + 'menushow' : this.onButtonMenuShow, + 'menuhide' : this.onButtonMenuHide, + scope: this + }) + } + }, + + + addText : function(text){ + return this.addItem(new T.TextItem(text)); + }, + + + insertButton : function(index, item){ + if(item instanceof Array){ + var buttons = []; + for(var i = 0, len = item.length; i < len; i++) { + buttons.push(this.insertButton(index + i, item[i])); + } + return buttons; + } + if (!(item instanceof T.Button)){ + item = new T.Button(item); + } + var td = document.createElement("td"); + this.tr.insertBefore(td, this.tr.childNodes[index]); + this.initMenuTracking(item); + item.render(td); + this.items.insert(index, item); + return item; + }, + + + addDom : function(config, returnEl){ + var td = this.nextBlock(); + Ext.DomHelper.overwrite(td, config); + var ti = new T.Item(td.firstChild); + ti.render(td); + this.items.add(ti); + return ti; + }, + + + addField : function(field){ + var td = this.nextBlock(); + field.render(td); + var ti = new T.Item(td.firstChild); + ti.render(td); + this.items.add(ti); + return ti; + }, + + + nextBlock : function(){ + var td = document.createElement("td"); + this.tr.appendChild(td); + return td; + }, + + + onDestroy : function(){ + Ext.Toolbar.superclass.onDestroy.call(this); + if(this.rendered){ + if(this.items){ + Ext.destroy.apply(Ext, this.items.items); + } + Ext.Element.uncache(this.tr); + } + }, + + + onDisable : function(){ + this.items.each(function(item){ + if(item.disable){ + item.disable(); + } + }); + }, + + + onEnable : function(){ + this.items.each(function(item){ + if(item.enable){ + item.enable(); + } + }); + }, + + + onButtonTriggerOver : function(btn){ + if(this.activeMenuBtn && this.activeMenuBtn != btn){ + this.activeMenuBtn.hideMenu(); + btn.showMenu(); + this.activeMenuBtn = btn; + } + }, + + + onButtonMenuShow : function(btn){ + this.activeMenuBtn = btn; + }, + + + onButtonMenuHide : function(btn){ + delete this.activeMenuBtn; + } +}); +Ext.reg('toolbar', Ext.Toolbar); + + +T.Item = function(el){ + this.el = Ext.getDom(el); + this.id = Ext.id(this.el); + this.hidden = false; +}; + +T.Item.prototype = { + + + getEl : function(){ + return this.el; + }, + + + render : function(td){ + this.td = td; + td.appendChild(this.el); + }, + + + destroy : function(){ + if(this.td && this.td.parentNode){ + this.td.parentNode.removeChild(this.td); + } + }, + + + show: function(){ + this.hidden = false; + this.td.style.display = ""; + }, + + + hide: function(){ + this.hidden = true; + this.td.style.display = "none"; + }, + + + setVisible: function(visible){ + if(visible) { + this.show(); + }else{ + this.hide(); + } + }, + + + focus : function(){ + Ext.fly(this.el).focus(); + }, + + + disable : function(){ + Ext.fly(this.td).addClass("x-item-disabled"); + this.disabled = true; + this.el.disabled = true; + }, + + + enable : function(){ + Ext.fly(this.td).removeClass("x-item-disabled"); + this.disabled = false; + this.el.disabled = false; + } +}; +Ext.reg('tbitem', T.Item); + + + +T.Separator = function(){ + var s = document.createElement("span"); + s.className = "ytb-sep"; + T.Separator.superclass.constructor.call(this, s); +}; +Ext.extend(T.Separator, T.Item, { + enable:Ext.emptyFn, + disable:Ext.emptyFn, + focus:Ext.emptyFn +}); +Ext.reg('tbseparator', T.Separator); + + +T.Spacer = function(){ + var s = document.createElement("div"); + s.className = "ytb-spacer"; + T.Spacer.superclass.constructor.call(this, s); +}; +Ext.extend(T.Spacer, T.Item, { + enable:Ext.emptyFn, + disable:Ext.emptyFn, + focus:Ext.emptyFn +}); + +Ext.reg('tbspacer', T.Spacer); + + +T.Fill = Ext.extend(T.Spacer, { + + render : function(td){ + td.style.width = '100%'; + T.Fill.superclass.render.call(this, td); + } +}); +Ext.reg('tbfill', T.Fill); + + +T.TextItem = function(text){ + var s = document.createElement("span"); + s.className = "ytb-text"; + s.innerHTML = text; + T.TextItem.superclass.constructor.call(this, s); +}; +Ext.extend(T.TextItem, T.Item, { + enable:Ext.emptyFn, + disable:Ext.emptyFn, + focus:Ext.emptyFn +}); +Ext.reg('tbtext', T.TextItem); + + + +T.Button = Ext.extend(Ext.Button, { + hideParent : true, + + onDestroy : function(){ + T.Button.superclass.onDestroy.call(this); + if(this.container){ + this.container.remove(); + } + } +}); +Ext.reg('tbbutton', T.Button); + + +T.SplitButton = Ext.extend(Ext.SplitButton, { + hideParent : true, + + onDestroy : function(){ + T.SplitButton.superclass.onDestroy.call(this); + if(this.container){ + this.container.remove(); + } + } +}); + +Ext.reg('tbsplit', T.SplitButton); + +T.MenuButton = T.SplitButton; + +})(); + + +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", + + + paramNames : {start: 'start', limit: 'limit'}, + + initComponent : function(){ + Ext.PagingToolbar.superclass.initComponent.call(this); + this.cursor = 0; + this.bind(this.store); + }, + + onRender : function(ct, position){ + Ext.PagingToolbar.superclass.onRender.call(this, ct, position); + this.first = this.addButton({ + tooltip: this.firstText, + iconCls: "x-tbar-page-first", + disabled: true, + handler: this.onClick.createDelegate(this, ["first"]) + }); + this.prev = this.addButton({ + tooltip: this.prevText, + iconCls: "x-tbar-page-prev", + disabled: true, + handler: this.onClick.createDelegate(this, ["prev"]) + }); + this.addSeparator(); + this.add(this.beforePageText); + this.field = Ext.get(this.addDom({ + tag: "input", + type: "text", + size: "3", + value: "1", + cls: "x-tbar-page-number" + }).el); + this.field.on("keydown", this.onPagingKeydown, this); + this.field.on("focus", function(){this.dom.select();}); + this.afterTextEl = this.addText(String.format(this.afterPageText, 1)); + this.field.setHeight(18); + this.addSeparator(); + this.next = this.addButton({ + tooltip: this.nextText, + iconCls: "x-tbar-page-next", + disabled: true, + handler: this.onClick.createDelegate(this, ["next"]) + }); + this.last = this.addButton({ + tooltip: this.lastText, + iconCls: "x-tbar-page-last", + disabled: true, + handler: this.onClick.createDelegate(this, ["last"]) + }); + this.addSeparator(); + this.loading = this.addButton({ + tooltip: this.refreshText, + iconCls: "x-tbar-loading", + handler: this.onClick.createDelegate(this, ["refresh"]) + }); + + if(this.displayInfo){ + this.displayEl = Ext.fly(this.el.dom).createChild({cls:'x-paging-info'}); + } + if(this.dsLoaded){ + this.onLoad.apply(this, this.dsLoaded); + } + }, + + updateInfo : function(){ + if(this.displayEl){ + var count = this.store.getCount(); + var msg = count == 0 ? + this.emptyMsg : + String.format( + this.displayMsg, + this.cursor+1, this.cursor+count, this.store.getTotalCount() + ); + this.displayEl.update(msg); + } + }, + + onLoad : function(store, r, o){ + if(!this.rendered){ + this.dsLoaded = [store, r, o]; + return; + } + this.cursor = o.params ? o.params[this.paramNames.start] : 0; + var d = this.getPageData(), ap = d.activePage, ps = d.pages; + + this.afterTextEl.el.innerHTML = String.format(this.afterPageText, d.pages); + this.field.dom.value = ap; + this.first.setDisabled(ap == 1); + this.prev.setDisabled(ap == 1); + this.next.setDisabled(ap == ps); + this.last.setDisabled(ap == ps); + this.loading.enable(); + this.updateInfo(); + }, + + getPageData : function(){ + var total = this.store.getTotalCount(); + return { + total : total, + activePage : Math.ceil((this.cursor+this.pageSize)/this.pageSize), + pages : total < this.pageSize ? 1 : Math.ceil(total/this.pageSize) + }; + }, + + onLoadError : function(){ + if(!this.rendered){ + return; + } + this.loading.enable(); + }, + + readPage : function(d){ + var v = this.field.dom.value, pageNum; + if (!v || isNaN(pageNum = parseInt(v, 10))) { + this.field.dom.value = d.activePage; + return false; + } + return pageNum; + }, + + onPagingKeydown : function(e){ + var k = e.getKey(), d = this.getPageData(), pageNum; + if (k == e.RETURN) { + e.stopEvent(); + if(pageNum = this.readPage(d)){ + pageNum = Math.min(Math.max(1, pageNum), d.pages) - 1; + this.doLoad(pageNum * this.pageSize); + } + }else if (k == e.HOME || k == e.END){ + e.stopEvent(); + pageNum = k == e.HOME ? 1 : d.pages; + this.field.dom.value = pageNum; + }else if (k == e.UP || k == e.PAGEUP || k == e.DOWN || k == e.PAGEDOWN){ + e.stopEvent(); + if(pageNum = this.readPage(d)){ + var increment = e.shiftKey ? 10 : 1; + if(k == e.DOWN || k == e.PAGEDOWN){ + increment *= -1; + } + pageNum += increment; + if(pageNum >= 1 & pageNum <= d.pages){ + this.field.dom.value = pageNum; + } + } + } + }, + + beforeLoad : function(){ + if(this.rendered && this.loading){ + this.loading.disable(); + } + }, + + doLoad : function(start){ + var o = {}, pn = this.paramNames; + o[pn.start] = start; + o[pn.limit] = this.pageSize; + this.store.load({params:o}); + }, + + onClick : function(which){ + var store = this.store; + switch(which){ + case "first": + this.doLoad(0); + break; + case "prev": + this.doLoad(Math.max(0, this.cursor-this.pageSize)); + break; + case "next": + this.doLoad(this.cursor+this.pageSize); + break; + case "last": + var total = store.getTotalCount(); + var extra = total % this.pageSize; + var lastStart = extra ? (total - extra) : total-this.pageSize; + this.doLoad(lastStart); + break; + case "refresh": + this.doLoad(this.cursor); + break; + } + }, + + + unbind : function(store){ + store = Ext.StoreMgr.lookup(store); + store.un("beforeload", this.beforeLoad, this); + store.un("load", this.onLoad, this); + store.un("loadexception", this.onLoadError, this); + this.store = undefined; + }, + + + bind : function(store){ + store = Ext.StoreMgr.lookup(store); + store.on("beforeload", this.beforeLoad, this); + store.on("load", this.onLoad, this); + store.on("loadexception", this.onLoadError, this); + this.store = store; + } +}); +Ext.reg('paging', Ext.PagingToolbar); + +Ext.Resizable = function(el, config){ + this.el = Ext.get(el); + + if(config && config.wrap){ + config.resizeChild = this.el; + this.el = this.el.wrap(typeof config.wrap == "object" ? config.wrap : {cls:"xresizable-wrap"}); + this.el.id = this.el.dom.id = config.resizeChild.id + "-rzwrap"; + this.el.setStyle("overflow", "hidden"); + this.el.setPositioning(config.resizeChild.getPositioning()); + config.resizeChild.clearPositioning(); + if(!config.width || !config.height){ + var csize = config.resizeChild.getSize(); + this.el.setSize(csize.width, csize.height); + } + if(config.pinned && !config.adjustments){ + config.adjustments = "auto"; + } + } + + this.proxy = this.el.createProxy({tag: "div", cls: "x-resizable-proxy", id: this.el.id + "-rzproxy"}); + this.proxy.unselectable(); + this.proxy.enableDisplayMode('block'); + + Ext.apply(this, config); + + if(this.pinned){ + 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){ this.handles = 's,e,se'; + if(this.multiDirectional){ + this.handles += ',n,w'; + } + } + if(this.handles == "all"){ + this.handles = "n s e w ne nw se sw"; + } + var hs = this.handles.split(/\s*?[,;]\s*?| /); + var ps = Ext.Resizable.positions; + for(var i = 0, len = hs.length; i < len; i++){ + if(hs[i] && ps[hs[i]]){ + var pos = ps[hs[i]]; + this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent); + } + } + this.corner = this.southeast; + + if(this.handles.indexOf("n") != -1 || this.handles.indexOf("w") != -1){ + this.updateBox = true; + } + + this.activeHandle = null; + + if(this.resizeChild){ + if(typeof this.resizeChild == "boolean"){ + this.resizeChild = Ext.get(this.el.dom.firstChild, true); + }else{ + this.resizeChild = Ext.get(this.resizeChild, true); + } + } + + if(this.adjustments == "auto"){ + var rc = this.resizeChild; + var hw = this.west, he = this.east, hn = this.north, hs = this.south; + if(rc && (hw || hn)){ + rc.position("relative"); + rc.setLeft(hw ? hw.el.getWidth() : 0); + rc.setTop(hn ? hn.el.getHeight() : 0); + } + this.adjustments = [ + (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0), + (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 + ]; + } + + if(this.draggable){ + this.dd = this.dynamic ? + this.el.initDD(null) : this.el.initDDProxy(null, {dragElId: this.proxy.id}); + this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id); + } + + this.addEvents( + "beforeresize", + "resize" + ); + + if(this.width !== null && this.height !== null){ + this.resizeTo(this.width, this.height); + }else{ + this.updateChildSize(); + } + if(Ext.isIE){ + this.el.dom.style.zoom = 1; + } + Ext.Resizable.superclass.constructor.call(this); +}; + +Ext.extend(Ext.Resizable, Ext.util.Observable, { + resizeChild : false, + adjustments : [0, 0], + minWidth : 5, + minHeight : 5, + maxWidth : 10000, + maxHeight : 10000, + enabled : true, + animate : false, + duration : .35, + dynamic : false, + handles : false, + multiDirectional : false, + disableTrackOver : false, + easing : 'easeOutStrong', + widthIncrement : 0, + heightIncrement : 0, + pinned : false, + width : null, + height : null, + preserveRatio : false, + transparent: false, + minX: 0, + minY: 0, + draggable: 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.overlay){ + this.overlay = this.el.createProxy({tag: "div", cls: "x-resizable-overlay", html: " "}, Ext.getBody()); + this.overlay.unselectable(); + this.overlay.enableDisplayMode("block"); + this.overlay.on("mousemove", this.onMouseMove, this); + this.overlay.on("mouseup", this.onMouseUp, this); + } + this.overlay.setStyle("cursor", handle.el.getStyle("cursor")); + + this.resizing = true; + this.startBox = this.el.getBox(); + this.startPoint = e.getXY(); + this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0], + (this.startBox.y + this.startBox.height) - this.startPoint[1]]; + + this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.overlay.show(); + + if(this.constrainTo) { + var ct = Ext.get(this.constrainTo); + this.resizeRegion = ct.getRegion().adjust( + ct.getFrameWidth('t'), + ct.getFrameWidth('l'), + -ct.getFrameWidth('b'), + -ct.getFrameWidth('r') + ); + } + + this.proxy.setStyle('visibility', 'hidden'); this.proxy.show(); + this.proxy.setBox(this.startBox); + if(!this.dynamic){ + this.proxy.setStyle('visibility', 'visible'); + } + } + }, + + onMouseDown : function(handle, e){ + if(this.enabled){ + e.stopEvent(); + this.activeHandle = handle; + this.startSizing(e, handle); + } + }, + + onMouseUp : function(e){ + var size = this.resizeElement(); + this.resizing = false; + this.handleOut(); + this.overlay.hide(); + this.proxy.hide(); + this.fireEvent("resize", this, size.width, size.height, e); + }, + + updateChildSize : function(){ + if(this.resizeChild){ + var el = this.el; + var child = this.resizeChild; + var adj = this.adjustments; + if(el.dom.offsetWidth){ + var b = el.getSize(true); + child.setSize(b.width+adj[0], b.height+adj[1]); + } + if(Ext.isIE){ + setTimeout(function(){ + if(el.dom.offsetWidth){ + var b = el.getSize(true); + child.setSize(b.width+adj[0], b.height+adj[1]); + } + }, 10); + } + } + }, + + snap : function(value, inc, min){ + if(!inc || !value) return value; + var newValue = value; + var m = value % inc; + if(m > 0){ + if(m > (inc/2)){ + newValue = value + (inc-m); + }else{ + newValue = value - m; + } + } + return Math.max(min, newValue); + }, + + resizeElement : function(){ + var box = this.proxy.getBox(); + if(this.updateBox){ + this.el.setBox(box, false, this.animate, this.duration, null, this.easing); + }else{ + this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing); + } + this.updateChildSize(); + if(!this.dynamic){ + this.proxy.hide(); + } + return box; + }, + + constrain : function(v, diff, m, mx){ + if(v - diff < m){ + diff = v - m; + }else if(v - diff > mx){ + diff = mx - v; + } + return diff; + }, + + onMouseMove : function(e){ + if(this.enabled){ + try{ + if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) { + return; + } + + var curSize = this.curSize || this.startBox; + var x = this.startBox.x, y = this.startBox.y; + var ox = x, oy = y; + var w = curSize.width, h = curSize.height; + var ow = w, oh = h; + var mw = this.minWidth, mh = this.minHeight; + var mxw = this.maxWidth, mxh = this.maxHeight; + var wi = this.widthIncrement; + var hi = this.heightIncrement; + + var eventXY = e.getXY(); + var diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])); + var diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])); + + var pos = this.activeHandle.position; + + switch(pos){ + case "east": + w += diffX; + w = Math.min(Math.max(mw, w), mxw); + break; + case "south": + h += diffY; + h = Math.min(Math.max(mh, h), mxh); + break; + case "southeast": + w += diffX; + h += diffY; + w = Math.min(Math.max(mw, w), mxw); + h = Math.min(Math.max(mh, h), mxh); + break; + case "north": + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + break; + case "west": + diffX = this.constrain(w, diffX, mw, mxw); + x += diffX; + w -= diffX; + break; + case "northeast": + w += diffX; + w = Math.min(Math.max(mw, w), mxw); + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + break; + case "northwest": + diffX = this.constrain(w, diffX, mw, mxw); + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + x += diffX; + w -= diffX; + break; + case "southwest": + diffX = this.constrain(w, diffX, mw, mxw); + h += diffY; + h = Math.min(Math.max(mh, h), mxh); + x += diffX; + w -= diffX; + break; + } + + var sw = this.snap(w, wi, mw); + var sh = this.snap(h, hi, mh); + if(sw != w || sh != h){ + switch(pos){ + case "northeast": + y -= sh - h; + break; + case "north": + y -= sh - h; + break; + case "southwest": + x -= sw - w; + break; + case "west": + x -= sw - w; + break; + case "northwest": + x -= sw - w; + y -= sh - h; + break; + } + w = sw; + h = sh; + } + + if(this.preserveRatio){ + switch(pos){ + case "southeast": + case "east": + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + w = ow * (h/oh); + break; + case "south": + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + break; + case "northeast": + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + break; + case "north": + var tw = w; + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + x += (tw - w) / 2; + break; + case "southwest": + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + var tw = w; + w = ow * (h/oh); + x += tw - w; + break; + case "west": + var th = h; + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + y += (th - h) / 2; + var tw = w; + w = ow * (h/oh); + x += tw - w; + break; + case "northwest": + var tw = w; + var th = h; + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + w = ow * (h/oh); + y += th - h; + x += tw - w; + break; + + } + } + this.proxy.setBounds(x, y, w, h); + if(this.dynamic){ + this.resizeElement(); + } + }catch(e){} + } + }, + + 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){ + this.proxy.remove(); + if(this.overlay){ + this.overlay.removeAllListeners(); + this.overlay.remove(); + } + var ps = Ext.Resizable.positions; + for(var k in ps){ + if(typeof ps[k] != "function" && this[ps[k]]){ + var h = this[ps[k]]; + h.el.removeAllListeners(); + h.el.remove(); + } + } + if(removeEl){ + this.el.update(""); + this.el.remove(); + } + }, + + syncHandleHeight : function(){ + var h = this.el.getHeight(true); + if(this.west){ + this.west.el.setHeight(h); + } + if(this.east){ + this.east.el.setHeight(h); + } + } +}); + +Ext.Resizable.positions = { + n: "north", s: "south", e: "east", w: "west", se: "southeast", sw: "southwest", nw: "northwest", ne: "northeast" +}; + +Ext.Resizable.Handle = function(rz, pos, disableTrackOver, transparent){ + if(!this.tpl){ + var tpl = Ext.DomHelper.createTemplate( + {tag: "div", cls: "x-resizable-handle x-resizable-handle-{0}"} + ); + tpl.compile(); + Ext.Resizable.Handle.prototype.tpl = tpl; + } + this.position = pos; + this.rz = rz; + this.el = this.tpl.append(rz.el.dom, [this.position], true); + this.el.unselectable(); + if(transparent){ + this.el.setOpacity(0); + } + this.el.on("mousedown", this.onMouseDown, this); + if(!disableTrackOver){ + this.el.on("mouseover", this.onMouseOver, this); + this.el.on("mouseout", this.onMouseOut, this); + } +}; + +Ext.Resizable.Handle.prototype = { + 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); + } +}; + + + + +Ext.Editor = function(field, config){ + this.field = field; + Ext.Editor.superclass.constructor.call(this, config); +}; + +Ext.extend(Ext.Editor, Ext.Component, { + + + + + + value : "", + + alignment: "c-c?", + + shadow : "frame", + + constrain : false, + + swallowKeys : true, + + completeOnEnter : false, + + cancelOnEsc : false, + + updateEl : false, + + initComponent : function(){ + Ext.Editor.superclass.initComponent.call(this); + + this.addEvents( + + "beforestartedit", + + "startedit", + + "beforecomplete", + + "complete", + + "specialkey" + ); + }, + + onRender : function(ct, position){ + this.el = new Ext.Layer({ + shadow: this.shadow, + cls: "x-editor", + parentEl : ct, + shim : this.shim, + shadowOffset:4, + id: this.id, + constrain: this.constrain + }); + this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); + if(this.field.msgTarget != 'title'){ + this.field.msgTarget = 'qtip'; + } + this.field.render(this.el); + if(Ext.isGecko){ + this.field.el.dom.setAttribute('autocomplete', 'off'); + } + this.field.on("specialkey", this.onSpecialKey, this); + if(this.swallowKeys){ + this.field.el.swallowEvent(['keydown','keypress']); + } + this.field.show(); + this.field.on("blur", this.onBlur, this); + if(this.field.grow){ + this.field.on("autosize", this.el.sync, this.el, {delay:1}); + } + }, + + onSpecialKey : function(field, e){ + if(this.completeOnEnter && e.getKey() == e.ENTER){ + e.stopEvent(); + this.completeEdit(); + }else if(this.cancelOnEsc && e.getKey() == e.ESC){ + this.cancelEdit(); + }else{ + this.fireEvent('specialkey', field, e); + } + }, + + + startEdit : function(el, value){ + if(this.editing){ + this.completeEdit(); + } + this.boundEl = Ext.get(el); + var v = value !== undefined ? value : this.boundEl.dom.innerHTML; + if(!this.rendered){ + this.render(this.parentEl || document.body); + } + if(this.fireEvent("beforestartedit", this, this.boundEl, v) === false){ + return; + } + this.startValue = v; + this.field.setValue(v); + if(this.autoSize){ + var sz = this.boundEl.getSize(); + switch(this.autoSize){ + case "width": + this.setSize(sz.width, ""); + break; + case "height": + this.setSize("", sz.height); + break; + default: + this.setSize(sz.width, sz.height); + } + } + this.el.alignTo(this.boundEl, this.alignment); + this.editing = true; + this.show(); + }, + + + setSize : function(w, h){ + this.field.setSize(w, h); + if(this.el){ + this.el.sync(); + } + }, + + + realign : function(){ + this.el.alignTo(this.boundEl, this.alignment); + }, + + + completeEdit : function(remainVisible){ + if(!this.editing){ + return; + } + var v = this.getValue(); + if(this.revertInvalid !== false && !this.field.isValid()){ + v = this.startValue; + this.cancelEdit(true); + } + if(String(v) === String(this.startValue) && this.ignoreNoChange){ + this.editing = false; + this.hide(); + return; + } + if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){ + this.editing = false; + if(this.updateEl && this.boundEl){ + this.boundEl.update(v); + } + if(remainVisible !== true){ + this.hide(); + } + this.fireEvent("complete", this, v, this.startValue); + } + }, + + onShow : function(){ + this.el.show(); + if(this.hideEl !== false){ + this.boundEl.hide(); + } + this.field.show(); + if(Ext.isIE && !this.fixIEFocus){ this.fixIEFocus = true; + this.deferredFocus.defer(50, this); + }else{ + this.field.focus(); + } + this.fireEvent("startedit", this.boundEl, this.startValue); + }, + + deferredFocus : function(){ + if(this.editing){ + this.field.focus(); + } + }, + + + cancelEdit : function(remainVisible){ + if(this.editing){ + this.setValue(this.startValue); + if(remainVisible !== true){ + this.hide(); + } + } + }, + + onBlur : function(){ + if(this.allowBlur !== true && this.editing){ + this.completeEdit(); + } + }, + + onHide : function(){ + if(this.editing){ + this.completeEdit(); + return; + } + this.field.blur(); + if(this.field.collapse){ + this.field.collapse(); + } + this.el.hide(); + if(this.hideEl !== false){ + this.boundEl.show(); + } + }, + + + setValue : function(v){ + this.field.setValue(v); + }, + + + getValue : function(){ + return this.field.getValue(); + }, + + beforeDestroy : function(){ + this.field.destroy(); + this.field = null; + } +}); +Ext.reg('editor', Ext.Editor); + +Ext.MessageBox = function(){ + var dlg, opt, mask, waitTimer; + var bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl; + var buttons, activeTextEl, bwidth, iconCls = ''; + + + var handleButton = function(button){ + dlg.hide(); + Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value], 1); + }; + + + var handleHide = function(){ + if(opt && opt.cls){ + dlg.el.removeClass(opt.cls); + } + progressBar.reset(); + }; + + + var handleEsc = function(d, k, e){ + if(opt && opt.closable !== false){ + dlg.hide(); + } + if(e){ + e.stopEvent(); + } + }; + + + var updateButtons = function(b){ + var width = 0; + if(!b){ + buttons["ok"].hide(); + buttons["cancel"].hide(); + buttons["yes"].hide(); + buttons["no"].hide(); + return width; + } + dlg.footer.dom.style.display = ''; + for(var k in buttons){ + if(typeof buttons[k] != "function"){ + if(b[k]){ + buttons[k].show(); + buttons[k].setText(typeof b[k] == "string" ? b[k] : Ext.MessageBox.buttonText[k]); + width += buttons[k].el.getWidth()+15; + }else{ + buttons[k].hide(); + } + } + } + return width; + }; + + return { + + getDialog : function(titleText){ + if(!dlg){ + dlg = new Ext.Window({ + autoCreate : true, + title:titleText, + resizable:false, + constrain:true, + constrainHeader:true, + minimizable : false, + maximizable : false, + stateful: false, + modal: true, + shim:true, + buttonAlign:"center", + width:400, + height:100, + minHeight: 80, + plain:true, + footer:true, + closable:true, + close : function(){ + if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ + handleButton("no"); + }else{ + handleButton("cancel"); + } + } + }); + buttons = {}; + var bt = this.buttonText; + + buttons["ok"] = dlg.addButton(bt["ok"], handleButton.createCallback("ok")); + buttons["yes"] = dlg.addButton(bt["yes"], handleButton.createCallback("yes")); + buttons["no"] = dlg.addButton(bt["no"], handleButton.createCallback("no")); + buttons["cancel"] = dlg.addButton(bt["cancel"], handleButton.createCallback("cancel")); + buttons["ok"].hideMode = buttons["yes"].hideMode = buttons["no"].hideMode = buttons["cancel"].hideMode = 'offsets'; + dlg.render(document.body); + dlg.getEl().addClass('x-window-dlg'); + mask = dlg.mask; + bodyEl = dlg.body.createChild({ + html:'

    ' + }); + iconEl = Ext.get(bodyEl.dom.firstChild); + var contentEl = bodyEl.dom.childNodes[1]; + msgEl = Ext.get(contentEl.firstChild); + textboxEl = Ext.get(contentEl.childNodes[2]); + textboxEl.enableDisplayMode(); + textboxEl.addKeyListener([10,13], function(){ + if(dlg.isVisible() && opt && opt.buttons){ + if(opt.buttons.ok){ + handleButton("ok"); + }else if(opt.buttons.yes){ + handleButton("yes"); + } + } + }); + textareaEl = Ext.get(contentEl.childNodes[3]); + textareaEl.enableDisplayMode(); + progressBar = new Ext.ProgressBar({ + renderTo:bodyEl + }); + bodyEl.createChild({cls:'x-clear'}); + } + return dlg; + }, + + + updateText : function(text){ + if(!dlg.isVisible() && !opt.width){ + dlg.setSize(this.maxWidth, 100); + } + msgEl.update(text || ' '); + + var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0; + var mw = msgEl.getWidth() + msgEl.getMargins('lr'); + var fw = dlg.getFrameWidth('lr'); + var bw = dlg.body.getFrameWidth('lr'); + if (Ext.isIE && iw > 0){ + + + iw += 3; + } + var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, this.maxWidth), + Math.max(opt.minWidth || this.minWidth, bwidth || 0)); + + if(opt.prompt === true){ + activeTextEl.setWidth(w-iw-fw-bw); + } + if(opt.progress === true || opt.wait === true){ + progressBar.setSize(w-iw-fw-bw); + } + dlg.setSize(w, 'auto').center(); + return this; + }, + + + updateProgress : function(value, progressText, msg){ + progressBar.updateProgress(value, progressText); + if(msg){ + this.updateText(msg); + } + return this; + }, + + + isVisible : function(){ + return dlg && dlg.isVisible(); + }, + + + hide : function(){ + if(this.isVisible()){ + dlg.hide(); + handleHide(); + } + return this; + }, + + + show : function(options){ + if(this.isVisible()){ + this.hide(); + } + opt = options; + var d = this.getDialog(opt.title || " "); + + d.setTitle(opt.title || " "); + var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true); + d.tools.close.setDisplayed(allowClose); + activeTextEl = textboxEl; + opt.prompt = opt.prompt || (opt.multiline ? true : false); + if(opt.prompt){ + if(opt.multiline){ + textboxEl.hide(); + textareaEl.show(); + textareaEl.setHeight(typeof opt.multiline == "number" ? + opt.multiline : this.defaultTextHeight); + activeTextEl = textareaEl; + }else{ + textboxEl.show(); + textareaEl.hide(); + } + }else{ + textboxEl.hide(); + textareaEl.hide(); + } + activeTextEl.dom.value = opt.value || ""; + if(opt.prompt){ + d.focusEl = activeTextEl; + }else{ + var bs = opt.buttons; + var db = null; + if(bs && bs.ok){ + db = buttons["ok"]; + }else if(bs && bs.yes){ + db = buttons["yes"]; + } + if (db){ + d.focusEl = db; + } + } + this.setIcon(opt.icon); + bwidth = updateButtons(opt.buttons); + progressBar.setVisible(opt.progress === true || opt.wait === true); + this.updateProgress(0, opt.progressText); + this.updateText(opt.msg); + if(opt.cls){ + d.el.addClass(opt.cls); + } + d.proxyDrag = opt.proxyDrag === true; + 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.show(opt.animEl); + } + + + d.on('show', function(){ + if(allowClose === true){ + d.keyMap.enable(); + }else{ + d.keyMap.disable(); + } + }); + + if(opt.wait === true){ + progressBar.wait(opt.waitConfig); + } + return this; + }, + + + setIcon : function(icon){ + if(icon && icon != ''){ + iconEl.removeClass('x-hidden'); + iconEl.replaceClass(iconCls, icon); + iconCls = icon; + }else{ + iconEl.replaceClass(iconCls, 'x-hidden'); + iconCls = ''; + } + return this; + }, + + + progress : function(title, msg, progressText){ + this.show({ + title : title, + msg : msg, + buttons: false, + progress:true, + closable:false, + minWidth: this.minProgressWidth, + progressText: progressText + }); + return this; + }, + + + wait : function(msg, title, config){ + this.show({ + title : title, + msg : msg, + buttons: false, + closable:false, + wait:true, + modal:true, + minWidth: this.minProgressWidth, + waitConfig: config + }); + return this; + }, + + + alert : function(title, msg, fn, scope){ + this.show({ + title : title, + msg : msg, + buttons: this.OK, + fn: fn, + scope : scope + }); + return this; + }, + + + confirm : function(title, msg, fn, scope){ + this.show({ + title : title, + msg : msg, + buttons: this.YESNO, + fn: fn, + scope : scope, + icon: this.QUESTION + }); + return this; + }, + + + prompt : function(title, msg, fn, scope, multiline){ + this.show({ + title : title, + msg : msg, + buttons: this.OKCANCEL, + fn: fn, + minWidth:250, + scope : scope, + prompt:true, + multiline: multiline + }); + 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, + + buttonText : { + ok : "OK", + cancel : "Cancel", + yes : "Yes", + no : "No" + } + }; +}(); + + +Ext.Msg = Ext.MessageBox; + +Ext.Tip = Ext.extend(Ext.Panel, { + + + minWidth : 40, + + maxWidth : 300, + + shadow : "sides", + + defaultAlign : "tl-bl?", + autoRender: true, + quickShowInterval : 250, + + + frame:true, + hidden:true, + baseCls: 'x-tip', + floating:{shadow:true,shim:true,useDisplay:true,constrain:false}, + autoHeight:true, + + + initComponent : function(){ + Ext.Tip.superclass.initComponent.call(this); + if(this.closable && !this.title){ + this.elements += ',header'; + } + }, + + + afterRender : function(){ + Ext.Tip.superclass.afterRender.call(this); + if(this.closable){ + this.addTool({ + id: 'close', + handler: this.hide, + scope: this + }); + } + }, + + + showAt : function(xy){ + Ext.Tip.superclass.show.call(this); + if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){ + var bw = this.body.getTextWidth(); + if(this.title){ + bw = Math.max(bw, this.header.child('span').getTextWidth(this.title)); + } + bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr"); + this.setWidth(bw.constrain(this.minWidth, this.maxWidth)); + } + if(this.constrainPosition){ + xy = this.el.adjustForConstraints(xy); + } + this.setPagePosition(xy[0], xy[1]); + }, + + + showBy : function(el, pos){ + if(!this.rendered){ + this.render(Ext.getBody()); + } + this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign)); + }, + + initDraggable : function(){ + this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); + this.header.addClass('x-tip-draggable'); + } +}); + + +Ext.Tip.DD = function(tip, config){ + Ext.apply(this, config); + this.tip = tip; + Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id); + this.setHandleElId(tip.header.id); + this.scroll = false; +}; + +Ext.extend(Ext.Tip.DD, Ext.dd.DD, { + moveOnly:true, + scroll:false, + headerOffsets:[100, 25], + startDrag : function(){ + this.tip.el.disableShadow(); + }, + endDrag : function(e){ + this.tip.el.enableShadow(true); + } +}); + +Ext.ToolTip = Ext.extend(Ext.Tip, { + + + + showDelay: 500, + + hideDelay: 200, + + dismissDelay: 5000, + + mouseOffset: [15,18], + + trackMouse : false, + constrainPosition: true, + + + initComponent: function(){ + Ext.ToolTip.superclass.initComponent.call(this); + this.lastActive = new Date(); + this.initTarget(); + }, + + + initTarget : function(){ + if(this.target){ + this.target = Ext.get(this.target); + this.target.on('mouseover', this.onTargetOver, this); + this.target.on('mouseout', this.onTargetOut, this); + this.target.on('mousemove', this.onMouseMove, this); + } + }, + + + onMouseMove : function(e){ + this.targetXY = e.getXY(); + if(!this.hidden && this.trackMouse){ + this.setPagePosition(this.getTargetXY()); + } + }, + + + getTargetXY : function(){ + return [this.targetXY[0]+this.mouseOffset[0], this.targetXY[1]+this.mouseOffset[1]]; + }, + + + onTargetOver : function(e){ + if(this.disabled || e.within(this.target.dom, true)){ + return; + } + this.clearTimer('hide'); + this.targetXY = e.getXY(); + this.delayShow(); + }, + + + delayShow : function(){ + if(this.hidden && !this.showTimer){ + if(this.lastActive.getElapsed() < this.quickShowInterval){ + this.show(); + }else{ + this.showTimer = this.show.defer(this.showDelay, this); + } + }else if(!this.hidden && this.autoHide !== false){ + this.show(); + } + }, + + + onTargetOut : function(e){ + if(this.disabled || e.within(this.target.dom, true)){ + return; + } + this.clearTimer('show'); + if(this.autoHide !== false){ + this.delayHide(); + } + }, + + + delayHide : function(){ + if(!this.hidden && !this.hideTimer){ + this.hideTimer = this.hide.defer(this.hideDelay, this); + } + }, + + + hide: function(){ + this.clearTimer('dismiss'); + this.lastActive = new Date(); + Ext.ToolTip.superclass.hide.call(this); + }, + + + show : function(){ + this.showAt(this.getTargetXY()); + }, + + + showAt : function(xy){ + this.lastActive = new Date(); + this.clearTimers(); + Ext.ToolTip.superclass.showAt.call(this, xy); + if(this.dismissDelay && this.autoHide !== false){ + this.dismissTimer = this.hide.defer(this.dismissDelay, this); + } + }, + + + 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 !== false && !e.within(this.el.dom)){ + this.disable(); + this.enable.defer(100, this); + } + }, + + + onDisable : function(){ + this.clearTimers(); + this.hide(); + }, + + + adjustPosition : function(x, y){ + + var ay = this.targetXY[1], h = this.getSize().height; + if(this.constrainPosition && y <= ay && (y+h) >= ay){ + y = ay-h-5; + } + return {x : x, y: y}; + }, + + + onDestroy : function(){ + Ext.ToolTip.superclass.onDestroy.call(this); + if(this.target){ + this.target.un('mouseover', this.onTargetOver, this); + this.target.un('mouseout', this.onTargetOut, this); + this.target.un('mousemove', this.onMouseMove, this); + } + } +}); + +Ext.QuickTip = Ext.extend(Ext.ToolTip, { + + + interceptTitles : false, + + + tagConfig : { + namespace : "ext", + attribute : "qtip", + width : "qwidth", + target : "target", + title : "qtitle", + hide : "hide", + cls : "qclass", + align : "qalign" + }, + + + initComponent : function(){ + this.target = this.target || Ext.getDoc(); + this.targets = this.targets || {}; + Ext.QuickTip.superclass.initComponent.call(this); + }, + + + register : function(config){ + var cs = config instanceof Array ? config : arguments; + for(var i = 0, len = cs.length; i < len; i++){ + var c = cs[i]; + var target = c.target; + if(target){ + if(target instanceof Array){ + for(var j = 0, jlen = target.length; j < jlen; j++){ + this.targets[Ext.id(target[j])] = c; + } + } else{ + this.targets[Ext.id(target)] = c; + } + } + } + }, + + + unregister : function(el){ + delete this.targets[Ext.id(el)]; + }, + + + onTargetOver : function(e){ + if(this.disabled){ + return; + } + this.targetXY = e.getXY(); + var t = e.getTarget(); + if(!t || t.nodeType !== 1 || t == document || t == document.body){ + return; + } + if(this.activeTarget && t == this.activeTarget.el){ + this.clearTimer('hide'); + this.show(); + return; + } + if(t && this.targets[t.id]){ + this.activeTarget = this.targets[t.id]; + this.activeTarget.el = t; + this.delayShow(); + return; + } + var ttp, et = Ext.fly(t), cfg = this.tagConfig; + var ns = cfg.namespace; + if(this.interceptTitles && t.title){ + ttp = t.title; + t.qtip = ttp; + t.removeAttribute("title"); + e.preventDefault(); + } else{ + ttp = t.qtip || et.getAttributeNS(ns, cfg.attribute); + } + if(ttp){ + var autoHide = et.getAttributeNS(ns, cfg.hide); + this.activeTarget = { + el: t, + text: ttp, + width: et.getAttributeNS(ns, cfg.width), + autoHide: autoHide != "user" && autoHide !== 'false', + title: et.getAttributeNS(ns, cfg.title), + cls: et.getAttributeNS(ns, cfg.cls), + align: et.getAttributeNS(ns, cfg.align) + }; + this.delayShow(); + } + }, + + + onTargetOut : function(e){ + this.clearTimer('show'); + if(this.autoHide !== false){ + this.delayHide(); + } + }, + + + showAt : function(xy){ + var t = this.activeTarget; + if(t){ + if(!this.rendered){ + this.render(Ext.getBody()); + } + if(t.width){ + this.setWidth(t.width); + this.measureWidth = false; + } else{ + this.measureWidth = true; + } + this.setTitle(t.title || ''); + this.body.update(t.text); + this.autoHide = t.autoHide; + this.dismissDelay = t.dismissDelay || this.dismissDelay; + if(this.lastCls){ + this.el.removeClass(this.lastCls); + delete this.lastCls; + } + if(t.cls){ + this.el.addClass(t.cls); + this.lastCls = t.cls; + } + if(t.align){ + xy = this.el.getAlignToXY(t.el, t.align); + this.constrainPosition = false; + } else{ + this.constrainPosition = true; + } + } + Ext.QuickTip.superclass.showAt.call(this, xy); + }, + + + hide: function(){ + delete this.activeTarget; + Ext.QuickTip.superclass.hide.call(this); + } +}); + +Ext.QuickTips = function(){ + var tip, locks = []; + return { + + init : function(){ + if(!tip){ + tip = new Ext.QuickTip({elements:'header,body'}); + } + }, + + + enable : function(){ + if(tip){ + locks.pop(); + if(locks.length < 1){ + tip.enable(); + } + } + }, + + + disable : function(){ + if(tip){ + tip.disable(); + } + locks.push(1); + }, + + + isEnabled : function(){ + return tip && !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); + } + } +}(); + +Ext.tree.TreePanel = Ext.extend(Ext.Panel, { + rootVisible : true, + animate: Ext.enableFx, + lines : true, + enableDD : false, + hlDrop : Ext.enableFx, + pathSeparator: "/", + + initComponent : function(){ + Ext.tree.TreePanel.superclass.initComponent.call(this); + + if(!this.eventModel){ + this.eventModel = new Ext.tree.TreeEventModel(this); + } + + this.nodeHash = {}; + + + if(this.root){ + this.setRootNode(this.root); + } + + this.addEvents( + + + "append", + + "remove", + + "movenode", + + "insert", + + "beforeappend", + + "beforeremove", + + "beforemovenode", + + "beforeinsert", + + + "beforeload", + + "load", + + "textchange", + + "beforeexpandnode", + + "beforecollapsenode", + + "expandnode", + + "disabledchange", + + "collapsenode", + + "beforeclick", + + "click", + + "checkchange", + + "dblclick", + + "contextmenu", + + "beforechildrenrendered", + + "startdrag", + + "enddrag", + + "dragdrop", + + "beforenodedrop", + + "nodedrop", + + "nodedragover" + ); + if(this.singleExpand){ + this.on("beforeexpandnode", this.restrictExpand, this); + } + }, + + + 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.root = node; + node.ownerTree = this; + node.isRoot = true; + this.registerNode(node); + if(!this.rootVisible){ + var uiP = node.attributes.uiProvider; + node.ui = uiP ? new uiP(node) : new Ext.tree.RootTreeNodeUI(node); + } + 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]; + }, + + + toString : function(){ + return "[Tree"+(this.id?" "+this.id:"")+"]"; + }, + + + restrictExpand : function(node){ + var p = node.parentNode; + if(p){ + if(p.expandedChild && p.expandedChild.parentNode == p){ + p.expandedChild.collapse(); + } + p.expandedChild = node; + } + }, + + + getChecked : function(a, startNode){ + startNode = startNode || this.root; + var r = []; + var f = function(){ + if(this.attributes.checked){ + r.push(!a ? this : (a == 'id' ? this.id : this.attributes[a])); + } + } + startNode.cascade(f); + return r; + }, + + + getEl : function(){ + return this.el; + }, + + + 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(); + } + return this.selModel; + }, + + + expandPath : function(path, attr, callback){ + attr = attr || "id"; + var keys = path.split(this.pathSeparator); + var curNode = this.root; + if(curNode.attributes[attr] != keys[1]){ + if(callback){ + callback(false, null); + } + return; + } + var index = 1; + var f = function(){ + if(++index == keys.length){ + if(callback){ + callback(true, curNode); + } + return; + } + var c = curNode.findChild(attr, keys[index]); + if(!c){ + if(callback){ + callback(false, curNode); + } + return; + } + curNode = c; + c.expand(false, false, f); + }; + curNode.expand(false, false, f); + }, + + + selectPath : function(path, attr, callback){ + attr = attr || "id"; + var keys = path.split(this.pathSeparator); + var v = keys.pop(); + if(keys.length > 0){ + var f = function(success, node){ + if(success && node){ + var n = node.findChild(attr, v); + if(n){ + n.select(); + if(callback){ + callback(true, n); + } + }else if(callback){ + callback(false, n); + } + }else{ + if(callback){ + callback(false, n); + } + } + }; + this.expandPath(keys.join(this.pathSeparator), attr, f); + }else{ + this.root.select(); + if(callback){ + callback(true, this.root); + } + } + }, + + + getTreeEl : function(){ + return this.body; + }, + + + onRender : function(ct, position){ + Ext.tree.TreePanel.superclass.onRender.call(this, ct, position); + this.el.addClass('x-tree'); + this.innerCt = this.body.createChild({tag:"ul", + cls:"x-tree-root-ct " + + (this.lines ? "x-tree-lines" : "x-tree-no-lines")}); + }, + + + initEvents : function(){ + Ext.tree.TreePanel.superclass.initEvents.call(this); + + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.body); + } + if((this.enableDD || this.enableDrop) && !this.dropZone){ + + this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || { + ddGroup: this.ddGroup || "TreeDD", appendOnly: this.ddAppendOnly === true + }); + } + if((this.enableDD || this.enableDrag) && !this.dragZone){ + + this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || { + ddGroup: this.ddGroup || "TreeDD", + scroll: this.ddScroll + }); + } + this.getSelectionModel().init(this); + }, + + + afterRender : function(){ + Ext.tree.TreePanel.superclass.afterRender.call(this); + this.root.render(); + if(!this.rootVisible){ + this.root.renderChildren(); + } + }, + + onDestroy : function(){ + if(this.rendered){ + this.body.removeAllListeners(); + Ext.dd.ScrollManager.unregister(this.body); + if(this.dropZone){ + this.dropZone.unreg(); + } + if(this.dragZone){ + this.dragZone.unreg(); + } + } + this.root.destroy(); + this.nodeHash = null; + Ext.tree.TreePanel.superclass.onDestroy.call(this); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +}); +Ext.reg('treepanel', Ext.tree.TreePanel); +Ext.tree.TreeEventModel = function(tree){ + this.tree = tree; + this.tree.on('render', this.initEvents, this); +} + +Ext.tree.TreeEventModel.prototype = { + initEvents : function(){ + var el = this.tree.getTreeEl(); + el.on('click', this.delegateClick, this); + el.on('mouseover', this.delegateOver, this); + el.on('mouseout', this.delegateOut, this); + el.on('dblclick', this.delegateDblClick, this); + el.on('contextmenu', this.delegateContextMenu, this); + }, + + getNode : function(e){ + var t; + if(t = e.getTarget('.x-tree-node-el', 10)){ + var id = Ext.fly(t, '_treeEvents').getAttributeNS('ext', 'tree-node-id'); + if(id){ + return this.tree.getNodeById(id); + } + } + return null; + }, + + getNodeTarget : function(e){ + var t = e.getTarget('.x-tree-node-icon', 1); + if(!t){ + t = e.getTarget('.x-tree-node-el', 6); + } + return t; + }, + + delegateOut : function(e, t){ + if(!this.beforeEvent(e)){ + return; + } + t = this.getNodeTarget(e); + if(t && !e.within(t, true)){ + this.onNodeOut(e, this.getNode(e)); + } + }, + + delegateOver : function(e, t){ + if(!this.beforeEvent(e)){ + return; + } + t = this.getNodeTarget(e); + if(t){ + this.onNodeOver(e, this.getNode(e)); + } + }, + + delegateClick : function(e, t){ + if(!this.beforeEvent(e)){ + return; + } + + if(e.getTarget('input[type=checkbox]', 1)){ + this.onCheckboxClick(e, this.getNode(e)); + } + else if(e.getTarget('.x-tree-ec-icon', 1)){ + this.onIconClick(e, this.getNode(e)); + } + else if(this.getNodeTarget(e)){ + this.onNodeClick(e, this.getNode(e)); + } + }, + + delegateDblClick : function(e, t){ + if(this.beforeEvent(e) && this.getNodeTarget(e)){ + this.onNodeDblClick(e, this.getNode(e)); + } + }, + + delegateContextMenu : function(e, t){ + if(this.beforeEvent(e) && this.getNodeTarget(e)){ + this.onNodeContextMenu(e, this.getNode(e)); + } + }, + + onNodeClick : function(e, node){ + node.ui.onClick(e); + }, + + onNodeOver : function(e, node){ + node.ui.onOver(e); + }, + + onNodeOut : function(e, node){ + node.ui.onOut(e); + }, + + onIconClick : function(e, node){ + node.ui.ecClick(e); + }, + + onCheckboxClick : function(e, node){ + node.ui.onCheckChange(e); + }, + + onNodeDblClick : function(e, node){ + node.ui.onDblClick(e); + }, + + onNodeContextMenu : function(e, node){ + node.ui.onContextMenu(e); + }, + + beforeEvent : function(e){ + if(this.disabled){ + e.stopEvent(); + return false; + } + return true; + }, + + disable: function(){ + this.disabled = true; + }, + + enable: function(){ + this.disabled = false; + } +}; + +Ext.tree.DefaultSelectionModel = function(config){ + this.selNode = null; + + this.addEvents( + + "selectionchange", + + + "beforeselect" + ); + + Ext.apply(this, config); + Ext.tree.DefaultSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.tree.DefaultSelectionModel, Ext.util.Observable, { + init : function(tree){ + this.tree = tree; + tree.getTreeEl().on("keydown", this.onKeyDown, this); + tree.on("click", this.onNodeClick, this); + }, + + onNodeClick : function(node, e){ + this.select(node); + }, + + + select : function(node){ + var last = this.selNode; + if(last != node && this.fireEvent('beforeselect', this, node, last) !== false){ + if(last){ + last.ui.onSelectedChange(false); + } + this.selNode = node; + node.ui.onSelectedChange(true); + this.fireEvent("selectionchange", this, node, last); + } + return node; + }, + + + unselect : function(node){ + if(this.selNode == node){ + this.clearSelections(); + } + }, + + + clearSelections : function(){ + var n = this.selNode; + if(n){ + n.ui.onSelectedChange(false); + this.selNode = null; + this.fireEvent("selectionchange", this, null); + } + return n; + }, + + + getSelectedNode : function(){ + return this.selNode; + }, + + + isSelected : function(node){ + return this.selNode == node; + }, + + + selectPrevious : function(){ + var s = this.selNode || this.lastSelNode; + if(!s){ + return null; + } + var ps = s.previousSibling; + if(ps){ + if(!ps.isExpanded() || ps.childNodes.length < 1){ + return this.select(ps); + } else{ + var lc = ps.lastChild; + while(lc && lc.isExpanded() && lc.childNodes.length > 0){ + lc = lc.lastChild; + } + return this.select(lc); + } + } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){ + return this.select(s.parentNode); + } + return null; + }, + + + selectNext : function(){ + var s = this.selNode || this.lastSelNode; + if(!s){ + return null; + } + if(s.firstChild && s.isExpanded()){ + return this.select(s.firstChild); + }else if(s.nextSibling){ + return this.select(s.nextSibling); + }else if(s.parentNode){ + var newS = null; + s.parentNode.bubble(function(){ + if(this.nextSibling){ + newS = this.getOwnerTree().selModel.select(this.nextSibling); + return false; + } + }); + return newS; + } + return null; + }, + + onKeyDown : function(e){ + var s = this.selNode || this.lastSelNode; + + var sm = this; + if(!s){ + return; + } + var k = e.getKey(); + switch(k){ + case e.DOWN: + e.stopEvent(); + this.selectNext(); + break; + case e.UP: + e.stopEvent(); + this.selectPrevious(); + break; + case e.RIGHT: + e.preventDefault(); + if(s.hasChildNodes()){ + if(!s.isExpanded()){ + s.expand(); + }else if(s.firstChild){ + this.select(s.firstChild, e); + } + } + break; + case e.LEFT: + e.preventDefault(); + if(s.hasChildNodes() && s.isExpanded()){ + s.collapse(); + }else if(s.parentNode && (this.tree.rootVisible || s.parentNode != this.tree.getRootNode())){ + this.select(s.parentNode, e); + } + break; + }; + } +}); + + +Ext.tree.MultiSelectionModel = function(config){ + this.selNodes = []; + this.selMap = {}; + this.addEvents( + + "selectionchange" + ); + Ext.apply(this, config); + Ext.tree.MultiSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, { + init : function(tree){ + this.tree = tree; + tree.getTreeEl().on("keydown", this.onKeyDown, this); + tree.on("click", this.onNodeClick, this); + }, + + onNodeClick : function(node, e){ + this.select(node, e, e.ctrlKey); + }, + + + select : function(node, e, keepExisting){ + if(keepExisting !== true){ + this.clearSelections(true); + } + if(this.isSelected(node)){ + this.lastSelNode = node; + return node; + } + this.selNodes.push(node); + this.selMap[node.id] = node; + this.lastSelNode = node; + node.ui.onSelectedChange(true); + this.fireEvent("selectionchange", this, this.selNodes); + return node; + }, + + + unselect : function(node){ + if(this.selMap[node.id]){ + node.ui.onSelectedChange(false); + var sn = this.selNodes; + var index = sn.indexOf(node); + if(index != -1){ + this.selNodes.splice(index, 1); + } + delete this.selMap[node.id]; + this.fireEvent("selectionchange", this, this.selNodes); + } + }, + + + clearSelections : function(suppressEvent){ + var sn = this.selNodes; + if(sn.length > 0){ + for(var i = 0, len = sn.length; i < len; i++){ + sn[i].ui.onSelectedChange(false); + } + this.selNodes = []; + this.selMap = {}; + if(suppressEvent !== true){ + this.fireEvent("selectionchange", this, this.selNodes); + } + } + }, + + + isSelected : function(node){ + return this.selMap[node.id] ? true : false; + }, + + + getSelectedNodes : function(){ + return this.selNodes; + }, + + onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown, + + selectNext : Ext.tree.DefaultSelectionModel.prototype.selectNext, + + selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious +}); + +Ext.tree.TreeNode = function(attributes){ + attributes = attributes || {}; + if(typeof attributes == "string"){ + attributes = {text: attributes}; + } + this.childrenRendered = false; + this.rendered = false; + Ext.tree.TreeNode.superclass.constructor.call(this, attributes); + this.expanded = attributes.expanded === true; + this.isTarget = attributes.isTarget !== false; + 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.addEvents( + + "textchange", + + "beforeexpand", + + "beforecollapse", + + "expand", + + "disabledchange", + + "collapse", + + "beforeclick", + + "click", + + "checkchange", + + "dblclick", + + "contextmenu", + + "beforechildrenrendered" + ); + + var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI; + + + this.ui = new uiClass(this); +}; +Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { + preventHScroll: true, + + isExpanded : function(){ + return this.expanded; + }, + + + getUI : function(){ + return this.ui; + }, + + + setFirstChild : function(node){ + var of = this.firstChild; + Ext.tree.TreeNode.superclass.setFirstChild.call(this, node); + if(this.childrenRendered && of && node != of){ + of.renderIndent(true, true); + } + if(this.rendered){ + this.renderIndent(true, true); + } + }, + + + setLastChild : function(node){ + var ol = this.lastChild; + Ext.tree.TreeNode.superclass.setLastChild.call(this, node); + if(this.childrenRendered && ol && node != ol){ + ol.renderIndent(true, true); + } + if(this.rendered){ + this.renderIndent(true, true); + } + }, + + + + appendChild : function(){ + var node = Ext.tree.TreeNode.superclass.appendChild.apply(this, arguments); + if(node && this.childrenRendered){ + node.render(); + } + this.ui.updateExpandIcon(); + return node; + }, + + + removeChild : function(node){ + this.ownerTree.getSelectionModel().unselect(node); + Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments); + + if(this.childrenRendered){ + node.ui.remove(); + } + if(this.childNodes.length < 1){ + this.collapse(false, false); + }else{ + this.ui.updateExpandIcon(); + } + if(!this.firstChild && !this.isHiddenRoot()) { + this.childrenRendered = false; + } + return node; + }, + + + insertBefore : function(node, refNode){ + var newNode = Ext.tree.TreeNode.superclass.insertBefore.apply(this, arguments); + if(newNode && refNode && this.childrenRendered){ + node.render(); + } + this.ui.updateExpandIcon(); + return newNode; + }, + + + setText : function(text){ + var oldText = this.text; + this.text = text; + this.attributes.text = text; + if(this.rendered){ + this.ui.onTextChange(this, text, oldText); + } + this.fireEvent("textchange", this, text, oldText); + }, + + + select : function(){ + this.getOwnerTree().getSelectionModel().select(this); + }, + + + unselect : function(){ + this.getOwnerTree().getSelectionModel().unselect(this); + }, + + + isSelected : function(){ + return this.getOwnerTree().getSelectionModel().isSelected(this); + }, + + + expand : function(deep, anim, callback){ + if(!this.expanded){ + if(this.fireEvent("beforeexpand", this, deep, anim) === false){ + return; + } + if(!this.childrenRendered){ + this.renderChildren(); + } + this.expanded = true; + if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){ + this.ui.animExpand(function(){ + this.fireEvent("expand", this); + if(typeof callback == "function"){ + callback(this); + } + if(deep === true){ + this.expandChildNodes(true); + } + }.createDelegate(this)); + return; + }else{ + this.ui.expand(); + this.fireEvent("expand", this); + if(typeof callback == "function"){ + callback(this); + } + } + }else{ + if(typeof callback == "function"){ + callback(this); + } + } + if(deep === true){ + this.expandChildNodes(true); + } + }, + + isHiddenRoot : function(){ + return this.isRoot && !this.getOwnerTree().rootVisible; + }, + + + collapse : function(deep, anim){ + if(this.expanded && !this.isHiddenRoot()){ + if(this.fireEvent("beforecollapse", this, deep, anim) === false){ + return; + } + this.expanded = false; + if((this.getOwnerTree().animate && anim !== false) || anim){ + this.ui.animCollapse(function(){ + this.fireEvent("collapse", this); + if(deep === true){ + this.collapseChildNodes(true); + } + }.createDelegate(this)); + return; + }else{ + this.ui.collapse(); + this.fireEvent("collapse", this); + } + } + if(deep === true){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].collapse(true, false); + } + } + }, + + + delayedExpand : function(delay){ + if(!this.expandProcId){ + this.expandProcId = this.expand.defer(delay, this); + } + }, + + + cancelExpand : function(){ + if(this.expandProcId){ + clearTimeout(this.expandProcId); + } + this.expandProcId = false; + }, + + + toggle : function(){ + if(this.expanded){ + this.collapse(); + }else{ + this.expand(); + } + }, + + + ensureVisible : function(callback){ + var tree = this.getOwnerTree(); + tree.expandPath(this.parentNode.getPath(), false, function(){ + tree.getTreeEl().scrollChildIntoView(this.ui.anchor); + Ext.callback(callback); + }.createDelegate(this)); + }, + + + expandChildNodes : function(deep){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].expand(deep); + } + }, + + + collapseChildNodes : function(deep){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].collapse(deep); + } + }, + + + disable : function(){ + this.disabled = true; + this.unselect(); + 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){ + this.ui.onDisableChange(this, false); + } + this.fireEvent("disabledchange", this, false); + }, + + + renderChildren : function(suppressEvent){ + if(suppressEvent !== false){ + this.fireEvent("beforechildrenrendered", this); + } + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].render(true); + } + this.childrenRendered = true; + }, + + + sort : function(fn, scope){ + Ext.tree.TreeNode.superclass.sort.apply(this, arguments); + if(this.childrenRendered){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].render(true); + } + } + }, + + + render : function(bulkRender){ + this.ui.render(bulkRender); + if(!this.rendered){ + + this.getOwnerTree().registerNode(this); + this.rendered = true; + if(this.expanded){ + this.expanded = false; + this.expand(false, false); + } + } + }, + + + renderIndent : function(deep, refresh){ + if(refresh){ + this.ui.childIndent = null; + } + this.ui.renderIndent(); + if(deep === true && this.childrenRendered){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].renderIndent(true, refresh); + } + } + }, + + beginUpdate : function(){ + this.childrenRendered = false; + }, + + endUpdate : function(){ + if(this.expanded){ + this.renderChildren(); + } + }, + + destroy : function(){ + for(var i = 0,l = this.childNodes.length; i < l; i++){ + this.childNodes[i].destroy(); + } + this.childNodes = null; + if(this.ui.destroy){ + this.ui.destroy(); + } + } +}); + + Ext.tree.AsyncTreeNode = function(config){ + this.loaded = false; + 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){ + if(this.loading){ + var timer; + var f = function(){ + if(!this.loading){ + clearInterval(timer); + this.expand(deep, anim, callback); + } + }.createDelegate(this); + timer = setInterval(f, 200); + return; + } + if(!this.loaded){ + if(this.fireEvent("beforeload", this) === false){ + return; + } + this.loading = true; + this.ui.beforeLoad(this); + var loader = this.loader || this.attributes.loader || this.getOwnerTree().getLoader(); + if(loader){ + loader.load(this, this.loadComplete.createDelegate(this, [deep, anim, callback])); + return; + } + } + Ext.tree.AsyncTreeNode.superclass.expand.call(this, deep, anim, callback); + }, + + + isLoading : function(){ + return this.loading; + }, + + loadComplete : function(deep, anim, callback){ + this.loading = false; + this.loaded = true; + this.ui.afterLoad(this); + this.fireEvent("load", this); + this.expand(deep, anim, callback); + }, + + + isLoaded : function(){ + return this.loaded; + }, + + hasChildNodes : function(){ + if(!this.isLeaf() && !this.loaded){ + return true; + }else{ + return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this); + } + }, + + + reload : function(callback){ + this.collapse(false, false); + while(this.firstChild){ + this.removeChild(this.firstChild); + } + this.childrenRendered = false; + this.loaded = false; + if(this.isHiddenRoot()){ + this.expanded = false; + } + this.expand(false, false, callback); + } +}); + +Ext.tree.TreeNodeUI = function(node){ + this.node = node; + this.rendered = false; + this.animating = false; + this.wasLeaf = true; + this.ecc = 'x-tree-ec-icon x-tree-elbow'; + this.emptyIcon = Ext.BLANK_IMAGE_URL; +}; + +Ext.tree.TreeNodeUI.prototype = { + + 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; + } + }, + + + onDisableChange : function(node, state){ + this.disabled = state; + if(state){ + this.addClass("x-tree-node-disabled"); + }else{ + this.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){ + var targetNode = newParent.ui.getContainer(); + if(!targetNode){ + this.holder = document.createElement("div"); + this.holder.appendChild(this.wrap); + return; + } + var insertBefore = refNode ? refNode.ui.getEl() : null; + if(insertBefore){ + targetNode.insertBefore(this.wrap, insertBefore); + }else{ + targetNode.appendChild(this.wrap); + } + this.node.renderIndent(true); + } + }, + + + addClass : function(cls){ + if(this.elNode){ + Ext.fly(this.elNode).addClass(cls); + } + }, + + + removeClass : function(cls){ + if(this.elNode){ + Ext.fly(this.elNode).removeClass(cls); + } + }, + + + remove : function(){ + if(this.rendered){ + this.holder = document.createElement("div"); + this.holder.appendChild(this.wrap); + } + }, + + + fireEvent : function(){ + return this.node.fireEvent.apply(this.node, arguments); + }, + + + initEvents : function(){ + this.node.on("move", this.onMove, this); + + if(this.node.disabled){ + this.addClass("x-tree-node-disabled"); + } + if(this.node.hidden){ + this.hide(); + } + var ot = this.node.getOwnerTree(); + var dd = ot.enableDD || ot.enableDrag || ot.enableDrop; + if(dd && (!this.node.isRoot || ot.rootVisible)){ + Ext.dd.Registry.register(this.elNode, { + node: this.node, + handles: this.getDDHandles(), + isHandle: false + }); + } + }, + + + getDDHandles : function(){ + return [this.iconNode, this.textNode, this.elNode]; + }, + + + hide : function(){ + this.node.hidden = true; + if(this.wrap){ + this.wrap.style.display = "none"; + } + }, + + + show : function(){ + this.node.hidden = false; + if(this.wrap){ + this.wrap.style.display = ""; + } + }, + + + onContextMenu : function(e){ + if (this.node.hasListener("contextmenu") || this.node.getOwnerTree().hasListener("contextmenu")) { + e.preventDefault(); + this.focus(); + this.fireEvent("contextmenu", this.node, e); + } + }, + + + onClick : function(e){ + if(this.dropping){ + e.stopEvent(); + return; + } + if(this.fireEvent("beforeclick", this.node, e) !== false){ + var a = e.getTarget('a'); + if(!this.disabled && this.node.attributes.href && a){ + this.fireEvent("click", this.node, e); + return; + }else if(a && e.ctrlKey){ + e.stopEvent(); + } + e.preventDefault(); + if(this.disabled){ + return; + } + + if(this.node.attributes.singleClickExpand && !this.animating && this.node.hasChildNodes()){ + this.node.toggle(); + } + + this.fireEvent("click", this.node, e); + }else{ + e.stopEvent(); + } + }, + + + onDblClick : function(e){ + e.preventDefault(); + if(this.disabled){ + return; + } + if(this.checkbox){ + this.toggleCheck(); + } + if(!this.animating && this.node.hasChildNodes()){ + this.node.toggle(); + } + this.fireEvent("dblclick", this.node, e); + }, + + onOver : function(e){ + this.addClass('x-tree-node-over'); + }, + + onOut : function(e){ + this.removeClass('x-tree-node-over'); + }, + + + onCheckChange : function(){ + var checked = this.checkbox.checked; + this.node.attributes.checked = checked; + this.fireEvent('checkchange', this.node, checked); + }, + + + ecClick : function(e){ + if(!this.animating && (this.node.hasChildNodes() || this.node.attributes.expandable)){ + 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(); + }catch(e){} + }else if(!Ext.isIE){ + try{ + var noscroll = this.node.getOwnerTree().getTreeEl().dom; + var l = noscroll.scrollLeft; + this.anchor.focus(); + noscroll.scrollLeft = l; + }catch(e){} + } + }, + + + toggleCheck : function(value){ + var cb = this.checkbox; + if(cb){ + cb.checked = (value === undefined ? !cb.checked : value); + } + }, + + + blur : function(){ + try{ + this.anchor.blur(); + }catch(e){} + }, + + + animExpand : function(callback){ + var ct = Ext.get(this.ctNode); + ct.stopFx(); + if(!this.node.hasChildNodes()){ + this.updateExpandIcon(); + this.ctNode.style.display = ""; + Ext.callback(callback); + return; + } + this.animating = true; + this.updateExpandIcon(); + + ct.slideIn('t', { + callback : function(){ + this.animating = false; + Ext.callback(callback); + }, + scope: this, + duration: this.node.ownerTree.duration || .25 + }); + }, + + + highlight : function(){ + var tree = this.node.getOwnerTree(); + Ext.fly(this.wrap).highlight( + tree.hlColor || "C3DAF9", + {endColor: tree.hlBaseColor} + ); + }, + + + collapse : function(){ + this.updateExpandIcon(); + this.ctNode.style.display = "none"; + }, + + + animCollapse : function(callback){ + var ct = Ext.get(this.ctNode); + ct.enableDisplayMode('block'); + ct.stopFx(); + + this.animating = true; + this.updateExpandIcon(); + + ct.slideOut('t', { + callback : function(){ + this.animating = false; + Ext.callback(callback); + }, + scope: this, + duration: this.node.ownerTree.duration || .25 + }); + }, + + + getContainer : function(){ + return this.ctNode; + }, + + + getEl : function(){ + 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 ? + n.parentNode.ui.getContainer() : n.ownerTree.innerCt.dom; + + if(!this.rendered){ + this.rendered = true; + + this.renderElements(n, a, targetNode, bulkRender); + + if(a.qtip){ + if(this.textNode.setAttributeNS){ + this.textNode.setAttributeNS("ext", "qtip", a.qtip); + if(a.qtipTitle){ + this.textNode.setAttributeNS("ext", "qtitle", a.qtipTitle); + } + }else{ + this.textNode.setAttribute("ext:qtip", a.qtip); + if(a.qtipTitle){ + this.textNode.setAttribute("ext:qtitle", a.qtipTitle); + } + } + }else if(a.qtipCfg){ + a.qtipCfg.target = Ext.id(this.textNode); + Ext.QuickTips.register(a.qtipCfg); + } + this.initEvents(); + if(!this.node.expanded){ + this.updateExpandIcon(true); + } + }else{ + if(bulkRender === true) { + targetNode.appendChild(this.wrap); + } + } + }, + + + renderElements : function(n, a, targetNode, bulkRender){ + + this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : ''; + + var cb = typeof a.checked == 'boolean'; + + var href = a.href ? a.href : Ext.isGecko ? "" : "#"; + var buf = ['
  • ', + '',this.indentMarkup,"", + '', + '', + cb ? ('' : '/>')) : '', + '',n.text,"
    ", + '', + "
  • "].join(''); + + var nel; + if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){ + this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf); + }else{ + this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf); + } + + this.elNode = this.wrap.childNodes[0]; + this.ctNode = this.wrap.childNodes[1]; + var cs = this.elNode.childNodes; + this.indentNode = cs[0]; + this.ecNode = cs[1]; + this.iconNode = cs[2]; + var index = 3; + if(cb){ + this.checkbox = cs[3]; + index++; + } + this.anchor = cs[index]; + this.textNode = cs[index].firstChild; + }, + + + getAnchor : function(){ + return this.anchor; + }, + + + getTextEl : function(){ + return this.textNode; + }, + + + getIconEl : function(){ + return this.iconNode; + }, + + + isChecked : function(){ + return this.checkbox ? this.checkbox.checked : false; + }, + + + updateExpandIcon : function(){ + if(this.rendered){ + var n = this.node, c1, c2; + var cls = n.isLast() ? "x-tree-elbow-end" : "x-tree-elbow"; + var hasChild = n.hasChildNodes(); + if(hasChild || n.attributes.expandable){ + if(n.expanded){ + cls += "-minus"; + c1 = "x-tree-node-collapsed"; + c2 = "x-tree-node-expanded"; + }else{ + cls += "-plus"; + c1 = "x-tree-node-expanded"; + c2 = "x-tree-node-collapsed"; + } + if(this.wasLeaf){ + this.removeClass("x-tree-node-leaf"); + this.wasLeaf = false; + } + if(this.c1 != c1 || this.c2 != c2){ + Ext.fly(this.elNode).replaceClass(c1, c2); + this.c1 = c1; this.c2 = c2; + } + }else{ + if(!this.wasLeaf){ + Ext.fly(this.elNode).replaceClass("x-tree-node-expanded", "x-tree-node-leaf"); + delete this.c1; + delete this.c2; + this.wasLeaf = true; + } + } + var ecc = "x-tree-ec-icon "+cls; + if(this.ecc != ecc){ + this.ecNode.className = ecc; + this.ecc = ecc; + } + } + }, + + + getChildIndent : function(){ + if(!this.childIndent){ + var buf = []; + var p = this.node; + while(p){ + if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){ + if(!p.isLast()) { + buf.unshift(''); + } else { + buf.unshift(''); + } + } + p = p.parentNode; + } + this.childIndent = buf.join(""); + } + return this.childIndent; + }, + + + renderIndent : function(){ + if(this.rendered){ + var indent = ""; + var p = this.node.parentNode; + if(p){ + indent = p.ui.getChildIndent(); + } + if(this.indentMarkup != indent){ + this.indentNode.innerHTML = indent; + this.indentMarkup = indent; + } + this.updateExpandIcon(); + } + }, + + destroy : function(){ + if(this.elNode){ + Ext.dd.Registry.unregister(this.elNode.id); + } + delete this.elNode; + delete this.ctNode; + delete this.indentNode; + delete this.ecNode; + delete this.iconNode; + delete this.checkbox; + delete this.anchor; + delete this.textNode; + Ext.removeNode(this.ctNode); + } +}; + + +Ext.tree.RootTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, { + + render : function(){ + if(!this.rendered){ + var targetNode = this.node.ownerTree.innerCt.dom; + this.node.expanded = true; + targetNode.innerHTML = '
    '; + this.wrap = this.ctNode = targetNode.firstChild; + } + }, + collapse : Ext.emptyFn, + expand : Ext.emptyFn +}); + +Ext.tree.TreeLoader = function(config){ + this.baseParams = {}; + this.requestMethod = "POST"; + Ext.apply(this, config); + + this.addEvents( + + "beforeload", + + "load", + + "loadexception" + ); + + Ext.tree.TreeLoader.superclass.constructor.call(this); +}; + +Ext.extend(Ext.tree.TreeLoader, Ext.util.Observable, { + + + + + + + + uiProviders : {}, + + + clearOnLoad : true, + + + load : function(node, callback){ + if(this.clearOnLoad){ + while(node.firstChild){ + node.removeChild(node.firstChild); + } + } + if(this.doPreload(node)){ + if(typeof callback == "function"){ + callback(); + } + }else if(this.dataUrl||this.url){ + this.requestData(node, callback); + } + }, + + doPreload : function(node){ + if(node.attributes.children){ + if(node.childNodes.length < 1){ + var cs = node.attributes.children; + node.beginUpdate(); + for(var i = 0, len = cs.length; i < len; i++){ + var cn = node.appendChild(this.createNode(cs[i])); + if(this.preloadChildren){ + this.doPreload(cn); + } + } + node.endUpdate(); + } + return true; + }else { + return false; + } + }, + + getParams: function(node){ + var buf = [], bp = this.baseParams; + for(var key in bp){ + if(typeof bp[key] != "function"){ + buf.push(encodeURIComponent(key), "=", encodeURIComponent(bp[key]), "&"); + } + } + buf.push("node=", encodeURIComponent(node.id)); + return buf.join(""); + }, + + requestData : function(node, callback){ + if(this.fireEvent("beforeload", this, node, callback) !== false){ + this.transId = Ext.Ajax.request({ + method:this.requestMethod, + url: this.dataUrl||this.url, + success: this.handleResponse, + failure: this.handleFailure, + scope: this, + argument: {callback: callback, node: node}, + params: this.getParams(node) + }); + }else{ + + + if(typeof callback == "function"){ + callback(); + } + } + }, + + isLoading : function(){ + return this.transId ? true : false; + }, + + abort : function(){ + if(this.isLoading()){ + Ext.Ajax.abort(this.transId); + } + }, + + + createNode : function(attr){ + + if(this.baseAttrs){ + Ext.applyIf(attr, this.baseAttrs); + } + if(this.applyLoader !== false){ + attr.loader = this; + } + if(typeof attr.uiProvider == 'string'){ + attr.uiProvider = this.uiProviders[attr.uiProvider] || eval(attr.uiProvider); + } + return(attr.leaf ? + new Ext.tree.TreeNode(attr) : + new Ext.tree.AsyncTreeNode(attr)); + }, + + processResponse : function(response, node, callback){ + var json = response.responseText; + try { + var o = eval("("+json+")"); + node.beginUpdate(); + for(var i = 0, len = o.length; i < len; i++){ + var n = this.createNode(o[i]); + if(n){ + node.appendChild(n); + } + } + node.endUpdate(); + if(typeof callback == "function"){ + callback(this, node); + } + }catch(e){ + this.handleFailure(response); + } + }, + + handleResponse : function(response){ + this.transId = false; + var a = response.argument; + this.processResponse(response, a.node, a.callback); + this.fireEvent("load", this, a.node, response); + }, + + handleFailure : function(response){ + this.transId = false; + var a = response.argument; + this.fireEvent("loadexception", this, a.node, response); + if(typeof a.callback == "function"){ + a.callback(this, a.node); + } + } +}); + +Ext.tree.TreeFilter = function(tree, config){ + this.tree = tree; + this.filtered = {}; + Ext.apply(this, config); +}; + +Ext.tree.TreeFilter.prototype = { + clearBlank:false, + reverse:false, + 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; + } + value = value.toLowerCase(); + f = function(n){ + return n.attributes[attr].substr(0, vlen).toLowerCase() == value; + }; + }else if(value.exec){ + f = function(n){ + return value.test(n.attributes[attr]); + }; + }else{ + throw 'Illegal filter type, must be string or regex'; + } + this.filterBy(f, null, startNode); + }, + + + filterBy : function(fn, scope, startNode){ + startNode = startNode || this.tree.root; + if(this.autoClear){ + this.clear(); + } + var af = this.filtered, rv = this.reverse; + var f = function(n){ + if(n == startNode){ + return true; + } + if(af[n.id]){ + return false; + } + var m = fn.call(scope || n, n); + if(!m || rv){ + af[n.id] = n; + n.ui.hide(); + return false; + } + return true; + }; + startNode.cascade(f); + if(this.remove){ + for(var id in af){ + if(typeof id != "function"){ + var n = af[id]; + if(n && n.parentNode){ + n.parentNode.removeChild(n); + } + } + } + } + }, + + + clear : function(){ + var t = this.tree; + var af = this.filtered; + for(var id in af){ + if(typeof id != "function"){ + var n = af[id]; + if(n){ + n.ui.show(); + } + } + } + this.filtered = {}; + } +}; + + +Ext.tree.TreeSorter = function(tree, config){ + Ext.apply(this, config); + tree.on("beforechildrenrendered", this.doSort, this); + tree.on("append", this.updateSort, this); + tree.on("insert", this.updateSort, this); + + var dsc = this.dir && this.dir.toLowerCase() == "desc"; + var p = this.property || "text"; + var sortType = this.sortType; + var fs = this.folderSort; + var cs = this.caseSensitive === true; + var leafAttr = this.leafAttr || 'leaf'; + + this.sortFn = function(n1, n2){ + if(fs){ + if(n1.attributes[leafAttr] && !n2.attributes[leafAttr]){ + return 1; + } + if(!n1.attributes[leafAttr] && n2.attributes[leafAttr]){ + return -1; + } + } + var v1 = sortType ? sortType(n1) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase()); + var v2 = sortType ? sortType(n2) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase()); + if(v1 < v2){ + return dsc ? +1 : -1; + }else if(v1 > v2){ + return dsc ? -1 : +1; + }else{ + return 0; + } + }; +}; + +Ext.tree.TreeSorter.prototype = { + doSort : function(node){ + node.sort(this.sortFn); + }, + + compareNodes : function(n1, n2){ + + return (n1.text.toUpperCase() > n2.text.toUpperCase() ? 1 : -1); + }, + + updateSort : function(tree, node){ + if(node.childrenRendered){ + this.doSort.defer(1, this, [node]); + } + } +}; + +if(Ext.dd.DropZone){ + +Ext.tree.TreeDropZone = function(tree, config){ + + this.allowParentInsert = false; + + this.allowContainerDrop = false; + + this.appendOnly = false; + Ext.tree.TreeDropZone.superclass.constructor.call(this, tree.innerCt, 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); + this.expandProcId = false; + } + }, + + + 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; + } + if(pt == "append" && targetNode.allowChildren === false){ + return false; + } + if((pt == "above" || pt == "below") && (targetNode.parentNode && targetNode.parentNode.allowChildren === false)){ + return false; + } + if(dropNode && (targetNode == dropNode || dropNode.contains(targetNode))){ + return false; + } + + var overEvent = this.dragOverData; + overEvent.tree = this.tree; + overEvent.target = targetNode; + overEvent.data = data; + overEvent.point = pt; + overEvent.source = dd; + overEvent.rawEvent = e; + overEvent.dropNode = dropNode; + 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; + } + var dragEl = n.ddel; + var t = Ext.lib.Dom.getY(dragEl), b = t + dragEl.offsetHeight; + var y = Ext.lib.Event.getPageY(e); + var noAppend = tn.allowChildren === false || tn.isLeaf(); + if(this.appendOnly || tn.parentNode.allowChildren === false){ + return noAppend ? false : "append"; + } + var noBelow = false; + if(!this.allowParentInsert){ + noBelow = tn.hasChildNodes() && tn.isExpanded(); + } + var q = (b - t) / (noAppend ? 2 : 3); + if(y >= t && y < (t + q)){ + return "above"; + }else if(!noBelow && (noAppend || y >= b-q && y <= b)){ + return "below"; + }else{ + return "append"; + } + }, + + + onNodeEnter : function(n, dd, e, data){ + this.cancelExpand(); + }, + + + 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){ + var el = n.ddel; + var cls; + if(pt == "above"){ + returnCls = n.node.isFirst() ? "x-tree-drop-ok-above" : "x-tree-drop-ok-between"; + cls = "x-tree-drag-insert-above"; + }else if(pt == "below"){ + returnCls = n.node.isLast() ? "x-tree-drop-ok-below" : "x-tree-drop-ok-between"; + cls = "x-tree-drag-insert-below"; + }else{ + returnCls = "x-tree-drop-ok-append"; + cls = "x-tree-drag-append"; + } + if(this.lastInsertClass != cls){ + Ext.fly(el).replaceClass(this.lastInsertClass, cls); + this.lastInsertClass = cls; + } + } + } + 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; + targetNode.ui.startDrop(); + if(!this.isValidDropPoint(n, point, dd, e, data)){ + targetNode.ui.endDrop(); + return false; + } + + var dropNode = data.node || (dd.getTreeNode ? dd.getTreeNode(data, targetNode, point, e) : null); + var dropEvent = { + tree : this.tree, + target: targetNode, + data: data, + point: point, + source: dd, + rawEvent: e, + dropNode: dropNode, + cancel: !dropNode + }; + var retval = this.tree.fireEvent("beforenodedrop", dropEvent); + if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){ + targetNode.ui.endDrop(); + return false; + } + + targetNode = dropEvent.target; + if(point == "append" && !targetNode.isExpanded()){ + targetNode.expand(false, null, function(){ + this.completeDrop(dropEvent); + }.createDelegate(this)); + }else{ + this.completeDrop(dropEvent); + } + return true; + }, + + + completeDrop : function(de){ + var ns = de.dropNode, p = de.point, t = de.target; + if(!(ns instanceof Array)){ + ns = [ns]; + } + var n; + for(var i = 0, len = ns.length; i < len; i++){ + n = ns[i]; + if(p == "above"){ + t.parentNode.insertBefore(n, t); + }else if(p == "below"){ + t.parentNode.insertBefore(n, t.nextSibling); + }else{ + t.appendChild(n); + } + } + n.ui.focus(); + if(this.tree.hlDrop){ + n.ui.highlight(); + } + t.ui.endDrop(); + this.tree.fireEvent("nodedrop", de); + }, + + + afterNodeMoved : function(dd, data, e, targetNode, dropNode){ + if(this.tree.hlDrop){ + dropNode.ui.focus(); + dropNode.ui.highlight(); + } + 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; + Ext.fly(el).removeClass([ + "x-tree-drag-insert-above", + "x-tree-drag-insert-below", + "x-tree-drag-append"]); + this.lastInsertClass = "_noclass"; + } + }, + + + 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.getTreeEl(), 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); + this.tree.eventModel.disable(); + this.proxy.update(""); + data.node.ui.appendDDGhost(this.proxy.ghost.dom); + 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); + } +}); +} + +Ext.tree.TreeEditor = function(tree, config){ + config = config || {}; + var field = config.events ? config : new Ext.form.TextField(config); + Ext.tree.TreeEditor.superclass.constructor.call(this, field); + + this.tree = tree; + + if(!tree.rendered){ + tree.on('render', this.initEditor, this); + }else{ + this.initEditor(tree); + } +}; + +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){ + tree.on('beforeclick', this.beforeNodeClick, this); + this.on('complete', this.updateNode, this); + this.on('beforestartedit', this.fitToTree, this); + this.on('startedit', this.bindScroll, this, {delay:10}); + this.on('specialkey', this.onSpecialKey, this); + }, + + fitToTree : function(ed, el){ + var td = this.tree.getTreeEl().dom, nd = el.dom; + if(td.scrollLeft > nd.offsetLeft){ td.scrollLeft = nd.offsetLeft; + } + var w = Math.min( + this.maxWidth, + (td.clientWidth > 20 ? td.clientWidth : td.offsetWidth) - Math.max(0, nd.offsetLeft-td.scrollLeft) - 5); + this.setSize(w, ''); + }, + + triggerEdit : function(node){ + this.completeEdit(); + this.editNode = node; + this.startEdit(node.ui.textNode, node.text); + }, + + bindScroll : function(){ + this.tree.getTreeEl().on('scroll', this.cancelEdit, this); + }, + + beforeNodeClick : function(node, e){ + var sinceLast = (this.lastClick ? this.lastClick.getElapsed() : 0); + this.lastClick = new Date(); + if(sinceLast > this.editDelay && this.tree.getSelectionModel().isSelected(node)){ + e.stopEvent(); + this.triggerEdit(node); + return false; + } + }, + + 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){ + this.editNode.ui.focus(); + } + }, + + onSpecialKey : function(field, e){ + var k = e.getKey(); + if(k == e.ESC){ + e.stopEvent(); + this.cancelEdit(); + }else if(k == e.ENTER && !e.hasModifier()){ + e.stopEvent(); + this.completeEdit(); + } + } +}); + +Ext.menu.Menu = function(config){ + if(config instanceof Array){ + config = {items:config}; + } + Ext.apply(this, config); + this.id = this.id || Ext.id(); + this.addEvents( + + 'beforeshow', + + 'beforehide', + + 'show', + + 'hide', + + 'click', + + 'mouseover', + + 'mouseout', + + 'itemclick' + ); + Ext.menu.MenuMgr.register(this); + Ext.menu.Menu.superclass.constructor.call(this); + var mis = this.items; + this.items = new Ext.util.MixedCollection(); + if(mis){ + this.add.apply(this, mis); + } +}; + +Ext.extend(Ext.menu.Menu, Ext.util.Observable, { + + + + minWidth : 120, + + shadow : "sides", + + subMenuAlign : "tl-tr?", + + defaultAlign : "tl-bl?", + + allowOtherMenus : false, + + hidden:true, + + createEl : function(){ + return new Ext.Layer({ + cls: "x-menu", + shadow:this.shadow, + constrain: false, + parentEl: this.parentEl || document.body, + zindex:15000 + }); + }, + + render : function(){ + if(this.el){ + return; + } + var el = this.el = this.createEl(); + + this.keyNav = new Ext.menu.MenuNav(this); + + if(this.plain){ + el.addClass("x-menu-plain"); + } + if(this.cls){ + el.addClass(this.cls); + } + this.focusEl = el.createChild({ + tag: "a", cls: "x-menu-focus", href: "#", onclick: "return false;", tabIndex:"-1" + }); + var ul = el.createChild({tag: "ul", cls: "x-menu-list"}); + ul.on("click", this.onClick, this); + ul.on("mouseover", this.onMouseOver, this); + ul.on("mouseout", this.onMouseOut, this); + this.items.each(function(item){ + var li = document.createElement("li"); + li.className = "x-menu-list-item"; + ul.dom.appendChild(li); + item.render(li, this); + }, this); + this.ul = ul; + this.autoWidth(); + }, + + autoWidth : function(){ + var el = this.el, ul = this.ul; + if(!el){ + return; + } + var w = this.width; + if(w){ + el.setWidth(w); + }else if(Ext.isIE){ + el.setWidth(this.minWidth); + var t = el.dom.offsetWidth; el.setWidth(ul.getWidth()+el.getFrameWidth("lr")); + } + }, + + delayAutoWidth : function(){ + if(this.el){ + if(!this.awTask){ + this.awTask = new Ext.util.DelayedTask(this.autoWidth, this); + } + this.awTask.delay(20); + } + }, + + findTargetItem : function(e){ + var t = e.getTarget(".x-menu-list-item", this.ul, true); + if(t && t.menuItemId){ + return this.items.get(t.menuItemId); + } + }, + + onClick : function(e){ + var t; + if(t = this.findTargetItem(e)){ + t.onClick(e); + this.fireEvent("click", this, t, e); + } + }, + + setActiveItem : function(item, autoExpand){ + if(item != this.activeItem){ + if(this.activeItem){ + this.activeItem.deactivate(); + } + this.activeItem = item; + item.activate(autoExpand); + }else if(autoExpand){ + item.expandMenu(); + } + }, + + tryActivate : function(start, step){ + var items = this.items; + for(var i = start, len = items.length; i >= 0 && i < len; i+= step){ + var item = items.get(i); + if(!item.disabled && item.canActivate){ + this.setActiveItem(item, false); + return item; + } + } + return false; + }, + + onMouseOver : function(e){ + var t; + if(t = this.findTargetItem(e)){ + if(t.canActivate && !t.disabled){ + this.setActiveItem(t, true); + } + } + this.fireEvent("mouseover", this, e, t); + }, + + onMouseOut : function(e){ + var t; + if(t = this.findTargetItem(e)){ + if(t == this.activeItem && t.shouldDeactivate(e)){ + this.activeItem.deactivate(); + delete this.activeItem; + } + } + this.fireEvent("mouseout", this, e, t); + }, + + + isVisible : function(){ + return this.el && !this.hidden; + }, + + + show : function(el, pos, parentMenu){ + this.parentMenu = parentMenu; + if(!this.el){ + this.render(); + } + this.fireEvent("beforeshow", this); + this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign), parentMenu, false); + }, + + + showAt : function(xy, parentMenu, _e){ + this.parentMenu = parentMenu; + if(!this.el){ + this.render(); + } + if(_e !== false){ + this.fireEvent("beforeshow", this); + xy = this.el.adjustForConstraints(xy); + } + this.el.setXY(xy); + this.el.show(); + this.hidden = false; + this.focus(); + this.fireEvent("show", this); + }, + + + + focus : function(){ + if(!this.hidden){ + this.doFocus.defer(50, this); + } + }, + + doFocus : function(){ + if(!this.hidden){ + this.focusEl.focus(); + } + }, + + + hide : function(deep){ + if(this.el && this.isVisible()){ + this.fireEvent("beforehide", this); + if(this.activeItem){ + this.activeItem.deactivate(); + this.activeItem = null; + } + this.el.hide(); + this.hidden = true; + this.fireEvent("hide", this); + } + if(deep === true && this.parentMenu){ + this.parentMenu.hide(true); + } + }, + + + add : function(){ + var a = arguments, l = a.length, item; + for(var i = 0; i < l; i++){ + var el = a[i]; + if(el.render){ item = this.addItem(el); + }else if(typeof el == "string"){ if(el == "separator" || el == "-"){ + item = this.addSeparator(); + }else{ + item = this.addText(el); + } + }else if(el.tagName || el.el){ item = this.addElement(el); + }else if(typeof el == "object"){ Ext.applyIf(el, this.defaults); + item = this.addMenuItem(el); + } + } + return item; + }, + + + getEl : function(){ + if(!this.el){ + this.render(); + } + return this.el; + }, + + + addSeparator : function(){ + return this.addItem(new Ext.menu.Separator()); + }, + + + addElement : function(el){ + return this.addItem(new Ext.menu.BaseItem(el)); + }, + + + addItem : function(item){ + this.items.add(item); + if(this.ul){ + var li = document.createElement("li"); + li.className = "x-menu-list-item"; + this.ul.dom.appendChild(li); + item.render(li, this); + this.delayAutoWidth(); + } + return item; + }, + + + addMenuItem : function(config){ + if(!(config instanceof Ext.menu.Item)){ + if(typeof config.checked == "boolean"){ config = new Ext.menu.CheckItem(config); + }else{ + config = new Ext.menu.Item(config); + } + } + return this.addItem(config); + }, + + + addText : function(text){ + return this.addItem(new Ext.menu.TextItem(text)); + }, + + + insert : function(index, item){ + this.items.insert(index, item); + if(this.ul){ + var li = document.createElement("li"); + li.className = "x-menu-list-item"; + this.ul.dom.insertBefore(li, this.ul.dom.childNodes[index]); + item.render(li, this); + this.delayAutoWidth(); + } + return item; + }, + + + remove : function(item){ + this.items.removeKey(item.id); + item.destroy(); + }, + + + removeAll : function(){ + var f; + while(f = this.items.first()){ + this.remove(f); + } + } +}); + +Ext.menu.MenuNav = function(menu){ + Ext.menu.MenuNav.superclass.constructor.call(this, menu.el); + this.scope = this.menu = menu; +}; + +Ext.extend(Ext.menu.MenuNav, Ext.KeyNav, { + doRelay : function(e, h){ + var k = e.getKey(); + if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){ + this.menu.tryActivate(0, 1); + return false; + } + return h.call(this.scope || this, e, this.menu); + }, + + up : function(e, m){ + if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){ + m.tryActivate(m.items.length-1, -1); + } + }, + + down : function(e, m){ + if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){ + m.tryActivate(0, 1); + } + }, + + right : function(e, m){ + if(m.activeItem){ + m.activeItem.expandMenu(true); + } + }, + + left : function(e, m){ + m.hide(); + if(m.parentMenu && m.parentMenu.activeItem){ + m.parentMenu.activeItem.activate(); + } + }, + + enter : function(e, m){ + if(m.activeItem){ + e.stopPropagation(); + m.activeItem.onClick(e); + m.fireEvent("click", this, m.activeItem); + return true; + } + } +}); + +Ext.menu.MenuMgr = function(){ + var menus, active, groups = {}, attached = false, lastShow = new Date(); + + function init(){ + menus = {}; + active = new Ext.util.MixedCollection(); + Ext.getDoc().addKeyListener(27, function(){ + if(active.length > 0){ + hideAll(); + } + }); + } + + function hideAll(){ + if(active && active.length > 0){ + var c = active.clone(); + c.each(function(m){ + m.hide(); + }); + } + } + + function onHide(m){ + active.remove(m); + if(active.length < 1){ + Ext.getDoc().un("mousedown", onMouseDown); + attached = false; + } + } + + function onShow(m){ + var last = active.last(); + lastShow = new Date(); + active.add(m); + if(!attached){ + Ext.getDoc().on("mousedown", onMouseDown); + attached = true; + } + if(m.parentMenu){ + m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3); + m.parentMenu.activeChild = m; + }else if(last && last.isVisible()){ + m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3); + } + } + + function onBeforeHide(m){ + if(m.activeChild){ + m.activeChild.hide(); + } + if(m.autoHideTimer){ + clearTimeout(m.autoHideTimer); + delete m.autoHideTimer; + } + } + + function onBeforeShow(m){ + var pm = m.parentMenu; + if(!pm && !m.allowOtherMenus){ + hideAll(); + }else if(pm && pm.activeChild){ + pm.activeChild.hide(); + } + } + + function onMouseDown(e){ + if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){ + hideAll(); + } + } + + function onBeforeCheck(mi, state){ + if(state){ + var g = groups[mi.group]; + for(var i = 0, l = g.length; i < l; i++){ + if(g[i] != mi){ + g[i].setChecked(false); + } + } + } + } + + return { + + + hideAll : function(){ + hideAll(); + }, + + register : function(menu){ + if(!menus){ + init(); + } + menus[menu.id] = menu; + menu.on("beforehide", onBeforeHide); + menu.on("hide", onHide); + menu.on("beforeshow", onBeforeShow); + menu.on("show", onShow); + var g = menu.group; + if(g && menu.events["checkchange"]){ + if(!groups[g]){ + groups[g] = []; + } + groups[g].push(menu); + menu.on("checkchange", onCheck); + } + }, + + + get : function(menu){ + if(typeof menu == "string"){ return menus[menu]; + }else if(menu.events){ return menu; + }else if(typeof menu.length == 'number'){ return new Ext.menu.Menu({items:menu}); + }else{ return new Ext.menu.Menu(menu); + } + }, + + unregister : function(menu){ + delete menus[menu.id]; + menu.un("beforehide", onBeforeHide); + menu.un("hide", onHide); + menu.un("beforeshow", onBeforeShow); + menu.un("show", onShow); + var g = menu.group; + if(g && menu.events["checkchange"]){ + groups[g].remove(menu); + menu.un("checkchange", onCheck); + } + }, + + registerCheckable : function(menuItem){ + var g = menuItem.group; + if(g){ + if(!groups[g]){ + groups[g] = []; + } + groups[g].push(menuItem); + menuItem.on("beforecheckchange", onBeforeCheck); + } + }, + + unregisterCheckable : function(menuItem){ + var g = menuItem.group; + if(g){ + groups[g].remove(menuItem); + menuItem.un("beforecheckchange", onBeforeCheck); + } + }, + + getCheckedItem : function(groupId){ + var g = groups[groupId]; + if(g){ + for(var i = 0, l = g.length; i < l; i++){ + if(g[i].checked){ + return g[i]; + } + } + } + return null; + }, + + setCheckedItem : function(groupId, itemId){ + var g = groups[groupId]; + if(g){ + for(var i = 0, l = g.length; i < l; i++){ + if(g[i].id == itemId){ + g[i].setChecked(true); + } + } + } + return null; + } + }; +}(); + + +Ext.menu.BaseItem = function(config){ + Ext.menu.BaseItem.superclass.constructor.call(this, config); + + this.addEvents( + + 'click', + + 'activate', + + 'deactivate' + ); + + if(this.handler){ + this.on("click", this.handler, this.scope); + } +}; + +Ext.extend(Ext.menu.BaseItem, Ext.Component, { + + + + canActivate : false, + + activeClass : "x-menu-item-active", + + hideOnClick : true, + + hideDelay : 100, + + ctype: "Ext.menu.BaseItem", + + actionMode : "container", + + render : function(container, parentMenu){ + this.parentMenu = parentMenu; + Ext.menu.BaseItem.superclass.render.call(this, container); + this.container.menuItemId = this.id; + }, + + onRender : function(container, position){ + this.el = Ext.get(this.el); + container.dom.appendChild(this.el.dom); + }, + + + setHandler : function(handler, scope){ + if(this.handler){ + this.un("click", this.handler, this.scope); + } + this.on("click", this.handler = handler, this.scope = scope); + }, + + onClick : function(e){ + if(!this.disabled && this.fireEvent("click", this, e) !== false + && this.parentMenu.fireEvent("itemclick", this, e) !== false){ + this.handleClick(e); + }else{ + e.stopEvent(); + } + }, + + activate : function(){ + if(this.disabled){ + return false; + } + var li = this.container; + li.addClass(this.activeClass); + this.region = li.getRegion().adjust(2, 2, -2, -2); + this.fireEvent("activate", this); + 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){ + if(this.hideOnClick){ + this.parentMenu.hide.defer(this.hideDelay, this.parentMenu, [true]); + } + }, + + expandMenu : function(autoActivate){ + }, + + hideMenu : function(){ + } +}); + +Ext.menu.TextItem = function(text){ + this.text = text; + Ext.menu.TextItem.superclass.constructor.call(this); +}; + +Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, { + + + hideOnClick : false, + + itemCls : "x-menu-text", + + onRender : function(){ + var s = document.createElement("span"); + s.className = this.itemCls; + s.innerHTML = this.text; + this.el = s; + Ext.menu.TextItem.superclass.onRender.apply(this, arguments); + } +}); + +Ext.menu.Separator = function(config){ + Ext.menu.Separator.superclass.constructor.call(this, config); +}; + +Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, { + + itemCls : "x-menu-sep", + + hideOnClick : false, + + onRender : function(li){ + var s = document.createElement("span"); + s.className = this.itemCls; + s.innerHTML = " "; + this.el = s; + li.addClass("x-menu-sep-li"); + Ext.menu.Separator.superclass.onRender.apply(this, arguments); + } +}); + +Ext.menu.Item = function(config){ + Ext.menu.Item.superclass.constructor.call(this, config); + if(this.menu){ + this.menu = Ext.menu.MenuMgr.get(this.menu); + } +}; +Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { + + + + + + + itemCls : "x-menu-item", + + canActivate : true, + + showDelay: 200, + hideDelay: 200, + + ctype: "Ext.menu.Item", + + onRender : function(container, position){ + var el = document.createElement("a"); + el.hideFocus = true; + el.unselectable = "on"; + el.href = this.href || "#"; + if(this.hrefTarget){ + el.target = this.hrefTarget; + } + el.className = this.itemCls + (this.menu ? " x-menu-item-arrow" : "") + (this.cls ? " " + this.cls : ""); + el.innerHTML = String.format( + '{1}', + this.icon || Ext.BLANK_IMAGE_URL, this.text, this.iconCls || ''); + this.el = el; + Ext.menu.Item.superclass.onRender.call(this, container, position); + }, + + + setText : function(text){ + this.text = text; + if(this.rendered){ + this.el.update(String.format( + '{1}', + this.icon || Ext.BLANK_IMAGE_URL, this.text, this.iconCls || '')); + this.parentMenu.autoWidth(); + } + }, + + + setIconClass : function(cls){ + var oldCls = this.iconCls; + this.iconCls = cls; + if(this.rendered){ + this.el.child('img.x-menu-item-icon').replaceClass(oldCls, this.iconCls); + } + }, + + handleClick : function(e){ + 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(); + if(autoExpand){ + this.expandMenu(); + } + } + return true; + }, + + shouldDeactivate : function(e){ + if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){ + if(this.menu && this.menu.isVisible()){ + return !this.menu.getEl().getRegion().contains(e.getPoint()); + } + return true; + } + 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); + delete this.hideTimer; + if(!this.menu.isVisible() && !this.showTimer){ + this.showTimer = this.deferExpand.defer(this.showDelay, this, [autoActivate]); + }else if (this.menu.isVisible() && autoActivate){ + this.menu.tryActivate(0, 1); + } + } + }, + + deferExpand : function(autoActivate){ + delete this.showTimer; + this.menu.show(this.container, this.parentMenu.subMenuAlign || "tl-tr?", this.parentMenu); + if(autoActivate){ + this.menu.tryActivate(0, 1); + } + }, + + hideMenu : function(){ + clearTimeout(this.showTimer); + delete this.showTimer; + if(!this.hideTimer && this.menu && this.menu.isVisible()){ + this.hideTimer = this.deferHide.defer(this.hideDelay, this); + } + }, + + deferHide : function(){ + delete this.hideTimer; + this.menu.hide(); + } +}); + +Ext.menu.CheckItem = function(config){ + Ext.menu.CheckItem.superclass.constructor.call(this, config); + this.addEvents( + + "beforecheckchange" , + + "checkchange" + ); + + if(this.checkHandler){ + this.on('checkchange', this.checkHandler, this.scope); + } + Ext.menu.MenuMgr.registerCheckable(this); +}; +Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, { + + + itemCls : "x-menu-item x-menu-check-item", + + groupClass : "x-menu-group-item", + + + checked: false, + + ctype: "Ext.menu.CheckItem", + + onRender : function(c){ + Ext.menu.CheckItem.superclass.onRender.apply(this, arguments); + if(this.group){ + this.el.addClass(this.groupClass); + } + if(this.checked){ + this.checked = false; + this.setChecked(true, true); + } + }, + + destroy : function(){ + Ext.menu.MenuMgr.unregisterCheckable(this); + Ext.menu.CheckItem.superclass.destroy.apply(this, arguments); + }, + + + setChecked : function(state, suppressEvent){ + if(this.checked != state && this.fireEvent("beforecheckchange", this, state) !== false){ + if(this.container){ + this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked"); + } + this.checked = state; + if(suppressEvent !== true){ + this.fireEvent("checkchange", this, state); + } + } + }, + + handleClick : function(e){ + if(!this.disabled && !(this.checked && this.group)){ this.setChecked(!this.checked); + } + Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments); + } +}); + +Ext.menu.Adapter = function(component, config){ + Ext.menu.Adapter.superclass.constructor.call(this, config); + this.component = component; +}; +Ext.extend(Ext.menu.Adapter, Ext.menu.BaseItem, { + canActivate : true, + + onRender : function(container, position){ + this.component.render(container); + this.el = this.component.getEl(); + }, + + activate : function(){ + if(this.disabled){ + return false; + } + this.component.focus(); + this.fireEvent("activate", this); + return true; + }, + + deactivate : function(){ + this.fireEvent("deactivate", this); + }, + + disable : function(){ + this.component.disable(); + Ext.menu.Adapter.superclass.disable.call(this); + }, + + enable : function(){ + this.component.enable(); + Ext.menu.Adapter.superclass.enable.call(this); + } +}); + +Ext.menu.DateItem = function(config){ + Ext.menu.DateItem.superclass.constructor.call(this, new Ext.DatePicker(config), config); + + this.picker = this.component; + this.addEvents('select'); + + this.picker.on("render", function(picker){ + picker.getEl().swallowEvent("click"); + picker.container.addClass("x-menu-date-item"); + }); + + this.picker.on("select", this.onSelect, this); +}; + +Ext.extend(Ext.menu.DateItem, Ext.menu.Adapter, { + onSelect : function(picker, date){ + this.fireEvent("select", this, date, picker); + Ext.menu.DateItem.superclass.handleClick.call(this); + } +}); + +Ext.menu.ColorItem = function(config){ + Ext.menu.ColorItem.superclass.constructor.call(this, new Ext.ColorPalette(config), config); + + this.palette = this.component; + this.relayEvents(this.palette, ["select"]); + if(this.selectHandler){ + this.on('select', this.selectHandler, this.scope); + } +}; +Ext.extend(Ext.menu.ColorItem, Ext.menu.Adapter); + +Ext.menu.DateMenu = function(config){ + Ext.menu.DateMenu.superclass.constructor.call(this, config); + this.plain = true; + var di = new Ext.menu.DateItem(config); + this.add(di); + + this.picker = di.picker; + + this.relayEvents(di, ["select"]); + + this.on('beforeshow', function(){ + if(this.picker){ + this.picker.hideMonthPicker(true); + } + }, this); +}; +Ext.extend(Ext.menu.DateMenu, Ext.menu.Menu, { + cls:'x-date-menu' +}); + +Ext.menu.ColorMenu = function(config){ + Ext.menu.ColorMenu.superclass.constructor.call(this, config); + this.plain = true; + var ci = new Ext.menu.ColorItem(config); + this.add(ci); + + this.palette = ci.palette; + + this.relayEvents(ci, ["select"]); +}; +Ext.extend(Ext.menu.ColorMenu, Ext.menu.Menu); + +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, + + + + + + isFormField : true, + + 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.hiddenName || ''); + }, + + onRender : function(ct, position){ + Ext.form.Field.superclass.onRender.call(this, ct, position); + if(!this.el){ + var cfg = this.getAutoCreate(); + if(!cfg.name){ + cfg.name = this.name || this.id; + } + if(this.inputType){ + cfg.type = this.inputType; + } + this.el = ct.createChild(cfg, position); + } + var type = this.el.dom.type; + if(type){ + if(type == 'password'){ + type = 'text'; + } + this.el.addClass('x-form-'+type); + } + if(this.readOnly){ + this.el.dom.readOnly = true; + } + if(this.tabIndex !== undefined){ + this.el.dom.setAttribute('tabIndex', this.tabIndex); + } + + this.el.addClass([this.fieldClass, this.cls]); + this.initValue(); + }, + + initValue : function(){ + if(this.value !== undefined){ + this.setValue(this.value); + }else if(this.el.dom.value.length > 0){ + this.setValue(this.el.dom.value); + } + }, + + + isDirty : function() { + if(this.disabled) { + return false; + } + return String(this.getValue()) !== String(this.originalValue); + }, + + afterRender : function(){ + Ext.form.Field.superclass.afterRender.call(this); + this.initEvents(); + }, + + fireKey : function(e){ + if(e.isSpecialKey()){ + this.fireEvent("specialkey", this, e); + } + }, + + + reset : function(){ + this.setValue(this.originalValue); + this.clearInvalid(); + }, + + initEvents : function(){ + this.el.on(Ext.isIE ? "keydown" : "keypress", this.fireKey, this); + this.el.on("focus", this.onFocus, this); + this.el.on("blur", this.onBlur, this); + + this.originalValue = this.getValue(); + }, + + onFocus : function(){ + if(!Ext.isOpera && this.focusClass){ this.el.addClass(this.focusClass); + } + if(!this.hasFocus){ + this.hasFocus = true; + this.startValue = this.getValue(); + this.fireEvent("focus", this); + } + }, + + beforeBlur : Ext.emptyFn, + + onBlur : function(){ + this.beforeBlur(); + if(!Ext.isOpera && this.focusClass){ this.el.removeClass(this.focusClass); + } + this.hasFocus = false; + if(this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur"){ + this.validate(); + } + var v = this.getValue(); + if(String(v) !== String(this.startValue)){ + this.fireEvent('change', this, v, this.startValue); + } + this.fireEvent("blur", this); + }, + + + isValid : function(preventMark){ + if(this.disabled){ + return true; + } + var restore = this.preventMark; + this.preventMark = preventMark === true; + var v = this.validateValue(this.processValue(this.getRawValue())); + this.preventMark = restore; + return v; + }, + + + validate : function(){ + if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){ + this.clearInvalid(); + return true; + } + return false; + }, + + processValue : function(value){ + return value; + }, + + validateValue : function(value){ + return true; + }, + + + markInvalid : function(msg){ + if(!this.rendered || this.preventMark){ return; + } + this.el.addClass(this.invalidClass); + msg = msg || this.invalidText; + switch(this.msgTarget){ + case 'qtip': + this.el.dom.qtip = msg; + this.el.dom.qclass = 'x-form-invalid-tip'; + if(Ext.QuickTips){ Ext.QuickTips.enable(); + } + break; + case 'title': + this.el.dom.title = msg; + break; + case 'under': + if(!this.errorEl){ + var elp = this.el.findParent('.x-form-element', 5, true); + this.errorEl = elp.createChild({cls:'x-form-invalid-msg'}); + this.errorEl.setWidth(elp.getWidth(true)-20); + } + this.errorEl.update(msg); + Ext.form.Field.msgFx[this.msgFx].show(this.errorEl, this); + break; + case 'side': + if(!this.errorIcon){ + var elp = this.el.findParent('.x-form-element', 5, true); + this.errorIcon = elp.createChild({cls:'x-form-invalid-icon'}); + } + this.alignErrorIcon(); + this.errorIcon.dom.qtip = msg; + this.errorIcon.dom.qclass = 'x-form-invalid-tip'; + this.errorIcon.show(); + this.on('resize', this.alignErrorIcon, this); + break; + default: + var t = Ext.getDom(this.msgTarget); + t.innerHTML = msg; + t.style.display = this.msgDisplay; + break; + } + this.fireEvent('invalid', this, msg); + }, + + alignErrorIcon : function(){ + this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]); + }, + + + clearInvalid : function(){ + if(!this.rendered || this.preventMark){ return; + } + this.el.removeClass(this.invalidClass); + switch(this.msgTarget){ + case 'qtip': + this.el.dom.qtip = ''; + break; + case 'title': + this.el.dom.title = ''; + break; + case 'under': + if(this.errorEl){ + Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl, this); + } + break; + case 'side': + if(this.errorIcon){ + this.errorIcon.dom.qtip = ''; + this.errorIcon.hide(); + this.un('resize', this.alignErrorIcon, this); + } + break; + default: + var t = Ext.getDom(this.msgTarget); + t.innerHTML = ''; + t.style.display = 'none'; + break; + } + this.fireEvent('valid', this); + }, + + + getRawValue : function(){ + var v = this.rendered ? this.el.getValue() : Ext.value(this.value, ''); + if(v === this.emptyText){ + v = ''; + } + return v; + }, + + + getValue : function(){ + if(!this.rendered) { + return this.value; + } + var v = this.el.getValue(); + if(v === this.emptyText || v === undefined){ + v = ''; + } + return v; + }, + + + setRawValue : function(v){ + return this.el.dom.value = (v === null || v === undefined ? '' : v); + }, + + + setValue : function(v){ + this.value = v; + if(this.rendered){ + this.el.dom.value = (v === null || v === undefined ? '' : v); + this.validate(); + } + }, + + adjustSize : function(w, h){ + var s = Ext.form.Field.superclass.adjustSize.call(this, w, h); + s.width = this.adjustWidth(this.el.dom.tagName, s.width); + return s; + }, + + adjustWidth : function(tag, w){ + tag = tag.toLowerCase(); + if(typeof w == 'number' && !Ext.isSafari){ + if(Ext.isIE && (tag == 'input' || tag == 'textarea')){ + if(tag == 'input' && !Ext.isStrict){ + return w - 3; + } + if(tag == 'input' && Ext.isStrict){ + return w - (Ext.isIE6 ? 4 : 1); + } + if(tag = 'textarea' && Ext.isStrict){ + return w-2; + } + }else if(Ext.isOpera && Ext.isStrict){ + if(tag == 'input'){ + return w + 2; + } + if(tag = 'textarea'){ + return w-2; + } + } + } + return w; + } +}); + + +Ext.form.Field.msgFx = { + normal : { + show: function(msgEl, f){ + msgEl.setDisplayed('block'); + }, + + hide : function(msgEl, f){ + msgEl.setDisplayed(false).update(''); + } + }, + + slide : { + show: function(msgEl, f){ + msgEl.slideIn('t', {stopFx:true}); + }, + + hide : function(msgEl, f){ + msgEl.slideOut('t', {stopFx:true,useDisplay:true}); + } + }, + + slideRight : { + show: function(msgEl, f){ + msgEl.fixDisplay(); + msgEl.alignTo(f.el, 'tl-tr'); + msgEl.slideIn('l', {stopFx:true}); + }, + + hide : function(msgEl, f){ + msgEl.slideOut('l', {stopFx:true,useDisplay:true}); + } + } +}; +Ext.reg('field', Ext.form.Field); + + +Ext.form.TextField = Ext.extend(Ext.form.Field, { + + + grow : false, + + growMin : 30, + + growMax : 800, + + vtype : null, + + maskRe : null, + + disableKeyFilter : false, + + allowBlank : true, + + minLength : 0, + + maxLength : Number.MAX_VALUE, + + minLengthText : "The minimum length for this field is {0}", + + maxLengthText : "The maximum length for this field is {0}", + + selectOnFocus : false, + + blankText : "This field is required", + + validator : null, + + regex : null, + + regexText : "", + + emptyText : null, + + emptyClass : 'x-form-empty-field', + + initComponent : function(){ + Ext.form.TextField.superclass.initComponent.call(this); + this.addEvents( + + 'autosize' + ); + }, + + initEvents : function(){ + Ext.form.TextField.superclass.initEvents.call(this); + if(this.validationEvent == 'keyup'){ + this.validationTask = new Ext.util.DelayedTask(this.validate, this); + this.el.on('keyup', this.filterValidation, this); + } + else if(this.validationEvent !== false){ + this.el.on(this.validationEvent, this.validate, this, {buffer: this.validationDelay}); + } + if(this.selectOnFocus || this.emptyText){ + this.on("focus", this.preFocus, this); + if(this.emptyText){ + this.on('blur', this.postBlur, this); + this.applyEmptyText(); + } + } + if(this.maskRe || (this.vtype && this.disableKeyFilter !== true && (this.maskRe = Ext.form.VTypes[this.vtype+'Mask']))){ + this.el.on("keypress", this.filterKeys, this); + } + if(this.grow){ + this.el.on("keyup", this.onKeyUp, this, {buffer:50}); + this.el.on("click", this.autoSize, this); + } + }, + + processValue : function(value){ + if(this.stripCharsRe){ + var newValue = value.replace(this.stripCharsRe, ''); + if(newValue !== value){ + this.setRawValue(newValue); + return newValue; + } + } + return value; + }, + + filterValidation : function(e){ + if(!e.isNavKeyPress()){ + this.validationTask.delay(this.validationDelay); + } + }, + + onKeyUp : function(e){ + if(!e.isNavKeyPress()){ + this.autoSize(); + } + }, + + + reset : function(){ + Ext.form.TextField.superclass.reset.call(this); + this.applyEmptyText(); + }, + + applyEmptyText : function(){ + if(this.rendered && this.emptyText && this.getRawValue().length < 1){ + this.setRawValue(this.emptyText); + this.el.addClass(this.emptyClass); + } + }, + + preFocus : function(){ + if(this.emptyText){ + if(this.el.dom.value == this.emptyText){ + this.setRawValue(''); + } + this.el.removeClass(this.emptyClass); + } + if(this.selectOnFocus){ + this.el.dom.select(); + } + }, + + postBlur : function(){ + this.applyEmptyText(); + }, + + filterKeys : function(e){ + var k = e.getKey(); + if(!Ext.isIE && (e.isNavKeyPress() || k == e.BACKSPACE || (k == e.DELETE && e.button == -1))){ + return; + } + var c = e.getCharCode(), cc = String.fromCharCode(c); + if(Ext.isIE && (e.isSpecialKey() || !cc)){ + return; + } + if(!this.maskRe.test(cc)){ + e.stopEvent(); + } + }, + + setValue : function(v){ + if(this.emptyText && this.el && v !== undefined && v !== null && v !== ''){ + this.el.removeClass(this.emptyClass); + } + Ext.form.TextField.superclass.setValue.apply(this, arguments); + this.applyEmptyText(); + this.autoSize(); + }, + + + validateValue : function(value){ + if(value.length < 1 || value === this.emptyText){ if(this.allowBlank){ + this.clearInvalid(); + return true; + }else{ + this.markInvalid(this.blankText); + return false; + } + } + if(value.length < this.minLength){ + this.markInvalid(String.format(this.minLengthText, this.minLength)); + return false; + } + if(value.length > this.maxLength){ + this.markInvalid(String.format(this.maxLengthText, this.maxLength)); + return false; + } + if(this.vtype){ + var vt = Ext.form.VTypes; + if(!vt[this.vtype](value, this)){ + this.markInvalid(this.vtypeText || vt[this.vtype +'Text']); + return false; + } + } + if(typeof this.validator == "function"){ + var msg = this.validator(value); + if(msg !== true){ + this.markInvalid(msg); + return false; + } + } + if(this.regex && !this.regex.test(value)){ + this.markInvalid(this.regexText); + return false; + } + return true; + }, + + + selectText : function(start, end){ + var v = this.getRawValue(); + if(v.length > 0){ + start = start === undefined ? 0 : start; + end = end === undefined ? v.length : end; + var d = this.el.dom; + if(d.setSelectionRange){ + d.setSelectionRange(start, end); + }else if(d.createTextRange){ + var range = d.createTextRange(); + range.moveStart("character", start); + range.moveEnd("character", v.length-end); + range.select(); + } + } + }, + + + autoSize : function(){ + if(!this.grow || !this.rendered){ + return; + } + if(!this.metrics){ + this.metrics = Ext.util.TextMetrics.createInstance(this.el); + } + var el = this.el; + var v = el.dom.value; + var d = document.createElement('div'); + d.appendChild(document.createTextNode(v)); + v = d.innerHTML; + d = null; + v += " "; + var w = Math.min(this.growMax, Math.max(this.metrics.getWidth(v) + 10, this.growMin)); + this.el.setWidth(w); + this.fireEvent("autosize", this, w); + } +}); +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, + + + autoSize: Ext.emptyFn, + monitorTab : true, + deferHeight : true, + mimicing : false, + + onResize : function(w, h){ + Ext.form.TriggerField.superclass.onResize.call(this, w, h); + if(typeof w == 'number'){ + this.el.setWidth(this.adjustWidth('input', w - this.trigger.getWidth())); + } + this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); + }, + + adjustSize : Ext.BoxComponent.prototype.adjustSize, + + getResizeEl : function(){ + return this.wrap; + }, + + getPositionEl : function(){ + return this.wrap; + }, + + alignErrorIcon : function(){ + this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]); + }, + + onRender : function(ct, position){ + Ext.form.TriggerField.superclass.onRender.call(this, ct, position); + this.wrap = this.el.wrap({cls: "x-form-field-wrap"}); + this.trigger = this.wrap.createChild(this.triggerConfig || + {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}); + if(this.hideTrigger){ + this.trigger.setDisplayed(false); + } + this.initTrigger(); + if(!this.width){ + this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); + } + }, + + initTrigger : function(){ + this.trigger.on("click", this.onTriggerClick, this, {preventDefault:true}); + this.trigger.addClassOnOver('x-form-trigger-over'); + this.trigger.addClassOnClick('x-form-trigger-click'); + }, + + onDestroy : function(){ + if(this.trigger){ + this.trigger.removeAllListeners(); + this.trigger.remove(); + } + if(this.wrap){ + this.wrap.remove(); + } + Ext.form.TriggerField.superclass.onDestroy.call(this); + }, + + onFocus : function(){ + Ext.form.TriggerField.superclass.onFocus.call(this); + if(!this.mimicing){ + this.wrap.addClass('x-trigger-wrap-focus'); + this.mimicing = true; + Ext.get(Ext.isIE ? document.body : document).on("mousedown", this.mimicBlur, this, {delay: 10}); + if(this.monitorTab){ + this.el.on("keydown", this.checkTab, this); + } + } + }, + + checkTab : function(e){ + if(e.getKey() == e.TAB){ + this.triggerBlur(); + } + }, + + onBlur : function(){ + }, + + mimicBlur : function(e){ + if(!this.wrap.contains(e.target) && this.validateBlur(e)){ + this.triggerBlur(); + } + }, + + triggerBlur : function(){ + this.mimicing = false; + Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur); + if(this.monitorTab){ + this.el.un("keydown", this.checkTab, this); + } + this.beforeBlur(); + this.wrap.removeClass('x-trigger-wrap-focus'); + Ext.form.TriggerField.superclass.onBlur.call(this); + }, + + beforeBlur : Ext.emptyFn, + + validateBlur : function(e){ + return true; + }, + + onDisable : function(){ + Ext.form.TriggerField.superclass.onDisable.call(this); + if(this.wrap){ + this.wrap.addClass('x-item-disabled'); + } + }, + + onEnable : function(){ + Ext.form.TriggerField.superclass.onEnable.call(this); + if(this.wrap){ + this.wrap.removeClass('x-item-disabled'); + } + }, + + + onShow : function(){ + if(this.wrap){ + this.wrap.dom.style.display = ''; + this.wrap.dom.style.visibility = 'visible'; + } + }, + + onHide : function(){ + this.wrap.dom.style.display = 'none'; + }, + + + onTriggerClick : Ext.emptyFn + + + + +}); + +Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, { + initComponent : function(){ + Ext.form.TwinTriggerField.superclass.initComponent.call(this); + + this.triggerConfig = { + tag:'span', cls:'x-form-twin-triggers', cn:[ + {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.trigger1Class}, + {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.trigger2Class} + ]}; + }, + + getTrigger : function(index){ + return this.triggers[index]; + }, + + initTrigger : function(){ + var ts = this.trigger.select('.x-form-trigger', true); + this.wrap.setStyle('overflow', 'hidden'); + var triggerField = this; + ts.each(function(t, all, index){ + t.hide = function(){ + var w = triggerField.wrap.getWidth(); + this.dom.style.display = 'none'; + triggerField.el.setWidth(w-triggerField.trigger.getWidth()); + }; + t.show = function(){ + var w = triggerField.wrap.getWidth(); + this.dom.style.display = ''; + triggerField.el.setWidth(w-triggerField.trigger.getWidth()); + }; + var triggerIndex = 'Trigger'+(index+1); + + if(this['hide'+triggerIndex]){ + t.dom.style.display = 'none'; + } + t.on("click", this['on'+triggerIndex+'Click'], this, {preventDefault:true}); + t.addClassOnOver('x-form-trigger-over'); + t.addClassOnClick('x-form-trigger-click'); + }, this); + this.triggers = ts.elements; + }, + + onTrigger1Click : Ext.emptyFn, + onTrigger2Click : Ext.emptyFn +}); +Ext.reg('trigger', Ext.form.TriggerField); + +Ext.form.TextArea = Ext.extend(Ext.form.TextField, { + + growMin : 60, + + growMax: 1000, + growAppend : ' \n ', + growPad : 0, + + enterIsSpecial : false, + + + preventScrollbars: false, + + + onRender : function(ct, position){ + if(!this.el){ + this.defaultAutoCreate = { + tag: "textarea", + style:"width:100px;height:60px;", + autocomplete: "off" + }; + } + Ext.form.TextArea.superclass.onRender.call(this, ct, position); + if(this.grow){ + this.textSizeEl = Ext.DomHelper.append(document.body, { + tag: "pre", cls: "x-form-grow-sizer" + }); + if(this.preventScrollbars){ + this.el.setStyle("overflow", "hidden"); + } + this.el.setHeight(this.growMin); + } + }, + + onDestroy : function(){ + if(this.textSizeEl){ + Ext.removeNode(this.textSizeEl); + } + Ext.form.TextArea.superclass.onDestroy.call(this); + }, + + fireKey : function(e){ + if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || e.hasModifier()))){ + this.fireEvent("specialkey", this, e); + } + }, + + onKeyUp : function(e){ + if(!e.isNavKeyPress() || e.getKey() == e.ENTER){ + this.autoSize(); + } + }, + + + autoSize : function(){ + if(!this.grow || !this.textSizeEl){ + return; + } + var el = this.el; + var v = el.dom.value; + var ts = this.textSizeEl; + ts.innerHTML = ''; + ts.appendChild(document.createTextNode(v)); + v = ts.innerHTML; + + Ext.fly(ts).setWidth(this.el.getWidth()); + if(v.length < 1){ + v = "  "; + }else{ + if(Ext.isIE){ + v = v.replace(/\n/g, '

     

    '); + } + v += this.growAppend; + } + ts.innerHTML = v; + var h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin)+this.growPad); + if(h != this.lastHeight){ + this.lastHeight = h; + this.el.setHeight(h); + this.fireEvent("autosize", this, h); + } + } +}); +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", + + initEvents : function(){ + Ext.form.NumberField.superclass.initEvents.call(this); + var allowed = this.baseChars+''; + if(this.allowDecimals){ + allowed += this.decimalSeparator; + } + if(this.allowNegative){ + allowed += "-"; + } + this.stripCharsRe = new RegExp('[^'+allowed+']', 'gi'); + var keyPress = function(e){ + var k = e.getKey(); + if(!Ext.isIE && (e.isSpecialKey() || k == e.BACKSPACE || k == e.DELETE)){ + return; + } + var c = e.getCharCode(); + if(allowed.indexOf(String.fromCharCode(c)) === -1){ + e.stopEvent(); + } + }; + this.el.on("keypress", keyPress, this); + }, + + validateValue : function(value){ + if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){ + return false; + } + if(value.length < 1){ return true; + } + value = String(value).replace(this.decimalSeparator, "."); + if(isNaN(value)){ + this.markInvalid(String.format(this.nanText, value)); + return false; + } + var num = this.parseValue(value); + if(num < this.minValue){ + this.markInvalid(String.format(this.minText, this.minValue)); + return false; + } + if(num > this.maxValue){ + this.markInvalid(String.format(this.maxText, this.maxValue)); + return false; + } + return true; + }, + + getValue : function(){ + return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this))); + }, + + setValue : function(v){ + Ext.form.NumberField.superclass.setValue.call(this, String(parseFloat(v)).replace(".", this.decimalSeparator)); + }, + + 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(v){ + this.setValue(this.fixPrecision(v)); + } + } +}); +Ext.reg('numberfield', Ext.form.NumberField); + +Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { + + format : "m/d/y", + + altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d", + + disabledDays : null, + + disabledDaysText : "Disabled", + + disabledDates : null, + + disabledDatesText : "Disabled", + + minValue : null, + + maxValue : null, + + 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', + + + defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"}, + + initComponent : function(){ + Ext.form.DateField.superclass.initComponent.call(this); + if(typeof this.minValue == "string"){ + this.minValue = this.parseDate(this.minValue); + } + if(typeof this.maxValue == "string"){ + this.maxValue = this.parseDate(this.maxValue); + } + this.ddMatch = null; + if(this.disabledDates){ + var dd = this.disabledDates; + var re = "(?:"; + for(var i = 0; i < dd.length; i++){ + re += dd[i]; + if(i != dd.length-1) re += "|"; + } + this.ddMatch = new RegExp(re + ")"); + } + }, + + validateValue : function(value){ + value = this.formatDate(value); + if(!Ext.form.DateField.superclass.validateValue.call(this, value)){ + return false; + } + if(value.length < 1){ return true; + } + var svalue = value; + value = this.parseDate(value); + if(!value){ + this.markInvalid(String.format(this.invalidText, svalue, this.format)); + return false; + } + var time = value.getTime(); + if(this.minValue && time < this.minValue.getTime()){ + this.markInvalid(String.format(this.minText, this.formatDate(this.minValue))); + return false; + } + if(this.maxValue && time > this.maxValue.getTime()){ + this.markInvalid(String.format(this.maxText, this.formatDate(this.maxValue))); + return false; + } + if(this.disabledDays){ + var day = value.getDay(); + for(var i = 0; i < this.disabledDays.length; i++) { + if(day === this.disabledDays[i]){ + this.markInvalid(this.disabledDaysText); + return false; + } + } + } + var fvalue = this.formatDate(value); + if(this.ddMatch && this.ddMatch.test(fvalue)){ + this.markInvalid(String.format(this.disabledDatesText, fvalue)); + return false; + } + return true; + }, + + validateBlur : function(){ + return !this.menu || !this.menu.isVisible(); + }, + + + getValue : function(){ + return this.parseDate(Ext.form.DateField.superclass.getValue.call(this)) || ""; + }, + + + setValue : function(date){ + Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date))); + }, + + parseDate : function(value){ + if(!value || value instanceof Date){ + return value; + } + var v = Date.parseDate(value, this.format); + if(!v && this.altFormats){ + if(!this.altFormatsArray){ + this.altFormatsArray = this.altFormats.split("|"); + } + for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){ + v = Date.parseDate(value, this.altFormatsArray[i]); + } + } + return v; + }, + + onDestroy : function(){ + if(this.wrap){ + this.wrap.remove(); + } + Ext.form.DateField.superclass.onDestroy.call(this); + }, + + formatDate : function(date){ + return (!date || !(date instanceof Date)) ? + date : date.dateFormat(this.format); + }, + + menuListeners : { + select: function(m, d){ + this.setValue(d); + }, + show : function(){ this.onFocus(); + }, + hide : function(){ + this.focus.defer(10, this); + var ml = this.menuListeners; + this.menu.un("select", ml.select, this); + this.menu.un("show", ml.show, this); + this.menu.un("hide", ml.hide, this); + } + }, + + onTriggerClick : function(){ + if(this.disabled){ + return; + } + if(this.menu == null){ + this.menu = new Ext.menu.DateMenu(); + } + Ext.apply(this.menu.picker, { + minDate : this.minValue, + maxDate : this.maxValue, + disabledDatesRE : this.ddMatch, + disabledDatesText : this.disabledDatesText, + disabledDays : this.disabledDays, + disabledDaysText : this.disabledDaysText, + format : this.format, + minText : String.format(this.minText, this.formatDate(this.minValue)), + maxText : String.format(this.maxText, this.formatDate(this.maxValue)) + }); + this.menu.on(Ext.apply({}, this.menuListeners, { + scope:this + })); + this.menu.picker.setValue(this.getValue() || new Date()); + this.menu.show(this.el, "tl-bl?"); + }, + + beforeBlur : function(){ + var v = this.parseDate(this.getRawValue()); + if(v){ + this.setValue(v); + } + } + + + + + +}); +Ext.reg('datefield', Ext.form.DateField); + +Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { + + + + + + + defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"}, + + + + + + listClass: '', + + selectedClass: 'x-combo-selected', + + triggerClass : 'x-form-arrow-trigger', + + shadow:'sides', + + listAlign: 'tl-bl?', + + maxHeight: 300, + + triggerAction: 'query', + + minChars : 4, + + typeAhead: false, + + queryDelay: 500, + + pageSize: 0, + + selectOnFocus:false, + + queryParam: 'query', + + loadingText: 'Loading...', + + resizable: false, + + handleHeight : 8, + + editable: true, + + allQuery: '', + + mode: 'remote', + + minListWidth : 70, + + forceSelection:false, + + typeAheadDelay : 250, + + + + lazyInit : true, + + initComponent : function(){ + Ext.form.ComboBox.superclass.initComponent.call(this); + this.addEvents( + + 'expand', + + 'collapse', + + 'beforeselect', + + 'select', + + 'beforequery' + ); + if(this.transform){ + this.allowDomMove = false; + var s = Ext.getDom(this.transform); + if(!this.hiddenName){ + this.hiddenName = s.name; + } + if(!this.store){ + this.mode = 'local'; + var d = [], opts = s.options; + for(var i = 0, len = opts.length;i < len; i++){ + var o = opts[i]; + var value = (Ext.isIE ? o.getAttributeNode('value').specified : o.hasAttribute('value')) ? o.value : o.text; + if(o.selected) { + this.value = value; + } + d.push([value, o.text]); + } + this.store = new Ext.data.SimpleStore({ + 'id': 0, + fields: ['value', 'text'], + data : d + }); + this.valueField = 'value'; + this.displayField = 'text'; + } + s.name = Ext.id(); if(!this.lazyRender){ + this.target = true; + this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate); + Ext.removeNode(s); this.render(this.el.parentNode); + }else{ + Ext.removeNode(s); } + + } + this.selectedIndex = -1; + if(this.mode == 'local'){ + if(this.initialConfig.queryDelay === undefined){ + this.queryDelay = 10; + } + if(this.initialConfig.minChars === undefined){ + this.minChars = 0; + } + } + }, + + onRender : function(ct, position){ + Ext.form.ComboBox.superclass.onRender.call(this, ct, position); + if(this.hiddenName){ + this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName, id: (this.hiddenId||this.hiddenName)}, + 'before', true); + this.hiddenField.value = + this.hiddenValue !== undefined ? this.hiddenValue : + this.value !== undefined ? this.value : ''; + + this.el.dom.removeAttribute('name'); + } + if(Ext.isGecko){ + this.el.dom.setAttribute('autocomplete', 'off'); + } + + if(!this.lazyInit){ + this.initList(); + }else{ + this.on('focus', this.initList, this, {single: true}); + } + + if(!this.editable){ + this.editable = true; + this.setEditable(false); + } + }, + + initList : function(){ + if(!this.list){ + var cls = 'x-combo-list'; + + this.list = new Ext.Layer({ + shadow: this.shadow, cls: [cls, this.listClass].join(' '), constrain:false + }); + + var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth); + this.list.setWidth(lw); + this.list.swallowEvent('mousewheel'); + this.assetHeight = 0; + + if(this.title){ + this.header = this.list.createChild({cls:cls+'-hd', html: this.title}); + this.assetHeight += this.header.getHeight(); + } + + this.innerList = this.list.createChild({cls:cls+'-inner'}); + this.innerList.on('mouseover', this.onViewOver, this); + this.innerList.on('mousemove', this.onViewMove, this); + this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); + + if(this.pageSize){ + this.footer = this.list.createChild({cls:cls+'-ft'}); + this.pageTb = new Ext.PagingToolbar({ + store:this.store, + pageSize: this.pageSize, + renderTo:this.footer + }); + this.assetHeight += this.footer.getHeight(); + } + + if(!this.tpl){ + + this.tpl = '
    {' + this.displayField + '}
    '; + } + + + this.view = new Ext.DataView({ + applyTo: this.innerList, + tpl: this.tpl, + singleSelect: true, + selectedClass: this.selectedClass, + itemSelector: this.itemSelector || '.' + cls + '-item' + }); + + this.view.on('click', this.onViewClick, this); + + this.bindStore(this.store, true); + + if(this.resizable){ + this.resizer = new Ext.Resizable(this.list, { + pinned:true, handles:'se' + }); + this.resizer.on('resize', function(r, w, h){ + this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight; + this.listWidth = w; + this.innerList.setWidth(w - this.list.getFrameWidth('lr')); + this.restrictHeight(); + }, this); + this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px'); + } + } + }, + + + bindStore : function(store, initial){ + if(this.store && !initial){ + this.store.un('beforeload', this.onBeforeLoad, this); + this.store.un('load', this.onLoad, this); + this.store.un('loadexception', this.collapse, this); + if(!store){ + this.store = null; + if(this.view){ + this.view.setStore(null); + } + } + } + if(store){ + this.store = Ext.StoreMgr.lookup(store); + + this.store.on('beforeload', this.onBeforeLoad, this); + this.store.on('load', this.onLoad, this); + this.store.on('loadexception', this.collapse, this); + + if(this.view){ + this.view.setStore(store); + } + } + }, + + initEvents : function(){ + Ext.form.ComboBox.superclass.initEvents.call(this); + + this.keyNav = new Ext.KeyNav(this.el, { + "up" : function(e){ + this.inKeyMode = true; + this.selectPrev(); + }, + + "down" : function(e){ + if(!this.isExpanded()){ + this.onTriggerClick(); + }else{ + this.inKeyMode = true; + this.selectNext(); + } + }, + + "enter" : function(e){ + this.onViewClick(); + }, + + "esc" : function(e){ + this.collapse(); + }, + + "tab" : function(e){ + this.onViewClick(false); + return true; + }, + + scope : this, + + doRelay : function(foo, bar, hname){ + if(hname == 'down' || this.scope.isExpanded()){ + return Ext.KeyNav.prototype.doRelay.apply(this, arguments); + } + return true; + }, + + forceKeyDown : true + }); + this.queryDelay = Math.max(this.queryDelay || 10, + this.mode == 'local' ? 10 : 250); + this.dqTask = new Ext.util.DelayedTask(this.initQuery, this); + if(this.typeAhead){ + this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this); + } + if(this.editable !== false){ + this.el.on("keyup", this.onKeyUp, this); + } + if(this.forceSelection){ + this.on('blur', this.doForce, this); + } + }, + + onDestroy : function(){ + if(this.view){ + this.view.el.removeAllListeners(); + this.view.el.remove(); + this.view.purgeListeners(); + } + if(this.list){ + this.list.destroy(); + } + this.bindStore(null); + Ext.form.ComboBox.superclass.onDestroy.call(this); + }, + + fireKey : function(e){ + if(e.isNavKeyPress() && !this.list.isVisible()){ + this.fireEvent("specialkey", this, e); + } + }, + + onResize: function(w, h){ + Ext.form.ComboBox.superclass.onResize.apply(this, arguments); + if(this.list && this.listWidth === undefined){ + var lw = Math.max(w, this.minListWidth); + this.list.setWidth(lw); + this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); + } + }, + + onDisable: function(){ + Ext.form.ComboBox.superclass.onDisable.apply(this, arguments); + if(this.hiddenField){ + this.hiddenField.disabled = this.disabled; + } + }, + + + setEditable : function(value){ + if(value == this.editable){ + return; + } + this.editable = value; + if(!value){ + this.el.dom.setAttribute('readOnly', true); + this.el.on('mousedown', this.onTriggerClick, this); + this.el.addClass('x-combo-noedit'); + }else{ + this.el.dom.setAttribute('readOnly', false); + this.el.un('mousedown', this.onTriggerClick, this); + this.el.removeClass('x-combo-noedit'); + } + }, + + onBeforeLoad : function(){ + if(!this.hasFocus){ + return; + } + this.innerList.update(this.loadingText ? + '
    '+this.loadingText+'
    ' : ''); + this.restrictHeight(); + this.selectedIndex = -1; + }, + + onLoad : function(){ + if(!this.hasFocus){ + return; + } + if(this.store.getCount() > 0){ + this.expand(); + this.restrictHeight(); + if(this.lastQuery == this.allQuery){ + if(this.editable){ + this.el.dom.select(); + } + if(!this.selectByValue(this.value, true)){ + this.select(0, true); + } + }else{ + this.selectNext(); + if(this.typeAhead && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){ + this.taTask.delay(this.typeAheadDelay); + } + } + }else{ + this.onEmptyResults(); + } + }, + + onTypeAhead : function(){ + if(this.store.getCount() > 0){ + var r = this.store.getAt(0); + var newValue = r.data[this.displayField]; + var len = newValue.length; + var selStart = this.getRawValue().length; + if(selStart != len){ + this.setRawValue(newValue); + this.selectText(selStart, newValue.length); + } + } + }, + + onSelect : function(record, index){ + if(this.fireEvent('beforeselect', this, record, index) !== false){ + this.setValue(record.data[this.valueField || this.displayField]); + this.collapse(); + this.fireEvent('select', this, record, index); + } + }, + + + getValue : function(){ + if(this.valueField){ + return typeof this.value != 'undefined' ? this.value : ''; + }else{ + return Ext.form.ComboBox.superclass.getValue.call(this); + } + }, + + + clearValue : function(){ + if(this.hiddenField){ + this.hiddenField.value = ''; + } + this.setRawValue(''); + this.lastSelectionText = ''; + this.applyEmptyText(); + }, + + + setValue : function(v){ + var text = v; + if(this.valueField){ + var r = this.findRecord(this.valueField, v); + if(r){ + text = r.data[this.displayField]; + }else if(this.valueNotFoundText !== undefined){ + text = this.valueNotFoundText; + } + } + this.lastSelectionText = text; + if(this.hiddenField){ + this.hiddenField.value = v; + } + Ext.form.ComboBox.superclass.setValue.call(this, text); + this.value = v; + }, + + findRecord : function(prop, value){ + var record; + if(this.store.getCount() > 0){ + this.store.each(function(r){ + if(r.data[prop] == value){ + record = r; + return false; + } + }); + } + return record; + }, + + onViewMove : function(e, t){ + this.inKeyMode = false; + }, + + onViewOver : function(e, t){ + if(this.inKeyMode){ return; + } + var item = this.view.findItemFromChild(t); + if(item){ + var index = this.view.indexOf(item); + this.select(index, false); + } + }, + + onViewClick : function(doFocus){ + var index = this.view.getSelectedIndexes()[0]; + var r = this.store.getAt(index); + if(r){ + this.onSelect(r, index); + } + if(doFocus !== false){ + this.el.focus(); + } + }, + + restrictHeight : function(){ + this.innerList.dom.style.height = ''; + var inner = this.innerList.dom; + var fw = this.list.getFrameWidth('tb'); + var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight); + this.innerList.setHeight(h < this.maxHeight ? 'auto' : this.maxHeight); + this.list.beginUpdate(); + this.list.setHeight(this.innerList.getHeight()+fw+(this.resizable?this.handleHeight:0)+this.assetHeight); + this.list.alignTo(this.el, this.listAlign); + this.list.endUpdate(); + }, + + onEmptyResults : function(){ + this.collapse(); + }, + + + isExpanded : function(){ + return this.list && this.list.isVisible(); + }, + + + selectByValue : function(v, scrollIntoView){ + if(v !== undefined && v !== null){ + var r = this.findRecord(this.valueField || this.displayField, v); + if(r){ + this.select(this.store.indexOf(r), scrollIntoView); + return true; + } + } + return false; + }, + + + select : function(index, scrollIntoView){ + this.selectedIndex = index; + this.view.select(index); + if(scrollIntoView !== false){ + var el = this.view.getNode(index); + if(el){ + this.innerList.scrollChildIntoView(el, false); + } + } + }, + + selectNext : function(){ + var ct = this.store.getCount(); + if(ct > 0){ + if(this.selectedIndex == -1){ + this.select(0); + }else if(this.selectedIndex < ct-1){ + this.select(this.selectedIndex+1); + } + } + }, + + selectPrev : function(){ + var ct = this.store.getCount(); + if(ct > 0){ + if(this.selectedIndex == -1){ + this.select(0); + }else if(this.selectedIndex != 0){ + this.select(this.selectedIndex-1); + } + } + }, + + onKeyUp : function(e){ + if(this.editable !== false && !e.isSpecialKey()){ + this.lastKey = e.getKey(); + this.dqTask.delay(this.queryDelay); + } + }, + + validateBlur : function(){ + return !this.list || !this.list.isVisible(); + }, + + initQuery : function(){ + this.doQuery(this.getRawValue()); + }, + + doForce : function(){ + if(this.el.dom.value.length > 0){ + this.el.dom.value = + this.lastSelectionText === undefined ? '' : this.lastSelectionText; + this.applyEmptyText(); + } + }, + + + doQuery : function(q, forceAll){ + if(q === undefined || q === null){ + q = ''; + } + var qe = { + query: q, + forceAll: forceAll, + combo: this, + cancel:false + }; + if(this.fireEvent('beforequery', qe)===false || qe.cancel){ + return false; + } + q = qe.query; + forceAll = qe.forceAll; + if(forceAll === true || (q.length >= this.minChars)){ + if(this.lastQuery !== q){ + this.lastQuery = q; + if(this.mode == 'local'){ + this.selectedIndex = -1; + if(forceAll){ + this.store.clearFilter(); + }else{ + this.store.filter(this.displayField, q); + } + this.onLoad(); + }else{ + this.store.baseParams[this.queryParam] = q; + this.store.load({ + params: this.getParams(q) + }); + this.expand(); + } + }else{ + this.selectedIndex = -1; + this.onLoad(); + } + } + }, + + getParams : function(q){ + var p = {}; + if(this.pageSize){ + p.start = 0; + p.limit = this.pageSize; + } + return p; + }, + + + collapse : function(){ + if(!this.isExpanded()){ + return; + } + this.list.hide(); + Ext.getDoc().un('mousewheel', this.collapseIf, this); + Ext.getDoc().un('mousedown', this.collapseIf, this); + this.fireEvent('collapse', this); + }, + + collapseIf : function(e){ + if(!e.within(this.wrap) && !e.within(this.list)){ + this.collapse(); + } + }, + + + expand : function(){ + if(this.isExpanded() || !this.hasFocus){ + return; + } + this.list.alignTo(this.wrap, this.listAlign); + this.list.show(); + Ext.getDoc().on('mousewheel', this.collapseIf, this); + Ext.getDoc().on('mousedown', this.collapseIf, this); + this.fireEvent('expand', this); + }, + + onTriggerClick : function(){ + if(this.disabled){ + return; + } + if(this.isExpanded()){ + this.collapse(); + this.el.focus(); + }else { + this.onFocus({}); + if(this.triggerAction == 'all') { + this.doQuery(this.allQuery, true); + } else { + this.doQuery(this.getRawValue()); + } + this.el.focus(); + } + } + + + + + + +}); +Ext.reg('combo', Ext.form.ComboBox); + +Ext.form.Checkbox = Ext.extend(Ext.form.Field, { + + focusClass : undefined, + + fieldClass: "x-form-field", + + checked: false, + + defaultAutoCreate : { tag: "input", type: 'checkbox', autocomplete: "off"}, + + + + 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.el.alignTo(this.wrap, 'c-c'); + } + }, + + initEvents : function(){ + Ext.form.Checkbox.superclass.initEvents.call(this); + this.el.on("click", this.onClick, this); + this.el.on("change", this.onClick, this); + }, + + getResizeEl : function(){ + return this.wrap; + }, + + getPositionEl : function(){ + return this.wrap; + }, + + + markInvalid : Ext.emptyFn, + + clearInvalid : Ext.emptyFn, + + onRender : function(ct, position){ + Ext.form.Checkbox.superclass.onRender.call(this, ct, position); + if(this.inputValue !== undefined){ + this.el.dom.value = this.inputValue; + } + this.wrap = this.el.wrap({cls: "x-form-check-wrap"}); + if(this.boxLabel){ + this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel}); + } + if(this.checked){ + this.setValue(true); + }else{ + this.checked = this.el.dom.checked; + } + }, + + onDestroy : function(){ + if(this.wrap){ + this.wrap.remove(); + } + Ext.form.Checkbox.superclass.onDestroy.call(this); + }, + + initValue : Ext.emptyFn, + + + getValue : function(){ + if(this.rendered){ + return this.el.dom.checked; + } + return false; + }, + + onClick : function(){ + if(this.el.dom.checked != this.checked){ + this.setValue(this.el.dom.checked); + } + }, + + + setValue : function(v){ + this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on'); + if(this.el && this.el.dom){ + this.el.dom.checked = this.checked; + this.el.dom.defaultChecked = this.checked; + } + this.fireEvent("check", this, this.checked); + } +}); +Ext.reg('checkbox', Ext.form.Checkbox); + +Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { + inputType: 'radio', + + + markInvalid : Ext.emptyFn, + + clearInvalid : Ext.emptyFn, + + + getGroupValue : function(){ + return this.el.up('form').child('input[name='+this.el.dom.name+']:checked', true).value; + } +}); +Ext.reg('radio', Ext.form.Radio); + +Ext.form.Hidden = Ext.extend(Ext.form.Field, { + + inputType : 'hidden', + + + onRender : function(){ + Ext.form.Hidden.superclass.onRender.apply(this, arguments); + }, + + + initEvents : function(){ + this.originalValue = this.getValue(); + }, + + + setSize : Ext.emptyFn, + setWidth : Ext.emptyFn, + setHeight : Ext.emptyFn, + setPosition : Ext.emptyFn, + setPagePosition : Ext.emptyFn, + markInvalid : Ext.emptyFn, + clearInvalid : Ext.emptyFn +}); +Ext.reg('hidden', Ext.form.Hidden); + +Ext.form.BasicForm = function(el, config){ + Ext.apply(this, config); + + this.items = new Ext.util.MixedCollection(false, function(o){ + return o.id || (o.id = Ext.id()); + }); + this.addEvents( + + 'beforeaction', + + 'actionfailed', + + 'actioncomplete' + ); + + if(el){ + this.initEl(el); + } + Ext.form.BasicForm.superclass.constructor.call(this); +}; + +Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { + + + + + + + + timeout: 30, + + activeAction : null, + + + trackResetOnLoad : false, + + + + initEl : function(el){ + this.el = Ext.get(el); + this.id = this.el.id || Ext.id(); + this.el.on('submit', this.onSubmit, this); + this.el.addClass('x-form'); + }, + + + getEl: function(){ + return this.el; + }, + + onSubmit : function(e){ + e.stopEvent(); + }, + + destroy: function() { + this.items.each(function(f){ + Ext.destroy(f); + }); + this.el.removeAllListeners(); + this.el.remove(); + this.purgeListeners(); + }, + + + isValid : function(){ + var valid = true; + this.items.each(function(f){ + if(!f.validate()){ + valid = false; + } + }); + return valid; + }, + + + isDirty : function(){ + var dirty = false; + this.items.each(function(f){ + if(f.isDirty()){ + dirty = true; + return false; + } + }); + return dirty; + }, + + + doAction : function(action, options){ + if(typeof action == 'string'){ + action = new Ext.form.Action.ACTION_TYPES[action](this, options); + } + if(this.fireEvent('beforeaction', this, action) !== false){ + this.beforeAction(action); + action.run.defer(100, action); + } + return this; + }, + + + submit : function(options){ + this.doAction('submit', options); + return this; + }, + + + load : function(options){ + this.doAction('load', options); + return this; + }, + + + updateRecord : function(record){ + record.beginEdit(); + var fs = record.fields; + fs.each(function(f){ + var field = this.findField(f.name); + if(field){ + record.set(f.name, field.getValue()); + } + }, this); + record.endEdit(); + return this; + }, + + + loadRecord : function(record){ + this.setValues(record.data); + return this; + }, + + beforeAction : function(action){ + var o = action.options; + if(o.waitMsg){ + if(this.waitMsgTarget === true){ + this.el.mask(o.waitMsg, 'x-mask-loading'); + }else if(this.waitMsgTarget){ + this.waitMsgTarget = Ext.get(this.waitMsgTarget); + this.waitMsgTarget.mask(o.waitMsg, 'x-mask-loading'); + }else{ + Ext.MessageBox.wait(o.waitMsg, o.waitTitle || this.waitTitle || 'Please Wait...'); + } + } + }, + + afterAction : function(action, success){ + this.activeAction = null; + var o = action.options; + if(o.waitMsg){ + if(this.waitMsgTarget === true){ + this.el.unmask(); + }else if(this.waitMsgTarget){ + this.waitMsgTarget.unmask(); + }else{ + Ext.MessageBox.updateProgress(1); + Ext.MessageBox.hide(); + } + } + if(success){ + if(o.reset){ + this.reset(); + } + Ext.callback(o.success, o.scope, [this, action]); + this.fireEvent('actioncomplete', this, action); + }else{ + Ext.callback(o.failure, o.scope, [this, action]); + this.fireEvent('actionfailed', this, action); + } + }, + + + findField : function(id){ + var field = this.items.get(id); + if(!field){ + this.items.each(function(f){ + if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id)){ + field = f; + return false; + } + }); + } + return field || null; + }, + + + + markInvalid : function(errors){ + if(errors instanceof Array){ + for(var i = 0, len = errors.length; i < len; i++){ + var fieldError = errors[i]; + var f = this.findField(fieldError.id); + if(f){ + f.markInvalid(fieldError.msg); + } + } + }else{ + var field, id; + for(id in errors){ + if(typeof errors[id] != 'function' && (field = this.findField(id))){ + field.markInvalid(errors[id]); + } + } + } + return this; + }, + + + setValues : function(values){ + if(values instanceof Array){ for(var i = 0, len = values.length; i < len; i++){ + var v = values[i]; + var f = this.findField(v.id); + if(f){ + f.setValue(v.value); + if(this.trackResetOnLoad){ + f.originalValue = f.getValue(); + } + } + } + }else{ var field, id; + for(id in values){ + if(typeof values[id] != 'function' && (field = this.findField(id))){ + field.setValue(values[id]); + if(this.trackResetOnLoad){ + field.originalValue = field.getValue(); + } + } + } + } + return this; + }, + + + getValues : function(asString){ + var fs = Ext.lib.Ajax.serializeForm(this.el.dom); + if(asString === true){ + return fs; + } + return Ext.urlDecode(fs); + }, + + + clearInvalid : function(){ + this.items.each(function(f){ + f.clearInvalid(); + }); + return this; + }, + + + reset : function(){ + this.items.each(function(f){ + f.reset(); + }); + return this; + }, + + + add : function(){ + this.items.addAll(Array.prototype.slice.call(arguments, 0)); + return this; + }, + + + + remove : function(field){ + this.items.remove(field); + return this; + }, + + + render : function(){ + this.items.each(function(f){ + 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); + }); + return this; + }, + + + applyIfToFields : function(o){ + this.items.each(function(f){ + Ext.applyIf(f, o); + }); + return this; + } +}); + +Ext.BasicForm = Ext.form.BasicForm; + +Ext.FormPanel = Ext.extend(Ext.Panel, { + + + + buttonAlign:'center', + + + minButtonWidth:75, + + + labelAlign:'left', + + + monitorValid : false, + + + monitorPoll : 200, + + + layout: 'form', + + initComponent :function(){ + this.form = this.createForm(); + + Ext.FormPanel.superclass.initComponent.call(this); + + this.addEvents( + + 'clientvalidation' + ); + + this.relayEvents(this.form, ['beforeaction', 'actionfailed', 'actioncomplete']); + }, + + createForm: function(){ + delete this.initialConfig.listeners; + return new Ext.form.BasicForm(null, this.initialConfig); + }, + + initFields : function(){ + var f = this.form; + var formPanel = this; + var fn = function(c){ + if(c.doLayout && c != formPanel){ + Ext.applyIf(c, { + labelAlign: c.ownerCt.labelAlign, + labelWidth: c.ownerCt.labelWidth, + itemCls: c.ownerCt.itemCls + }); + if(c.items){ + c.items.each(fn); + } + }else if(c.isFormField){ + f.add(c); + } + } + this.items.each(fn); + }, + + 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); + var o = { + tag: 'form', + method : this.method || 'POST', + id : this.formId || Ext.id() + }; + if(this.fileUpload) { + o.enctype = 'multipart/form-data'; + } + this.form.initEl(this.body.createChild(o)); + }, + + beforeDestroy: function(){ + Ext.FormPanel.superclass.beforeDestroy.call(this); + Ext.destroy(this.form); + }, + + initEvents : function(){ + Ext.FormPanel.superclass.initEvents.call(this); + + if(this.monitorValid){ this.startMonitoring(); + } + }, + + + startMonitoring : function(){ + if(!this.bound){ + this.bound = true; + Ext.TaskMgr.start({ + run : this.bindHandler, + interval : this.monitorPoll || 200, + scope: this + }); + } + }, + + + stopMonitoring : function(){ + this.bound = false; + }, + + + load : function(){ + this.form.load.apply(this.form, arguments); + }, + + onDisable : function(){ + Ext.FormPanel.superclass.onDisable.call(this); + if(this.form){ + this.form.items.each(function(){ + this.disable(); + }); + } + }, + + onEnable : function(){ + Ext.FormPanel.superclass.onEnable.call(this); + if(this.form){ + this.form.items.each(function(){ + this.enable(); + }); + } + }, + + bindHandler : function(){ + if(!this.bound){ + return false; } + var valid = true; + this.form.items.each(function(f){ + if(!f.isValid(true)){ + valid = false; + return false; + } + }); + if(this.buttons){ + for(var i = 0, len = this.buttons.length; i < len; i++){ + var btn = this.buttons[i]; + if(btn.formBind === true && btn.disabled === valid){ + btn.setDisabled(!valid); + } + } + } + this.fireEvent('clientvalidation', this, valid); + } +}); +Ext.reg('form', Ext.FormPanel); + +Ext.form.FormPanel = Ext.FormPanel; + + + +Ext.form.FieldSet = Ext.extend(Ext.Panel, { + + + + + + baseCls:'x-fieldset', + + layout: 'form', + + + onRender : function(ct, position){ + if(!this.el){ + this.el = document.createElement('fieldset'); + this.el.id = this.id; + this.el.appendChild(document.createElement('legend')).className = 'x-fieldset-header'; + } + + Ext.form.FieldSet.superclass.onRender.call(this, ct, position); + + if(this.checkboxToggle){ + var o = typeof this.checkboxToggle == 'object' ? + this.checkboxToggle : + {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}; + this.checkbox = this.header.insertFirst(o); + this.checkbox.dom.checked = !this.collapsed; + this.checkbox.on('click', this.onCheckClick, this); + } + }, + + + onCollapse : function(doAnim, animArg){ + if(this.checkbox){ + this.checkbox.dom.checked = false; + } + this.afterCollapse(); + + }, + + + onExpand : function(doAnim, animArg){ + if(this.checkbox){ + this.checkbox.dom.checked = true; + } + this.afterExpand(); + }, + + + 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', + 'Tahoma', + 'Times New Roman', + 'Verdana' + ], + defaultFont: 'tahoma', + + + validationEvent : false, + deferHeight: true, + initialized : false, + activated : false, + sourceEditMode : false, + onFocus : Ext.emptyFn, + iframePad:3, + hideMode:'offsets', + defaultAutoCreate : { + tag: "textarea", + style:"width:500px;height:300px;", + autocomplete: "off" + }, + + + initComponent : function(){ + this.addEvents( + + 'initialize', + + 'activate', + + 'beforesync', + + 'beforepush', + + 'sync', + + 'push', + + 'editmodechange' + ) + }, + + createFontOptions : function(){ + var buf = [], fs = this.fontFamilies, ff, lc; + for(var i = 0, len = fs.length; i< len; i++){ + ff = fs[i]; + lc = ff.toLowerCase(); + buf.push( + '' + ); + } + return buf.join(''); + }, + + createToolbar : function(editor){ + + function btn(id, toggle, handler){ + return { + itemId : id, + cls : 'x-btn-icon x-edit-'+id, + enableToggle:toggle !== false, + scope: editor, + handler:handler||editor.relayBtnCmd, + clickEvent:'mousedown', + tooltip: editor.buttonTips[id] || undefined, + tabIndex:-1 + }; + } + + + var tb = new Ext.Toolbar({ + renderTo:this.wrap.dom.firstChild + }); + + + tb.el.on('click', function(e){ + e.preventDefault(); + }); + + if(this.enableFont && !Ext.isSafari){ + this.fontSelect = tb.el.createChild({ + tag:'select', + cls:'x-font-select', + html: this.createFontOptions() + }); + this.fontSelect.on('change', function(){ + var font = this.fontSelect.dom.value; + this.relayCmd('fontname', font); + this.deferFocus(); + }, this); + tb.add( + this.fontSelect.dom, + '-' + ); + }; + + if(this.enableFormat){ + tb.add( + btn('bold'), + btn('italic'), + btn('underline') + ); + }; + + if(this.enableFontSize){ + tb.add( + '-', + btn('increasefontsize', false, this.adjustFont), + btn('decreasefontsize', false, this.adjustFont) + ); + }; + + if(this.enableColors){ + tb.add( + '-', { + itemId:'forecolor', + cls:'x-btn-icon x-edit-forecolor', + clickEvent:'mousedown', + tooltip: editor.buttonTips['forecolor'] || undefined, + tabIndex:-1, + menu : new Ext.menu.ColorMenu({ + allowReselect: true, + focus: Ext.emptyFn, + value:'000000', + plain:true, + selectHandler: function(cp, color){ + this.execCmd('forecolor', Ext.isSafari || Ext.isIE ? '#'+color : color); + this.deferFocus(); + }, + scope: this, + clickEvent:'mousedown' + }) + }, { + itemId:'backcolor', + cls:'x-btn-icon x-edit-backcolor', + clickEvent:'mousedown', + tooltip: editor.buttonTips['backcolor'] || undefined, + tabIndex:-1, + menu : new Ext.menu.ColorMenu({ + focus: Ext.emptyFn, + value:'FFFFFF', + plain:true, + allowReselect: true, + selectHandler: function(cp, color){ + if(Ext.isGecko){ + this.execCmd('useCSS', false); + this.execCmd('hilitecolor', color); + this.execCmd('useCSS', true); + this.deferFocus(); + }else{ + this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isSafari || Ext.isIE ? '#'+color : color); + this.deferFocus(); + } + }, + scope:this, + clickEvent:'mousedown' + }) + } + ); + }; + + if(this.enableAlignments){ + tb.add( + '-', + btn('justifyleft'), + btn('justifycenter'), + btn('justifyright') + ); + }; + + if(!Ext.isSafari){ + if(this.enableLinks){ + tb.add( + '-', + btn('createlink', false, this.createLink) + ); + }; + + if(this.enableLists){ + tb.add( + '-', + btn('insertorderedlist'), + btn('insertunorderedlist') + ); + } + if(this.enableSourceEdit){ + tb.add( + '-', + btn('sourceedit', true, function(btn){ + this.toggleSourceEdit(btn.pressed); + }) + ); + } + } + + this.tb = tb; + }, + + + getDocMarkup : function(){ + return ''; + }, + + getEditorBody : function(){ + return this.doc.body || this.doc.documentElement; + }, + + + 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){ + this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;') + } + this.wrap = this.el.wrap({ + cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'} + }); + + this.createToolbar(this); + + this.tb.items.each(function(item){ + if(item.itemId != 'sourceedit'){ + item.disable(); + } + }); + + var iframe = document.createElement('iframe'); + iframe.name = Ext.id(); + iframe.frameBorder = 'no'; + + iframe.src=(Ext.SSL_SECURE_URL || "javascript:false"); + + this.wrap.dom.appendChild(iframe); + + this.iframe = iframe; + + if(Ext.isIE){ + iframe.contentWindow.document.designMode = 'on'; + this.doc = iframe.contentWindow.document; + this.win = iframe.contentWindow; + } else { + this.doc = (iframe.contentDocument || window.frames[iframe.name].document); + this.win = window.frames[iframe.name]; + this.doc.designMode = 'on'; + } + this.doc.open(); + this.doc.write(this.getDocMarkup()) + this.doc.close(); + + var task = { + run : function(){ + if(this.doc.body || this.doc.readyState == 'complete'){ + Ext.TaskMgr.stop(task); + this.doc.designMode="on"; + this.initEditor.defer(10, this); + } + }, + interval : 10, + duration:10000, + scope: this + }; + Ext.TaskMgr.start(task); + + if(!this.width){ + this.setSize(this.el.getSize()); + } + }, + + + onResize : function(w, h){ + Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments); + if(this.el && this.iframe){ + if(typeof w == 'number'){ + var aw = w - this.wrap.getFrameWidth('lr'); + this.el.setWidth(this.adjustWidth('textarea', aw)); + this.iframe.style.width = aw + 'px'; + } + if(typeof h == 'number'){ + var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight(); + this.el.setHeight(this.adjustWidth('textarea', ah)); + this.iframe.style.height = ah + 'px'; + if(this.doc){ + this.getEditorBody().style.height = (ah - (this.iframePad*2)) + 'px'; + } + } + } + }, + + + toggleSourceEdit : function(sourceEditMode){ + if(sourceEditMode === undefined){ + sourceEditMode = !this.sourceEditMode; + } + this.sourceEditMode = sourceEditMode === true; + var btn = this.tb.items.get('sourceedit'); + if(btn.pressed !== this.sourceEditMode){ + btn.toggle(this.sourceEditMode); + return; + } + if(this.sourceEditMode){ + this.tb.items.each(function(item){ + if(item.itemId != 'sourceedit'){ + item.disable(); + } + }); + this.syncValue(); + this.iframe.className = 'x-hidden'; + this.el.removeClass('x-hidden'); + this.el.dom.removeAttribute('tabIndex'); + this.el.focus(); + }else{ + if(this.initialized){ + this.tb.items.each(function(item){ + item.enable(); + }); + } + this.pushValue(); + this.iframe.className = ''; + this.el.addClass('x-hidden'); + this.el.dom.setAttribute('tabIndex', -1); + this.deferFocus(); + } + var lastSize = this.lastSize; + if(lastSize){ + delete this.lastSize; + this.setSize(lastSize); + } + this.fireEvent('editmodechange', this, this.sourceEditMode); + }, + + + createLink : function(){ + var url = prompt(this.createLinkText, this.defaultLinkValue); + if(url && url != 'http:/'+'/'){ + this.relayCmd('createlink', url); + } + }, + + + adjustSize : Ext.BoxComponent.prototype.adjustSize, + + + getResizeEl : function(){ + return this.wrap; + }, + + + getPositionEl : function(){ + return this.wrap; + }, + + + 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(); + }, + + + cleanHtml : function(html){ + html = String(html); + if(html.length > 5){ + if(Ext.isSafari){ + html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, ''); + } + } + if(html == ' '){ + html = ''; + } + return html; + }, + + + syncValue : function(){ + if(this.initialized){ + var bd = this.getEditorBody(); + var html = bd.innerHTML; + if(Ext.isSafari){ + var bs = bd.getAttribute('style'); + var m = bs.match(/text-align:(.*?);/i); + if(m && m[1]){ + html = '
    ' + html + '
    '; + } + } + html = this.cleanHtml(html); + if(this.fireEvent('beforesync', this, html) !== false){ + this.el.dom.value = html; + this.fireEvent('sync', this, html); + } + } + }, + + + pushValue : function(){ + if(this.initialized){ + var v = this.el.dom.value; + if(!this.activated && v.length < 1){ + v = ' '; + } + if(this.fireEvent('beforepush', this, v) !== false){ + this.getEditorBody().innerHTML = v; + this.fireEvent('push', this, v); + } + } + }, + + + deferFocus : function(){ + this.focus.defer(10, this); + }, + + + focus : function(){ + if(this.win && !this.sourceEditMode){ + this.win.focus(); + }else{ + this.el.focus(); + } + }, + + + initEditor : function(){ + var dbody = this.getEditorBody(); + var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat'); + ss['background-attachment'] = 'fixed'; + dbody.bgProperties = 'fixed'; + Ext.DomHelper.applyStyles(dbody, ss); + Ext.EventManager.on(this.doc, { + 'mousedown': this.onEditorEvent, + 'dblclick': this.onEditorEvent, + 'click': this.onEditorEvent, + 'keyup': this.onEditorEvent, + buffer:100, + scope: this + }); + if(Ext.isGecko){ + Ext.EventManager.on(this.doc, 'keypress', this.applyCommand, this); + } + if(Ext.isIE || Ext.isSafari || Ext.isOpera){ + Ext.EventManager.on(this.doc, 'keydown', this.fixKeys, this); + } + this.initialized = true; + + this.fireEvent('initialize', this); + this.pushValue(); + }, + + + onDestroy : function(){ + if(this.rendered){ + this.tb.items.each(function(item){ + if(item.menu){ + item.menu.removeAll(); + if(item.menu.el){ + item.menu.el.destroy(); + } + } + item.destroy(); + }); + this.wrap.dom.innerHTML = ''; + this.wrap.remove(); + } + }, + + + onFirstFocus : function(){ + this.activated = true; + this.tb.items.each(function(item){ + item.enable(); + }); + if(Ext.isGecko){ + this.win.focus(); + var s = this.win.getSelection(); + if(!s.focusNode || s.focusNode.nodeType != 3){ + var r = s.getRangeAt(0); + r.selectNodeContents(this.getEditorBody()); + r.collapse(true); + this.deferFocus(); + } + try{ + this.execCmd('useCSS', true); + this.execCmd('styleWithCSS', false); + }catch(e){} + } + this.fireEvent('activate', this); + }, + + + adjustFont: function(btn){ + var adjust = btn.itemId == 'increasefontsize' ? 1 : -1; + if(Ext.isSafari){ + adjust *= 2; + } + var v = parseInt(this.doc.queryCommandValue('FontSize')|| 3, 10); + v = Math.max(1, v+adjust); + this.execCmd('FontSize', v + (Ext.isSafari ? 'px' : 0)); + }, + + onEditorEvent : function(e){ + this.updateToolbar(); + }, + + + + updateToolbar: function(){ + + if(!this.activated){ + this.onFirstFocus(); + return; + } + + var btns = this.tb.items.map, doc = this.doc; + + if(this.enableFont && !Ext.isSafari){ + var name = (this.doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase(); + if(name != this.fontSelect.dom.value){ + this.fontSelect.dom.value = name; + } + } + if(this.enableFormat){ + btns.bold.toggle(doc.queryCommandState('bold')); + btns.italic.toggle(doc.queryCommandState('italic')); + btns.underline.toggle(doc.queryCommandState('underline')); + } + if(this.enableAlignments){ + btns.justifyleft.toggle(doc.queryCommandState('justifyleft')); + btns.justifycenter.toggle(doc.queryCommandState('justifycenter')); + btns.justifyright.toggle(doc.queryCommandState('justifyright')); + } + if(!Ext.isSafari && this.enableLists){ + btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist')); + btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist')); + } + + Ext.menu.MenuMgr.hideAll(); + + this.syncValue(); + }, + + + relayBtnCmd : function(btn){ + this.relayCmd(btn.itemId); + }, + + + relayCmd : function(cmd, value){ + this.win.focus(); + this.execCmd(cmd, value); + this.updateToolbar(); + this.deferFocus(); + }, + + + execCmd : function(cmd, value){ + this.doc.execCommand(cmd, false, value === undefined ? null : value); + this.syncValue(); + }, + + + applyCommand : function(e){ + if(e.ctrlKey){ + var c = e.getCharCode(), cmd; + if(c > 0){ + c = String.fromCharCode(c); + switch(c){ + case 'b': + cmd = 'bold'; + break; + case 'i': + cmd = 'italic'; + break; + case 'u': + cmd = 'underline'; + break; + } + if(cmd){ + this.win.focus(); + this.execCmd(cmd); + this.deferFocus(); + e.preventDefault(); + } + } + } + }, + + + insertAtCursor : function(text){ + if(!this.activated){ + return; + } + if(Ext.isIE){ + this.win.focus(); + var r = this.doc.selection.createRange(); + if(r){ + r.collapse(true); + r.pasteHTML(text); + this.syncValue(); + this.deferFocus(); + } + }else if(Ext.isGecko || Ext.isOpera){ + this.win.focus(); + this.execCmd('InsertHTML', text); + this.deferFocus(); + }else if(Ext.isSafari){ + this.execCmd('InsertText', text); + this.deferFocus(); + } + }, + + + fixKeys : function(){ + if(Ext.isIE){ + return function(e){ + var k = e.getKey(), r; + if(k == e.TAB){ + e.stopEvent(); + r = this.doc.selection.createRange(); + if(r){ + r.collapse(true); + r.pasteHTML('    '); + this.deferFocus(); + } + }else if(k == e.ENTER){ + r = this.doc.selection.createRange(); + if(r){ + var target = r.parentElement(); + if(!target || target.tagName.toLowerCase() != 'li'){ + e.stopEvent(); + r.pasteHTML('
    '); + r.collapse(false); + r.select(); + } + } + } + }; + }else if(Ext.isOpera){ + return function(e){ + var k = e.getKey(); + if(k == e.TAB){ + e.stopEvent(); + this.win.focus(); + this.execCmd('InsertHTML','    '); + this.deferFocus(); + } + }; + }else if(Ext.isSafari){ + return function(e){ + var k = e.getKey(); + if(k == e.TAB){ + e.stopEvent(); + this.execCmd('InsertText','\t'); + this.deferFocus(); + } + }; + } + }(), + + + getToolbar : function(){ + return this.tb; + }, + + + buttonTips : { + bold : { + title: 'Bold (Ctrl+B)', + text: 'Make the selected text bold.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italic (Ctrl+I)', + text: 'Make the selected text italic.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Underline (Ctrl+U)', + text: 'Underline the selected text.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Grow Text', + text: 'Increase the font size.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Shrink Text', + text: 'Decrease the font size.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Text Highlight Color', + text: 'Change the background color of the selected text.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Font Color', + text: 'Change the color of the selected text.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Align Text Left', + text: 'Align text to the left.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Center Text', + text: 'Center text in the editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Align Text Right', + text: 'Align text to the right.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Bullet List', + text: 'Start a bulleted list.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Numbered List', + text: 'Start a numbered list.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Make the selected text a hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Source Edit', + text: 'Switch to source editing mode.', + cls: 'x-html-editor-tip' + } + } + + + + + + + + + + + + + + +}); +Ext.reg('htmleditor', Ext.form.HtmlEditor); + +Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { + + minValue : null, + + maxValue : null, + + 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", + + increment: 15, + + + mode: 'local', + + triggerAction: 'all', + + typeAhead: false, + + + initComponent : function(){ + Ext.form.TimeField.superclass.initComponent.call(this); + + if(typeof this.minValue == "string"){ + this.minValue = this.parseDate(this.minValue); + } + if(typeof this.maxValue == "string"){ + this.maxValue = this.parseDate(this.maxValue); + } + + if(!this.store){ + var min = this.parseDate(this.minValue); + if(!min){ + min = new Date().clearTime(); + } + var max = this.parseDate(this.maxValue); + if(!max){ + max = new Date().clearTime().add('mi', (24 * 60) - 1); + } + var times = []; + while(min <= max){ + times.push([min.dateFormat(this.format)]); + min = min.add('mi', this.increment); + } + this.store = new Ext.data.SimpleStore({ + fields: ['text'], + data : times + }); + this.displayField = 'text'; + } + }, + + + getValue : function(){ + var v = Ext.form.TimeField.superclass.getValue.call(this); + return this.formatDate(this.parseDate(v)) || ''; + }, + + + setValue : function(value){ + Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value))); + }, + + + validateValue : Ext.form.DateField.prototype.validateValue, + parseDate : Ext.form.DateField.prototype.parseDate, + formatDate : Ext.form.DateField.prototype.formatDate, + + + beforeBlur : function(){ + var v = this.parseDate(this.getRawValue()); + if(v){ + this.setValue(v.dateFormat(this.format)); + } + } + + + + + +}); +Ext.reg('timefield', Ext.form.TimeField); + +Ext.form.Action = function(form, options){ + this.form = form; + this.options = options || {}; +}; + + +Ext.form.Action.CLIENT_INVALID = 'client'; + +Ext.form.Action.SERVER_INVALID = 'server'; + +Ext.form.Action.CONNECT_FAILURE = 'connect'; + +Ext.form.Action.LOAD_FAILURE = 'load'; + +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){ + return true; + } + this.result = this.handleResponse(response); + return this.result; + }, + + getUrl : function(appendParams){ + var url = this.options.url || this.form.url || this.form.el.dom.action; + if(appendParams){ + var p = this.getParams(); + if(p){ + url += (url.indexOf('?') != -1 ? '&' : '?') + p; + } + } + 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; + if(p){ + if(typeof p == "object"){ + p = Ext.urlEncode(Ext.applyIf(p, bp)); + }else if(typeof p == 'string' && bp){ + p += '&' + Ext.urlEncode(bp); + } + }else if(bp){ + p = Ext.urlEncode(bp); + } + return p; + }, + + createCallback : function(opts){ + var opts = opts || {}; + return { + success: this.success, + failure: this.failure, + scope: this, + timeout: (opts.timeout*1000) || (this.form.timeout*1000), + upload: this.form.fileUpload ? this.success : undefined + }; + } +}; + + +Ext.form.Action.Submit = function(form, options){ + Ext.form.Action.Submit.superclass.constructor.call(this, form, options); +}; + +Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { + + type : 'submit', + + run : function(){ + var o = this.options; + var method = this.getMethod(); + var isPost = method == 'POST'; + if(o.clientValidation === false || this.form.isValid()){ + Ext.Ajax.request(Ext.apply(this.createCallback(o), { + form:this.form.el.dom, + url:this.getUrl(!isPost), + method: method, + params:isPost ? this.getParams() : null, + isUpload: this.form.fileUpload + })); + + }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){ + this.form.afterAction(this, true); + return; + } + if(result.errors){ + this.form.markInvalid(result.errors); + this.failureType = Ext.form.Action.SERVER_INVALID; + } + this.form.afterAction(this, false); + }, + + handleResponse : function(response){ + if(this.form.errorReader){ + var rs = this.form.errorReader.read(response); + var errors = []; + if(rs.records){ + for(var i = 0, len = rs.records.length; i < len; i++) { + var r = rs.records[i]; + errors[i] = r.data; + } + } + if(errors.length < 1){ + errors = null; + } + return { + success : rs.success, + errors : errors + }; + } + return Ext.decode(response.responseText); + } +}); + + + +Ext.form.Action.Load = function(form, options){ + Ext.form.Action.Load.superclass.constructor.call(this, form, options); + this.reader = this.form.reader; +}; + +Ext.extend(Ext.form.Action.Load, Ext.form.Action, { + type : 'load', + + run : function(){ + Ext.Ajax.request(Ext.apply( + this.createCallback(this.options), { + method:this.getMethod(), + url:this.getUrl(false), + params:this.getParams() + })); + }, + + success : function(response){ + var result = this.processResponse(response); + if(result === true || !result.success || !result.data){ + this.failureType = Ext.form.Action.LOAD_FAILURE; + this.form.afterAction(this, false); + return; + } + this.form.clearInvalid(); + this.form.setValues(result.data); + this.form.afterAction(this, true); + }, + + handleResponse : function(response){ + if(this.form.reader){ + var rs = this.form.reader.read(response); + var data = rs.records && rs.records[0] ? rs.records[0].data : null; + return { + success : rs.success, + data : data + }; + } + return Ext.decode(response.responseText); + } +}); + +Ext.form.Action.ACTION_TYPES = { + 'load' : Ext.form.Action.Load, + 'submit' : Ext.form.Action.Submit +}; + + +Ext.form.VTypes = function(){ + var alpha = /^[a-zA-Z_]+$/; + var alphanum = /^[a-zA-Z0-9_]+$/; + var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/; + var 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@domain.com"', + + 'emailMask' : /[a-z0-9_\.\-@]/i, + + + 'url' : function(v){ + return url.test(v); + }, + + 'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + + + 'alpha' : function(v){ + return alpha.test(v); + }, + + 'alphaText' : 'This field should only contain letters and _', + + 'alphaMask' : /[a-z_]/i, + + + 'alphanum' : function(v){ + return alphanum.test(v); + }, + + 'alphanumText' : 'This field should only contain letters, numbers and _', + + 'alphanumMask' : /[a-z0-9_]/i + }; +}(); + +Ext.grid.GridPanel = Ext.extend(Ext.Panel, { + + + + + + + + + + + + + + ddText : "{0} selected row{1}", + + minColumnWidth : 25, + + monitorWindowResize : true, + + maxRowsToMeasure : 0, + + trackMouseOver : true, + + enableDragDrop : false, + + enableColumnMove : true, + + enableColumnHide : true, + + enableHdMenu : true, + + enableRowHeightSync : false, + + stripeRows : false, + + autoExpandColumn : false, + + autoExpandMin : 50, + + autoExpandMax : 1000, + + view : null, + + loadMask : false, + + + rendered : false, + + viewReady: false, + + stateEvents: ["columnmove", "columnresize", "sortchange"], + + + initComponent : function(){ + Ext.grid.GridPanel.superclass.initComponent.call(this); + + + + this.autoScroll = false; + + if(this.columns && (this.columns instanceof Array)){ + this.colModel = new Ext.grid.ColumnModel(this.columns); + delete this.columns; + } + + + if(this.ds){ + this.store = this.ds; + delete this.ds; + } + if(this.cm){ + this.colModel = this.cm; + delete this.cm; + } + if(this.sm){ + this.selModel = this.sm; + delete this.sm; + } + this.store = Ext.StoreMgr.lookup(this.store); + + this.addEvents( + + + "click", + + "dblclick", + + "contextmenu", + + "mousedown", + + "mouseup", + + "mouseover", + + "mouseout", + + "keypress", + + "keydown", + + + + "cellmousedown", + + "rowmousedown", + + "headermousedown", + + + "cellclick", + + "celldblclick", + + "rowclick", + + "rowdblclick", + + "headerclick", + + "headerdblclick", + + "rowcontextmenu", + + "cellcontextmenu", + + "headercontextmenu", + + "bodyscroll", + + "columnresize", + + "columnmove", + + "sortchange" + ); + }, + + + onRender : function(ct, position){ + Ext.grid.GridPanel.superclass.onRender.apply(this, arguments); + + var c = this.body; + + this.el.addClass('x-grid-panel'); + + var view = this.getView(); + view.init(this); + + c.on("mousedown", this.onMouseDown, this); + c.on("click", this.onClick, this); + c.on("dblclick", this.onDblClick, this); + c.on("contextmenu", this.onContextMenu, this); + c.on("keydown", this.onKeyDown, this); + + this.relayEvents(c, ["mousedown","mouseup","mouseover","mouseout","keypress"]); + + this.getSelectionModel().init(this); + this.view.render(); + }, + + + initEvents : function(){ + Ext.grid.GridPanel.superclass.initEvents.call(this); + + if(this.loadMask){ + this.loadMask = new Ext.LoadMask(this.bwrap, + Ext.apply({store:this.store}, this.loadMask)); + } + }, + + initStateEvents : function(){ + Ext.grid.GridPanel.superclass.initStateEvents.call(this); + this.colModel.on('hiddenchange', this.saveState, this, {delay: 100}); + }, + + applyState : function(state){ + var cm = this.colModel; + var cs = state.columns; + if(cs){ + for(var i = 0, len = cs.length; i < len; i++){ + var s = cs[i]; + var c = cm.getColumnById(s.id); + if(c){ + c.hidden = s.hidden; + c.width = s.width; + var oldIndex = cm.getIndexById(s.id); + if(oldIndex != i){ + cm.moveColumn(oldIndex, i); + } + } + } + } + if(state.sort){ + this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction); + } + }, + + getState : function(){ + var o = {columns: []}; + for(var i = 0, c; c = this.colModel.config[i]; i++){ + o.columns[i] = { + id: c.id, + width: c.width + }; + if(c.hidden){ + o.columns[i].hidden = true; + } + } + var ss = this.store.getSortState(); + if(ss){ + o.sort = ss; + } + return o; + }, + + + afterRender : function(){ + Ext.grid.GridPanel.superclass.afterRender.call(this); + this.view.layout(); + this.viewReady = true; + }, + + + reconfigure : function(store, colModel){ + if(this.loadMask){ + this.loadMask.destroy(); + this.loadMask = new Ext.LoadMask(this.bwrap, + Ext.apply({store:store}, this.initialConfig.loadMask)); + } + this.view.bind(store, colModel); + this.store = store; + this.colModel = colModel; + if(this.rendered){ + this.view.refresh(true); + } + }, + + + onKeyDown : function(e){ + this.fireEvent("keydown", e); + }, + + + onDestroy : function(){ + if(this.rendered){ + if(this.loadMask){ + this.loadMask.destroy(); + } + var c = this.body; + c.removeAllListeners(); + this.view.destroy(); + c.update(""); + } + this.colModel.purgeListeners(); + Ext.grid.GridPanel.superclass.onDestroy.call(this); + }, + + + processEvent : function(name, e){ + this.fireEvent(name, e); + var t = e.getTarget(); + var v = this.view; + var header = v.findHeaderIndex(t); + if(header !== false){ + this.fireEvent("header" + name, this, header, e); + }else{ + var row = v.findRowIndex(t); + var cell = v.findCellIndex(t); + if(row !== false){ + this.fireEvent("row" + name, this, row, e); + if(cell !== false){ + this.fireEvent("cell" + name, this, row, cell, 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(); + var ds = this.store, rlen = ds.getCount(), first = true; + if(step < 0){ + if(col < 0){ + row--; + first = false; + } + while(row >= 0){ + if(!first){ + col = clen-1; + } + first = false; + while(col >= 0){ + if(fn.call(scope || this, row, col, cm) === true){ + return [row, col]; + } + col--; + } + row--; + } + } else { + if(col >= clen){ + row++; + first = false; + } + while(row < rlen){ + if(!first){ + col = 0; + } + first = false; + while(col < clen){ + if(fn.call(scope || this, row, col, cm) === true){ + return [row, col]; + } + col++; + } + row++; + } + } + return null; + }, + + + getSelections : function(){ + return this.selModel.getSelections(); + }, + + + onResize : function(){ + Ext.grid.GridPanel.superclass.onResize.apply(this, arguments); + if(this.viewReady){ + this.view.layout(); + } + }, + + + getGridEl : function(){ + return this.body; + }, + + + stopEditing : function(){}, + + + getSelectionModel : function(){ + if(!this.selModel){ + this.selModel = new Ext.grid.RowSelectionModel( + this.disableSelection ? {selectRow: Ext.emptyFn} : null); + } + 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(); + return String.format(this.ddText, count, count == 1 ? '' : 's'); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +}); +Ext.reg('grid', Ext.grid.GridPanel); + +Ext.grid.GridView = function(config){ + Ext.apply(this, config); + this.addEvents( + + "beforerowremoved", + + "beforerowsinserted", + + "beforerefresh", + + "rowremoved", + + "rowsinserted", + + "rowupdated", + + "refresh" + ); + Ext.grid.GridView.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.GridView, Ext.util.Observable, { + + + + + scrollOffset: 19, + + autoFill: false, + + forceFit: false, + + sortClasses : ["sort-asc", "sort-desc"], + + sortAscText : "Sort Ascending", + + sortDescText : "Sort Descending", + + columnsText : "Columns", + + borderWidth: 2, + + + + initTemplates : function(){ + var ts = this.templates || {}; + if(!ts.master){ + ts.master = new Ext.Template( + '
    ', + '
    ', + '
    {header}
    ', + '
    {body}
    ', + "
    ", + '
     
    ', + '
     
    ', + "
    " + ); + } + + if(!ts.header){ + ts.header = new Ext.Template( + '', + '{cells}', + "
    " + ); + } + + if(!ts.hcell){ + ts.hcell = new Ext.Template( + '
    ', this.grid.enableHdMenu ? '' : '', + '{value}', + "
    " + ); + } + + if(!ts.body){ + ts.body = new Ext.Template('{rows}'); + } + + if(!ts.row){ + ts.row = new Ext.Template( + '
    ', + '{cells}', + (this.enableRowBody ? '' : ''), + '
    {body}
    ' + ); + } + + if(!ts.cell){ + ts.cell = new Ext.Template( + '', + '
    {value}
    ', + "" + ); + } + + for(var k in ts){ + var t = ts[k]; + if(t && typeof t.compile == 'function' && !t.compiled){ + t.disableFormats = true; + t.compile(); + } + } + + this.templates = ts; + + this.tdClass = 'x-grid3-cell'; + this.cellSelector = 'td.x-grid3-cell'; + this.hdCls = 'x-grid3-hd'; + this.rowSelector = 'div.x-grid3-row'; + this.colRe = new RegExp("x-grid3-td-([^\\s]+)", ""); + }, + + fly : function(el){ + if(!this._flyweight){ + this._flyweight = new Ext.Element.Flyweight(document.body); + } + this._flyweight.dom = el; + return this._flyweight; + }, + + getEditorParent : function(ed){ + return this.scroller.dom; + }, + + initElements : function(){ + var E = Ext.Element; + + var el = this.grid.getGridEl().dom.firstChild; + var cs = el.childNodes; + + this.el = new E(el); + + this.mainWrap = new E(cs[0]); + this.mainHd = new E(this.mainWrap.dom.firstChild); + this.innerHd = this.mainHd.dom.firstChild; + this.scroller = new E(this.mainWrap.dom.childNodes[1]); + if(this.forceFit){ + this.scroller.setStyle('overflow-x', 'hidden'); + } + this.mainBody = new E(this.scroller.dom.firstChild); + + this.focusEl = new E(this.scroller.dom.childNodes[1]); + this.focusEl.swallowEvent("click", true); + + this.resizeMarker = new E(cs[1]); + this.resizeProxy = new E(cs[2]); + }, + + getRows : function(){ + return this.hasRows() ? this.mainBody.dom.childNodes : []; + }, + + + findCell : function(el){ + if(!el){ + return false; + } + return this.fly(el).findParent(this.cellSelector, 3); + }, + + findCellIndex : function(el, requiredCls){ + var cell = this.findCell(el); + if(cell && (!requiredCls || this.fly(cell).hasClass(requiredCls))){ + return this.getCellIndex(cell); + } + return false; + }, + + getCellIndex : function(el){ + if(el){ + var m = el.className.match(this.colRe); + if(m && m[1]){ + return this.cm.getIndexById(m[1]); + } + } + 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; + } + return this.fly(el).findParent(this.rowSelector, 10); + }, + + findRowIndex : function(el){ + var r = this.findRow(el); + return r ? r.rowIndex : false; + }, + + + + getRow : function(row){ + return this.getRows()[row]; + }, + + + getCell : function(row, col){ + return this.getRow(row).getElementsByTagName('td')[col]; + }, + + + getHeaderCell : function(index){ + return this.mainHd.dom.getElementsByTagName('td')[index]; + }, + + + addRowClass : function(row, cls){ + var r = this.getRow(row); + if(r){ + this.fly(r).addClass(cls); + } + }, + + removeRowClass : function(row, cls){ + var r = this.getRow(row); + if(r){ + this.fly(r).removeClass(cls); + } + }, + + removeRow : function(row){ + Ext.removeNode(this.getRow(row)); + }, + + removeRows : function(firstRow, lastRow){ + var bd = this.mainBody.dom; + for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + Ext.removeNode(bd.childNodes[firstRow]); + } + }, + + + getScrollState : function(){ + var sb = this.scroller.dom; + return {left: sb.scrollLeft, top: sb.scrollTop}; + }, + + restoreScroll : function(state){ + var sb = this.scroller.dom; + sb.scrollLeft = state.left; + sb.scrollTop = state.top; + }, + + + scrollToTop : function(){ + this.scroller.dom.scrollTop = 0; + this.scroller.dom.scrollLeft = 0; + }, + + syncScroll : function(){ + var mb = this.scroller.dom; + this.innerHd.scrollLeft = mb.scrollLeft; + this.innerHd.scrollLeft = mb.scrollLeft; this.grid.fireEvent("bodyscroll", mb.scrollLeft, mb.scrollTop); + }, + + updateSortIcon : function(col, dir){ + var sc = this.sortClasses; + var hds = this.mainHd.select('td').removeClass(sc); + hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]); + }, + + updateAllColumnWidths : function(){ + var tw = this.getTotalWidth(); + var clen = this.cm.getColumnCount(); + var ws = []; + for(var i = 0; i < clen; i++){ + ws[i] = this.getColumnWidth(i); + } + + this.innerHd.firstChild.firstChild.style.width = tw; + + for(var i = 0; i < clen; i++){ + var hd = this.getHeaderCell(i); + hd.style.width = ws[i]; + } + + var ns = this.getRows(); + for(var i = 0, len = ns.length; i < len; i++){ + ns[i].style.width = tw; + ns[i].firstChild.style.width = tw; + var row = ns[i].firstChild.rows[0]; + for(var j = 0; j < clen; j++){ + row.childNodes[j].style.width = ws[j]; + } + } + + this.onAllColumnWidthsUpdated(ws, tw); + }, + + updateColumnWidth : function(col, width){ + var w = this.getColumnWidth(col); + var tw = this.getTotalWidth(); + + this.innerHd.firstChild.firstChild.style.width = tw; + var hd = this.getHeaderCell(col); + hd.style.width = w; + + var ns = this.getRows(); + for(var i = 0, len = ns.length; i < len; i++){ + ns[i].style.width = tw; + ns[i].firstChild.style.width = tw; + ns[i].firstChild.rows[0].childNodes[col].style.width = w; + } + + this.onColumnWidthUpdated(col, w, tw); + }, + + updateColumnHidden : function(col, hidden){ + var tw = this.getTotalWidth(); + + this.innerHd.firstChild.firstChild.style.width = tw; + + var display = hidden ? 'none' : ''; + + var hd = this.getHeaderCell(col); + hd.style.display = display; + + var ns = this.getRows(); + for(var i = 0, len = ns.length; i < len; i++){ + ns[i].style.width = tw; + ns[i].firstChild.style.width = tw; + ns[i].firstChild.rows[0].childNodes[col].style.display = display; + } + + this.onColumnHiddenUpdated(col, hidden, tw); + + delete this.lastViewWidth; this.layout(); + }, + + doRender : function(cs, rs, ds, startRow, colCount, stripe){ + var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1; + var tstyle = 'width:'+this.getTotalWidth()+';'; + var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r; + for(var j = 0, len = rs.length; j < len; j++){ + r = rs[j]; cb = []; + var rowIndex = (j+startRow); + for(var i = 0; i < colCount; i++){ + c = cs[i]; + p.id = c.id; + p.css = i == 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); + p.attr = p.cellAttr = ""; + p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds); + p.style = c.style; + if(p.value == undefined || p.value === "") p.value = " "; + if(r.dirty && typeof r.modified[c.name] !== 'undefined'){ + p.css += ' x-grid3-dirty-cell'; + } + cb[cb.length] = ct.apply(p); + } + var alt = []; + if(stripe && ((rowIndex+1) % 2 == 0)){ + alt[0] = "x-grid3-row-alt"; + } + if(r.dirty){ + alt[1] = " x-grid3-dirty-row"; + } + rp.cols = colCount; + if(this.getRowClass){ + alt[2] = this.getRowClass(r, rowIndex, rp, ds); + } + rp.alt = alt.join(" "); + rp.cells = cb.join(""); + buf[buf.length] = rt.apply(rp); + } + return buf.join(""); + }, + + processRows : function(startRow, skipStripe){ + if(this.ds.getCount() < 1){ + return; + } + skipStripe = skipStripe || !this.grid.stripeRows; + startRow = startRow || 0; + var rows = this.getRows(); + var cls = ' x-grid3-row-alt '; + for(var i = startRow, len = rows.length; i < len; i++){ + var row = rows[i]; + row.rowIndex = i; + if(!skipStripe){ + var isAlt = ((i+1) % 2 == 0); + var hasAlt = (' '+row.className + ' ').indexOf(cls) != -1; + if(isAlt == hasAlt){ + continue; + } + if(isAlt){ + row.className += " x-grid3-row-alt"; + }else{ + row.className = row.className.replace("x-grid3-row-alt", ""); + } + } + } + }, + + renderUI : function(){ + + var header = this.renderHeaders(); + var body = this.templates.body.apply({rows:''}); + + + var html = this.templates.master.apply({ + body: body, + header: header + }); + + var g = this.grid; + + g.getGridEl().dom.innerHTML = html; + + this.initElements(); + + + this.mainBody.dom.innerHTML = this.renderRows(); + this.processRows(0, true); + + + Ext.fly(this.innerHd).on("click", this.handleHdDown, this); + this.mainHd.on("mouseover", this.handleHdOver, this); + this.mainHd.on("mouseout", this.handleHdOut, this); + this.mainHd.on("mousemove", this.handleHdMove, this); + + this.scroller.on('scroll', this.syncScroll, this); + if(g.enableColumnResize !== false){ + this.splitone = new Ext.grid.GridView.SplitDragZone(g, this.mainHd.dom); + } + + if(g.enableColumnMove){ + this.columnDrag = new Ext.grid.GridView.ColumnDragZone(g, this.innerHd); + this.columnDrop = new Ext.grid.HeaderDropZone(g, this.mainHd.dom); + } + + if(g.enableHdMenu !== false){ + if(g.enableColumnHide !== false){ + this.colMenu = new Ext.menu.Menu({id:g.id + "-hcols-menu"}); + this.colMenu.on("beforeshow", this.beforeColMenuShow, this); + this.colMenu.on("itemclick", this.handleHdMenuClick, this); + } + this.hmenu = new Ext.menu.Menu({id: g.id + "-hctx"}); + this.hmenu.add( + {id:"asc", text: this.sortAscText, cls: "xg-hmenu-sort-asc"}, + {id:"desc", text: this.sortDescText, cls: "xg-hmenu-sort-desc"} + ); + if(g.enableColumnHide !== false){ + this.hmenu.add('-', + {id:"columns", text: this.columnsText, menu: this.colMenu, iconCls: 'x-cols-icon'} + ); + } + this.hmenu.on("itemclick", this.handleHdMenuClick, this); + + } + + if(g.enableDragDrop || g.enableDrag){ + var dd = new Ext.grid.GridDragZone(g, { + ddGroup : g.ddGroup || 'GridDD' + }); + } + + this.updateHeaderSortState(); + + }, + + layout : function(){ + if(!this.mainBody){ + return; } + var g = this.grid; + var c = g.getGridEl(), cm = this.cm, + expandCol = g.autoExpandColumn, + gv = this; + + var csize = c.getSize(true); + var vw = csize.width; + + if(vw < 20 || csize.height < 20){ return; + } + + if(g.autoHeight){ + this.scroller.dom.style.overflow = 'visible'; + }else{ + this.el.setSize(csize.width, csize.height); + + var hdHeight = this.mainHd.getHeight(); + var vh = csize.height - (hdHeight); + + this.scroller.setSize(vw, vh); + if(this.innerHd){ + this.innerHd.style.width = (vw)+'px'; + } + } + if(this.forceFit){ + if(this.lastViewWidth != vw){ + this.fitColumns(false, false); + this.lastViewWidth = vw; + } + }else { + this.autoExpand(); + } + this.onLayout(vw, vh); + }, + + 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; + + this.initTemplates(); + this.initData(grid.store, grid.colModel); + this.initUI(grid); + }, + + getColumnId : function(index){ + return this.cm.getColumnId(index); + }, + + renderHeaders : function(){ + var cm = this.cm, ts = this.templates; + var ct = ts.hcell; + + var cb = [], sb = [], p = {}; + + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + p.id = cm.getColumnId(i); + p.value = cm.getColumnHeader(i) || ""; + p.style = this.getColumnStyle(i, true); + if(cm.config[i].align == 'right'){ + p.istyle = 'padding-right:16px'; + } + cb[cb.length] = ct.apply(p); + } + return ts.header.apply({cells: cb.join(""), tstyle:'width:'+this.getTotalWidth()+';'}); + }, + + beforeUpdate : function(){ + this.grid.stopEditing(); + }, + + updateHeaders : function(){ + this.innerHd.firstChild.innerHTML = this.renderHeaders(); + }, + + + focusRow : function(row){ + this.focusCell(row, 0, false); + }, + + + focusCell : function(row, col, hscroll){ + var el = this.ensureVisible(row, col, hscroll); + if(el){ + this.focusEl.alignTo(el, "tl-tl"); + if(Ext.isGecko){ + this.focusEl.focus(); + }else{ + this.focusEl.focus.defer(1, this.focusEl); + } + } + }, + + ensureVisible : function(row, col, hscroll){ + if(typeof row != "number"){ + row = row.rowIndex; + } + if(row < 0 || row >= this.ds.getCount()){ + return; + } + col = (col !== undefined ? col : 0); + + var rowEl = this.getRow(row), cellEl; + if(!(hscroll === false && col === 0)){ + while(this.cm.isHidden(col)){ + col++; + } + cellEl = this.getCell(row, col); + } + if(!rowEl){ + return; + } + + var c = this.scroller.dom; + + var ctop = 0; + var p = rowEl, stop = this.el.dom; + while(p && p != stop){ + ctop += p.offsetTop; + p = p.offsetParent; + } + ctop -= this.mainHd.dom.offsetHeight; + + var cbot = ctop + rowEl.offsetHeight; + + var ch = c.clientHeight; + var stop = parseInt(c.scrollTop, 10); + var sbot = stop + ch; + + if(ctop < stop){ + c.scrollTop = ctop; + }else if(cbot > sbot){ + c.scrollTop = cbot-ch; + } + + if(hscroll !== false){ + var cleft = parseInt(cellEl.offsetLeft, 10); + var cright = cleft + cellEl.offsetWidth; + + var sleft = parseInt(c.scrollLeft, 10); + var sright = sleft + c.clientWidth; + if(cleft < sleft){ + c.scrollLeft = cleft; + }else if(cright > sright){ + c.scrollLeft = cright-c.clientWidth; + } + } + return cellEl || rowEl; + }, + + insertRows : function(dm, firstRow, lastRow, isUpdate){ + if(firstRow === 0 && lastRow == dm.getCount()-1){ + this.refresh(); + }else{ + if(!isUpdate){ + this.fireEvent("beforerowsinserted", this, firstRow, lastRow); + } + var html = this.renderRows(firstRow, lastRow); + var before = this.getRow(firstRow); + if(before){ + Ext.DomHelper.insertHtml('beforeBegin', before, html); + }else{ + Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); + } + if(!isUpdate){ + this.fireEvent("rowsinserted", this, firstRow, lastRow); + this.processRows(firstRow); + } + } + }, + + deleteRows : function(dm, firstRow, lastRow){ + if(dm.getRowCount()<1){ + this.refresh(); + }else{ + this.fireEvent("beforerowsdeleted", this, firstRow, lastRow); + + this.removeRows(firstRow, lastRow); + + this.processRows(firstRow); + this.fireEvent("rowsdeleted", this, firstRow, lastRow); + } + }, + + getColumnStyle : function(col, isHeader){ + var style = !isHeader ? (this.cm.config[col].css || '') : ''; + style += 'width:'+this.getColumnWidth(col)+';'; + if(this.cm.isHidden(col)){ + style += 'display:none;'; + } + var align = this.cm.config[col].align; + if(align){ + style += 'text-align:'+align+';'; + } + return style; + }, + + getColumnWidth : function(col){ + var w = this.cm.getColumnWidth(col); + if(typeof w == 'number'){ + return (Ext.isBorderBox ? w : (w-this.borderWidth > 0 ? w-this.borderWidth:0)) + 'px'; + } + return w; + }, + + getTotalWidth : function(){ + return this.cm.getTotalWidth()+'px'; + }, + + fitColumns : function(preventRefresh, onlyExpand, omitColumn){ + var cm = this.cm, leftOver, dist, i; + var tw = cm.getTotalWidth(false); + var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; + + if(aw < 20){ return; + } + var extra = aw - tw; + + if(extra === 0){ + return false; + } + + var vc = cm.getColumnCount(true); + var ac = vc-(typeof omitColumn == 'number' ? 1 : 0); + if(ac === 0){ + ac = 1; + omitColumn = undefined; + } + var colCount = cm.getColumnCount(); + var cols = []; + var extraCol = 0; + var width = 0; + var w; + for (i = 0; i < colCount; i++){ + if(!cm.isHidden(i) && !cm.isFixed(i) && i !== omitColumn){ + w = cm.getColumnWidth(i); + cols.push(i); + extraCol = i; + cols.push(w); + width += w; + } + } + var frac = (aw - cm.getTotalWidth())/width; + while (cols.length){ + w = cols.pop(); + i = cols.pop(); + cm.setColumnWidth(i, Math.max(this.grid.minColumnWidth, Math.floor(w + w*frac)), true); + } + + if((tw = cm.getTotalWidth(false)) > aw){ + var adjustCol = ac != vc ? omitColumn : extraCol; + cm.setColumnWidth(adjustCol, Math.max(1, + cm.getColumnWidth(adjustCol)- (tw-aw)), true); + } + + if(preventRefresh !== true){ + this.updateAllColumnWidths(); + } + + + return true; + }, + + autoExpand : function(preventUpdate){ + var g = this.grid, cm = this.cm; + if(!this.userResized && g.autoExpandColumn){ + var tw = cm.getTotalWidth(false); + var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; + if(tw != aw){ + var ci = cm.getIndexById(g.autoExpandColumn); + var currentWidth = cm.getColumnWidth(ci); + var cw = Math.min(Math.max(((aw-tw)+currentWidth), g.autoExpandMin), g.autoExpandMax); + if(cw != currentWidth){ + cm.setColumnWidth(ci, cw, true); + if(preventUpdate !== true){ + this.updateColumnWidth(ci, cw); + } + } + } + + } + }, + + getColumnData : function(){ + var cs = [], cm = this.cm, colCount = cm.getColumnCount(); + for(var i = 0; i < colCount; i++){ + var name = cm.getDataIndex(i); + cs[i] = { + name : (typeof name == 'undefined' ? this.ds.fields.get(i).name : name), + renderer : cm.getRenderer(i), + id : cm.getColumnId(i), + style : this.getColumnStyle(i) + }; + } + return cs; + }, + + renderRows : function(startRow, endRow){ + var g = this.grid, cm = g.colModel, ds = g.store, stripe = g.stripeRows; + var colCount = cm.getColumnCount(); + + if(ds.getCount() < 1){ + return ""; + } + + var cs = this.getColumnData(); + + startRow = startRow || 0; + endRow = typeof endRow == "undefined"? ds.getCount()-1 : endRow; + + var rs = ds.getRange(startRow, endRow); + + return this.doRender(cs, rs, ds, startRow, colCount, stripe); + }, + + renderBody : function(){ + var markup = this.renderRows(); + return this.templates.body.apply({rows: markup}); + }, + + refreshRow : function(record){ + var ds = this.ds, index; + if(typeof record == 'number'){ + index = record; + record = ds.getAt(index); + }else{ + index = ds.indexOf(record); + } + var cls = []; + this.insertRows(ds, index, index, true); + this.getRow(index).rowIndex = index; + this.onRemove(ds, record, index+1, true); + this.fireEvent("rowupdated", this, index, record); + }, + + + refresh : function(headersToo){ + this.fireEvent("beforerefresh", this); + this.grid.stopEditing(); + + var result = this.renderBody(); + this.mainBody.update(result); + + if(headersToo === true){ + this.updateHeaders(); + this.updateHeaderSortState(); + } + this.processRows(0, true); + this.layout(); + this.applyEmptyText(); + 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){ + return; + } + if(!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)){ + this.grid.fireEvent('sortchange', this.grid, state); + } + this.sortState = state; + var sortColumn = this.cm.findColumnIndex(state.field); + if(sortColumn != -1){ + var sortDir = state.direction; + this.updateSortIcon(sortColumn, sortDir); + } + }, + + destroy : function(){ + if(this.colMenu){ + this.colMenu.removeAll(); + Ext.menu.MenuMgr.unregister(this.colMenu); + this.colMenu.getEl().remove(); + delete this.colMenu; + } + if(this.hmenu){ + this.hmenu.removeAll(); + Ext.menu.MenuMgr.unregister(this.hmenu); + this.hmenu.getEl().remove(); + delete this.hmenu; + } + if(this.grid.enableColumnMove){ + var dds = Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; + if(dds){ + for(var dd in dds){ + if(!dds[dd].config.isTarget && dds[dd].dragElId){ + var elid = dds[dd].dragElId; + dds[dd].unreg(); + Ext.get(elid).remove(); + } else if(dds[dd].config.isTarget){ + dds[dd].proxyTop.remove(); + dds[dd].proxyBottom.remove(); + dds[dd].unreg(); + } + if(Ext.dd.DDM.locationCache[dd]){ + delete Ext.dd.DDM.locationCache[dd]; + } + } + delete Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; + } + } + + Ext.destroy(this.resizeMarker, this.resizeProxy); + + this.initData(null, null); + Ext.EventManager.removeResizeListener(this.onWindowResize, this); + }, + + onDenyColumnHide : function(){ + + }, + + render : function(){ + + var cm = this.cm; + var colCount = cm.getColumnCount(); + + if(this.grid.monitorWindowResize === true){ + Ext.EventManager.onWindowResize(this.onWindowResize, this, true); + } + + if(this.autoFill){ + this.fitColumns(true, true); + }else if(this.forceFit){ + this.fitColumns(true, false); + }else if(this.grid.autoExpandColumn){ + this.autoExpand(true); + } + + this.renderUI(); + + }, + + onWindowResize : function(){ + if(!this.grid.monitorWindowResize || this.grid.autoHeight){ + return; + } + this.layout(); + }, + + + initData : function(ds, cm){ + if(this.ds){ + this.ds.un("load", this.onLoad, this); + this.ds.un("datachanged", this.onDataChange, this); + this.ds.un("add", this.onAdd, this); + this.ds.un("remove", this.onRemove, this); + this.ds.un("update", this.onUpdate, this); + this.ds.un("clear", this.onClear, this); + } + if(ds){ + ds.on("load", this.onLoad, this); + ds.on("datachanged", this.onDataChange, this); + ds.on("add", this.onAdd, this); + ds.on("remove", this.onRemove, this); + ds.on("update", this.onUpdate, this); + ds.on("clear", this.onClear, this); + } + this.ds = ds; + + if(this.cm){ + this.cm.un("configchange", this.onColConfigChange, this); + this.cm.un("widthchange", this.onColWidthChange, this); + this.cm.un("headerchange", this.onHeaderChange, this); + this.cm.un("hiddenchange", this.onHiddenChange, this); + this.cm.un("columnmoved", this.onColumnMove, this); + this.cm.un("columnlockchange", this.onColumnLock, this); + } + if(cm){ + cm.on("configchange", this.onColConfigChange, this); + cm.on("widthchange", this.onColWidthChange, this); + cm.on("headerchange", this.onHeaderChange, this); + cm.on("hiddenchange", this.onHiddenChange, this); + cm.on("columnmoved", this.onColumnMove, this); + cm.on("columnlockchange", this.onColumnLock, this); + } + this.cm = cm; + }, + + onDataChange : function(){ + this.refresh(); + this.updateHeaderSortState(); + }, + + onClear : function(){ + this.refresh(); + }, + + onUpdate : function(ds, record){ + this.refreshRow(record); + }, + + onAdd : function(ds, records, index){ + this.insertRows(ds, index, index + (records.length-1)); + }, + + onRemove : function(ds, record, index, isUpdate){ + if(isUpdate !== true){ + this.fireEvent("beforerowremoved", this, index, record); + } + this.removeRow(index); + if(isUpdate !== true){ + this.processRows(index); + this.applyEmptyText(); + this.fireEvent("rowremoved", this, index, record); + } + }, + + onLoad : function(){ + this.scrollToTop(); + }, + + 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; + var s = this.getScrollState(); + this.refresh(true); + this.restoreScroll(s); + this.afterMove(newIndex); + }, + + onColConfigChange : function(){ + delete this.lastViewWidth; + this.indexMap = null; + this.refresh(true); + }, + + + initUI : function(grid){ + grid.on("headerclick", this.onHeaderClick, this); + + if(grid.trackMouseOver){ + grid.on("mouseover", this.onRowOver, this); + grid.on("mouseout", this.onRowOut, this); + } + }, + + initEvents : function(){ + + }, + + onHeaderClick : function(g, index){ + if(this.headersDisabled || !this.cm.isSortable(index)){ + return; + } + g.stopEditing(); + g.store.sort(this.cm.getDataIndex(index)); + }, + + onRowOver : function(e, t){ + var row; + if((row = this.findRowIndex(t)) !== false){ + this.addRowClass(row, "x-grid3-row-over"); + } + }, + + onRowOut : function(e, t){ + var row; + if((row = this.findRowIndex(t)) !== false && row !== this.findRowIndex(e.getRelatedTarget())){ + this.removeRowClass(row, "x-grid3-row-over"); + } + }, + + handleWheel : function(e){ + e.stopPropagation(); + }, + + onRowSelect : function(row){ + this.addRowClass(row, "x-grid3-row-selected"); + }, + + onRowDeselect : function(row){ + this.removeRowClass(row, "x-grid3-row-selected"); + }, + + onCellSelect : function(row, col){ + var cell = this.getCell(row, col); + if(cell){ + this.fly(cell).addClass("x-grid3-cell-selected"); + } + }, + + onCellDeselect : function(row, col){ + var cell = this.getCell(row, col); + if(cell){ + this.fly(cell).removeClass("x-grid3-cell-selected"); + } + }, + + onColumnSplitterMoved : function(i, w){ + this.userResized = true; + var cm = this.grid.colModel; + cm.setColumnWidth(i, w, true); + + if(this.forceFit){ + this.fitColumns(true, false, i); + this.updateAllColumnWidths(); + }else{ + this.updateColumnWidth(i, w); + } + + this.grid.fireEvent("columnresize", i, w); + }, + + handleHdMenuClick : function(item){ + var index = this.hdCtxIndex; + var cm = this.cm, ds = this.ds; + switch(item.id){ + case "asc": + ds.sort(cm.getDataIndex(index), "ASC"); + break; + case "desc": + ds.sort(cm.getDataIndex(index), "DESC"); + break; + default: + index = cm.getIndexById(item.id.substr(4)); + if(index != -1){ + if(item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1){ + this.onDenyColumnHide(); + return false; + } + cm.setHidden(index, item.checked); + } + } + return true; + }, + + isHideableColumn : function(c){ + return !c.hidden && !c.fixed; + }, + + beforeColMenuShow : function(){ + var cm = this.cm, colCount = cm.getColumnCount(); + this.colMenu.removeAll(); + for(var i = 0; i < colCount; i++){ + if(cm.config[i].fixed !== true && cm.config[i].hideable !== false){ + this.colMenu.add(new Ext.menu.CheckItem({ + id: "col-"+cm.getColumnId(i), + text: cm.getColumnHeader(i), + checked: !cm.isHidden(i), + hideOnClick:false, + disabled: cm.config[i].hideable === false + })); + } + } + }, + + handleHdDown : function(e, t){ + if(Ext.fly(t).hasClass('x-grid3-hd-btn')){ + e.stopEvent(); + var hd = this.findHeaderCell(t); + Ext.fly(hd).addClass('x-grid3-hd-menu-open'); + var index = this.getCellIndex(hd); + this.hdCtxIndex = index; + var ms = this.hmenu.items, cm = this.cm; + ms.get("asc").setDisabled(!cm.isSortable(index)); + ms.get("desc").setDisabled(!cm.isSortable(index)); + this.hmenu.on("hide", function(){ + Ext.fly(hd).removeClass('x-grid3-hd-menu-open'); + }, this, {single:true}); + this.hmenu.show(t, "tl-bl?"); + } + }, + + handleHdOver : function(e, t){ + var hd = this.findHeaderCell(t); + if(hd && !this.headersDisabled){ + this.activeHd = hd; + this.activeHdIndex = this.getCellIndex(hd); + var fly = this.fly(hd); + this.activeHdRegion = fly.getRegion(); + if(this.cm.isSortable(this.activeHdIndex) && !this.cm.isFixed(this.activeHdIndex)){ + fly.addClass("x-grid3-hd-over"); + this.activeHdBtn = fly.child('.x-grid3-hd-btn'); + if(this.activeHdBtn){ + this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px'; + } + } + } + }, + + handleHdMove : function(e, t){ + if(this.activeHd && !this.headersDisabled){ + var hw = this.splitHandleWidth || 5; + var r = this.activeHdRegion; + var x = e.getPageX(); + var ss = this.activeHd.style; + if(x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){ + if(Ext.isSafari){ + ss.cursor = 'e-resize'; }else{ + ss.cursor = 'col-resize'; + } + }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){ + if(Ext.isSafari){ + ss.cursor = 'w-resize'; }else{ + ss.cursor = 'col-resize'; + } + }else{ + ss.cursor = ''; + } + } + }, + + handleHdOut : function(e, t){ + var hd = this.findHeaderCell(t); + if(hd && (!Ext.isIE || !e.within(hd, true))){ + this.activeHd = null; + this.fly(hd).removeClass("x-grid3-hd-over"); + hd.style.cursor = ''; + } + }, + + hasRows : function(){ + var fc = this.mainBody.dom.firstChild; + return fc && fc.className != 'x-grid-empty'; + }, + + bind : function(d, c){ + this.initData(d, c); + } +}); + + +Ext.grid.GridView.SplitDragZone = function(grid, hd){ + this.grid = grid; + this.view = grid.getView(); + this.marker = this.view.resizeMarker; + this.proxy = this.view.resizeProxy; + Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd, + "gridSplitters" + this.grid.getGridEl().id, { + dragElId : Ext.id(this.proxy.dom), resizeFrame:false + }); + this.scroll = false; + this.hw = this.view.splitHandleWidth || 5; +}; +Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { + + b4StartDrag : function(x, y){ + this.view.headersDisabled = true; + var h = this.view.mainWrap.getHeight(); + this.marker.setHeight(h); + this.marker.show(); + this.marker.alignTo(this.view.getHeaderCell(this.cellIndex), 'tl-tl', [-2, 0]); + this.proxy.setHeight(h); + var w = this.cm.getColumnWidth(this.cellIndex); + var minw = Math.max(w-this.grid.minColumnWidth, 0); + this.resetConstraints(); + this.setXConstraint(minw, 1000); + this.setYConstraint(0, 0); + this.minX = x - minw; + this.maxX = x + 1000; + this.startPos = x; + Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); + }, + + + handleMouseDown : function(e){ + var t = this.view.findHeaderCell(e.getTarget()); + if(t){ + var xy = this.view.fly(t).getXY(), x = xy[0], y = xy[1]; + var exy = e.getXY(), ex = exy[0], ey = exy[1]; + var w = t.offsetWidth, adjust = false; + if((ex - x) <= this.hw){ + adjust = -1; + }else if((x+w) - ex <= this.hw){ + adjust = 0; + } + if(adjust !== false){ + this.cm = this.grid.colModel; + var ci = this.view.getCellIndex(t); + if(adjust == -1){ + while(this.cm.isHidden(ci+adjust)){ + --adjust; + if(ci+adjust < 0){ + return; + } + } + } + this.cellIndex = ci+adjust; + this.split = t.dom; + if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){ + Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this, arguments); + } + }else if(this.view.columnDrag){ + this.view.columnDrag.callHandleMouseDown(e); + } + } + }, + + endDrag : function(e){ + this.marker.hide(); + var v = this.view; + var endX = Math.max(this.minX, e.getPageX()); + var diff = endX - this.startPos; + v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); + setTimeout(function(){ + v.headersDisabled = false; + }, 50); + }, + + autoOffset : function(){ + this.setDelta(0,0); + } +}); + + +Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, { + + hideGroupedColumn:false, + + showGroupName:true, + + startCollapsed:false, + + enableGrouping:true, + + enableGroupingMenu:true, + + enableNoGroups:true, + + emptyGroupText : '(None)', + + ignoreAdd: false, + + groupTextTpl : '{text}', + + + gidSeed : 1000, + + + initTemplates : function(){ + Ext.grid.GroupingView.superclass.initTemplates.call(this); + this.state = {}; + + var sm = this.grid.getSelectionModel(); + sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect', + this.onBeforeRowSelect, this); + + if(!this.startGroup){ + this.startGroup = new Ext.XTemplate( + '
    ', + '
    ', this.groupTextTpl ,'
    ', + '
    ' + ); + } + this.startGroup.compile(); + this.endGroup = '
    '; + }, + + + 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(){ + if(this.enableGrouping && !this.ignoreAdd){ + var ss = this.getScrollState(); + this.refresh(); + this.restoreScroll(ss); + }else if(!this.enableGrouping){ + Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments); + } + }, + + + onRemove : function(ds, record, index, isUpdate){ + Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments); + var g = document.getElementById(record._groupId); + if(g && g.childNodes[1].childNodes.length < 1){ + Ext.removeNode(g); + } + this.applyEmptyText(); + }, + + + refreshRow : function(record){ + if(this.ds.getCount()==1){ + this.refresh(); + }else{ + this.isUpdating = true; + Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments); + this.isUpdating = false; + } + }, + + + beforeMenuShow : function(){ + var field = this.getGroupField(); + var g = this.hmenu.items.get('groupBy'); + if(g){ + g.setDisabled(this.cm.config[this.hdCtxIndex].groupable === false); + } + var s = this.hmenu.items.get('showGroups'); + if(s){ + s.setChecked(!!field); + } + }, + + + renderUI : function(){ + Ext.grid.GroupingView.superclass.renderUI.call(this); + this.mainBody.on('mousedown', this.interceptMouse, this); + + if(this.enableGroupingMenu && this.hmenu){ + this.hmenu.add('-',{ + id:'groupBy', + text: this.groupByText, + handler: this.onGroupByClick, + scope: this, + iconCls:'x-group-by-icon' + }); + if(this.enableNoGroups){ + this.hmenu.add({ + id:'showGroups', + text: this.showGroupsText, + checked: true, + checkHandler: this.onShowGroupsClick, + scope: this + }); + } + this.hmenu.on('beforeshow', this.beforeMenuShow, this); + } + }, + + + onGroupByClick : function(){ + this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); + }, + + + onShowGroupsClick : function(mi, checked){ + if(checked){ + this.onGroupByClick(); + }else{ + this.grid.store.clearGrouping(); + } + }, + + + toggleGroup : function(group, expanded){ + this.grid.stopEditing(); + group = Ext.getDom(group); + var gel = Ext.fly(group); + expanded = expanded !== undefined ? + expanded : gel.hasClass('x-grid-group-collapsed'); + + this.state[gel.dom.id] = expanded; + gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed'); + }, + + + toggleAllGroups : function(expanded){ + var groups = this.getGroups(); + for(var i = 0, len = groups.length; i < len; i++){ + this.toggleGroup(groups[i], expanded); + } + }, + + + expandAllGroups : function(){ + this.toggleAllGroups(true); + }, + + + collapseAllGroups : function(){ + this.toggleAllGroups(false); + }, + + + interceptMouse : function(e){ + var hd = e.getTarget('.x-grid-group-hd', this.mainBody); + if(hd){ + e.stopEvent(); + this.toggleGroup(hd.parentNode); + } + }, + + + getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){ + var g = groupRenderer ? groupRenderer(v, {}, r, rowIndex, colIndex, ds) : String(v); + if(g === ''){ + g = this.cm.config[colIndex].emptyGroupText || this.emptyGroupText; + } + return g; + }, + + + getGroupField : function(){ + return this.grid.store.getGroupState(); + }, + + + renderRows : function(){ + var groupField = this.getGroupField(); + var eg = !!groupField; + + if(this.hideGroupedColumn) { + var colIndex = this.cm.findColumnIndex(groupField); + if(!eg && this.lastGroupField !== undefined) { + this.mainBody.update(''); + this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField), false); + delete this.lastGroupField; + }else if (eg && this.lastGroupField === undefined) { + this.lastGroupField = groupField; + this.cm.setHidden(colIndex, true); + }else if (eg && this.lastGroupField !== undefined && groupField !== this.lastGroupField) { + this.mainBody.update(''); + var oldIndex = this.cm.findColumnIndex(this.lastGroupField); + this.cm.setHidden(oldIndex, false); + this.lastGroupField = groupField; + this.cm.setHidden(colIndex, true); + } + } + return Ext.grid.GroupingView.superclass.renderRows.apply( + this, arguments); + }, + + + doRender : function(cs, rs, ds, startRow, colCount, stripe){ + if(rs.length < 1){ + return ''; + } + var groupField = this.getGroupField(); + var colIndex = this.cm.findColumnIndex(groupField); + + this.enableGrouping = !!groupField; + + if(!this.enableGrouping || this.isUpdating){ + return Ext.grid.GroupingView.superclass.doRender.apply( + this, arguments); + } + var gstyle = 'width:'+this.getTotalWidth()+';'; + + var gidPrefix = this.grid.getGridEl().id; + var cfg = this.cm.config[colIndex]; + var groupRenderer = cfg.groupRenderer || cfg.renderer; + var cls = this.startCollapsed ? 'x-grid-group-collapsed' : ''; + var prefix = this.showGroupName ? + (cfg.groupName || cfg.header)+': ' : ''; + + var groups = [], curGroup, i, len, gid; + for(i = 0, len = rs.length; i < len; i++){ + var rowIndex = startRow + i; + var r = rs[i], + gvalue = r.data[groupField], + g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds); + if(!curGroup || curGroup.group != g){ + gid = gidPrefix + '-gp-' + groupField + '-' + g; + var gcls = cls ? cls : (this.state[gid] === false ? 'x-grid-group-collapsed' : ''); + curGroup = { + group: g, + gvalue: gvalue, + text: prefix + g, + groupId: gid, + startRow: rowIndex, + rs: [r], + cls: gcls, + style: gstyle + }; + groups.push(curGroup); + }else{ + curGroup.rs.push(r); + } + r._groupId = gid; + } + + var buf = []; + for(i = 0, len = groups.length; i < len; i++){ + var g = groups[i]; + this.doGroupStart(buf, g, cs, ds, colCount); + buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call( + this, cs, g.rs, ds, g.startRow, colCount, stripe); + + this.doGroupEnd(buf, g, cs, ds, colCount); + } + return buf.join(''); + }, + + + getGroupId : function(value){ + var gidPrefix = this.grid.getGridEl().id; + var groupField = this.getGroupField(); + var colIndex = this.cm.findColumnIndex(groupField); + var cfg = this.cm.config[colIndex]; + var groupRenderer = cfg.groupRenderer || cfg.renderer; + var gtext = this.getGroup(value, {data:{}}, groupRenderer, 0, colIndex, this.ds); + return gidPrefix + '-gp-' + groupField + '-' + value; + }, + + + 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.enableGrouping){ + return Ext.grid.GroupingView.superclass.getRows.call(this); + } + var r = []; + var g, gs = this.getGroups(); + for(var i = 0, len = gs.length; i < len; i++){ + g = gs[i].childNodes[1].childNodes; + for(var j = 0, jlen = g.length; j < jlen; j++){ + r[r.length] = g[j]; + } + } + return r; + }, + + + updateGroupWidths : function(){ + if(!this.enableGrouping || !this.hasRows()){ + return; + } + var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.scrollOffset) +'px'; + var gs = this.getGroups(); + for(var i = 0, len = gs.length; i < len; i++){ + gs[i].firstChild.style.width = tw; + } + }, + + + onColumnWidthUpdated : function(col, w, tw){ + this.updateGroupWidths(); + }, + + + onAllColumnWidthsUpdated : function(ws, tw){ + this.updateGroupWidths(); + }, + + + onColumnHiddenUpdated : function(col, hidden, tw){ + this.updateGroupWidths(); + }, + + + onLayout : function(){ + this.updateGroupWidths(); + }, + + + onBeforeRowSelect : function(sm, rowIndex){ + if(!this.enableGrouping){ + return; + } + var row = this.getRow(rowIndex); + if(row && !row.offsetParent){ + var g = this.findGroup(row); + this.toggleGroup(g, true); + } + }, + + + groupByText: 'Group By This Field', + + showGroupsText: 'Show in Groups' +}); + +Ext.grid.GroupingView.GROUP_ID = 1000; + + +Ext.grid.HeaderDragZone = function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + this.ddGroup = "gridHeader" + this.grid.getGridEl().id; + Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd); + if(hd2){ + this.setHandleElId(Ext.id(hd)); + this.setOuterHandleElId(Ext.id(hd2)); + } + this.scroll = false; +}; +Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, { + maxDragWidth: 120, + getDragData : function(e){ + var t = Ext.lib.Event.getTarget(e); + var h = this.view.findHeaderCell(t); + if(h){ + return {ddel: h.firstChild, header:h}; + } + return false; + }, + + onInitDrag : function(e){ + this.view.headersDisabled = true; + var clone = this.dragData.ddel.cloneNode(true); + clone.id = Ext.id(); + clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px"; + this.proxy.update(clone); + return true; + }, + + afterValidDrop : function(){ + var v = this.view; + setTimeout(function(){ + v.headersDisabled = false; + }, 50); + }, + + afterInvalidDrop : function(){ + var v = this.view; + setTimeout(function(){ + v.headersDisabled = false; + }, 50); + } +}); + + + +Ext.grid.HeaderDropZone = function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + + this.proxyTop = Ext.DomHelper.append(document.body, { + cls:"col-move-top", html:" " + }, true); + this.proxyBottom = Ext.DomHelper.append(document.body, { + cls:"col-move-bottom", html:" " + }, true); + this.proxyTop.hide = this.proxyBottom.hide = function(){ + this.setLeftTop(-100,-100); + this.setStyle("visibility", "hidden"); + }; + this.ddGroup = "gridHeader" + this.grid.getGridEl().id; + + + Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom); +}; +Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, { + proxyOffsets : [-4, -9], + fly: Ext.Element.fly, + + getTargetFromEvent : function(e){ + var t = Ext.lib.Event.getTarget(e); + var cindex = this.view.findCellIndex(t); + if(cindex !== false){ + return this.view.getHeaderCell(cindex); + } + }, + + nextVisible : function(h){ + var v = this.view, cm = this.grid.colModel; + h = h.nextSibling; + while(h){ + if(!cm.isHidden(v.getCellIndex(h))){ + return h; + } + h = h.nextSibling; + } + return null; + }, + + prevVisible : function(h){ + var v = this.view, cm = this.grid.colModel; + h = h.prevSibling; + while(h){ + if(!cm.isHidden(v.getCellIndex(h))){ + return h; + } + h = h.prevSibling; + } + return null; + }, + + positionIndicator : function(h, n, e){ + var x = Ext.lib.Event.getPageX(e); + var r = Ext.lib.Dom.getRegion(n.firstChild); + var px, pt, py = r.top + this.proxyOffsets[1]; + if((r.right - x) <= (r.right-r.left)/2){ + px = r.right+this.view.borderWidth; + pt = "after"; + }else{ + px = r.left; + pt = "before"; + } + var oldIndex = this.view.getCellIndex(h); + var newIndex = this.view.getCellIndex(n); + + if(this.grid.colModel.isFixed(newIndex)){ + return false; + } + + var locked = this.grid.colModel.isLocked(newIndex); + + if(pt == "after"){ + newIndex++; + } + if(oldIndex < newIndex){ + newIndex--; + } + if(oldIndex == newIndex && (locked == this.grid.colModel.isLocked(oldIndex))){ + return false; + } + px += this.proxyOffsets[0]; + this.proxyTop.setLeftTop(px, py); + this.proxyTop.show(); + if(!this.bottomOffset){ + this.bottomOffset = this.view.mainHd.getHeight(); + } + this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset); + this.proxyBottom.show(); + return pt; + }, + + onNodeEnter : function(n, dd, e, data){ + if(data.header != n){ + this.positionIndicator(data.header, n, e); + } + }, + + onNodeOver : function(n, dd, e, data){ + var result = false; + if(data.header != n){ + result = this.positionIndicator(data.header, n, e); + } + if(!result){ + this.proxyTop.hide(); + this.proxyBottom.hide(); + } + return result ? this.dropAllowed : this.dropNotAllowed; + }, + + onNodeOut : function(n, dd, e, data){ + this.proxyTop.hide(); + this.proxyBottom.hide(); + }, + + onNodeDrop : function(n, dd, e, data){ + var h = data.header; + if(h != n){ + var cm = this.grid.colModel; + var x = Ext.lib.Event.getPageX(e); + var r = Ext.lib.Dom.getRegion(n.firstChild); + var pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before"; + var oldIndex = this.view.getCellIndex(h); + var newIndex = this.view.getCellIndex(n); + var locked = cm.isLocked(newIndex); + if(pt == "after"){ + newIndex++; + } + if(oldIndex < newIndex){ + newIndex--; + } + if(oldIndex == newIndex && (locked == cm.isLocked(oldIndex))){ + return false; + } + cm.setLocked(oldIndex, locked, true); + cm.moveColumn(oldIndex, newIndex); + this.grid.fireEvent("columnmove", oldIndex, newIndex); + return true; + } + return false; + } +}); + + +Ext.grid.GridView.ColumnDragZone = function(grid, hd){ + Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null); + this.proxy.el.addClass('x-grid3-col-dd'); +}; + +Ext.extend(Ext.grid.GridView.ColumnDragZone, Ext.grid.HeaderDragZone, { + handleMouseDown : function(e){ + + }, + + callHandleMouseDown : function(e){ + Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e); + } +}); +Ext.grid.SplitDragZone = function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + this.proxy = this.view.resizeProxy; + Ext.grid.SplitDragZone.superclass.constructor.call(this, hd, + "gridSplitters" + this.grid.getGridEl().id, { + dragElId : Ext.id(this.proxy.dom), resizeFrame:false + }); + this.setHandleElId(Ext.id(hd)); + this.setOuterHandleElId(Ext.id(hd2)); + this.scroll = false; +}; +Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, { + fly: Ext.Element.fly, + + b4StartDrag : function(x, y){ + this.view.headersDisabled = true; + this.proxy.setHeight(this.view.mainWrap.getHeight()); + var w = this.cm.getColumnWidth(this.cellIndex); + var minw = Math.max(w-this.grid.minColumnWidth, 0); + this.resetConstraints(); + this.setXConstraint(minw, 1000); + this.setYConstraint(0, 0); + this.minX = x - minw; + this.maxX = x + 1000; + this.startPos = x; + Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); + }, + + + handleMouseDown : function(e){ + ev = Ext.EventObject.setEvent(e); + var t = this.fly(ev.getTarget()); + if(t.hasClass("x-grid-split")){ + this.cellIndex = this.view.getCellIndex(t.dom); + this.split = t.dom; + this.cm = this.grid.colModel; + if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){ + Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this, arguments); + } + } + }, + + endDrag : function(e){ + this.view.headersDisabled = false; + var endX = Math.max(this.minX, Ext.lib.Event.getPageX(e)); + var diff = endX - this.startPos; + this.view.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); + }, + + autoOffset : function(){ + this.setDelta(0,0); + } +}); +Ext.grid.GridDragZone = function(grid, config){ + this.view = grid.getView(); + Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.mainBody.dom, config); + if(this.view.lockedBody){ + this.setHandleElId(Ext.id(this.view.mainBody.dom)); + this.setOuterHandleElId(Ext.id(this.view.lockedBody.dom)); + } + this.scroll = false; + this.grid = grid; + this.ddel = document.createElement('div'); + this.ddel.className = 'x-grid-dd-wrap'; +}; + +Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, { + ddGroup : "GridDD", + + getDragData : function(e){ + var t = Ext.lib.Event.getTarget(e); + var rowIndex = this.view.findRowIndex(t); + if(rowIndex !== false){ + var sm = this.grid.selModel; + if(!sm.isSelected(rowIndex) || e.hasModifier()){ + sm.handleMouseDown(this.grid, rowIndex, e); + } + return {grid: this.grid, ddel: this.ddel, rowIndex: rowIndex, selections:sm.getSelections()}; + } + 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(); + }, + + beforeInvalidDrop : function(e, id){ + + } +}); + + +Ext.grid.ColumnModel = function(config){ + + this.setConfig(config, true); + + this.defaultWidth = 100; + + + this.defaultSortable = false; + + this.addEvents( + + "widthchange", + + "headerchange", + + "hiddenchange", + + "columnmoved", + + "columnlockchange", + + "configchange" + ); + Ext.grid.ColumnModel.superclass.constructor.call(this); +}; +Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { + + + + + + + + + + + + + + + getColumnId : function(index){ + return this.config[index].id; + }, + + + setConfig : function(config, initial){ + if(!initial){ + delete this.totalWidth; + for(var i = 0, len = this.config.length; i < len; i++){ + var c = this.config[i]; + if(c.editor){ + c.editor.destroy(); + } + } + } + this.config = config; + this.lookup = {}; + + for(var i = 0, len = config.length; i < len; i++){ + var c = config[i]; + if(typeof c.renderer == "string"){ + c.renderer = Ext.util.Format[c.renderer]; + } + if(typeof c.id == "undefined"){ + c.id = i; + } + if(c.editor && c.editor.isFormField){ + c.editor = new Ext.grid.GridEditor(c.editor); + } + 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){ + return i; + } + } + return -1; + }, + + + moveColumn : function(oldIndex, newIndex){ + var c = this.config[oldIndex]; + this.config.splice(oldIndex, 1); + this.config.splice(newIndex, 0, c); + this.dataMap = null; + this.fireEvent("columnmoved", this, oldIndex, newIndex); + }, + + + isLocked : function(colIndex){ + return this.config[colIndex].locked === true; + }, + + + setLocked : function(colIndex, value, suppressEvent){ + if(this.isLocked(colIndex) == value){ + return; + } + this.config[colIndex].locked = value; + if(!suppressEvent){ + this.fireEvent("columnlockchange", this, colIndex, value); + } + }, + + + getTotalLockedWidth : function(){ + var totalWidth = 0; + for(var i = 0; i < this.config.length; i++){ + if(this.isLocked(i) && !this.isHidden(i)){ + this.totalWidth += this.getColumnWidth(i); + } + } + return totalWidth; + }, + + + getLockedCount : function(){ + for(var i = 0, len = this.config.length; i < len; i++){ + if(!this.isLocked(i)){ + return i; + } + } + }, + + + getColumnCount : function(visibleOnly){ + if(visibleOnly === true){ + var c = 0; + for(var i = 0, len = this.config.length; i < len; i++){ + if(!this.isHidden(i)){ + c++; + } + } + return c; + } + return this.config.length; + }, + + + getColumnsBy : function(fn, scope){ + var r = []; + for(var i = 0, len = this.config.length; i < len; i++){ + var c = this.config[i]; + if(fn.call(scope||this, c, i) === true){ + r[r.length] = c; + } + } + return r; + }, + + + isSortable : function(col){ + if(typeof this.config[col].sortable == "undefined"){ + return this.defaultSortable; + } + return this.config[col].sortable; + }, + + + getRenderer : function(col){ + if(!this.config[col].renderer){ + return Ext.grid.ColumnModel.defaultRenderer; + } + return this.config[col].renderer; + }, + + + setRenderer : function(col, fn){ + this.config[col].renderer = fn; + }, + + + getColumnWidth : function(col){ + return this.config[col].width || this.defaultWidth; + }, + + + 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; + for(var i = 0, len = this.config.length; i < len; i++){ + if(includeHidden || !this.isHidden(i)){ + this.totalWidth += this.getColumnWidth(i); + } + } + } + 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++){ + if(c[i].dataIndex == dataIndex){ + return i; + } + } + return -1; + }, + + + isCellEditable : function(colIndex, rowIndex){ + return (this.config[colIndex].editable || (typeof this.config[colIndex].editable == "undefined" && this.config[colIndex].editor)) ? true : false; + }, + + + getCellEditor : function(colIndex, rowIndex){ + return this.config[colIndex].editor; + }, + + + setEditable : function(col, editable){ + this.config[col].editable = editable; + }, + + + + isHidden : function(colIndex){ + 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){ + c.hidden = hidden; + this.totalWidth = null; + this.fireEvent("hiddenchange", this, colIndex, hidden); + } + }, + + + setEditor : function(col, editor){ + this.config[col].editor = editor; + } +}); + + +Ext.grid.ColumnModel.defaultRenderer = function(value){ + if(typeof value == "string" && value.length < 1){ + return " "; + } + return value; +}; + + +Ext.grid.DefaultColumnModel = Ext.grid.ColumnModel; + + +Ext.grid.AbstractSelectionModel = function(){ + this.locked = false; + Ext.grid.AbstractSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.AbstractSelectionModel, Ext.util.Observable, { + + init : function(grid){ + this.grid = grid; + this.initEvents(); + }, + + + lock : function(){ + this.locked = true; + }, + + + unlock : function(){ + this.locked = false; + }, + + + isLocked : function(){ + return this.locked; + } +}); + +Ext.grid.RowSelectionModel = function(config){ + Ext.apply(this, config); + this.selections = new Ext.util.MixedCollection(false, function(o){ + return o.id; + }); + + this.last = false; + this.lastActive = false; + + this.addEvents( + + "selectionchange", + + "beforerowselect", + + "rowselect", + + "rowdeselect" + ); + + Ext.grid.RowSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { + + singleSelect : false, + + + initEvents : function(){ + + if(!this.grid.enableDragDrop && !this.grid.enableDrag){ + this.grid.on("rowmousedown", this.handleMouseDown, this); + }else{ + this.grid.on("rowclick", function(grid, rowIndex, e) { + if(e.button === 0 && !e.shiftKey && !e.ctrlKey) { + this.selectRow(rowIndex, false); + grid.view.focusRow(rowIndex); + } + }, this); + } + + this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), { + "up" : function(e){ + if(!e.shiftKey){ + this.selectPrevious(e.shiftKey); + }else if(this.last !== false && this.lastActive !== false){ + var last = this.last; + this.selectRange(this.last, this.lastActive-1); + this.grid.getView().focusRow(this.lastActive); + if(last !== false){ + this.last = last; + } + }else{ + this.selectFirstRow(); + } + }, + "down" : function(e){ + if(!e.shiftKey){ + this.selectNext(e.shiftKey); + }else if(this.last !== false && this.lastActive !== false){ + var last = this.last; + this.selectRange(this.last, this.lastActive+1); + this.grid.getView().focusRow(this.lastActive); + if(last !== false){ + this.last = last; + } + }else{ + this.selectFirstRow(); + } + }, + scope: this + }); + + var view = this.grid.view; + view.on("refresh", this.onRefresh, this); + view.on("rowupdated", this.onRowUpdated, this); + view.on("rowremoved", this.onRemove, this); + }, + + + onRefresh : function(){ + var ds = this.grid.store, index; + var s = this.getSelections(); + this.clearSelections(true); + for(var i = 0, len = s.length; i < len; i++){ + var r = s[i]; + if((index = ds.indexOfId(r.id)) != -1){ + this.selectRow(index, true); + } + } + if(s.length != this.selections.getCount()){ + this.fireEvent("selectionchange", this); + } + }, + + + 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(); + } + var ds = this.grid.store; + for(var i = 0, len = records.length; i < len; i++){ + this.selectRow(ds.indexOf(records[i]), true); + } + }, + + + 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); + this.grid.getView().focusRow(this.last); + } + }, + + + selectPrevious : function(keepExisting){ + if(this.hasPrevious()){ + this.selectRow(this.last-1, keepExisting); + this.grid.getView().focusRow(this.last); + } + }, + + + 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(); + for(var i = 0, len = s.length; i < len; i++){ + if(fn.call(scope || this, s[i], i) === false){ + return false; + } + } + return true; + }, + + + clearSelections : function(fast){ + if(this.locked) return; + if(fast !== true){ + var ds = this.grid.store; + var s = this.selections; + s.each(function(r){ + this.deselectRow(ds.indexOfId(r.id)); + }, this); + s.clear(); + }else{ + this.selections.clear(); + } + this.last = false; + }, + + + + selectAll : function(){ + if(this.locked) return; + this.selections.clear(); + for(var i = 0, len = this.grid.store.getCount(); i < len; i++){ + this.selectRow(i, true); + } + }, + + + hasSelection : function(){ + return this.selections.length > 0; + }, + + + isSelected : function(index){ + var r = typeof index == "number" ? 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; + }; + var view = this.grid.getView(); + if(e.shiftKey && this.last !== false){ + var last = this.last; + this.selectRange(last, rowIndex, e.ctrlKey); + this.last = last; + view.focusRow(rowIndex); + }else{ + var isSelected = this.isSelected(rowIndex); + if(e.ctrlKey && isSelected){ + this.deselectRow(rowIndex); + }else if(!isSelected || this.getCount() > 1){ + this.selectRow(rowIndex, e.ctrlKey || e.shiftKey); + view.focusRow(rowIndex); + } + } + }, + + + selectRows : function(rows, keepExisting){ + if(!keepExisting){ + this.clearSelections(); + } + for(var i = 0, len = rows.length; i < len; i++){ + this.selectRow(rows[i], true); + } + }, + + + selectRange : function(startRow, endRow, keepExisting){ + if(this.locked) return; + if(!keepExisting){ + this.clearSelections(); + } + if(startRow <= endRow){ + for(var i = startRow; i <= endRow; i++){ + this.selectRow(i, true); + } + }else{ + for(var i = startRow; i >= endRow; i--){ + this.selectRow(i, true); + } + } + }, + + + deselectRange : function(startRow, endRow, preventViewNotify){ + if(this.locked) return; + for(var i = startRow; i <= endRow; i++){ + this.deselectRow(i, preventViewNotify); + } + }, + + + selectRow : function(index, keepExisting, preventViewNotify){ + if(this.locked || (index < 0 || index >= this.grid.store.getCount())) return; + var r = this.grid.store.getAt(index); + if(r && this.fireEvent("beforerowselect", this, index, keepExisting, r) !== false){ + if(!keepExisting || this.singleSelect){ + this.clearSelections(); + } + this.selections.add(r); + this.last = this.lastActive = index; + if(!preventViewNotify){ + this.grid.getView().onRowSelect(index); + } + this.fireEvent("rowselect", this, index, r); + this.fireEvent("selectionchange", this); + } + }, + + + deselectRow : function(index, preventViewNotify){ + if(this.locked) return; + if(this.last == index){ + this.last = false; + } + if(this.lastActive == index){ + this.lastActive = false; + } + var r = this.grid.store.getAt(index); + if(r){ + this.selections.remove(r); + if(!preventViewNotify){ + this.grid.getView().onRowDeselect(index); + } + this.fireEvent("rowdeselect", this, index, r); + this.fireEvent("selectionchange", this); + } + }, + + + restoreLast : function(){ + if(this._last){ + this.last = this._last; + } + }, + + + 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, ed = g.activeEditor; + if(k == e.TAB){ + e.stopEvent(); + ed.completeEdit(); + if(e.shiftKey){ + newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this); + }else{ + newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); + } + }else if(k == e.ENTER){ + e.stopEvent(); + ed.completeEdit(); + if(e.shiftKey){ + newCell = g.walkCells(ed.row-1, ed.col, -1, this.acceptsNav, this); + }else{ + newCell = g.walkCells(ed.row+1, ed.col, 1, this.acceptsNav, this); + } + }else if(k == e.ESC){ + ed.cancelEdit(); + } + if(newCell){ + g.startEditing(newCell[0], newCell[1]); + } + } +}); + +Ext.grid.CellSelectionModel = function(config){ + Ext.apply(this, config); + + this.selection = null; + + this.addEvents( + + "beforecellselect", + + "cellselect", + + "selectionchange" + ); + + Ext.grid.CellSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel, { + + + initEvents : function(){ + this.grid.on("cellmousedown", this.handleMouseDown, this); + this.grid.getGridEl().on(Ext.isIE ? "keydown" : "keypress", this.handleKeyDown, this); + var view = this.grid.view; + view.on("refresh", this.onViewChange, this); + view.on("rowupdated", this.onRowUpdated, this); + view.on("beforerowremoved", this.clearSelections, this); + view.on("beforerowsinserted", this.clearSelections, this); + if(this.grid.isEditor){ + this.grid.on("beforeedit", this.beforeEdit, this); + } + }, + + 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){ + if(preventNotify !== true){ + this.grid.view.onCellDeselect(s.cell[0], s.cell[1]); + } + this.selection = null; + this.fireEvent("selectionchange", this, null); + } + }, + + + hasSelection : function(){ + return this.selection ? true : false; + }, + + + handleMouseDown : function(g, row, cell, e){ + if(e.button !== 0 || this.isLocked()){ + return; + }; + this.select(row, cell); + }, + + + select : function(rowIndex, colIndex, preventViewNotify, preventFocus, r){ + if(this.fireEvent("beforecellselect", this, rowIndex, colIndex) !== false){ + this.clearSelections(); + r = r || this.grid.store.getAt(rowIndex); + this.selection = { + record : r, + cell : [rowIndex, colIndex] + }; + if(!preventViewNotify){ + var v = this.grid.getView(); + v.onCellSelect(rowIndex, colIndex); + if(preventFocus !== true){ + v.focusCell(rowIndex, colIndex); + } + } + this.fireEvent("cellselect", this, rowIndex, colIndex); + this.fireEvent("selectionchange", this, this.selection); + } + }, + + isSelectable : function(rowIndex, colIndex, cm){ + return !cm.isHidden(colIndex); + }, + + + handleKeyDown : function(e){ + if(!e.isNavKeyPress()){ + return; + } + var g = this.grid, s = this.selection; + if(!s){ + e.stopEvent(); + var cell = g.walkCells(0, 0, 1, this.isSelectable, this); + if(cell){ + this.select(cell[0], cell[1]); + } + return; + } + var sm = this; + var walk = function(row, col, step){ + return g.walkCells(row, col, step, sm.isSelectable, sm); + }; + var k = e.getKey(), r = s.cell[0], c = s.cell[1]; + var newCell; + + switch(k){ + case e.TAB: + if(e.shiftKey){ + newCell = walk(r, c-1, -1); + }else{ + newCell = walk(r, c+1, 1); + } + break; + case e.DOWN: + newCell = walk(r+1, c, 1); + break; + case e.UP: + newCell = walk(r-1, c, -1); + break; + case e.RIGHT: + newCell = walk(r, c+1, 1); + break; + case e.LEFT: + newCell = walk(r, c-1, -1); + break; + case e.ENTER: + if(g.isEditor && !g.editing){ + g.startEditing(r, c); + e.stopEvent(); + return; + } + break; + }; + if(newCell){ + this.select(newCell[0], newCell[1]); + e.stopEvent(); + } + }, + + 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, ed = g.activeEditor; + if(k == e.TAB){ + if(e.shiftKey){ + newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this); + }else{ + newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); + } + e.stopEvent(); + }else if(k == e.ENTER){ + ed.completeEdit(); + e.stopEvent(); + }else if(k == e.ESC){ + e.stopEvent(); + ed.cancelEdit(); + } + if(newCell){ + g.startEditing(newCell[0], newCell[1]); + } + } +}); + +Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { + + clicksToEdit: 2, + + + isEditor : true, + + detectEdit: false, + + + + trackMouseOver: false, + + + initComponent : function(){ + Ext.grid.EditorGridPanel.superclass.initComponent.call(this); + + if(!this.selModel){ + this.selModel = new Ext.grid.CellSelectionModel(); + } + + this.activeEditor = null; + + this.addEvents( + + "beforeedit", + + "afteredit", + + "validateedit" + ); + }, + + + initEvents : function(){ + Ext.grid.EditorGridPanel.superclass.initEvents.call(this); + + this.on("bodyscroll", this.stopEditing, this); + + if(this.clicksToEdit == 1){ + this.on("cellclick", this.onCellDblClick, this); + }else { + if(this.clicksToEdit == 'auto' && this.view.mainBody){ + this.view.mainBody.on("mousedown", this.onAutoEditClick, this); + } + this.on("celldblclick", this.onCellDblClick, this); + } + this.getGridEl().addClass("xedit-grid"); + }, + + + onCellDblClick : function(g, row, col){ + this.startEditing(row, col); + }, + + + onAutoEditClick : function(e, t){ + var row = this.view.findRowIndex(t); + var col = this.view.findCellIndex(t); + if(row !== false && col !== false){ + if(this.selModel.getSelectedCell){ + var sc = this.selModel.getSelectedCell(); + if(sc && sc.cell[0] === row && sc.cell[1] === col){ + this.startEditing(row, col); + } + }else{ + if(this.selModel.isSelected(row)){ + this.startEditing(row, col); + } + } + } + }, + + + onEditComplete : function(ed, value, startValue){ + this.editing = false; + this.activeEditor = null; + ed.un("specialkey", this.selModel.onEditorKey, this.selModel); + if(String(value) !== String(startValue)){ + var r = ed.record; + var field = this.colModel.getDataIndex(ed.col); + var e = { + grid: this, + record: r, + field: field, + originalValue: startValue, + value: value, + row: ed.row, + column: ed.col, + cancel:false + }; + if(this.fireEvent("validateedit", e) !== false && !e.cancel){ + r.set(field, e.value); + delete e.cancel; + this.fireEvent("afteredit", e); + } + } + this.view.focusCell(ed.row, ed.col); + }, + + + startEditing : function(row, col){ + this.stopEditing(); + if(this.colModel.isCellEditable(col, row)){ + this.view.ensureVisible(row, col, true); + var r = this.store.getAt(row); + var field = this.colModel.getDataIndex(col); + var e = { + grid: this, + record: r, + field: field, + value: r.data[field], + row: row, + column: col, + cancel:false + }; + if(this.fireEvent("beforeedit", e) !== false && !e.cancel){ + this.editing = true; + var ed = this.colModel.getCellEditor(col, row); + if(!ed.rendered){ + ed.render(this.view.getEditorParent(ed)); + } + (function(){ + ed.row = row; + ed.col = col; + ed.record = r; + ed.on("complete", this.onEditComplete, this, {single: true}); + ed.on("specialkey", this.selModel.onEditorKey, this.selModel); + this.activeEditor = ed; + var v = r.data[field]; + ed.startEdit(this.view.getCell(row, col), v); + }).defer(50, this); + } + } + }, + + + stopEditing : function(){ + if(this.activeEditor){ + this.activeEditor.completeEdit(); + } + this.activeEditor = null; + } +}); +Ext.reg('editorgrid', Ext.grid.EditorGridPanel); +Ext.grid.GridEditor = function(field, config){ + Ext.grid.GridEditor.superclass.constructor.call(this, field, config); + field.monitorTab = false; +}; + +Ext.extend(Ext.grid.GridEditor, Ext.Editor, { + alignment: "tl-tl", + autoSize: "width", + hideEl : false, + cls: "x-small-editor x-grid-editor", + shim:false, + shadow:false +}); + +Ext.grid.PropertyRecord = Ext.data.Record.create([ + {name:'name',type:'string'}, 'value' +]); + + +Ext.grid.PropertyStore = function(grid, source){ + this.grid = grid; + this.store = new Ext.data.Store({ + recordType : Ext.grid.PropertyRecord + }); + this.store.on('update', this.onUpdate, this); + if(source){ + this.setSource(source); + } + Ext.grid.PropertyStore.superclass.constructor.call(this); +}; +Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, { + setSource : function(o){ + this.source = o; + this.store.removeAll(); + var data = []; + for(var k in o){ + if(this.isEditableValue(o[k])){ + data.push(new Ext.grid.PropertyRecord({name: k, value: o[k]}, k)); + } + } + this.store.loadRecords({records: data}, {}, true); + }, + + onUpdate : function(ds, record, type){ + if(type == Ext.data.Record.EDIT){ + var v = record.data['value']; + var oldValue = record.modified['value']; + if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){ + this.source[record.id] = v; + record.commit(); + this.grid.fireEvent('propertychange', this.source, record.id, v, oldValue); + }else{ + record.reject(); + } + } + }, + + getProperty : function(row){ + return this.store.getAt(row); + }, + + isEditableValue: function(val){ + if(val && val instanceof Date){ + return true; + }else if(typeof val == 'object' || typeof val == 'function'){ + return false; + } + return true; + }, + + setValue : function(prop, value){ + this.source[prop] = value; + this.store.getById(prop).set('value', value); + }, + + getSource : function(){ + return this.source; + } +}); + + +Ext.grid.PropertyColumnModel = function(grid, store){ + this.grid = grid; + var g = Ext.grid; + g.PropertyColumnModel.superclass.constructor.call(this, [ + {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name'}, + {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value'} + ]); + this.store = store; + this.bselect = Ext.DomHelper.append(document.body, { + tag: 'select', cls: 'x-grid-editor x-hide-display', children: [ + {tag: 'option', value: 'true', html: 'true'}, + {tag: 'option', value: 'false', html: 'false'} + ] + }); + var f = Ext.form; + + var bfield = new f.Field({ + el:this.bselect, + bselect : this.bselect, + autoShow: true, + getValue : function(){ + return this.bselect.value == 'true'; + } + }); + this.editors = { + 'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})), + 'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})), + 'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})), + 'boolean' : new g.GridEditor(bfield) + }; + this.renderCellDelegate = this.renderCell.createDelegate(this); + this.renderPropDelegate = this.renderProp.createDelegate(this); +}; + +Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, { + nameText : 'Name', + valueText : 'Value', + dateFormat : 'm/j/Y', + + renderDate : function(dateVal){ + return dateVal.dateFormat(this.dateFormat); + }, + + renderBool : function(bVal){ + return bVal ? 'true' : 'false'; + }, + + 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){ + var rv = val; + if(val instanceof Date){ + rv = this.renderDate(val); + }else if(typeof val == 'boolean'){ + rv = this.renderBool(val); + } + 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); + var n = p.data['name'], val = p.data['value']; + if(this.grid.customEditors[n]){ + return this.grid.customEditors[n]; + } + if(val instanceof Date){ + return this.editors['date']; + }else if(typeof val == 'number'){ + return this.editors['number']; + }else if(typeof val == 'boolean'){ + return this.editors['boolean']; + }else{ + return this.editors['string']; + } + } +}); + + +Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { + + + + enableColLock:false, + enableColumnMove:false, + stripeRows:false, + trackMouseOver: false, + clicksToEdit:1, + enableHdMenu : false, + viewConfig : { + forceFit:true + }, + + initComponent : function(){ + this.customEditors = this.customEditors || {}; + this.lastEditRow = null; + var store = new Ext.grid.PropertyStore(this); + this.propStore = store; + var cm = new Ext.grid.PropertyColumnModel(this, store); + store.store.sort('name', 'ASC'); + this.addEvents( + + 'beforepropertychange', + + 'propertychange' + ); + this.cm = cm; + this.ds = store.store; + Ext.grid.PropertyGrid.superclass.initComponent.call(this); + + this.selModel.on('beforecellselect', function(sm, rowIndex, colIndex){ + if(colIndex === 0){ + this.startEditing.defer(200, this, [rowIndex, 1]); + return false; + } + }, this); + }, + + onRender : function(){ + Ext.grid.PropertyGrid.superclass.onRender.apply(this, arguments); + + this.getGridEl().addClass('x-props-grid'); + }, + + afterRender: function(){ + Ext.grid.PropertyGrid.superclass.afterRender.apply(this, arguments); + if(this.source){ + this.setSource(this.source); + } + }, + + + setSource : function(source){ + this.propStore.setSource(source); + }, + + + getSource : function(){ + return this.propStore.getSource(); + } +}); + +Ext.grid.RowNumberer = function(config){ + Ext.apply(this, config); + if(this.rowspan){ + this.renderer = this.renderer.createDelegate(this); + } +}; + +Ext.grid.RowNumberer.prototype = { + + header: "", + + width: 23, + + sortable: false, + + + fixed:true, + dataIndex: '', + id: 'numberer', + rowspan: undefined, + + + renderer : function(v, p, record, rowIndex){ + if(this.rowspan){ + p.cellAttr = 'rowspan="'+this.rowspan+'"'; + } + return rowIndex+1; + } +}; + +Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { + + header: '
     
    ', + + width: 20, + + sortable: false, + + + fixed:true, + dataIndex: '', + id: 'checker', + + + initEvents : function(){ + Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this); + this.grid.on('render', function(){ + var view = this.grid.getView(); + view.mainBody.on('mousedown', this.onMouseDown, this); + Ext.fly(view.innerHd).on('mousedown', this.onHdMouseDown, this); + + }, this); + }, + + + onMouseDown : function(e, t){ + if(t.className == 'x-grid3-row-checker'){ + e.stopEvent(); + var row = e.getTarget('.x-grid3-row'); + if(row){ + var index = row.rowIndex; + if(this.isSelected(index)){ + this.deselectRow(index); + }else{ + this.selectRow(index, true); + } + } + } + }, + + + onHdMouseDown : function(e, t){ + if(t.className == 'x-grid3-hd-checker'){ + e.stopEvent(); + var hd = Ext.fly(t.parentNode); + var isChecked = hd.hasClass('x-grid3-hd-checker-on'); + if(isChecked){ + hd.removeClass('x-grid3-hd-checker-on'); + this.clearSelections(); + }else{ + hd.addClass('x-grid3-hd-checker-on'); + this.selectAll(); + } + } + }, + + + renderer : function(v, p, record){ + return '
     
    '; + } +}); + +Ext.LoadMask = function(el, config){ + this.el = Ext.get(el); + Ext.apply(this, config); + if(this.store){ + this.store.on('beforeload', this.onBeforeLoad, this); + this.store.on('load', this.onLoad, this); + this.store.on('loadexception', this.onLoad, this); + this.removeMask = Ext.value(this.removeMask, false); + }else{ + var um = this.el.getUpdater(); + um.showLoadIndicator = false; um.on('beforeupdate', this.onBeforeLoad, this); + um.on('update', this.onLoad, this); + um.on('failure', this.onLoad, this); + this.removeMask = Ext.value(this.removeMask, true); + } +}; + +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); + this.store.un('load', this.onLoad, this); + this.store.un('loadexception', this.onLoad, this); + }else{ + var um = this.el.getUpdater(); + um.un('beforeupdate', this.onBeforeLoad, this); + um.un('update', this.onLoad, this); + um.un('failure', this.onLoad, this); + } + } +}; + +Ext.ProgressBar = Ext.extend(Ext.BoxComponent, { + + baseCls : 'x-progress', + + + waitTimer : null, + + + initComponent : function(){ + Ext.ProgressBar.superclass.initComponent.call(this); + this.addEvents( + + "update" + ); + }, + + + onRender : function(ct, position){ + Ext.ProgressBar.superclass.onRender.call(this, ct, position); + + var tpl = new Ext.Template( + '
    ', + '
    ', + '
    ', + '
    ', + '
     
    ', + '
    ', + '
    ', + '
    ', + '
     
    ', + '
    ', + '
    ', + '
    ' + ); + + if(position){ + this.el = tpl.insertBefore(position, {cls: this.baseCls}, true); + }else{ + this.el = tpl.append(ct, {cls: this.baseCls}, true); + } + if(this.id){ + this.el.dom.id = this.id; + } + var inner = this.el.dom.firstChild; + 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'); + this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]); + this.textEl.setWidth(inner.offsetWidth); + } + if(this.value){ + this.updateProgress(this.value, this.text); + }else{ + this.updateText(this.text); + } + this.setSize(this.width || 'auto', 'auto'); + this.progressBar.setHeight(inner.offsetHeight); + }, + + + updateProgress : function(value, text){ + this.value = value || 0; + if(text){ + this.updateText(text); + } + var w = Math.floor(value*this.el.dom.firstChild.offsetWidth); + this.progressBar.setWidth(w); + if(this.textTopEl){ + + this.textTopEl.removeClass('x-hidden').setWidth(w); + } + this.fireEvent('update', this, value, text); + return this; + }, + + + wait : function(o){ + if(!this.waitTimer){ + var scope = this; + o = o || {}; + this.waitTimer = Ext.TaskMgr.start({ + run: function(i){ + var inc = o.increment || 10; + this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*.01); + }, + interval: o.interval || 1000, + duration: o.duration, + onStop: function(){ + if(o.fn){ + o.fn.apply(o.scope || this); + } + this.reset(); + }, + scope: scope + }); + } + return this; + }, + + + isWaiting : function(){ + return this.waitTimer != null; + }, + + + updateText : function(text){ + this.text = text || ' '; + this.textEl.update(this.text); + return this; + }, + + + setSize : function(w, h){ + Ext.ProgressBar.superclass.setSize.call(this, w, h); + if(this.textTopEl){ + var inner = this.el.dom.firstChild; + this.textEl.setSize(inner.offsetWidth, inner.offsetHeight); + } + return this; + }, + + + reset : function(hide){ + this.updateProgress(0); + if(this.textTopEl){ + this.textTopEl.addClass('x-hidden'); + } + if(this.waitTimer){ + this.waitTimer.onStop = null; + Ext.TaskMgr.stop(this.waitTimer); + this.waitTimer = null; + } + if(hide === true){ + this.hide(); + } + return this; + } +}); +Ext.reg('progress', Ext.ProgressBar); +Ext.debug = {}; + +(function(){ + +var cp; + +function createConsole(){ + + var scriptPanel = new Ext.debug.ScriptsPanel(); + var logView = new Ext.debug.LogPanel(); + var tree = new Ext.debug.DomTree(); + + var tabs = new Ext.TabPanel({ + activeTab: 0, + border: false, + tabPosition: 'bottom', + items: [{ + title: 'Debug Console', + layout:'border', + items: [logView, scriptPanel] + },{ + title: 'DOM Inspector', + layout:'border', + items: [tree] + }] + }); + + cp = new Ext.Panel({ + id: 'x-debug-browser', + title: 'Console', + collapsible: true, + animCollapse: false, + style: 'position:absolute;left:0;bottom:0;', + height:200, + logView: logView, + layout: 'fit', + + tools:[{ + id: 'close', + handler: function(){ + cp.destroy(); + cp = null; + Ext.EventManager.removeResizeListener(handleResize); + } + }], + + items: tabs + }); + + cp.render(document.body); + + cp.resizer = new Ext.Resizable(cp.el, { + minHeight:50, + handles: "n", + pinned: true, + transparent:true, + resizeElement : function(){ + var box = this.proxy.getBox(); + this.proxy.hide(); + cp.setHeight(box.height); + return box; + } + }); + + function handleResize(){ + cp.setWidth(Ext.getBody().getViewSize().width); + } + Ext.EventManager.onWindowResize(handleResize); + + handleResize(); +} + + +Ext.apply(Ext, { + log : function(){ + if(!cp){ + createConsole(); + } + cp.logView.log.apply(cp.logView, arguments); + }, + + logf : function(format, arg1, arg2, etc){ + Ext.log(String.format.apply(String, arguments)); + }, + + dump : function(o){ + if(typeof o == 'string' || typeof o == 'number' || typeof o == 'undefined' || o instanceof Date){ + Ext.log(o); + }else if(!o){ + Ext.log("null"); + }else if(typeof o != "object"){ + Ext.log('Unknown return type'); + }else if(o instanceof Array){ + Ext.log('['+o.join(',')+']'); + }else{ + var b = ["{\n"]; + for(var key in o){ + var to = typeof o[key]; + if(to != "function" && to != "object"){ + b.push(String.format(" {0}: {1},\n", key, o[key])); + } + } + var s = b.join(""); + if(s.length > 3){ + s = s.substr(0, s.length-2); + } + Ext.log(s + "\n}"); + } + }, + + _timers : {}, + + time : function(name){ + name = name || "def"; + Ext._timers[name] = new Date().getTime(); + }, + + timeEnd : function(name, printResults){ + var t = new Date().getTime(); + name = name || "def"; + var v = String.format("{0} ms", t-Ext._timers[name]); + Ext._timers[name] = new Date().getTime(); + if(printResults !== false){ + Ext.log('Timer ' + (name == "def" ? v : name + ": " + v)); + } + return v; + } +}); + +})(); + + +Ext.debug.ScriptsPanel = Ext.extend(Ext.Panel, { + id:'x-debug-scripts', + region: 'east', + minWidth: 200, + split: true, + width: 350, + border: false, + layout:'anchor', + style:'border-width:0 0 0 1px;', + + initComponent : function(){ + + this.scriptField = new Ext.form.TextArea({ + anchor: '100% -26', + style:'border-width:0;' + }); + + this.trapBox = new Ext.form.Checkbox({ + id: 'console-trap', + boxLabel: 'Trap Errors', + checked: true + }); + + this.toolbar = new Ext.Toolbar([{ + text: 'Run', + scope: this, + handler: this.evalScript + },{ + text: 'Clear', + scope: this, + handler: this.clear + }, + '->', + this.trapBox, + ' ', ' ' + ]); + + this.items = [this.toolbar, this.scriptField]; + + Ext.debug.ScriptsPanel.superclass.initComponent.call(this); + }, + + evalScript : function(){ + var s = this.scriptField.getValue(); + if(this.trapBox.getValue()){ + try{ + var rt = eval(s); + Ext.dump(rt === undefined? '(no return)' : rt); + }catch(e){ + Ext.log(e.message || e.descript); + } + }else{ + var rt = eval(s); + Ext.dump(rt === undefined? '(no return)' : rt); + } + }, + + clear : function(){ + this.scriptField.setValue(''); + this.scriptField.focus(); + } + +}); + +Ext.debug.LogPanel = Ext.extend(Ext.Panel, { + autoScroll: true, + region: 'center', + border: false, + style:'border-width:0 1px 0 0', + + log : function(){ + var markup = [ '
    ', + Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments, ', ')).replace(/\n/g, '
    ').replace(/\s/g, ' '), + '
    '].join(''); + + this.body.insertHtml('beforeend', markup); + this.body.scrollTo('top', 100000); + }, + + clear : function(){ + this.body.update(''); + this.body.dom.scrollTop = 0; + } +}); + +Ext.debug.DomTree = Ext.extend(Ext.tree.TreePanel, { + enableDD:false , + lines:false, + rootVisible:false, + animate:false, + hlColor:'ffff9c', + autoScroll: true, + region:'center', + border:false, + + initComponent : function(){ + + + Ext.debug.DomTree.superclass.initComponent.call(this); + + var styles = false, hnode; + var nonSpace = /^\s*$/; + var html = Ext.util.Format.htmlEncode; + var ellipsis = Ext.util.Format.ellipsis; + var styleRe = /\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi; + + function findNode(n){ + if(!n || n.nodeType != 1 || n == document.body || n == document){ + return false; + } + var pn = [n], p = n; + while((p = p.parentNode) && p.nodeType == 1 && p.tagName.toUpperCase() != 'HTML'){ + pn.unshift(p); + } + var cn = hnode; + for(var i = 0, len = pn.length; i < len; i++){ + cn.expand(); + cn = cn.findChild('htmlNode', pn[i]); + if(!cn){ return false; + } + } + cn.select(); + var a = cn.ui.anchor; + treeEl.dom.scrollTop = Math.max(0 ,a.offsetTop-10); + cn.highlight(); + return true; + } + + function nodeTitle(n){ + var s = n.tagName; + if(n.id){ + s += '#'+n.id; + }else if(n.className){ + s += '.'+n.className; + } + return s; + } + + function onNodeSelect(t, n, last){ + return; + if(last && last.unframe){ + last.unframe(); + } + var props = {}; + if(n && n.htmlNode){ + if(frameEl.pressed){ + n.frame(); + } + if(inspecting){ + return; + } + addStyle.enable(); + reload.setDisabled(n.leaf); + var dom = n.htmlNode; + stylePanel.setTitle(nodeTitle(dom)); + if(styles && !showAll.pressed){ + var s = dom.style ? dom.style.cssText : ''; + if(s){ + var m; + while ((m = styleRe.exec(s)) != null){ + props[m[1].toLowerCase()] = m[2]; + } + } + }else if(styles){ + var cl = Ext.debug.cssList; + var s = dom.style, fly = Ext.fly(dom); + if(s){ + for(var i = 0, len = cl.length; i' + ellipsis(html(String(c.nodeValue)), 35) + '', + cls: 'x-tree-noicon' + })); + } + } + cb(); + }; + + + this.root = this.setRootNode(new Ext.tree.TreeNode('Ext')); + + hnode = this.root.appendChild(new Ext.debug.HtmlNode( + document.getElementsByTagName('html')[0] + )); + + } +}); + + +Ext.debug.HtmlNode = function(){ + var html = Ext.util.Format.htmlEncode; + var ellipsis = Ext.util.Format.ellipsis; + var nonSpace = /^\s*$/; + + var attrs = [ + {n: 'id', v: 'id'}, + {n: 'className', v: 'class'}, + {n: 'name', v: 'name'}, + {n: 'type', v: 'type'}, + {n: 'src', v: 'src'}, + {n: 'href', v: 'href'} + ]; + + function hasChild(n){ + for(var i = 0, c; c = n.childNodes[i]; i++){ + if(c.nodeType == 1){ + return true; + } + } + return false; + } + + function renderNode(n, leaf){ + var tag = n.tagName.toLowerCase(); + var s = '<' + tag; + for(var i = 0, len = attrs.length; i < len; i++){ + var a = attrs[i]; + var v = n[a.n]; + if(v && !nonSpace.test(v)){ + s += ' ' + a.v + '="' + html(v) +'"'; + } + } + var style = n.style ? n.style.cssText : ''; + if(style){ + s += ' style="' + html(style.toLowerCase()) +'"'; + } + if(leaf && n.childNodes.length > 0){ + s+='>' + ellipsis(html(String(n.innerHTML)), 35) + '</'+tag+'>'; + }else if(leaf){ + s += ' />'; + }else{ + s += '>'; + } + return s; + } + + var HtmlNode = function(n){ + var leaf = !hasChild(n); + this.htmlNode = n; + this.tagName = n.tagName.toLowerCase(); + var attr = { + text : renderNode(n, leaf), + leaf : leaf, + cls: 'x-tree-noicon' + }; + HtmlNode.superclass.constructor.call(this, attr); + this.attributes.htmlNode = n; if(!leaf){ + this.on('expand', this.onExpand, this); + this.on('collapse', this.onCollapse, this); + } + }; + + + Ext.extend(HtmlNode, Ext.tree.AsyncTreeNode, { + cls: 'x-tree-noicon', + preventHScroll: true, + refresh : function(highlight){ + var leaf = !hasChild(this.htmlNode); + this.setText(renderNode(this.htmlNode, leaf)); + if(highlight){ + Ext.fly(this.ui.textNode).highlight(); + } + }, + + onExpand : function(){ + if(!this.closeNode && this.parentNode){ + this.closeNode = this.parentNode.insertBefore(new Ext.tree.TreeNode({ + text:'</' + this.tagName + '>', + cls: 'x-tree-noicon' + }), this.nextSibling); + }else if(this.closeNode){ + this.closeNode.ui.show(); + } + }, + + onCollapse : function(){ + if(this.closeNode){ + this.closeNode.ui.hide(); + } + }, + + render : function(bulkRender){ + HtmlNode.superclass.render.call(this, bulkRender); + }, + + highlightNode : function(){ + }, + + highlight : function(){ + }, + + frame : function(){ + this.htmlNode.style.border = '1px solid #0000ff'; + }, + + unframe : function(){ + this.htmlNode.style.border = ''; + } + }); + + return HtmlNode; +}(); + + + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/ext-all.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/ext-all.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/ext-all.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,156 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.DomHelper=function(){var L=null;var F=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var B=/^table|tbody|tr|td$/i;var A=function(T){if(typeof T=="string"){return T}var P="";if(!T.tag){T.tag="div"}P+="<"+T.tag;for(var O in T){if(O=="tag"||O=="children"||O=="cn"||O=="html"||typeof T[O]=="function"){continue}if(O=="style"){var S=T["style"];if(typeof S=="function"){S=S.call()}if(typeof S=="string"){P+=" style=\""+S+"\""}else{if(typeof S=="object"){P+=" style=\"";for(var R in S){if(typeof S[R]!="function"){P+=R+":"+S[R]+";"}}P+="\""}}}else{if(O=="cls"){P+=" class=\""+T["cls"]+"\""}else{if(O=="htmlFor"){P+=" for=\""+T["htmlFor"]+"\""}else{P+=" "+O+"=\""+T[O]+"\""}}}}if(F.test(T.tag)){P+="/>"}else{P+=">";var U=T.children||T.cn;if(U){if(U instanceof Array){for(var Q=0,N=U.length;Q"}return P};var M=function(T,P){var S=document.createElement(T.tag||"div");var Q=S.setAttribute?true:false;for(var O in T){if(O=="tag"||O=="children"||O=="cn"||O=="html"||O=="style"||typeof T[O]=="function"){continue}if(O=="cls"){S.className=T["cls"]}else{if(Q){S.setAttribute(O,T[O])}else{S[O]=T[O]}}}Ext.DomHelper.applyStyles(S,T.style);var U=T.children||T.cn;if(U){if(U instanceof Array){for(var R=0,N=U.length;R",K=""+E,H=C+"",D=""+K;var G=function(N,O,Q,P){if(!L){L=document.createElement("div")}var R;var S=null;if(N=="td"){if(O=="afterbegin"||O=="beforeend"){return }if(O=="beforebegin"){S=Q;Q=Q.parentNode}else{S=Q.nextSibling;Q=Q.parentNode}R=I(4,H,P,D)}else{if(N=="tr"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(4,H,P,D)}}}else{if(N=="tbody"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(3,C,P,K)}}}else{if(O=="beforebegin"||O=="afterend"){return }if(O=="afterbegin"){S=Q.firstChild}R=I(2,J,P,E)}}}Q.insertBefore(R,S);return R};return{useDom:false,markup:function(N){return A(N)},applyStyles:function(P,Q){if(Q){P=Ext.fly(P);if(typeof Q=="string"){var O=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var R;while((R=O.exec(Q))!=null){P.setStyle(R[1],R[2])}}else{if(typeof Q=="object"){for(var N in Q){P.setStyle(N,Q[N])}}else{if(typeof Q=="function"){Ext.DomHelper.applyStyles(P,Q.call())}}}}},insertHtml:function(P,R,Q){P=P.toLowerCase();if(R.insertAdjacentHTML){if(B.test(R.tagName)){var O;if(O=G(R.tagName.toLowerCase(),P,R,Q)){return O}}switch(P){case"beforebegin":R.insertAdjacentHTML("BeforeBegin",Q);return R.previousSibling;case"afterbegin":R.insertAdjacentHTML("AfterBegin",Q);return R.firstChild;case"beforeend":R.insertAdjacentHTML("BeforeEnd",Q);return R.lastChild;case"afterend":R.insertAdjacentHTML("AfterEnd",Q);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""}var N=R.ownerDocument.createRange();var S;switch(P){case"beforebegin":N.setStartBefore(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R);return R.previousSibling;case"afterbegin":if(R.firstChild){N.setStartBefore(R.firstChild);S=N.createContextualFragment(Q);R.insertBefore(S,R.firstChild);return R.firstChild}else{R.innerHTML=Q;return R.firstChild}case"beforeend":if(R.lastChild){N.setStartAfter(R.lastChild);S=N.createContextualFragment(Q);R.appendChild(S);return R.lastChild}else{R.innerHTML=Q;return R.lastChild}case"afterend":N.setStartAfter(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R.nextSibling);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""},insertBefore:function(N,P,O){return this.doInsert(N,P,O,"beforeBegin")},insertAfter:function(N,P,O){return this.doInsert(N,P,O,"afterEnd","nextSibling")},insertFirst:function(N,P,O){return this.doInsert(N,P,O,"afterBegin","firstChild")},doInsert:function(Q,S,R,T,P){Q=Ext.getDom(Q);var O;if(this.useDom){O=M(S,null);(P==="firstChild"?Q:Q.parentNode).insertBefore(O,P?Q[P]:Q)}else{var N=A(S);O=this.insertHtml(T,Q,N)}return R?Ext.get(O,true):O},append:function(P,R,Q){P=Ext.getDom(P);var O;if(this.useDom){O=M(R,null);P.appendChild(O)}else{var N=A(R);O=this.insertHtml("beforeEnd",P,N)}return Q?Ext.get(O,true):O},overwrite:function(N,P,O){N=Ext.getDom(N);N.innerHTML=A(P);return O?Ext.get(N.firstChild,true):N.firstChild},createTemplate:function(O){var N=A(O);return new Ext.Template(N)}}}(); +Ext.Template=function(E){var B=arguments;if(E instanceof Array){E=E.join("")}else{if(B.length>1){var C=[];for(var D=0,A=B.length;D+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.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(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}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.children||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=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){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},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);n=n[0]?n[0]:n;var 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=(el instanceof Array);var 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, null, \" {1} \");"},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([\w-]+)/,select:"n = byId(n, null, \"{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;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var 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("|");var 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;var 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;var 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;var 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.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var A=this.events[arguments[0].toLowerCase()];if(typeof A=="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A,C,B,F){if(typeof A=="object"){F=A;for(var E in F){if(this.filterOptRe.test(E)){continue}if(typeof F[E]=="function"){this.addListener(E,F[E],F.scope,F)}else{this.addListener(E,F[E].fn,F[E].scope,F[E])}}return }F=(!F||typeof F=="boolean")?{}:F;A=A.toLowerCase();var D=this.events[A]||true;if(typeof D=="boolean"){D=new Ext.util.Event(this,A);this.events[A]=D}D.addListener(C,B,F)},removeListener:function(A,C,B){var D=this.events[A.toLowerCase()];if(typeof D=="object"){D.removeListener(C,B)}},purgeListeners:function(){for(var A in this.events){if(typeof this.events[A]=="object"){this.events[A].clearListeners()}}},relayEvents:function(F,D){var E=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G,Array.prototype.slice.call(arguments,0)))}};for(var C=0,A=D.length;C0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(G){if(!this.methodEvents){this.methodEvents={}}var F=this.methodEvents[G];if(!F){F={};this.methodEvents[G]=F;F.originalFn=this[G];F.methodName=G;F.before=[];F.after=[];var C,B,D;var E=this;var A=function(J,I,H){if((B=J.apply(I||E,H))!==undefined){if(typeof B==="object"){if(B.returnValue!==undefined){C=B.returnValue}else{C=B}if(B.cancel===true){D=true}}else{if(B===false){D=true}else{C=B}}}};this[G]=function(){C=B=undefined;D=false;var I=Array.prototype.slice.call(arguments,0);for(var J=0,H=F.before.length;J0){this.firing=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H");var D=document.getElementById("ie-deferred-loader");D.onreadystatechange=function(){if(this.readyState=="complete"){B()}}}else{if(Ext.isSafari){M=setInterval(function(){var E=document.readyState;if(E=="complete"){B()}},10)}}}L.on(window,"load",B)};var R=function(E,U){var D=new Ext.util.DelayedTask(E);return function(V){V=new Ext.EventObjectImpl(V);D.delay(U.buffer,E,null,[V])}};var P=function(V,U,D,E){return function(W){Ext.EventManager.removeListener(U,D,E);V(W)}};var F=function(D,E){return function(U){U=new Ext.EventObjectImpl(U);setTimeout(function(){D(U)},E.delay||10)}};var J=function(U,E,D,Y,X){var Z=(!D||typeof D=="boolean")?{}:D;Y=Y||Z.fn;X=X||Z.scope;var W=Ext.getDom(U);if(!W){throw"Error listening for \""+E+"\". Element \""+U+"\" doesn't exist."}var V=function(b){b=Ext.EventObject.setEvent(b);var a;if(Z.delegate){a=b.getTarget(Z.delegate,W);if(!a){return }}else{a=b.target}if(Z.stopEvent===true){b.stopEvent()}if(Z.preventDefault===true){b.preventDefault()}if(Z.stopPropagation===true){b.stopPropagation()}if(Z.normalized===false){b=b.browserEvent}Y.call(X||W,b,a,Z)};if(Z.delay){V=F(V,Z)}if(Z.single){V=P(V,W,E,Y)}if(Z.buffer){V=R(V,Z)}Y._handlers=Y._handlers||[];Y._handlers.push([Ext.id(W),E,V]);L.on(W,E,V);if(E=="mousewheel"&&W.addEventListener){W.addEventListener("DOMMouseScroll",V,false);L.on(window,"unload",function(){W.removeEventListener("DOMMouseScroll",V,false)})}if(E=="mousedown"&&W==document){Ext.EventManager.stoppedMouseDownEvent.addListener(V)}return V};var G=function(E,U,Z){var D=Ext.id(E),a=Z._handlers,X=Z;if(a){for(var V=0,Y=a.length;V=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC},isSpecialKey:function(){var D=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||D==9||D==13||D==40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D>=44&&D<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}B.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var D=this.keyCode||this.charCode;return Ext.isSafari?(A[D]||D):D},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return B.getTime(this.browserEvent)}return null},getXY:function(){return this.xy},getTarget:function(E,G,D){var F=Ext.get(this.target);return E?F.findParent(E,G,D):(D?F:this.target)},getRelatedTarget:function(){if(this.browserEvent){return B.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var D=this.browserEvent;var E=0;if(D.wheelDelta){E=D.wheelDelta/120}else{if(D.detail){E=-D.detail/3}}return E},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarget"]();return D&&Ext.fly(E).contains(D)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}(); +(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined"){this.originalDisplay=display}return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depthch||tcb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||lcr){c.scrollLeft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el){return false}return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector,unique){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},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)},setVisible:function(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visible?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if(visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden"}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:function(className){if(className instanceof Array){for(var i=0,len=className.length;idw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(xdh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(yvr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=true}if(x";E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeRe=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater:function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this.getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(sides,styles){var val=0,v,w;for(var i=0,len=sides.length;i=0?w:-1*w)}}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper.append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,config,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(msg,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="no";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overFn.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true)){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className,preventFlicker){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(eventName instanceof Array){for(var i=0,len=eventName.length;idom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom[prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{"to":to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(direction){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":case"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,y){if(typeof x=="object"||x instanceof Array){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x-o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrollLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrollTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffset||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,top:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.substr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:function(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format("
    "+El.boxMarkup+"
    ",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},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)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarkup="
    ";El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el=="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if(!(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=new El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){return el}else{if(el instanceof Array){return El.select(el)}else{if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=document}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=arguments,len=a.length;i0){F()}else{B.afterFx(D)}})};F.call(this)});return this},pause:function(C){var A=this.getFxEl();var B={};A.queueFx(B,function(){setTimeout(function(){A.afterFx(B)},C*1000)});return this},fadeIn:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var C=B.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},B,null,0.5,"easeOut",function(){if(C==1){this.clearOpacity()}A.afterFx(B)})});return this},fadeOut:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){arguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();A.afterFx(B)})});return this},scale:function(A,B,C){this.shift(Ext.apply({},C,{width:A,height:B}));return this},shift:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity;if(D!==undefined){E.width={to:this.adjustWidth(D)}}if(F!==undefined){E.height={to:this.adjustHeight(F)}}if(C!==undefined||H!==undefined){E.points={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]}}if(G!==undefined){E.opacity={to:G}}if(B.xy!==undefined){E.points={to:B.xy}}arguments.callee.anim=this.fxanim(E,B,"motion",0.35,"easeOut",function(){A.afterFx(B)})});return this},ghost:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"b";var H=this.getFxRestore();var E=this.getWidth(),G=this.getHeight();var F=this.dom.style;var J=function(){if(C.useDisplay){B.setDisplayed(false)}else{B.hide()}B.clearOpacity();B.setPositioning(H.pos);F.width=H.width;F.height=H.height;B.afterFx(C)};var D={opacity:{to:0},points:{}},I=D.points;switch(A.toLowerCase()){case"t":I.by=[0,-G];break;case"l":I.by=[-E,0];break;case"r":I.by=[E,0];break;case"b":I.by=[0,G];break;case"tl":I.by=[-E,-G];break;case"bl":I.by=[-E,G];break;case"br":I.by=[E,G];break;case"tr":I.by=[E,-G];break}arguments.callee.anim=this.fxanim(D,C,"motion",0.5,"easeOut",J)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var A=this.fxQueue[0];if(A){A.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true)}}return this},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var A=this.fxQueue;return A&&A[0]&&A[0].block},queueFx:function(C,A){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurrent){var B=this.beforeFx(C);A.block=C.block;this.fxQueue.push(A);if(B){this.nextFx()}}else{A.call(this)}}return this},fxWrap:function(F,D,C){var B;if(!D.wrap||!(B=Ext.get(D.wrap))){var A;if(D.fixPosition){A=this.getXY()}var E=document.createElement("div");E.style.visibility=C;B=Ext.get(this.dom.parentNode.insertBefore(E,this.dom));B.setPositioning(F);if(B.getStyle("position")=="static"){B.position("relative")}this.clearPositioning("auto");B.clip();B.dom.appendChild(this.dom);if(A){B.setXY(A)}}return B},fxUnwrap:function(A,C,B){this.clearPositioning();this.setPositioning(C);if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.remove()}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),width:A.width,height:A.height}},afterFx:function(A){if(A.afterStyle){this.applyStyles(A.afterStyle)}if(A.afterCls){this.addClass(A.afterCls)}if(A.remove===true){this.remove()}Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(D,E,B,F,C,A){B=B||"run";E=E||{};var G=Ext.lib.Anim[B](this.dom,D,(E.duration||F)||0.35,(E.easing||C)||"easeOut",function(){Ext.callback(A,this)},this);E.anim=G;return G}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx); +Ext.CompositeElement=function(A){this.elements=[];this.addElements(A)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(E){if(!E){return this}if(typeof E=="string"){E=Ext.Element.selectorFunction(E)}var D=this.elements;var B=D.length-1;for(var C=0,A=E.length;C"+A.text+""}if(typeof A.scripts!="undefined"){this.loadScripts=A.scripts}if(typeof A.timeout!="undefined"){this.timeout=A.timeout}}this.showLoading();if(!D){this.defaultUrl=B}if(typeof B=="function"){B=B.call(this)}G=G||(F?"POST":"GET");if(G=="GET"){B=this.prepareUrl(B)}var E=Ext.apply(A||{},{url:B,params:(typeof F=="function"&&C)?F.createDelegate(C):F,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),argument:{"options":A,"url":B,"form":null,"callback":H,"scope":C||window,"params":F}});this.transaction=Ext.Ajax.request(E)}},formUpdate:function(C,A,B,D){if(this.fireEvent("beforeupdate",this.el,C,A)!==false){if(typeof A=="function"){A=A.call(this)}C=Ext.getDom(C);this.transaction=Ext.Ajax.request({form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{"url":A,"form":C,"callback":D,"reset":B}});this.showLoading.defer(1,this)}},refresh:function(A){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,A,true)},startAutoRefresh:function(B,C,D,E,A){if(A){this.update(C||this.defaultUrl,D,E,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[C||this.defaultUrl,D,E,true]),B*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},prepareUrl:function(B){if(this.disableCaching){var A="_dc="+(new Date().getTime());if(B.indexOf("?")!==-1){B+="&"+A}else{B+="?"+A}}return B},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset){try{A.argument.form.reset()}catch(B){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]))}else{this.renderer.render(this.el,A,this);this.updateComplete(A)}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,true,A,A.argument.options)}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,false,A,A.argument.options)}},setRenderer:function(A){this.renderer=A},getRenderer:function(){return this.renderer},setDefaultUrl:function(A){this.defaultUrl=A},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transaction){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:"
    Loading...
    "};Ext.Updater.updateElement=function(D,C,E,B){var A=Ext.get(D).getUpdater();Ext.apply(A,B);A.update(C,E,B?B.callback:null)};Ext.Updater.update=Ext.Updater.updateElement;Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D)}};Ext.UpdateManager=Ext.Updater; +Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(B){if(Date.formatFunctions[B]==null){Date.createNewFormat(B)}var A=Date.formatFunctions[B];return this[A]()};Date.prototype.format=Date.prototype.dateFormat;Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function(){return ";var special=false;var ch="";for(var i=0;i 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0))) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() % 12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"u":return"String.leftPad(this.getMilliseconds(), 3, '0') + ";case"O":return"this.getGMTOffset() + ";case"P":return"this.getGMTOffset(true) + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";case"c":for(var F=Date.getFormatCode,G="Y-m-dTH:i:sP",C="",B=0,A=G.length;B 0) {";var regex="";var special=false;var ch="";for(var i=0;i= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0)\n"+"{v = new Date(y, m, d, h, i, s, ms);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n"+"{v = new Date(y, m, d, h, i, s);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n"+"{v = new Date(y, m, d, h, i);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n"+"{v = new Date(y, m, d, h);}\n"+"else if (y >= 0 && m >= 0 && d > 0)\n"+"{v = new Date(y, m, d);}\n"+"else if (y >= 0 && m >= 0)\n"+"{v = new Date(y, m);}\n"+"else if (y >= 0)\n"+"{v = new Date(y);}\n"+"}return (v && (z || o))?\n"+" (z ? v.add(Date.SECOND, (v.getTimezoneOffset() * 60) + (z*1)) :\n"+" v.add(Date.HOUR, (v.getGMTOffset() / 100) + (o / -100))) : v\n"+";}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code)};Date.formatCodeToRegex=function(G,F){switch(G){case"d":return{g:1,c:"d = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"D":for(var C=[],E=0;E<7;C.push(Date.getShortDayName(E)),++E){}return{g:0,c:null,s:"(?:"+C.join("|")+")"};case"j":return{g:1,c:"d = parseInt(results["+F+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"N":return{g:0,c:null,s:"[1-7]"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"[0-6]"};case"z":return{g:0,c:null,s:"(?:\\d{1,3}"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+F+"]), 10);\n",s:"("+Date.monthNames.join("|")+")"};case"m":return{g:1,c:"m = parseInt(results["+F+"], 10) - 1;\n",s:"(\\d{2})"};case"M":for(var C=[],E=0;E<12;C.push(Date.getShortMonthName(E)),++E){}return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+F+"]), 10);\n",s:"("+C.join("|")+")"};case"n":return{g:1,c:"m = parseInt(results["+F+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"(?:\\d{2})"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"o":case"Y":return{g:1,c:"y = parseInt(results["+F+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+F+"], 10);\n"+"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+F+"] == 'am') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+F+"] == 'AM') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":return{g:1,c:"h = parseInt(results["+F+"], 10);\n",s:"(\\d{1,2})"};case"h":case"H":return{g:1,c:"h = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"i":return{g:1,c:"i = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"u":return{g:1,c:"ms = parseInt(results["+F+"], 10);\n",s:"(\\d{3})"};case"O":return{g:1,c:["o = results[",F,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n","var mn = o.substring(3,5) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n"," (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+-]\\d{4})"};case"P":return{g:1,c:["o = results[",F,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n","var mn = o.substring(4,6) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n"," (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+-]\\d{2}:\\d{2})"};case"T":return{g:0,c:null,s:"[A-Z]{1,4}"};case"Z":return{g:1,c:"z = results["+F+"] * 1;\n"+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+-]?\\d{1,5})"};case"c":var H=Date.formatCodeToRegex,D=[];var A=[H("Y",1),H("m",2),H("d",3),H("h",4),H("i",5),H("s",6),H("P",7)];for(var E=0,B=A.length;E0?"-":"+")+String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0")+(A?":":"")+String.leftPad(this.getTimezoneOffset()%60,2,"0")};Date.prototype.getDayOfYear=function(){var A=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var B=0;B28){A=Math.min(A,this.getFirstDateOfMonth().add("mo",C).getLastDateOfMonth().getDate())}D.setDate(A);D.setMonth(this.getMonth()+C);break;case Date.YEAR:D.setFullYear(this.getFullYear()+C);break}return D};Date.prototype.between=function(C,A){var B=this.getTime();return C.getTime()<=B&&B<=A.getTime()}; +Ext.util.DelayedTask=function(E,D,A){var G=null,F,B;var C=function(){var H=new Date().getTime();if(H-B>=F){clearInterval(G);G=null;E.apply(D,A||[])}};this.delay=function(I,K,J,H){if(G&&I!=F){this.cancel()}F=I;B=new Date().getTime();E=K||E;D=J||D;A=H||A;if(!G){G=setInterval(C,F)}};this.cancel=function(){if(G){clearInterval(G);G=null}}}; +Ext.util.TaskRunner=function(E){E=E||10;var F=[],A=[];var B=0;var G=false;var D=function(){G=false;clearInterval(B);B=0};var H=function(){if(!G){G=true;B=setInterval(I,E)}};var C=function(J){A.push(J);if(J.onStop){J.onStop.apply(J.scope||J)}};var I=function(){if(A.length>0){for(var O=0,K=A.length;O1||E instanceof Array){var B=arguments.length>1?arguments:E;for(var D=0,A=B.length;D=this.length){return this.add(B,C)}this.length++;this.items.splice(A,0,C);if(typeof B!="undefined"&&B!=null){this.map[B]=C}this.keys.splice(A,0,B);this.fireEvent("add",A,C,B);return C},remove:function(A){return this.removeAt(this.indexOf(A))},removeAt:function(A){if(A=0){this.length--;var C=this.items[A];this.items.splice(A,1);var B=this.keys[A];if(typeof B!="undefined"){delete this.map[B]}this.keys.splice(A,1);this.fireEvent("remove",C,B);return C}return false},removeKey:function(A){return this.removeAt(this.indexOfKey(A))},getCount:function(){return this.length},indexOf:function(A){return this.items.indexOf(A)},indexOfKey:function(A){return this.keys.indexOf(A)},item:function(A){var B=typeof this.map[A]!="undefined"?this.map[A]:this.items[A];return typeof B!="function"||this.allowFunctions?B:null},itemAt:function(A){return this.items[A]},key:function(A){return this.map[A]},contains:function(A){return this.indexOf(A)!=-1},containsKey:function(A){return typeof this.map[A]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(I,A,H){var C=String(A).toUpperCase()=="DESC"?-1:1;H=H||function(K,J){return K-J};var G=[],B=this.keys,F=this.items;for(var D=0,E=F.length;D=A;C--){D[D.length]=B[C]}}return D},filter:function(C,B,D,A){if(Ext.isEmpty(B,false)){return this.clone()}B=this.createValueMatcher(B,D,A);return this.filterBy(function(E){return E&&B.test(E[C])})},filterBy:function(F,E){var G=new Ext.util.MixedCollection();G.getKey=this.getKey;var B=this.keys,D=this.items;for(var C=0,A=D.length;C0){for(var C=0;Clen){return value.substr(0,len-3)+"..."}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,"\"")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1"+","+"$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!(v instanceof Date)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"")},stripScriptsRe:/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v){return !v?v:String(v).replace(this.stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}()}}(); +Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var P=this.html;P=["",P,""].join("");var O=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var N=/^]*?for="(.*?)"/;var L=/^]*?if="(.*?)"/;var J=/^]*?exec="(.*?)"/;var C,B=0;var G=[];while(C=P.match(O)){var M=C[0].match(N);var K=C[0].match(L);var I=C[0].match(J);var E=null,H=null,D=null;var A=M&&M[1]?M[1]:"";if(K){E=K&&K[1]?K[1]:null;if(E){H=new Function("values","parent","xindex","xcount","with(values){ return "+(Ext.util.Format.htmlDecode(E))+"; }")}}if(I){E=I&&I[1]?I[1]:null;if(E){D=new Function("values","parent","xindex","xcount","with(values){ "+(Ext.util.Format.htmlDecode(E))+"; }")}}if(A){switch(A){case".":A=new Function("values","parent","with(values){ return values; }");break;case"..":A=new Function("values","parent","with(values){ return parent; }");break;default:A=new Function("values","parent","with(values){ return "+A+"; }")}}G.push({id:B,target:A,exec:D,test:H,body:C[1]||""});P=P.replace(C[0],"{xtpl"+B+"}");++B}for(var F=G.length-1;F>=0;--F){this.compileTpl(G[F])}this.master=G[G.length-1];this.tpls=G};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(A,H,G,D,C){var J=this.tpls[A];if(J.test&&!J.test.call(this,H,G,D,C)){return""}if(J.exec&&J.exec.call(this,H,G,D,C)){return""}var I=J.target?J.target.call(this,H,G):H;G=J.target?H:G;if(J.target&&I instanceof Array){var B=[];for(var E=0,F=I.length;E=0;--E){D[H[E].selectorText]=H[E]}}catch(G){}},getRules:function(F){if(D==null||F){D={};var H=C.styleSheets;for(var G=0,E=H.length;G=37&&A<=40){C.stopEvent()}},relay:function(C){var A=C.getKey();var B=this.keyToHandler[A];if(B&&this[B]){if(this.doRelay(C,this[B],B)!==true){C[this.defaultEventAction]()}}},doRelay:function(C,B,A){return B.call(this.scope||this,C)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.on("keydown",this.relay,this)}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this)}this.disabled=false}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.un("keydown",this.relay)}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay)}this.disabled=true}}}; +Ext.KeyMap=function(C,B,A){this.el=Ext.get(C);this.eventName=A||"keydown";this.bindings=[];if(B){this.addBinding(B)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(D){if(D instanceof Array){for(var F=0,H=D.length;F=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=E;this.rightConstraint=D;this.minX=this.initPageX-E;this.maxX=this.initPageX+D;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=C;this.bottomConstraint=E;this.minY=this.initPageY-C;this.maxY=this.initPageY+E;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var A=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue}F[D].apply(F,C)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(B){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C,B){if(!this.initialized){this.init()}if(!this.ids[B]){this.ids[B]={}}this.ids[B][C.id]=C},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={}}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id]}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id]}}delete this.handleIds[C.id]},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={}}this.handleIds[C][B]=B},isDragDrop:function(B){return(this.getDDById(B))?true:false},getRelated:function(F,C){var E=[];for(var D in F.groups){for(j in this.ids[D]){var B=this.ids[D][j];if(!this.isTypeOfDD(B)){continue}if(!C||B.isTarget){E[E.length]=B}}}return E},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;Dthis.clickPixelThresh||B>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(D);this.dragCurrent.onDrag(D);if(!this.dragCurrent.moveOnly){this.fireEvents(D,false)}}this.stopEvent(D);return true},fireEvents:function(K,L){var N=this.dragCurrent;if(!N||N.isLocked()){return }var O=K.getPoint();var B=[];var E=[];var I=[];var G=[];var D=[];for(var F in this.dragOvers){var C=this.dragOvers[F];if(!this.isTypeOfDD(C)){continue}if(!this.isOverTarget(O,C,this.mode)){E.push(C)}B[F]=true;delete this.dragOvers[F]}for(var M in N.groups){if("string"!=typeof M){continue}for(F in this.ids[M]){var H=this.ids[M][F];if(!this.isTypeOfDD(H)){continue}if(H.isTarget&&!H.isLocked()&&H!=N){if(this.isOverTarget(O,H,this.mode)){if(L){G.push(H)}else{if(!B[H.id]){D.push(H)}else{I.push(H)}this.dragOvers[H.id]=H}}}}}if(this.mode){if(E.length){N.b4DragOut(K,E);N.onDragOut(K,E)}if(D.length){N.onDragEnter(K,D)}if(I.length){N.b4DragOver(K,I);N.onDragOver(K,I)}if(G.length){N.b4DragDrop(K,G);N.onDragDrop(K,G)}}else{var J=0;for(F=0,J=E.length;F2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true}else{C=C.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(C,A,B){if(C){this.init(C,A,B)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);var B=C.dom?C:Ext.fly(C,"_dd");if(!this.deltaSetXY){var H=[E.x,E.y];B.setXY(H);var D=B.getLeft(true);var A=B.getTop(true);this.deltaSetXY=[D-E.x,A-E.y]}else{B.setLeftTop(E.x+this.deltaSetXY[0],E.y+this.deltaSetXY[1])}this.cachePosition(E.x,E.y);this.autoScroll(E.x,E.y,C.offsetHeight,C.offsetWidth);return E},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=Ext.lib.Dom.getViewHeight();var B=Ext.lib.Dom.getViewWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-Dthis.maxX){A=this.maxX}}if(this.constrainY){if(Dthis.maxY){D=this.maxY}}A=this.getTick(A,this.xTicks);D=this.getTick(D,this.yTicks);return{x:A,y:D}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.autoOffset(A.getPageX(),A.getPageY())},b4Drag:function(A){this.setDragElPos(A.getPageX(),A.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this;var A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return }var D=this.getDragEl();if(!D){D=document.createElement("div");D.id=this.dragElId;var C=D.style;C.position="absolute";C.visibility="hidden";C.cursor="move";C.border="2px solid #aaa";C.zIndex=999;A.insertBefore(D,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);Ext.fly(A).show()},_resizeProxy:function(){if(this.resizeFrame){var A=this.getEl();Ext.fly(this.getDragEl()).setSize(A.offsetWidth,A.offsetHeight)}},b4MouseDown:function(B){var A=B.getPageX();var C=B.getPageY();this.autoOffset(A,C);this.setDragElPos(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){Ext.fly(this.getDragEl()).hide()},endDrag:function(C){var B=this.getEl();var A=this.getDragEl();A.style.visibility="";this.beforeMove();B.style.visibility="hidden";Ext.dd.DDM.moveToEl(B,A);A.style.visibility="hidden";B.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)}}); +Ext.dd.DragTracker=function(A){Ext.apply(this,A);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}};Ext.extend(Ext.dd.DragTracker,Ext.util.Observable,{active:false,tolerance:5,autoStart:false,initEl:function(A){this.el=Ext.get(A);A.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(C,B){if(this.fireEvent("mousedown",this,C)!==false&&this.onBeforeStart(C)!==false){this.startXY=this.lastXY=C.getXY();this.dragTarget=this.delegate?B:this.el.dom;C.preventDefault();var A=Ext.getDoc();A.on("mouseup",this.onMouseUp,this);A.on("mousemove",this.onMouseMove,this);A.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this)}}},onMouseMove:function(D,C){D.preventDefault();var B=D.getXY(),A=this.startXY;this.lastXY=B;if(!this.active){if(Math.abs(A[0]-B[0])>this.tolerance||Math.abs(A[1]-B[1])>this.tolerance){this.triggerStart()}else{return }}this.fireEvent("mousemove",this,D);this.onDrag(D);this.fireEvent("drag",this,D)},onMouseUp:function(B){var A=Ext.getDoc();A.un("mousemove",this.onMouseMove,this);A.un("mouseup",this.onMouseUp,this);A.un("selectstart",this.stopSelect,this);B.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,B);this.onEnd(B);this.fireEvent("dragend",this,B)},triggerStart:function(A){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(A){A.stopEvent();return false},onBeforeStart:function(A){},onStart:function(A){},onDrag:function(A){},onEnd:function(A){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(A){return A?this.constrainModes[A].call(this,this.lastXY):this.lastXY},getOffset:function(C){var B=this.getXY(C);var A=this.startXY;return[A[0]-B[0],A[1]-B[1]]},constrainModes:{"point":function(B){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var A=this.dragRegion;A.left=B[0];A.top=B[1];A.right=B[0];A.bottom=B[1];A.constrainTo(this.elRegion);return[A.left,A.top]}}}); +Ext.dd.ScrollManager=function(){var C=Ext.dd.DragDropMgr;var E={};var B=null;var H={};var G=function(K){B=null;A()};var I=function(){if(C.dragCurrent){C.refreshCache(C.dragCurrent.groups)}};var D=function(){if(C.dragCurrent){var K=Ext.dd.ScrollManager;var L=H.el.ddScrollConfig?H.el.ddScrollConfig.increment:K.increment;if(!K.animate){if(H.el.scroll(H.dir,L)){I()}}else{H.el.scroll(H.dir,L,true,K.animDuration,I)}}};var A=function(){if(H.id){clearInterval(H.id)}H.id=0;H.el=null;H.dir=""};var F=function(L,K){A();H.el=L;H.dir=K;H.id=setInterval(D,Ext.dd.ScrollManager.frequency)};var J=function(N,P){if(P||!C.dragCurrent){return }var Q=Ext.dd.ScrollManager;if(!B||B!=C.dragCurrent){B=C.dragCurrent;Q.refreshCache()}var R=Ext.lib.Event.getXY(N);var S=new Ext.lib.Point(R[0],R[1]);for(var L in E){var M=E[L],K=M._region;var O=M.ddScrollConfig?M.ddScrollConfig:Q;if(K&&K.contains(S)&&M.isScrollable()){if(K.bottom-S.y<=O.vthresh){if(H.el!=M){F(M,"down")}return }else{if(K.right-S.x<=O.hthresh){if(H.el!=M){F(M,"left")}return }else{if(S.y-K.top<=O.vthresh){if(H.el!=M){F(M,"up")}return }else{if(S.x-K.left<=O.hthresh){if(H.el!=M){F(M,"right")}return }}}}}}A()};C.fireEvents=C.fireEvents.createSequence(J,C);C.stopDrag=C.stopDrag.createSequence(G,C);return{register:function(M){if(M instanceof Array){for(var L=0,K=M.length;L]+>/gi,asText:function(A){return String(A).replace(this.stripTagsRE,"")},asUCText:function(A){return String(A).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(A){return String(A).toUpperCase()},asDate:function(A){if(!A){return 0}if(A instanceof Date){return A.getTime()}return Date.parse(String(A))},asFloat:function(A){var B=parseFloat(String(A).replace(/,/g,""));if(isNaN(B)){B=0}return B},asInt:function(A){var B=parseInt(String(A).replace(/,/g,""));if(isNaN(B)){B=0}return B}}; +Ext.data.Record=function(A,B){this.id=(B||B===0)?B:++Ext.data.Record.AUTO_ID;this.data=A};Ext.data.Record.create=function(E){var C=Ext.extend(Ext.data.Record,{});var D=C.prototype;D.fields=new Ext.util.MixedCollection(false,function(F){return F.name});for(var B=0,A=E.length;BG?1:(H0},appendChild:function(E){var F=false;if(E instanceof Array){F=E}else{if(arguments.length>1){F=arguments}}if(F){for(var D=0,A=F.length;D0){var F=D?function(){E.apply(D,arguments)}:E;C.sort(F);for(var B=0;BG+L.left){H=G-I-this.shadowOffset;E=true}if((F+D)>C+L.top){F=C-D-this.shadowOffset;E=true}if(H=J){F=J-D-5}}K=[H,F];this.storeXY(K);A.setXY.call(this,K);this.sync()}}},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){A.setXY.call(this,this.lastXY)}else{if(this.lastLT){A.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(E,D,G,H,F){if(E){this.showAction()}if(D&&E){var C=function(){this.sync(true);if(H){H()}}.createDelegate(this);A.setVisible.call(this,true,true,G,C,F)}else{if(!E){this.hideUnders(true)}var C=H;if(D){C=function(){this.hideAction();if(H){H()}}.createDelegate(this)}A.setVisible.call(this,E,D,G,C,F);if(E){this.sync(true)}else{if(!D){this.hideAction()}}}},storeXY:function(C){delete this.lastLT;this.lastXY=C},storeLeftTop:function(D,C){delete this.lastXY;this.lastLT=[D,C]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(C){this.storeLeftTop(C,this.getTop(true));A.setLeft.apply(this,arguments);this.sync()},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);A.setTop.apply(this,arguments);this.sync()},setLeftTop:function(D,C){this.storeLeftTop(D,C);A.setLeftTop.apply(this,arguments);this.sync()},setXY:function(F,D,G,H,E){this.fixDisplay();this.beforeAction();this.storeXY(F);var C=this.createCB(H);A.setXY.call(this,F,D,G,C,E);if(!D){C()}},createCB:function(D){var C=this;return function(){C.constrainXY();C.sync(true);if(D){D()}}},setX:function(C,D,F,G,E){this.setXY([C,this.getY()],D,F,G,E)},setY:function(G,C,E,F,D){this.setXY([this.getX(),G],C,E,F,D)},setSize:function(E,F,D,H,I,G){this.beforeAction();var C=this.createCB(I);A.setSize.call(this,E,F,D,H,C,G);if(!D){C()}},setWidth:function(E,D,G,H,F){this.beforeAction();var C=this.createCB(H);A.setWidth.call(this,E,D,G,C,F);if(!D){C()}},setHeight:function(E,D,G,H,F){this.beforeAction();var C=this.createCB(H);A.setHeight.call(this,E,D,G,C,F);if(!D){C()}},setBounds:function(J,H,K,D,I,F,G,E){this.beforeAction();var C=this.createCB(G);if(!I){this.storeXY([J,H]);A.setXY.call(this,[J,H]);A.setSize.call(this,K,D,I,F,C,E);C()}else{A.setBounds.call(this,J,H,K,D,I,F,C,E)}return this},setZIndex:function(C){this.zindex=C;this.setStyle("z-index",C+2);if(this.shadow){this.shadow.setZIndex(C+1)}if(this.shim){this.shim.setStyle("z-index",C)}}})})(); +Ext.Shadow=function(C){Ext.apply(this,C);if(typeof this.mode!="string"){this.mode=this.defaultMode}var D=this.offset,B={h:0};var A=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":B.w=0;B.l=B.t=D;B.t-=1;if(Ext.isIE){B.l-=this.offset+A;B.t-=this.offset+A;B.w-=A;B.h-=A;B.t+=1}break;case"sides":B.w=(D*2);B.l=-D;B.t=D-1;if(Ext.isIE){B.l-=(this.offset-A);B.t-=this.offset+A;B.l+=1;B.w-=(this.offset-A)*2;B.w-=A+1;B.h-=1}break;case"frame":B.w=B.h=(D*2);B.l=B.t=-D;B.t+=1;B.h-=2;if(Ext.isIE){B.l-=(this.offset-A);B.t-=(this.offset-A);B.l+=1;B.w-=(this.offset+A+1);B.h-=(this.offset+A);B.h+=1}break}this.adjusts=B};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(A){A=Ext.get(A);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=A.dom){this.el.insertBefore(A)}}this.el.setStyle("z-index",this.zIndex||parseInt(A.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(A.getLeft(true),A.getTop(true),A.getWidth(),A.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(A,M,L,D){if(!this.el){return }var I=this.adjusts,G=this.el.dom,N=G.style;var E=0;N.left=(A+I.l)+"px";N.top=(M+I.t)+"px";var K=(L+I.w),C=(D+I.h),F=K+"px",J=C+"px";if(N.width!=F||N.height!=J){N.width=F;N.height=J;if(!Ext.isIE){var H=G.childNodes;var B=Math.max(0,(K-12))+"px";H[0].childNodes[1].style.width=B;H[1].childNodes[1].style.width=B;H[2].childNodes[1].style.width=B;H[1].style.height=Math.max(0,(C-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(A){this.zIndex=A;if(this.el){this.el.setStyle("z-index",A)}}};Ext.Shadow.Pool=function(){var B=[];var A=Ext.isIE?"
    ":"
    ";return{pull:function(){var C=B.shift();if(!C){C=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,A));C.autoBoxAdjust=false}return C},push:function(C){B.push(C)}}}(); +Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(B,D){if(typeof B=="object"){D=B.height;B=B.width}if(!this.boxReady){this.width=B;this.height=D;return this}if(this.lastSize&&this.lastSize.width==B&&this.lastSize.height==D){return this}this.lastSize={width:B,height:D};var C=this.adjustSize(B,D);var F=C.width,A=C.height;if(F!==undefined||A!==undefined){var E=this.getResizeEl();if(!this.deferHeight&&F!==undefined&&A!==undefined){E.setSize(F,A)}else{if(!this.deferHeight&&A!==undefined){E.setHeight(A)}else{if(F!==undefined){E.setWidth(F)}}}this.onResize(F,A,B,D);this.fireEvent("resize",this,F,A,B,D)}return this},setWidth:function(A){return this.setSize(A)},setHeight:function(A){return this.setSize(undefined,A)},getSize:function(){return this.el.getSize()},getPosition:function(A){if(A===true){return[this.el.getLeft(true),this.el.getTop(true)]}return this.xy||this.el.getXY()},getBox:function(A){var B=this.el.getSize();if(A===true){B.x=this.el.getLeft(true);B.y=this.el.getTop(true)}else{var C=this.xy||this.el.getXY();B.x=C[0];B.y=C[1]}return B},updateBox:function(A){this.setSize(A.width,A.height);this.setPagePosition(A.x,A.y);return this},getResizeEl:function(){return this.resizeEl||this.el},getPositionEl:function(){return this.positionEl||this.el},setPosition:function(A,F){if(A&&typeof A[1]=="number"){F=A[1];A=A[0]}this.x=A;this.y=F;if(!this.boxReady){return this}var B=this.adjustPosition(A,F);var E=B.x,D=B.y;var C=this.getPositionEl();if(E!==undefined||D!==undefined){if(E!==undefined&&D!==undefined){C.setLeftTop(E,D)}else{if(E!==undefined){C.setLeft(E)}else{if(D!==undefined){C.setTop(D)}}}this.onPosition(E,D);this.fireEvent("move",this,E,D)}return this},setPagePosition:function(A,C){if(A&&typeof A[1]=="number"){C=A[1];A=A[0]}this.pageX=A;this.pageY=C;if(!this.boxReady){return }if(A===undefined||C===undefined){return }var B=this.el.translatePoints(A,C);this.setPosition(B.left,B.top);return this},onRender:function(B,A){Ext.BoxComponent.superclass.onRender.call(this,B,A);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);this.boxReady=true;this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.el.getWidth(),this.autoHeight?undefined:this.el.getHeight());return this},onResize:function(D,B,A,C){},onPosition:function(A,B){},adjustSize:function(A,B){if(this.autoWidth){A="auto"}if(this.autoHeight){B="auto"}return{width:A,height:B}},adjustPosition:function(A,B){return{x:A,y:B}}});Ext.reg("box",Ext.BoxComponent); +Ext.SplitBar=function(C,E,B,D,A){this.el=Ext.get(C,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(E,true);this.orientation=B||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!A){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(A).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=D||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=D||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(A,E){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var C=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var D=C-this.activeMinSize;var B=Math.max(this.activeMaxSize-C,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?D:B,this.placement==Ext.SplitBar.LEFT?B:D);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?D:B,this.placement==Ext.SplitBar.TOP?B:D)}this.dragSpecs.startSize=C;this.dragSpecs.startPoint=[A,E];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,A,E)},onEndProxyDrag:function(C){Ext.get(this.proxy).setDisplayed(false);var B=Ext.lib.Event.getXY(C);if(this.overlay){this.overlay.remove();delete this.overlay}var A;if(this.orientation==Ext.SplitBar.HORIZONTAL){A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?B[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-B[0])}else{A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?B[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-B[1])}A=Math.min(Math.max(A,this.activeMinSize),this.activeMaxSize);if(A!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,A)!==false){this.adapter.setElementSize(this,A);this.fireEvent("moved",this,A);this.fireEvent("resize",this,A)}}},getAdapter:function(){return this.adapter},setAdapter:function(A){this.adapter=A;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(A){this.minSize=A},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(A){this.maxSize=A},setCurrentSize:function(B){var A=this.animate;this.animate=false;this.adapter.setElementSize(this,B);this.animate=A},destroy:function(A){if(this.shim){this.shim.remove()}this.dd.unreg();Ext.removeNode(this.proxy);if(A){this.el.remove()}}});Ext.SplitBar.createProxy=function(B){var C=new Ext.Element(document.createElement("div"));C.unselectable();var A="x-splitbar-proxy";C.addClass(A+" "+(B==Ext.SplitBar.HORIZONTAL?A+"-h":A+"-v"));document.body.appendChild(C.dom);return C.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(A){},getElementSize:function(A){if(A.orientation==Ext.SplitBar.HORIZONTAL){return A.resizingEl.getWidth()}else{return A.resizingEl.getHeight()}},setElementSize:function(B,A,C){if(B.orientation==Ext.SplitBar.HORIZONTAL){if(!B.animate){B.resizingEl.setWidth(A);if(C){C(B,A)}}else{B.resizingEl.setWidth(A,true,0.1,C,"easeOut")}}else{if(!B.animate){B.resizingEl.setHeight(A);if(C){C(B,A)}}else{B.resizingEl.setHeight(A,true,0.1,C,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(A){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(A)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(A){this.basic.init(A)},getElementSize:function(A){return this.basic.getElementSize(A)},setElementSize:function(B,A,C){this.basic.setElementSize(B,A,this.moveSplitter.createDelegate(this,[B]))},moveSplitter:function(A){var B=Ext.SplitBar;switch(A.placement){case B.LEFT:A.el.setX(A.resizingEl.getRight());break;case B.RIGHT:A.el.setStyle("right",(this.container.getWidth()-A.resizingEl.getLeft())+"px");break;case B.TOP:A.el.setY(A.resizingEl.getBottom());break;case B.BOTTOM:A.el.setY(A.resizingEl.getTop()-A.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4; +Ext.Container=Ext.extend(Ext.BoxComponent,{autoDestroy:true,defaultType:"panel",initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var A=this.items;if(A){delete this.items;if(A instanceof Array){this.add.apply(this,A)}else{this.add(A)}}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(A){if(this.layout&&this.layout!=A){this.layout.setContainer(null)}this.initItems();this.layout=A;A.setContainer(this)},render:function(){Ext.Container.superclass.render.apply(this,arguments);if(this.layout){if(typeof this.layout=="string"){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined){var A=this.activeItem;delete this.activeItem;this.layout.setActiveItem(A);return }}if(!this.ownerCt){this.doLayout()}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this)}},getLayoutTarget:function(){return this.el},getComponentId:function(A){return A.itemId||A.id},add:function(C){if(!this.items){this.initItems()}var B=arguments,A=B.length;if(A>1){for(var D=0;D2){for(var E=A-1;E>=1;--E){this.insert(D,B[E])}return }var F=this.lookupComponent(this.applyDefaults(C));if(F.ownerCt==this&&this.items.indexOf(F)0){B.setSize(A)}}});Ext.Container.LAYOUTS["fit"]=Ext.layout.FitLayout; +Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,renderHidden:true,setActiveItem:function(A){A=this.container.getComponent(A);if(this.activeItem!=A){if(this.activeItem){this.activeItem.hide()}this.activeItem=A;A.show();this.layout()}},renderAll:function(A,B){if(this.deferredRender){this.renderItem(this.activeItem,undefined,B)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,A,B)}}});Ext.Container.LAYOUTS["card"]=Ext.layout.CardLayout; +Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,getAnchorViewSize:function(A,B){return B.dom==document.body?B.getViewSize():B.getStyleSize()},onLayout:function(F,I){Ext.layout.AnchorLayout.superclass.onLayout.call(this,F,I);var O=this.getAnchorViewSize(F,I);var M=O.width,E=O.height;if(M<20||E<20){return }var B,K;if(F.anchorSize){if(typeof F.anchorSize=="number"){B=F.anchorSize}else{B=F.anchorSize.width;K=F.anchorSize.height}}else{B=F.initialConfig.width;K=F.initialConfig.height}var H=F.items.items,G=H.length,D,J,L,C,A;for(D=0;D ");B.disableFormats=true;B.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=B}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{var A=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);A.addClassOnOver("x-tool-expand-"+this.position+"-over");A.on("click",this.onExpandClick,this,{stopEvent:true});if(this.floatable!==false){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.collapseClick,this)}}}return this.collapsedEl},onExpandClick:function(A){if(this.isSlid){this.afterSlideIn();this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(A){this.panel.collapse()},beforeCollapse:function(B,A){this.lastAnim=A;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();this.panel.el.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(A){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(A){var B=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,B.getHeight())}else{this.panel.setSize(B.getWidth(),undefined)}B.hide();B.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",100)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",1);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(A){if(this.isSlid){A.stopPropagation();this.slideIn()}else{A.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(A){this.panel=A},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(A){var B=this.getCollapsedEl();B.setLeftTop(A.x,A.y);B.setSize(A.width,A.height)},applyLayout:function(A){if(this.isCollapsed){this.applyLayoutCollapsed(A)}else{this.panel.setPosition(A.x,A.y);this.panel.setSize(A.width,A.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={"mouseout":function(B){if(!B.within(this.el,true)){A.delay(500)}},"mouseover":function(B){A.cancel()},scope:this}}this.el.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return }this.isSlid=true;var A=this.panel.tools;if(A&&A.toggle){A.toggle.hide()}this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,this.collapsedEl.getHeight())}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",102);if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var A=this.panel.tools;if(A&&A.toggle){A.toggle.show()}},slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);return }this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(A)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(A){if(!A.within(this.el)){this.slideIn()}},anchors:{"west":"left","east":"right","north":"top","south":"bottom"},sanchors:{"west":"l","east":"r","north":"t","south":"b"},canchors:{"west":"tl-tr","east":"tr-tl","north":"tl-bl","south":"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var B=this.collapsedEl,A=this.cmargins;switch(this.position){case"west":return[-(A.right+B.getWidth()+A.left),0];break;case"east":return[A.right+B.getWidth()+A.left,0];break;case"north":return[0,-(A.top+A.bottom+B.getHeight())];break;case"south":return[0,A.top+A.bottom+B.getHeight()];break}}};Ext.layout.BorderLayout.SplitRegion=function(B,A,C){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,B,A,C);this.applyLayout=this.applyFns[C]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;this.panel.setPosition(C.x,C.y);var A=D.offsetWidth;B.left=(C.x+C.width-A)+"px";B.top=(C.y)+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},east:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetWidth;this.panel.setPosition(C.x+A,C.y);B.left=(C.x)+"px";B.top=(C.y)+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},north:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y);B.left=(C.x)+"px";B.top=(C.y+C.height-A)+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A)},south:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y+A);B.left=(C.x)+"px";B.top=(C.y)+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A)}},render:function(A,C){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,A,C);var D=this.position;this.splitEl=A.createChild({cls:"x-layout-split x-layout-split-"+D,html:" "});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+D,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var B=this.splitSettings[D];this.split=new Ext.SplitBar(this.splitEl.dom,C.el,B.orientation);this.split.placement=B.placement;this.split.getMaximumSize=this[B.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[B.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[B.maxProp];if(C.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var A=this.panel.getSize();if(this.position=="north"||this.position=="south"){A.height+=this.splitEl.dom.offsetHeight}else{A.width+=this.splitEl.dom.offsetWidth}return A},getHMaxSize:function(){var B=this.maxSize||10000;var A=this.layout.center;return Math.min(B,(this.el.getWidth()+A.el.getWidth())-A.getMinWidth())},getVMaxSize:function(){var B=this.maxSize||10000;var A=this.layout.center;return Math.min(B,(this.el.getHeight()+A.el.getHeight())-A.getMinHeight())},onSplitMove:function(B,A){var C=this.panel.getSize();this.lastSplitSize=A;if(this.position=="north"||this.position=="south"){this.panel.setSize(C.width,A);this.state.height=A}else{this.panel.setSize(A,C.height);this.state.width=A}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split}});Ext.Container.LAYOUTS["border"]=Ext.layout.BorderLayout; +Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",getAnchorViewSize:function(A,B){return A.body.getStyleSize()},setContainer:function(B){Ext.layout.FormLayout.superclass.setContainer.call(this,B);if(B.labelAlign){B.addClass("x-form-label-"+B.labelAlign)}if(B.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0}else{this.labelSeparator=B.labelSeparator||this.labelSeparator;if(typeof B.labelWidth=="number"){var C=(typeof B.labelPad=="number"?B.labelPad:5);this.labelAdjust=B.labelWidth+C;this.labelStyle="width:"+B.labelWidth+"px;";this.elementStyle="padding-left:"+(B.labelWidth+C)+"px"}if(B.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;"}}if(!this.fieldTpl){var A=new Ext.Template("
    ","","
    ","
    ","
    ");A.disableFormats=true;A.compile();Ext.layout.FormLayout.prototype.fieldTpl=A}},renderItem:function(D,A,C){if(D&&!D.rendered&&D.isFormField&&D.inputType!="hidden"){var B=[D.id,D.fieldLabel,D.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof D.labelSeparator=="undefined"?this.labelSeparator:D.labelSeparator,(D.itemCls||this.container.itemCls||"")+(D.hideLabel?" x-hide-label":""),D.clearCls||"x-form-clear-left"];if(typeof A=="number"){A=C.dom.childNodes[A]||null}if(A){this.fieldTpl.insertBefore(A,B)}else{this.fieldTpl.append(C,B)}D.render("x-form-el-"+D.id)}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)}},adjustWidthAnchor:function(B,A){return B-(A.hideLabel?0:this.labelAdjust)},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["form"]=Ext.layout.FormLayout; +Ext.layout.Accordion=Ext.extend(Ext.layout.FitLayout,{fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,renderItem:function(A){if(this.animate===false){A.animCollapse=false}A.collapsible=true;if(this.autoWidth){A.autoWidth=true}if(this.titleCollapse){A.titleCollapse=true}if(this.hideCollapseTool){A.hideCollapseTool=true}if(this.collapseFirst!==undefined){A.collapseFirst=this.collapseFirst}if(!this.activeItem&&!A.collapsed){this.activeItem=A}else{if(this.activeItem){A.collapsed=true}}Ext.layout.Accordion.superclass.renderItem.apply(this,arguments);A.header.addClass("x-accordion-hd");A.on("beforeexpand",this.beforeExpand,this)},beforeExpand:function(C,B){var A=this.activeItem;if(A){if(this.sequence){delete this.activeItem;A.collapse({callback:function(){C.expand(B||true)},scope:this});return false}else{A.collapse(this.animate)}}this.activeItem=C;if(this.activeOnTop){C.el.dom.parentNode.insertBefore(C.el.dom,C.el.dom.parentNode.firstChild)}this.layout()},setItemSize:function(F,E){if(this.fill&&F){var B=this.container.items.items;var D=0;for(var C=0,A=B.length;Cthis.columns){return this.getNextNonSpan(1,++C)}}else{break}}return[D,C]},renderItem:function(C,A,B){if(C&&!C.rendered){C.render(this.getNextCell(C))}},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["table"]=Ext.layout.TableLayout; +Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",onLayout:function(A,B){B.position();Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,A,B)}});Ext.Container.LAYOUTS["absolute"]=Ext.layout.AbsoluteLayout; +Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(A,B){this.fireEvent("resize",this,A,B,A,B)}});Ext.reg("viewport",Ext.Viewport); +Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.tbar){this.elements+=",tbar";if(typeof this.tbar=="object"){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(typeof this.bbar=="object"){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.title&&this.header!==false){this.elements+=",header"}}if(this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){var C=this.buttons;this.buttons=[];for(var B=0,A=C.length;B"+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool){this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.titleCollapse&&this.header){this.header.on("click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var J=this.tools;this.tools={};this.addTool.apply(this,J)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){var D=this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-"+this.buttonAlign,html:"
    "}},null,true);var L=D.getElementsByTagName("tr")[0];for(var F=0,I=this.buttons.length;F ");F.disableFormats=true;F.compile();Ext.Panel.prototype.toolTemplate=F}for(var E=0,C=arguments,B=C.length;E0){J.sort(C);var I=J[0].manager.zseed;for(var K=0;K=0;--H){if(!D[H].hidden){B(D[H]);return }}B(null)};return{zseed:9000,register:function(H){F[H.id]=H;D.push(H);H.on("hide",A)},unregister:function(H){delete F[H.id];H.un("hide",A);D.remove(H)},get:function(H){return typeof H=="object"?H:F[H]},bringToFront:function(H){H=this.get(H);if(H!=E){H._lastAccess=new Date().getTime();G();return true}return false},sendToBack:function(H){H=this.get(H);H._lastAccess=-(new Date().getTime());G();return H},hideAll:function(){for(var H in F){if(F[H]&&typeof F[H]!="function"&&F[H].isVisible()){F[H].hide()}}},getActive:function(){return E},getBy:function(J,I){var K=[];for(var H=D.length-1;H>=0;--H){var L=D[H];if(J.call(I||L,L)!==false){K.push(L)}}return K},each:function(I,H){for(var J in F){if(F[J]&&typeof F[J]!="function"){if(I.call(H||F[J],F[J])===false){return }}}}}};Ext.WindowMgr=new Ext.WindowGroup(); +Ext.dd.PanelProxy=function(A,B){this.panel=A;this.id=this.panel.id+"-ddproxy";Ext.apply(this,B)};Ext.dd.PanelProxy.prototype={insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(undefined,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(B,C,A){this.hide();if(typeof C=="function"){C.call(A||this)}},moveProxy:function(A,B){if(this.proxy){A.insertBefore(this.proxy.dom,B)}}};Ext.Panel.DD=function(B,A){this.panel=B;this.dragData={panel:B};this.proxy=new Ext.dd.PanelProxy(B,A);Ext.Panel.DD.superclass.constructor.call(this,B.el,A);this.setHandleElId(B.header.id);B.header.setStyle("cursor","move");this.scroll=false};Ext.extend(Ext.Panel.DD,Ext.dd.DragSource,{showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(A,B){this.proxy.show()},b4MouseDown:function(B){var A=B.getPageX();var C=B.getPageY();this.autoOffset(A,C)},onInitDrag:function(A,B){this.onStartDrag(A,B);return true},createFrame:Ext.emptyFn,getDragEl:function(A){return this.proxy.ghost.dom},endDrag:function(A){this.proxy.hide();this.panel.saveState()},autoOffset:function(A,B){A-=this.startPageX;B-=this.startPageY;this.setDelta(A,B)}}); +Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)};Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(B,A){return typeof this.state[B]=="undefined"?A:this.state[B]},clear:function(A){delete this.state[A];this.fireEvent("statechange",this,A,null)},set:function(A,B){this.state[A]=B;this.fireEvent("statechange",this,A,B)},decodeValue:function(A){var J=/^(a|n|d|b|s|o)\:(.*)$/;var C=J.exec(unescape(A));if(!C||!C[1]){return }var F=C[1];var H=C[2];switch(F){case"n":return parseFloat(H);case"d":return new Date(Date.parse(H));case"b":return(H=="1");case"a":var G=[];var I=H.split("^");for(var B=0,D=I.length;B=A;C--){B.push(D[C])}}return B},indexOf:function(A){A=this.getNode(A);if(typeof A.viewIndex=="number"){return A.viewIndex}return this.all.indexOf(A)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.el.update("
    "+this.loadingText+"
    ");this.all.clear()}}});Ext.reg("dataview",Ext.DataView); +Ext.ColorPalette=function(A){Ext.ColorPalette.superclass.constructor.call(this,A);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}};Ext.extend(Ext.ColorPalette,Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],onRender:function(B,A){var C=new Ext.XTemplate(" ");var D=document.createElement("div");D.className=this.itemCls;C.overwrite(D,this.colors);B.dom.insertBefore(D,A);this.el=Ext.get(D);this.el.on(this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.el.on("click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var A=this.value;this.value=null;this.select(A)}},handleClick:function(B,A){B.preventDefault();if(!this.disabled){var C=A.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(C.toUpperCase())}},select:function(A){A=A.replace("#","");if(A!=this.value||this.allowReselect){var B=this.el;if(this.value){B.child("a.color-"+this.value).removeClass("x-color-palette-sel")}B.child("a.color-"+A).addClass("x-color-palette-sel");this.value=A;this.fireEvent("select",this,A)}}});Ext.reg("colorpalette",Ext.ColorPalette); +Ext.DatePicker=Ext.extend(Ext.Component,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minDate:null,maxDate:null,minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDays:null,disabledDaysText:"",disabledDatesRE:null,disabledDatesText:"",constrainToViewport:true,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,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime():new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;B","  ",""];var F=this.dayNames;for(var E=0;E<7;E++){var H=this.startDay+E;if(H>6){H=H-7}C.push("")}C[C.length]="";for(var E=0;E<42;E++){if(E%7==0&&E!=0){C[C.length]=""}C[C.length]=""}C[C.length]="
    ",F[H].substr(0,1),"
    ";var B=document.createElement("div");B.className="x-date-picker";B.innerHTML=C.join("");A.dom.insertBefore(B,G);this.el=Ext.get(B);this.eventEl=Ext.get(B.firstChild);new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.eventEl.on("mousewheel",this.handleMouseWheel,this);this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");var J=new Ext.KeyNav(this.eventEl,{"left":function(K){K.ctrlKey?this.showPrevMonth():this.update(this.activeDate.add("d",-1))},"right":function(K){K.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1))},"up":function(K){K.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7))},"down":function(K){K.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7))},"pageUp":function(K){this.showNextMonth()},"pageDown":function(K){this.showPrevMonth()},"enter":function(K){K.stopPropagation();return true},scope:this});this.eventEl.on("click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.on("click",this.showMonthPicker,this);this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu");var I=(new Date()).dateFormat(this.format);var D=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,I),tooltip:String.format(this.todayTip,I),handler:this.selectToday,scope:this});if(Ext.isIE){this.el.repaint()}this.update(this.value)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var A=[""];for(var B=0;B<6;B++){A.push("","",B==0?"":"")}A.push("","
    ",this.monthNames[B].substr(0,3),"",this.monthNames[B+6].substr(0,3),"
    ");this.monthPicker.update(A.join(""));this.monthPicker.on("click",this.onMonthClick,this);this.monthPicker.on("dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(C,D,E){E+=1;if((E%2)==0){C.dom.xmonth=5+Math.round(E*0.5)}else{C.dom.xmonth=Math.round((E-1)*0.5)}})}},showMonthPicker:function(){this.createMonthPicker();var A=this.el.getSize();this.monthPicker.setSize(A);this.monthPicker.child("table").setSize(A);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})},updateMPYear:function(E){this.mpyear=E;var C=this.mpYears.elements;for(var B=1;B<=10;B++){var D=C[B-1],A;if((B%2)==0){A=E+Math.round(B*0.5);D.firstChild.innerHTML=A;D.xyear=A}else{A=E-(5-Math.round(B*0.5));D.firstChild.innerHTML=A;D.xyear=A}this.mpYears.item(B-1)[A==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(A){this.mpMonths.each(function(B,C,D){B[B.dom.xmonth==A?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(A){},onMonthClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(C.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(C.is("button.x-date-mp-ok")){this.update(new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if(A=C.up("td.x-date-mp-month",2)){this.mpMonths.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelMonth=A.dom.xmonth}else{if(A=C.up("td.x-date-mp-year",2)){this.mpYears.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelYear=A.dom.xyear}else{if(C.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(C.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(A=C.up("td.x-date-mp-month",2)){this.update(new Date(this.mpSelYear,A.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if(A=C.up("td.x-date-mp-year",2)){this.update(new Date(A.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(A){if(this.monthPicker){if(A===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(A){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(A){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(A){var B=A.getWheelDelta();if(B>0){this.showPrevMonth();A.stopEvent()}else{if(B<0){this.showNextMonth();A.stopEvent()}}},handleDateClick:function(B,A){B.stopEvent();if(A.dateValue&&!Ext.fly(A.parentNode).hasClass("x-date-disabled")){this.setValue(new Date(A.dateValue));this.fireEvent("select",this,this.value)}},selectToday:function(){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)},update:function(W){var A=this.activeDate;this.activeDate=W;if(A&&this.el){var I=W.getTime();if(A.getMonth()==W.getMonth()&&A.getFullYear()==W.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(a){if(a.dom.firstChild.dateValue==I){a.addClass("x-date-selected");setTimeout(function(){try{a.dom.firstChild.focus()}catch(b){}},50);return false}});return }}var F=W.getDaysInMonth();var J=W.getFirstDateOfMonth();var C=J.getDay()-this.startDay;if(C<=this.startDay){C+=7}var S=W.add("mo",-1);var D=S.getDaysInMonth()-C;var B=this.cells.elements;var K=this.textNodes;F+=C;var P=86400000;var U=(new Date(S.getFullYear(),S.getMonth(),D)).clearTime();var T=new Date().clearTime().getTime();var N=W.clearTime().getTime();var M=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var Q=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var X=this.disabledDatesRE;var L=this.disabledDatesText;var Z=this.disabledDays?this.disabledDays.join(""):false;var V=this.disabledDaysText;var R=this.format;var G=function(d,a){a.title="";var b=U.getTime();a.firstChild.dateValue=b;if(b==T){a.className+=" x-date-today";a.title=d.todayText}if(b==N){a.className+=" x-date-selected";setTimeout(function(){try{a.firstChild.focus()}catch(f){}},50)}if(bQ){a.className=" x-date-disabled";a.title=d.maxText;return }if(Z){if(Z.indexOf(U.getDay())!=-1){a.title=V;a.className=" x-date-disabled"}}if(X&&R){var c=U.dateFormat(R);if(X.test(c)){a.title=L.replace("%0",c);a.className=" x-date-disabled"}}};var O=0;for(;O","","{text}","");D.disableFormats=true;D.compile();Ext.TabPanel.prototype.itemTpl=D}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.on("add",this.onAdd,this);this.on("remove",this.onRemove,this);this.strip.on("mousedown",this.onStripMouseDown,this);this.strip.on("click",this.onStripClick,this);this.strip.on("contextmenu",this.onStripContextMenu,this);if(this.enableTabScroll){this.strip.on("mousewheel",this.onWheel,this)}},findTargets:function(C){var B=null;var A=C.getTarget("li",this.strip);if(A){B=this.getComponent(A.id.split("__")[1]);if(B.disabled){return{close:null,item:null,el:null}}}return{close:C.getTarget(".x-tab-strip-close",this.strip),item:B,el:A}},onStripMouseDown:function(B){B.preventDefault();if(B.button!=0){return }var A=this.findTargets(B);if(A.close){this.remove(A.item);return }if(A.item&&A.item!=this.activeTab){this.setActiveTab(A.item)}},onStripClick:function(B){var A=this.findTargets(B);if(!A.close&&A.item&&A.item!=this.activeTab){this.setActiveTab(A.item)}},onStripContextMenu:function(B){B.preventDefault();var A=this.findTargets(B);if(A.item){this.fireEvent("contextmenu",this,A.item,B)}},readTabs:function(D){if(D===true){this.items.each(function(G){this.remove(G)},this)}var C=this.el.query(this.autoTabSelector);for(var B=0,A=C.length;B20?C:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(G>(A-C)){E.dom.scrollLeft=A-C}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){var C=this.stripWrap.dom.offsetHeight;var A=this.header.insertFirst({cls:"x-tab-scroller-left"});A.setHeight(C);A.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(A,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=A;var B=this.header.insertFirst({cls:"x-tab-scroller-right"});B.setHeight(C);B.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(B,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=B},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(E,A){if(!E){return }var C=this.getTabEl(E);var G=this.getScrollPos(),D=this.getScrollArea();var F=Ext.fly(C).getOffsetsTo(this.stripWrap)[0]+G;var B=F+C.offsetWidth;if(F(G+D)){this.scrollTo(B-D,A)}}},scrollTo:function(B,A){this.stripWrap.scrollTo("left",B,A?this.getScrollAnim():false);if(!A){this.updateScrollButtons()}},onWheel:function(D){var E=D.getWheelDelta()*this.wheelIncrement*-1;D.stopEvent();var F=this.getScrollPos();var C=F+E;var A=this.getScrollWidth()-this.getScrollArea();var B=Math.max(0,Math.min(A,C));if(B!=F){this.scrollTo(B,false)}},onScrollRight:function(){var A=this.getScrollWidth()-this.getScrollArea();var C=this.getScrollPos();var B=Math.min(A,C+this.getScrollIncrement());if(B!=C){this.scrollTo(B,this.animScroll)}},onScrollLeft:function(){var B=this.getScrollPos();var A=Math.max(0,B-this.getScrollIncrement());if(A!=B){this.scrollTo(A,this.animScroll)}},updateScrollButtons:function(){var A=this.getScrollPos();this.scrollLeft[A==0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[A>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var A=[];return{add:function(B){A.push(B);if(A.length>10){A.shift()}},remove:function(E){var D=[];for(var C=0,B=A.length;C","  ","")}this.template=Ext.Button.buttonTemplate}var B,E=[this.text||" ",this.type];if(A){B=this.template.insertBefore(A,E,true)}else{B=this.template.append(C,E,true)}var D=B.child(this.buttonSelector);D.on("focus",this.onFocus,this);D.on("blur",this.onBlur,this);this.initButtonEl(B,D);if(this.menu){this.el.child(this.menuClassTarget).addClass("x-btn-with-menu")}Ext.ButtonToggleMgr.register(this)},initButtonEl:function(B,C){this.el=B;B.addClass("x-btn");if(this.icon){C.setStyle("background-image","url("+this.icon+")")}if(this.iconCls){C.addClass(this.iconCls);if(!this.cls){B.addClass(this.text?"x-btn-text-icon":"x-btn-icon")}}if(this.tabIndex!==undefined){C.dom.tabIndex=this.tabIndex}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.register(Ext.apply({target:C.id},this.tooltip))}else{C.dom[this.tooltipType]=this.tooltip}}if(this.pressed){this.el.addClass("x-btn-pressed")}if(this.handleMouseEvents){B.on("mouseover",this.onMouseOver,this);B.on("mousedown",this.onMouseDown,this)}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}if(this.id){this.el.dom.id=this.el.id=this.id}if(this.repeat){var A=new Ext.util.ClickRepeater(B,typeof this.repeat=="object"?this.repeat:{});A.on("click",this.onClick,this)}B.on(this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);if(Ext.isIE6){this.autoWidth.defer(1,this)}else{this.autoWidth()}},setIconClass:function(A){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,A)}this.iconCls=A},beforeDestroy:function(){var A=this.el.child(this.buttonSelector);if(A){A.removeAllListeners()}if(this.menu){Ext.destroy(this.menu)}},onDestroy:function(){if(this.rendered){Ext.ButtonToggleMgr.unregister(this)}},autoWidth:function(){if(this.el){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()","","","
     
    ","","","
     
    ");var C,F=[this.text||" ",this.type];if(A){C=B.insertBefore(A,F,true)}else{C=B.append(D,F,true)}var E=C.child(this.buttonSelector);this.initButtonEl(C,E);this.arrowBtnTable=C.child("table:last");if(this.arrowTooltip){C.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip}},autoWidth:function(){if(this.el){var C=this.el.child("table:first");var B=this.el.child("table:last");this.el.setWidth("auto");C.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth){if((C.getWidth()+B.getWidth())"},onRender:function(C,B){this.el=C.createChild(this.autoCreate,B);this.tr=this.el.child("tr",true)},afterRender:function(){A.superclass.afterRender.call(this);if(this.buttons){this.add.apply(this,this.buttons);delete this.buttons}},add:function(){var C=arguments,B=C.length;for(var D=0;D"){this.addFill()}else{this.addText(E)}}}}else{if(E.tagName){this.addElement(E)}else{if(typeof E=="object"){if(E.xtype){this.addField(Ext.ComponentMgr.create(E,"button"))}else{this.addButton(E)}}}}}}}},addSeparator:function(){return this.addItem(new A.Separator())},addSpacer:function(){return this.addItem(new A.Spacer())},addFill:function(){return this.addItem(new A.Fill())},addElement:function(B){return this.addItem(new A.Item(B))},addItem:function(B){var C=this.nextBlock();this.initMenuTracking(B);B.render(C);this.items.add(B);return B},addButton:function(D){if(D instanceof Array){var F=[];for(var E=0,C=D.length;E=1&C<=E.pages){this.field.dom.value=C}}}}}},beforeLoad:function(){if(this.rendered&&this.loading){this.loading.disable()}},doLoad:function(C){var B={},A=this.paramNames;B[A.start]=C;B[A.limit]=this.pageSize;this.store.load({params:B})},onClick:function(E){var B=this.store;switch(E){case"first":this.doLoad(0);break;case"prev":this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case"next":this.doLoad(this.cursor+this.pageSize);break;case"last":var D=B.getTotalCount();var A=D%this.pageSize;var C=A?(D-A):D-this.pageSize;this.doLoad(C);break;case"refresh":this.doLoad(this.cursor);break}},unbind:function(A){A=Ext.StoreMgr.lookup(A);A.un("beforeload",this.beforeLoad,this);A.un("load",this.onLoad,this);A.un("loadexception",this.onLoadError,this);this.store=undefined},bind:function(A){A=Ext.StoreMgr.lookup(A);A.on("beforeload",this.beforeLoad,this);A.on("load",this.onLoad,this);A.on("loadexception",this.onLoadError,this);this.store=A}});Ext.reg("paging",Ext.PagingToolbar); +Ext.Resizable=function(D,E){this.el=Ext.get(D);if(E&&E.wrap){E.resizeChild=this.el;this.el=this.el.wrap(typeof E.wrap=="object"?E.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=E.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(E.resizeChild.getPositioning());E.resizeChild.clearPositioning();if(!E.width||!E.height){var F=E.resizeChild.getSize();this.el.setSize(F.width,F.height)}if(E.pinned&&!E.adjustments){E.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"});this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,E);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var I=this.el.getStyle("position");if(I!="absolute"&&I!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var M=this.handles.split(/\s*?[,;]\s*?| /);var C=Ext.Resizable.positions;for(var H=0,J=M.length;H0){if(A>(E/2)){D=C+(E-A)}else{D=C-A}}return Math.max(B,D)},resizeElement:function(){var A=this.proxy.getBox();if(this.updateBox){this.el.setBox(A,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(A.width,A.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}return A},constrain:function(B,C,A,D){if(B-CD){C=D-B}}return C},onMouseMove:function(S){if(this.enabled){try{if(this.resizeRegion&&!this.resizeRegion.contains(S.getPoint())){return }var Q=this.curSize||this.startBox;var I=this.startBox.x,H=this.startBox.y;var C=I,B=H;var J=Q.width,R=Q.height;var D=J,L=R;var K=this.minWidth,T=this.minHeight;var P=this.maxWidth,W=this.maxHeight;var F=this.widthIncrement;var A=this.heightIncrement;var U=S.getXY();var O=-(this.startPoint[0]-Math.max(this.minX,U[0]));var M=-(this.startPoint[1]-Math.max(this.minY,U[1]));var G=this.activeHandle.position;switch(G){case"east":J+=O;J=Math.min(Math.max(K,J),P);break;case"south":R+=M;R=Math.min(Math.max(T,R),W);break;case"southeast":J+=O;R+=M;J=Math.min(Math.max(K,J),P);R=Math.min(Math.max(T,R),W);break;case"north":M=this.constrain(R,M,T,W);H+=M;R-=M;break;case"west":O=this.constrain(J,O,K,P);I+=O;J-=O;break;case"northeast":J+=O;J=Math.min(Math.max(K,J),P);M=this.constrain(R,M,T,W);H+=M;R-=M;break;case"northwest":O=this.constrain(J,O,K,P);M=this.constrain(R,M,T,W);H+=M;R-=M;I+=O;J-=O;break;case"southwest":O=this.constrain(J,O,K,P);R+=M;R=Math.min(Math.max(T,R),W);I+=O;J-=O;break}var N=this.snap(J,F,K);var V=this.snap(R,A,T);if(N!=J||V!=R){switch(G){case"northeast":H-=V-R;break;case"north":H-=V-R;break;case"southwest":I-=N-J;break;case"west":I-=N-J;break;case"northwest":I-=N-J;H-=V-R;break}J=N;R=V}if(this.preserveRatio){switch(G){case"southeast":case"east":R=L*(J/D);R=Math.min(Math.max(T,R),W);J=D*(R/L);break;case"south":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case"northeast":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case"north":var X=J;J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);I+=(X-J)/2;break;case"southwest":R=L*(J/D);R=Math.min(Math.max(T,R),W);var X=J;J=D*(R/L);I+=X-J;break;case"west":var E=R;R=L*(J/D);R=Math.min(Math.max(T,R),W);H+=(E-R)/2;var X=J;J=D*(R/L);I+=X-J;break;case"northwest":var X=J;var E=R;R=L*(J/D);R=Math.min(Math.max(T,R),W);J=D*(R/L);H+=E-R;I+=X-J;break}}this.proxy.setBounds(I,H,J,R);if(this.dynamic){this.resizeElement()}}catch(S){}}},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(C){this.proxy.remove();if(this.overlay){this.overlay.removeAllListeners();this.overlay.remove()}var D=Ext.Resizable.positions;for(var A in D){if(typeof D[A]!="function"&&this[D[A]]){var B=this[D[A]];B.el.removeAllListeners();B.el.remove()}}if(C){this.el.update("");this.el.remove()}},syncHandleHeight:function(){var A=this.el.getHeight(true);if(this.west){this.west.el.setHeight(A)}if(this.east){this.east.el.setHeight(A)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=function(C,E,B,D){if(!this.tpl){var A=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});A.compile();Ext.Resizable.Handle.prototype.tpl=A}this.position=E;this.rz=C;this.el=this.tpl.append(C.el.dom,[this.position],true);this.el.unselectable();if(D){this.el.setOpacity(0)}this.el.on("mousedown",this.onMouseDown,this);if(!B){this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this)}};Ext.Resizable.Handle.prototype={afterResize:function(A){},onMouseDown:function(A){this.rz.onMouseDown(this,A)},onMouseOver:function(A){this.rz.handleOver(this,A)},onMouseOut:function(A){this.rz.handleOut(this,A)}}; +Ext.Editor=function(B,A){this.field=B;Ext.Editor.superclass.constructor.call(this,A)};Ext.extend(Ext.Editor,Ext.Component,{value:"",alignment:"c-c?",shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:false,cancelOnEsc:false,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","specialkey")},onRender:function(B,A){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:B,shim:this.shim,shadowOffset:4,id:this.id,constrain:this.constrain});this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.render(this.el);if(Ext.isGecko){this.field.el.dom.setAttribute("autocomplete","off")}this.field.on("specialkey",this.onSpecialKey,this);if(this.swallowKeys){this.field.el.swallowEvent(["keydown","keypress"])}this.field.show();this.field.on("blur",this.onBlur,this);if(this.field.grow){this.field.on("autosize",this.el.sync,this.el,{delay:1})}},onSpecialKey:function(B,A){if(this.completeOnEnter&&A.getKey()==A.ENTER){A.stopEvent();this.completeEdit()}else{if(this.cancelOnEsc&&A.getKey()==A.ESC){this.cancelEdit()}else{this.fireEvent("specialkey",B,A)}}},startEdit:function(B,C){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(B);var A=C!==undefined?C:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,A)===false){return }this.startValue=A;this.field.setValue(A);if(this.autoSize){var D=this.boundEl.getSize();switch(this.autoSize){case"width":this.setSize(D.width,"");break;case"height":this.setSize("",D.height);break;default:this.setSize(D.width,D.height)}}this.el.alignTo(this.boundEl,this.alignment);this.editing=true;this.show()},setSize:function(A,B){this.field.setSize(A,B);if(this.el){this.el.sync()}},realign:function(){this.el.alignTo(this.boundEl,this.alignment)},completeEdit:function(A){if(!this.editing){return }var B=this.getValue();if(this.revertInvalid!==false&&!this.field.isValid()){B=this.startValue;this.cancelEdit(true)}if(String(B)===String(this.startValue)&&this.ignoreNoChange){this.editing=false;this.hide();return }if(this.fireEvent("beforecomplete",this,B,this.startValue)!==false){this.editing=false;if(this.updateEl&&this.boundEl){this.boundEl.update(B)}if(A!==true){this.hide()}this.fireEvent("complete",this,B,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show();if(Ext.isIE&&!this.fixIEFocus){this.fixIEFocus=true;this.deferredFocus.defer(50,this)}else{this.field.focus()}this.fireEvent("startedit",this.boundEl,this.startValue)},deferredFocus:function(){if(this.editing){this.field.focus()}},cancelEdit:function(A){if(this.editing){this.setValue(this.startValue);if(A!==true){this.hide()}}},onBlur:function(){if(this.allowBlur!==true&&this.editing){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return }this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(A){this.field.setValue(A)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){this.field.destroy();this.field=null}});Ext.reg("editor",Ext.Editor); +Ext.MessageBox=function(){var R,B,N,Q;var G,J,P,A,K,M,H,F;var O,S,L,C="";var D=function(U){R.hide();Ext.callback(B.fn,B.scope||window,[U,S.dom.value],1)};var T=function(){if(B&&B.cls){R.el.removeClass(B.cls)}K.reset()};var E=function(W,U,V){if(B&&B.closable!==false){R.hide()}if(V){V.stopEvent()}};var I=function(U){var W=0;if(!U){O["ok"].hide();O["cancel"].hide();O["yes"].hide();O["no"].hide();return W}R.footer.dom.style.display="";for(var V in O){if(typeof O[V]!="function"){if(U[V]){O[V].show();O[V].setText(typeof U[V]=="string"?U[V]:Ext.MessageBox.buttonText[V]);W+=O[V].el.getWidth()+15}else{O[V].hide()}}}return W};return{getDialog:function(U){if(!R){R=new Ext.Window({autoCreate:true,title:U,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(B&&B.buttons&&B.buttons.no&&!B.buttons.cancel){D("no")}else{D("cancel")}}});O={};var V=this.buttonText;O["ok"]=R.addButton(V["ok"],D.createCallback("ok"));O["yes"]=R.addButton(V["yes"],D.createCallback("yes"));O["no"]=R.addButton(V["no"],D.createCallback("no"));O["cancel"]=R.addButton(V["cancel"],D.createCallback("cancel"));O["ok"].hideMode=O["yes"].hideMode=O["no"].hideMode=O["cancel"].hideMode="offsets";R.render(document.body);R.getEl().addClass("x-window-dlg");N=R.mask;G=R.body.createChild({html:"

    "});H=Ext.get(G.dom.firstChild);var W=G.dom.childNodes[1];J=Ext.get(W.firstChild);P=Ext.get(W.childNodes[2]);P.enableDisplayMode();P.addKeyListener([10,13],function(){if(R.isVisible()&&B&&B.buttons){if(B.buttons.ok){D("ok")}else{if(B.buttons.yes){D("yes")}}}});A=Ext.get(W.childNodes[3]);A.enableDisplayMode();K=new Ext.ProgressBar({renderTo:G});G.createChild({cls:"x-clear"})}return R},updateText:function(X){if(!R.isVisible()&&!B.width){R.setSize(this.maxWidth,100)}J.update(X||" ");var V=C!=""?(H.getWidth()+H.getMargins("lr")):0;var Z=J.getWidth()+J.getMargins("lr");var W=R.getFrameWidth("lr");var Y=R.body.getFrameWidth("lr");if(Ext.isIE&&V>0){V+=3}var U=Math.max(Math.min(B.width||V+Z+W+Y,this.maxWidth),Math.max(B.minWidth||this.minWidth,L||0));if(B.prompt===true){S.setWidth(U-V-W-Y)}if(B.progress===true||B.wait===true){K.setSize(U-V-W-Y)}R.setSize(U,"auto").center();return this},updateProgress:function(V,U,W){K.updateProgress(V,U);if(W){this.updateText(W)}return this},isVisible:function(){return R&&R.isVisible()},hide:function(){if(this.isVisible()){R.hide();T()}return this},show:function(X){if(this.isVisible()){this.hide()}B=X;var Y=this.getDialog(B.title||" ");Y.setTitle(B.title||" ");var U=(B.closable!==false&&B.progress!==true&&B.wait!==true);Y.tools.close.setDisplayed(U);S=P;B.prompt=B.prompt||(B.multiline?true:false);if(B.prompt){if(B.multiline){P.hide();A.show();A.setHeight(typeof B.multiline=="number"?B.multiline:this.defaultTextHeight);S=A}else{P.show();A.hide()}}else{P.hide();A.hide()}S.dom.value=B.value||"";if(B.prompt){Y.focusEl=S}else{var W=B.buttons;var V=null;if(W&&W.ok){V=O["ok"]}else{if(W&&W.yes){V=O["yes"]}}if(V){Y.focusEl=V}}this.setIcon(B.icon);L=I(B.buttons);K.setVisible(B.progress===true||B.wait===true);this.updateProgress(0,B.progressText);this.updateText(B.msg);if(B.cls){Y.el.addClass(B.cls)}Y.proxyDrag=B.proxyDrag===true;Y.modal=B.modal!==false;Y.mask=B.modal!==false?N:false;if(!Y.isVisible()){document.body.appendChild(R.el.dom);Y.setAnimateTarget(B.animEl);Y.show(B.animEl)}Y.on("show",function(){if(U===true){Y.keyMap.enable()}else{Y.keyMap.disable()}});if(B.wait===true){K.wait(B.waitConfig)}return this},setIcon:function(U){if(U&&U!=""){H.removeClass("x-hidden");H.replaceClass(C,U);C=U}else{H.replaceClass(C,"x-hidden");C=""}return this},progress:function(W,V,U){this.show({title:W,msg:V,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:U});return this},wait:function(W,V,U){this.show({title:V,msg:W,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:U});return this},alert:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.OK,fn:V,scope:U});return this},confirm:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.YESNO,fn:V,scope:U,icon:this.QUESTION});return this},prompt:function(Y,X,W,V,U){this.show({title:Y,msg:X,buttons:this.OKCANCEL,fn:W,minWidth:250,scope:V,prompt:true,multiline:U});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,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox; +Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this.hide,scope:this})}},showAt:function(A){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){var B=this.body.getTextWidth();if(this.title){B=Math.max(B,this.header.child("span").getTextWidth(this.title))}B+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr");this.setWidth(B.constrain(this.minWidth,this.maxWidth))}if(this.constrainPosition){A=this.el.adjustForConstraints(A)}this.setPagePosition(A[0],A[1])},showBy:function(A,B){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(A,B||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.Tip.DD=function(B,A){Ext.apply(this,A);this.tip=B;Ext.Tip.DD.superclass.constructor.call(this,B.el.id,"WindowDD-"+B.id);this.setHandleElId(B.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(A){this.tip.el.enableShadow(true)}}); +Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,mouseOffset:[15,18],trackMouse:false,constrainPosition:true,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget()},initTarget:function(){if(this.target){this.target=Ext.get(this.target);this.target.on("mouseover",this.onTargetOver,this);this.target.on("mouseout",this.onTargetOut,this);this.target.on("mousemove",this.onMouseMove,this)}},onMouseMove:function(A){this.targetXY=A.getXY();if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}},getTargetXY:function(){return[this.targetXY[0]+this.mouseOffset[0],this.targetXY[1]+this.mouseOffset[1]]},onTargetOver:function(A){if(this.disabled||A.within(this.target.dom,true)){return }this.clearTimer("hide");this.targetXY=A.getXY();this.delayShow()},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()=C){D=C-B-5}return{x:A,y:D}},onDestroy:function(){Ext.ToolTip.superclass.onDestroy.call(this);if(this.target){this.target.un("mouseover",this.onTargetOver,this);this.target.un("mouseout",this.onTargetOut,this);this.target.un("mousemove",this.onMouseMove,this)}}}); +Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(D){var F=D instanceof Array?D:arguments;for(var E=0,A=F.length;E0){var D=function(H,G){if(H&&G){var I=G.findChild(A,B);if(I){I.select();if(F){F(true,I)}}else{if(F){F(false,I)}}}else{if(F){F(false,I)}}};this.expandPath(C.join(this.pathSeparator),A,D)}else{this.root.select();if(F){F(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(B,A){Ext.tree.TreePanel.superclass.onRender.call(this,B,A);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}},onDestroy:function(){if(this.rendered){this.body.removeAllListeners();Ext.dd.ScrollManager.unregister(this.body);if(this.dropZone){this.dropZone.unreg()}if(this.dragZone){this.dragZone.unreg()}}this.root.destroy();this.nodeHash=null;Ext.tree.TreePanel.superclass.onDestroy.call(this)}});Ext.reg("treepanel",Ext.tree.TreePanel); +Ext.tree.TreeEventModel=function(A){this.tree=A;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var A=this.tree.getTreeEl();A.on("click",this.delegateClick,this);A.on("mouseover",this.delegateOver,this);A.on("mouseout",this.delegateOut,this);A.on("dblclick",this.delegateDblClick,this);A.on("contextmenu",this.delegateContextMenu,this)},getNode:function(B){var A;if(A=B.getTarget(".x-tree-node-el",10)){var C=Ext.fly(A,"_treeEvents").getAttributeNS("ext","tree-node-id");if(C){return this.tree.getNodeById(C)}}return null},getNodeTarget:function(B){var A=B.getTarget(".x-tree-node-icon",1);if(!A){A=B.getTarget(".x-tree-node-el",6)}return A},delegateOut:function(B,A){if(!this.beforeEvent(B)){return }A=this.getNodeTarget(B);if(A&&!B.within(A,true)){this.onNodeOut(B,this.getNode(B))}},delegateOver:function(B,A){if(!this.beforeEvent(B)){return }A=this.getNodeTarget(B);if(A){this.onNodeOver(B,this.getNode(B))}},delegateClick:function(B,A){if(!this.beforeEvent(B)){return }if(B.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(B,this.getNode(B))}else{if(B.getTarget(".x-tree-ec-icon",1)){this.onIconClick(B,this.getNode(B))}else{if(this.getNodeTarget(B)){this.onNodeClick(B,this.getNode(B))}}}},delegateDblClick:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B)){this.onNodeDblClick(B,this.getNode(B))}},delegateContextMenu:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B)){this.onNodeContextMenu(B,this.getNode(B))}},onNodeClick:function(B,A){A.ui.onClick(B)},onNodeOver:function(B,A){A.ui.onOver(B)},onNodeOut:function(B,A){A.ui.onOut(B)},onIconClick:function(B,A){A.ui.ecClick(B)},onCheckboxClick:function(B,A){A.ui.onCheckChange(B)},onNodeDblClick:function(B,A){A.ui.onDblClick(B)},onNodeContextMenu:function(B,A){A.ui.onContextMenu(B)},beforeEvent:function(A){if(this.disabled){A.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}}; +Ext.tree.DefaultSelectionModel=function(A){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,A);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A)},select:function(B){var A=this.selNode;if(A!=B&&this.fireEvent("beforeselect",this,B,A)!==false){if(A){A.ui.onSelectedChange(false)}this.selNode=B;B.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,B,A)}return B},unselect:function(A){if(this.selNode==A){this.clearSelections()}},clearSelections:function(){var A=this.selNode;if(A){A.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return A},getSelectedNode:function(){return this.selNode},isSelected:function(A){return this.selNode==A},selectPrevious:function(){var A=this.selNode||this.lastSelNode;if(!A){return null}var C=A.previousSibling;if(C){if(!C.isExpanded()||C.childNodes.length<1){return this.select(C)}else{var B=C.lastChild;while(B&&B.isExpanded()&&B.childNodes.length>0){B=B.lastChild}return this.select(B)}}else{if(A.parentNode&&(this.tree.rootVisible||!A.parentNode.isRoot)){return this.select(A.parentNode)}}return null},selectNext:function(){var B=this.selNode||this.lastSelNode;if(!B){return null}if(B.firstChild&&B.isExpanded()){return this.select(B.firstChild)}else{if(B.nextSibling){return this.select(B.nextSibling)}else{if(B.parentNode){var A=null;B.parentNode.bubble(function(){if(this.nextSibling){A=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return A}}}return null},onKeyDown:function(C){var B=this.selNode||this.lastSelNode;var D=this;if(!B){return }var A=C.getKey();switch(A){case C.DOWN:C.stopEvent();this.selectNext();break;case C.UP:C.stopEvent();this.selectPrevious();break;case C.RIGHT:C.preventDefault();if(B.hasChildNodes()){if(!B.isExpanded()){B.expand()}else{if(B.firstChild){this.select(B.firstChild,C)}}}break;case C.LEFT:C.preventDefault();if(B.hasChildNodes()&&B.isExpanded()){B.collapse()}else{if(B.parentNode&&(this.tree.rootVisible||B.parentNode!=this.tree.getRootNode())){this.select(B.parentNode,C)}}break}}});Ext.tree.MultiSelectionModel=function(A){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,A);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A,B,B.ctrlKey)},select:function(A,C,B){if(B!==true){this.clearSelections(true)}if(this.isSelected(A)){this.lastSelNode=A;return A}this.selNodes.push(A);this.selMap[A.id]=A;this.lastSelNode=A;A.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return A},unselect:function(B){if(this.selMap[B.id]){B.ui.onSelectedChange(false);var C=this.selNodes;var A=C.indexOf(B);if(A!=-1){this.selNodes.splice(A,1)}delete this.selMap[B.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(B){var D=this.selNodes;if(D.length>0){for(var C=0,A=D.length;C
    ","",this.indentMarkup,"","","",E?("":"/>")):"","",D.text,"
    ","
      ",""].join("");var A;if(J!==true&&D.nextSibling&&(A=D.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",A,C)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",H,C)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var G=this.elNode.childNodes;this.indentNode=G[0];this.ecNode=G[1];this.iconNode=G[2];var F=3;if(E){this.checkbox=G[3];F++}this.anchor=G[F];this.textNode=G[F].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var F=this.node,D,C;var A=F.isLast()?"x-tree-elbow-end":"x-tree-elbow";var E=F.hasChildNodes();if(E||F.attributes.expandable){if(F.expanded){A+="-minus";D="x-tree-node-collapsed";C="x-tree-node-expanded"}else{A+="-plus";D="x-tree-node-expanded";C="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=D||this.c2!=C){Ext.fly(this.elNode).replaceClass(D,C);this.c1=D;this.c2=C}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var B="x-tree-ec-icon "+A;if(this.ecc!=B){this.ecNode.className=B;this.ecc=B}}},getChildIndent:function(){if(!this.childIndent){var A=[];var B=this.node;while(B){if(!B.isRoot||(B.isRoot&&B.ownerTree.rootVisible)){if(!B.isLast()){A.unshift("")}else{A.unshift("")}}B=B.parentNode}this.childIndent=A.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var A="";var B=this.node.parentNode;if(B){A=B.ui.getChildIndent()}if(this.indentMarkup!=A){this.indentNode.innerHTML=A;this.indentMarkup=A}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}delete this.elNode;delete this.ctNode;delete this.indentNode;delete this.ecNode;delete this.iconNode;delete this.checkbox;delete this.anchor;delete this.textNode;Ext.removeNode(this.ctNode)}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var A=this.node.ownerTree.innerCt.dom;this.node.expanded=true;A.innerHTML="
      ";this.wrap=this.ctNode=A.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn}); +Ext.tree.TreeLoader=function(A){this.baseParams={};this.requestMethod="POST";Ext.apply(this,A);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(A,B){if(this.clearOnLoad){while(A.firstChild){A.removeChild(A.firstChild)}}if(this.doPreload(A)){if(typeof B=="function"){B()}}else{if(this.dataUrl||this.url){this.requestData(A,B)}}},doPreload:function(D){if(D.attributes.children){if(D.childNodes.length<1){var C=D.attributes.children;D.beginUpdate();for(var B=0,A=C.length;BK){return E?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(A){A.sort(this.sortFn)},compareNodes:function(B,A){return(B.text.toUpperCase()>A.text.toUpperCase()?1:-1)},updateSort:function(A,B){if(B.childrenRendered){this.doSort.defer(1,this,[B])}}}; +if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(A,B){this.allowParentInsert=false;this.allowContainerDrop=false;this.appendOnly=false;Ext.tree.TreeDropZone.superclass.constructor.call(this,A.innerCt,B);this.tree=A;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(A){if(A.hasChildNodes()&&!A.isExpanded()){A.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(A){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[A])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(A,I,G,D,C){if(!A||!C){return false}var E=A.node;var F=C.node;if(!(E&&E.isTarget&&I)){return false}if(I=="append"&&E.allowChildren===false){return false}if((I=="above"||I=="below")&&(E.parentNode&&E.parentNode.allowChildren===false)){return false}if(F&&(E==F||F.contains(E))){return false}var B=this.dragOverData;B.tree=this.tree;B.target=E;B.data=C;B.point=I;B.source=G;B.rawEvent=D;B.dropNode=F;B.cancel=false;var H=this.tree.fireEvent("nodedragover",B);return B.cancel===false&&H!==false},getDropPoint:function(E,D,I){var J=D.node;if(J.isRoot){return J.allowChildren!==false?"append":false}var B=D.ddel;var K=Ext.lib.Dom.getY(B),G=K+B.offsetHeight;var F=Ext.lib.Event.getPageY(E);var H=J.allowChildren===false||J.isLeaf();if(this.appendOnly||J.parentNode.allowChildren===false){return H?false:"append"}var C=false;if(!this.allowParentInsert){C=J.hasChildNodes()&&J.isExpanded()}var A=(G-K)/(H?2:3);if(F>=K&&F<(K+A)){return"above"}else{if(!C&&(H||F>=G-A&&F<=G)){return"below"}else{return"append"}}},onNodeEnter:function(D,A,C,B){this.cancelExpand()},onNodeOver:function(B,G,F,E){var I=this.getDropPoint(F,B,G);var C=B.node;if(!this.expandProcId&&I=="append"&&C.hasChildNodes()&&!B.node.isExpanded()){this.queueExpand(C)}else{if(I!="append"){this.cancelExpand()}}var D=this.dropNotAllowed;if(this.isValidDropPoint(B,I,G,F,E)){if(I){var A=B.ddel;var H;if(I=="above"){D=B.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";H="x-tree-drag-insert-above"}else{if(I=="below"){D=B.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";H="x-tree-drag-insert-below"}else{D="x-tree-drop-ok-append";H="x-tree-drag-append"}}if(this.lastInsertClass!=H){Ext.fly(A).replaceClass(this.lastInsertClass,H);this.lastInsertClass=H}}}return D},onNodeOut:function(D,A,C,B){this.cancelExpand();this.removeDropIndicators(D)},onNodeDrop:function(C,I,E,D){var H=this.getDropPoint(E,C,I);var F=C.node;F.ui.startDrop();if(!this.isValidDropPoint(C,H,I,E,D)){F.ui.endDrop();return false}var G=D.node||(I.getTreeNode?I.getTreeNode(D,F,H,E):null);var B={tree:this.tree,target:F,data:D,point:H,source:I,rawEvent:E,dropNode:G,cancel:!G};var A=this.tree.fireEvent("beforenodedrop",B);if(A===false||B.cancel===true||!B.dropNode){F.ui.endDrop();return false}F=B.target;if(H=="append"&&!F.isExpanded()){F.expand(false,null,function(){this.completeDrop(B)}.createDelegate(this))}else{this.completeDrop(B)}return true},completeDrop:function(G){var D=G.dropNode,E=G.point,C=G.target;if(!(D instanceof Array)){D=[D]}var F;for(var B=0,A=D.length;BD.offsetLeft){E.scrollLeft=D.offsetLeft}var A=Math.min(this.maxWidth,(E.clientWidth>20?E.clientWidth:E.offsetWidth)-Math.max(0,D.offsetLeft-E.scrollLeft)-5);this.setSize(A,"")},triggerEdit:function(A){this.completeEdit();this.editNode=A;this.startEdit(A.ui.textNode,A.text)},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(B,C){var A=(this.lastClick?this.lastClick.getElapsed():0);this.lastClick=new Date();if(A>this.editDelay&&this.tree.getSelectionModel().isSelected(B)){C.stopEvent();this.triggerEdit(B);return false}},updateNode:function(A,B){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(B)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus()}},onSpecialKey:function(C,B){var A=B.getKey();if(A==B.ESC){B.stopEvent();this.cancelEdit()}else{if(A==B.ENTER&&!B.hasModifier()){B.stopEvent();this.completeEdit()}}}}); +Ext.menu.Menu=function(A){if(A instanceof Array){A={items:A}}Ext.apply(this,A);this.id=this.id||Ext.id();this.addEvents("beforeshow","beforehide","show","hide","click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);Ext.menu.Menu.superclass.constructor.call(this);var B=this.items;this.items=new Ext.util.MixedCollection();if(B){this.add.apply(this,B)}};Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15000})},render:function(){if(this.el){return }var B=this.el=this.createEl();this.keyNav=new Ext.menu.MenuNav(this);if(this.plain){B.addClass("x-menu-plain")}if(this.cls){B.addClass(this.cls)}this.focusEl=B.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});var A=B.createChild({tag:"ul",cls:"x-menu-list"});A.on("click",this.onClick,this);A.on("mouseover",this.onMouseOver,this);A.on("mouseout",this.onMouseOut,this);this.items.each(function(D){var C=document.createElement("li");C.className="x-menu-list-item";A.dom.appendChild(C);D.render(C,this)},this);this.ul=A;this.autoWidth()},autoWidth:function(){var D=this.el,C=this.ul;if(!D){return }var A=this.width;if(A){D.setWidth(A)}else{if(Ext.isIE){D.setWidth(this.minWidth);var B=D.dom.offsetWidth;D.setWidth(C.getWidth()+D.getFrameWidth("lr"))}}},delayAutoWidth:function(){if(this.el){if(!this.awTask){this.awTask=new Ext.util.DelayedTask(this.autoWidth,this)}this.awTask.delay(20)}},findTargetItem:function(B){var A=B.getTarget(".x-menu-list-item",this.ul,true);if(A&&A.menuItemId){return this.items.get(A.menuItemId)}},onClick:function(B){var A;if(A=this.findTargetItem(B)){A.onClick(B);this.fireEvent("click",this,A,B)}},setActiveItem:function(A,B){if(A!=this.activeItem){if(this.activeItem){this.activeItem.deactivate()}this.activeItem=A;A.activate(B)}else{if(B){A.expandMenu()}}},tryActivate:function(F,E){var B=this.items;for(var C=F,A=B.length;C>=0&&C0){H()}})}function H(){if(D&&D.length>0){var N=D.clone();N.each(function(O){O.hide()})}}function E(N){D.remove(N);if(D.length<1){Ext.getDoc().un("mousedown",L);A=false}}function J(N){var O=D.last();K=new Date();D.add(N);if(!A){Ext.getDoc().on("mousedown",L);A=true}if(N.parentMenu){N.getEl().setZIndex(parseInt(N.parentMenu.getEl().getStyle("z-index"),10)+3);N.parentMenu.activeChild=N}else{if(O&&O.isVisible()){N.getEl().setZIndex(parseInt(O.getEl().getStyle("z-index"),10)+3)}}}function B(N){if(N.activeChild){N.activeChild.hide()}if(N.autoHideTimer){clearTimeout(N.autoHideTimer);delete N.autoHideTimer}}function G(N){var O=N.parentMenu;if(!O&&!N.allowOtherMenus){H()}else{if(O&&O.activeChild){O.activeChild.hide()}}}function L(N){if(K.getElapsed()>50&&D.length>0&&!N.getTarget(".x-menu")){H()}}function I(O,R){if(R){var Q=C[O.group];for(var P=0,N=Q.length;P{1}",this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||"");this.el=C;Ext.menu.Item.superclass.onRender.call(this,B,A)},setText:function(A){this.text=A;if(this.rendered){this.el.update(String.format("{1}",this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||""));this.parentMenu.autoWidth()}},setIconClass:function(A){var B=this.iconCls;this.iconCls=A;if(this.rendered){this.el.child("img.x-menu-item-icon").replaceClass(B,this.iconCls)}},handleClick:function(A){if(!this.href){A.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(A){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(A){this.expandMenu()}}return true},shouldDeactivate:function(A){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,A)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(A.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(A){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[A])}else{if(this.menu.isVisible()&&A){this.menu.tryActivate(0,1)}}}},deferExpand:function(A){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(A){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;this.menu.hide()}}); +Ext.menu.CheckItem=function(A){Ext.menu.CheckItem.superclass.constructor.call(this,A);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)};Ext.extend(Ext.menu.CheckItem,Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",onRender:function(A){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(B,A){if(this.checked!=B&&this.fireEvent("beforecheckchange",this,B)!==false){if(this.container){this.container[B?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=B;if(A!==true){this.fireEvent("checkchange",this,B)}}},handleClick:function(A){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}}); +Ext.menu.Adapter=function(B,A){Ext.menu.Adapter.superclass.constructor.call(this,A);this.component=B};Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(B,A){this.component.render(B);this.el=this.component.getEl()},activate:function(){if(this.disabled){return false}this.component.focus();this.fireEvent("activate",this);return true},deactivate:function(){this.fireEvent("deactivate",this)},disable:function(){this.component.disable();Ext.menu.Adapter.superclass.disable.call(this)},enable:function(){this.component.enable();Ext.menu.Adapter.superclass.enable.call(this)}}); +Ext.menu.DateItem=function(A){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(A),A);this.picker=this.component;this.addEvents("select");this.picker.on("render",function(B){B.getEl().swallowEvent("click");B.container.addClass("x-menu-date-item")});this.picker.on("select",this.onSelect,this)};Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(B,A){this.fireEvent("select",this,A,B);Ext.menu.DateItem.superclass.handleClick.call(this)}}); +Ext.menu.ColorItem=function(A){Ext.menu.ColorItem.superclass.constructor.call(this,new Ext.ColorPalette(A),A);this.palette=this.component;this.relayEvents(this.palette,["select"]);if(this.selectHandler){this.on("select",this.selectHandler,this.scope)}};Ext.extend(Ext.menu.ColorItem,Ext.menu.Adapter); +Ext.menu.DateMenu=function(A){Ext.menu.DateMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.DateItem(A);this.add(B);this.picker=B.picker;this.relayEvents(B,["select"]);this.on("beforeshow",function(){if(this.picker){this.picker.hideMonthPicker(true)}},this)};Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu,{cls:"x-date-menu"}); +Ext.menu.ColorMenu=function(A){Ext.menu.ColorMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.ColorItem(A);this.add(B);this.palette=B.palette;this.relayEvents(B,["select"])};Ext.extend(Ext.menu.ColorMenu,Ext.menu.Menu); +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,isFormField:true,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.hiddenName||"")},onRender:function(C,A){Ext.form.Field.superclass.onRender.call(this,C,A);if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=this.name||this.id}if(this.inputType){B.type=this.inputType}this.el=C.createChild(B,A)}var D=this.el.dom.type;if(D){if(D=="password"){D="text"}this.el.addClass("x-form-"+D)}if(this.readOnly){this.el.dom.readOnly=true}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls]);this.initValue()},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(this.el.dom.value.length>0){this.setValue(this.el.dom.value)}}},isDirty:function(){if(this.disabled){return false}return String(this.getValue())!==String(this.originalValue)},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents()},fireKey:function(A){if(A.isSpecialKey()){this.fireEvent("specialkey",this,A)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.el.on(Ext.isIE?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);this.el.on("blur",this.onBlur,this);this.originalValue=this.getValue()},onFocus:function(){if(!Ext.isOpera&&this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(!Ext.isOpera&&this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate()}var A=this.getValue();if(String(A)!==String(this.startValue)){this.fireEvent("change",this,A,this.startValue)}this.fireEvent("blur",this)},isValid:function(A){if(this.disabled){return true}var C=this.preventMark;this.preventMark=A===true;var B=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=C;return B},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(A){return A},validateValue:function(A){return true},markInvalid:function(C){if(!this.rendered||this.preventMark){return }this.el.addClass(this.invalidClass);C=C||this.invalidText;switch(this.msgTarget){case"qtip":this.el.dom.qtip=C;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}break;case"title":this.el.dom.title=C;break;case"under":if(!this.errorEl){var B=this.el.findParent(".x-form-element",5,true);this.errorEl=B.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(B.getWidth(true)-20)}this.errorEl.update(C);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case"side":if(!this.errorIcon){var B=this.el.findParent(".x-form-element",5,true);this.errorIcon=B.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=C;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML=C;A.style.display=this.msgDisplay;break}this.fireEvent("invalid",this,C)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},clearInvalid:function(){if(!this.rendered||this.preventMark){return }this.el.removeClass(this.invalidClass);switch(this.msgTarget){case"qtip":this.el.dom.qtip="";break;case"title":this.el.dom.title="";break;case"under":if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)}break;case"side":if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML="";A.style.display="none";break}this.fireEvent("valid",this)},getRawValue:function(){var A=this.rendered?this.el.getValue():Ext.value(this.value,"");if(A===this.emptyText){A=""}return A},getValue:function(){if(!this.rendered){return this.value}var A=this.el.getValue();if(A===this.emptyText||A===undefined){A=""}return A},setRawValue:function(A){return this.el.dom.value=(A===null||A===undefined?"":A)},setValue:function(A){this.value=A;if(this.rendered){this.el.dom.value=(A===null||A===undefined?"":A);this.validate()}},adjustSize:function(A,C){var B=Ext.form.Field.superclass.adjustSize.call(this,A,C);B.width=this.adjustWidth(this.el.dom.tagName,B.width);return B},adjustWidth:function(A,B){A=A.toLowerCase();if(typeof B=="number"&&!Ext.isSafari){if(Ext.isIE&&(A=="input"||A=="textarea")){if(A=="input"&&!Ext.isStrict){return B-3}if(A=="input"&&Ext.isStrict){return B-(Ext.isIE6?4:1)}if(A="textarea"&&Ext.isStrict){return B-2}}else{if(Ext.isOpera&&Ext.isStrict){if(A=="input"){return B+2}if(A="textarea"){return B-2}}}}return B}});Ext.form.Field.msgFx={normal:{show:function(A,B){A.setDisplayed("block")},hide:function(A,B){A.setDisplayed(false).update("")}},slide:{show:function(A,B){A.slideIn("t",{stopFx:true})},hide:function(A,B){A.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(A,B){A.fixDisplay();A.alignTo(B.el,"tl-tr");A.slideIn("l",{stopFx:true})},hide:function(A,B){A.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field); +Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.el.on("keyup",this.filterValidation,this)}else{if(this.validationEvent!==false){this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);if(this.emptyText){this.on("blur",this.postBlur,this);this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.el.on("keypress",this.filterKeys,this)}if(this.grow){this.el.on("keyup",this.onKeyUp,this,{buffer:50});this.el.on("click",this.autoSize,this)}},processValue:function(A){if(this.stripCharsRe){var B=A.replace(this.stripCharsRe,"");if(B!==A){this.setRawValue(B);return B}}return A},filterValidation:function(A){if(!A.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onKeyUp:function(A){if(!A.isNavKeyPress()){this.autoSize()}},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue("")}this.el.removeClass(this.emptyClass)}if(this.selectOnFocus){this.el.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(B){var A=B.getKey();if(!Ext.isIE&&(B.isNavKeyPress()||A==B.BACKSPACE||(A==B.DELETE&&B.button==-1))){return }var D=B.getCharCode(),C=String.fromCharCode(D);if(Ext.isIE&&(B.isSpecialKey()||!C)){return }if(!this.maskRe.test(C)){B.stopEvent()}},setValue:function(A){if(this.emptyText&&this.el&&A!==undefined&&A!==null&&A!==""){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize()},validateValue:function(A){if(A.length<1||A===this.emptyText){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(A.lengththis.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false}if(this.vtype){var C=Ext.form.VTypes;if(!C[this.vtype](A,this)){this.markInvalid(this.vtypeText||C[this.vtype+"Text"]);return false}}if(typeof this.validator=="function"){var B=this.validator(A);if(B!==true){this.markInvalid(B);return false}}if(this.regex&&!this.regex.test(A)){this.markInvalid(this.regexText);return false}return true},selectText:function(E,A){var C=this.getRawValue();if(C.length>0){E=E===undefined?0:E;A=A===undefined?C.length:A;var D=this.el.dom;if(D.setSelectionRange){D.setSelectionRange(E,A)}else{if(D.createTextRange){var B=D.createTextRange();B.moveStart("character",E);B.moveEnd("character",C.length-A);B.select()}}}},autoSize:function(){if(!this.grow||!this.rendered){return }if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var C=this.el;var B=C.dom.value;var D=document.createElement("div");D.appendChild(document.createTextNode(B));B=D.innerHTML;D=null;B+=" ";var A=Math.min(this.growMax,Math.max(this.metrics.getWidth(B)+10,this.growMin));this.el.setWidth(A);this.fireEvent("autosize",this,A)}});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,autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,onResize:function(A,B){Ext.form.TriggerField.superclass.onResize.call(this,A,B);if(typeof A=="number"){this.el.setWidth(this.adjustWidth("input",A-this.trigger.getWidth()))}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])},onRender:function(B,A){Ext.form.TriggerField.superclass.onRender.call(this,B,A);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(this.hideTrigger){this.trigger.setDisplayed(false)}this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}},initTrigger:function(){this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();this.trigger.remove()}if(this.wrap){this.wrap.remove()}Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass("x-trigger-wrap-focus");this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.el.on("keydown",this.checkTab,this)}}},checkTab:function(A){if(A.getKey()==A.TAB){this.triggerBlur()}},onBlur:function(){},mimicBlur:function(A){if(!this.wrap.contains(A.target)&&this.validateBlur(A)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur);if(this.monitorTab){this.el.un("keydown",this.checkTab,this)}this.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");Ext.form.TriggerField.superclass.onBlur.call(this)},beforeBlur:Ext.emptyFn,validateBlur:function(A){return true},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass("x-item-disabled")}},onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap){this.wrap.removeClass("x-item-disabled")}},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(A){return this.triggers[A]},initTrigger:function(){var A=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow","hidden");var B=this;A.each(function(D,F,C){D.hide=function(){var G=B.wrap.getWidth();this.dom.style.display="none";B.el.setWidth(G-B.trigger.getWidth())};D.show=function(){var G=B.wrap.getWidth();this.dom.style.display="";B.el.setWidth(G-B.trigger.getWidth())};var E="Trigger"+(C+1);if(this["hide"+E]){D.dom.style.display="none"}D.on("click",this["on"+E+"Click"],this,{preventDefault:true});D.addClassOnOver("x-form-trigger-over");D.addClassOnClick("x-form-trigger-click")},this);this.triggers=A.elements},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField); +Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1000,growAppend:" \n ",growPad:0,enterIsSpecial:false,preventScrollbars:false,onRender:function(B,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"}}Ext.form.TextArea.superclass.onRender.call(this,B,A);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars){this.el.setStyle("overflow","hidden")}this.el.setHeight(this.growMin)}},onDestroy:function(){if(this.textSizeEl){Ext.removeNode(this.textSizeEl)}Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(A){if(A.isSpecialKey()&&(this.enterIsSpecial||(A.getKey()!=A.ENTER||A.hasModifier()))){this.fireEvent("specialkey",this,A)}},onKeyUp:function(A){if(!A.isNavKeyPress()||A.getKey()==A.ENTER){this.autoSize()}},autoSize:function(){if(!this.grow||!this.textSizeEl){return }var C=this.el;var A=C.dom.value;var D=this.textSizeEl;D.innerHTML="";D.appendChild(document.createTextNode(A));A=D.innerHTML;Ext.fly(D).setWidth(this.el.getWidth());if(A.length<1){A="  "}else{if(Ext.isIE){A=A.replace(/\n/g,"

       

      ")}A+=this.growAppend}D.innerHTML=A;var B=Math.min(this.growMax,Math.max(D.offsetHeight,this.growMin)+this.growPad);if(B!=this.lastHeight){this.lastHeight=B;this.el.setHeight(B);this.fireEvent("autosize",this,B)}}});Ext.reg("textarea",Ext.form.TextArea); +Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);var B=this.baseChars+"";if(this.allowDecimals){B+=this.decimalSeparator}if(this.allowNegative){B+="-"}this.stripCharsRe=new RegExp("[^"+B+"]","gi");var A=function(D){var C=D.getKey();if(!Ext.isIE&&(D.isSpecialKey()||C==D.BACKSPACE||C==D.DELETE)){return }var E=D.getCharCode();if(B.indexOf(String.fromCharCode(E))===-1){D.stopEvent()}};this.el.on("keypress",A,this)},validateValue:function(B){if(!Ext.form.NumberField.superclass.validateValue.call(this,B)){return false}if(B.length<1){return true}B=String(B).replace(this.decimalSeparator,".");if(isNaN(B)){this.markInvalid(String.format(this.nanText,B));return false}var A=this.parseValue(B);if(Athis.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));return false}return true},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(A){Ext.form.NumberField.superclass.setValue.call(this,String(parseFloat(A)).replace(".",this.decimalSeparator))},parseValue:function(A){A=parseFloat(String(A).replace(this.decimalSeparator,"."));return isNaN(A)?"":A},fixPrecision:function(B){var A=isNaN(B);if(!this.allowDecimals||this.decimalPrecision==-1||A||!B){return A?"":B}return parseFloat(parseFloat(B).toFixed(this.decimalPrecision))},beforeBlur:function(){var A=this.parseValue(this.getRawValue());if(A){this.setValue(this.fixPrecision(A))}}});Ext.reg("numberfield",Ext.form.NumberField); +Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDays:null,disabledDaysText:"Disabled",disabledDates:null,disabledDatesText:"Disabled",minValue:null,maxValue:null,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",defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}this.ddMatch=null;if(this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;Bthis.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var A=E.getDay();for(var B=0;B
      {"+this.displayField+"}
      "}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+A+"-item"});this.view.on("click",this.onViewClick,this);this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.resizer.on("resize",function(E,C,D){this.maxHeight=D-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=C;this.innerList.setWidth(C-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},bindStore:function(A,B){if(this.store&&!B){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.collapse,this);if(!A){this.store=null;if(this.view){this.view.setStore(null)}}}if(A){this.store=Ext.StoreMgr.lookup(A);this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.collapse,this);if(this.view){this.view.setStore(A)}}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{"up":function(A){this.inKeyMode=true;this.selectPrev()},"down":function(A){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},"enter":function(A){this.onViewClick()},"esc":function(A){this.collapse()},"tab":function(A){this.onViewClick(false);return true},scope:this,doRelay:function(C,B,A){if(A=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments)}return true},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this)}if(this.forceSelection){this.on("blur",this.doForce,this)}},onDestroy:function(){if(this.view){this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners()}if(this.list){this.list.destroy()}this.bindStore(null);Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(A){if(A.isNavKeyPress()&&!this.list.isVisible()){this.fireEvent("specialkey",this,A)}},onResize:function(A,B){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&this.listWidth===undefined){var C=Math.max(A,this.minListWidth);this.list.setWidth(C);this.innerList.setWidth(C-this.list.getFrameWidth("lr"))}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=this.disabled}},setEditable:function(A){if(A==this.editable){return }this.editable=A;if(!A){this.el.dom.setAttribute("readOnly",true);this.el.on("mousedown",this.onTriggerClick,this);this.el.addClass("x-combo-noedit")}else{this.el.dom.setAttribute("readOnly",false);this.el.un("mousedown",this.onTriggerClick,this);this.el.removeClass("x-combo-noedit")}},onBeforeLoad:function(){if(!this.hasFocus){return }this.innerList.update(this.loadingText?"
      "+this.loadingText+"
      ":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return }if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(!this.selectByValue(this.value,true)){this.select(0,true)}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.onEmptyResults()}},onTypeAhead:function(){if(this.store.getCount()>0){var B=this.store.getAt(0);var C=B.data[this.displayField];var A=C.length;var D=this.getRawValue().length;if(D!=A){this.setRawValue(C);this.selectText(D,C.length)}}},onSelect:function(A,B){if(this.fireEvent("beforeselect",this,A,B)!==false){this.setValue(A.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,A,B)}},getValue:function(){if(this.valueField){return typeof this.value!="undefined"?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText()},setValue:function(A){var C=A;if(this.valueField){var B=this.findRecord(this.valueField,A);if(B){C=B.data[this.displayField]}else{if(this.valueNotFoundText!==undefined){C=this.valueNotFoundText}}}this.lastSelectionText=C;if(this.hiddenField){this.hiddenField.value=A}Ext.form.ComboBox.superclass.setValue.call(this,C);this.value=A},findRecord:function(C,B){var A;if(this.store.getCount()>0){this.store.each(function(D){if(D.data[C]==B){A=D;return false}})}return A},onViewMove:function(B,A){this.inKeyMode=false},onViewOver:function(D,B){if(this.inKeyMode){return }var C=this.view.findItemFromChild(B);if(C){var A=this.view.indexOf(C);this.select(A,false)}},onViewClick:function(B){var A=this.view.getSelectedIndexes()[0];var C=this.store.getAt(A);if(C){this.onSelect(C,A)}if(B!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var A=this.innerList.dom;var C=this.list.getFrameWidth("tb");var B=Math.max(A.clientHeight,A.offsetHeight,A.scrollHeight);this.innerList.setHeight(B0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!=0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(A){if(this.editable!==false&&!A.isSpecialKey()){this.lastKey=A.getKey();this.dqTask.delay(this.queryDelay)}},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===undefined?"":this.lastSelectionText;this.applyEmptyText()}},doQuery:function(C,B){if(C===undefined||C===null){C=""}var A={query:C,forceAll:B,combo:this,cancel:false};if(this.fireEvent("beforequery",A)===false||A.cancel){return false}C=A.query;B=A.forceAll;if(B===true||(C.length>=this.minChars)){if(this.lastQuery!==C){this.lastQuery=C;if(this.mode=="local"){this.selectedIndex=-1;if(B){this.store.clearFilter()}else{this.store.filter(this.displayField,C)}this.onLoad()}else{this.store.baseParams[this.queryParam]=C;this.store.load({params:this.getParams(C)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(A){var B={};if(this.pageSize){B.start=0;B.limit=this.pageSize}return B},collapse:function(){if(!this.isExpanded()){return }this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(A){if(!A.within(this.wrap)&&!A.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return }this.list.alignTo(this.wrap,this.listAlign);this.list.show();Ext.getDoc().on("mousewheel",this.collapseIf,this);Ext.getDoc().on("mousedown",this.collapseIf,this);this.fireEvent("expand",this)},onTriggerClick:function(){if(this.disabled){return }if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox); +Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},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.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.el.on("click",this.onClick,this);this.el.on("change",this.onClick,this)},getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(B,A){Ext.form.Checkbox.superclass.onRender.call(this,B,A);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}},onDestroy:function(){if(this.wrap){this.wrap.remove()}Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:Ext.emptyFn,getValue:function(){if(this.rendered){return this.el.dom.checked}return false},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(A){this.checked=(A===true||A==="true"||A=="1"||String(A).toLowerCase()=="on");if(this.el&&this.el.dom){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}this.fireEvent("check",this,this.checked)}});Ext.reg("checkbox",Ext.form.Checkbox); +Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){return this.el.up("form").child("input[name="+this.el.dom.name+"]:checked",true).value}});Ext.reg("radio",Ext.form.Radio); +Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden); +Ext.form.BasicForm=function(B,A){Ext.apply(this,A);this.items=new Ext.util.MixedCollection(false,function(C){return C.id||(C.id=Ext.id())});this.addEvents("beforeaction","actionfailed","actioncomplete");if(B){this.initEl(B)}Ext.form.BasicForm.superclass.constructor.call(this)};Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,activeAction:null,trackResetOnLoad:false,initEl:function(A){this.el=Ext.get(A);this.id=this.el.id||Ext.id();this.el.on("submit",this.onSubmit,this);this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(A){A.stopEvent()},destroy:function(){this.items.each(function(A){Ext.destroy(A)});this.el.removeAllListeners();this.el.remove();this.purgeListeners()},isValid:function(){var A=true;this.items.each(function(B){if(!B.validate()){A=false}});return A},isDirty:function(){var A=false;this.items.each(function(B){if(B.isDirty()){A=true;return false}});return A},doAction:function(B,A){if(typeof B=="string"){B=new Ext.form.Action.ACTION_TYPES[B](this,A)}if(this.fireEvent("beforeaction",this,B)!==false){this.beforeAction(B);B.run.defer(100,B)}return this},submit:function(A){this.doAction("submit",A);return this},load:function(A){this.doAction("load",A);return this},updateRecord:function(B){B.beginEdit();var A=B.fields;A.each(function(C){var D=this.findField(C.name);if(D){B.set(C.name,D.getValue())}},this);B.endEdit();return this},loadRecord:function(A){this.setValues(A.data);return this},beforeAction:function(A){var B=A.options;if(B.waitMsg){if(this.waitMsgTarget===true){this.el.mask(B.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(B.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(B.waitMsg,B.waitTitle||this.waitTitle||"Please Wait...")}}}},afterAction:function(A,C){this.activeAction=null;var B=A.options;if(B.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(C){if(B.reset){this.reset()}Ext.callback(B.success,B.scope,[this,A]);this.fireEvent("actioncomplete",this,A)}else{Ext.callback(B.failure,B.scope,[this,A]);this.fireEvent("actionfailed",this,A)}},findField:function(B){var A=this.items.get(B);if(!A){this.items.each(function(C){if(C.isFormField&&(C.dataIndex==B||C.id==B||C.getName()==B)){A=C;return false}})}return A||null},markInvalid:function(G){if(G instanceof Array){for(var C=0,A=G.length;C":">"),C,"")}return D.join("")},createToolbar:function(C){function B(F,D,E){return{itemId:F,cls:"x-btn-icon x-edit-"+F,enableToggle:D!==false,scope:C,handler:E||C.relayBtnCmd,clickEvent:"mousedown",tooltip:C.buttonTips[F]||undefined,tabIndex:-1}}var A=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});A.el.on("click",function(D){D.preventDefault()});if(this.enableFont&&!Ext.isSafari){this.fontSelect=A.el.createChild({tag:"select",cls:"x-font-select",html:this.createFontOptions()});this.fontSelect.on("change",function(){var D=this.fontSelect.dom.value;this.relayCmd("fontname",D);this.deferFocus()},this);A.add(this.fontSelect.dom,"-")}if(this.enableFormat){A.add(B("bold"),B("italic"),B("underline"))}if(this.enableFontSize){A.add("-",B("increasefontsize",false,this.adjustFont),B("decreasefontsize",false,this.adjustFont))}if(this.enableColors){A.add("-",{itemId:"forecolor",cls:"x-btn-icon x-edit-forecolor",clickEvent:"mousedown",tooltip:C.buttonTips["forecolor"]||undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,selectHandler:function(E,D){this.execCmd("forecolor",Ext.isSafari||Ext.isIE?"#"+D:D);this.deferFocus()},scope:this,clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon x-edit-backcolor",clickEvent:"mousedown",tooltip:C.buttonTips["backcolor"]||undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,selectHandler:function(E,D){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",D);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isSafari||Ext.isIE?"#"+D:D);this.deferFocus()}},scope:this,clickEvent:"mousedown"})})}if(this.enableAlignments){A.add("-",B("justifyleft"),B("justifycenter"),B("justifyright"))}if(!Ext.isSafari){if(this.enableLinks){A.add("-",B("createlink",false,this.createLink))}if(this.enableLists){A.add("-",B("insertorderedlist"),B("insertunorderedlist"))}if(this.enableSourceEdit){A.add("-",B("sourceedit",true,function(D){this.toggleSourceEdit(D.pressed)}))}}this.tb=A},getDocMarkup:function(){return""},getEditorBody:function(){return this.doc.body||this.doc.documentElement},onRender:function(C,A){Ext.form.HtmlEditor.superclass.onRender.call(this,C,A);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.tb.items.each(function(E){if(E.itemId!="sourceedit"){E.disable()}});var D=document.createElement("iframe");D.name=Ext.id();D.frameBorder="no";D.src=(Ext.SSL_SECURE_URL||"javascript:false");this.wrap.dom.appendChild(D);this.iframe=D;if(Ext.isIE){D.contentWindow.document.designMode="on";this.doc=D.contentWindow.document;this.win=D.contentWindow}else{this.doc=(D.contentDocument||window.frames[D.name].document);this.win=window.frames[D.name];this.doc.designMode="on"}this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var B={run:function(){if(this.doc.body||this.doc.readyState=="complete"){Ext.TaskMgr.stop(B);this.doc.designMode="on";this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(B);if(!this.width){this.setSize(this.el.getSize())}},onResize:function(B,C){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(typeof B=="number"){var D=B-this.wrap.getFrameWidth("lr");this.el.setWidth(this.adjustWidth("textarea",D));this.iframe.style.width=D+"px"}if(typeof C=="number"){var A=C-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(this.adjustWidth("textarea",A));this.iframe.style.height=A+"px";if(this.doc){this.getEditorBody().style.height=(A-(this.iframePad*2))+"px"}}}},toggleSourceEdit:function(A){if(A===undefined){A=!this.sourceEditMode}this.sourceEditMode=A===true;var C=this.tb.items.get("sourceedit");if(C.pressed!==this.sourceEditMode){C.toggle(this.sourceEditMode);return }if(this.sourceEditMode){this.tb.items.each(function(D){if(D.itemId!="sourceedit"){D.disable()}});this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus()}else{if(this.initialized){this.tb.items.each(function(D){D.enable()})}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus()}var B=this.lastSize;if(B){delete this.lastSize;this.setSize(B)}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var A=prompt(this.createLinkText,this.defaultLinkValue);if(A&&A!="http:/"+"/"){this.relayCmd("createlink",A)}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(A){Ext.form.HtmlEditor.superclass.setValue.call(this,A);this.pushValue()},cleanHtml:function(A){A=String(A);if(A.length>5){if(Ext.isSafari){A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}}if(A==" "){A=""}return A},syncValue:function(){if(this.initialized){var D=this.getEditorBody();var C=D.innerHTML;if(Ext.isSafari){var B=D.getAttribute("style");var A=B.match(/text-align:(.*?);/i);if(A&&A[1]){C="
      "+C+"
      "}}C=this.cleanHtml(C);if(this.fireEvent("beforesync",this,C)!==false){this.el.dom.value=C;this.fireEvent("sync",this,C)}}},pushValue:function(){if(this.initialized){var A=this.el.dom.value;if(!this.activated&&A.length<1){A=" "}if(this.fireEvent("beforepush",this,A)!==false){this.getEditorBody().innerHTML=A;this.fireEvent("push",this,A)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){var B=this.getEditorBody();var A=this.el.getStyles("font-size","font-family","background-image","background-repeat");A["background-attachment"]="fixed";B.bgProperties="fixed";Ext.DomHelper.applyStyles(B,A);Ext.EventManager.on(this.doc,{"mousedown":this.onEditorEvent,"dblclick":this.onEditorEvent,"click":this.onEditorEvent,"keyup":this.onEditorEvent,buffer:100,scope:this});if(Ext.isGecko){Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isSafari||Ext.isOpera){Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this)}this.initialized=true;this.fireEvent("initialize",this);this.pushValue()},onDestroy:function(){if(this.rendered){this.tb.items.each(function(A){if(A.menu){A.menu.removeAll();if(A.menu.el){A.menu.el.destroy()}}A.destroy()});this.wrap.dom.innerHTML="";this.wrap.remove()}},onFirstFocus:function(){this.activated=true;this.tb.items.each(function(D){D.enable()});if(Ext.isGecko){this.win.focus();var A=this.win.getSelection();if(!A.focusNode||A.focusNode.nodeType!=3){var B=A.getRangeAt(0);B.selectNodeContents(this.getEditorBody());B.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(C){}}this.fireEvent("activate",this)},adjustFont:function(B){var C=B.itemId=="increasefontsize"?1:-1;if(Ext.isSafari){C*=2}var A=parseInt(this.doc.queryCommandValue("FontSize")||3,10);A=Math.max(1,A+C);this.execCmd("FontSize",A+(Ext.isSafari?"px":0))},onEditorEvent:function(A){this.updateToolbar()},updateToolbar:function(){if(!this.activated){this.onFirstFocus();return }var B=this.tb.items.map,C=this.doc;if(this.enableFont&&!Ext.isSafari){var A=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(A!=this.fontSelect.dom.value){this.fontSelect.dom.value=A}}if(this.enableFormat){B.bold.toggle(C.queryCommandState("bold"));B.italic.toggle(C.queryCommandState("italic"));B.underline.toggle(C.queryCommandState("underline"))}if(this.enableAlignments){B.justifyleft.toggle(C.queryCommandState("justifyleft"));B.justifycenter.toggle(C.queryCommandState("justifycenter"));B.justifyright.toggle(C.queryCommandState("justifyright"))}if(!Ext.isSafari&&this.enableLists){B.insertorderedlist.toggle(C.queryCommandState("insertorderedlist"));B.insertunorderedlist.toggle(C.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(A){this.relayCmd(A.itemId)},relayCmd:function(B,A){this.win.focus();this.execCmd(B,A);this.updateToolbar();this.deferFocus()},execCmd:function(B,A){this.doc.execCommand(B,false,A===undefined?null:A);this.syncValue()},applyCommand:function(B){if(B.ctrlKey){var C=B.getCharCode(),A;if(C>0){C=String.fromCharCode(C);switch(C){case"b":A="bold";break;case"i":A="italic";break;case"u":A="underline";break}if(A){this.win.focus();this.execCmd(A);this.deferFocus();B.preventDefault()}}}},insertAtCursor:function(B){if(!this.activated){return }if(Ext.isIE){this.win.focus();var A=this.doc.selection.createRange();if(A){A.collapse(true);A.pasteHTML(B);this.syncValue();this.deferFocus()}}else{if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",B);this.deferFocus()}else{if(Ext.isSafari){this.execCmd("InsertText",B);this.deferFocus()}}}},fixKeys:function(){if(Ext.isIE){return function(D){var A=D.getKey(),B;if(A==D.TAB){D.stopEvent();B=this.doc.selection.createRange();if(B){B.collapse(true);B.pasteHTML("    ");this.deferFocus()}}else{if(A==D.ENTER){B=this.doc.selection.createRange();if(B){var C=B.parentElement();if(!C||C.tagName.toLowerCase()!="li"){D.stopEvent();B.pasteHTML("
      ");B.collapse(false);B.select()}}}}}}else{if(Ext.isOpera){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.win.focus();this.execCmd("InsertHTML","    ");this.deferFocus()}}}else{if(Ext.isSafari){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor); +Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:null,maxValue:null,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",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initComponent:function(){Ext.form.TimeField.superclass.initComponent.call(this);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}if(!this.store){var B=this.parseDate(this.minValue);if(!B){B=new Date().clearTime()}var A=this.parseDate(this.maxValue);if(!A){A=new Date().clearTime().add("mi",(24*60)-1)}var C=[];while(B<=A){C.push([B.dateFormat(this.format)]);B=B.add("mi",this.increment)}this.store=new Ext.data.SimpleStore({fields:["text"],data:C});this.displayField="text"}},getValue:function(){var A=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(A))||""},setValue:function(A){Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)))},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var A=this.parseDate(this.getRawValue());if(A){this.setValue(A.dateFormat(this.format))}}});Ext.reg("timefield",Ext.form.TimeField); +Ext.form.Action=function(B,A){this.form=B;this.options=A||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(A){},success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(A){this.response=A;if(!A.responseText){return true}this.result=this.handleResponse(A);return this.result},getUrl:function(C){var A=this.options.url||this.form.url||this.form.el.dom.action;if(C){var B=this.getParams();if(B){A+=(A.indexOf("?")!=-1?"&":"?")+B}}return A},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var A=this.form.baseParams;var B=this.options.params;if(B){if(typeof B=="object"){B=Ext.urlEncode(Ext.applyIf(B,A))}else{if(typeof B=="string"&&A){B+="&"+Ext.urlEncode(A)}}}else{if(A){B=Ext.urlEncode(A)}}return B},createCallback:function(A){var A=A||{};return{success:this.success,failure:this.failure,scope:this,timeout:(A.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(B,A){Ext.form.Action.Submit.superclass.constructor.call(this,B,A)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var B=this.options;var C=this.getMethod();var A=C=="POST";if(B.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(B),{form:this.form.el.dom,url:this.getUrl(!A),method:C,params:A?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(B.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(B){var A=this.processResponse(B);if(A===true||A.success){this.form.afterAction(this,true);return }if(A.errors){this.form.markInvalid(A.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(C){if(this.form.errorReader){var B=this.form.errorReader.read(C);var F=[];if(B.records){for(var D=0,A=B.records.length;D=0){if(!D){C=F-1}D=false;while(C>=0){if(E.call(I||this,J,C,H)===true){return[J,C]}C--}J--}}else{if(C>=F){J++;D=false}while(J","
      ","
      {header}
      ","
      {body}
      ","
      ","
       
      ","
       
      ","")}if(!C.header){C.header=new Ext.Template("","{cells}","
      ")}if(!C.hcell){C.hcell=new Ext.Template("
      ",this.grid.enableHdMenu?"":"","{value}","
      ")}if(!C.body){C.body=new Ext.Template("{rows}")}if(!C.row){C.row=new Ext.Template("
      ","{cells}",(this.enableRowBody?"":""),"
      {body}
      ")}if(!C.cell){C.cell=new Ext.Template("","
      {value}
      ","")}for(var A in C){var B=C[A];if(B&&typeof B.compile=="function"&&!B.compiled){B.disableFormats=true;B.compile()}}this.templates=C;this.tdClass="x-grid3-cell";this.cellSelector="td.x-grid3-cell";this.hdCls="x-grid3-hd";this.rowSelector="div.x-grid3-row";this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(A){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=A;return this._flyweight},getEditorParent:function(A){return this.scroller.dom},initElements:function(){var C=Ext.Element;var B=this.grid.getGridEl().dom.firstChild;var A=B.childNodes;this.el=new C(B);this.mainWrap=new C(A[0]);this.mainHd=new C(this.mainWrap.dom.firstChild);this.innerHd=this.mainHd.dom.firstChild;this.scroller=new C(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new C(this.scroller.dom.firstChild);this.focusEl=new C(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new C(A[1]);this.resizeProxy=new C(A[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(A){if(!A){return false}return this.fly(A).findParent(this.cellSelector,3)},findCellIndex:function(C,B){var A=this.findCell(C);if(A&&(!B||this.fly(A).hasClass(B))){return this.getCellIndex(A)}return false},getCellIndex:function(B){if(B){var A=B.className.match(this.colRe);if(A&&A[1]){return this.cm.getIndexById(A[1])}}return false},findHeaderCell:function(B){var A=this.findCell(B);return A&&this.fly(A).hasClass(this.hdCls)?A:null},findHeaderIndex:function(A){return this.findCellIndex(A,this.hdCls)},findRow:function(A){if(!A){return false}return this.fly(A).findParent(this.rowSelector,10)},findRowIndex:function(A){var B=this.findRow(A);return B?B.rowIndex:false},getRow:function(A){return this.getRows()[A]},getCell:function(B,A){return this.getRow(B).getElementsByTagName("td")[A]},getHeaderCell:function(A){return this.mainHd.dom.getElementsByTagName("td")[A]},addRowClass:function(C,A){var B=this.getRow(C);if(B){this.fly(B).addClass(A)}},removeRowClass:function(C,A){var B=this.getRow(C);if(B){this.fly(B).removeClass(A)}},removeRow:function(A){Ext.removeNode(this.getRow(A))},removeRows:function(C,A){var B=this.mainBody.dom;for(var D=C;D<=A;D++){Ext.removeNode(B.childNodes[C])}},getScrollState:function(){var A=this.scroller.dom;return{left:A.scrollLeft,top:A.scrollTop}},restoreScroll:function(A){var B=this.scroller.dom;B.scrollLeft=A.left;B.scrollTop=A.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=0},syncScroll:function(){var A=this.scroller.dom;this.innerHd.scrollLeft=A.scrollLeft;this.innerHd.scrollLeft=A.scrollLeft;this.grid.fireEvent("bodyscroll",A.scrollLeft,A.scrollTop)},updateSortIcon:function(B,A){var D=this.sortClasses;var C=this.mainHd.select("td").removeClass(D);C.item(B).addClass(D[A=="DESC"?1:0])},updateAllColumnWidths:function(){var D=this.getTotalWidth();var H=this.cm.getColumnCount();var F=[];for(var B=0;B=this.ds.getCount()){return }E=(E!==undefined?E:0);var I=this.getRow(P),F;if(!(D===false&&E===0)){while(this.cm.isHidden(E)){E++}F=this.getCell(P,E)}if(!I){return }var L=this.scroller.dom;var O=0;var C=I,M=this.el.dom;while(C&&C!=M){O+=C.offsetTop;C=C.offsetParent}O-=this.mainHd.dom.offsetHeight;var N=O+I.offsetHeight;var A=L.clientHeight;var M=parseInt(L.scrollTop,10);var K=M+A;if(OK){L.scrollTop=N-A}}if(D!==false){var J=parseInt(F.offsetLeft,10);var H=J+F.offsetWidth;var G=parseInt(L.scrollLeft,10);var B=G+L.clientWidth;if(JB){L.scrollLeft=H-L.clientWidth}}}return F||I},insertRows:function(A,F,C,E){if(F===0&&C==A.getCount()-1){this.refresh()}else{if(!E){this.fireEvent("beforerowsinserted",this,F,C)}var B=this.renderRows(F,C);var D=this.getRow(F);if(D){Ext.DomHelper.insertHtml("beforeBegin",D,B)}else{Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,B)}if(!E){this.fireEvent("rowsinserted",this,F,C);this.processRows(F)}}},deleteRows:function(A,C,B){if(A.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,C,B);this.removeRows(C,B);this.processRows(C);this.fireEvent("rowsdeleted",this,C,B)}},getColumnStyle:function(A,C){var B=!C?(this.cm.config[A].css||""):"";B+="width:"+this.getColumnWidth(A)+";";if(this.cm.isHidden(A)){B+="display:none;"}var D=this.cm.config[A].align;if(D){B+="text-align:"+D+";"}return B},getColumnWidth:function(B){var A=this.cm.getColumnWidth(B);if(typeof A=="number"){return(Ext.isBorderBox?A:(A-this.borderWidth>0?A-this.borderWidth:0))+"px"}return A},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(D,G,E){var F=this.cm,S,L,O;var R=F.getTotalWidth(false);var J=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(J<20){return }var B=J-R;if(B===0){return false}var A=F.getColumnCount(true);var P=A-(typeof E=="number"?1:0);if(P===0){P=1;E=undefined}var K=F.getColumnCount();var I=[];var N=0;var M=0;var H;for(O=0;OJ){var Q=P!=A?E:N;F.setColumnWidth(Q,Math.max(1,F.getColumnWidth(Q)-(R-J)),true)}if(D!==true){this.updateAllColumnWidths()}return true},autoExpand:function(B){var G=this.grid,A=this.cm;if(!this.userResized&&G.autoExpandColumn){var D=A.getTotalWidth(false);var H=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(D!=H){var F=A.getIndexById(G.autoExpandColumn);var E=A.getColumnWidth(F);var C=Math.min(Math.max(((H-D)+E),G.autoExpandMin),G.autoExpandMax);if(C!=E){A.setColumnWidth(F,C,true);if(B!==true){this.updateColumnWidth(F,C)}}}}},getColumnData:function(){var D=[],A=this.cm,E=A.getColumnCount();for(var C=0;C"+this.emptyText+"")}},updateHeaderSortState:function(){var B=this.ds.getSortState();if(!B){return }if(!this.sortState||(this.sortState.field!=B.field||this.sortState.direction!=B.direction)){this.grid.fireEvent("sortchange",this.grid,B)}this.sortState=B;var C=this.cm.findColumnIndex(B.field);if(C!=-1){var A=B.direction;this.updateSortIcon(C,A)}},destroy:function(){if(this.colMenu){this.colMenu.removeAll();Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.getEl().remove();delete this.colMenu}if(this.hmenu){this.hmenu.removeAll();Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.getEl().remove();delete this.hmenu}if(this.grid.enableColumnMove){var C=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(C){for(var A in C){if(!C[A].config.isTarget&&C[A].dragElId){var B=C[A].dragElId;C[A].unreg();Ext.get(B).remove()}else{if(C[A].config.isTarget){C[A].proxyTop.remove();C[A].proxyBottom.remove();C[A].unreg()}}if(Ext.dd.DDM.locationCache[A]){delete Ext.dd.DDM.locationCache[A]}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id]}}Ext.destroy(this.resizeMarker,this.resizeProxy);this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this)},onDenyColumnHide:function(){},render:function(){var A=this.cm;var B=A.getColumnCount();if(this.grid.monitorWindowResize===true){Ext.EventManager.onWindowResize(this.onWindowResize,this,true)}if(this.autoFill){this.fitColumns(true,true)}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.renderUI()},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return }this.layout()},initData:function(B,A){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this)}if(B){B.on("load",this.onLoad,this);B.on("datachanged",this.onDataChange,this);B.on("add",this.onAdd,this);B.on("remove",this.onRemove,this);B.on("update",this.onUpdate,this);B.on("clear",this.onClear,this)}this.ds=B;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this);this.cm.un("columnlockchange",this.onColumnLock,this)}if(A){A.on("configchange",this.onColConfigChange,this);A.on("widthchange",this.onColWidthChange,this);A.on("headerchange",this.onHeaderChange,this);A.on("hiddenchange",this.onHiddenChange,this);A.on("columnmoved",this.onColumnMove,this);A.on("columnlockchange",this.onColumnLock,this)}this.cm=A},onDataChange:function(){this.refresh();this.updateHeaderSortState()},onClear:function(){this.refresh()},onUpdate:function(B,A){this.refreshRow(A)},onAdd:function(C,A,B){this.insertRows(C,B,B+(A.length-1))},onRemove:function(D,A,B,C){if(C!==true){this.fireEvent("beforerowremoved",this,B,A)}this.removeRow(B);if(C!==true){this.processRows(B);this.applyEmptyText();this.fireEvent("rowremoved",this,B,A)}},onLoad:function(){this.scrollToTop()},onColWidthChange:function(A,B,C){this.updateColumnWidth(B,C)},onHeaderChange:function(A,B,C){this.updateHeaders()},onHiddenChange:function(A,B,C){this.updateColumnHidden(B,C)},onColumnMove:function(A,D,B){this.indexMap=null;var C=this.getScrollState();this.refresh(true);this.restoreScroll(C);this.afterMove(B)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(A){A.on("headerclick",this.onHeaderClick,this);if(A.trackMouseOver){A.on("mouseover",this.onRowOver,this);A.on("mouseout",this.onRowOut,this)}},initEvents:function(){},onHeaderClick:function(B,A){if(this.headersDisabled||!this.cm.isSortable(A)){return }B.stopEditing();B.store.sort(this.cm.getDataIndex(A))},onRowOver:function(B,A){var C;if((C=this.findRowIndex(A))!==false){this.addRowClass(C,"x-grid3-row-over")}},onRowOut:function(B,A){var C;if((C=this.findRowIndex(A))!==false&&C!==this.findRowIndex(B.getRelatedTarget())){this.removeRowClass(C,"x-grid3-row-over")}},handleWheel:function(A){A.stopPropagation()},onRowSelect:function(A){this.addRowClass(A,"x-grid3-row-selected")},onRowDeselect:function(A){this.removeRowClass(A,"x-grid3-row-selected")},onCellSelect:function(C,B){var A=this.getCell(C,B);if(A){this.fly(A).addClass("x-grid3-cell-selected")}},onCellDeselect:function(C,B){var A=this.getCell(C,B);if(A){this.fly(A).removeClass("x-grid3-cell-selected")}},onColumnSplitterMoved:function(C,B){this.userResized=true;var A=this.grid.colModel;A.setColumnWidth(C,B,true);if(this.forceFit){this.fitColumns(true,false,C);this.updateAllColumnWidths()}else{this.updateColumnWidth(C,B)}this.grid.fireEvent("columnresize",C,B)},handleHdMenuClick:function(C){var B=this.hdCtxIndex;var A=this.cm,D=this.ds;switch(C.id){case"asc":D.sort(A.getDataIndex(B),"ASC");break;case"desc":D.sort(A.getDataIndex(B),"DESC");break;default:B=A.getIndexById(C.id.substr(4));if(B!=-1){if(C.checked&&A.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}A.setHidden(B,C.checked)}}return true},isHideableColumn:function(A){return !A.hidden&&!A.fixed},beforeColMenuShow:function(){var A=this.cm,C=A.getColumnCount();this.colMenu.removeAll();for(var B=0;B","
      ",this.groupTextTpl,"
      ","
      ")}this.startGroup.compile();this.endGroup="
      "},findGroup:function(A){return Ext.fly(A).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(){if(this.enableGrouping&&!this.ignoreAdd){var A=this.getScrollState();this.refresh();this.restoreScroll(A)}else{if(!this.enableGrouping){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(E,A,B,D){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var C=document.getElementById(A._groupId);if(C&&C.childNodes[1].childNodes.length<1){Ext.removeNode(C)}this.applyEmptyText()},refreshRow:function(A){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var C=this.getGroupField();var B=this.hmenu.items.get("groupBy");if(B){B.setDisabled(this.cm.config[this.hdCtxIndex].groupable===false)}var A=this.hmenu.items.get("showGroups");if(A){A.setChecked(!!C)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{id:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({id:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},onGroupByClick:function(){this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex))},onShowGroupsClick:function(A,B){if(B){this.onGroupByClick()}else{this.grid.store.clearGrouping()}},toggleGroup:function(C,B){this.grid.stopEditing();C=Ext.getDom(C);var A=Ext.fly(C);B=B!==undefined?B:A.hasClass("x-grid-group-collapsed");this.state[A.dom.id]=B;A[B?"removeClass":"addClass"]("x-grid-group-collapsed")},toggleAllGroups:function(C){var B=this.getGroups();for(var D=0,A=B.length;D=0&&this.config[A].resizable!==false&&this.config[A].fixed!==true},setHidden:function(A,B){var C=this.config[A];if(C.hidden!==B){C.hidden=B;this.totalWidth=null;this.fireEvent("hiddenchange",this,A,B)}},setEditor:function(A,B){this.config[A].editor=B}});Ext.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="string"&&A.length<1){return" "}return A};Ext.grid.DefaultColumnModel=Ext.grid.ColumnModel; +Ext.grid.AbstractSelectionModel=function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(A){this.grid=A;this.initEvents()},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked}}); +Ext.grid.RowSelectionModel=function(A){Ext.apply(this,A);this.selections=new Ext.util.MixedCollection(false,function(B){return B.id});this.last=false;this.lastActive=false;this.addEvents("selectionchange","beforerowselect","rowselect","rowdeselect");Ext.grid.RowSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.RowSelectionModel,Ext.grid.AbstractSelectionModel,{singleSelect:false,initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag){this.grid.on("rowmousedown",this.handleMouseDown,this)}else{this.grid.on("rowclick",function(B,D,C){if(C.button===0&&!C.shiftKey&&!C.ctrlKey){this.selectRow(D,false);B.view.focusRow(D)}},this)}this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{"up":function(C){if(!C.shiftKey){this.selectPrevious(C.shiftKey)}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;this.selectRange(this.last,this.lastActive-1);this.grid.getView().focusRow(this.lastActive);if(B!==false){this.last=B}}else{this.selectFirstRow()}}},"down":function(C){if(!C.shiftKey){this.selectNext(C.shiftKey)}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;this.selectRange(this.last,this.lastActive+1);this.grid.getView().focusRow(this.lastActive);if(B!==false){this.last=B}}else{this.selectFirstRow()}}},scope:this});var A=this.grid.view;A.on("refresh",this.onRefresh,this);A.on("rowupdated",this.onRowUpdated,this);A.on("rowremoved",this.onRemove,this)},onRefresh:function(){var F=this.grid.store,B;var D=this.getSelections();this.clearSelections(true);for(var C=0,A=D.length;C0},isSelected:function(A){var B=typeof A=="number"?this.grid.store.getAt(A):A;return(B&&this.selections.key(B.id)?true:false)},isIdSelected:function(A){return(this.selections.key(A)?true:false)},handleMouseDown:function(D,F,E){if(E.button!==0||this.isLocked()){return }var A=this.grid.getView();if(E.shiftKey&&this.last!==false){var C=this.last;this.selectRange(C,F,E.ctrlKey);this.last=C;A.focusRow(F)}else{var B=this.isSelected(F);if(E.ctrlKey&&B){this.deselectRow(F)}else{if(!B||this.getCount()>1){this.selectRow(F,E.ctrlKey||E.shiftKey);A.focusRow(F)}}}},selectRows:function(C,D){if(!D){this.clearSelections()}for(var B=0,A=C.length;B=A;C--){this.selectRow(C,true)}}},deselectRange:function(C,B,A){if(this.locked){return }for(var D=C;D<=B;D++){this.deselectRow(D,A)}},selectRow:function(B,D,A){if(this.locked||(B<0||B>=this.grid.store.getCount())){return }var C=this.grid.store.getAt(B);if(C&&this.fireEvent("beforerowselect",this,B,D,C)!==false){if(!D||this.singleSelect){this.clearSelections()}this.selections.add(C);this.last=this.lastActive=B;if(!A){this.grid.getView().onRowSelect(B)}this.fireEvent("rowselect",this,B,C);this.fireEvent("selectionchange",this)}},deselectRow:function(B,A){if(this.locked){return }if(this.last==B){this.last=false}if(this.lastActive==B){this.lastActive=false}var C=this.grid.store.getAt(B);if(C){this.selections.remove(C);if(!A){this.grid.getView().onRowDeselect(B)}this.fireEvent("rowdeselect",this,B,C);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){D.stopEvent();A.completeEdit();if(D.shiftKey){F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this)}}else{if(B==D.ENTER){D.stopEvent();A.completeEdit();if(D.shiftKey){F=C.walkCells(A.row-1,A.col,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row+1,A.col,1,this.acceptsNav,this)}}else{if(B==D.ESC){A.cancelEdit()}}}if(F){C.startEditing(F[0],F[1])}}}); +Ext.grid.CellSelectionModel=function(A){Ext.apply(this,A);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.getGridEl().on(Ext.isIE?"keydown":"keypress",this.handleKeyDown,this);var A=this.grid.view;A.on("refresh",this.onViewChange,this);A.on("rowupdated",this.onRowUpdated,this);A.on("beforerowremoved",this.clearSelections,this);A.on("beforerowsinserted",this.clearSelections,this);if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(A){this.select(A.row,A.column,false,true,A.record)},onRowUpdated:function(A,B,C){if(this.selection&&this.selection.record==C){A.onCellSelect(B,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(B){var A=this.selection;if(A){if(B!==true){this.grid.view.onCellDeselect(A.cell[0],A.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(B,D,A,C){if(C.button!==0||this.isLocked()){return }this.select(D,A)},select:function(F,C,B,E,D){if(this.fireEvent("beforecellselect",this,F,C)!==false){this.clearSelections();D=D||this.grid.store.getAt(F);this.selection={record:D,cell:[F,C]};if(!B){var A=this.grid.getView();A.onCellSelect(F,C);if(E!==true){A.focusCell(F,C)}}this.fireEvent("cellselect",this,F,C);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(C,B,A){return !A.isHidden(B)},handleKeyDown:function(F){if(!F.isNavKeyPress()){return }var E=this.grid,J=this.selection;if(!J){F.stopEvent();var I=E.walkCells(0,0,1,this.isSelectable,this);if(I){this.select(I[0],I[1])}return }var B=this;var H=function(M,K,L){return E.walkCells(M,K,L,B.isSelectable,B)};var C=F.getKey(),A=J.cell[0],G=J.cell[1];var D;switch(C){case F.TAB:if(F.shiftKey){D=H(A,G-1,-1)}else{D=H(A,G+1,1)}break;case F.DOWN:D=H(A+1,G,1);break;case F.UP:D=H(A-1,G,-1);break;case F.RIGHT:D=H(A,G+1,1);break;case F.LEFT:D=H(A,G-1,-1);break;case F.ENTER:if(E.isEditor&&!E.editing){E.startEditing(A,G);F.stopEvent();return }break}if(D){this.select(D[0],D[1]);F.stopEvent()}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){if(D.shiftKey){F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this)}D.stopEvent()}else{if(B==D.ENTER){A.completeEdit();D.stopEvent()}else{if(B==D.ESC){D.stopEvent();A.cancelEdit()}}}if(F){C.startEditing(F[0],F[1])}}}); +Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,isEditor:true,detectEdit:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.on("bodyscroll",this.stopEditing,this);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{if(this.clicksToEdit=="auto"&&this.view.mainBody){this.view.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}this.getGridEl().addClass("xedit-grid")},onCellDblClick:function(B,C,A){this.startEditing(C,A)},onAutoEditClick:function(C,B){var E=this.view.findRowIndex(B);var A=this.view.findCellIndex(B);if(E!==false&&A!==false){if(this.selModel.getSelectedCell){var D=this.selModel.getSelectedCell();if(D&&D.cell[0]===E&&D.cell[1]===A){this.startEditing(E,A)}}else{if(this.selModel.isSelected(E)){this.startEditing(E,A)}}}},onEditComplete:function(B,D,A){this.editing=false;this.activeEditor=null;B.un("specialkey",this.selModel.onEditorKey,this.selModel);if(String(D)!==String(A)){var C=B.record;var F=this.colModel.getDataIndex(B.col);var E={grid:this,record:C,field:F,originalValue:A,value:D,row:B.row,column:B.col,cancel:false};if(this.fireEvent("validateedit",E)!==false&&!E.cancel){C.set(F,E.value);delete E.cancel;this.fireEvent("afteredit",E)}}this.view.focusCell(B.row,B.col)},startEditing:function(F,B){this.stopEditing();if(this.colModel.isCellEditable(B,F)){this.view.ensureVisible(F,B,true);var C=this.store.getAt(F);var E=this.colModel.getDataIndex(B);var D={grid:this,record:C,field:E,value:C.data[E],row:F,column:B,cancel:false};if(this.fireEvent("beforeedit",D)!==false&&!D.cancel){this.editing=true;var A=this.colModel.getCellEditor(B,F);if(!A.rendered){A.render(this.view.getEditorParent(A))}(function(){A.row=F;A.col=B;A.record=C;A.on("complete",this.onEditComplete,this,{single:true});A.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=A;var G=C.data[E];A.startEdit(this.view.getCell(F,B),G)}).defer(50,this)}}},stopEditing:function(){if(this.activeEditor){this.activeEditor.completeEdit()}this.activeEditor=null}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel); +Ext.grid.GridEditor=function(B,A){Ext.grid.GridEditor.superclass.constructor.call(this,B,A);B.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false}); +Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=function(A,B){this.grid=A;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(B){this.setSource(B)}Ext.grid.PropertyStore.superclass.constructor.call(this)};Ext.extend(Ext.grid.PropertyStore,Ext.util.Observable,{setSource:function(C){this.source=C;this.store.removeAll();var B=[];for(var A in C){if(this.isEditableValue(C[A])){B.push(new Ext.grid.PropertyRecord({name:A,value:C[A]},A))}}this.store.loadRecords({records:B},{},true)},onUpdate:function(E,A,D){if(D==Ext.data.Record.EDIT){var B=A.data["value"];var C=A.modified["value"];if(this.grid.fireEvent("beforepropertychange",this.source,A.id,B,C)!==false){this.source[A.id]=B;A.commit();this.grid.fireEvent("propertychange",this.source,A.id,B,C)}else{A.reject()}}},getProperty:function(A){return this.store.getAt(A)},isEditableValue:function(A){if(A&&A instanceof Date){return true}else{if(typeof A=="object"||typeof A=="function"){return false}}return true},setValue:function(B,A){this.source[B]=A;this.store.getById(B).set("value",A)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=function(C,B){this.grid=C;var D=Ext.grid;D.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name"},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value"}]);this.store=B;this.bselect=Ext.DomHelper.append(document.body,{tag:"select",cls:"x-grid-editor x-hide-display",children:[{tag:"option",value:"true",html:"true"},{tag:"option",value:"false",html:"false"}]});var E=Ext.form;var A=new E.Field({el:this.bselect,bselect:this.bselect,autoShow:true,getValue:function(){return this.bselect.value=="true"}});this.editors={"date":new D.GridEditor(new E.DateField({selectOnFocus:true})),"string":new D.GridEditor(new E.TextField({selectOnFocus:true})),"number":new D.GridEditor(new E.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new D.GridEditor(A)};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)};Ext.extend(Ext.grid.PropertyColumnModel,Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",renderDate:function(A){return A.dateFormat(this.dateFormat)},renderBool:function(A){return A?"true":"false"},isCellEditable:function(A,B){return A==1},getRenderer:function(A){return A==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(A){return this.getPropertyName(A)},renderCell:function(A){var B=A;if(A instanceof Date){B=this.renderDate(A)}else{if(typeof A=="boolean"){B=this.renderBool(A)}}return Ext.util.Format.htmlEncode(B)},getPropertyName:function(B){var A=this.grid.propertyNames;return A&&A[B]?A[B]:B},getCellEditor:function(A,E){var B=this.store.getProperty(E);var D=B.data["name"],C=B.data["value"];if(this.grid.customEditors[D]){return this.grid.customEditors[D]}if(C instanceof Date){return this.editors["date"]}else{if(typeof C=="number"){return this.editors["number"]}else{if(typeof C=="boolean"){return this.editors["boolean"]}else{return this.editors["string"]}}}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColLock:false,enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customEditors=this.customEditors||{};this.lastEditRow=null;var B=new Ext.grid.PropertyStore(this);this.propStore=B;var A=new Ext.grid.PropertyColumnModel(this,B);B.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=A;this.ds=B.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.selModel.on("beforecellselect",function(E,D,C){if(C===0){this.startEditing.defer(200,this,[D,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(A){this.propStore.setSource(A)},getSource:function(){return this.propStore.getSource()}}); +Ext.grid.RowNumberer=function(A){Ext.apply(this,A);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}};Ext.grid.RowNumberer.prototype={header:"",width:23,sortable:false,fixed:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(B,C,A,D){if(this.rowspan){C.cellAttr="rowspan=\""+this.rowspan+"\""}return D+1}}; +Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:"
       
      ",width:20,sortable:false,fixed:true,dataIndex:"",id:"checker",initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var A=this.grid.getView();A.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(A.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},onMouseDown:function(C,B){if(B.className=="x-grid3-row-checker"){C.stopEvent();var D=C.getTarget(".x-grid3-row");if(D){var A=D.rowIndex;if(this.isSelected(A)){this.deselectRow(A)}else{this.selectRow(A,true)}}}},onHdMouseDown:function(C,A){if(A.className=="x-grid3-hd-checker"){C.stopEvent();var B=Ext.fly(A.parentNode);var D=B.hasClass("x-grid3-hd-checker-on");if(D){B.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{B.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(B,C,A){return"
       
      "}}); +Ext.LoadMask=function(C,B){this.el=Ext.get(C);Ext.apply(this,B);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,false)}else{var A=this.el.getUpdater();A.showLoadIndicator=false;A.on("beforeupdate",this.onBeforeLoad,this);A.on("update",this.onLoad,this);A.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true)}};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);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.onLoad,this)}else{var A=this.el.getUpdater();A.un("beforeupdate",this.onBeforeLoad,this);A.un("update",this.onLoad,this);A.un("failure",this.onLoad,this)}}}; +Ext.ProgressBar=Ext.extend(Ext.BoxComponent,{baseCls:"x-progress",waitTimer:null,initComponent:function(){Ext.ProgressBar.superclass.initComponent.call(this);this.addEvents("update")},onRender:function(D,A){Ext.ProgressBar.superclass.onRender.call(this,D,A);var C=new Ext.Template("
      ","
      ","
      ","
      ","
       
      ","
      ","
      ","
      ","
       
      ","
      ","
      ","
      ");if(A){this.el=C.insertBefore(A,{cls:this.baseCls},true)}else{this.el=C.append(D,{cls:this.baseCls},true)}if(this.id){this.el.dom.id=this.id}var B=this.el.dom.firstChild;this.progressBar=Ext.get(B.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var E=Ext.get(B.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,E.dom.firstChild]);this.textEl.setWidth(B.offsetWidth)}if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}this.setSize(this.width||"auto","auto");this.progressBar.setHeight(B.offsetHeight)},updateProgress:function(B,C){this.value=B||0;if(C){this.updateText(C)}var A=Math.floor(B*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(A);if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(A)}this.fireEvent("update",this,B,C);return this},wait:function(B){if(!this.waitTimer){var A=this;B=B||{};this.waitTimer=Ext.TaskMgr.start({run:function(C){var D=B.increment||10;this.updateProgress(((((C+D)%D)+1)*(100/D))*0.01)},interval:B.interval||1000,duration:B.duration,onStop:function(){if(B.fn){B.fn.apply(B.scope||this)}this.reset()},scope:A})}return this},isWaiting:function(){return this.waitTimer!=null},updateText:function(A){this.text=A||" ";this.textEl.update(this.text);return this},setSize:function(A,C){Ext.ProgressBar.superclass.setSize.call(this,A,C);if(this.textTopEl){var B=this.el.dom.firstChild;this.textEl.setSize(B.offsetWidth,B.offsetHeight)}return this},reset:function(A){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(A===true){this.hide()}return this}});Ext.reg("progress",Ext.ProgressBar); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/ext-core-debug.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/ext-core-debug.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/ext-core-debug.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,5655 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + + +Ext.DomHelper = function(){ + var tempTableEl = null; + var emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i; + var tableRe = /^table|tbody|tr|td$/i; + + + + var createHtml = function(o){ + if(typeof o == 'string'){ + return o; + } + var b = ""; + if(!o.tag){ + o.tag = "div"; + } + b += "<" + o.tag; + for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || typeof o[attr] == "function") continue; + if(attr == "style"){ + var s = o["style"]; + if(typeof s == "function"){ + s = s.call(); + } + if(typeof s == "string"){ + b += ' style="' + s + '"'; + }else if(typeof s == "object"){ + b += ' style="'; + for(var key in s){ + if(typeof s[key] != "function"){ + b += key + ":" + s[key] + ";"; + } + } + b += '"'; + } + }else{ + if(attr == "cls"){ + b += ' class="' + o["cls"] + '"'; + }else if(attr == "htmlFor"){ + b += ' for="' + o["htmlFor"] + '"'; + }else{ + b += " " + attr + '="' + o[attr] + '"'; + } + } + } + if(emptyTags.test(o.tag)){ + b += "/>"; + }else{ + b += ">"; + var cn = o.children || o.cn; + if(cn){ + if(cn instanceof Array){ + for(var i = 0, len = cn.length; i < len; i++) { + b += createHtml(cn[i], b); + } + }else{ + b += createHtml(cn, b); + } + } + if(o.html){ + b += o.html; + } + b += ""; + } + return b; + }; + + + + var createDom = function(o, parentNode){ + var el = document.createElement(o.tag||'div'); + var useSet = el.setAttribute ? true : false; + for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || attr == "style" || typeof o[attr] == "function") continue; + if(attr=="cls"){ + el.className = o["cls"]; + }else{ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + Ext.DomHelper.applyStyles(el, o.style); + var cn = o.children || o.cn; + if(cn){ + if(cn instanceof Array){ + for(var i = 0, len = cn.length; i < len; i++) { + createDom(cn[i], el); + } + }else{ + createDom(cn, el); + } + } + if(o.html){ + el.innerHTML = o.html; + } + if(parentNode){ + parentNode.appendChild(el); + } + return el; + }; + + var ieTable = function(depth, s, h, e){ + tempTableEl.innerHTML = [s, h, e].join(''); + var i = -1, el = tempTableEl; + while(++i < depth){ + el = el.firstChild; + } + return el; + }; + + + var ts = '', + te = '
      ', + tbs = ts+'', + tbe = ''+te, + trs = tbs + '', + tre = ''+tbe; + + + var insertIntoTable = function(tag, where, el, html){ + if(!tempTableEl){ + tempTableEl = document.createElement('div'); + } + var node; + var before = null; + if(tag == 'td'){ + if(where == 'afterbegin' || where == 'beforeend'){ + return; + } + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + } else{ + before = el.nextSibling; + el = el.parentNode; + } + node = ieTable(4, trs, html, tre); + } + else if(tag == 'tr'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else{ + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(4, trs, html, tre); + } + } else if(tag == 'tbody'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else{ + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(3, tbs, html, tbe); + } + } else{ + if(where == 'beforebegin' || where == 'afterend'){ + return; + } + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(2, ts, html, te); + } + el.insertBefore(node, before); + return node; + }; + + + return { + + useDom : false, + + + markup : function(o){ + return createHtml(o); + }, + + + applyStyles : function(el, styles){ + if(styles){ + el = Ext.fly(el); + if(typeof styles == "string"){ + var re = /\s?([a-z\-]*)\:\s?([^;]*);?/gi; + var matches; + while ((matches = re.exec(styles)) != null){ + el.setStyle(matches[1], matches[2]); + } + }else if (typeof styles == "object"){ + for (var style in styles){ + el.setStyle(style, styles[style]); + } + }else if (typeof styles == "function"){ + Ext.DomHelper.applyStyles(el, styles.call()); + } + } + }, + + + insertHtml : function(where, el, html){ + where = where.toLowerCase(); + if(el.insertAdjacentHTML){ + if(tableRe.test(el.tagName)){ + var rs; + if(rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html)){ + return rs; + } + } + switch(where){ + case "beforebegin": + el.insertAdjacentHTML('BeforeBegin', html); + return el.previousSibling; + case "afterbegin": + el.insertAdjacentHTML('AfterBegin', html); + return el.firstChild; + case "beforeend": + el.insertAdjacentHTML('BeforeEnd', html); + return el.lastChild; + case "afterend": + el.insertAdjacentHTML('AfterEnd', html); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + } + var range = el.ownerDocument.createRange(); + var frag; + switch(where){ + case "beforebegin": + range.setStartBefore(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el); + return el.previousSibling; + case "afterbegin": + if(el.firstChild){ + range.setStartBefore(el.firstChild); + frag = range.createContextualFragment(html); + el.insertBefore(frag, el.firstChild); + return el.firstChild; + }else{ + el.innerHTML = html; + return el.firstChild; + } + case "beforeend": + if(el.lastChild){ + range.setStartAfter(el.lastChild); + frag = range.createContextualFragment(html); + el.appendChild(frag); + return el.lastChild; + }else{ + el.innerHTML = html; + return el.lastChild; + } + case "afterend": + range.setStartAfter(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el.nextSibling); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + }, + + + insertBefore : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "beforeBegin"); + }, + + + insertAfter : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling"); + }, + + + insertFirst : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterBegin", "firstChild"); + }, + + + doInsert : function(el, o, returnElement, pos, sibling){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + (sibling === "firstChild" ? el : el.parentNode).insertBefore(newNode, sibling ? el[sibling] : el); + }else{ + var html = createHtml(o); + newNode = this.insertHtml(pos, el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + + append : function(el, o, returnElement){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + el.appendChild(newNode); + }else{ + var html = createHtml(o); + newNode = this.insertHtml("beforeEnd", el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + + overwrite : function(el, o, returnElement){ + el = Ext.getDom(el); + el.innerHTML = createHtml(o); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + }, + + + createTemplate : function(o){ + var html = createHtml(o); + return new Ext.Template(html); + } + }; +}(); + + +Ext.Template = function(html){ + var a = arguments; + if(html instanceof Array){ + html = html.join(""); + }else if(a.length > 1){ + var buf = []; + for(var i = 0, len = a.length; i < len; i++){ + if(typeof a[i] == 'object'){ + Ext.apply(this, a[i]); + }else{ + buf[buf.length] = a[i]; + } + } + html = buf.join(''); + } + + this.html = html; + if(this.compiled){ + this.compile(); + } +}; +Ext.Template.prototype = { + + applyTemplate : function(values){ + if(this.compiled){ + return this.compiled(values); + } + var useF = this.disableFormats !== true; + var fm = Ext.util.Format, tpl = this; + var fn = function(m, name, format, args){ + if(format && useF){ + if(format.substr(0, 5) == "this."){ + return tpl.call(format.substr(5), values[name], values); + }else{ + if(args){ + + + + var re = /^\s*['"](.*)["']\s*$/; + args = args.split(','); + for(var i = 0, len = args.length; i < len; i++){ + args[i] = args[i].replace(re, "$1"); + } + args = [values[name]].concat(args); + }else{ + args = [values[name]]; + } + return fm[format].apply(fm, args); + } + }else{ + return values[name] !== undefined ? values[name] : ""; + } + }; + return this.html.replace(this.re, fn); + }, + + + set : function(html, compile){ + this.html = html; + this.compiled = null; + if(compile){ + this.compile(); + } + return this; + }, + + + disableFormats : false, + + + re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, + + + compile : function(){ + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + var sep = Ext.isGecko ? "+" : ","; + var fn = function(m, name, format, args){ + if(format && useF){ + args = args ? ',' + args : ""; + if(format.substr(0, 5) != "this."){ + format = "fm." + format + '('; + }else{ + format = 'this.call("'+ format.substr(5) + '", '; + args = ", values"; + } + }else{ + args= ''; format = "(values['" + name + "'] == undefined ? '' : "; + } + return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; + }; + var body; + + if(Ext.isGecko){ + body = "this.compiled = function(values){ return '" + + this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + + "';};"; + }else{ + body = ["this.compiled = function(values){ return ['"]; + body.push(this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return this; + }, + + + call : function(fnName, value, allValues){ + return this[fnName](value, allValues); + }, + + + 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); + }, + + doInsert : function(where, el, values, returnEl){ + el = Ext.getDom(el); + var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values)); + return returnEl ? Ext.get(newNode, true) : newNode; + }, + + + overwrite : function(el, values, returnElement){ + el = Ext.getDom(el); + el.innerHTML = this.applyTemplate(values); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + } +}; + +Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; + + +Ext.DomHelper.Template = Ext.Template; + + +Ext.Template.from = function(el, config){ + el = Ext.getDom(el); + return new Ext.Template(el.value || el.innerHTML, config || ''); +}; + + +Ext.DomQuery = function(){ + var cache = {}, simpleCache = {}, valueCache = {}; + var nonSpace = /\S/; + var trimRe = /^\s+|\s+$/g; + var tplRe = /\{(\d+)\}/g; + var modeRe = /^(\s?[\/>+~]\s?|\s|$)/; + var tagTokenRe = /^(#)?([\w-\*]+)/; + var nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/; + + function child(p, index){ + var i = 0; + var n = p.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(d){ + var n = d.firstChild, ni = -1; + while(n){ + var nx = n.nextSibling; + if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ + d.removeChild(n); + }else{ + n.nodeIndex = ++ni; + } + n = nx; + } + return this; + }; + + function byClassName(c, a, v){ + if(!v){ + return c; + } + var r = [], ri = -1, cn; + for(var i = 0, ci; ci = c[i]; i++){ + if((' '+ci.className+' ').indexOf(v) != -1){ + r[++ri] = ci; + } + } + return r; + }; + + 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.children || 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 == "~"){ + for(var i = 0, n; n = ns[i]; i++){ + while((n = n.nextSibling) && (n.nodeType != 1 || (tagName == '*' || n.tagName.toLowerCase()!=tagName))); + if(n){ + result[++ri] = n; + } + } + } + return result; + }; + + function concat(a, b){ + if(b.slice){ + return a.concat(b); + } + for(var i = 0, l = b.length; i < l; i++){ + a[a.length] = b[i]; + } + return a; + } + + function byTag(cs, tagName){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!tagName){ + return cs; + } + var r = [], ri = -1; + tagName = tagName.toLowerCase(); + for(var i = 0, ci; ci = cs[i]; i++){ + if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ + r[++ri] = ci; + } + } + return r; + }; + + function byId(cs, attr, id){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!id){ + return cs; + } + var r = [], ri = -1; + for(var i = 0,ci; ci = cs[i]; i++){ + if(ci && ci.id == id){ + r[++ri] = ci; + return r; + } + } + return r; + }; + + function byAttribute(cs, attr, value, op, custom){ + var r = [], ri = -1, st = custom=="{"; + var f = Ext.DomQuery.operators[op]; + for(var i = 0, ci; ci = cs[i]; i++){ + var a; + if(st){ + a = Ext.DomQuery.getStyle(ci, attr); + } + else if(attr == "class" || attr == "className"){ + a = ci.className; + }else if(attr == "for"){ + a = ci.htmlFor; + }else if(attr == "href"){ + a = ci.getAttribute("href", 2); + }else{ + a = ci.getAttribute(attr); + } + if((f && f(a, value)) || (!f && a)){ + r[++ri] = ci; + } + } + return r; + }; + + function byPseudo(cs, name, value){ + return Ext.DomQuery.pseudos[name](cs, value); + }; + + + + + var isIE = window.ActiveXObject ? true : false; + + + + eval("var batch = 30803;"); + + var key = 30803; + + function nodupIEXml(cs){ + var d = ++key; + cs[0].setAttribute("_nodup", d); + var r = [cs[0]]; + for(var i = 1, len = cs.length; i < len; i++){ + var c = cs[i]; + if(!c.getAttribute("_nodup") != d){ + c.setAttribute("_nodup", d); + r[r.length] = c; + } + } + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].removeAttribute("_nodup"); + } + return r; + } + + function nodup(cs){ + if(!cs){ + return []; + } + var len = cs.length, c, i, r = cs, cj, ri = -1; + if(!len || typeof cs.nodeType != "undefined" || len == 1){ + return cs; + } + if(isIE && typeof cs[0].selectSingleNode != "undefined"){ + return nodupIEXml(cs); + } + var d = ++key; + cs[0]._nodup = d; + for(i = 1; c = cs[i]; i++){ + if(c._nodup != d){ + c._nodup = d; + }else{ + r = []; + for(var j = 0; j < i; j++){ + r[++ri] = cs[j]; + } + for(j = i+1; cj = cs[j]; j++){ + if(cj._nodup != d){ + cj._nodup = d; + r[++ri] = cj; + } + } + return r; + } + } + return r; + } + + function quickDiffIEXml(c1, c2){ + var d = ++key; + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].setAttribute("_qdiff", d); + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i].getAttribute("_qdiff") != d){ + r[r.length] = c2[i]; + } + } + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].removeAttribute("_qdiff"); + } + return r; + } + + function quickDiff(c1, c2){ + var len1 = c1.length; + if(!len1){ + return c2; + } + if(isIE && c1[0].selectSingleNode){ + return quickDiffIEXml(c1, c2); + } + var d = ++key; + for(var i = 0; i < len1; i++){ + c1[i]._qdiff = d; + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i]._qdiff != d){ + r[r.length] = c2[i]; + } + } + return r; + } + + function quickId(ns, mode, root, id){ + if(ns == root){ + var d = root.ownerDocument || root; + return d.getElementById(id); + } + ns = getNodes(ns, mode, "*"); + return byId(ns, null, id); + } + + return { + 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"]; + var q = path, mode, lq; + var tk = Ext.DomQuery.matchers; + var tklen = tk.length; + var mm; + + + var lmode = q.match(modeRe); + if(lmode && lmode[1]){ + fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; + q = q.replace(lmode[1], ""); + } + + while(path.substr(0, 1)=="/"){ + path = path.substr(1); + } + + while(q && lq != q){ + lq = q; + var tm = q.match(tagTokenRe); + if(type == "select"){ + if(tm){ + if(tm[1] == "#"){ + fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; + }else{ + fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; + } + q = q.replace(tm[0], ""); + }else if(q.substr(0, 1) != '@'){ + fn[fn.length] = 'n = getNodes(n, mode, "*");'; + } + }else{ + if(tm){ + if(tm[1] == "#"){ + fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");'; + }else{ + fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");'; + } + q = q.replace(tm[0], ""); + } + } + while(!(mm = q.match(modeRe))){ + var matched = false; + for(var j = 0; j < tklen; j++){ + var t = tk[j]; + var m = q.match(t.re); + if(m){ + fn[fn.length] = t.select.replace(tplRe, function(x, i){ + return m[i]; + }); + q = q.replace(m[0], ""); + matched = true; + break; + } + } + + if(!matched){ + throw 'Error parsing selector, parsing failed at "' + q + '"'; + } + } + if(mm[1]){ + fn[fn.length] = 'mode="'+mm[1].replace(trimRe, "")+'";'; + q = q.replace(mm[1], ""); + } + } + fn[fn.length] = "return nodup(n);\n}"; + eval(fn.join("")); + return f; + }, + + + select : function(path, root, type){ + if(!root || root == document){ + root = document; + } + if(typeof root == "string"){ + root = document.getElementById(root); + } + var paths = path.split(","); + var results = []; + for(var i = 0, len = paths.length; i < len; i++){ + var p = paths[i].replace(trimRe, ""); + if(!cache[p]){ + cache[p] = Ext.DomQuery.compile(p); + if(!cache[p]){ + throw p + " is not a valid selector"; + } + } + var result = cache[p](root); + if(result && result != document){ + results = results.concat(result); + } + } + if(paths.length > 1){ + return nodup(results); + } + return results; + }, + + + 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); + n = n[0] ? n[0] : n; + var 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 = (el instanceof Array); + var 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, null, " {1} ");' + }, { + re: /^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, + select: 'n = byPseudo(n, "{1}", "{2}");' + },{ + re: /^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/, + select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");' + }, { + re: /^#([\w-]+)/, + select: 'n = byId(n, null, "{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; + var m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a); + var 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('|'); + var 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; + var 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; + var 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; + var 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.Observable = function(){ + + if(this.listeners){ + this.on(this.listeners); + delete this.listeners; + } +}; +Ext.util.Observable.prototype = { + + fireEvent : function(){ + if(this.eventsSuspended !== true){ + var ce = this.events[arguments[0].toLowerCase()]; + if(typeof ce == "object"){ + return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); + } + } + return true; + }, + + filterOptRe : /^(?:scope|delay|buffer|single)$/, + + + addListener : function(eventName, fn, scope, o){ + if(typeof eventName == "object"){ + o = eventName; + for(var e in o){ + if(this.filterOptRe.test(e)){ + continue; + } + if(typeof o[e] == "function"){ + this.addListener(e, o[e], o.scope, o); + }else{ + this.addListener(e, o[e].fn, o[e].scope, o[e]); + } + } + return; + } + o = (!o || typeof o == "boolean") ? {} : o; + eventName = eventName.toLowerCase(); + var ce = this.events[eventName] || true; + if(typeof ce == "boolean"){ + ce = new Ext.util.Event(this, eventName); + this.events[eventName] = ce; + } + ce.addListener(fn, scope, o); + }, + + + removeListener : function(eventName, fn, scope){ + var ce = this.events[eventName.toLowerCase()]; + if(typeof ce == "object"){ + ce.removeListener(fn, scope); + } + }, + + + purgeListeners : function(){ + for(var evt in this.events){ + if(typeof this.events[evt] == "object"){ + this.events[evt].clearListeners(); + } + } + }, + + relayEvents : function(o, events){ + var createHandler = function(ename){ + return function(){ + return this.fireEvent.apply(this, Ext.combine(ename, Array.prototype.slice.call(arguments, 0))); + }; + }; + for(var i = 0, len = events.length; i < len; i++){ + var ename = events[i]; + if(!this.events[ename]){ this.events[ename] = true; }; + o.on(ename, createHandler(ename), this); + } + }, + + + addEvents : function(o){ + if(!this.events){ + this.events = {}; + } + if(typeof o == 'string'){ + for(var i = 0, a = arguments, v; v = a[i]; i++){ + if(!this.events[a[i]]){ + o[a[i]] = true; + } + } + }else{ + Ext.applyIf(this.events, o); + } + }, + + + hasListener : function(eventName){ + var e = this.events[eventName]; + return typeof e == "object" && e.listeners.length > 0; + }, + + + suspendEvents : function(){ + this.eventsSuspended = true; + }, + + + resumeEvents : function(){ + this.eventsSuspended = false; + }, + + getMethodEvent : function(method){ + if(!this.methodEvents){ + this.methodEvents = {}; + } + var e = this.methodEvents[method]; + if(!e){ + e = {}; + this.methodEvents[method] = e; + + e.originalFn = this[method]; + e.methodName = method; + e.before = []; + e.after = []; + + + var returnValue, v, cancel; + var obj = this; + + var makeCall = function(fn, scope, args){ + if((v = fn.apply(scope || obj, args)) !== undefined){ + if(typeof v === 'object'){ + if(v.returnValue !== undefined){ + returnValue = v.returnValue; + }else{ + returnValue = v; + } + if(v.cancel === true){ + cancel = true; + } + }else if(v === false){ + cancel = true; + }else { + returnValue = v; + } + } + } + + this[method] = function(){ + returnValue = v = undefined; cancel = false; + var args = Array.prototype.slice.call(arguments, 0); + for(var i = 0, len = e.before.length; i < len; i++){ + makeCall(e.before[i].fn, e.before[i].scope, args); + if(cancel){ + return returnValue; + } + } + + if((v = e.originalFn.apply(obj, args)) !== undefined){ + returnValue = v; + } + + for(var i = 0, len = e.after.length; i < len; i++){ + makeCall(e.after[i].fn, e.after[i].scope, args); + if(cancel){ + return returnValue; + } + } + return returnValue; + }; + } + return e; + }, + + beforeMethod : function(method, fn, scope){ + var e = this.getMethodEvent(method); + e.before.push({fn: fn, scope: scope}); + }, + + afterMethod : function(method, fn, scope){ + var e = this.getMethodEvent(method); + e.after.push({fn: fn, scope: scope}); + }, + + removeMethodListener : function(method, fn, scope){ + var e = this.getMethodEvent(method); + for(var i = 0, len = e.before.length; i < len; i++){ + if(e.before[i].fn == fn && e.before[i].scope == scope){ + e.before.splice(i, 1); + return; + } + } + for(var i = 0, len = e.after.length; i < len; i++){ + if(e.after[i].fn == fn && e.after[i].scope == scope){ + e.after.splice(i, 1); + return; + } + } + } +}; + +Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener; + +Ext.util.Observable.prototype.un = Ext.util.Observable.prototype.removeListener; + + +Ext.util.Observable.capture = function(o, fn, scope){ + o.fireEvent = o.fireEvent.createInterceptor(fn, scope); +}; + + +Ext.util.Observable.releaseCapture = function(o){ + o.fireEvent = Ext.util.Observable.prototype.fireEvent; +}; + +(function(){ + + var createBuffered = function(h, o, scope){ + var task = new Ext.util.DelayedTask(); + return function(){ + task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0)); + }; + }; + + var createSingle = function(h, e, fn, scope){ + return function(){ + e.removeListener(fn, scope); + return h.apply(scope, arguments); + }; + }; + + var createDelayed = function(h, o, scope){ + return function(){ + var args = Array.prototype.slice.call(arguments, 0); + setTimeout(function(){ + h.apply(scope, args); + }, o.delay || 10); + }; + }; + + Ext.util.Event = function(obj, name){ + this.name = name; + this.obj = obj; + this.listeners = []; + }; + + Ext.util.Event.prototype = { + addListener : function(fn, scope, options){ + scope = scope || this.obj; + if(!this.isListening(fn, scope)){ + var l = this.createListener(fn, scope, options); + if(!this.firing){ + this.listeners.push(l); + }else{ this.listeners = this.listeners.slice(0); + this.listeners.push(l); + } + } + }, + + createListener : function(fn, scope, o){ + o = o || {}; + scope = scope || this.obj; + var l = {fn: fn, scope: scope, options: o}; + var h = fn; + if(o.delay){ + h = createDelayed(h, o, scope); + } + if(o.single){ + h = createSingle(h, this, fn, scope); + } + if(o.buffer){ + h = createBuffered(h, o, scope); + } + l.fireFn = h; + return l; + }, + + findListener : function(fn, scope){ + scope = scope || this.obj; + var ls = this.listeners; + for(var i = 0, len = ls.length; i < len; i++){ + var l = ls[i]; + if(l.fn == fn && l.scope == scope){ + return i; + } + } + return -1; + }, + + isListening : function(fn, scope){ + return this.findListener(fn, scope) != -1; + }, + + removeListener : function(fn, scope){ + var index; + if((index = this.findListener(fn, scope)) != -1){ + if(!this.firing){ + this.listeners.splice(index, 1); + }else{ + this.listeners = this.listeners.slice(0); + this.listeners.splice(index, 1); + } + return true; + } + return false; + }, + + clearListeners : function(){ + this.listeners = []; + }, + + fire : function(){ + var ls = this.listeners, scope, len = ls.length; + if(len > 0){ + this.firing = true; + var args = Array.prototype.slice.call(arguments, 0); + for(var i = 0; i < len; i++){ + var l = ls[i]; + if(l.fireFn.apply(l.scope||this.obj||window, arguments) === false){ + this.firing = false; + return false; + } + } + this.firing = false; + } + return true; + } + }; +})(); + +Ext.EventManager = function(){ + var docReadyEvent, docReadyProcId, docReadyState = false; + var resizeEvent, resizeTask, textEvent, textSize; + var E = Ext.lib.Event; + var D = Ext.lib.Dom; + + + var fireDocReady = function(){ + if(!docReadyState){ + docReadyState = true; + Ext.isReady = true; + if(docReadyProcId){ + clearInterval(docReadyProcId); + } + if(Ext.isGecko || Ext.isOpera) { + document.removeEventListener("DOMContentLoaded", fireDocReady, false); + } + if(Ext.isIE){ + var defer = document.getElementById("ie-deferred-loader"); + if(defer){ + defer.onreadystatechange = null; + defer.parentNode.removeChild(defer); + } + } + if(docReadyEvent){ + docReadyEvent.fire(); + docReadyEvent.clearListeners(); + } + } + }; + + var initDocReady = function(){ + docReadyEvent = new Ext.util.Event(); + if(Ext.isGecko || Ext.isOpera) { + document.addEventListener("DOMContentLoaded", fireDocReady, false); + }else if(Ext.isIE){ + document.write(""); + var defer = document.getElementById("ie-deferred-loader"); + defer.onreadystatechange = function(){ + if(this.readyState == "complete"){ + fireDocReady(); + } + }; + }else if(Ext.isSafari){ + docReadyProcId = setInterval(function(){ + var rs = document.readyState; + if(rs == "complete") { + fireDocReady(); + } + }, 10); + } + + E.on(window, "load", fireDocReady); + }; + + var createBuffered = function(h, o){ + var task = new Ext.util.DelayedTask(h); + return function(e){ + + e = new Ext.EventObjectImpl(e); + task.delay(o.buffer, h, null, [e]); + }; + }; + + var createSingle = function(h, el, ename, fn){ + return function(e){ + Ext.EventManager.removeListener(el, ename, fn); + h(e); + }; + }; + + var createDelayed = function(h, o){ + return function(e){ + + e = new Ext.EventObjectImpl(e); + setTimeout(function(){ + h(e); + }, o.delay || 10); + }; + }; + + var listen = function(element, ename, opt, fn, scope){ + var o = (!opt || typeof opt == "boolean") ? {} : opt; + fn = fn || o.fn; scope = scope || o.scope; + var el = Ext.getDom(element); + if(!el){ + throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; + } + var h = function(e){ + e = Ext.EventObject.setEvent(e); + var t; + if(o.delegate){ + t = e.getTarget(o.delegate, el); + if(!t){ + return; + } + }else{ + t = e.target; + } + if(o.stopEvent === true){ + e.stopEvent(); + } + if(o.preventDefault === true){ + e.preventDefault(); + } + if(o.stopPropagation === true){ + e.stopPropagation(); + } + + if(o.normalized === false){ + e = e.browserEvent; + } + + fn.call(scope || el, e, t, o); + }; + if(o.delay){ + h = createDelayed(h, o); + } + if(o.single){ + h = createSingle(h, el, ename, fn); + } + if(o.buffer){ + h = createBuffered(h, o); + } + fn._handlers = fn._handlers || []; + fn._handlers.push([Ext.id(el), ename, h]); + + E.on(el, ename, h); + if(ename == "mousewheel" && el.addEventListener){ + el.addEventListener("DOMMouseScroll", h, false); + E.on(window, 'unload', function(){ + el.removeEventListener("DOMMouseScroll", h, false); + }); + } + if(ename == "mousedown" && el == document){ + Ext.EventManager.stoppedMouseDownEvent.addListener(h); + } + return h; + }; + + var stopListening = function(el, ename, fn){ + var id = Ext.id(el), hds = fn._handlers, hd = fn; + if(hds){ + for(var i = 0, len = hds.length; i < len; i++){ + var h = hds[i]; + if(h[0] == id && h[1] == ename){ + hd = h[2]; + hds.splice(i, 1); + break; + } + } + } + E.un(el, ename, hd); + el = Ext.getDom(el); + if(ename == "mousewheel" && el.addEventListener){ + el.removeEventListener("DOMMouseScroll", hd, false); + } + if(ename == "mousedown" && el == document){ + Ext.EventManager.stoppedMouseDownEvent.removeListener(hd); + } + }; + + var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/; + var pub = { + + + addListener : function(element, eventName, fn, scope, options){ + if(typeof eventName == "object"){ + var o = eventName; + for(var e in o){ + if(propRe.test(e)){ + continue; + } + if(typeof o[e] == "function"){ + + listen(element, e, o, o[e], o.scope); + }else{ + + listen(element, e, o[e]); + } + } + return; + } + return listen(element, eventName, options, fn, scope); + }, + + + removeListener : function(element, eventName, fn){ + return stopListening(element, eventName, fn); + }, + + + onDocumentReady : function(fn, scope, options){ + if(docReadyState){ + docReadyEvent.addListener(fn, scope, options); + docReadyEvent.fire(); + docReadyEvent.clearListeners(); + return; + } + if(!docReadyEvent){ + initDocReady(); + } + docReadyEvent.addListener(fn, scope, options); + }, + + + onWindowResize : function(fn, scope, options){ + if(!resizeEvent){ + resizeEvent = new Ext.util.Event(); + resizeTask = new Ext.util.DelayedTask(function(){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + }); + E.on(window, "resize", this.fireWindowResize, this); + } + resizeEvent.addListener(fn, scope, options); + }, + + + fireWindowResize : function(){ + if(resizeEvent){ + if((Ext.isIE||Ext.isAir) && resizeTask){ + resizeTask.delay(50); + }else{ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + } + } + }, + + + onTextResize : function(fn, scope, options){ + if(!textEvent){ + textEvent = new Ext.util.Event(); + var textEl = new Ext.Element(document.createElement('div')); + textEl.dom.className = 'x-text-resize'; + textEl.dom.innerHTML = 'X'; + textEl.appendTo(document.body); + textSize = textEl.dom.offsetHeight; + setInterval(function(){ + if(textEl.dom.offsetHeight != textSize){ + textEvent.fire(textSize, textSize = textEl.dom.offsetHeight); + } + }, this.textResizeInterval); + } + 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()); + } + }, + + ieDeferSrc : false, + + textResizeInterval : 50 + }; + + pub.on = pub.addListener; + + pub.un = pub.removeListener; + + pub.stoppedMouseDownEvent = new Ext.util.Event(); + return pub; +}(); + +Ext.onReady = Ext.EventManager.onDocumentReady; + +Ext.onReady(function(){ + var bd = Ext.getBody(); + if(!bd){ return; } + + var cls = [ + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') + : Ext.isGecko ? "ext-gecko" + : Ext.isOpera ? "ext-opera" + : Ext.isSafari ? "ext-safari" : ""]; + + if(Ext.isMac){ + cls.push("ext-mac"); + } + if(Ext.isLinux){ + cls.push("ext-linux"); + } + if(Ext.isBorderBox){ + cls.push('ext-border-box'); + } + if(Ext.isStrict){ + var p = bd.dom.parentNode; + if(p){ + p.className += ' ext-strict'; + } + } + bd.addClass(cls.join(' ')); +}); + + +Ext.EventObject = function(){ + + var E = Ext.lib.Event; + + + var safariKeys = { + 63234 : 37, + 63235 : 39, + 63232 : 38, + 63233 : 40, + 63276 : 33, + 63277 : 34, + 63272 : 46, + 63273 : 36, + 63275 : 35 + }; + + + var btnMap = Ext.isIE ? {1:0,4:1,2:2} : + (Ext.isSafari ? {1:0,2:1,3:2} : {0:0,1:1,2:2}); + + Ext.EventObjectImpl = function(e){ + if(e){ + this.setEvent(e.browserEvent || e); + } + }; + Ext.EventObjectImpl.prototype = { + + browserEvent : null, + + button : -1, + + shiftKey : false, + + ctrlKey : false, + + altKey : false, + + + BACKSPACE : 8, + + TAB : 9, + + RETURN : 13, + + ENTER : 13, + + SHIFT : 16, + + CONTROL : 17, + + ESC : 27, + + SPACE : 32, + + PAGEUP : 33, + + PAGEDOWN : 34, + + END : 35, + + HOME : 36, + + LEFT : 37, + + UP : 38, + + RIGHT : 39, + + DOWN : 40, + + DELETE : 46, + + F5 : 116, + + + setEvent : function(e){ + if(e == this || (e && e.browserEvent)){ + return e; + } + this.browserEvent = e; + if(e){ + + this.button = e.button ? btnMap[e.button] : (e.which ? e.which-1 : -1); + if(e.type == 'click' && this.button == -1){ + this.button = 0; + } + this.type = e.type; + this.shiftKey = e.shiftKey; + + this.ctrlKey = e.ctrlKey || e.metaKey; + this.altKey = e.altKey; + + this.keyCode = e.keyCode; + this.charCode = e.charCode; + + this.target = E.getTarget(e); + + this.xy = E.getXY(e); + }else{ + this.button = -1; + this.shiftKey = false; + this.ctrlKey = false; + this.altKey = false; + this.keyCode = 0; + this.charCode =0; + this.target = null; + this.xy = [0, 0]; + } + return this; + }, + + + stopEvent : function(){ + if(this.browserEvent){ + if(this.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(this); + } + E.stopEvent(this.browserEvent); + } + }, + + + preventDefault : function(){ + if(this.browserEvent){ + E.preventDefault(this.browserEvent); + } + }, + + + isNavKeyPress : function(){ + var k = this.keyCode; + k = Ext.isSafari ? (safariKeys[k] || k) : k; + return (k >= 33 && k <= 40) || k == this.RETURN || k == this.TAB || k == this.ESC; + }, + + isSpecialKey : function(){ + var k = this.keyCode; + return (this.type == 'keypress' && this.ctrlKey) || k == 9 || k == 13 || k == 40 || k == 27 || + (k == 16) || (k == 17) || + (k >= 18 && k <= 20) || + (k >= 33 && k <= 35) || + (k >= 36 && k <= 39) || + (k >= 44 && k <= 45); + }, + + stopPropagation : function(){ + if(this.browserEvent){ + if(this.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(this); + } + E.stopPropagation(this.browserEvent); + } + }, + + + getCharCode : function(){ + return this.charCode || this.keyCode; + }, + + + getKey : function(){ + var k = this.keyCode || this.charCode; + return Ext.isSafari ? (safariKeys[k] || k) : k; + }, + + + getPageX : function(){ + return this.xy[0]; + }, + + + getPageY : function(){ + return this.xy[1]; + }, + + + getTime : function(){ + if(this.browserEvent){ + return E.getTime(this.browserEvent); + } + return null; + }, + + + getXY : function(){ + return this.xy; + }, + + + getTarget : function(selector, maxDepth, returnEl){ + var t = Ext.get(this.target); + return selector ? t.findParent(selector, maxDepth, returnEl) : (returnEl ? t : this.target); + }, + + + getRelatedTarget : function(){ + if(this.browserEvent){ + return E.getRelatedTarget(this.browserEvent); + } + return null; + }, + + + getWheelDelta : function(){ + var e = this.browserEvent; + var delta = 0; + if(e.wheelDelta){ + delta = e.wheelDelta/120; + }else if(e.detail){ + delta = -e.detail/3; + } + return delta; + }, + + + hasModifier : function(){ + return ((this.ctrlKey || this.altKey) || this.shiftKey) ? true : false; + }, + + + within : function(el, related){ + var t = this[related ? "getRelatedTarget" : "getTarget"](); + return t && Ext.fly(el).contains(t); + }, + + getPoint : function(){ + return new Ext.lib.Point(this.xy[0], this.xy[1]); + } + }; + + return new Ext.EventObjectImpl(); +}(); + +(function(){ +var D = Ext.lib.Dom; +var E = Ext.lib.Event; +var A = Ext.lib.Anim; + + +var propCache = {}; +var camelRe = /(-[a-z])/gi; +var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; +var view = document.defaultView; + +Ext.Element = function(element, forceNew){ + var dom = typeof element == "string" ? + document.getElementById(element) : element; + if(!dom){ + return null; + } + var id = dom.id; + if(forceNew !== true && id && Ext.Element.cache[id]){ + return Ext.Element.cache[id]; + } + + + this.dom = dom; + + + this.id = id || Ext.id(dom); +}; + +var El = Ext.Element; + +El.prototype = { + + originalDisplay : "", + + visibilityMode : 1, + + defaultUnit : "px", + + setVisibilityMode : function(visMode){ + this.visibilityMode = visMode; + return this; + }, + + enableDisplayMode : function(display){ + this.setVisibilityMode(El.DISPLAY); + if(typeof display != "undefined") this.originalDisplay = display; + return this; + }, + + + findParent : function(simpleSelector, maxDepth, returnEl){ + var p = this.dom, b = document.body, depth = 0, dq = Ext.DomQuery, stopEl; + maxDepth = maxDepth || 50; + if(typeof maxDepth != "number"){ + stopEl = Ext.getDom(maxDepth); + maxDepth = 10; + } + while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ + if(dq.is(p, simpleSelector)){ + return returnEl ? Ext.get(p) : p; + } + depth++; + p = p.parentNode; + } + 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); + }, + + + + + is : function(simpleSelector){ + return Ext.DomQuery.is(this.dom, simpleSelector); + }, + + + 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 || {}; + var anim = Ext.lib.Anim[animType]( + this.dom, args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || 'easeOut', + function(){ + Ext.callback(cb, this); + Ext.callback(opt.callback, opt.scope || this, [this, opt]); + }, + this + ); + opt.anim = anim; + 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]}); + }, + + + clean : function(forceReclean){ + if(this.isCleaned && forceReclean !== true){ + return this; + } + var ns = /\S/; + var d = this.dom, n = d.firstChild, ni = -1; + while(n){ + var nx = n.nextSibling; + if(n.nodeType == 3 && !ns.test(n.nodeValue)){ + d.removeChild(n); + }else{ + n.nodeIndex = ++ni; + } + n = nx; + } + this.isCleaned = true; + return this; + }, + + + scrollIntoView : function(container, hscroll){ + var c = Ext.getDom(container) || Ext.getBody().dom; + var el = this.dom; + + var o = this.getOffsetsTo(c), + l = o[0] + c.scrollLeft, + t = o[1] + c.scrollTop, + b = t+el.offsetHeight, + r = l+el.offsetWidth; + + var ch = c.clientHeight; + var ct = parseInt(c.scrollTop, 10); + var cl = parseInt(c.scrollLeft, 10); + var cb = ct + ch; + var cr = cl + c.clientWidth; + + if(el.offsetHeight > ch || t < ct){ + c.scrollTop = t; + }else if(b > cb){ + c.scrollTop = b-ch; + } + c.scrollTop = c.scrollTop; + + if(hscroll !== false){ + if(el.offsetWidth > c.clientWidth || l < cl){ + c.scrollLeft = l; + }else if(r > cr){ + c.scrollLeft = r-c.clientWidth; + } + c.scrollLeft = c.scrollLeft; + } + return this; + }, + + + scrollChildIntoView : function(child, hscroll){ + Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); + }, + + + autoHeight : function(animate, duration, onComplete, easing){ + var oldHeight = this.getHeight(); + this.clip(); + this.setHeight(1); + setTimeout(function(){ + var height = parseInt(this.dom.scrollHeight, 10); + if(!animate){ + this.setHeight(height); + this.unclip(); + if(typeof onComplete == "function"){ + onComplete(); + } + }else{ + this.setHeight(oldHeight); + this.setHeight(height, animate, duration, function(){ + this.unclip(); + if(typeof onComplete == "function") onComplete(); + }.createDelegate(this), easing); + } + }.createDelegate(this), 0); + return this; + }, + + + contains : function(el){ + if(!el){return false;} + return D.isAncestor(this.dom, el.dom ? el.dom : el); + }, + + + isVisible : function(deep) { + var vis = !(this.getStyle("visibility") == "hidden" || this.getStyle("display") == "none"); + if(deep !== true || !vis){ + return vis; + } + var p = this.dom.parentNode; + while(p && p.tagName.toLowerCase() != "body"){ + if(!Ext.fly(p, '_isVisible').isVisible()){ + return false; + } + p = p.parentNode; + } + return true; + }, + + + select : function(selector, unique){ + return El.select(selector, unique, this.dom); + }, + + + query : function(selector, unique){ + return Ext.DomQuery.select(selector, this.dom); + }, + + + child : function(selector, returnDom){ + var n = Ext.DomQuery.selectNode(selector, this.dom); + return returnDom ? n : Ext.get(n); + }, + + + down : function(selector, returnDom){ + var n = Ext.DomQuery.selectNode(" > " + selector, this.dom); + return returnDom ? n : Ext.get(n); + }, + + + 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); + }, + + + setVisible : function(visible, animate){ + if(!animate || !A){ + if(this.visibilityMode == El.DISPLAY){ + this.setDisplayed(visible); + }else{ + this.fixDisplay(); + this.dom.style.visibility = visible ? "visible" : "hidden"; + } + }else{ + + var dom = this.dom; + var visMode = this.visibilityMode; + if(visible){ + this.setOpacity(.01); + this.setVisible(true); + } + this.anim({opacity: { to: (visible?1:0) }}, + this.preanim(arguments, 1), + null, .35, 'easeIn', function(){ + if(!visible){ + if(visMode == El.DISPLAY){ + dom.style.display = "none"; + }else{ + dom.style.visibility = "hidden"; + } + Ext.get(dom).setOpacity(1); + } + }); + } + return this; + }, + + + isDisplayed : function() { + return this.getStyle("display") != "none"; + }, + + + toggle : function(animate){ + this.setVisible(!this.isVisible(), this.preanim(arguments, 0)); + return this; + }, + + + setDisplayed : function(value) { + if(typeof value == "boolean"){ + value = value ? this.originalDisplay : "none"; + } + this.setStyle("display", value); + return this; + }, + + + focus : function() { + try{ + this.dom.focus(); + }catch(e){} + return this; + }, + + + blur : function() { + try{ + this.dom.blur(); + }catch(e){} + return this; + }, + + + addClass : function(className){ + if(className instanceof Array){ + for(var i = 0, len = className.length; i < len; i++) { + this.addClass(className[i]); + } + }else{ + if(className && !this.hasClass(className)){ + this.dom.className = this.dom.className + " " + className; + } + } + return this; + }, + + + radioClass : function(className){ + var siblings = this.dom.parentNode.childNodes; + for(var i = 0; i < siblings.length; i++) { + var s = siblings[i]; + if(s.nodeType == 1){ + Ext.get(s).removeClass(className); + } + } + this.addClass(className); + return this; + }, + + + removeClass : function(className){ + if(!className || !this.dom.className){ + return this; + } + if(className instanceof Array){ + for(var i = 0, len = className.length; i < len; i++) { + this.removeClass(className[i]); + } + }else{ + if(this.hasClass(className)){ + var re = this.classReCache[className]; + if (!re) { + re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', "g"); + this.classReCache[className] = re; + } + this.dom.className = + this.dom.className.replace(re, " "); + } + } + return this; + }, + + + classReCache: {}, + + + toggleClass : function(className){ + if(this.hasClass(className)){ + this.removeClass(className); + }else{ + this.addClass(className); + } + return this; + }, + + + hasClass : function(className){ + return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; + }, + + + replaceClass : function(oldClassName, newClassName){ + this.removeClass(oldClassName); + this.addClass(newClassName); + return this; + }, + + + getStyles : function(){ + var a = arguments, len = a.length, r = {}; + for(var i = 0; i < len; i++){ + r[a[i]] = this.getStyle(a[i]); + } + return r; + }, + + + getStyle : function(){ + return view && view.getComputedStyle ? + function(prop){ + var el = this.dom, v, cs, camel; + if(prop == 'float'){ + prop = "cssFloat"; + } + if(v = el.style[prop]){ + return v; + } + if(cs = view.getComputedStyle(el, "")){ + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + return cs[camel]; + } + return null; + } : + function(prop){ + var el = this.dom, v, cs, camel; + if(prop == 'opacity'){ + if(typeof el.style.filter == 'string'){ + var m = el.style.filter.match(/alpha\(opacity=(.*)\)/i); + if(m){ + var fv = parseFloat(m[1]); + if(!isNaN(fv)){ + return fv ? fv / 100 : 0; + } + } + } + return 1; + }else if(prop == 'float'){ + prop = "styleFloat"; + } + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + if(v = el.style[camel]){ + return v; + } + if(cs = el.currentStyle){ + return cs[camel]; + } + return null; + }; + }(), + + + setStyle : function(prop, value){ + if(typeof prop == "string"){ + var camel; + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + if(camel == 'opacity') { + this.setOpacity(value); + }else{ + this.dom.style[camel] = value; + } + }else{ + for(var style in prop){ + if(typeof prop[style] != "function"){ + this.setStyle(style, prop[style]); + } + } + } + return this; + }, + + + applyStyles : function(style){ + Ext.DomHelper.applyStyles(this.dom, style); + return this; + }, + + + 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(); + var e = Ext.fly(el, '_internal').getXY(); + return [o[0]-e[0],o[1]-e[1]]; + }, + + + setX : function(x, animate){ + if(!animate || !A){ + D.setX(this.dom, x); + }else{ + this.setXY([x, this.getY()], this.preanim(arguments, 1)); + } + return this; + }, + + + setY : function(y, animate){ + if(!animate || !A){ + D.setY(this.dom, y); + }else{ + this.setXY([this.getX(), y], this.preanim(arguments, 1)); + } + return this; + }, + + + 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){ + if(!animate || !A){ + D.setXY(this.dom, pos); + }else{ + this.anim({points: {to: pos}}, this.preanim(arguments, 1), 'motion'); + } + return this; + }, + + + setLocation : function(x, y, animate){ + this.setXY([x, y], this.preanim(arguments, 2)); + return this; + }, + + + moveTo : function(x, y, animate){ + this.setXY([x, y], this.preanim(arguments, 2)); + return this; + }, + + + getRegion : function(){ + return D.getRegion(this.dom); + }, + + + getHeight : function(contentHeight){ + var h = this.dom.offsetHeight || 0; + h = contentHeight !== true ? h : h-this.getBorderWidth("tb")-this.getPadding("tb"); + return h < 0 ? 0 : h; + }, + + + getWidth : function(contentWidth){ + var w = this.dom.offsetWidth || 0; + w = contentWidth !== true ? w : w-this.getBorderWidth("lr")-this.getPadding("lr"); + return w < 0 ? 0 : w; + }, + + + getComputedHeight : function(){ + var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight); + if(!h){ + h = parseInt(this.getStyle('height'), 10) || 0; + if(!this.isBorderBox()){ + h += this.getFrameWidth('tb'); + } + } + return h; + }, + + + getComputedWidth : function(){ + var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); + if(!w){ + w = parseInt(this.getStyle('width'), 10) || 0; + if(!this.isBorderBox()){ + w += this.getFrameWidth('lr'); + } + } + return w; + }, + + + getSize : function(contentSize){ + return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; + }, + + getStyleSize : function(){ + var w, h, d = this.dom, s = d.style; + if(s.width && s.width != 'auto'){ + w = parseInt(s.width, 10); + if(Ext.isBorderBox){ + w -= this.getFrameWidth('lr'); + } + } + if(s.height && s.height != 'auto'){ + h = parseInt(s.height, 10); + if(Ext.isBorderBox){ + h -= this.getFrameWidth('tb'); + } + } + return {width: w || this.getWidth(true), height: h || this.getHeight(true)}; + + }, + + + getViewSize : function(){ + var d = this.dom, doc = document, aw = 0, ah = 0; + if(d == doc || d == doc.body){ + return {width : D.getViewWidth(), height: D.getViewHeight()}; + }else{ + return { + width : d.clientWidth, + height: d.clientHeight + }; + } + }, + + + getValue : function(asNumber){ + return asNumber ? parseInt(this.dom.value, 10) : this.dom.value; + }, + + + adjustWidth : function(width){ + if(typeof width == "number"){ + if(this.autoBoxAdjust && !this.isBorderBox()){ + width -= (this.getBorderWidth("lr") + this.getPadding("lr")); + } + if(width < 0){ + width = 0; + } + } + return width; + }, + + + adjustHeight : function(height){ + if(typeof height == "number"){ + if(this.autoBoxAdjust && !this.isBorderBox()){ + height -= (this.getBorderWidth("tb") + this.getPadding("tb")); + } + if(height < 0){ + height = 0; + } + } + return height; + }, + + + setWidth : function(width, animate){ + width = this.adjustWidth(width); + if(!animate || !A){ + this.dom.style.width = this.addUnits(width); + }else{ + this.anim({width: {to: width}}, this.preanim(arguments, 1)); + } + return this; + }, + + + setHeight : function(height, animate){ + height = this.adjustHeight(height); + if(!animate || !A){ + this.dom.style.height = this.addUnits(height); + }else{ + this.anim({height: {to: height}}, this.preanim(arguments, 1)); + } + return this; + }, + + + setSize : function(width, height, animate){ + if(typeof width == "object"){ + height = width.height; width = width.width; + } + width = this.adjustWidth(width); height = this.adjustHeight(height); + if(!animate || !A){ + this.dom.style.width = this.addUnits(width); + this.dom.style.height = this.addUnits(height); + }else{ + this.anim({width: {to: width}, height: {to: height}}, this.preanim(arguments, 2)); + } + return this; + }, + + + setBounds : function(x, y, width, height, animate){ + if(!animate || !A){ + this.setSize(width, height); + this.setLocation(x, y); + }else{ + width = this.adjustWidth(width); height = this.adjustHeight(height); + this.anim({points: {to: [x, y]}, width: {to: width}, height: {to: height}}, + this.preanim(arguments, 4), 'motion'); + } + return this; + }, + + + setRegion : function(region, animate){ + this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.preanim(arguments, 1)); + return this; + }, + + + addListener : function(eventName, fn, scope, options){ + Ext.EventManager.on(this.dom, eventName, fn, scope || this, options); + }, + + + removeListener : function(eventName, fn){ + Ext.EventManager.removeListener(this.dom, eventName, fn); + return this; + }, + + + removeAllListeners : function(){ + E.purgeElement(this.dom); + return this; + }, + + + relayEvent : function(eventName, observable){ + this.on(eventName, function(e){ + observable.fireEvent(eventName, e); + }); + }, + + + setOpacity : function(opacity, animate){ + if(!animate || !A){ + var s = this.dom.style; + if(Ext.isIE){ + s.zoom = 1; + s.filter = (s.filter || '').replace(/alpha\([^\)]*\)/gi,"") + + (opacity == 1 ? "" : " alpha(opacity=" + opacity * 100 + ")"); + }else{ + s.opacity = opacity; + } + }else{ + this.anim({opacity: {to: opacity}}, this.preanim(arguments, 1), null, .35, 'easeIn'); + } + return this; + }, + + + getLeft : function(local){ + if(!local){ + return this.getX(); + }else{ + return parseInt(this.getStyle("left"), 10) || 0; + } + }, + + + getRight : function(local){ + if(!local){ + return this.getX() + this.getWidth(); + }else{ + return (this.getLeft(true) + this.getWidth()) || 0; + } + }, + + + getTop : function(local) { + if(!local){ + return this.getY(); + }else{ + return parseInt(this.getStyle("top"), 10) || 0; + } + }, + + + getBottom : function(local){ + if(!local){ + return this.getY() + this.getHeight(); + }else{ + return (this.getTop(true) + this.getHeight()) || 0; + } + }, + + + position : function(pos, zIndex, x, y){ + if(!pos){ + if(this.getStyle('position') == 'static'){ + this.setStyle('position', 'relative'); + } + }else{ + this.setStyle("position", pos); + } + if(zIndex){ + this.setStyle("z-index", zIndex); + } + if(x !== undefined && y !== undefined){ + this.setXY([x, y]); + }else if(x !== undefined){ + this.setX(x); + }else if(y !== undefined){ + this.setY(y); + } + }, + + + clearPositioning : function(value){ + value = value ||''; + this.setStyle({ + "left": value, + "right": value, + "top": value, + "bottom": value, + "z-index": "", + "position" : "static" + }); + return this; + }, + + + getPositioning : function(){ + var l = this.getStyle("left"); + var t = this.getStyle("top"); + return { + "position" : this.getStyle("position"), + "left" : l, + "right" : l ? "" : this.getStyle("right"), + "top" : t, + "bottom" : t ? "" : this.getStyle("bottom"), + "z-index" : this.getStyle("z-index") + }; + }, + + + getBorderWidth : function(side){ + return this.addStyles(side, El.borders); + }, + + + getPadding : function(side){ + return this.addStyles(side, El.paddings); + }, + + + setPositioning : function(pc){ + this.applyStyles(pc); + if(pc.right == "auto"){ + this.dom.style.right = ""; + } + if(pc.bottom == "auto"){ + this.dom.style.bottom = ""; + } + return this; + }, + + + fixDisplay : function(){ + if(this.getStyle("display") == "none"){ + this.setStyle("visibility", "hidden"); + this.setStyle("display", this.originalDisplay); + if(this.getStyle("display") == "none"){ + this.setStyle("display", "block"); + } + } + }, + + + setLeftTop : function(left, top){ + this.dom.style.left = this.addUnits(left); + this.dom.style.top = this.addUnits(top); + return this; + }, + + + move : function(direction, distance, animate){ + var xy = this.getXY(); + direction = direction.toLowerCase(); + switch(direction){ + case "l": + case "left": + this.moveTo(xy[0]-distance, xy[1], this.preanim(arguments, 2)); + break; + case "r": + case "right": + this.moveTo(xy[0]+distance, xy[1], this.preanim(arguments, 2)); + break; + case "t": + case "top": + case "up": + this.moveTo(xy[0], xy[1]-distance, this.preanim(arguments, 2)); + break; + case "b": + case "bottom": + case "down": + this.moveTo(xy[0], xy[1]+distance, this.preanim(arguments, 2)); + break; + } + return this; + }, + + + clip : function(){ + if(!this.isClipped){ + this.isClipped = true; + this.originalClip = { + "o": this.getStyle("overflow"), + "x": this.getStyle("overflow-x"), + "y": this.getStyle("overflow-y") + }; + this.setStyle("overflow", "hidden"); + this.setStyle("overflow-x", "hidden"); + this.setStyle("overflow-y", "hidden"); + } + return this; + }, + + + unclip : function(){ + if(this.isClipped){ + this.isClipped = false; + var o = this.originalClip; + if(o.o){this.setStyle("overflow", o.o);} + if(o.x){this.setStyle("overflow-x", o.x);} + if(o.y){this.setStyle("overflow-y", o.y);} + } + return this; + }, + + + + getAnchorXY : function(anchor, local, s){ + + + + var w, h, vp = false; + if(!s){ + var d = this.dom; + if(d == document.body || d == document){ + vp = true; + w = D.getViewWidth(); h = D.getViewHeight(); + }else{ + w = this.getWidth(); h = this.getHeight(); + } + }else{ + w = s.width; h = s.height; + } + var x = 0, y = 0, r = Math.round; + switch((anchor || "tl").toLowerCase()){ + case "c": + x = r(w*.5); + y = r(h*.5); + break; + case "t": + x = r(w*.5); + y = 0; + break; + case "l": + x = 0; + y = r(h*.5); + break; + case "r": + x = w; + y = r(h*.5); + break; + case "b": + x = r(w*.5); + y = h; + break; + case "tl": + x = 0; + y = 0; + break; + case "bl": + x = 0; + y = h; + break; + case "br": + x = w; + y = h; + break; + case "tr": + x = w; + y = 0; + break; + } + if(local === true){ + return [x, y]; + } + if(vp){ + var sc = this.getScroll(); + return [x + sc.left, y + sc.top]; + } + + var o = this.getXY(); + return [x+o[0], y+o[1]]; + }, + + + getAlignToXY : function(el, p, o){ + el = Ext.get(el); + if(!el || !el.dom){ + throw "Element.alignToXY with an element that doesn't exist"; + } + var d = this.dom; + var c = false; + var p1 = "", p2 = ""; + o = o || [0,0]; + + if(!p){ + p = "tl-bl"; + }else if(p == "?"){ + p = "tl-bl?"; + }else if(p.indexOf("-") == -1){ + p = "tl-" + p; + } + p = p.toLowerCase(); + var m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); + if(!m){ + throw "Element.alignTo with an invalid alignment " + p; + } + p1 = m[1]; p2 = m[2]; c = !!m[3]; + + + + var a1 = this.getAnchorXY(p1, true); + var a2 = el.getAnchorXY(p2, false); + + var x = a2[0] - a1[0] + o[0]; + var y = a2[1] - a1[1] + o[1]; + + if(c){ + + var w = this.getWidth(), h = this.getHeight(), r = el.getRegion(); + + var dw = D.getViewWidth()-5, dh = D.getViewHeight()-5; + + + + + var p1y = p1.charAt(0), p1x = p1.charAt(p1.length-1); + var p2y = p2.charAt(0), p2x = p2.charAt(p2.length-1); + var swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); + var swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); + + var doc = document; + var scrollX = (doc.documentElement.scrollLeft || doc.body.scrollLeft || 0)+5; + var scrollY = (doc.documentElement.scrollTop || doc.body.scrollTop || 0)+5; + + if((x+w) > dw + scrollX){ + x = swapX ? r.left-w : dw+scrollX-w; + } + if(x < scrollX){ + x = swapX ? r.right : scrollX; + } + if((y+h) > dh + scrollY){ + y = swapY ? r.top-h : dh+scrollY-h; + } + if (y < scrollY){ + y = swapY ? r.bottom : scrollY; + } + } + return [x,y]; + }, + + + getConstrainToXY : function(){ + var os = {top:0, left:0, bottom:0, right: 0}; + + return function(el, local, offsets, proposedXY){ + el = Ext.get(el); + offsets = offsets ? Ext.applyIf(offsets, os) : os; + + var vw, vh, vx = 0, vy = 0; + if(el.dom == document.body || el.dom == document){ + vw = Ext.lib.Dom.getViewWidth(); + vh = Ext.lib.Dom.getViewHeight(); + }else{ + vw = el.dom.clientWidth; + vh = el.dom.clientHeight; + if(!local){ + var vxy = el.getXY(); + vx = vxy[0]; + vy = vxy[1]; + } + } + + var s = el.getScroll(); + + vx += offsets.left + s.left; + vy += offsets.top + s.top; + + vw -= offsets.right; + vh -= offsets.bottom; + + var vr = vx+vw; + var vb = vy+vh; + + var xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]); + var x = xy[0], y = xy[1]; + var w = this.dom.offsetWidth, h = this.dom.offsetHeight; + + + var moved = false; + + + if((x + w) > vr){ + x = vr - w; + moved = true; + } + if((y + h) > vb){ + y = vb - h; + moved = true; + } + + if(x < vx){ + x = vx; + moved = true; + } + if(y < vy){ + y = vy; + moved = true; + } + return moved ? [x, y] : false; + }; + }(), + + + adjustForConstraints : function(xy, parent, offsets){ + return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; + }, + + + alignTo : function(element, position, offsets, animate){ + var xy = this.getAlignToXY(element, position, offsets); + this.setXY(xy, this.preanim(arguments, 3)); + return this; + }, + + + anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){ + var action = function(){ + this.alignTo(el, alignment, offsets, animate); + Ext.callback(callback, this); + }; + Ext.EventManager.onWindowResize(action, this); + var tm = typeof monitorScroll; + if(tm != 'undefined'){ + Ext.EventManager.on(window, 'scroll', action, this, + {buffer: tm == 'number' ? monitorScroll : 50}); + } + action.call(this); + return this; + }, + + clearOpacity : function(){ + if (window.ActiveXObject) { + if(typeof this.dom.style.filter == 'string' && (/alpha/i).test(this.dom.style.filter)){ + this.dom.style.filter = ""; + } + } else { + this.dom.style.opacity = ""; + this.dom.style["-moz-opacity"] = ""; + this.dom.style["-khtml-opacity"] = ""; + } + return this; + }, + + + hide : function(animate){ + this.setVisible(false, this.preanim(arguments, 0)); + return this; + }, + + + show : function(animate){ + this.setVisible(true, this.preanim(arguments, 0)); + return this; + }, + + + addUnits : function(size){ + return Ext.Element.addUnits(size, this.defaultUnit); + }, + + + update : function(html, loadScripts, callback){ + if(typeof html == "undefined"){ + html = ""; + } + if(loadScripts !== true){ + this.dom.innerHTML = html; + if(typeof callback == "function"){ + callback(); + } + return this; + } + var id = Ext.id(); + var dom = this.dom; + + html += ''; + + E.onAvailable(id, function(){ + var hd = document.getElementsByTagName("head")[0]; + var re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig; + var srcRe = /\ssrc=([\'\"])(.*?)\1/i; + var typeRe = /\stype=([\'\"])(.*?)\1/i; + + var match; + while(match = re.exec(html)){ + var attrs = match[1]; + var srcMatch = attrs ? attrs.match(srcRe) : false; + if(srcMatch && srcMatch[2]){ + var s = document.createElement("script"); + s.src = srcMatch[2]; + var typeMatch = attrs.match(typeRe); + if(typeMatch && typeMatch[2]){ + s.type = typeMatch[2]; + } + hd.appendChild(s); + }else if(match[2] && match[2].length > 0){ + if(window.execScript) { + window.execScript(match[2]); + } else { + window.eval(match[2]); + } + } + } + var el = document.getElementById(id); + if(el){Ext.removeNode(el);} + if(typeof callback == "function"){ + callback(); + } + }); + dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); + return this; + }, + + + load : function(){ + var um = this.getUpdater(); + um.update.apply(um, arguments); + return this; + }, + + + getUpdater : function(){ + if(!this.updateManager){ + this.updateManager = new Ext.Updater(this); + } + return this.updateManager; + }, + + + unselectable : function(){ + this.dom.unselectable = "on"; + this.swallowEvent("selectstart", true); + this.applyStyles("-moz-user-select:none;-khtml-user-select:none;"); + this.addClass("x-unselectable"); + return this; + }, + + + getCenterXY : function(){ + return this.getAlignToXY(document, 'c-c'); + }, + + + center : function(centerIn){ + this.alignTo(centerIn || document, 'c-c'); + return this; + }, + + + isBorderBox : function(){ + return noBoxAdjust[this.dom.tagName.toLowerCase()] || Ext.isBorderBox; + }, + + + getBox : function(contentBox, local){ + var xy; + if(!local){ + xy = this.getXY(); + }else{ + var left = parseInt(this.getStyle("left"), 10) || 0; + var top = parseInt(this.getStyle("top"), 10) || 0; + xy = [left, top]; + } + var el = this.dom, w = el.offsetWidth, h = el.offsetHeight, bx; + if(!contentBox){ + bx = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: w, height: h}; + }else{ + var l = this.getBorderWidth("l")+this.getPadding("l"); + var r = this.getBorderWidth("r")+this.getPadding("r"); + var t = this.getBorderWidth("t")+this.getPadding("t"); + var b = this.getBorderWidth("b")+this.getPadding("b"); + bx = {x: xy[0]+l, y: xy[1]+t, 0: xy[0]+l, 1: xy[1]+t, width: w-(l+r), height: h-(t+b)}; + } + bx.right = bx.x + bx.width; + bx.bottom = bx.y + bx.height; + return bx; + }, + + + getFrameWidth : function(sides, onlyContentBox){ + return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); + }, + + + setBox : function(box, adjust, animate){ + var w = box.width, h = box.height; + if((adjust && !this.autoBoxAdjust) && !this.isBorderBox()){ + w -= (this.getBorderWidth("lr") + this.getPadding("lr")); + h -= (this.getBorderWidth("tb") + this.getPadding("tb")); + } + this.setBounds(box.x, box.y, w, h, this.preanim(arguments, 2)); + return this; + }, + + + repaint : function(){ + var dom = this.dom; + this.addClass("x-repaint"); + setTimeout(function(){ + Ext.get(dom).removeClass("x-repaint"); + }, 1); + return this; + }, + + + getMargins : function(side){ + if(!side){ + return { + top: parseInt(this.getStyle("margin-top"), 10) || 0, + left: parseInt(this.getStyle("margin-left"), 10) || 0, + bottom: parseInt(this.getStyle("margin-bottom"), 10) || 0, + right: parseInt(this.getStyle("margin-right"), 10) || 0 + }; + }else{ + return this.addStyles(side, El.margins); + } + }, + + + addStyles : function(sides, styles){ + var val = 0, v, w; + for(var i = 0, len = sides.length; i < len; i++){ + v = this.getStyle(styles[sides.charAt(i)]); + if(v){ + w = parseInt(v, 10); + if(w){ val += (w >= 0 ? w : -1 * w); } + } + } + return val; + }, + + + createProxy : function(config, renderTo, matchBox){ + config = typeof config == "object" ? + config : {tag : "div", cls: config}; + + var proxy; + if(renderTo){ + proxy = Ext.DomHelper.append(renderTo, config, true); + }else { + proxy = Ext.DomHelper.insertBefore(this.dom, config, true); + } + if(matchBox){ + proxy.setBox(this.getBox()); + } + return proxy; + }, + + + mask : function(msg, msgCls){ + if(this.getStyle("position") == "static"){ + this.setStyle("position", "relative"); + } + if(this._maskMsg){ + this._maskMsg.remove(); + } + if(this._mask){ + this._mask.remove(); + } + + this._mask = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask"}, true); + + this.addClass("x-masked"); + this._mask.setDisplayed(true); + if(typeof msg == 'string'){ + this._maskMsg = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask-msg", cn:{tag:'div'}}, true); + var mm = this._maskMsg; + mm.dom.className = msgCls ? "ext-el-mask-msg " + msgCls : "ext-el-mask-msg"; + mm.dom.firstChild.innerHTML = msg; + mm.setDisplayed(true); + mm.center(this); + } + if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && this.getStyle('height') == 'auto'){ + this._mask.setSize(this.dom.clientWidth, this.getHeight()); + } + return this._mask; + }, + + + unmask : function(){ + if(this._mask){ + if(this._maskMsg){ + this._maskMsg.remove(); + delete this._maskMsg; + } + this._mask.remove(); + delete this._mask; + } + this.removeClass("x-masked"); + }, + + + isMasked : function(){ + return this._mask && this._mask.isVisible(); + }, + + + createShim : function(){ + var el = document.createElement('iframe'); + el.frameBorder = 'no'; + el.className = 'ext-shim'; + if(Ext.isIE && Ext.isSecure){ + el.src = Ext.SSL_SECURE_URL; + } + var shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); + shim.autoBoxAdjust = false; + return shim; + }, + + + remove : function(){ + Ext.removeNode(this.dom); + delete El.cache[this.dom.id]; + }, + + + hover : function(overFn, outFn, scope){ + var preOverFn = function(e){ + if(!e.within(this, true)){ + overFn.apply(scope || this, arguments); + } + }; + var preOutFn = function(e){ + if(!e.within(this, true)){ + outFn.apply(scope || this, arguments); + } + }; + this.on("mouseover", preOverFn, this.dom); + this.on("mouseout", preOutFn, this.dom); + return this; + }, + + + addClassOnOver : function(className, preventFlicker){ + this.hover( + function(){ + Ext.fly(this, '_internal').addClass(className); + }, + function(){ + Ext.fly(this, '_internal').removeClass(className); + } + ); + return this; + }, + + + addClassOnFocus : function(className){ + this.on("focus", function(){ + Ext.fly(this, '_internal').addClass(className); + }, this.dom); + this.on("blur", function(){ + Ext.fly(this, '_internal').removeClass(className); + }, this.dom); + return this; + }, + + addClassOnClick : function(className){ + var dom = this.dom; + this.on("mousedown", function(){ + Ext.fly(dom, '_internal').addClass(className); + var d = Ext.getDoc(); + var fn = function(){ + Ext.fly(dom, '_internal').removeClass(className); + d.removeListener("mouseup", fn); + }; + d.on("mouseup", fn); + }); + return this; + }, + + + swallowEvent : function(eventName, preventDefault){ + var fn = function(e){ + e.stopPropagation(); + if(preventDefault){ + e.preventDefault(); + } + }; + if(eventName instanceof Array){ + for(var i = 0, len = eventName.length; i < len; i++){ + this.on(eventName[i], fn); + } + return this; + } + this.on(eventName, fn); + return this; + }, + + + 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){ + if(n.nodeType == 1 && (!selector || Ext.DomQuery.is(n, selector))){ + return !returnDom ? Ext.get(n) : n; + } + n = n[dir]; + } + return null; + }, + + + appendChild: function(el){ + el = Ext.get(el); + el.appendTo(this); + return this; + }, + + + createChild: function(config, insertBefore, returnDom){ + config = config || {tag:'div'}; + if(insertBefore){ + return Ext.DomHelper.insertBefore(insertBefore, config, returnDom !== true); + } + return Ext.DomHelper[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); + }, + + + appendTo: function(el){ + el = Ext.getDom(el); + el.appendChild(this.dom); + return this; + }, + + + insertBefore: function(el){ + el = Ext.getDom(el); + el.parentNode.insertBefore(this.dom, el); + return this; + }, + + + insertAfter: function(el){ + el = Ext.getDom(el); + el.parentNode.insertBefore(this.dom, el.nextSibling); + return this; + }, + + + insertFirst: function(el, returnDom){ + el = el || {}; + if(typeof el == 'object' && !el.nodeType){ + return this.createChild(el, this.dom.firstChild, returnDom); + }else{ + el = Ext.getDom(el); + this.dom.insertBefore(el, this.dom.firstChild); + return !returnDom ? Ext.get(el) : el; + } + }, + + + insertSibling: function(el, where, returnDom){ + var rt; + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++){ + rt = this.insertSibling(el[i], where, returnDom); + } + return rt; + } + where = where ? where.toLowerCase() : 'before'; + el = el || {}; + var refNode = where == 'before' ? this.dom : this.dom.nextSibling; + + if(typeof el == 'object' && !el.nodeType){ + if(where == 'after' && !this.dom.nextSibling){ + rt = Ext.DomHelper.append(this.dom.parentNode, el, !returnDom); + }else{ + rt = Ext.DomHelper[where == 'after' ? 'insertAfter' : 'insertBefore'](this.dom, el, !returnDom); + } + + }else{ + rt = this.dom.parentNode.insertBefore(Ext.getDom(el), refNode); + if(!returnDom){ + rt = Ext.get(rt); + } + } + return rt; + }, + + + wrap: function(config, returnDom){ + if(!config){ + config = {tag: "div"}; + } + var newEl = Ext.DomHelper.insertBefore(this.dom, config, !returnDom); + newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); + return newEl; + }, + + + replace: function(el){ + el = Ext.get(el); + this.insertBefore(el); + el.remove(); + return this; + }, + + + replaceWith: function(el){ + if(typeof el == 'object' && !el.nodeType){ + el = this.insertSibling(el, 'before'); + }else{ + el = Ext.getDom(el); + this.dom.parentNode.insertBefore(el, this.dom); + } + El.uncache(this.id); + this.dom.parentNode.removeChild(this.dom); + this.dom = el; + this.id = Ext.id(el); + El.cache[this.id] = this; + return this; + }, + + + insertHtml : function(where, html, returnEl){ + var el = Ext.DomHelper.insertHtml(where, this.dom, html); + return returnEl ? Ext.get(el) : el; + }, + + + set : function(o, useSet){ + var el = this.dom; + useSet = typeof useSet == 'undefined' ? (el.setAttribute ? true : false) : useSet; + for(var attr in o){ + if(attr == "style" || typeof o[attr] == "function") continue; + if(attr=="cls"){ + el.className = o["cls"]; + }else if(o.hasOwnProperty(attr)){ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + if(o.style){ + Ext.DomHelper.applyStyles(el, o.style); + } + return this; + }, + + + addKeyListener : function(key, fn, scope){ + var config; + if(typeof key != "object" || key instanceof Array){ + config = { + key: key, + fn: fn, + scope: scope + }; + }else{ + config = { + key : key.key, + shift : key.shift, + ctrl : key.ctrl, + alt : key.alt, + fn: fn, + scope: scope + }; + } + return new Ext.KeyMap(this, config); + }, + + + addKeyMap : function(config){ + return new Ext.KeyMap(this, config); + }, + + + isScrollable : function(){ + var dom = this.dom; + return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth; + }, + + + scrollTo : function(side, value, animate){ + var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop"; + if(!animate || !A){ + this.dom[prop] = value; + }else{ + var to = prop == "scrollLeft" ? [value, this.dom.scrollTop] : [this.dom.scrollLeft, value]; + this.anim({scroll: {"to": to}}, this.preanim(arguments, 2), 'scroll'); + } + return this; + }, + + + scroll : function(direction, distance, animate){ + if(!this.isScrollable()){ + return; + } + var el = this.dom; + var l = el.scrollLeft, t = el.scrollTop; + var w = el.scrollWidth, h = el.scrollHeight; + var cw = el.clientWidth, ch = el.clientHeight; + direction = direction.toLowerCase(); + var scrolled = false; + var a = this.preanim(arguments, 2); + switch(direction){ + case "l": + case "left": + if(w - l > cw){ + var v = Math.min(l + distance, w-cw); + this.scrollTo("left", v, a); + scrolled = true; + } + break; + case "r": + case "right": + if(l > 0){ + var v = Math.max(l - distance, 0); + this.scrollTo("left", v, a); + scrolled = true; + } + break; + case "t": + case "top": + case "up": + if(t > 0){ + var v = Math.max(t - distance, 0); + this.scrollTo("top", v, a); + scrolled = true; + } + break; + case "b": + case "bottom": + case "down": + if(h - t > ch){ + var v = Math.min(t + distance, h-ch); + this.scrollTo("top", v, a); + scrolled = true; + } + break; + } + return scrolled; + }, + + + translatePoints : function(x, y){ + if(typeof x == 'object' || x instanceof Array){ + y = x[1]; x = x[0]; + } + var p = this.getStyle('position'); + var o = this.getXY(); + + var l = parseInt(this.getStyle('left'), 10); + var t = parseInt(this.getStyle('top'), 10); + + if(isNaN(l)){ + l = (p == "relative") ? 0 : this.dom.offsetLeft; + } + if(isNaN(t)){ + t = (p == "relative") ? 0 : this.dom.offsetTop; + } + + return {left: (x - o[0] + l), top: (y - o[1] + t)}; + }, + + + getScroll : function(){ + var d = this.dom, doc = document; + if(d == doc || d == doc.body){ + var l, t; + if(Ext.isIE && Ext.isStrict){ + l = doc.documentElement.scrollLeft || (doc.body.scrollLeft || 0); + t = doc.documentElement.scrollTop || (doc.body.scrollTop || 0); + }else{ + l = window.pageXOffset || (doc.body.scrollLeft || 0); + t = window.pageYOffset || (doc.body.scrollTop || 0); + } + return {left: l, top: t}; + }else{ + return {left: d.scrollLeft, top: d.scrollTop}; + } + }, + + + getColor : function(attr, defaultValue, prefix){ + var v = this.getStyle(attr); + if(!v || v == "transparent" || v == "inherit") { + return defaultValue; + } + var color = typeof prefix == "undefined" ? "#" : prefix; + if(v.substr(0, 4) == "rgb("){ + var rvs = v.slice(4, v.length -1).split(","); + for(var i = 0; i < 3; i++){ + var h = parseInt(rvs[i]); + var s = h.toString(16); + if(h < 16){ + s = "0" + s; + } + color += s; + } + } else { + if(v.substr(0, 1) == "#"){ + if(v.length == 4) { + for(var i = 1; i < 4; i++){ + var c = v.charAt(i); + color += c + c; + } + }else if(v.length == 7){ + color += v.substr(1); + } + } + } + return(color.length > 5 ? color.toLowerCase() : defaultValue); + }, + + + boxWrap : function(cls){ + cls = cls || 'x-box'; + var el = Ext.get(this.insertHtml('beforeBegin', String.format('
      '+El.boxMarkup+'
      ', cls))); + el.child('.'+cls+'-mc').dom.appendChild(this.dom); + return el; + }, + + + getAttributeNS : Ext.isIE ? function(ns, name){ + var d = this.dom; + var type = typeof d[ns+":"+name]; + if(type != 'undefined' && type != 'unknown'){ + return d[ns+":"+name]; + } + return d[name]; + } : function(ns, name){ + var d = this.dom; + return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name]; + }, + + 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); + } +}; + +var ep = El.prototype; + + +ep.on = ep.addListener; + +ep.mon = ep.addListener; + +ep.getUpdateManager = ep.getUpdater; + + +ep.un = ep.removeListener; + + +ep.autoBoxAdjust = true; + + +El.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i; + + +El.addUnits = function(v, defaultUnit){ + if(v === "" || v == "auto"){ + return v; + } + if(v === undefined){ + return ''; + } + if(typeof v == "number" || !El.unitPattern.test(v)){ + return v + (defaultUnit || 'px'); + } + return v; +}; + + +El.boxMarkup = '
      '; + +El.VISIBILITY = 1; + +El.DISPLAY = 2; + +El.borders = {l: "border-left-width", r: "border-right-width", t: "border-top-width", b: "border-bottom-width"}; +El.paddings = {l: "padding-left", r: "padding-right", t: "padding-top", b: "padding-bottom"}; +El.margins = {l: "margin-left", r: "margin-right", t: "margin-top", b: "margin-bottom"}; + + + + +El.cache = {}; + +var docEl; + + +El.get = function(el){ + var ex, elm, id; + if(!el){ return null; } + if(typeof el == "string"){ + if(!(elm = document.getElementById(el))){ + return null; + } + if(ex = El.cache[el]){ + ex.dom = elm; + }else{ + ex = El.cache[el] = new El(elm); + } + return ex; + }else if(el.tagName){ + if(!(id = el.id)){ + id = Ext.id(el); + } + if(ex = El.cache[id]){ + ex.dom = el; + }else{ + ex = El.cache[id] = new El(el); + } + return ex; + }else if(el instanceof El){ + if(el != docEl){ + el.dom = document.getElementById(el.id) || el.dom; + + El.cache[el.id] = el; + } + return el; + }else if(el.isComposite){ + return el; + }else if(el instanceof Array){ + return El.select(el); + }else if(el == document){ + + if(!docEl){ + var f = function(){}; + f.prototype = El.prototype; + docEl = new f(); + docEl.dom = document; + } + return docEl; + } + return null; +}; + + +El.uncache = function(el){ + for(var i = 0, a = arguments, len = a.length; i < len; i++) { + if(a[i]){ + delete El.cache[a[i].id || a[i]]; + } + } +}; + + + + +El.garbageCollect = function(){ + if(!Ext.enableGarbageCollector){ + clearInterval(El.collectorThread); + return; + } + for(var eid in El.cache){ + var el = El.cache[eid], d = el.dom; + + + + + + + + + + + + + + + + + + if(!d || !d.parentNode || (!d.offsetParent && !document.getElementById(eid))){ + delete El.cache[eid]; + if(d && Ext.enableListenerCollection){ + E.purgeElement(d); + } + } + } +} +El.collectorThreadId = setInterval(El.garbageCollect, 30000); + +var flyFn = function(){}; +flyFn.prototype = El.prototype; +var _cls = new flyFn(); + + +El.Flyweight = function(dom){ + this.dom = dom; +}; + +El.Flyweight.prototype = _cls; +El.Flyweight.prototype.isFlyweight = true; + +El._flyweights = {}; + +El.fly = function(el, named){ + named = named || '_global'; + el = Ext.getDom(el); + if(!el){ + return null; + } + if(!El._flyweights[named]){ + El._flyweights[named] = new El.Flyweight(); + } + El._flyweights[named].dom = el; + return El._flyweights[named]; +}; + + +Ext.get = El.get; + +Ext.fly = El.fly; + + +var noBoxAdjust = Ext.isStrict ? { + select:1 +} : { + input:1, select:1, textarea:1 +}; +if(Ext.isIE || Ext.isGecko){ + noBoxAdjust['button'] = 1; +} + + +Ext.EventManager.on(window, 'unload', function(){ + delete El.cache; + delete El._flyweights; +}); +})(); + +Ext.enableFx = true; + + +Ext.Fx = { + + slideIn : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + + anchor = anchor || "t"; + + this.fixDisplay(); + + var r = this.getFxRestore(); + var b = this.getBox(); + this.setSize(b); + + var wrap = this.fxWrap(r.pos, o, "hidden"); + + var st = this.dom.style; + st.visibility = "visible"; + st.position = "absolute"; + + var after = function(){ + el.fxUnwrap(wrap, r.pos, o); + st.width = r.width; + st.height = r.height; + el.afterFx(o); + }; + var a, pt = {to: [b.x, b.y]}, bw = {to: b.width}, bh = {to: b.height}; + + switch(anchor.toLowerCase()){ + case "t": + wrap.setSize(b.width, 0); + st.left = st.bottom = "0"; + a = {height: bh}; + break; + case "l": + wrap.setSize(0, b.height); + st.right = st.top = "0"; + a = {width: bw}; + break; + case "r": + wrap.setSize(0, b.height); + wrap.setX(b.right); + st.left = st.top = "0"; + a = {width: bw, points: pt}; + break; + case "b": + wrap.setSize(b.width, 0); + wrap.setY(b.bottom); + st.left = st.top = "0"; + a = {height: bh, points: pt}; + break; + case "tl": + wrap.setSize(0, 0); + st.right = st.bottom = "0"; + a = {width: bw, height: bh}; + break; + case "bl": + wrap.setSize(0, 0); + wrap.setY(b.y+b.height); + st.right = st.top = "0"; + a = {width: bw, height: bh, points: pt}; + break; + case "br": + wrap.setSize(0, 0); + wrap.setXY([b.right, b.bottom]); + st.left = st.top = "0"; + a = {width: bw, height: bh, points: pt}; + break; + case "tr": + wrap.setSize(0, 0); + wrap.setX(b.x+b.width); + st.left = st.bottom = "0"; + a = {width: bw, height: bh, points: pt}; + break; + } + this.dom.style.visibility = "visible"; + wrap.show(); + + arguments.callee.anim = wrap.fxanim(a, + o, + 'motion', + .5, + 'easeOut', after); + }); + return this; + }, + + + slideOut : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + + anchor = anchor || "t"; + + var r = this.getFxRestore(); + + var b = this.getBox(); + this.setSize(b); + + var wrap = this.fxWrap(r.pos, o, "visible"); + + var st = this.dom.style; + st.visibility = "visible"; + st.position = "absolute"; + + wrap.setSize(b); + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.fxUnwrap(wrap, r.pos, o); + + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + var a, zero = {to: 0}; + switch(anchor.toLowerCase()){ + case "t": + st.left = st.bottom = "0"; + a = {height: zero}; + break; + case "l": + st.right = st.top = "0"; + a = {width: zero}; + break; + case "r": + st.left = st.top = "0"; + a = {width: zero, points: {to:[b.right, b.y]}}; + break; + case "b": + st.left = st.top = "0"; + a = {height: zero, points: {to:[b.x, b.bottom]}}; + break; + case "tl": + st.right = st.bottom = "0"; + a = {width: zero, height: zero}; + break; + case "bl": + st.right = st.top = "0"; + a = {width: zero, height: zero, points: {to:[b.x, b.bottom]}}; + break; + case "br": + st.left = st.top = "0"; + a = {width: zero, height: zero, points: {to:[b.x+b.width, b.bottom]}}; + break; + case "tr": + st.left = st.bottom = "0"; + a = {width: zero, height: zero, points: {to:[b.right, b.y]}}; + break; + } + + arguments.callee.anim = wrap.fxanim(a, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + + puff : function(o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + this.clearOpacity(); + this.show(); + + var r = this.getFxRestore(); + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + st.fontSize = ''; + el.afterFx(o); + }; + + var width = this.getWidth(); + var height = this.getHeight(); + + arguments.callee.anim = this.fxanim({ + width : {to: this.adjustWidth(width * 2)}, + height : {to: this.adjustHeight(height * 2)}, + points : {by: [-(width * .5), -(height * .5)]}, + opacity : {to: 0}, + fontSize: {to:200, unit: "%"} + }, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + + switchOff : function(o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + this.clearOpacity(); + this.clip(); + + var r = this.getFxRestore(); + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + this.fxanim({opacity:{to:0.3}}, null, null, .1, null, function(){ + this.clearOpacity(); + (function(){ + this.fxanim({ + height:{to:1}, + points:{by:[0, this.getHeight() * .5]} + }, o, 'motion', 0.3, 'easeIn', after); + }).defer(100, this); + }); + }); + return this; + }, + + + highlight : function(color, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + color = color || "ffff9c"; + var attr = o.attr || "backgroundColor"; + + this.clearOpacity(); + this.show(); + + var origColor = this.getColor(attr); + var restoreColor = this.dom.style[attr]; + var endColor = (o.endColor || origColor) || "ffffff"; + + var after = function(){ + el.dom.style[attr] = restoreColor; + el.afterFx(o); + }; + + var a = {}; + a[attr] = {from: color, to: endColor}; + arguments.callee.anim = this.fxanim(a, + o, + 'color', + 1, + 'easeIn', after); + }); + return this; + }, + + + frame : function(color, count, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + color = color || "#C3DAF9"; + if(color.length == 6){ + color = "#" + color; + } + count = count || 1; + var duration = o.duration || 1; + this.show(); + + var b = this.getBox(); + var animFn = function(){ + var proxy = Ext.getBody().createChild({ + style:{ + visbility:"hidden", + position:"absolute", + "z-index":"35000", border:"0px solid " + color + } + }); + var scale = Ext.isBorderBox ? 2 : 1; + proxy.animate({ + top:{from:b.y, to:b.y - 20}, + left:{from:b.x, to:b.x - 20}, + borderWidth:{from:0, to:10}, + opacity:{from:1, to:0}, + height:{from:b.height, to:(b.height + (20*scale))}, + width:{from:b.width, to:(b.width + (20*scale))} + }, duration, function(){ + proxy.remove(); + if(--count > 0){ + animFn(); + }else{ + el.afterFx(o); + } + }); + }; + animFn.call(this); + }); + return this; + }, + + + pause : function(seconds){ + var el = this.getFxEl(); + var o = {}; + + el.queueFx(o, function(){ + setTimeout(function(){ + el.afterFx(o); + }, seconds * 1000); + }); + return this; + }, + + + fadeIn : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + this.setOpacity(0); + this.fixDisplay(); + this.dom.style.visibility = 'visible'; + var to = o.endOpacity || 1; + arguments.callee.anim = this.fxanim({opacity:{to:to}}, + o, null, .5, "easeOut", function(){ + if(to == 1){ + this.clearOpacity(); + } + el.afterFx(o); + }); + }); + return this; + }, + + + fadeOut : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, + o, null, .5, "easeOut", function(){ + if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ + this.dom.style.display = "none"; + }else{ + this.dom.style.visibility = "hidden"; + } + this.clearOpacity(); + el.afterFx(o); + }); + }); + return this; + }, + + + scale : function(w, h, o){ + this.shift(Ext.apply({}, o, { + width: w, + height: h + })); + return this; + }, + + + shift : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + var a = {}, w = o.width, h = o.height, x = o.x, y = o.y, op = o.opacity; + if(w !== undefined){ + a.width = {to: this.adjustWidth(w)}; + } + if(h !== undefined){ + a.height = {to: this.adjustHeight(h)}; + } + if(x !== undefined || y !== undefined){ + a.points = {to: [ + x !== undefined ? x : this.getX(), + y !== undefined ? y : this.getY() + ]}; + } + if(op !== undefined){ + a.opacity = {to: op}; + } + if(o.xy !== undefined){ + a.points = {to: o.xy}; + } + arguments.callee.anim = this.fxanim(a, + o, 'motion', .35, "easeOut", function(){ + el.afterFx(o); + }); + }); + return this; + }, + + + ghost : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + anchor = anchor || "b"; + + var r = this.getFxRestore(); + var w = this.getWidth(), + h = this.getHeight(); + + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + var a = {opacity: {to: 0}, points: {}}, pt = a.points; + switch(anchor.toLowerCase()){ + case "t": + pt.by = [0, -h]; + break; + case "l": + pt.by = [-w, 0]; + break; + case "r": + pt.by = [w, 0]; + break; + case "b": + pt.by = [0, h]; + break; + case "tl": + pt.by = [-w, -h]; + break; + case "bl": + pt.by = [-w, h]; + break; + case "br": + pt.by = [w, h]; + break; + case "tr": + pt.by = [w, -h]; + break; + } + + arguments.callee.anim = this.fxanim(a, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + + syncFx : function(){ + this.fxDefaults = Ext.apply(this.fxDefaults || {}, { + block : false, + concurrent : true, + stopFx : false + }); + return this; + }, + + + sequenceFx : function(){ + this.fxDefaults = Ext.apply(this.fxDefaults || {}, { + block : false, + concurrent : false, + stopFx : false + }); + return this; + }, + + + nextFx : function(){ + var ef = this.fxQueue[0]; + if(ef){ + ef.call(this); + } + }, + + + hasActiveFx : function(){ + return this.fxQueue && this.fxQueue[0]; + }, + + + stopFx : function(){ + if(this.hasActiveFx()){ + var cur = this.fxQueue[0]; + if(cur && cur.anim && cur.anim.isAnimated()){ + this.fxQueue = [cur]; cur.anim.stop(true); + } + } + return this; + }, + + + beforeFx : function(o){ + if(this.hasActiveFx() && !o.concurrent){ + if(o.stopFx){ + this.stopFx(); + return true; + } + return false; + } + return true; + }, + + + hasFxBlock : function(){ + var q = this.fxQueue; + return q && q[0] && q[0].block; + }, + + + queueFx : function(o, fn){ + if(!this.fxQueue){ + this.fxQueue = []; + } + if(!this.hasFxBlock()){ + Ext.applyIf(o, this.fxDefaults); + if(!o.concurrent){ + var run = this.beforeFx(o); + fn.block = o.block; + this.fxQueue.push(fn); + if(run){ + this.nextFx(); + } + }else{ + fn.call(this); + } + } + return this; + }, + + + fxWrap : function(pos, o, vis){ + var wrap; + if(!o.wrap || !(wrap = Ext.get(o.wrap))){ + var wrapXY; + if(o.fixPosition){ + wrapXY = this.getXY(); + } + var div = document.createElement("div"); + div.style.visibility = vis; + wrap = Ext.get(this.dom.parentNode.insertBefore(div, this.dom)); + wrap.setPositioning(pos); + if(wrap.getStyle("position") == "static"){ + wrap.position("relative"); + } + this.clearPositioning('auto'); + wrap.clip(); + wrap.dom.appendChild(this.dom); + if(wrapXY){ + wrap.setXY(wrapXY); + } + } + return wrap; + }, + + + fxUnwrap : function(wrap, pos, o){ + this.clearPositioning(); + this.setPositioning(pos); + if(!o.wrap){ + wrap.dom.parentNode.insertBefore(this.dom, wrap.dom); + wrap.remove(); + } + }, + + + getFxRestore : function(){ + var st = this.dom.style; + return {pos: this.getPositioning(), width: st.width, height : st.height}; + }, + + + afterFx : function(o){ + if(o.afterStyle){ + this.applyStyles(o.afterStyle); + } + if(o.afterCls){ + this.addClass(o.afterCls); + } + if(o.remove === true){ + this.remove(); + } + Ext.callback(o.callback, o.scope, [this]); + if(!o.concurrent){ + this.fxQueue.shift(); + this.nextFx(); + } + }, + + + getFxEl : function(){ return Ext.get(this.dom); + }, + + + fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){ + animType = animType || 'run'; + opt = opt || {}; + var anim = Ext.lib.Anim[animType]( + this.dom, args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || 'easeOut', + function(){ + Ext.callback(cb, this); + }, + this + ); + opt.anim = anim; + return anim; + } +}; + +Ext.Fx.resize = Ext.Fx.scale; + +Ext.apply(Ext.Element.prototype, Ext.Fx); + + +Ext.CompositeElement = function(els){ + this.elements = []; + this.addElements(els); +}; +Ext.CompositeElement.prototype = { + isComposite: true, + addElements : function(els){ + if(!els) return this; + if(typeof els == "string"){ + els = Ext.Element.selectorFunction(els); + } + var yels = this.elements; + var index = yels.length-1; + for(var i = 0, len = els.length; i < len; i++) { + yels[++index] = Ext.get(els[i]); + } + return this; + }, + + + fill : function(els){ + this.elements = []; + this.add(els); + return this; + }, + + + filter : function(selector){ + var els = []; + this.each(function(el){ + if(el.is(selector)){ + els[els.length] = el.dom; + } + }); + this.fill(els); + return this; + }, + + invoke : function(fn, args){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++) { + Ext.Element.prototype[fn].apply(els[i], args); + } + return this; + }, + + add : function(els){ + if(typeof els == "string"){ + this.addElements(Ext.Element.selectorFunction(els)); + }else if(els.length !== undefined){ + this.addElements(els); + }else{ + this.addElements([els]); + } + return this; + }, + + each : function(fn, scope){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++){ + if(fn.call(scope || els[i], els[i], this, i) === false) { + break; + } + } + return this; + }, + + + item : function(index){ + return this.elements[index] || null; + }, + + + first : function(){ + return this.item(0); + }, + + + last : function(){ + return this.item(this.elements.length-1); + }, + + + getCount : function(){ + return this.elements.length; + }, + + + contains : function(el){ + return this.indexOf(el) !== -1; + }, + + + indexOf : function(el){ + return this.elements.indexOf(Ext.get(el)); + }, + + + + removeElement : function(el, removeDom){ + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++){ + this.removeElement(el[i]); + } + return this; + } + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1 && this.elements[index]){ + if(removeDom){ + var d = this.elements[index]; + if(d.dom){ + d.remove(); + }else{ + Ext.removeNode(d); + } + } + this.elements.splice(index, 1); + } + return this; + }, + + + replaceElement : function(el, replacement, domReplace){ + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1){ + if(domReplace){ + this.elements[index].replaceWith(replacement); + }else{ + this.elements.splice(index, 1, Ext.get(replacement)) + } + } + return this; + }, + + + clear : function(){ + this.elements = []; + } +}; +(function(){ +Ext.CompositeElement.createCall = function(proto, fnName){ + if(!proto[fnName]){ + proto[fnName] = function(){ + return this.invoke(fnName, arguments); + }; + } +}; +for(var fnName in Ext.Element.prototype){ + if(typeof Ext.Element.prototype[fnName] == "function"){ + Ext.CompositeElement.createCall(Ext.CompositeElement.prototype, fnName); + } +}; +})(); + + +Ext.CompositeElementLite = function(els){ + Ext.CompositeElementLite.superclass.constructor.call(this, els); + this.el = new Ext.Element.Flyweight(); +}; +Ext.extend(Ext.CompositeElementLite, Ext.CompositeElement, { + addElements : function(els){ + if(els){ + if(els instanceof Array){ + this.elements = this.elements.concat(els); + }else{ + var yels = this.elements; + var index = yels.length-1; + for(var i = 0, len = els.length; i < len; i++) { + yels[++index] = els[i]; + } + } + } + return this; + }, + invoke : function(fn, args){ + var els = this.elements; + var el = this.el; + for(var i = 0, len = els.length; i < len; i++) { + el.dom = els[i]; + Ext.Element.prototype[fn].apply(el, args); + } + return this; + }, + + item : function(index){ + if(!this.elements[index]){ + return null; + } + this.el.dom = this.elements[index]; + return this.el; + }, + + + addListener : function(eventName, handler, scope, opt){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++) { + Ext.EventManager.on(els[i], eventName, handler, scope || els[i], opt); + } + return this; + }, + + + each : function(fn, scope){ + var els = this.elements; + var el = this.el; + for(var i = 0, len = els.length; i < len; i++){ + el.dom = els[i]; + if(fn.call(scope || el, el, this, i) === false){ + break; + } + } + return this; + }, + + indexOf : function(el){ + return this.elements.indexOf(Ext.getDom(el)); + }, + + replaceElement : function(el, replacement, domReplace){ + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1){ + replacement = Ext.getDom(replacement); + if(domReplace){ + var d = this.elements[index]; + d.parentNode.insertBefore(replacement, d); + Ext.removeNode(d); + } + this.elements.splice(index, 1, replacement); + } + return this; + } +}); +Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; +if(Ext.DomQuery){ + Ext.Element.selectorFunction = Ext.DomQuery.select; +} + +Ext.Element.select = function(selector, unique, root){ + var els; + if(typeof selector == "string"){ + els = Ext.Element.selectorFunction(selector, root); + }else if(selector.length !== undefined){ + els = selector; + }else{ + throw "Invalid selector"; + } + if(unique === true){ + return new Ext.CompositeElement(els); + }else{ + return new Ext.CompositeElementLite(els); + } +}; + +Ext.select = Ext.Element.select; + +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, + + + request : function(o){ + if(this.fireEvent("beforerequest", this, o) !== false){ + var p = o.params; + + if(typeof p == "function"){ + p = p.call(o.scope||window, o); + } + if(typeof p == "object"){ + p = Ext.urlEncode(p); + } + if(this.extraParams){ + var extras = Ext.urlEncode(this.extraParams); + p = p ? (p + '&' + extras) : extras; + } + + var url = o.url || this.url; + if(typeof url == 'function'){ + url = url.call(o.scope||window, o); + } + + if(o.form){ + var form = Ext.getDom(o.form); + url = url || form.action; + + var enctype = form.getAttribute("enctype"); + if(o.isUpload || (enctype && enctype.toLowerCase() == 'multipart/form-data')){ + return this.doFormUpload(o, p, url); + } + var f = Ext.lib.Ajax.serializeForm(form); + p = p ? (p + '&' + f) : f; + } + + var hs = o.headers; + if(this.defaultHeaders){ + hs = Ext.apply(hs || {}, this.defaultHeaders); + if(!o.headers){ + o.headers = hs; + } + } + + var cb = { + success: this.handleResponse, + failure: this.handleFailure, + scope: this, + argument: {options: o}, + timeout : this.timeout + }; + + var method = o.method||this.method||(p ? "POST" : "GET"); + + if(method == 'GET' && (this.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ + url += (url.indexOf('?') != -1 ? '&' : '?') + '_dc=' + (new Date().getTime()); + } + + if(typeof o.autoAbort == 'boolean'){ + if(o.autoAbort){ + this.abort(); + } + }else if(this.autoAbort !== false){ + this.abort(); + } + if((method == 'GET' && p) || o.xmlData || o.jsonData){ + url += (url.indexOf('?') != -1 ? '&' : '?') + p; + p = ''; + } + this.transId = Ext.lib.Ajax.request(method, url, cb, p, o); + return this.transId; + }else{ + Ext.callback(o.callback, o.scope, [o, null, null]); + return null; + } + }, + + + isLoading : function(transId){ + if(transId){ + return Ext.lib.Ajax.isCallInProgress(transId); + }else{ + return this.transId ? true : false; + } + }, + + + 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; + response.argument = options ? options.argument : null; + this.fireEvent("requestcomplete", this, response, options); + Ext.callback(options.success, options.scope, [response, options]); + Ext.callback(options.callback, options.scope, [options, true, response]); + }, + + + handleFailure : function(response, e){ + this.transId = false; + var options = response.argument.options; + response.argument = options ? options.argument : null; + this.fireEvent("requestexception", this, response, options, e); + Ext.callback(options.failure, options.scope, [response, options]); + Ext.callback(options.callback, options.scope, [options, false, response]); + }, + + + doFormUpload : function(o, ps, url){ + var id = Ext.id(); + var frame = document.createElement('iframe'); + frame.id = id; + frame.name = id; + frame.className = 'x-hidden'; + if(Ext.isIE){ + frame.src = Ext.SSL_SECURE_URL; + } + document.body.appendChild(frame); + + if(Ext.isIE){ + document.frames[id].name = id; + } + + var form = Ext.getDom(o.form); + form.target = id; + form.method = 'POST'; + form.enctype = form.encoding = 'multipart/form-data'; + if(url){ + form.action = url; + } + + var hiddens, hd; + if(ps){ + hiddens = []; + ps = Ext.urlDecode(ps, false); + for(var k in ps){ + if(ps.hasOwnProperty(k)){ + hd = document.createElement('input'); + hd.type = 'hidden'; + hd.name = k; + hd.value = ps[k]; + form.appendChild(hd); + hiddens.push(hd); + } + } + } + + function cb(){ + var r = { + responseText : '', + responseXML : null + }; + + r.argument = o ? o.argument : null; + + try { + var doc; + if(Ext.isIE){ + doc = frame.contentWindow.document; + }else { + doc = (frame.contentDocument || window.frames[id].document); + } + if(doc && doc.body){ + r.responseText = doc.body.innerHTML; + } + if(doc && doc.XMLDocument){ + r.responseXML = doc.XMLDocument; + }else { + r.responseXML = doc; + } + } + catch(e) { + + } + + Ext.EventManager.removeListener(frame, 'load', cb, this); + + this.fireEvent("requestcomplete", this, r, o); + + Ext.callback(o.success, o.scope, [r, o]); + Ext.callback(o.callback, o.scope, [o, true, r]); + + setTimeout(function(){Ext.removeNode(frame);}, 100); + } + + Ext.EventManager.on(frame, 'load', cb, this); + form.submit(); + + if(hiddens){ + for(var i = 0, len = hiddens.length; i < len; i++){ + Ext.removeNode(hiddens[i]); + } + } + } +}); + + +Ext.Ajax = new Ext.data.Connection({ + + + + + + + + + + + + + + + + + + autoAbort : false, + + + serializeForm : function(form){ + return Ext.lib.Ajax.serializeForm(form); + } +}); + +Ext.Updater = function(el, forceNew){ + el = Ext.get(el); + if(!forceNew && el.updateManager){ + return el.updateManager; + } + + this.el = el; + + this.defaultUrl = null; + + this.addEvents( + + "beforeupdate", + + "update", + + "failure" + ); + var d = Ext.Updater.defaults; + + this.sslBlankUrl = d.sslBlankUrl; + + this.disableCaching = d.disableCaching; + + this.indicatorText = d.indicatorText; + + this.showLoadIndicator = d.showLoadIndicator; + + this.timeout = d.timeout; + + + this.loadScripts = d.loadScripts; + + + this.transaction = null; + + + this.autoRefreshProcId = null; + + this.refreshDelegate = this.refresh.createDelegate(this); + + this.updateDelegate = this.update.createDelegate(this); + + this.formUpdateDelegate = this.formUpdate.createDelegate(this); + + if(!this.renderer){ + + this.renderer = new Ext.Updater.BasicRenderer(); + } + Ext.Updater.superclass.constructor.call(this); +}; + +Ext.extend(Ext.Updater, Ext.util.Observable, { + + getEl : function(){ + return this.el; + }, + + update : function(url, params, callback, discardUrl){ + if(this.fireEvent("beforeupdate", this.el, url, params) !== false){ + var method = this.method, cfg, callerScope; + if(typeof url == "object"){ + cfg = url; + url = cfg.url; + params = params || cfg.params; + callback = callback || cfg.callback; + discardUrl = discardUrl || cfg.discardUrl; + callerScope = cfg.scope; + if(typeof cfg.method != "undefined"){method = cfg.method;}; + if(typeof cfg.nocache != "undefined"){this.disableCaching = cfg.nocache;}; + if(typeof cfg.text != "undefined"){this.indicatorText = '
      '+cfg.text+"
      ";}; + if(typeof cfg.scripts != "undefined"){this.loadScripts = cfg.scripts;}; + if(typeof cfg.timeout != "undefined"){this.timeout = cfg.timeout;}; + } + this.showLoading(); + if(!discardUrl){ + this.defaultUrl = url; + } + if(typeof url == "function"){ + url = url.call(this); + } + + method = method || (params ? "POST" : "GET"); + if(method == "GET"){ + url = this.prepareUrl(url); + } + + var o = Ext.apply(cfg ||{}, { + url : url, + params: (typeof params == "function" && callerScope) ? params.createDelegate(callerScope) : params, + success: this.processSuccess, + failure: this.processFailure, + scope: this, + callback: undefined, + timeout: (this.timeout*1000), + argument: { + "options": cfg, + "url": url, + "form": null, + "callback": callback, + "scope": callerScope || window, + "params": params + } + }); + + this.transaction = Ext.Ajax.request(o); + } + }, + + + formUpdate : function(form, url, reset, callback){ + if(this.fireEvent("beforeupdate", this.el, form, url) !== false){ + if(typeof url == "function"){ + url = url.call(this); + } + form = Ext.getDom(form) + this.transaction = Ext.Ajax.request({ + form: form, + url:url, + success: this.processSuccess, + failure: this.processFailure, + scope: this, + timeout: (this.timeout*1000), + argument: { + "url": url, + "form": form, + "callback": callback, + "reset": reset + } + }); + this.showLoading.defer(1, this); + } + }, + + + refresh : function(callback){ + if(this.defaultUrl == null){ + return; + } + this.update(this.defaultUrl, null, callback, true); + }, + + + startAutoRefresh : function(interval, url, params, callback, refreshNow){ + if(refreshNow){ + this.update(url || this.defaultUrl, params, callback, true); + } + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + } + this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000); + }, + + + stopAutoRefresh : function(){ + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + delete this.autoRefreshProcId; + } + }, + + isAutoRefreshing : function(){ + return this.autoRefreshProcId ? true : false; + }, + + showLoading : function(){ + if(this.showLoadIndicator){ + this.el.update(this.indicatorText); + } + }, + + + prepareUrl : function(url){ + if(this.disableCaching){ + var append = "_dc=" + (new Date().getTime()); + if(url.indexOf("?") !== -1){ + url += "&" + append; + }else{ + url += "?" + append; + } + } + return url; + }, + + + processSuccess : function(response){ + this.transaction = null; + if(response.argument.form && response.argument.reset){ + try{ + response.argument.form.reset(); + }catch(e){} + } + if(this.loadScripts){ + this.renderer.render(this.el, response, this, + this.updateComplete.createDelegate(this, [response])); + }else{ + this.renderer.render(this.el, response, this); + this.updateComplete(response); + } + }, + + updateComplete : function(response){ + this.fireEvent("update", this.el, response); + if(typeof response.argument.callback == "function"){ + response.argument.callback.call(response.argument.scope, this.el, true, response, response.argument.options); + } + }, + + + processFailure : function(response){ + this.transaction = null; + this.fireEvent("failure", this.el, response); + if(typeof response.argument.callback == "function"){ + response.argument.callback.call(response.argument.scope, this.el, false, response, response.argument.options); + } + }, + + + setRenderer : function(renderer){ + this.renderer = renderer; + }, + + getRenderer : function(){ + return this.renderer; + }, + + + setDefaultUrl : function(defaultUrl){ + this.defaultUrl = defaultUrl; + }, + + + abort : function(){ + if(this.transaction){ + Ext.Ajax.abort(this.transaction); + } + }, + + + isUpdating : function(){ + if(this.transaction){ + return Ext.Ajax.isLoading(this.transaction); + } + return false; + } +}); + + + Ext.Updater.defaults = { + + timeout : 30, + + + loadScripts : false, + + + sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false"), + + disableCaching : false, + + showLoadIndicator : true, + + indicatorText : '
      Loading...
      ' + }; + + +Ext.Updater.updateElement = function(el, url, params, options){ + var um = Ext.get(el).getUpdater(); + Ext.apply(um, options); + um.update(url, params, options ? options.callback : null); +}; + +Ext.Updater.update = Ext.Updater.updateElement; + +Ext.Updater.BasicRenderer = function(){}; + +Ext.Updater.BasicRenderer.prototype = { + + render : function(el, response, updateManager, callback){ + el.update(response.responseText, updateManager.loadScripts, callback); + } +}; + +Ext.UpdateManager = Ext.Updater; + + +Ext.util.DelayedTask = function(fn, scope, args){ + var id = null, d, t; + + var call = function(){ + var now = new Date().getTime(); + if(now - t >= d){ + clearInterval(id); + id = null; + fn.apply(scope, args || []); + } + }; + + this.delay = function(delay, newFn, newScope, newArgs){ + if(id && delay != d){ + this.cancel(); + } + d = delay; + t = new Date().getTime(); + fn = newFn || fn; + scope = newScope || scope; + args = newArgs || args; + if(!id){ + id = setInterval(call, d); + } + }; + + + this.cancel = function(){ + if(id){ + clearInterval(id); + id = null; + } + }; +}; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/ext-core.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/ext-core.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/ext-core.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,19 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.DomHelper=function(){var L=null;var F=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i;var B=/^table|tbody|tr|td$/i;var A=function(T){if(typeof T=="string"){return T}var P="";if(!T.tag){T.tag="div"}P+="<"+T.tag;for(var O in T){if(O=="tag"||O=="children"||O=="cn"||O=="html"||typeof T[O]=="function"){continue}if(O=="style"){var S=T["style"];if(typeof S=="function"){S=S.call()}if(typeof S=="string"){P+=" style=\""+S+"\""}else{if(typeof S=="object"){P+=" style=\"";for(var R in S){if(typeof S[R]!="function"){P+=R+":"+S[R]+";"}}P+="\""}}}else{if(O=="cls"){P+=" class=\""+T["cls"]+"\""}else{if(O=="htmlFor"){P+=" for=\""+T["htmlFor"]+"\""}else{P+=" "+O+"=\""+T[O]+"\""}}}}if(F.test(T.tag)){P+="/>"}else{P+=">";var U=T.children||T.cn;if(U){if(U instanceof Array){for(var Q=0,N=U.length;Q"}return P};var M=function(T,P){var S=document.createElement(T.tag||"div");var Q=S.setAttribute?true:false;for(var O in T){if(O=="tag"||O=="children"||O=="cn"||O=="html"||O=="style"||typeof T[O]=="function"){continue}if(O=="cls"){S.className=T["cls"]}else{if(Q){S.setAttribute(O,T[O])}else{S[O]=T[O]}}}Ext.DomHelper.applyStyles(S,T.style);var U=T.children||T.cn;if(U){if(U instanceof Array){for(var R=0,N=U.length;R",K=""+E,H=C+"",D=""+K;var G=function(N,O,Q,P){if(!L){L=document.createElement("div")}var R;var S=null;if(N=="td"){if(O=="afterbegin"||O=="beforeend"){return }if(O=="beforebegin"){S=Q;Q=Q.parentNode}else{S=Q.nextSibling;Q=Q.parentNode}R=I(4,H,P,D)}else{if(N=="tr"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(4,H,P,D)}}}else{if(N=="tbody"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(3,C,P,K)}}}else{if(O=="beforebegin"||O=="afterend"){return }if(O=="afterbegin"){S=Q.firstChild}R=I(2,J,P,E)}}}Q.insertBefore(R,S);return R};return{useDom:false,markup:function(N){return A(N)},applyStyles:function(P,Q){if(Q){P=Ext.fly(P);if(typeof Q=="string"){var O=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var R;while((R=O.exec(Q))!=null){P.setStyle(R[1],R[2])}}else{if(typeof Q=="object"){for(var N in Q){P.setStyle(N,Q[N])}}else{if(typeof Q=="function"){Ext.DomHelper.applyStyles(P,Q.call())}}}}},insertHtml:function(P,R,Q){P=P.toLowerCase();if(R.insertAdjacentHTML){if(B.test(R.tagName)){var O;if(O=G(R.tagName.toLowerCase(),P,R,Q)){return O}}switch(P){case"beforebegin":R.insertAdjacentHTML("BeforeBegin",Q);return R.previousSibling;case"afterbegin":R.insertAdjacentHTML("AfterBegin",Q);return R.firstChild;case"beforeend":R.insertAdjacentHTML("BeforeEnd",Q);return R.lastChild;case"afterend":R.insertAdjacentHTML("AfterEnd",Q);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""}var N=R.ownerDocument.createRange();var S;switch(P){case"beforebegin":N.setStartBefore(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R);return R.previousSibling;case"afterbegin":if(R.firstChild){N.setStartBefore(R.firstChild);S=N.createContextualFragment(Q);R.insertBefore(S,R.firstChild);return R.firstChild}else{R.innerHTML=Q;return R.firstChild}case"beforeend":if(R.lastChild){N.setStartAfter(R.lastChild);S=N.createContextualFragment(Q);R.appendChild(S);return R.lastChild}else{R.innerHTML=Q;return R.lastChild}case"afterend":N.setStartAfter(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R.nextSibling);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""},insertBefore:function(N,P,O){return this.doInsert(N,P,O,"beforeBegin")},insertAfter:function(N,P,O){return this.doInsert(N,P,O,"afterEnd","nextSibling")},insertFirst:function(N,P,O){return this.doInsert(N,P,O,"afterBegin","firstChild")},doInsert:function(Q,S,R,T,P){Q=Ext.getDom(Q);var O;if(this.useDom){O=M(S,null);(P==="firstChild"?Q:Q.parentNode).insertBefore(O,P?Q[P]:Q)}else{var N=A(S);O=this.insertHtml(T,Q,N)}return R?Ext.get(O,true):O},append:function(P,R,Q){P=Ext.getDom(P);var O;if(this.useDom){O=M(R,null);P.appendChild(O)}else{var N=A(R);O=this.insertHtml("beforeEnd",P,N)}return Q?Ext.get(O,true):O},overwrite:function(N,P,O){N=Ext.getDom(N);N.innerHTML=A(P);return O?Ext.get(N.firstChild,true):N.firstChild},createTemplate:function(O){var N=A(O);return new Ext.Template(N)}}}(); +Ext.Template=function(E){var B=arguments;if(E instanceof Array){E=E.join("")}else{if(B.length>1){var C=[];for(var D=0,A=B.length;D+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.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(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}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.children||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=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){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},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);n=n[0]?n[0]:n;var 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=(el instanceof Array);var 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, null, \" {1} \");"},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([\w-]+)/,select:"n = byId(n, null, \"{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;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var 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("|");var 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;var 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;var 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;var 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.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended!==true){var A=this.events[arguments[0].toLowerCase()];if(typeof A=="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1))}}return true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A,C,B,F){if(typeof A=="object"){F=A;for(var E in F){if(this.filterOptRe.test(E)){continue}if(typeof F[E]=="function"){this.addListener(E,F[E],F.scope,F)}else{this.addListener(E,F[E].fn,F[E].scope,F[E])}}return }F=(!F||typeof F=="boolean")?{}:F;A=A.toLowerCase();var D=this.events[A]||true;if(typeof D=="boolean"){D=new Ext.util.Event(this,A);this.events[A]=D}D.addListener(C,B,F)},removeListener:function(A,C,B){var D=this.events[A.toLowerCase()];if(typeof D=="object"){D.removeListener(C,B)}},purgeListeners:function(){for(var A in this.events){if(typeof this.events[A]=="object"){this.events[A].clearListeners()}}},relayEvents:function(F,D){var E=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G,Array.prototype.slice.call(arguments,0)))}};for(var C=0,A=D.length;C0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(G){if(!this.methodEvents){this.methodEvents={}}var F=this.methodEvents[G];if(!F){F={};this.methodEvents[G]=F;F.originalFn=this[G];F.methodName=G;F.before=[];F.after=[];var C,B,D;var E=this;var A=function(J,I,H){if((B=J.apply(I||E,H))!==undefined){if(typeof B==="object"){if(B.returnValue!==undefined){C=B.returnValue}else{C=B}if(B.cancel===true){D=true}}else{if(B===false){D=true}else{C=B}}}};this[G]=function(){C=B=undefined;D=false;var I=Array.prototype.slice.call(arguments,0);for(var J=0,H=F.before.length;J0){this.firing=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H");var D=document.getElementById("ie-deferred-loader");D.onreadystatechange=function(){if(this.readyState=="complete"){B()}}}else{if(Ext.isSafari){M=setInterval(function(){var E=document.readyState;if(E=="complete"){B()}},10)}}}L.on(window,"load",B)};var R=function(E,U){var D=new Ext.util.DelayedTask(E);return function(V){V=new Ext.EventObjectImpl(V);D.delay(U.buffer,E,null,[V])}};var P=function(V,U,D,E){return function(W){Ext.EventManager.removeListener(U,D,E);V(W)}};var F=function(D,E){return function(U){U=new Ext.EventObjectImpl(U);setTimeout(function(){D(U)},E.delay||10)}};var J=function(U,E,D,Y,X){var Z=(!D||typeof D=="boolean")?{}:D;Y=Y||Z.fn;X=X||Z.scope;var W=Ext.getDom(U);if(!W){throw"Error listening for \""+E+"\". Element \""+U+"\" doesn't exist."}var V=function(b){b=Ext.EventObject.setEvent(b);var a;if(Z.delegate){a=b.getTarget(Z.delegate,W);if(!a){return }}else{a=b.target}if(Z.stopEvent===true){b.stopEvent()}if(Z.preventDefault===true){b.preventDefault()}if(Z.stopPropagation===true){b.stopPropagation()}if(Z.normalized===false){b=b.browserEvent}Y.call(X||W,b,a,Z)};if(Z.delay){V=F(V,Z)}if(Z.single){V=P(V,W,E,Y)}if(Z.buffer){V=R(V,Z)}Y._handlers=Y._handlers||[];Y._handlers.push([Ext.id(W),E,V]);L.on(W,E,V);if(E=="mousewheel"&&W.addEventListener){W.addEventListener("DOMMouseScroll",V,false);L.on(window,"unload",function(){W.removeEventListener("DOMMouseScroll",V,false)})}if(E=="mousedown"&&W==document){Ext.EventManager.stoppedMouseDownEvent.addListener(V)}return V};var G=function(E,U,Z){var D=Ext.id(E),a=Z._handlers,X=Z;if(a){for(var V=0,Y=a.length;V=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC},isSpecialKey:function(){var D=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||D==9||D==13||D==40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D>=44&&D<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}B.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var D=this.keyCode||this.charCode;return Ext.isSafari?(A[D]||D):D},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return B.getTime(this.browserEvent)}return null},getXY:function(){return this.xy},getTarget:function(E,G,D){var F=Ext.get(this.target);return E?F.findParent(E,G,D):(D?F:this.target)},getRelatedTarget:function(){if(this.browserEvent){return B.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var D=this.browserEvent;var E=0;if(D.wheelDelta){E=D.wheelDelta/120}else{if(D.detail){E=-D.detail/3}}return E},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarget"]();return D&&Ext.fly(E).contains(D)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}(); +(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined"){this.originalDisplay=display}return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depthch||tcb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||lcr){c.scrollLeft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el){return false}return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector,unique){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},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)},setVisible:function(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visible?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if(visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden"}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:function(className){if(className instanceof Array){for(var i=0,len=className.length;idw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(xdh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(yvr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=true}if(x";E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeRe=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater:function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this.getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(sides,styles){var val=0,v,w;for(var i=0,len=sides.length;i=0?w:-1*w)}}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper.append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,config,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(msg,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="no";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overFn.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true)){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className,preventFlicker){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(eventName instanceof Array){for(var i=0,len=eventName.length;idom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom[prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{"to":to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(direction){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":case"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,y){if(typeof x=="object"||x instanceof Array){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x-o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrollLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrollTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffset||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,top:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.substr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:function(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format("
      "+El.boxMarkup+"
      ",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},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)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarkup="
      ";El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el=="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if(!(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=new El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){return el}else{if(el instanceof Array){return El.select(el)}else{if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=document}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=arguments,len=a.length;i0){F()}else{B.afterFx(D)}})};F.call(this)});return this},pause:function(C){var A=this.getFxEl();var B={};A.queueFx(B,function(){setTimeout(function(){A.afterFx(B)},C*1000)});return this},fadeIn:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var C=B.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},B,null,0.5,"easeOut",function(){if(C==1){this.clearOpacity()}A.afterFx(B)})});return this},fadeOut:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){arguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();A.afterFx(B)})});return this},scale:function(A,B,C){this.shift(Ext.apply({},C,{width:A,height:B}));return this},shift:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity;if(D!==undefined){E.width={to:this.adjustWidth(D)}}if(F!==undefined){E.height={to:this.adjustHeight(F)}}if(C!==undefined||H!==undefined){E.points={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]}}if(G!==undefined){E.opacity={to:G}}if(B.xy!==undefined){E.points={to:B.xy}}arguments.callee.anim=this.fxanim(E,B,"motion",0.35,"easeOut",function(){A.afterFx(B)})});return this},ghost:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"b";var H=this.getFxRestore();var E=this.getWidth(),G=this.getHeight();var F=this.dom.style;var J=function(){if(C.useDisplay){B.setDisplayed(false)}else{B.hide()}B.clearOpacity();B.setPositioning(H.pos);F.width=H.width;F.height=H.height;B.afterFx(C)};var D={opacity:{to:0},points:{}},I=D.points;switch(A.toLowerCase()){case"t":I.by=[0,-G];break;case"l":I.by=[-E,0];break;case"r":I.by=[E,0];break;case"b":I.by=[0,G];break;case"tl":I.by=[-E,-G];break;case"bl":I.by=[-E,G];break;case"br":I.by=[E,G];break;case"tr":I.by=[E,-G];break}arguments.callee.anim=this.fxanim(D,C,"motion",0.5,"easeOut",J)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var A=this.fxQueue[0];if(A){A.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true)}}return this},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var A=this.fxQueue;return A&&A[0]&&A[0].block},queueFx:function(C,A){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurrent){var B=this.beforeFx(C);A.block=C.block;this.fxQueue.push(A);if(B){this.nextFx()}}else{A.call(this)}}return this},fxWrap:function(F,D,C){var B;if(!D.wrap||!(B=Ext.get(D.wrap))){var A;if(D.fixPosition){A=this.getXY()}var E=document.createElement("div");E.style.visibility=C;B=Ext.get(this.dom.parentNode.insertBefore(E,this.dom));B.setPositioning(F);if(B.getStyle("position")=="static"){B.position("relative")}this.clearPositioning("auto");B.clip();B.dom.appendChild(this.dom);if(A){B.setXY(A)}}return B},fxUnwrap:function(A,C,B){this.clearPositioning();this.setPositioning(C);if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.remove()}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),width:A.width,height:A.height}},afterFx:function(A){if(A.afterStyle){this.applyStyles(A.afterStyle)}if(A.afterCls){this.addClass(A.afterCls)}if(A.remove===true){this.remove()}Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(D,E,B,F,C,A){B=B||"run";E=E||{};var G=Ext.lib.Anim[B](this.dom,D,(E.duration||F)||0.35,(E.easing||C)||"easeOut",function(){Ext.callback(A,this)},this);E.anim=G;return G}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx); +Ext.CompositeElement=function(A){this.elements=[];this.addElements(A)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(E){if(!E){return this}if(typeof E=="string"){E=Ext.Element.selectorFunction(E)}var D=this.elements;var B=D.length-1;for(var C=0,A=E.length;C"+A.text+""}if(typeof A.scripts!="undefined"){this.loadScripts=A.scripts}if(typeof A.timeout!="undefined"){this.timeout=A.timeout}}this.showLoading();if(!D){this.defaultUrl=B}if(typeof B=="function"){B=B.call(this)}G=G||(F?"POST":"GET");if(G=="GET"){B=this.prepareUrl(B)}var E=Ext.apply(A||{},{url:B,params:(typeof F=="function"&&C)?F.createDelegate(C):F,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),argument:{"options":A,"url":B,"form":null,"callback":H,"scope":C||window,"params":F}});this.transaction=Ext.Ajax.request(E)}},formUpdate:function(C,A,B,D){if(this.fireEvent("beforeupdate",this.el,C,A)!==false){if(typeof A=="function"){A=A.call(this)}C=Ext.getDom(C);this.transaction=Ext.Ajax.request({form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{"url":A,"form":C,"callback":D,"reset":B}});this.showLoading.defer(1,this)}},refresh:function(A){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,A,true)},startAutoRefresh:function(B,C,D,E,A){if(A){this.update(C||this.defaultUrl,D,E,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[C||this.defaultUrl,D,E,true]),B*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},prepareUrl:function(B){if(this.disableCaching){var A="_dc="+(new Date().getTime());if(B.indexOf("?")!==-1){B+="&"+A}else{B+="?"+A}}return B},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset){try{A.argument.form.reset()}catch(B){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]))}else{this.renderer.render(this.el,A,this);this.updateComplete(A)}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,true,A,A.argument.options)}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,false,A,A.argument.options)}},setRenderer:function(A){this.renderer=A},getRenderer:function(){return this.renderer},setDefaultUrl:function(A){this.defaultUrl=A},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transaction){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:"
      Loading...
      "};Ext.Updater.updateElement=function(D,C,E,B){var A=Ext.get(D).getUpdater();Ext.apply(A,B);A.update(C,E,B?B.callback:null)};Ext.Updater.update=Ext.Updater.updateElement;Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D)}};Ext.UpdateManager=Ext.Updater; +Ext.util.DelayedTask=function(E,D,A){var G=null,F,B;var C=function(){var H=new Date().getTime();if(H-B>=F){clearInterval(G);G=null;E.apply(D,A||[])}};this.delay=function(I,K,J,H){if(G&&I!=F){this.cancel()}F=I;B=new Date().getTime();E=K||E;D=J||D;A=H||A;if(!G){G=setInterval(C,F)}};this.cancel=function(){if(G){clearInterval(G);G=null}}}; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/ext/ext-base.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/ext/ext-base.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/ext/ext-base.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,10 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext={version:"2.0"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B){Ext.apply(C,B)}if(C&&D&&typeof D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i=0){L=G[P]}if(!S||!L){return false}this.doRemove(S,O,L[this.WFN],false);delete G[P][this.WFN];delete G[P][this.FN];G.splice(P,1);return true},getTarget:function(N,M){N=N.browserEvent||N;var L=N.target||N.srcElement;return this.resolveTextNode(L)},resolveTextNode:function(L){if(Ext.isSafari&&L&&3==L.nodeType){return L.parentNode}else{return L}},getPageX:function(M){M=M.browserEvent||M;var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(Ext.isIE){L+=this.getScroll()[1]}}return L},getPageY:function(L){L=L.browserEvent||L;var M=L.pageY;if(!M&&0!==M){M=L.clientY||0;if(Ext.isIE){M+=this.getScroll()[0]}}return M},getXY:function(L){L=L.browserEvent||L;return[this.getPageX(L),this.getPageY(L)]},getRelatedTarget:function(M){M=M.browserEvent||M;var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement}else{if(M.type=="mouseover"){L=M.fromElement}}}return this.resolveTextNode(L)},getTime:function(N){N=N.browserEvent||N;if(!N.time){var M=new Date().getTime();try{N.time=M}catch(L){this.lastError=L;return M}}return N.time},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L)},stopPropagation:function(L){L=L.browserEvent||L;if(L.stopPropagation){L.stopPropagation()}else{L.cancelBubble=true}},preventDefault:function(L){L=L.browserEvent||L;if(L.preventDefault){L.preventDefault()}else{L.returnValue=false}},getEvent:function(M){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break}N=N.caller}}return L},getCharCode:function(L){L=L.browserEvent||L;return L.charCode||L.keyCode||0},_getCacheIndex:function(Q,N,P){for(var O=0,M=G.length;O0)}var Q=[];for(var M=0,L=H.length;M0){for(var Q=0,S=T.length;Q0){O=G.length;while(O){N=O-1;M=G[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N)}O=O-1}M=null;R.clearCache()}R.doRemove(window,"unload",R._unload)},getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft]}else{if(M){return[M.scrollTop,M.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(O,M,N,L){O.addEventListener(M,N,(L))}}else{if(window.attachEvent){return function(O,M,N,L){O.attachEvent("on"+M,N)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(O,M,N,L){O.removeEventListener(M,N,(L))}}else{if(window.detachEvent){return function(N,L,M){N.detachEvent("on"+L,M)}}else{return function(){}}}}()}}();var D=Ext.lib.Event;D.on=D.addListener;D.un=D.removeListener;if(document&&document.body){D._load()}else{D.doAdd(window,"load",D._load)}D.doAdd(window,"unload",D._unload);D._tryPreloadAttach();Ext.lib.Ajax={request:function(K,I,E,J,F){if(F){var G=F.headers;if(G){for(var H in G){if(G.hasOwnProperty(H)){this.initHeader(H,G[H],false)}}}if(F.xmlData){this.initHeader("Content-Type","text/xml",false);K="POST";J=F.xmlData}else{if(F.jsonData){this.initHeader("Content-Type","text/javascript",false);K="POST";J=typeof F.jsonData=="object"?Ext.encode(F.jsonData):F.jsonData}}}return this.asyncRequest(K,I,E,J)},serializeForm:function(F){if(typeof F=="string"){F=(document.getElementById(F)||document.forms[F])}var G,E,H,J,K="",M=false;for(var L=0;L=200&&G<300){F=this.createResponseObject(I,J.argument);if(J.success){if(!J.scope){J.success(F)}else{J.success.apply(J.scope,[F])}}}else{switch(G){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:F=this.createExceptionObject(I.tId,J.argument,(E?E:false));if(J.failure){if(!J.scope){J.failure(F)}else{J.failure.apply(J.scope,[F])}}break;default:F=this.createResponseObject(I,J.argument);if(J.failure){if(!J.scope){J.failure(F)}else{J.failure.apply(J.scope,[F])}}}}this.releaseObject(I);F=null},createResponseObject:function(E,K){var H={};var M={};try{var G=E.conn.getAllResponseHeaders();var J=G.split("\n");for(var I=0;I=this.left&&E.right<=this.right&&E.top>=this.top&&E.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(I){var G=Math.max(this.top,I.top);var H=Math.min(this.right,I.right);var E=Math.min(this.bottom,I.bottom);var F=Math.max(this.left,I.left);if(E>=G&&H>=F){return new Ext.lib.Region(G,H,E,F)}else{return null}},union:function(I){var G=Math.min(this.top,I.top);var H=Math.max(this.right,I.right);var E=Math.max(this.bottom,I.bottom);var F=Math.min(this.left,I.left);return new Ext.lib.Region(G,H,E,F)},constrainTo:function(E){this.top=this.top.constrain(E.top,E.bottom);this.bottom=this.bottom.constrain(E.top,E.bottom);this.left=this.left.constrain(E.left,E.right);this.right=this.right.constrain(E.left,E.right);return this},adjust:function(G,F,E,H){this.top+=G;this.left+=F;this.right+=H;this.bottom+=E;return this}};Ext.lib.Region.getRegion=function(H){var J=Ext.lib.Dom.getXY(H);var G=J[1];var I=J[0]+H.offsetWidth;var E=J[1]+H.offsetHeight;var F=J[0];return new Ext.lib.Region(G,I,E,F)};Ext.lib.Point=function(E,F){if(E instanceof Array){F=E[1];E=E[0]}this.x=this.right=this.left=this[0]=E;this.y=this.top=this.bottom=this[1]=F};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(H,F,I,J,E,G){this.run(H,F,I,J,E,G,Ext.lib.Scroll)},motion:function(H,F,I,J,E,G){this.run(H,F,I,J,E,G,Ext.lib.Motion)},color:function(H,F,I,J,E,G){this.run(H,F,I,J,E,G,Ext.lib.ColorAnim)},run:function(I,F,K,L,E,H,G){G=G||Ext.lib.AnimBase;if(typeof L=="string"){L=Ext.lib.Easing[L]}var J=new G(I,F,K,L);J.animateX(function(){Ext.callback(E,H)});return J}};function C(E){if(!B){B=new Ext.Element.Flyweight()}B.dom=E;return B}if(Ext.isIE){function A(){var E=Function.prototype;delete E.createSequence;delete E.defer;delete E.createDelegate;delete E.createCallback;delete E.createInterceptor;window.detachEvent("onunload",A)}window.attachEvent("onunload",A)}Ext.lib.AnimBase=function(F,E,G,H){if(F){this.init(F,E,G,H)}};Ext.lib.AnimBase.prototype={toString:function(){var E=this.getEl();var F=E.id||E.tagName;return("Anim "+F)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(E,G,F){return this.method(this.currentFrame,G,F-G,this.totalFrames)},setAttribute:function(E,G,F){if(this.patterns.noNegatives.test(E)){G=(G>0)?G:0}Ext.fly(this.getEl(),"_anim").setStyle(E,G+F)},getAttribute:function(E){var G=this.getEl();var I=C(G).getStyle(E);if(I!=="auto"&&!this.patterns.offsetUnit.test(I)){return parseFloat(I)}var F=this.patterns.offsetAttribute.exec(E)||[];var J=!!(F[3]);var H=!!(F[2]);if(H||(C(G).getStyle("position")=="absolute"&&J)){I=G["offset"+F[0].charAt(0).toUpperCase()+F[0].substr(1)]}else{I=0}return I},getDefaultUnit:function(E){if(this.patterns.defaultUnit.test(E)){return"px"}return""},animateX:function(G,E){var F=function(){this.onComplete.removeListener(F);if(typeof G=="function"){G.call(E||this,this)}};this.onComplete.addListener(F,this);this.animate()},setRuntimeAttribute:function(F){var K;var G;var H=this.attributes;this.runtimeAttributes[F]={};var J=function(L){return(typeof L!=="undefined")};if(!J(H[F]["to"])&&!J(H[F]["by"])){return false}K=(J(H[F]["from"]))?H[F]["from"]:this.getAttribute(F);if(J(H[F]["to"])){G=H[F]["to"]}else{if(J(H[F]["by"])){if(K.constructor==Array){G=[];for(var I=0,E=K.length;I0&&isFinite(O)){if(K.currentFrame+O>=N){O=N-(M+1)}K.currentFrame+=O}}};Ext.lib.Bezier=new function(){this.getPosition=function(I,H){var J=I.length;var G=[];for(var F=0;F0&&!(O[0] instanceof Array)){O=[O]}else{var N=[];for(P=0,R=O.length;P0){this.runtimeAttributes[S]=this.runtimeAttributes[S].concat(O)}this.runtimeAttributes[S][this.runtimeAttributes[S].length]=L}else{I.setRuntimeAttribute.call(this,S)}};var E=function(J,L){var K=Ext.lib.Dom.getXY(this.getEl());J=[J[0]-K[0]+L[0],J[1]-K[1]+L[1]];return J};var G=function(J){return(typeof J!=="undefined")}})();(function(){Ext.lib.Scroll=function(I,H,J,K){if(I){Ext.lib.Scroll.superclass.constructor.call(this,I,H,J,K)}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var F=Ext.lib;var G=F.Scroll.superclass;var E=F.Scroll.prototype;E.toString=function(){var H=this.getEl();var I=H.id||H.tagName;return("Scroll "+I)};E.doMethod=function(H,K,I){var J=null;if(H=="scroll"){J=[this.method(this.currentFrame,K[0],I[0]-K[0],this.totalFrames),this.method(this.currentFrame,K[1],I[1]-K[1],this.totalFrames)]}else{J=G.doMethod.call(this,H,K,I)}return J};E.getAttribute=function(H){var J=null;var I=this.getEl();if(H=="scroll"){J=[I.scrollLeft,I.scrollTop]}else{J=G.getAttribute.call(this,H)}return J};E.setAttribute=function(H,K,J){var I=this.getEl();if(H=="scroll"){I.scrollLeft=K[0];I.scrollTop=K[1]}else{G.setAttribute.call(this,H,K,J)}}})()})(); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/ext-jquery-adapter.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/ext-jquery-adapter.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/ext-jquery-adapter.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,10 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext={version:"2.0"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B){Ext.apply(C,B)}if(C&&D&&typeof D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i10000){clearInterval(G)}var J=document.getElementById(I);if(J){clearInterval(G);E.call(D||window,J)}};var G=setInterval(F,50)},resolveTextNode:function(D){if(D&&3==D.nodeType){return D.parentNode}else{return D}},getRelatedTarget:function(E){E=E.browserEvent||E;var D=E.relatedTarget;if(!D){if(E.type=="mouseout"){D=E.toElement}else{if(E.type=="mouseover"){D=E.fromElement}}}return this.resolveTextNode(D)}};Ext.lib.Ajax=function(){var D=function(E){return function(G,F){if((F=="error"||F=="timeout")&&E.failure){E.failure.call(E.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:E.argument})}else{if(E.success){E.success.call(E.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:E.argument})}}}};return{request:function(J,G,E,H,F){var I={type:J,url:G,data:H,timeout:E.timeout,complete:D(E)};if(F){if(F.xmlData){I.data=F.xmlData;I.processData=false;I.type="POST";I.contentType="text/xml"}else{if(F.jsonData){I.data=typeof F.jsonData=="object"?Ext.encode(F.jsonData):F.jsonData;I.processData=false;I.type="POST";I.contentType="text/javascript"}}if(F.headers){I.beforeSend=function(M){var K=F.headers;for(var L in K){if(K.hasOwnProperty(L)){M.setRequestHeader(L,K[L])}}}}}jQuery.ajax(I)},formRequest:function(I,H,F,J,E,G){jQuery.ajax({type:Ext.getDom(I).method||"POST",url:H,data:jQuery(I).formSerialize()+(J?"&"+J:""),timeout:F.timeout,complete:D(F)})},isCallInProgress:function(E){return false},abort:function(E){return false},serializeForm:function(E){return jQuery(E.dom||E).formSerialize()}}}();Ext.lib.Anim=function(){var D=function(E,F){var G=true;return{stop:function(H){},isAnimated:function(){return G},proxyCallback:function(){G=false;Ext.callback(E,F)}}};return{scroll:function(H,F,J,K,E,G){var I=D(E,G);H=Ext.getDom(H);if(typeof F.scroll.to[0]=="number"){H.scrollLeft=F.scroll.to[0]}if(typeof F.scroll.to[1]=="number"){H.scrollTop=F.scroll.to[1]}I.proxyCallback();return I},motion:function(H,F,I,J,E,G){return this.run(H,F,I,J,E,G)},color:function(H,F,J,K,E,G){var I=D(E,G);I.proxyCallback();return I},run:function(F,N,I,M,G,P,O){var J=D(G,P),K=Ext.fly(F,"_animrun");var E={};for(var H in N){if(N[H].from){if(H!="points"){K.setStyle(H,N[H].from)}}switch(H){case"points":var L,R;K.position();if(L=N.points.by){var Q=K.getXY();R=K.translatePoints([Q[0]+L[0],Q[1]+L[1]])}else{R=K.translatePoints(N.points.to)}E.left=R.left;E.top=R.top;if(!parseInt(K.getStyle("left"),10)){K.setLeft(0)}if(!parseInt(K.getStyle("top"),10)){K.setTop(0)}if(N.points.from){K.setXY(N.points.from)}break;case"width":E.width=N.width.to;break;case"height":E.height=N.height.to;break;case"opacity":E.opacity=N.opacity.to;break;case"left":E.left=N.left.to;break;case"top":E.top=N.top.to;break;default:E[H]=N[H].to;break}}jQuery(F).animate(E,I*1000,undefined,J.proxyCallback);return J}}}();Ext.lib.Region=function(F,G,D,E){this.top=F;this[1]=F;this.right=G;this.bottom=D;this.left=E;this[0]=E};Ext.lib.Region.prototype={contains:function(D){return(D.left>=this.left&&D.right<=this.right&&D.top>=this.top&&D.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(H){var F=Math.max(this.top,H.top);var G=Math.min(this.right,H.right);var D=Math.min(this.bottom,H.bottom);var E=Math.max(this.left,H.left);if(D>=F&&G>=E){return new Ext.lib.Region(F,G,D,E)}else{return null}},union:function(H){var F=Math.min(this.top,H.top);var G=Math.max(this.right,H.right);var D=Math.max(this.bottom,H.bottom);var E=Math.min(this.left,H.left);return new Ext.lib.Region(F,G,D,E)},constrainTo:function(D){this.top=this.top.constrain(D.top,D.bottom);this.bottom=this.bottom.constrain(D.top,D.bottom);this.left=this.left.constrain(D.left,D.right);this.right=this.right.constrain(D.left,D.right);return this},adjust:function(F,E,D,G){this.top+=F;this.left+=E;this.right+=G;this.bottom+=D;return this}};Ext.lib.Region.getRegion=function(G){var I=Ext.lib.Dom.getXY(G);var F=I[1];var H=I[0]+G.offsetWidth;var D=I[1]+G.offsetHeight;var E=I[0];return new Ext.lib.Region(F,H,D,E)};Ext.lib.Point=function(D,E){if(D instanceof Array){E=D[1];D=D[0]}this.x=this.right=this.left=this[0]=D;this.y=this.top=this.bottom=this[1]=E};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function A(){var D=Function.prototype;delete D.createSequence;delete D.defer;delete D.createDelegate;delete D.createCallback;delete D.createInterceptor;window.detachEvent("onunload",A)}window.attachEvent("onunload",A)}})(); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/jquery-plugins.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/jquery-plugins.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/jquery-plugins.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,965 @@ +/* + * Ext - JS Library 1.0 Alpha 2 + * Copyright(c) 2006-2007, Jack Slocum. + */ + +/* + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * $LastChangedDate$ + * $Rev$ + */ + +jQuery.fn._height = jQuery.fn.height; +jQuery.fn._width = jQuery.fn.width; + +/** + * If used on document, returns the document's height (innerHeight) + * If used on window, returns the viewport's (window) height + * See core docs on height() to see what happens when used on an element. + * + * @example $("#testdiv").height() + * @result 200 + * + * @example $(document).height() + * @result 800 + * + * @example $(window).height() + * @result 400 + * + * @name height + * @type Object + * @cat Plugins/Dimensions + */ +jQuery.fn.height = function() { + if ( this[0] == window ) + return self.innerHeight || + jQuery.boxModel && document.documentElement.clientHeight || + document.body.clientHeight; + + if ( this[0] == document ) + return Math.max( document.body.scrollHeight, document.body.offsetHeight ); + + return this._height(arguments[0]); +}; + +/** + * If used on document, returns the document's width (innerWidth) + * If used on window, returns the viewport's (window) width + * See core docs on height() to see what happens when used on an element. + * + * @example $("#testdiv").width() + * @result 200 + * + * @example $(document).width() + * @result 800 + * + * @example $(window).width() + * @result 400 + * + * @name width + * @type Object + * @cat Plugins/Dimensions + */ +jQuery.fn.width = function() { + if ( this[0] == window ) + return self.innerWidth || + jQuery.boxModel && document.documentElement.clientWidth || + document.body.clientWidth; + + if ( this[0] == document ) + return Math.max( document.body.scrollWidth, document.body.offsetWidth ); + + return this._width(arguments[0]); +}; + +/** + * Returns the inner height value (without border) for the first matched element. + * If used on document, returns the document's height (innerHeight) + * If used on window, returns the viewport's (window) height + * + * @example $("#testdiv").innerHeight() + * @result 800 + * + * @name innerHeight + * @type Number + * @cat Plugins/Dimensions + */ +jQuery.fn.innerHeight = function() { + return this[0] == window || this[0] == document ? + this.height() : + this.css('display') != 'none' ? + this[0].offsetHeight - (parseInt(this.css("borderTopWidth")) || 0) - (parseInt(this.css("borderBottomWidth")) || 0) : + this.height() + (parseInt(this.css("paddingTop")) || 0) + (parseInt(this.css("paddingBottom")) || 0); +}; + +/** + * Returns the inner width value (without border) for the first matched element. + * If used on document, returns the document's Width (innerWidth) + * If used on window, returns the viewport's (window) width + * + * @example $("#testdiv").innerWidth() + * @result 1000 + * + * @name innerWidth + * @type Number + * @cat Plugins/Dimensions + */ +jQuery.fn.innerWidth = function() { + return this[0] == window || this[0] == document ? + this.width() : + this.css('display') != 'none' ? + this[0].offsetWidth - (parseInt(this.css("borderLeftWidth")) || 0) - (parseInt(this.css("borderRightWidth")) || 0) : + this.height() + (parseInt(this.css("paddingLeft")) || 0) + (parseInt(this.css("paddingRight")) || 0); +}; + +/** + * Returns the outer height value (including border) for the first matched element. + * Cannot be used on document or window. + * + * @example $("#testdiv").outerHeight() + * @result 1000 + * + * @name outerHeight + * @type Number + * @cat Plugins/Dimensions + */ +jQuery.fn.outerHeight = function() { + return this[0] == window || this[0] == document ? + this.height() : + this.css('display') != 'none' ? + this[0].offsetHeight : + this.height() + (parseInt(this.css("borderTopWidth")) || 0) + (parseInt(this.css("borderBottomWidth")) || 0) + + (parseInt(this.css("paddingTop")) || 0) + (parseInt(this.css("paddingBottom")) || 0); +}; + +/** + * Returns the outer width value (including border) for the first matched element. + * Cannot be used on document or window. + * + * @example $("#testdiv").outerWidth() + * @result 1000 + * + * @name outerWidth + * @type Number + * @cat Plugins/Dimensions + */ +jQuery.fn.outerWidth = function() { + return this[0] == window || this[0] == document ? + this.width() : + this.css('display') != 'none' ? + this[0].offsetWidth : + this.height() + (parseInt(this.css("borderLeftWidth")) || 0) + (parseInt(this.css("borderRightWidth")) || 0) + + (parseInt(this.css("paddingLeft")) || 0) + (parseInt(this.css("paddingRight")) || 0); +}; + +/** + * Returns how many pixels the user has scrolled to the right (scrollLeft). + * Works on containers with overflow: auto and window/document. + * + * @example $("#testdiv").scrollLeft() + * @result 100 + * + * @name scrollLeft + * @type Number + * @cat Plugins/Dimensions + */ +jQuery.fn.scrollLeft = function() { + if ( this[0] == window || this[0] == document ) + return self.pageXOffset || + jQuery.boxModel && document.documentElement.scrollLeft || + document.body.scrollLeft; + + return this[0].scrollLeft; +}; + +/** + * Returns how many pixels the user has scrolled to the bottom (scrollTop). + * Works on containers with overflow: auto and window/document. + * + * @example $("#testdiv").scrollTop() + * @result 100 + * + * @name scrollTop + * @type Number + * @cat Plugins/Dimensions + */ +jQuery.fn.scrollTop = function() { + if ( this[0] == window || this[0] == document ) + return self.pageYOffset || + jQuery.boxModel && document.documentElement.scrollTop || + document.body.scrollTop; + + return this[0].scrollTop; +}; + +/** + * Returns the location of the element in pixels from the top left corner of the viewport. + * + * For accurate readings make sure to use pixel values for margins, borders and padding. + * + * @example $("#testdiv").offset() + * @result { top: 100, left: 100, scrollTop: 10, scrollLeft: 10 } + * + * @example $("#testdiv").offset({ scroll: false }) + * @result { top: 90, left: 90 } + * + * @example var offset = {} + * $("#testdiv").offset({ scroll: false }, offset) + * @result offset = { top: 90, left: 90 } + * + * @name offset + * @param Object options A hash of options describing what should be included in the final calculations of the offset. + * The options include: + * margin: Should the margin of the element be included in the calculations? True by default. + * If set to false the margin of the element is subtracted from the total offset. + * border: Should the border of the element be included in the calculations? True by default. + * If set to false the border of the element is subtracted from the total offset. + * padding: Should the padding of the element be included in the calculations? False by default. + * If set to true the padding of the element is added to the total offset. + * scroll: Should the scroll offsets of the parent elements be included in the calculations? + * True by default. When true, it adds the total scroll offsets of all parents to the + * total offset and also adds two properties to the returned object, scrollTop and + * scrollLeft. If set to false the scroll offsets of parent elements are ignored. + * If scroll offsets are not needed, set to false to get a performance boost. + * @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the + * chain will not be broken and the result will be assigned to this object. + * @type Object + * @cat Plugins/Dimensions + * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + */ +jQuery.fn.offset = function(options, returnObject) { + var x = 0, y = 0, elem = this[0], parent = this[0], sl = 0, st = 0, options = jQuery.extend({ margin: true, border: true, padding: false, scroll: true }, options || {}); + do { + x += parent.offsetLeft || 0; + y += parent.offsetTop || 0; + + // Mozilla and IE do not add the border + if (jQuery.browser.mozilla || jQuery.browser.msie) { + // get borders + var bt = parseInt(jQuery.css(parent, 'borderTopWidth')) || 0; + var bl = parseInt(jQuery.css(parent, 'borderLeftWidth')) || 0; + + // add borders to offset + x += bl; + y += bt; + + // Mozilla removes the border if the parent has overflow property other than visible + if (jQuery.browser.mozilla && parent != elem && jQuery.css(parent, 'overflow') != 'visible') { + x += bl; + y += bt; + } + } + + var op = parent.offsetParent; + if (op && (op.tagName == 'BODY' || op.tagName == 'HTML')) { + // Safari doesn't add the body margin for elments positioned with static or relative + if (jQuery.browser.safari && jQuery.css(parent, 'position') != 'absolute') { + x += parseInt(jQuery.css(op, 'marginLeft')) || 0; + y += parseInt(jQuery.css(op, 'marginTop')) || 0; + } + + // Exit the loop + break; + } + + if (options.scroll) { + // Need to get scroll offsets in-between offsetParents + do { + sl += parent.scrollLeft || 0; + st += parent.scrollTop || 0; + + parent = parent.parentNode; + + // Mozilla removes the border if the parent has overflow property other than visible + if (jQuery.browser.mozilla && parent != elem && parent != op && parent.style && jQuery.css(parent, 'overflow') != 'visible') { + y += parseInt(jQuery.css(parent, 'borderTopWidth')) || 0; + x += parseInt(jQuery.css(parent, 'borderLeftWidth')) || 0; + } + } while (parent != op); + } else { + parent = parent.offsetParent; + } + } while (parent); + + if ( !options.margin) { + x -= parseInt(jQuery.css(elem, 'marginLeft')) || 0; + y -= parseInt(jQuery.css(elem, 'marginTop')) || 0; + } + + // Safari and Opera do not add the border for the element + if ( options.border && (jQuery.browser.safari || jQuery.browser.opera) ) { + x += parseInt(jQuery.css(elem, 'borderLeftWidth')) || 0; + y += parseInt(jQuery.css(elem, 'borderTopWidth')) || 0; + } else if ( !options.border && !(jQuery.browser.safari || jQuery.browser.opera) ) { + x -= parseInt(jQuery.css(elem, 'borderLeftWidth')) || 0; + y -= parseInt(jQuery.css(elem, 'borderTopWidth')) || 0; + } + + if ( options.padding ) { + x += parseInt(jQuery.css(elem, 'paddingLeft')) || 0; + y += parseInt(jQuery.css(elem, 'paddingTop')) || 0; + } + + // Opera thinks offset is scroll offset for display: inline elements + if (options.scroll && jQuery.browser.opera && jQuery.css(elem, 'display') == 'inline') { + sl -= elem.scrollLeft || 0; + st -= elem.scrollTop || 0; + } + + var returnValue = options.scroll ? { top: y - st, left: x - sl, scrollTop: st, scrollLeft: sl } + : { top: y, left: x }; + + if (returnObject) { jQuery.extend(returnObject, returnValue); return this; } + else { return returnValue; } +}; + + + +// FORM PLUGIN + +/* + * jQuery form plugin + * @requires jQuery v1.0.3 + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id: jquery-plugins.js,v 1.1 2007/12/04 02:48:30 hamiltonc Exp $ + * Version: 0.9 + */ + +/** + * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX. + * + * ajaxSubmit accepts a single argument which can be either a success callback function + * or an options Object. If a function is provided it will be invoked upon successful + * completion of the submit and will be passed the response from the server. + * If an options Object is provided, the following attributes are supported: + * + * target: Identifies the element(s) in the page to be updated with the server response. + * This value may be specified as a jQuery selection string, a jQuery object, + * or a DOM element. + * default value: null + * + * url: URL to which the form data will be submitted. + * default value: value of form's 'action' attribute + * + * method: @deprecated use 'type' + * type: The method in which the form data should be submitted, 'GET' or 'POST'. + * default value: value of form's 'method' attribute (or 'GET' if none found) + * + * before: @deprecated use 'beforeSubmit' + * beforeSubmit: Callback method to be invoked before the form is submitted. + * default value: null + * + * after: @deprecated use 'success' + * success: Callback method to be invoked after the form has been successfully submitted + * and the response has been returned from the server + * default value: null + * + * dataType: Expected dataType of the response. One of: null, 'xml', 'script', or 'json' + * default value: null + * + * semantic: Boolean flag indicating whether data must be submitted in semantic order (slower). + * default value: false + * + * resetForm: Boolean flag indicating whether the form should be reset if the submit is successful + * + * clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful + * + * + * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for + * validating the form data. If the 'beforeSubmit' callback returns false then the form will + * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data + * in array format, the jQuery object, and the options object passed into ajaxSubmit. + * The form data array takes the following form: + * + * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] + * + * If a 'success' callback method is provided it is invoked after the response has been returned + * from the server. It is passed the responseText or responseXML value (depending on dataType). + * See jQuery.ajax for further details. + * + * + * The dataType option provides a means for specifying how the server response should be handled. + * This maps directly to the jQuery.httpData method. The following values are supported: + * + * 'xml': if dataType == 'xml' the server response is treated as XML and the 'after' + * callback method, if specified, will be passed the responseXML value + * 'json': if dataType == 'json' the server response will be evaluted and passed to + * the 'after' callback, if specified + * 'script': if dataType == 'script' the server response is evaluated in the global context + * + * + * Note that it does not make sense to use both the 'target' and 'dataType' options. If both + * are provided the target will be ignored. + * + * The semantic argument can be used to force form serialization in semantic order. + * This is normally true anyway, unless the form contains input elements of type='image'. + * If your form must be submitted with name/value pairs in semantic order and your form + * contains an input of type='image" then pass true for this arg, otherwise pass false + * (or nothing) to avoid the overhead for this logic. + * + * + * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this: + * + * $("#form-id").submit(function() { + * $(this).ajaxSubmit(options); + * return false; // cancel conventional submit + * }); + * + * When using ajaxForm(), however, this is done for you. + * + * @example + * $('#myForm').ajaxSubmit(function(data) { + * alert('Form submit succeeded! Server returned: ' + data); + * }); + * @desc Submit form and alert server response + * + * + * @example + * var options = { + * target: '#myTargetDiv' + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Submit form and update page element with server response + * + * + * @example + * var options = { + * success: function(responseText) { + * alert(responseText); + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Submit form and alert the server response + * + * + * @example + * var options = { + * beforeSubmit: function(formArray, jqForm) { + * if (formArray.length == 0) { + * alert('Please enter data.'); + * return false; + * } + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Pre-submit validation which aborts the submit operation if form data is empty + * + * + * @example + * var options = { + * url: myJsonUrl.php, + * dataType: 'json', + * success: function(data) { + * // 'data' is an object representing the the evaluated json data + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc json data returned and evaluated + * + * + * @example + * var options = { + * url: myXmlUrl.php, + * dataType: 'xml', + * success: function(responseXML) { + * // responseXML is XML document object + * var data = $('myElement', responseXML).text(); + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc XML data returned from server + * + * + * @example + * var options = { + * resetForm: true + * }; + * $('#myForm').ajaxSubmit(options); + * @desc submit form and reset it if successful + * + * @example + * $('#myForm).submit(function() { + * $(this).ajaxSubmit(); + * return false; + * }); + * @desc Bind form's submit event to use ajaxSubmit + * + * + * @name ajaxSubmit + * @type jQuery + * @param options object literal containing options which control the form submission process + * @cat Plugins/Form + * @return jQuery + * @see formToArray + * @see ajaxForm + * @see $.ajax + * @author jQuery Community + */ +jQuery.fn.ajaxSubmit = function(options) { + if (typeof options == 'function') + options = { success: options }; + + options = jQuery.extend({ + url: this.attr('action') || '', + method: this.attr('method') || 'GET' + }, options || {}); + + // remap deprecated options (temporarily) + options.success = options.success || options.after; + options.beforeSubmit = options.beforeSubmit || options.before; + options.type = options.type || options.method; + + var a = this.formToArray(options.semantic); + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this; + + var q = jQuery.param(a); + + if (options.type.toUpperCase() == 'GET') { + // if url already has a '?' then append args after '&' + options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; + options.data = null; // data is null for 'get' + } + else + options.data = q; // data is the query string for 'post' + + var $form = this, callbacks = []; + if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); + if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); + + // perform a load on the target only if dataType is not provided + if (!options.dataType && options.target) { + var oldSuccess = options.success || function(){}; + callbacks.push(function(data, status) { + jQuery(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, [data, status]); + }); + } + else if (options.success) + callbacks.push(options.success); + + options.success = function(data, status) { + for (var i=0, max=callbacks.length; i < max; i++) + callbacks[i](data, status); + }; + + jQuery.ajax(options); + return this; +}; + +/** + * ajaxForm() provides a mechanism for fully automating form submission. + * + * The advantages of using this method instead of ajaxSubmit() are: + * + * 1: This method will include coordinates for elements (if the element + * is used to submit the form). + * 2. This method will include the submit element's name/value data (for the element that was + * used to submit the form). + * 3. This method binds the submit() method to the form for you. + * + * Note that for accurate x/y coordinates of image submit elements in all browsers + * you need to also use the "dimensions" plugin (this method will auto-detect its presence). + * + * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely + * passes the options argument along after properly binding events for submit elements and + * the form itself. See ajaxSubmit for a full description of the options argument. + * + * + * @example + * var options = { + * target: '#myTargetDiv' + * }; + * $('#myForm').ajaxSForm(options); + * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response + * when the form is submitted. + * + * + * @example + * var options = { + * success: function(responseText) { + * alert(responseText); + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Bind form's submit event so that server response is alerted after the form is submitted. + * + * + * @example + * var options = { + * beforeSubmit: function(formArray, jqForm) { + * if (formArray.length == 0) { + * alert('Please enter data.'); + * return false; + * } + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Bind form's submit event so that pre-submit callback is invoked before the form + * is submitted. + * + * + * @name ajaxForm + * @param options object literal containing options which control the form submission process + * @return jQuery + * @cat Plugins/Form + * @type jQuery + * @see ajaxSubmit + * @author jQuery Community + */ +jQuery.fn.ajaxForm = function(options) { + return this.each(function() { + jQuery("input:submit,input:image,button:submit", this).click(function(ev) { + var $form = this.form; + $form.clk = this; + if (this.type == 'image') { + if (ev.offsetX != undefined) { + $form.clk_x = ev.offsetX; + $form.clk_y = ev.offsetY; + } else if (typeof jQuery.fn.offset == 'function') { // try to use dimensions plugin + var offset = jQuery(this).offset(); + $form.clk_x = ev.pageX - offset.left; + $form.clk_y = ev.pageY - offset.top; + } else { + $form.clk_x = ev.pageX - this.offsetLeft; + $form.clk_y = ev.pageY - this.offsetTop; + } + } + // clear form vars + setTimeout(function() { + $form.clk = $form.clk_x = $form.clk_y = null; + }, 10); + }) + }).submit(function(e) { + jQuery(this).ajaxSubmit(options); + return false; + }); +}; + + +/** + * formToArray() gathers form element data into an array of objects that can + * be passed to any of the following ajax functions: $.get, $.post, or load. + * Each object in the array has both a 'name' and 'value' property. An example of + * an array for a simple login form might be: + * + * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] + * + * It is this array that is passed to pre-submit callback functions provided to the + * ajaxSubmit() and ajaxForm() methods. + * + * The semantic argument can be used to force form serialization in semantic order. + * This is normally true anyway, unless the form contains input elements of type='image'. + * If your form must be submitted with name/value pairs in semantic order and your form + * contains an input of type='image" then pass true for this arg, otherwise pass false + * (or nothing) to avoid the overhead for this logic. + * + * @example var data = $("#myForm").formToArray(); + * $.post( "myscript.cgi", data ); + * @desc Collect all the data from a form and submit it to the server. + * + * @name formToArray + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower) + * @type Array + * @cat Plugins/Form + * @see ajaxForm + * @see ajaxSubmit + * @author jQuery Community + */ +jQuery.fn.formToArray = function(semantic) { + var a = []; + if (this.length == 0) return a; + + var form = this[0]; + var els = semantic ? form.getElementsByTagName('*') : form.elements; + if (!els) return a; + for(var i=0, max=els.length; i < max; i++) { + var el = els[i]; + var n = el.name; + if (!n) continue; + + if (semantic && form.clk && el.type == "image") { + // handle image inputs on the fly when semantic == true + if(!el.disabled && form.clk == el) + a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); + continue; + } + var v = jQuery.fieldValue(el, true); + if (v === null) continue; + if (v.constructor == Array) { + for(var j=0, jmax=v.length; j < jmax; j++) + a.push({name: n, value: v[j]}); + } + else + a.push({name: n, value: v}); + } + + if (!semantic && form.clk) { + // input type=='image' are not found in elements array! handle them here + var inputs = form.getElementsByTagName("input"); + for(var i=0, max=inputs.length; i < max; i++) { + var input = inputs[i]; + var n = input.name; + if(n && !input.disabled && input.type == "image" && form.clk == input) + a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); + } + } + return a; +}; + + +/** + * Serializes form data into a 'submittable' string. This method will return a string + * in the format: name1=value1&name2=value2 + * + * The semantic argument can be used to force form serialization in semantic order. + * If your form must be submitted with name/value pairs in semantic order then pass + * true for this arg, otherwise pass false (or nothing) to avoid the overhead for + * this logic (which can be significant for very large forms). + * + * @example var data = $("#myForm").formSerialize(); + * $.ajax('POST', "myscript.cgi", data); + * @desc Collect all the data from a form into a single string + * + * @name formSerialize + * @param semantic true if serialization must maintain strict semantic ordering of elements (slower) + * @type String + * @cat Plugins/Form + * @see formToArray + * @author jQuery Community + */ +jQuery.fn.formSerialize = function(semantic) { + //hand off to jQuery.param for proper encoding + return jQuery.param(this.formToArray(semantic)); +}; + + +/** + * Serializes all field elements in the jQuery object into a query string. + * This method will return a string in the format: name1=value1&name2=value2 + * + * The successful argument controls whether or not serialization is limited to + * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). + * The default value of the successful argument is true. + * + * @example var data = $("input").formSerialize(); + * @desc Collect the data from all successful input elements into a query string + * + * @example var data = $(":radio").formSerialize(); + * @desc Collect the data from all successful radio input elements into a query string + * + * @example var data = $("#myForm :checkbox").formSerialize(); + * @desc Collect the data from all successful checkbox input elements in myForm into a query string + * + * @example var data = $("#myForm :checkbox").formSerialize(false); + * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string + * + * @example var data = $(":input").formSerialize(); + * @desc Collect the data from all successful input, select, textarea and button elements into a query string + * + * @name fieldSerialize + * @param successful true if only successful controls should be serialized (default is true) + * @type String + * @cat Plugins/Form + */ +jQuery.fn.fieldSerialize = function(successful) { + var a = []; + this.each(function() { + var n = this.name; + if (!n) return; + var v = jQuery.fieldValue(this, successful); + if (v && v.constructor == Array) { + for (var i=0,max=v.length; i < max; i++) + a.push({name: n, value: v[i]}); + } + else if (v !== null && typeof v != 'undefined') + a.push({name: this.name, value: v}); + }); + //hand off to jQuery.param for proper encoding + return jQuery.param(a); +}; + + +/** + * Returns the value of the field element in the jQuery object. If there is more than one field element + * in the jQuery object the value of the first successful one is returned. + * + * The successful argument controls whether or not the field element must be 'successful' + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). + * The default value of the successful argument is true. If this value is false then + * the value of the first field element in the jQuery object is returned. + * + * Note: If no valid value can be determined the return value will be undifined. + * + * Note: The fieldValue returned for a select-multiple element or for a checkbox input will + * always be an array if it is not undefined. + * + * + * @example var data = $("#myPasswordElement").formValue(); + * @desc Gets the current value of the myPasswordElement element + * + * @example var data = $("#myForm :input").formValue(); + * @desc Get the value of the first successful control in the jQuery object. + * + * @example var data = $("#myForm :checkbox").formValue(); + * @desc Get the array of values for the first set of successful checkbox controls in the jQuery object. + * + * @example var data = $("#mySingleSelect").formValue(); + * @desc Get the value of the select control + * + * @example var data = $("#myMultiSelect").formValue(); + * @desc Get the array of selected values for the select-multiple control + * + * @name fieldValue + * @param Boolean successful true if value returned must be for a successful controls (default is true) + * @type String or Array + * @cat Plugins/Form + */ +jQuery.fn.fieldValue = function(successful) { + var cbVal, cbName; + + // loop until we find a value + for (var i=0, max=this.length; i < max; i++) { + var el = this[i]; + var v = jQuery.fieldValue(el, successful); + if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) + continue; + + // for checkboxes, consider multiple elements, for everything else just return first valid value + if (el.type != 'checkbox') return v; + + cbName = cbName || el.name; + if (cbName != el.name) // return if we hit a checkbox with a different name + return cbVal; + cbVal = cbVal || []; + cbVal.push(v); + } + return cbVal; +}; + +/** + * Returns the value of the field element. + * + * The successful argument controls whether or not the field element must be 'successful' + * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). + * The default value of the successful argument is true. If the given element is not + * successful and the successful arg is not false then the returned value will be null. + * + * Note: The fieldValue returned for a select-multiple element will always be an array. + * + * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]); + * @desc Gets the current value of the myPasswordElement element + * + * @name fieldValue + * @param Element el The DOM element for which the value will be returned + * @param Boolean successful true if value returned must be for a successful controls (default is true) + * @type String or Array + * @cat Plugins/Form + */ +jQuery.fieldValue = function(el, successful) { + var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); + if (typeof successful == 'undefined') successful = true; + + if (successful && ( !n || el.disabled || t == 'reset' || + (t == 'checkbox' || t == 'radio') && !el.checked || + (t == 'submit' || t == 'image') && el.form && el.form.clk != el || + tag == 'select' && el.selectedIndex == -1)) + return null; + + if (tag == 'select') { + var index = el.selectedIndex; + if (index < 0) return null; + var a = [], ops = el.options; + var one = (t == 'select-one'); + var max = (one ? index+1 : ops.length); + for(var i=(one ? index : 0); i < max; i++) { + var op = ops[i]; + if (op.selected) { + // extra pain for IE... + var v = jQuery.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value; + if (one) return v; + a.push(v); + } + } + return a; + } + return el.value; +}; + + +/** + * Clears the form data. Takes the following actions on the form's input fields: + * - input text fields will have their 'value' property set to the empty string + * - select elements will have their 'selectedIndex' property set to -1 + * - checkbox and radio inputs will have their 'checked' property set to false + * - inputs of type submit, button, reset, and hidden will *not* be effected + * - button elements will *not* be effected + * + * @example $('form').clearForm(); + * @desc Clears all forms on the page. + * + * @name clearForm + * @type jQuery + * @cat Plugins/Form + * @see resetForm + */ +jQuery.fn.clearForm = function() { + return this.each(function() { + jQuery('input,select,textarea', this).clearFields(); + }); +}; + +/** + * Clears the selected form elements. Takes the following actions on the matched elements: + * - input text fields will have their 'value' property set to the empty string + * - select elements will have their 'selectedIndex' property set to -1 + * - checkbox and radio inputs will have their 'checked' property set to false + * - inputs of type submit, button, reset, and hidden will *not* be effected + * - button elements will *not* be effected + * + * @example $('.myInputs').clearFields(); + * @desc Clears all inputs with class myInputs + * + * @name clearFields + * @type jQuery + * @cat Plugins/Form + * @see clearForm + */ +jQuery.fn.clearFields = jQuery.fn.clearInputs = function() { + return this.each(function() { + var t = this.type, tag = this.tagName.toLowerCase(); + if (t == 'text' || t == 'password' || tag == 'textarea') + this.value = ''; + else if (t == 'checkbox' || t == 'radio') + this.checked = false; + else if (tag == 'select') + this.selectedIndex = -1; + }); +}; + + +/** + * Resets the form data. Causes all form elements to be reset to their original value. + * + * @example $('form').resetForm(); + * @desc Resets all forms on the page. + * + * @name resetForm + * @type jQuery + * @cat Plugins/Form + * @see clearForm + */ +jQuery.fn.resetForm = function() { + return this.each(function() { + // guard against an input with the name of 'reset' + // note that IE reports the reset function as an 'object' + if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) + this.reset(); + }); +}; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/jquery.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/jquery.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/jquery/jquery.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,2201 @@ +/* prevent execution of jQuery if included more than once */ +if(typeof window.jQuery == "undefined") { +/* + * jQuery 1.1.1 - New Wave Javascript + * + * Copyright (c) 2007 John Resig (jquery.com) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * $Date: 2007/12/04 02:48:30 $ + * $Rev: 1153 $ + */ + +// Global undefined variable +window.undefined = window.undefined; +var jQuery = function(a,c) { + // If the context is global, return a new object + if ( window == this ) + return new jQuery(a,c); + + // Make sure that a selection was provided + a = a || document; + + // HANDLE: $(function) + // Shortcut for document ready + if ( jQuery.isFunction(a) ) + return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( a ); + + // Handle HTML strings + if ( typeof a == "string" ) { + // HANDLE: $(html) -> $(array) + var m = /^[^<]*(<(.|\n)+>)[^>]*$/.exec(a); + if ( m ) + a = jQuery.clean( [ m[1] ] ); + + // HANDLE: $(expr) + else + return new jQuery( c ).find( a ); + } + + return this.setArray( + // HANDLE: $(array) + a.constructor == Array && a || + + // HANDLE: $(arraylike) + // Watch for when an array-like object is passed as the selector + (a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) || + + // HANDLE: $(*) + [ a ] ); +}; + +// Map over the $ in case of overwrite +if ( typeof $ != "undefined" ) + jQuery._$ = $; + +// Map the jQuery namespace to the '$' one +var $ = jQuery; + +jQuery.fn = jQuery.prototype = { + jquery: "1.1.1", + + size: function() { + return this.length; + }, + + length: 0, + + get: function( num ) { + return num == undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[num]; + }, + pushStack: function( a ) { + var ret = jQuery(this); + ret.prevObject = this; + return ret.setArray( a ); + }, + setArray: function( a ) { + this.length = 0; + [].push.apply( this, a ); + return this; + }, + each: function( fn, args ) { + return jQuery.each( this, fn, args ); + }, + index: function( obj ) { + var pos = -1; + this.each(function(i){ + if ( this == obj ) pos = i; + }); + return pos; + }, + + attr: function( key, value, type ) { + var obj = key; + + // Look for the case where we're accessing a style value + if ( key.constructor == String ) + if ( value == undefined ) + return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined; + else { + obj = {}; + obj[ key ] = value; + } + + // Check to see if we're setting style values + return this.each(function(index){ + // Set all the styles + for ( var prop in obj ) + jQuery.attr( + type ? this.style : this, + prop, jQuery.prop(this, obj[prop], type, index, prop) + ); + }); + }, + + css: function( key, value ) { + return this.attr( key, value, "curCSS" ); + }, + + text: function(e) { + if ( typeof e == "string" ) + return this.empty().append( document.createTextNode( e ) ); + + var t = ""; + jQuery.each( e || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + t += this.nodeType != 1 ? + this.nodeValue : jQuery.fn.text([ this ]); + }); + }); + return t; + }, + + wrap: function() { + // The elements to wrap the target around + var a = jQuery.clean(arguments); + + // Wrap each of the matched elements individually + return this.each(function(){ + // Clone the structure that we're using to wrap + var b = a[0].cloneNode(true); + + // Insert it before the element to be wrapped + this.parentNode.insertBefore( b, this ); + + // Find the deepest point in the wrap structure + while ( b.firstChild ) + b = b.firstChild; + + // Move the matched element to within the wrap structure + b.appendChild( this ); + }); + }, + append: function() { + return this.domManip(arguments, true, 1, function(a){ + this.appendChild( a ); + }); + }, + prepend: function() { + return this.domManip(arguments, true, -1, function(a){ + this.insertBefore( a, this.firstChild ); + }); + }, + before: function() { + return this.domManip(arguments, false, 1, function(a){ + this.parentNode.insertBefore( a, this ); + }); + }, + after: function() { + return this.domManip(arguments, false, -1, function(a){ + this.parentNode.insertBefore( a, this.nextSibling ); + }); + }, + end: function() { + return this.prevObject || jQuery([]); + }, + find: function(t) { + return this.pushStack( jQuery.map( this, function(a){ + return jQuery.find(t,a); + }) ); + }, + clone: function(deep) { + return this.pushStack( jQuery.map( this, function(a){ + return a.cloneNode( deep != undefined ? deep : true ); + }) ); + }, + + filter: function(t) { + return this.pushStack( + jQuery.isFunction( t ) && + jQuery.grep(this, function(el, index){ + return t.apply(el, [index]) + }) || + + jQuery.multiFilter(t,this) ); + }, + + not: function(t) { + return this.pushStack( + t.constructor == String && + jQuery.multiFilter(t,this,true) || + + jQuery.grep(this,function(a){ + if ( t.constructor == Array || t.jquery ) + return jQuery.inArray( t, a ) < 0; + else + return a != t; + }) ); + }, + + add: function(t) { + return this.pushStack( jQuery.merge( + this.get(), + t.constructor == String ? + jQuery(t).get() : + t.length != undefined && !t.nodeName ? + t : [t] ) + ); + }, + is: function(expr) { + return expr ? jQuery.filter(expr,this).r.length > 0 : false; + }, + + val: function( val ) { + return val == undefined ? + ( this.length ? this[0].value : null ) : + this.attr( "value", val ); + }, + + html: function( val ) { + return val == undefined ? + ( this.length ? this[0].innerHTML : null ) : + this.empty().append( val ); + }, + domManip: function(args, table, dir, fn){ + var clone = this.length > 1; + var a = jQuery.clean(args); + if ( dir < 0 ) + a.reverse(); + + return this.each(function(){ + var obj = this; + + if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") ) + obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody")); + + jQuery.each( a, function(){ + fn.apply( obj, [ clone ? this.cloneNode(true) : this ] ); + }); + + }); + } +}; + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0], + a = 1; + + // extend jQuery itself if only one argument is passed + if ( arguments.length == 1 ) { + target = this; + a = 0; + } + var prop; + while (prop = arguments[a++]) + // Extend the base object + for ( var i in prop ) target[i] = prop[i]; + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function() { + if ( jQuery._$ ) + $ = jQuery._$; + return jQuery; + }, + + // This may seem like some crazy code, but trust me when I say that this + // is the only cross-browser way to do this. --John + isFunction: function( fn ) { + return !!fn && typeof fn != "string" && + typeof fn[0] == "undefined" && /function/i.test( fn + "" ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + // args is for internal usage only + each: function( obj, fn, args ) { + if ( obj.length == undefined ) + for ( var i in obj ) + fn.apply( obj[i], args || [i, obj[i]] ); + else + for ( var i = 0, ol = obj.length; i < ol; i++ ) + if ( fn.apply( obj[i], args || [i, obj[i]] ) === false ) break; + return obj; + }, + + prop: function(elem, value, type, index, prop){ + // Handle executable functions + if ( jQuery.isFunction( value ) ) + return value.call( elem, [index] ); + + // exclude the following css properties to add px + var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i; + + // Handle passing in a number to a CSS property + if ( value.constructor == Number && type == "curCSS" && !exclude.test(prop) ) + return value + "px"; + + return value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, c ){ + jQuery.each( c.split(/\s+/), function(i, cur){ + if ( !jQuery.className.has( elem.className, cur ) ) + elem.className += ( elem.className ? " " : "" ) + cur; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, c ){ + elem.className = c ? + jQuery.grep( elem.className.split(/\s+/), function(cur){ + return !jQuery.className.has( c, cur ); + }).join(" ") : ""; + }, + + // internal only, use is(".class") + has: function( t, c ) { + t = t.className || t; + return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t ); + } + }, + swap: function(e,o,f) { + for ( var i in o ) { + e.style["old"+i] = e.style[i]; + e.style[i] = o[i]; + } + f.apply( e, [] ); + for ( var i in o ) + e.style[i] = e.style["old"+i]; + }, + + css: function(e,p) { + if ( p == "height" || p == "width" ) { + var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"]; + + jQuery.each( d, function(){ + old["padding" + this] = 0; + old["border" + this + "Width"] = 0; + }); + + jQuery.swap( e, old, function() { + if (jQuery.css(e,"display") != "none") { + oHeight = e.offsetHeight; + oWidth = e.offsetWidth; + } else { + e = jQuery(e.cloneNode(true)) + .find(":radio").removeAttr("checked").end() + .css({ + visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0" + }).appendTo(e.parentNode)[0]; + + var parPos = jQuery.css(e.parentNode,"position"); + if ( parPos == "" || parPos == "static" ) + e.parentNode.style.position = "relative"; + + oHeight = e.clientHeight; + oWidth = e.clientWidth; + + if ( parPos == "" || parPos == "static" ) + e.parentNode.style.position = "static"; + + e.parentNode.removeChild(e); + } + }); + + return p == "height" ? oHeight : oWidth; + } + + return jQuery.curCSS( e, p ); + }, + + curCSS: function(elem, prop, force) { + var ret; + + if (prop == "opacity" && jQuery.browser.msie) + return jQuery.attr(elem.style, "opacity"); + + if (prop == "float" || prop == "cssFloat") + prop = jQuery.browser.msie ? "styleFloat" : "cssFloat"; + + if (!force && elem.style[prop]) + ret = elem.style[prop]; + + else if (document.defaultView && document.defaultView.getComputedStyle) { + + if (prop == "cssFloat" || prop == "styleFloat") + prop = "float"; + + prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase(); + var cur = document.defaultView.getComputedStyle(elem, null); + + if ( cur ) + ret = cur.getPropertyValue(prop); + else if ( prop == "display" ) + ret = "none"; + else + jQuery.swap(elem, { display: "block" }, function() { + var c = document.defaultView.getComputedStyle(this, ""); + ret = c && c.getPropertyValue(prop) || ""; + }); + + } else if (elem.currentStyle) { + + var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();}); + ret = elem.currentStyle[prop] || elem.currentStyle[newProp]; + + } + + return ret; + }, + + clean: function(a) { + var r = []; + + jQuery.each( a, function(i,arg){ + if ( !arg ) return; + + if ( arg.constructor == Number ) + arg = arg.toString(); + + // Convert html string into DOM nodes + if ( typeof arg == "string" ) { + // Trim whitespace, otherwise indexOf won't work as expected + var s = jQuery.trim(arg), div = document.createElement("div"), tb = []; + + var wrap = + // option or optgroup + !s.indexOf("", ""] || + + (!s.indexOf("", ""] || + + !s.indexOf("", ""] || + + // matched above + (!s.indexOf("", ""] || + + [0,"",""]; + + // Go to html and back, then peel off extra wrappers + div.innerHTML = wrap[1] + s + wrap[2]; + + // Move to the right depth + while ( wrap[0]-- ) + div = div.firstChild; + + // Remove IE's autoinserted from table fragments + if ( jQuery.browser.msie ) { + + // String was a , *may* have spurious + if ( !s.indexOf(" or + else if ( wrap[1] == "
      " && s.indexOf("= 0 ; --n ) + if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length ) + tb[n].parentNode.removeChild(tb[n]); + + } + + arg = div.childNodes; + } + + if ( arg.length === 0 ) + return; + + if ( arg[0] == undefined ) + r.push( arg ); + else + r = jQuery.merge( r, arg ); + + }); + + return r; + }, + + attr: function(elem, name, value){ + var fix = { + "for": "htmlFor", + "class": "className", + "float": jQuery.browser.msie ? "styleFloat" : "cssFloat", + cssFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat", + innerHTML: "innerHTML", + className: "className", + value: "value", + disabled: "disabled", + checked: "checked", + readonly: "readOnly", + selected: "selected" + }; + + // IE actually uses filters for opacity ... elem is actually elem.style + if ( name == "opacity" && jQuery.browser.msie && value != undefined ) { + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + elem.zoom = 1; + + // Set the alpha filter to set the opacity + return elem.filter = elem.filter.replace(/alpha\([^\)]*\)/gi,"") + + ( value == 1 ? "" : "alpha(opacity=" + value * 100 + ")" ); + + } else if ( name == "opacity" && jQuery.browser.msie ) + return elem.filter ? + parseFloat( elem.filter.match(/alpha\(opacity=(.*)\)/)[1] ) / 100 : 1; + + // Mozilla doesn't play well with opacity 1 + if ( name == "opacity" && jQuery.browser.mozilla && value == 1 ) + value = 0.9999; + + // Certain attributes only work when accessed via the old DOM 0 way + if ( fix[name] ) { + if ( value != undefined ) elem[fix[name]] = value; + return elem[fix[name]]; + + } else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") ) + return elem.getAttributeNode(name).nodeValue; + + // IE elem.getAttribute passes even for style + else if ( elem.tagName ) { + if ( value != undefined ) elem.setAttribute( name, value ); + return elem.getAttribute( name ); + + } else { + name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();}); + if ( value != undefined ) elem[name] = value; + return elem[name]; + } + }, + trim: function(t){ + return t.replace(/^\s+|\s+$/g, ""); + }, + + makeArray: function( a ) { + var r = []; + + if ( a.constructor != Array ) + for ( var i = 0, al = a.length; i < al; i++ ) + r.push( a[i] ); + else + r = a.slice( 0 ); + + return r; + }, + + inArray: function( b, a ) { + for ( var i = 0, al = a.length; i < al; i++ ) + if ( a[i] == b ) + return i; + return -1; + }, + merge: function(first, second) { + var r = [].slice.call( first, 0 ); + + // Now check for duplicates between the two arrays + // and only add the unique items + for ( var i = 0, sl = second.length; i < sl; i++ ) + // Check for duplicates + if ( jQuery.inArray( second[i], r ) == -1 ) + // The item is unique, add it + first.push( second[i] ); + + return first; + }, + grep: function(elems, fn, inv) { + // If a string is passed in for the function, make a function + // for it (a handy shortcut) + if ( typeof fn == "string" ) + fn = new Function("a","i","return " + fn); + + var result = []; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, el = elems.length; i < el; i++ ) + if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) ) + result.push( elems[i] ); + + return result; + }, + map: function(elems, fn) { + // If a string is passed in for the function, make a function + // for it (a handy shortcut) + if ( typeof fn == "string" ) + fn = new Function("a","return " + fn); + + var result = [], r = []; + + // Go through the array, translating each of the items to their + // new value (or values). + for ( var i = 0, el = elems.length; i < el; i++ ) { + var val = fn(elems[i],i); + + if ( val !== null && val != undefined ) { + if ( val.constructor != Array ) val = [val]; + result = result.concat( val ); + } + } + + var r = result.length ? [ result[0] ] : []; + + check: for ( var i = 1, rl = result.length; i < rl; i++ ) { + for ( var j = 0; j < i; j++ ) + if ( result[i] == r[j] ) + continue check; + + r.push( result[i] ); + } + + return r; + } +}); + +/* + * Whether the W3C compliant box model is being used. + * + * @property + * @name $.boxModel + * @type Boolean + * @cat JavaScript + */ +new function() { + var b = navigator.userAgent.toLowerCase(); + + // Figure out what browser is being used + jQuery.browser = { + safari: /webkit/.test(b), + opera: /opera/.test(b), + msie: /msie/.test(b) && !/opera/.test(b), + mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b) + }; + + // Check to see if the W3C box model is being used + jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat"; +}; + +jQuery.each({ + parent: "a.parentNode", + parents: "jQuery.parents(a)", + next: "jQuery.nth(a,2,'nextSibling')", + prev: "jQuery.nth(a,2,'previousSibling')", + siblings: "jQuery.sibling(a.parentNode.firstChild,a)", + children: "jQuery.sibling(a.firstChild)" +}, function(i,n){ + jQuery.fn[ i ] = function(a) { + var ret = jQuery.map(this,n); + if ( a && typeof a == "string" ) + ret = jQuery.multiFilter(a,ret); + return this.pushStack( ret ); + }; +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after" +}, function(i,n){ + jQuery.fn[ i ] = function(){ + var a = arguments; + return this.each(function(){ + for ( var j = 0, al = a.length; j < al; j++ ) + jQuery(a[j])[n]( this ); + }); + }; +}); + +jQuery.each( { + removeAttr: function( key ) { + jQuery.attr( this, key, "" ); + this.removeAttribute( key ); + }, + addClass: function(c){ + jQuery.className.add(this,c); + }, + removeClass: function(c){ + jQuery.className.remove(this,c); + }, + toggleClass: function( c ){ + jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c); + }, + remove: function(a){ + if ( !a || jQuery.filter( a, [this] ).r.length ) + this.parentNode.removeChild( this ); + }, + empty: function() { + while ( this.firstChild ) + this.removeChild( this.firstChild ); + } +}, function(i,n){ + jQuery.fn[ i ] = function() { + return this.each( n, arguments ); + }; +}); + +jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){ + jQuery.fn[ n ] = function(num,fn) { + return this.filter( ":" + n + "(" + num + ")", fn ); + }; +}); + +jQuery.each( [ "height", "width" ], function(i,n){ + jQuery.fn[ n ] = function(h) { + return h == undefined ? + ( this.length ? jQuery.css( this[0], n ) : null ) : + this.css( n, h.constructor == String ? h : h + "px" ); + }; +}); +jQuery.extend({ + expr: { + "": "m[2]=='*'||jQuery.nodeName(a,m[2])", + "#": "a.getAttribute('id')==m[2]", + ":": { + // Position Checks + lt: "im[3]-0", + nth: "m[3]-0==i", + eq: "m[3]-0==i", + first: "i==0", + last: "i==r.length-1", + even: "i%2==0", + odd: "i%2", + + // Child Checks + "nth-child": "jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a", + "first-child": "jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a", + "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a", + "only-child": "jQuery.sibling(a.parentNode.firstChild).length==1", + + // Parent Checks + parent: "a.firstChild", + empty: "!a.firstChild", + + // Text Check + contains: "jQuery.fn.text.apply([a]).indexOf(m[3])>=0", + + // Visibility + visible: 'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"', + hidden: 'a.type=="hidden"||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"', + + // Form attributes + enabled: "!a.disabled", + disabled: "a.disabled", + checked: "a.checked", + selected: "a.selected||jQuery.attr(a,'selected')", + + // Form elements + text: "a.type=='text'", + radio: "a.type=='radio'", + checkbox: "a.type=='checkbox'", + file: "a.type=='file'", + password: "a.type=='password'", + submit: "a.type=='submit'", + image: "a.type=='image'", + reset: "a.type=='reset'", + button: 'a.type=="button"||jQuery.nodeName(a,"button")', + input: "/input|select|textarea|button/i.test(a.nodeName)" + }, + ".": "jQuery.className.has(a,m[2])", + "@": { + "=": "z==m[4]", + "!=": "z!=m[4]", + "^=": "z&&!z.indexOf(m[4])", + "$=": "z&&z.substr(z.length - m[4].length,m[4].length)==m[4]", + "*=": "z&&z.indexOf(m[4])>=0", + "": "z", + _resort: function(m){ + return ["", m[1], m[3], m[2], m[5]]; + }, + _prefix: "z=a[m[3]]||jQuery.attr(a,m[3]);" + }, + "[": "jQuery.find(m[2],a).length" + }, + + // The regular expressions that power the parsing engine + parse: [ + // Match: [@value='test'], [@foo] + /^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i, + + // Match: [div], [div p] + /^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/, + + // Match: :contains('foo') + /^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i, + + // Match: :even, :last-chlid + /^([:.#]*)([a-z0-9_*-]*)/i + ], + + token: [ + /^(\/?\.\.)/, "a.parentNode", + /^(>|\/)/, "jQuery.sibling(a.firstChild)", + /^(\+)/, "jQuery.nth(a,2,'nextSibling')", + /^(~)/, function(a){ + var s = jQuery.sibling(a.parentNode.firstChild); + return s.slice(0, jQuery.inArray(a,s)); + } + ], + + multiFilter: function( expr, elems, not ) { + var old, cur = []; + + while ( expr && expr != old ) { + old = expr; + var f = jQuery.filter( expr, elems, not ); + expr = f.t.replace(/^\s*,\s*/, "" ); + cur = not ? elems = f.r : jQuery.merge( cur, f.r ); + } + + return cur; + }, + find: function( t, context ) { + // Quickly handle non-string expressions + if ( typeof t != "string" ) + return [ t ]; + + // Make sure that the context is a DOM Element + if ( context && !context.nodeType ) + context = null; + + // Set the correct context (if none is provided) + context = context || document; + + // Handle the common XPath // expression + if ( !t.indexOf("//") ) { + context = context.documentElement; + t = t.substr(2,t.length); + + // And the / root expression + } else if ( !t.indexOf("/") ) { + context = context.documentElement; + t = t.substr(1,t.length); + if ( t.indexOf("/") >= 1 ) + t = t.substr(t.indexOf("/"),t.length); + } + + // Initialize the search + var ret = [context], done = [], last = null; + + // Continue while a selector expression exists, and while + // we're no longer looping upon ourselves + while ( t && last != t ) { + var r = []; + last = t; + + t = jQuery.trim(t).replace( /^\/\//i, "" ); + + var foundToken = false; + + // An attempt at speeding up child selectors that + // point to a specific element tag + var re = /^[\/>]\s*([a-z0-9*-]+)/i; + var m = re.exec(t); + + if ( m ) { + // Perform our own iteration and filter + jQuery.each( ret, function(){ + for ( var c = this.firstChild; c; c = c.nextSibling ) + if ( c.nodeType == 1 && ( jQuery.nodeName(c, m[1]) || m[1] == "*" ) ) + r.push( c ); + }); + + ret = r; + t = t.replace( re, "" ); + if ( t.indexOf(" ") == 0 ) continue; + foundToken = true; + } else { + // Look for pre-defined expression tokens + for ( var i = 0; i < jQuery.token.length; i += 2 ) { + // Attempt to match each, individual, token in + // the specified order + var re = jQuery.token[i]; + var m = re.exec(t); + + // If the token match was found + if ( m ) { + // Map it against the token's handler + r = ret = jQuery.map( ret, jQuery.isFunction( jQuery.token[i+1] ) ? + jQuery.token[i+1] : + function(a){ return eval(jQuery.token[i+1]); }); + + // And remove the token + t = jQuery.trim( t.replace( re, "" ) ); + foundToken = true; + break; + } + } + } + + // See if there's still an expression, and that we haven't already + // matched a token + if ( t && !foundToken ) { + // Handle multiple expressions + if ( !t.indexOf(",") ) { + // Clean the result set + if ( ret[0] == context ) ret.shift(); + + // Merge the result sets + jQuery.merge( done, ret ); + + // Reset the context + r = ret = [context]; + + // Touch up the selector string + t = " " + t.substr(1,t.length); + + } else { + // Optomize for the case nodeName#idName + var re2 = /^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i; + var m = re2.exec(t); + + // Re-organize the results, so that they're consistent + if ( m ) { + m = [ 0, m[2], m[3], m[1] ]; + + } else { + // Otherwise, do a traditional filter check for + // ID, class, and element selectors + re2 = /^([#.]?)([a-z0-9\\*_-]*)/i; + m = re2.exec(t); + } + + // Try to do a global search by ID, where we can + if ( m[1] == "#" && ret[ret.length-1].getElementById ) { + // Optimization for HTML document case + var oid = ret[ret.length-1].getElementById(m[2]); + + // Do a quick check for node name (where applicable) so + // that div#foo searches will be really fast + ret = r = oid && + (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : []; + + } else { + // Pre-compile a regular expression to handle class searches + if ( m[1] == "." ) + var rec = new RegExp("(^|\\s)" + m[2] + "(\\s|$)"); + + // We need to find all descendant elements, it is more + // efficient to use getAll() when we are already further down + // the tree - we try to recognize that here + jQuery.each( ret, function(){ + // Grab the tag name being searched for + var tag = m[1] != "" || m[0] == "" ? "*" : m[2]; + + // Handle IE7 being really dumb about s + if ( jQuery.nodeName(this, "object") && tag == "*" ) + tag = "param"; + + jQuery.merge( r, + m[1] != "" && ret.length != 1 ? + jQuery.getAll( this, [], m[1], m[2], rec ) : + this.getElementsByTagName( tag ) + ); + }); + + // It's faster to filter by class and be done with it + if ( m[1] == "." && ret.length == 1 ) + r = jQuery.grep( r, function(e) { + return rec.test(e.className); + }); + + // Same with ID filtering + if ( m[1] == "#" && ret.length == 1 ) { + // Remember, then wipe out, the result set + var tmp = r; + r = []; + + // Then try to find the element with the ID + jQuery.each( tmp, function(){ + if ( this.getAttribute("id") == m[2] ) { + r = [ this ]; + return false; + } + }); + } + + ret = r; + } + + t = t.replace( re2, "" ); + } + + } + + // If a selector string still exists + if ( t ) { + // Attempt to filter it + var val = jQuery.filter(t,r); + ret = r = val.r; + t = jQuery.trim(val.t); + } + } + + // Remove the root context + if ( ret && ret[0] == context ) ret.shift(); + + // And combine the results + jQuery.merge( done, ret ); + + return done; + }, + + filter: function(t,r,not) { + // Look for common filter expressions + while ( t && /^[a-z[({<*:.#]/i.test(t) ) { + + var p = jQuery.parse, m; + + jQuery.each( p, function(i,re){ + + // Look for, and replace, string-like sequences + // and finally build a regexp out of it + m = re.exec( t ); + + if ( m ) { + // Remove what we just matched + t = t.substring( m[0].length ); + + // Re-organize the first match + if ( jQuery.expr[ m[1] ]._resort ) + m = jQuery.expr[ m[1] ]._resort( m ); + + return false; + } + }); + + // :not() is a special case that can be optimized by + // keeping it out of the expression list + if ( m[1] == ":" && m[2] == "not" ) + r = jQuery.filter(m[3], r, true).r; + + // Handle classes as a special case (this will help to + // improve the speed, as the regexp will only be compiled once) + else if ( m[1] == "." ) { + + var re = new RegExp("(^|\\s)" + m[2] + "(\\s|$)"); + r = jQuery.grep( r, function(e){ + return re.test(e.className || ""); + }, not); + + // Otherwise, find the expression to execute + } else { + var f = jQuery.expr[m[1]]; + if ( typeof f != "string" ) + f = jQuery.expr[m[1]][m[2]]; + + // Build a custom macro to enclose it + eval("f = function(a,i){" + + ( jQuery.expr[ m[1] ]._prefix || "" ) + + "return " + f + "}"); + + // Execute it against the current filter + r = jQuery.grep( r, f, not ); + } + } + + // Return an array of filtered elements (r) + // and the modified expression string (t) + return { r: r, t: t }; + }, + + getAll: function( o, r, token, name, re ) { + for ( var s = o.firstChild; s; s = s.nextSibling ) + if ( s.nodeType == 1 ) { + var add = true; + + if ( token == "." ) + add = s.className && re.test(s.className); + else if ( token == "#" ) + add = s.getAttribute("id") == name; + + if ( add ) + r.push( s ); + + if ( token == "#" && r.length ) break; + + if ( s.firstChild ) + jQuery.getAll( s, r, token, name, re ); + } + + return r; + }, + parents: function( elem ){ + var matched = []; + var cur = elem.parentNode; + while ( cur && cur != document ) { + matched.push( cur ); + cur = cur.parentNode; + } + return matched; + }, + nth: function(cur,result,dir,elem){ + result = result || 1; + var num = 0; + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType == 1 ) num++; + if ( num == result || result == "even" && num % 2 == 0 && num > 1 && cur == elem || + result == "odd" && num % 2 == 1 && cur == elem ) return cur; + } + }, + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType == 1 && (!elem || n != elem) ) + r.push( n ); + } + + return r; + } +}); +/* + * A number of helper functions used for managing events. + * Many of the ideas behind this code orignated from + * Dean Edwards' addEvent library. + */ +jQuery.event = { + + // Bind an event to an element + // Original by Dean Edwards + add: function(element, type, handler, data) { + // For whatever reason, IE has trouble passing the window object + // around, causing it to be cloned in the process + if ( jQuery.browser.msie && element.setInterval != undefined ) + element = window; + + // if data is passed, bind to handler + if( data ) + handler.data = data; + + // Make sure that the function being executed has a unique ID + if ( !handler.guid ) + handler.guid = this.guid++; + + // Init the element's event structure + if (!element.events) + element.events = {}; + + // Get the current list of functions bound to this event + var handlers = element.events[type]; + + // If it hasn't been initialized yet + if (!handlers) { + // Init the event handler queue + handlers = element.events[type] = {}; + + // Remember an existing handler, if it's already there + if (element["on" + type]) + handlers[0] = element["on" + type]; + } + + // Add the function to the element's handler list + handlers[handler.guid] = handler; + + // And bind the global event handler to the element + element["on" + type] = this.handle; + + // Remember the function in a global list (for triggering) + if (!this.global[type]) + this.global[type] = []; + this.global[type].push( element ); + }, + + guid: 1, + global: {}, + + // Detach an event or set of events from an element + remove: function(element, type, handler) { + if (element.events) + if ( type && type.type ) + delete element.events[ type.type ][ type.handler.guid ]; + else if (type && element.events[type]) + if ( handler ) + delete element.events[type][handler.guid]; + else + for ( var i in element.events[type] ) + delete element.events[type][i]; + else + for ( var j in element.events ) + this.remove( element, j ); + }, + + trigger: function(type,data,element) { + // Clone the incoming data, if any + data = jQuery.makeArray(data || []); + + // Handle a global trigger + if ( !element ) + jQuery.each( this.global[type] || [], function(){ + jQuery.event.trigger( type, data, this ); + }); + + // Handle triggering a single element + else { + var handler = element["on" + type ], val, + fn = jQuery.isFunction( element[ type ] ); + + if ( handler ) { + // Pass along a fake event + data.unshift( this.fix({ type: type, target: element }) ); + + // Trigger the event + if ( (val = handler.apply( element, data )) !== false ) + this.triggered = true; + } + + if ( fn && val !== false ) + element[ type ](); + + this.triggered = false; + } + }, + + handle: function(event) { + // Handle the second event of a trigger and when + // an event is called after a page has unloaded + if ( typeof jQuery == "undefined" || jQuery.event.triggered ) return; + + // Empty object is for triggered events with no data + event = jQuery.event.fix( event || window.event || {} ); + + // returned undefined or false + var returnValue; + + var c = this.events[event.type]; + + var args = [].slice.call( arguments, 1 ); + args.unshift( event ); + + for ( var j in c ) { + // Pass in a reference to the handler function itself + // So that we can later remove it + args[0].handler = c[j]; + args[0].data = c[j].data; + + if ( c[j].apply( this, args ) === false ) { + event.preventDefault(); + event.stopPropagation(); + returnValue = false; + } + } + + // Clean up added properties in IE to prevent memory leak + if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null; + + return returnValue; + }, + + fix: function(event) { + // Fix target property, if necessary + if ( !event.target && event.srcElement ) + event.target = event.srcElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == undefined && event.clientX != undefined ) { + var e = document.documentElement, b = document.body; + event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft); + event.pageY = event.clientY + (e.scrollTop || b.scrollTop); + } + + // check if target is a textnode (safari) + if (jQuery.browser.safari && event.target.nodeType == 3) { + // store a copy of the original event object + // and clone because target is read only + var originalEvent = event; + event = jQuery.extend({}, originalEvent); + + // get parentnode from textnode + event.target = originalEvent.target.parentNode; + + // add preventDefault and stopPropagation since + // they will not work on the clone + event.preventDefault = function() { + return originalEvent.preventDefault(); + }; + event.stopPropagation = function() { + return originalEvent.stopPropagation(); + }; + } + + // fix preventDefault and stopPropagation + if (!event.preventDefault) + event.preventDefault = function() { + this.returnValue = false; + }; + + if (!event.stopPropagation) + event.stopPropagation = function() { + this.cancelBubble = true; + }; + + return event; + } +}; + +jQuery.fn.extend({ + bind: function( type, data, fn ) { + return this.each(function(){ + jQuery.event.add( this, type, fn || data, data ); + }); + }, + one: function( type, data, fn ) { + return this.each(function(){ + jQuery.event.add( this, type, function(event) { + jQuery(this).unbind(event); + return (fn || data).apply( this, arguments); + }, data); + }); + }, + unbind: function( type, fn ) { + return this.each(function(){ + jQuery.event.remove( this, type, fn ); + }); + }, + trigger: function( type, data ) { + return this.each(function(){ + jQuery.event.trigger( type, data, this ); + }); + }, + toggle: function() { + // Save reference to arguments for access in closure + var a = arguments; + + return this.click(function(e) { + // Figure out which function to execute + this.lastToggle = this.lastToggle == 0 ? 1 : 0; + + // Make sure that clicks stop + e.preventDefault(); + + // and execute the function + return a[this.lastToggle].apply( this, [e] ) || false; + }); + }, + hover: function(f,g) { + + // A private function for handling mouse 'hovering' + function handleHover(e) { + // Check if mouse(over|out) are still within the same parent element + var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; + + // Traverse up the tree + while ( p && p != this ) try { p = p.parentNode } catch(e) { p = this; }; + + // If we actually just moused on to a sub-element, ignore it + if ( p == this ) return false; + + // Execute the right function + return (e.type == "mouseover" ? f : g).apply(this, [e]); + } + + // Bind the function to the two event listeners + return this.mouseover(handleHover).mouseout(handleHover); + }, + ready: function(f) { + // If the DOM is already ready + if ( jQuery.isReady ) + // Execute the function immediately + f.apply( document, [jQuery] ); + + // Otherwise, remember the function for later + else { + // Add the function to the wait list + jQuery.readyList.push( function() { return f.apply(this, [jQuery]) } ); + } + + return this; + } +}); + +jQuery.extend({ + /* + * All the code that makes DOM Ready work nicely. + */ + isReady: false, + readyList: [], + + // Handle when the DOM is ready + ready: function() { + // Make sure that the DOM is not already loaded + if ( !jQuery.isReady ) { + // Remember that the DOM is ready + jQuery.isReady = true; + + // If there are functions bound, to execute + if ( jQuery.readyList ) { + // Execute all of them + jQuery.each( jQuery.readyList, function(){ + this.apply( document ); + }); + + // Reset the list of functions + jQuery.readyList = null; + } + // Remove event lisenter to avoid memory leak + if ( jQuery.browser.mozilla || jQuery.browser.opera ) + document.removeEventListener( "DOMContentLoaded", jQuery.ready, false ); + } + } +}); + +new function(){ + + jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + + "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + + "submit,keydown,keypress,keyup,error").split(","), function(i,o){ + + // Handle event binding + jQuery.fn[o] = function(f){ + return f ? this.bind(o, f) : this.trigger(o); + }; + + }); + + // If Mozilla is used + if ( jQuery.browser.mozilla || jQuery.browser.opera ) + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); + + // If IE is used, use the excellent hack by Matthias Miller + // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited + else if ( jQuery.browser.msie ) { + + // Only works if you document.write() it + document.write("<\/script>"); + + // Use the defer script hack + var script = document.getElementById("__ie_init"); + + // script does not exist if jQuery is loaded dynamically + if ( script ) + script.onreadystatechange = function() { + if ( this.readyState != "complete" ) return; + this.parentNode.removeChild( this ); + jQuery.ready(); + }; + + // Clear from memory + script = null; + + // If Safari is used + } else if ( jQuery.browser.safari ) + // Continually check to see if the document.readyState is valid + jQuery.safariTimer = setInterval(function(){ + // loaded and complete are both valid states + if ( document.readyState == "loaded" || + document.readyState == "complete" ) { + + // If either one are found, remove the timer + clearInterval( jQuery.safariTimer ); + jQuery.safariTimer = null; + + // and execute any waiting functions + jQuery.ready(); + } + }, 10); + + // A fallback to window.onload, that will always work + jQuery.event.add( window, "load", jQuery.ready ); + +}; + +// Clean up after IE to avoid memory leaks +if (jQuery.browser.msie) + jQuery(window).one("unload", function() { + var global = jQuery.event.global; + for ( var type in global ) { + var els = global[type], i = els.length; + if ( i && type != 'unload' ) + do + jQuery.event.remove(els[i-1], type); + while (--i); + } + }); +jQuery.fn.extend({ + + show: function(speed,callback){ + var hidden = this.filter(":hidden"); + speed ? + hidden.animate({ + height: "show", width: "show", opacity: "show" + }, speed, callback) : + + hidden.each(function(){ + this.style.display = this.oldblock ? this.oldblock : ""; + if ( jQuery.css(this,"display") == "none" ) + this.style.display = "block"; + }); + return this; + }, + + hide: function(speed,callback){ + var visible = this.filter(":visible"); + speed ? + visible.animate({ + height: "hide", width: "hide", opacity: "hide" + }, speed, callback) : + + visible.each(function(){ + this.oldblock = this.oldblock || jQuery.css(this,"display"); + if ( this.oldblock == "none" ) + this.oldblock = "block"; + this.style.display = "none"; + }); + return this; + }, + + // Save the old toggle function + _toggle: jQuery.fn.toggle, + toggle: function( fn, fn2 ){ + var args = arguments; + return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? + this._toggle( fn, fn2 ) : + this.each(function(){ + jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ] + .apply( jQuery(this), args ); + }); + }, + slideDown: function(speed,callback){ + return this.animate({height: "show"}, speed, callback); + }, + slideUp: function(speed,callback){ + return this.animate({height: "hide"}, speed, callback); + }, + slideToggle: function(speed, callback){ + return this.each(function(){ + var state = jQuery(this).is(":hidden") ? "show" : "hide"; + jQuery(this).animate({height: state}, speed, callback); + }); + }, + fadeIn: function(speed, callback){ + return this.animate({opacity: "show"}, speed, callback); + }, + fadeOut: function(speed, callback){ + return this.animate({opacity: "hide"}, speed, callback); + }, + fadeTo: function(speed,to,callback){ + return this.animate({opacity: to}, speed, callback); + }, + animate: function( prop, speed, easing, callback ) { + return this.queue(function(){ + + this.curAnim = jQuery.extend({}, prop); + var opt = jQuery.speed(speed, easing, callback); + + for ( var p in prop ) { + var e = new jQuery.fx( this, opt, p ); + if ( prop[p].constructor == Number ) + e.custom( e.cur(), prop[p] ); + else + e[ prop[p] ]( prop ); + } + + }); + }, + queue: function(type,fn){ + if ( !fn ) { + fn = type; + type = "fx"; + } + + return this.each(function(){ + if ( !this.queue ) + this.queue = {}; + + if ( !this.queue[type] ) + this.queue[type] = []; + + this.queue[type].push( fn ); + + if ( this.queue[type].length == 1 ) + fn.apply(this); + }); + } + +}); + +jQuery.extend({ + + speed: function(speed, easing, fn) { + var opt = speed && speed.constructor == Object ? speed : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && easing.constructor != Function && easing + }; + + opt.duration = (opt.duration && opt.duration.constructor == Number ? + opt.duration : + { slow: 600, fast: 200 }[opt.duration]) || 400; + + // Queueing + opt.old = opt.complete; + opt.complete = function(){ + jQuery.dequeue(this, "fx"); + if ( jQuery.isFunction( opt.old ) ) + opt.old.apply( this ); + }; + + return opt; + }, + + easing: {}, + + queue: {}, + + dequeue: function(elem,type){ + type = type || "fx"; + + if ( elem.queue && elem.queue[type] ) { + // Remove self + elem.queue[type].shift(); + + // Get next function + var f = elem.queue[type][0]; + + if ( f ) f.apply( elem ); + } + }, + + /* + * I originally wrote fx() as a clone of moo.fx and in the process + * of making it small in size the code became illegible to sane + * people. You've been warned. + */ + + fx: function( elem, options, prop ){ + + var z = this; + + // The styles + var y = elem.style; + + // Store display property + var oldDisplay = jQuery.css(elem, "display"); + + // Set display property to block for animation + y.display = "block"; + + // Make sure that nothing sneaks out + y.overflow = "hidden"; + + // Simple function for setting a style value + z.a = function(){ + if ( options.step ) + options.step.apply( elem, [ z.now ] ); + + if ( prop == "opacity" ) + jQuery.attr(y, "opacity", z.now); // Let attr handle opacity + else if ( parseInt(z.now) ) // My hate for IE will never die + y[prop] = parseInt(z.now) + "px"; + }; + + // Figure out the maximum number to run to + z.max = function(){ + return parseFloat( jQuery.css(elem,prop) ); + }; + + // Get the current size + z.cur = function(){ + var r = parseFloat( jQuery.curCSS(elem, prop) ); + return r && r > -10000 ? r : z.max(); + }; + + // Start an animation from one number to another + z.custom = function(from,to){ + z.startTime = (new Date()).getTime(); + z.now = from; + z.a(); + + z.timer = setInterval(function(){ + z.step(from, to); + }, 13); + }; + + // Simple 'show' function + z.show = function(){ + if ( !elem.orig ) elem.orig = {}; + + // Remember where we started, so that we can go back to it later + elem.orig[prop] = this.cur(); + + options.show = true; + + // Begin the animation + z.custom(0, elem.orig[prop]); + + // Stupid IE, look what you made me do + if ( prop != "opacity" ) + y[prop] = "1px"; + }; + + // Simple 'hide' function + z.hide = function(){ + if ( !elem.orig ) elem.orig = {}; + + // Remember where we started, so that we can go back to it later + elem.orig[prop] = this.cur(); + + options.hide = true; + + // Begin the animation + z.custom(elem.orig[prop], 0); + }; + + //Simple 'toggle' function + z.toggle = function() { + if ( !elem.orig ) elem.orig = {}; + + // Remember where we started, so that we can go back to it later + elem.orig[prop] = this.cur(); + + if(oldDisplay == "none") { + options.show = true; + + // Stupid IE, look what you made me do + if ( prop != "opacity" ) + y[prop] = "1px"; + + // Begin the animation + z.custom(0, elem.orig[prop]); + } else { + options.hide = true; + + // Begin the animation + z.custom(elem.orig[prop], 0); + } + }; + + // Each step of an animation + z.step = function(firstNum, lastNum){ + var t = (new Date()).getTime(); + + if (t > options.duration + z.startTime) { + // Stop the timer + clearInterval(z.timer); + z.timer = null; + + z.now = lastNum; + z.a(); + + if (elem.curAnim) elem.curAnim[ prop ] = true; + + var done = true; + for ( var i in elem.curAnim ) + if ( elem.curAnim[i] !== true ) + done = false; + + if ( done ) { + // Reset the overflow + y.overflow = ""; + + // Reset the display + y.display = oldDisplay; + if (jQuery.css(elem, "display") == "none") + y.display = "block"; + + // Hide the element if the "hide" operation was done + if ( options.hide ) + y.display = "none"; + + // Reset the properties, if the item has been hidden or shown + if ( options.hide || options.show ) + for ( var p in elem.curAnim ) + if (p == "opacity") + jQuery.attr(y, p, elem.orig[p]); + else + y[p] = ""; + } + + // If a callback was provided, execute it + if ( done && jQuery.isFunction( options.complete ) ) + // Execute the complete function + options.complete.apply( elem ); + } else { + var n = t - this.startTime; + // Figure out where in the animation we are and set the number + var p = n / options.duration; + + // If the easing function exists, then use it + z.now = options.easing && jQuery.easing[options.easing] ? + jQuery.easing[options.easing](p, n, firstNum, (lastNum-firstNum), options.duration) : + // else use default linear easing + ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum; + + // Perform the next step of the animation + z.a(); + } + }; + + } +}); +jQuery.fn.extend({ + loadIfModified: function( url, params, callback ) { + this.load( url, params, callback, 1 ); + }, + load: function( url, params, callback, ifModified ) { + if ( jQuery.isFunction( url ) ) + return this.bind("load", url); + + callback = callback || function(){}; + + // Default to a GET request + var type = "GET"; + + // If the second parameter was provided + if ( params ) + // If it's a function + if ( jQuery.isFunction( params ) ) { + // We assume that it's the callback + callback = params; + params = null; + + // Otherwise, build a param string + } else { + params = jQuery.param( params ); + type = "POST"; + } + + var self = this; + + // Request the remote document + jQuery.ajax({ + url: url, + type: type, + data: params, + ifModified: ifModified, + complete: function(res, status){ + if ( status == "success" || !ifModified && status == "notmodified" ) + // Inject the HTML into all the matched elements + self.attr("innerHTML", res.responseText) + // Execute all the scripts inside of the newly-injected HTML + .evalScripts() + // Execute callback + .each( callback, [res.responseText, status, res] ); + else + callback.apply( self, [res.responseText, status, res] ); + } + }); + return this; + }, + serialize: function() { + return jQuery.param( this ); + }, + evalScripts: function() { + return this.find("script").each(function(){ + if ( this.src ) + jQuery.getScript( this.src ); + else + jQuery.globalEval( this.text || this.textContent || this.innerHTML || "" ); + }).end(); + } + +}); + +// If IE is used, create a wrapper for the XMLHttpRequest object +if ( !window.XMLHttpRequest ) + XMLHttpRequest = function(){ + return new ActiveXObject("Microsoft.XMLHTTP"); + }; + +// Attach a bunch of functions for handling common AJAX events + +jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ + jQuery.fn[o] = function(f){ + return this.bind(o, f); + }; +}); + +jQuery.extend({ + get: function( url, data, callback, type, ifModified ) { + // shift arguments if data argument was ommited + if ( jQuery.isFunction( data ) ) { + callback = data; + data = null; + } + + return jQuery.ajax({ + url: url, + data: data, + success: callback, + dataType: type, + ifModified: ifModified + }); + }, + getIfModified: function( url, data, callback, type ) { + return jQuery.get(url, data, callback, type, 1); + }, + getScript: function( url, callback ) { + return jQuery.get(url, null, callback, "script"); + }, + getJSON: function( url, data, callback ) { + return jQuery.get(url, data, callback, "json"); + }, + post: function( url, data, callback, type ) { + if ( jQuery.isFunction( data ) ) { + callback = data; + data = {}; + } + + return jQuery.ajax({ + type: "POST", + url: url, + data: data, + success: callback, + dataType: type + }); + }, + + // timeout (ms) + //timeout: 0, + ajaxTimeout: function( timeout ) { + jQuery.ajaxSettings.timeout = timeout; + }, + ajaxSetup: function( settings ) { + jQuery.extend( jQuery.ajaxSettings, settings ); + }, + + ajaxSettings: { + global: true, + type: "GET", + timeout: 0, + contentType: "application/x-www-form-urlencoded", + processData: true, + async: true, + data: null + }, + + // Last-Modified header cache for next request + lastModified: {}, + ajax: function( s ) { + // TODO introduce global settings, allowing the client to modify them for all requests, not only timeout + s = jQuery.extend({}, jQuery.ajaxSettings, s); + + // if data available + if ( s.data ) { + // convert data if not already a string + if (s.processData && typeof s.data != "string") + s.data = jQuery.param(s.data); + // append data to url for get requests + if( s.type.toLowerCase() == "get" ) + // "?" + data or "&" + data (in case there are already params) + s.url += ((s.url.indexOf("?") > -1) ? "&" : "?") + s.data; + } + + // Watch for a new set of requests + if ( s.global && ! jQuery.active++ ) + jQuery.event.trigger( "ajaxStart" ); + + var requestDone = false; + + // Create the request object + var xml = new XMLHttpRequest(); + + // Open the socket + xml.open(s.type, s.url, s.async); + + // Set the correct header, if data is being sent + if ( s.data ) + xml.setRequestHeader("Content-Type", s.contentType); + + // Set the If-Modified-Since header, if ifModified mode. + if ( s.ifModified ) + xml.setRequestHeader("If-Modified-Since", + jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" ); + + // Set header so the called script knows that it's an XMLHttpRequest + xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + + // Make sure the browser sends the right content length + if ( xml.overrideMimeType ) + xml.setRequestHeader("Connection", "close"); + + // Allow custom headers/mimetypes + if( s.beforeSend ) + s.beforeSend(xml); + + if ( s.global ) + jQuery.event.trigger("ajaxSend", [xml, s]); + + // Wait for a response to come back + var onreadystatechange = function(isTimeout){ + // The transfer is complete and the data is available, or the request timed out + if ( xml && (xml.readyState == 4 || isTimeout == "timeout") ) { + requestDone = true; + var status; + try { + status = jQuery.httpSuccess( xml ) && isTimeout != "timeout" ? + s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error"; + // Make sure that the request was successful or notmodified + if ( status != "error" ) { + // Cache Last-Modified header, if ifModified mode. + var modRes; + try { + modRes = xml.getResponseHeader("Last-Modified"); + } catch(e) {} // swallow exception thrown by FF if header is not available + + if ( s.ifModified && modRes ) + jQuery.lastModified[s.url] = modRes; + + // process the data (runs the xml through httpData regardless of callback) + var data = jQuery.httpData( xml, s.dataType ); + + // If a local callback was specified, fire it and pass it the data + if ( s.success ) + s.success( data, status ); + + // Fire the global callback + if( s.global ) + jQuery.event.trigger( "ajaxSuccess", [xml, s] ); + } else + jQuery.handleError(s, xml, status); + } catch(e) { + status = "error"; + jQuery.handleError(s, xml, status, e); + } + + // The request was completed + if( s.global ) + jQuery.event.trigger( "ajaxComplete", [xml, s] ); + + // Handle the global AJAX counter + if ( s.global && ! --jQuery.active ) + jQuery.event.trigger( "ajaxStop" ); + + // Process result + if ( s.complete ) + s.complete(xml, status); + + // Stop memory leaks + xml.onreadystatechange = function(){}; + xml = null; + } + }; + xml.onreadystatechange = onreadystatechange; + + // Timeout checker + if ( s.timeout > 0 ) + setTimeout(function(){ + // Check to see if the request is still happening + if ( xml ) { + // Cancel the request + xml.abort(); + + if( !requestDone ) + onreadystatechange( "timeout" ); + } + }, s.timeout); + + // save non-leaking reference + var xml2 = xml; + + // Send the data + try { + xml2.send(s.data); + } catch(e) { + jQuery.handleError(s, xml, null, e); + } + + // firefox 1.5 doesn't fire statechange for sync requests + if ( !s.async ) + onreadystatechange(); + + // return XMLHttpRequest to allow aborting the request etc. + return xml2; + }, + + handleError: function( s, xml, status, e ) { + // If a local callback was specified, fire it + if ( s.error ) s.error( xml, status, e ); + + // Fire the global callback + if ( s.global ) + jQuery.event.trigger( "ajaxError", [xml, s, e] ); + }, + + // Counter for holding the number of active queries + active: 0, + + // Determines if an XMLHttpRequest was successful or not + httpSuccess: function( r ) { + try { + return !r.status && location.protocol == "file:" || + ( r.status >= 200 && r.status < 300 ) || r.status == 304 || + jQuery.browser.safari && r.status == undefined; + } catch(e){} + return false; + }, + + // Determines if an XMLHttpRequest returns NotModified + httpNotModified: function( xml, url ) { + try { + var xmlRes = xml.getResponseHeader("Last-Modified"); + + // Firefox always returns 200. check Last-Modified date + return xml.status == 304 || xmlRes == jQuery.lastModified[url] || + jQuery.browser.safari && xml.status == undefined; + } catch(e){} + return false; + }, + + /* Get the data out of an XMLHttpRequest. + * Return parsed XML if content-type header is "xml" and type is "xml" or omitted, + * otherwise return plain text. + * (String) data - The type of data that you're expecting back, + * (e.g. "xml", "html", "script") + */ + httpData: function( r, type ) { + var ct = r.getResponseHeader("content-type"); + var data = !type && ct && ct.indexOf("xml") >= 0; + data = type == "xml" || data ? r.responseXML : r.responseText; + + // If the type is "script", eval it in global context + if ( type == "script" ) + jQuery.globalEval( data ); + + // Get the JavaScript object, if JSON is used. + if ( type == "json" ) + eval( "data = " + data ); + + // evaluate scripts within html + if ( type == "html" ) + jQuery("
      ").html(data).evalScripts(); + + return data; + }, + + // Serialize an array of form elements or a set of + // key/values into a query string + param: function( a ) { + var s = []; + + // If an array was passed in, assume that it is an array + // of form elements + if ( a.constructor == Array || a.jquery ) + // Serialize the form elements + jQuery.each( a, function(){ + s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) ); + }); + + // Otherwise, assume that it's an object of key/value pairs + else + // Serialize the key/values + for ( var j in a ) + // If the value is an array then the key names need to be repeated + if ( a[j] && a[j].constructor == Array ) + jQuery.each( a[j], function(){ + s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) ); + }); + else + s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) ); + + // Return the resulting serialization + return s.join("&"); + }, + + // evalulates a script in global context + // not reliable for safari + globalEval: function( data ) { + if ( window.execScript ) + window.execScript( data ); + else if ( jQuery.browser.safari ) + // safari doesn't provide a synchronous global eval + window.setTimeout( data, 0 ); + else + eval.call( window, data ); + } + +}); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/effects.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/effects.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/effects.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,1098 @@ +/* + * Ext JS Library 1.0 Beta 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://www.extjs.com/license + */ + +// script.aculo.us effects.js v1.7.0, Fri Jan 19 19:16:36 CET 2007 + +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// Contributors: +// Justin Palmer (http://encytemedia.com/) +// Mark Pilgrim (http://diveintomark.org/) +// Martin Bialasinki +// +// script.aculo.us is freely distributable under the terms of an MIT-style license. +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +// converts rgb() and #xxx to #xxxxxx format, +// returns self (or first argument) if not convertable +String.prototype.parseColor = function() { + var color = '#'; + if(this.slice(0,4) == 'rgb(') { + var cols = this.slice(4,this.length-1).split(','); + var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); + } else { + if(this.slice(0,1) == '#') { + if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); + if(this.length==7) color = this.toLowerCase(); + } + } + return(color.length==7 ? color : (arguments[0] || this)); +} + +/*--------------------------------------------------------------------------*/ + +Element.collectTextNodes = function(element) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); + }).flatten().join(''); +} + +Element.collectTextNodesIgnoreClass = function(element, className) { + return $A($(element).childNodes).collect( function(node) { + return (node.nodeType==3 ? node.nodeValue : + ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? + Element.collectTextNodesIgnoreClass(node, className) : '')); + }).flatten().join(''); +} + +Element.setContentZoom = function(element, percent) { + element = $(element); + element.setStyle({fontSize: (percent/100) + 'em'}); + if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); + return element; +} + +Element.getOpacity = function(element){ + return $(element).getStyle('opacity'); +} + +Element.setOpacity = function(element, value){ + return $(element).setStyle({opacity:value}); +} + +Element.getInlineOpacity = function(element){ + return $(element).style.opacity || ''; +} + +Element.forceRerendering = function(element) { + try { + element = $(element); + var n = document.createTextNode(' '); + element.appendChild(n); + element.removeChild(n); + } catch(e) { } +}; + +/*--------------------------------------------------------------------------*/ + +Array.prototype.call = function() { + var args = arguments; + this.each(function(f){ f.apply(this, args) }); +} + +/*--------------------------------------------------------------------------*/ + +var Effect = { + _elementDoesNotExistError: { + name: 'ElementDoesNotExistError', + message: 'The specified DOM element does not exist, but is required for this effect to operate' + }, + tagifyText: function(element) { + if(typeof Builder == 'undefined') + throw("Effect.tagifyText requires including script.aculo.us' builder.js library"); + + var tagifyStyle = 'position:relative'; + if(/MSIE/.test(navigator.userAgent) && !window.opera) tagifyStyle += ';zoom:1'; + + element = $(element); + $A(element.childNodes).each( function(child) { + if(child.nodeType==3) { + child.nodeValue.toArray().each( function(character) { + element.insertBefore( + Builder.node('span',{style: tagifyStyle}, + character == ' ' ? String.fromCharCode(160) : character), + child); + }); + Element.remove(child); + } + }); + }, + multiple: function(element, effect) { + var elements; + if(((typeof element == 'object') || + (typeof element == 'function')) && + (element.length)) + elements = element; + else + elements = $(element).childNodes; + + var options = Object.extend({ + speed: 0.1, + delay: 0.0 + }, arguments[2] || {}); + var masterDelay = options.delay; + + $A(elements).each( function(element, index) { + new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); + }); + }, + PAIRS: { + 'slide': ['SlideDown','SlideUp'], + 'blind': ['BlindDown','BlindUp'], + 'appear': ['Appear','Fade'] + }, + toggle: function(element, effect) { + element = $(element); + effect = (effect || 'appear').toLowerCase(); + var options = Object.extend({ + queue: { position:'end', scope:(element.id || 'global'), limit: 1 } + }, arguments[2] || {}); + Effect[element.visible() ? + Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); + } +}; + +var Effect2 = Effect; // deprecated + +/* ------------- transitions ------------- */ + +Effect.Transitions = { + linear: Prototype.K, + sinoidal: function(pos) { + return (-Math.cos(pos*Math.PI)/2) + 0.5; + }, + reverse: function(pos) { + return 1-pos; + }, + flicker: function(pos) { + return ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4; + }, + wobble: function(pos) { + return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5; + }, + pulse: function(pos, pulses) { + pulses = pulses || 5; + return ( + Math.round((pos % (1/pulses)) * pulses) == 0 ? + ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) : + 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) + ); + }, + none: function(pos) { + return 0; + }, + full: function(pos) { + return 1; + } +}; + +/* ------------- core effects ------------- */ + +Effect.ScopedQueue = Class.create(); +Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), { + initialize: function() { + this.effects = []; + this.interval = null; + }, + _each: function(iterator) { + this.effects._each(iterator); + }, + add: function(effect) { + var timestamp = new Date().getTime(); + + var position = (typeof effect.options.queue == 'string') ? + effect.options.queue : effect.options.queue.position; + + switch(position) { + case 'front': + // move unstarted effects after this effect + this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { + e.startOn += effect.finishOn; + e.finishOn += effect.finishOn; + }); + break; + case 'with-last': + timestamp = this.effects.pluck('startOn').max() || timestamp; + break; + case 'end': + // start effect after last queued effect has finished + timestamp = this.effects.pluck('finishOn').max() || timestamp; + break; + } + + effect.startOn += timestamp; + effect.finishOn += timestamp; + + if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) + this.effects.push(effect); + + if(!this.interval) + this.interval = setInterval(this.loop.bind(this), 15); + }, + remove: function(effect) { + this.effects = this.effects.reject(function(e) { return e==effect }); + if(this.effects.length == 0) { + clearInterval(this.interval); + this.interval = null; + } + }, + loop: function() { + var timePos = new Date().getTime(); + for(var i=0, len=this.effects.length;i= this.startOn) { + if(timePos >= this.finishOn) { + this.render(1.0); + this.cancel(); + this.event('beforeFinish'); + if(this.finish) this.finish(); + this.event('afterFinish'); + return; + } + var pos = (timePos - this.startOn) / (this.finishOn - this.startOn); + var frame = Math.round(pos * this.options.fps * this.options.duration); + if(frame > this.currentFrame) { + this.render(pos); + this.currentFrame = frame; + } + } + }, + render: function(pos) { + if(this.state == 'idle') { + this.state = 'running'; + this.event('beforeSetup'); + if(this.setup) this.setup(); + this.event('afterSetup'); + } + if(this.state == 'running') { + if(this.options.transition) pos = this.options.transition(pos); + pos *= (this.options.to-this.options.from); + pos += this.options.from; + this.position = pos; + this.event('beforeUpdate'); + if(this.update) this.update(pos); + this.event('afterUpdate'); + } + }, + cancel: function() { + if(!this.options.sync) + Effect.Queues.get(typeof this.options.queue == 'string' ? + 'global' : this.options.queue.scope).remove(this); + this.state = 'finished'; + }, + event: function(eventName) { + if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); + if(this.options[eventName]) this.options[eventName](this); + }, + inspect: function() { + var data = $H(); + for(property in this) + if(typeof this[property] != 'function') data[property] = this[property]; + return '#'; + } +} + +Effect.Parallel = Class.create(); +Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), { + initialize: function(effects) { + this.effects = effects || []; + this.start(arguments[1]); + }, + update: function(position) { + this.effects.invoke('render', position); + }, + finish: function(position) { + this.effects.each( function(effect) { + effect.render(1.0); + effect.cancel(); + effect.event('beforeFinish'); + if(effect.finish) effect.finish(position); + effect.event('afterFinish'); + }); + } +}); + +Effect.Event = Class.create(); +Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), { + initialize: function() { + var options = Object.extend({ + duration: 0 + }, arguments[0] || {}); + this.start(options); + }, + update: Prototype.emptyFunction +}); + +Effect.Opacity = Class.create(); +Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + // make this work on IE on elements without 'layout' + if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + var options = Object.extend({ + from: this.element.getOpacity() || 0.0, + to: 1.0 + }, arguments[1] || {}); + this.start(options); + }, + update: function(position) { + this.element.setOpacity(position); + } +}); + +Effect.Move = Class.create(); +Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + x: 0, + y: 0, + mode: 'relative' + }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Bug in Opera: Opera returns the "real" position of a static element or + // relative element that does not have top/left explicitly set. + // ==> Always set top and left for position relative elements in your stylesheets + // (to 0 if you do not need them) + this.element.makePositioned(); + this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); + this.originalTop = parseFloat(this.element.getStyle('top') || '0'); + if(this.options.mode == 'absolute') { + // absolute movement, so we need to calc deltaX and deltaY + this.options.x = this.options.x - this.originalLeft; + this.options.y = this.options.y - this.originalTop; + } + }, + update: function(position) { + this.element.setStyle({ + left: Math.round(this.options.x * position + this.originalLeft) + 'px', + top: Math.round(this.options.y * position + this.originalTop) + 'px' + }); + } +}); + +// for backwards compatibility +Effect.MoveBy = function(element, toTop, toLeft) { + return new Effect.Move(element, + Object.extend({ x: toLeft, y: toTop }, arguments[3] || {})); +}; + +Effect.Scale = Class.create(); +Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), { + initialize: function(element, percent) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + scaleX: true, + scaleY: true, + scaleContent: true, + scaleFromCenter: false, + scaleMode: 'box', // 'box' or 'contents' or {} with provided values + scaleFrom: 100.0, + scaleTo: percent + }, arguments[2] || {}); + this.start(options); + }, + setup: function() { + this.restoreAfterFinish = this.options.restoreAfterFinish || false; + this.elementPositioning = this.element.getStyle('position'); + + this.originalStyle = {}; + ['top','left','width','height','fontSize'].each( function(k) { + this.originalStyle[k] = this.element.style[k]; + }.bind(this)); + + this.originalTop = this.element.offsetTop; + this.originalLeft = this.element.offsetLeft; + + var fontSize = this.element.getStyle('font-size') || '100%'; + ['em','px','%','pt'].each( function(fontSizeType) { + if(fontSize.indexOf(fontSizeType)>0) { + this.fontSize = parseFloat(fontSize); + this.fontSizeType = fontSizeType; + } + }.bind(this)); + + this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; + + this.dims = null; + if(this.options.scaleMode=='box') + this.dims = [this.element.offsetHeight, this.element.offsetWidth]; + if(/^content/.test(this.options.scaleMode)) + this.dims = [this.element.scrollHeight, this.element.scrollWidth]; + if(!this.dims) + this.dims = [this.options.scaleMode.originalHeight, + this.options.scaleMode.originalWidth]; + }, + update: function(position) { + var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); + if(this.options.scaleContent && this.fontSize) + this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); + this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); + }, + finish: function(position) { + if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle); + }, + setDimensions: function(height, width) { + var d = {}; + if(this.options.scaleX) d.width = Math.round(width) + 'px'; + if(this.options.scaleY) d.height = Math.round(height) + 'px'; + if(this.options.scaleFromCenter) { + var topd = (height - this.dims[0])/2; + var leftd = (width - this.dims[1])/2; + if(this.elementPositioning == 'absolute') { + if(this.options.scaleY) d.top = this.originalTop-topd + 'px'; + if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; + } else { + if(this.options.scaleY) d.top = -topd + 'px'; + if(this.options.scaleX) d.left = -leftd + 'px'; + } + } + this.element.setStyle(d); + } +}); + +Effect.Highlight = Class.create(); +Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {}); + this.start(options); + }, + setup: function() { + // Prevent executing on elements not in the layout flow + if(this.element.getStyle('display')=='none') { this.cancel(); return; } + // Disable background image during the effect + this.oldStyle = {}; + if (!this.options.keepBackgroundImage) { + this.oldStyle.backgroundImage = this.element.getStyle('background-image'); + this.element.setStyle({backgroundImage: 'none'}); + } + if(!this.options.endcolor) + this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); + if(!this.options.restorecolor) + this.options.restorecolor = this.element.getStyle('background-color'); + // init color calculations + this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); + this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); + }, + update: function(position) { + this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ + return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) }); + }, + finish: function() { + this.element.setStyle(Object.extend(this.oldStyle, { + backgroundColor: this.options.restorecolor + })); + } +}); + +Effect.ScrollTo = Class.create(); +Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + this.start(arguments[1] || {}); + }, + setup: function() { + Position.prepare(); + var offsets = Position.cumulativeOffset(this.element); + if(this.options.offset) offsets[1] += this.options.offset; + var max = window.innerHeight ? + window.height - window.innerHeight : + document.body.scrollHeight - + (document.documentElement.clientHeight ? + document.documentElement.clientHeight : document.body.clientHeight); + this.scrollStart = Position.deltaY; + this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart; + }, + update: function(position) { + Position.prepare(); + window.scrollTo(Position.deltaX, + this.scrollStart + (position*this.delta)); + } +}); + +/* ------------- combination effects ------------- */ + +Effect.Fade = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + var options = Object.extend({ + from: element.getOpacity() || 1.0, + to: 0.0, + afterFinishInternal: function(effect) { + if(effect.options.to!=0) return; + effect.element.hide().setStyle({opacity: oldOpacity}); + }}, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Appear = function(element) { + element = $(element); + var options = Object.extend({ + from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), + to: 1.0, + // force Safari to render floated elements properly + afterFinishInternal: function(effect) { + effect.element.forceRerendering(); + }, + beforeSetup: function(effect) { + effect.element.setOpacity(effect.options.from).show(); + }}, arguments[1] || {}); + return new Effect.Opacity(element,options); +} + +Effect.Puff = function(element) { + element = $(element); + var oldStyle = { + opacity: element.getInlineOpacity(), + position: element.getStyle('position'), + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height + }; + return new Effect.Parallel( + [ new Effect.Scale(element, 200, + { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], + Object.extend({ duration: 1.0, + beforeSetupInternal: function(effect) { + Position.absolutize(effect.effects[0].element) + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().setStyle(oldStyle); } + }, arguments[1] || {}) + ); +} + +Effect.BlindUp = function(element) { + element = $(element); + element.makeClipping(); + return new Effect.Scale(element, 0, + Object.extend({ scaleContent: false, + scaleX: false, + restoreAfterFinish: true, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }, arguments[1] || {}) + ); +} + +Effect.BlindDown = function(element) { + element = $(element); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: 0, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping(); + } + }, arguments[1] || {})); +} + +Effect.SwitchOff = function(element) { + element = $(element); + var oldOpacity = element.getInlineOpacity(); + return new Effect.Appear(element, Object.extend({ + duration: 0.4, + from: 0, + transition: Effect.Transitions.flicker, + afterFinishInternal: function(effect) { + new Effect.Scale(effect.element, 1, { + duration: 0.3, scaleFromCenter: true, + scaleX: false, scaleContent: false, restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); + } + }) + } + }, arguments[1] || {})); +} + +Effect.DropOut = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left'), + opacity: element.getInlineOpacity() }; + return new Effect.Parallel( + [ new Effect.Move(element, {x: 0, y: 100, sync: true }), + new Effect.Opacity(element, { sync: true, to: 0.0 }) ], + Object.extend( + { duration: 0.5, + beforeSetup: function(effect) { + effect.effects[0].element.makePositioned(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); + } + }, arguments[1] || {})); +} + +Effect.Shake = function(element) { + element = $(element); + var oldStyle = { + top: element.getStyle('top'), + left: element.getStyle('left') }; + return new Effect.Move(element, + { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) { + new Effect.Move(effect.element, + { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) { + effect.element.undoPositioned().setStyle(oldStyle); + }}) }}) }}) }}) }}) }}); +} + +Effect.SlideDown = function(element) { + element = $(element).cleanWhitespace(); + // SlideDown need to have the content of the element wrapped in a container element with fixed height! + var oldInnerBottom = element.down().getStyle('bottom'); + var elementDimensions = element.getDimensions(); + return new Effect.Scale(element, 100, Object.extend({ + scaleContent: false, + scaleX: false, + scaleFrom: window.opera ? 0 : 1, + scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, + restoreAfterFinish: true, + afterSetup: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if(window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().setStyle({height: '0px'}).show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.undoClipping().undoPositioned(); + effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } + }, arguments[1] || {}) + ); +} + +Effect.SlideUp = function(element) { + element = $(element).cleanWhitespace(); + var oldInnerBottom = element.down().getStyle('bottom'); + return new Effect.Scale(element, window.opera ? 0 : 1, + Object.extend({ scaleContent: false, + scaleX: false, + scaleMode: 'box', + scaleFrom: 100, + restoreAfterFinish: true, + beforeStartInternal: function(effect) { + effect.element.makePositioned(); + effect.element.down().makePositioned(); + if(window.opera) effect.element.setStyle({top: ''}); + effect.element.makeClipping().show(); + }, + afterUpdateInternal: function(effect) { + effect.element.down().setStyle({bottom: + (effect.dims[0] - effect.element.clientHeight) + 'px' }); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom}); + effect.element.down().undoPositioned(); + } + }, arguments[1] || {}) + ); +} + +// Bug in opera makes the TD containing this element expand for a instance after finish +Effect.Squish = function(element) { + return new Effect.Scale(element, window.opera ? 1 : 0, { + restoreAfterFinish: true, + beforeSetup: function(effect) { + effect.element.makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping(); + } + }); +} + +Effect.Grow = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.full + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var initialMoveX, initialMoveY; + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + initialMoveX = initialMoveY = moveX = moveY = 0; + break; + case 'top-right': + initialMoveX = dims.width; + initialMoveY = moveY = 0; + moveX = -dims.width; + break; + case 'bottom-left': + initialMoveX = moveX = 0; + initialMoveY = dims.height; + moveY = -dims.height; + break; + case 'bottom-right': + initialMoveX = dims.width; + initialMoveY = dims.height; + moveX = -dims.width; + moveY = -dims.height; + break; + case 'center': + initialMoveX = dims.width / 2; + initialMoveY = dims.height / 2; + moveX = -dims.width / 2; + moveY = -dims.height / 2; + break; + } + + return new Effect.Move(element, { + x: initialMoveX, + y: initialMoveY, + duration: 0.01, + beforeSetup: function(effect) { + effect.element.hide().makeClipping().makePositioned(); + }, + afterFinishInternal: function(effect) { + new Effect.Parallel( + [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), + new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), + new Effect.Scale(effect.element, 100, { + scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, + sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) + ], Object.extend({ + beforeSetup: function(effect) { + effect.effects[0].element.setStyle({height: '0px'}).show(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); + } + }, options) + ) + } + }); +} + +Effect.Shrink = function(element) { + element = $(element); + var options = Object.extend({ + direction: 'center', + moveTransition: Effect.Transitions.sinoidal, + scaleTransition: Effect.Transitions.sinoidal, + opacityTransition: Effect.Transitions.none + }, arguments[1] || {}); + var oldStyle = { + top: element.style.top, + left: element.style.left, + height: element.style.height, + width: element.style.width, + opacity: element.getInlineOpacity() }; + + var dims = element.getDimensions(); + var moveX, moveY; + + switch (options.direction) { + case 'top-left': + moveX = moveY = 0; + break; + case 'top-right': + moveX = dims.width; + moveY = 0; + break; + case 'bottom-left': + moveX = 0; + moveY = dims.height; + break; + case 'bottom-right': + moveX = dims.width; + moveY = dims.height; + break; + case 'center': + moveX = dims.width / 2; + moveY = dims.height / 2; + break; + } + + return new Effect.Parallel( + [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), + new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), + new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) + ], Object.extend({ + beforeStartInternal: function(effect) { + effect.effects[0].element.makePositioned().makeClipping(); + }, + afterFinishInternal: function(effect) { + effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } + }, options) + ); +} + +Effect.Pulsate = function(element) { + element = $(element); + var options = arguments[1] || {}; + var oldOpacity = element.getInlineOpacity(); + var transition = options.transition || Effect.Transitions.sinoidal; + var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) }; + reverser.bind(transition); + return new Effect.Opacity(element, + Object.extend(Object.extend({ duration: 2.0, from: 0, + afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } + }, options), {transition: reverser})); +} + +Effect.Fold = function(element) { + element = $(element); + var oldStyle = { + top: element.style.top, + left: element.style.left, + width: element.style.width, + height: element.style.height }; + element.makeClipping(); + return new Effect.Scale(element, 5, Object.extend({ + scaleContent: false, + scaleX: false, + afterFinishInternal: function(effect) { + new Effect.Scale(element, 1, { + scaleContent: false, + scaleY: false, + afterFinishInternal: function(effect) { + effect.element.hide().undoClipping().setStyle(oldStyle); + } }); + }}, arguments[1] || {})); +}; + +Effect.Morph = Class.create(); +Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), { + initialize: function(element) { + this.element = $(element); + if(!this.element) throw(Effect._elementDoesNotExistError); + var options = Object.extend({ + style: {} + }, arguments[1] || {}); + if (typeof options.style == 'string') { + if(options.style.indexOf(':') == -1) { + var cssText = '', selector = '.' + options.style; + $A(document.styleSheets).reverse().each(function(styleSheet) { + if (styleSheet.cssRules) cssRules = styleSheet.cssRules; + else if (styleSheet.rules) cssRules = styleSheet.rules; + $A(cssRules).reverse().each(function(rule) { + if (selector == rule.selectorText) { + cssText = rule.style.cssText; + throw $break; + } + }); + if (cssText) throw $break; + }); + this.style = cssText.parseStyle(); + options.afterFinishInternal = function(effect){ + effect.element.addClassName(effect.options.style); + effect.transforms.each(function(transform) { + if(transform.style != 'opacity') + effect.element.style[transform.style.camelize()] = ''; + }); + } + } else this.style = options.style.parseStyle(); + } else this.style = $H(options.style) + this.start(options); + }, + setup: function(){ + function parseColor(color){ + if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; + color = color.parseColor(); + return $R(0,2).map(function(i){ + return parseInt( color.slice(i*2+1,i*2+3), 16 ) + }); + } + this.transforms = this.style.map(function(pair){ + var property = pair[0].underscore().dasherize(), value = pair[1], unit = null; + + if(value.parseColor('#zzzzzz') != '#zzzzzz') { + value = value.parseColor(); + unit = 'color'; + } else if(property == 'opacity') { + value = parseFloat(value); + if(/MSIE/.test(navigator.userAgent) && !window.opera && (!this.element.currentStyle.hasLayout)) + this.element.setStyle({zoom: 1}); + } else if(Element.CSS_LENGTH.test(value)) + var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/), + value = parseFloat(components[1]), unit = (components.length == 3) ? components[2] : null; + + var originalValue = this.element.getStyle(property); + return $H({ + style: property, + originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), + targetValue: unit=='color' ? parseColor(value) : value, + unit: unit + }); + }.bind(this)).reject(function(transform){ + return ( + (transform.originalValue == transform.targetValue) || + ( + transform.unit != 'color' && + (isNaN(transform.originalValue) || isNaN(transform.targetValue)) + ) + ) + }); + }, + update: function(position) { + var style = $H(), value = null; + this.transforms.each(function(transform){ + value = transform.unit=='color' ? + $R(0,2).inject('#',function(m,v,i){ + return m+(Math.round(transform.originalValue[i]+ + (transform.targetValue[i] - transform.originalValue[i])*position)).toColorPart() }) : + transform.originalValue + Math.round( + ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit; + style[transform.style] = value; + }); + this.element.setStyle(style); + } +}); + +Effect.Transform = Class.create(); +Object.extend(Effect.Transform.prototype, { + initialize: function(tracks){ + this.tracks = []; + this.options = arguments[1] || {}; + this.addTracks(tracks); + }, + addTracks: function(tracks){ + tracks.each(function(track){ + var data = $H(track).values().first(); + this.tracks.push($H({ + ids: $H(track).keys().first(), + effect: Effect.Morph, + options: { style: data } + })); + }.bind(this)); + return this; + }, + play: function(){ + return new Effect.Parallel( + this.tracks.map(function(track){ + var elements = [$(track.ids) || $$(track.ids)].flatten(); + return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) }); + }).flatten(), + this.options + ); + } +}); + +Element.CSS_PROPERTIES = $w( + 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + + 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' + + 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' + + 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' + + 'fontSize fontWeight height left letterSpacing lineHeight ' + + 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+ + 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' + + 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' + + 'right textIndent top width wordSpacing zIndex'); + +Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; + +String.prototype.parseStyle = function(){ + var element = Element.extend(document.createElement('div')); + element.innerHTML = '
      '; + var style = element.down().style, styleRules = $H(); + + Element.CSS_PROPERTIES.each(function(property){ + if(style[property]) styleRules[property] = style[property]; + }); + if(/MSIE/.test(navigator.userAgent) && !window.opera && this.indexOf('opacity') > -1) { + styleRules.opacity = this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]; + } + return styleRules; +}; + +Element.morph = function(element, style) { + new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {})); + return element; +}; + +['setOpacity','getOpacity','getInlineOpacity','forceRerendering','setContentZoom', + 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each( + function(f) { Element.Methods[f] = Element[f]; } +); + +Element.Methods.visualEffect = function(element, effect, options) { + s = effect.gsub(/_/, '-').camelize(); + effect_class = s.charAt(0).toUpperCase() + s.substring(1); + new Effect[effect_class](element, options); + return $(element); +}; + +Element.addMethods(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/ext-prototype-adapter.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/ext-prototype-adapter.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/ext-prototype-adapter.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,10 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext={version:"2.0"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B){Ext.apply(C,B)}if(C&&D&&typeof D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i10000){clearInterval(G)}var J=document.getElementById(I);if(J){clearInterval(G);E.call(D||window,J)}};G=setInterval(F,50)}};Ext.lib.Ajax=function(){var E=function(F){return F.success?function(G){F.success.call(F.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:F.argument})}:Ext.emptyFn};var D=function(F){return F.failure?function(G){F.failure.call(F.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:F.argument})}:Ext.emptyFn};return{request:function(K,H,F,I,G){var J={method:K,parameters:I||"",timeout:F.timeout,onSuccess:E(F),onFailure:D(F)};if(G){if(G.headers){J.requestHeaders=G.headers}if(G.xmlData){K="POST";J.contentType="text/xml";J.postBody=G.xmlData;delete J.parameters}if(G.jsonData){K="POST";J.contentType="text/javascript";J.postBody=typeof G.jsonData=="object"?Ext.encode(G.jsonData):G.jsonData;delete J.parameters}}new Ajax.Request(H,J)},formRequest:function(J,I,G,K,F,H){new Ajax.Request(I,{method:Ext.getDom(J).method||"POST",parameters:Form.serialize(J)+(K?"&"+K:""),timeout:G.timeout,onSuccess:E(G),onFailure:D(G)})},isCallInProgress:function(F){return false},abort:function(F){return false},serializeForm:function(F){return Form.serialize(F.dom||F)}}}();Ext.lib.Anim=function(){var D={easeOut:function(F){return 1-Math.pow(1-F,2)},easeIn:function(F){return 1-Math.pow(1-F,2)}};var E=function(F,G){return{stop:function(H){this.effect.cancel()},isAnimated:function(){return this.effect.state=="running"},proxyCallback:function(){Ext.callback(F,G)}}};return{scroll:function(I,G,K,L,F,H){var J=E(F,H);I=Ext.getDom(I);if(typeof G.scroll.to[0]=="number"){I.scrollLeft=G.scroll.to[0]}if(typeof G.scroll.to[1]=="number"){I.scrollTop=G.scroll.to[1]}J.proxyCallback();return J},motion:function(I,G,J,K,F,H){return this.run(I,G,J,K,F,H)},color:function(I,G,J,K,F,H){return this.run(I,G,J,K,F,H)},run:function(G,O,K,N,H,Q,P){var F={};for(var J in O){switch(J){case"points":var M,S,L=Ext.fly(G,"_animrun");L.position();if(M=O.points.by){var R=L.getXY();S=L.translatePoints([R[0]+M[0],R[1]+M[1]])}else{S=L.translatePoints(O.points.to)}F.left=S.left+"px";F.top=S.top+"px";break;case"width":F.width=O.width.to+"px";break;case"height":F.height=O.height.to+"px";break;case"opacity":F.opacity=String(O.opacity.to);break;default:F[J]=String(O[J].to);break}}var I=E(H,Q);I.effect=new Effect.Morph(Ext.id(G),{duration:K,afterFinish:I.proxyCallback,transition:D[N]||Effect.Transitions.linear,style:F});return I}}}();function C(D){if(!B){B=new Ext.Element.Flyweight()}B.dom=D;return B}Ext.lib.Region=function(F,G,D,E){this.top=F;this[1]=F;this.right=G;this.bottom=D;this.left=E;this[0]=E};Ext.lib.Region.prototype={contains:function(D){return(D.left>=this.left&&D.right<=this.right&&D.top>=this.top&&D.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(H){var F=Math.max(this.top,H.top);var G=Math.min(this.right,H.right);var D=Math.min(this.bottom,H.bottom);var E=Math.max(this.left,H.left);if(D>=F&&G>=E){return new Ext.lib.Region(F,G,D,E)}else{return null}},union:function(H){var F=Math.min(this.top,H.top);var G=Math.max(this.right,H.right);var D=Math.max(this.bottom,H.bottom);var E=Math.min(this.left,H.left);return new Ext.lib.Region(F,G,D,E)},constrainTo:function(D){this.top=this.top.constrain(D.top,D.bottom);this.bottom=this.bottom.constrain(D.top,D.bottom);this.left=this.left.constrain(D.left,D.right);this.right=this.right.constrain(D.left,D.right);return this},adjust:function(F,E,D,G){this.top+=F;this.left+=E;this.right+=G;this.bottom+=D;return this}};Ext.lib.Region.getRegion=function(G){var I=Ext.lib.Dom.getXY(G);var F=I[1];var H=I[0]+G.offsetWidth;var D=I[1]+G.offsetHeight;var E=I[0];return new Ext.lib.Region(F,H,D,E)};Ext.lib.Point=function(D,E){if(D instanceof Array){E=D[1];D=D[0]}this.x=this.right=this.left=this[0]=D;this.y=this.top=this.bottom=this[1]=E};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function A(){var D=Function.prototype;delete D.createSequence;delete D.defer;delete D.createDelegate;delete D.createCallback;delete D.createInterceptor;window.detachEvent("onunload",A)}window.attachEvent("onunload",A)}})(); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/prototype.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/prototype.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/prototype.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,2523 @@ +/* + * Ext JS Library 1.0 Beta 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://www.extjs.com/license + */ + +/* Prototype JavaScript framework, version 1.5.0 + * (c) 2005-2007 Sam Stephenson + * + * Prototype is freely distributable under the terms of an MIT-style license. + * For details, see the Prototype web site: http://prototype.conio.net/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.5.0', + BrowserFeatures: { + XPath: !!document.evaluate + }, + + ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', + emptyFunction: function() {}, + K: function(x) { return x } +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (var property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.extend(Object, { + inspect: function(object) { + try { + if (object === undefined) return 'undefined'; + if (object === null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } + }, + + keys: function(object) { + var keys = []; + for (var property in object) + keys.push(property); + return keys; + }, + + values: function(object) { + var values = []; + for (var property in object) + values.push(object[property]); + return values; + }, + + clone: function(object) { + return Object.extend({}, object); + } +}); + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this, args = $A(arguments), object = args.shift(); + return function(event) { + return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments))); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + } +}); + +var Try = { + these: function() { + var returnValue; + + for (var i = 0, length = arguments.length; i < length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + stop: function() { + if (!this.timer) return; + clearInterval(this.timer); + this.timer = null; + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(this); + } finally { + this.currentlyExecuting = false; + } + } + } +} +String.interpret = function(value){ + return value == null ? '' : String(value); +} + +Object.extend(String.prototype, { + gsub: function(pattern, replacement) { + var result = '', source = this, match; + replacement = arguments.callee.prepareReplacement(replacement); + + while (source.length > 0) { + if (match = source.match(pattern)) { + result += source.slice(0, match.index); + result += String.interpret(replacement(match)); + source = source.slice(match.index + match[0].length); + } else { + result += source, source = ''; + } + } + return result; + }, + + sub: function(pattern, replacement, count) { + replacement = this.gsub.prepareReplacement(replacement); + count = count === undefined ? 1 : count; + + return this.gsub(pattern, function(match) { + if (--count < 0) return match[0]; + return replacement(match); + }); + }, + + scan: function(pattern, iterator) { + this.gsub(pattern, iterator); + return this; + }, + + truncate: function(length, truncation) { + length = length || 30; + truncation = truncation === undefined ? '...' : truncation; + return this.length > length ? + this.slice(0, length - truncation.length) + truncation : this; + }, + + strip: function() { + return this.replace(/^\s+/, '').replace(/\s+$/, ''); + }, + + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(function(script) { return eval(script) }); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? (div.childNodes.length > 1 ? + $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) : + div.childNodes[0].nodeValue) : ''; + }, + + toQueryParams: function(separator) { + var match = this.strip().match(/([^?#]*)(#.*)?$/); + if (!match) return {}; + + return match[1].split(separator || '&').inject({}, function(hash, pair) { + if ((pair = pair.split('='))[0]) { + var name = decodeURIComponent(pair[0]); + var value = pair[1] ? decodeURIComponent(pair[1]) : undefined; + + if (hash[name] !== undefined) { + if (hash[name].constructor != Array) + hash[name] = [hash[name]]; + if (value) hash[name].push(value); + } + else hash[name] = value; + } + return hash; + }); + }, + + toArray: function() { + return this.split(''); + }, + + succ: function() { + return this.slice(0, this.length - 1) + + String.fromCharCode(this.charCodeAt(this.length - 1) + 1); + }, + + camelize: function() { + var parts = this.split('-'), len = parts.length; + if (len == 1) return parts[0]; + + var camelized = this.charAt(0) == '-' + ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) + : parts[0]; + + for (var i = 1; i < len; i++) + camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); + + return camelized; + }, + + capitalize: function(){ + return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); + }, + + underscore: function() { + return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); + }, + + dasherize: function() { + return this.gsub(/_/,'-'); + }, + + inspect: function(useDoubleQuotes) { + var escapedString = this.replace(/\\/g, '\\\\'); + if (useDoubleQuotes) + return '"' + escapedString.replace(/"/g, '\\"') + '"'; + else + return "'" + escapedString.replace(/'/g, '\\\'') + "'"; + } +}); + +String.prototype.gsub.prepareReplacement = function(replacement) { + if (typeof replacement == 'function') return replacement; + var template = new Template(replacement); + return function(match) { return template.evaluate(match) }; +} + +String.prototype.parseQuery = String.prototype.toQueryParams; + +var Template = Class.create(); +Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; +Template.prototype = { + initialize: function(template, pattern) { + this.template = template.toString(); + this.pattern = pattern || Template.Pattern; + }, + + evaluate: function(object) { + return this.template.gsub(this.pattern, function(match) { + var before = match[1]; + if (before == '\\') return match[2]; + return before + String.interpret(object[match[3]]); + }); + } +} + +var $break = new Object(); +var $continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != $continue) throw e; + } + }); + } catch (e) { + if (e != $break) throw e; + } + return this; + }, + + eachSlice: function(number, iterator) { + var index = -number, slices = [], array = this.toArray(); + while ((index += number) < array.length) + slices.push(array.slice(index, index+number)); + return slices.map(iterator); + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = false; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push((iterator || Prototype.K)(value, index)); + }); + return results; + }, + + detect: function(iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inGroupsOf: function(number, fillWith) { + fillWith = fillWith === undefined ? null : fillWith; + return this.eachSlice(number, function(slice) { + while(slice.length < number) slice.push(fillWith); + return slice; + }); + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.map(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value >= result) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (result == undefined || value < result) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.map(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.map(); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + return iterator(collections.pluck(index)); + }); + }, + + size: function() { + return this.toArray().length; + }, + + inspect: function() { + return '#'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0, length = iterable.length; i < length; i++) + results.push(iterable[i]); + return results; + } +} + +Object.extend(Array.prototype, Enumerable); + +if (!Array.prototype._reverse) + Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0, length = this.length; i < length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value && value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0, length = this.length; i < length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + reduce: function() { + return this.length > 1 ? this : this[0]; + }, + + uniq: function() { + return this.inject([], function(array, value) { + return array.include(value) ? array : array.concat([value]); + }); + }, + + clone: function() { + return [].concat(this); + }, + + size: function() { + return this.length; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } +}); + +Array.prototype.toArray = Array.prototype.clone; + +function $w(string){ + string = string.strip(); + return string ? string.split(/\s+/) : []; +} + +if(window.opera){ + Array.prototype.concat = function(){ + var array = []; + for(var i = 0, length = this.length; i < length; i++) array.push(this[i]); + for(var i = 0, length = arguments.length; i < length; i++) { + if(arguments[i].constructor == Array) { + for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) + array.push(arguments[i][j]); + } else { + array.push(arguments[i]); + } + } + return array; + } +} +var Hash = function(obj) { + Object.extend(this, obj || {}); +}; + +Object.extend(Hash, { + toQueryString: function(obj) { + var parts = []; + + this.prototype._each.call(obj, function(pair) { + if (!pair.key) return; + + if (pair.value && pair.value.constructor == Array) { + var values = pair.value.compact(); + if (values.length < 2) pair.value = values.reduce(); + else { + key = encodeURIComponent(pair.key); + values.each(function(value) { + value = value != undefined ? encodeURIComponent(value) : ''; + parts.push(key + '=' + encodeURIComponent(value)); + }); + return; + } + } + if (pair.value == undefined) pair[1] = ''; + parts.push(pair.map(encodeURIComponent).join('=')); + }); + + return parts.join('&'); + } +}); + +Object.extend(Hash.prototype, Enumerable); +Object.extend(Hash.prototype, { + _each: function(iterator) { + for (var key in this) { + var value = this[key]; + if (value && value == Hash.prototype[key]) continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject(this, function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + remove: function() { + var result; + for(var i = 0, length = arguments.length; i < length; i++) { + var value = this[arguments[i]]; + if (value !== undefined){ + if (result === undefined) result = value; + else { + if (result.constructor != Array) result = [result]; + result.push(value) + } + } + delete this[arguments[i]]; + } + return result; + }, + + toQueryString: function() { + return Hash.toQueryString(this); + }, + + inspect: function() { + return '#'; + } +}); + +function $H(object) { + if (object && object.constructor == Hash) return object; + return new Hash(object); +}; +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + while (this.include(value)) { + iterator(value); + value = value.succ(); + } + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new XMLHttpRequest()}, + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')} + ) || false; + }, + + activeRequestCount: 0 +} + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responder) { + if (!this.include(responder)) + this.responders.push(responder); + }, + + unregister: function(responder) { + this.responders = this.responders.without(responder); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) {} + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { + Ajax.activeRequestCount++; + }, + onComplete: function() { + Ajax.activeRequestCount--; + } +}); + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + contentType: 'application/x-www-form-urlencoded', + encoding: 'UTF-8', + parameters: '' + } + Object.extend(this.options, options || {}); + + this.options.method = this.options.method.toLowerCase(); + if (typeof this.options.parameters == 'string') + this.options.parameters = this.options.parameters.toQueryParams(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + _complete: false, + + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + this.url = url; + this.method = this.options.method; + var params = this.options.parameters; + + if (!['get', 'post'].include(this.method)) { + // simulate other verbs over post + params['_method'] = this.method; + this.method = 'post'; + } + + params = Hash.toQueryString(params); + if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_=' + + // when GET, append parameters to URL + if (this.method == 'get' && params) + this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params; + + try { + Ajax.Responders.dispatch('onCreate', this, this.transport); + + this.transport.open(this.method.toUpperCase(), this.url, + this.options.asynchronous); + + if (this.options.asynchronous) + setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10); + + this.transport.onreadystatechange = this.onStateChange.bind(this); + this.setRequestHeaders(); + + var body = this.method == 'post' ? (this.options.postBody || params) : null; + + this.transport.send(body); + + /* Force Firefox to handle ready state 4 for synchronous requests */ + if (!this.options.asynchronous && this.transport.overrideMimeType) + this.onStateChange(); + + } + catch (e) { + this.dispatchException(e); + } + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState > 1 && !((readyState == 4) && this._complete)) + this.respondToReadyState(this.transport.readyState); + }, + + setRequestHeaders: function() { + var headers = { + 'X-Requested-With': 'XMLHttpRequest', + 'X-Prototype-Version': Prototype.Version, + 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' + }; + + if (this.method == 'post') { + headers['Content-type'] = this.options.contentType + + (this.options.encoding ? '; charset=' + this.options.encoding : ''); + + /* Force "Connection: close" for older Mozilla browsers to work + * around a bug where XMLHttpRequest sends an incorrect + * Content-length header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType && + (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) + headers['Connection'] = 'close'; + } + + // user-defined headers + if (typeof this.options.requestHeaders == 'object') { + var extras = this.options.requestHeaders; + + if (typeof extras.push == 'function') + for (var i = 0, length = extras.length; i < length; i += 2) + headers[extras[i]] = extras[i+1]; + else + $H(extras).each(function(pair) { headers[pair.key] = pair.value }); + } + + for (var name in headers) + this.transport.setRequestHeader(name, headers[name]); + }, + + success: function() { + return !this.transport.status + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + respondToReadyState: function(readyState) { + var state = Ajax.Request.Events[readyState]; + var transport = this.transport, json = this.evalJSON(); + + if (state == 'Complete') { + try { + this._complete = true; + (this.options['on' + this.transport.status] + || this.options['on' + (this.success() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(transport, json); + } catch (e) { + this.dispatchException(e); + } + + if ((this.getHeader('Content-type') || 'text/javascript').strip(). + match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)) + this.evalResponse(); + } + + try { + (this.options['on' + state] || Prototype.emptyFunction)(transport, json); + Ajax.Responders.dispatch('on' + state, this, transport, json); + } catch (e) { + this.dispatchException(e); + } + + if (state == 'Complete') { + // avoid memory leak in MSIE: clean up + this.transport.onreadystatechange = Prototype.emptyFunction; + } + }, + + getHeader: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) { return null } + }, + + evalJSON: function() { + try { + var json = this.getHeader('X-JSON'); + return json ? eval('(' + json + ')') : null; + } catch (e) { return null } + }, + + evalResponse: function() { + try { + return eval(this.transport.responseText); + } catch (e) { + this.dispatchException(e); + } + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Updater = Class.create(); + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.container = { + success: (container.success || container), + failure: (container.failure || (container.success ? null : container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function(transport, param) { + this.updateContent(); + onComplete(transport, param); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.container[this.success() ? 'success' : 'failure']; + var response = this.transport.responseText; + + if (!this.options.evalScripts) response = response.stripScripts(); + + if (receiver = $(receiver)) { + if (this.options.insertion) + new this.options.insertion(receiver, response); + else + receiver.update(response); + } + + if (this.success()) { + if (this.onComplete) + setTimeout(this.onComplete.bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.options.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +function $(element) { + if (arguments.length > 1) { + for (var i = 0, elements = [], length = arguments.length; i < length; i++) + elements.push($(arguments[i])); + return elements; + } + if (typeof element == 'string') + element = document.getElementById(element); + return Element.extend(element); +} + +if (Prototype.BrowserFeatures.XPath) { + document._getElementsByXPath = function(expression, parentElement) { + var results = []; + var query = document.evaluate(expression, $(parentElement) || document, + null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + for (var i = 0, length = query.snapshotLength; i < length; i++) + results.push(query.snapshotItem(i)); + return results; + }; +} + +document.getElementsByClassName = function(className, parentElement) { + if (Prototype.BrowserFeatures.XPath) { + var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]"; + return document._getElementsByXPath(q, parentElement); + } else { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + var elements = [], child; + for (var i = 0, length = children.length; i < length; i++) { + child = children[i]; + if (Element.hasClassName(child, className)) + elements.push(Element.extend(child)); + } + return elements; + } +}; + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) + var Element = new Object(); + +Element.extend = function(element) { + if (!element || _nativeExtensions || element.nodeType == 3) return element; + + if (!element._extended && element.tagName && element != window) { + var methods = Object.clone(Element.Methods), cache = Element.extend.cache; + + if (element.tagName == 'FORM') + Object.extend(methods, Form.Methods); + if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName)) + Object.extend(methods, Form.Element.Methods); + + Object.extend(methods, Element.Methods.Simulated); + + for (var property in methods) { + var value = methods[property]; + if (typeof value == 'function' && !(property in element)) + element[property] = cache.findOrStore(value); + } + } + + element._extended = true; + return element; +}; + +Element.extend.cache = { + findOrStore: function(value) { + return this[value] = this[value] || function() { + return value.apply(null, [this].concat($A(arguments))); + } + } +}; + +Element.Methods = { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function(element) { + element = $(element); + Element[Element.visible(element) ? 'hide' : 'show'](element); + return element; + }, + + hide: function(element) { + $(element).style.display = 'none'; + return element; + }, + + show: function(element) { + $(element).style.display = ''; + return element; + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + return element; + }, + + update: function(element, html) { + html = typeof html == 'undefined' ? '' : html.toString(); + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + replace: function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + if (element.outerHTML) { + element.outerHTML = html.stripScripts(); + } else { + var range = element.ownerDocument.createRange(); + range.selectNodeContents(element); + element.parentNode.replaceChild( + range.createContextualFragment(html.stripScripts()), element); + } + setTimeout(function() {html.evalScripts()}, 10); + return element; + }, + + inspect: function(element) { + element = $(element); + var result = '<' + element.tagName.toLowerCase(); + $H({'id': 'id', 'className': 'class'}).each(function(pair) { + var property = pair.first(), attribute = pair.last(); + var value = (element[property] || '').toString(); + if (value) result += ' ' + attribute + '=' + value.inspect(true); + }); + return result + '>'; + }, + + recursivelyCollect: function(element, property) { + element = $(element); + var elements = []; + while (element = element[property]) + if (element.nodeType == 1) + elements.push(Element.extend(element)); + return elements; + }, + + ancestors: function(element) { + return $(element).recursivelyCollect('parentNode'); + }, + + descendants: function(element) { + return $A($(element).getElementsByTagName('*')); + }, + + immediateDescendants: function(element) { + if (!(element = $(element).firstChild)) return []; + while (element && element.nodeType != 1) element = element.nextSibling; + if (element) return [element].concat($(element).nextSiblings()); + return []; + }, + + previousSiblings: function(element) { + return $(element).recursivelyCollect('previousSibling'); + }, + + nextSiblings: function(element) { + return $(element).recursivelyCollect('nextSibling'); + }, + + siblings: function(element) { + element = $(element); + return element.previousSiblings().reverse().concat(element.nextSiblings()); + }, + + match: function(element, selector) { + if (typeof selector == 'string') + selector = new Selector(selector); + return selector.match($(element)); + }, + + up: function(element, expression, index) { + return Selector.findElement($(element).ancestors(), expression, index); + }, + + down: function(element, expression, index) { + return Selector.findElement($(element).descendants(), expression, index); + }, + + previous: function(element, expression, index) { + return Selector.findElement($(element).previousSiblings(), expression, index); + }, + + next: function(element, expression, index) { + return Selector.findElement($(element).nextSiblings(), expression, index); + }, + + getElementsBySelector: function() { + var args = $A(arguments), element = $(args.shift()); + return Selector.findChildElements(element, args); + }, + + getElementsByClassName: function(element, className) { + return document.getElementsByClassName(className, element); + }, + + readAttribute: function(element, name) { + element = $(element); + if (document.all && !window.opera) { + var t = Element._attributeTranslations; + if (t.values[name]) return t.values[name](element, name); + if (t.names[name]) name = t.names[name]; + var attribute = element.attributes[name]; + if(attribute) return attribute.nodeValue; + } + return element.getAttribute(name); + }, + + getHeight: function(element) { + return $(element).getDimensions().height; + }, + + getWidth: function(element) { + return $(element).getDimensions().width; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + var elementClassName = element.className; + if (elementClassName.length == 0) return false; + if (elementClassName == className || + elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) + return true; + return false; + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).add(className); + return element; + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element).remove(className); + return element; + }, + + toggleClassName: function(element, className) { + if (!(element = $(element))) return; + Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className); + return element; + }, + + observe: function() { + Event.observe.apply(Event, arguments); + return $A(arguments).first(); + }, + + stopObserving: function() { + Event.stopObserving.apply(Event, arguments); + return $A(arguments).first(); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + var node = element.firstChild; + while (node) { + var nextNode = node.nextSibling; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + element.removeChild(node); + node = nextNode; + } + return element; + }, + + empty: function(element) { + return $(element).innerHTML.match(/^\s*$/); + }, + + descendantOf: function(element, ancestor) { + element = $(element), ancestor = $(ancestor); + while (element = element.parentNode) + if (element == ancestor) return true; + return false; + }, + + scrollTo: function(element) { + element = $(element); + var pos = Position.cumulativeOffset(element); + window.scrollTo(pos[0], pos[1]); + return element; + }, + + getStyle: function(element, style) { + element = $(element); + if (['float','cssFloat'].include(style)) + style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat'); + style = style.camelize(); + var value = element.style[style]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css[style] : null; + } else if (element.currentStyle) { + value = element.currentStyle[style]; + } + } + + if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none')) + value = element['offset'+style.capitalize()] + 'px'; + + if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) + if (Element.getStyle(element, 'position') == 'static') value = 'auto'; + if(style == 'opacity') { + if(value) return parseFloat(value); + if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) + if(value[1]) return parseFloat(value[1]) / 100; + return 1.0; + } + return value == 'auto' ? null : value; + }, + + setStyle: function(element, style) { + element = $(element); + for (var name in style) { + var value = style[name]; + if(name == 'opacity') { + if (value == 1) { + value = (/Gecko/.test(navigator.userAgent) && + !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0; + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); + } else if(value === '') { + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,''); + } else { + if(value < 0.00001) value = 0; + if(/MSIE/.test(navigator.userAgent) && !window.opera) + element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') + + 'alpha(opacity='+value*100+')'; + } + } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat'; + element.style[name.camelize()] = value; + } + return element; + }, + + getDimensions: function(element) { + element = $(element); + var display = $(element).getStyle('display'); + if (display != 'none' && display != null) // Safari bug + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + var originalDisplay = els.display; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = 'block'; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = originalDisplay; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + return element; + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + return element; + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return element; + element._overflow = element.style.overflow || 'auto'; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + return element; + }, + + undoClipping: function(element) { + element = $(element); + if (!element._overflow) return element; + element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; + element._overflow = null; + return element; + } +}; + +Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf}); + +Element._attributeTranslations = {}; + +Element._attributeTranslations.names = { + colspan: "colSpan", + rowspan: "rowSpan", + valign: "vAlign", + datetime: "dateTime", + accesskey: "accessKey", + tabindex: "tabIndex", + enctype: "encType", + maxlength: "maxLength", + readonly: "readOnly", + longdesc: "longDesc" +}; + +Element._attributeTranslations.values = { + _getAttr: function(element, attribute) { + return element.getAttribute(attribute, 2); + }, + + _flag: function(element, attribute) { + return $(element).hasAttribute(attribute) ? attribute : null; + }, + + style: function(element) { + return element.style.cssText.toLowerCase(); + }, + + title: function(element) { + var node = element.getAttributeNode('title'); + return node.specified ? node.nodeValue : null; + } +}; + +Object.extend(Element._attributeTranslations.values, { + href: Element._attributeTranslations.values._getAttr, + src: Element._attributeTranslations.values._getAttr, + disabled: Element._attributeTranslations.values._flag, + checked: Element._attributeTranslations.values._flag, + readonly: Element._attributeTranslations.values._flag, + multiple: Element._attributeTranslations.values._flag +}); + +Element.Methods.Simulated = { + hasAttribute: function(element, attribute) { + var t = Element._attributeTranslations; + attribute = t.names[attribute] || attribute; + return $(element).getAttributeNode(attribute).specified; + } +}; + +// IE is missing .innerHTML support for TABLE-related elements +if (document.all && !window.opera){ + Element.Methods.update = function(element, html) { + element = $(element); + html = typeof html == 'undefined' ? '' : html.toString(); + var tagName = element.tagName.toUpperCase(); + if (['THEAD','TBODY','TR','TD'].include(tagName)) { + var div = document.createElement('div'); + switch (tagName) { + case 'THEAD': + case 'TBODY': + div.innerHTML = '
      ' + html.stripScripts() + '
      '; + depth = 2; + break; + case 'TR': + div.innerHTML = '' + html.stripScripts() + '
      '; + depth = 3; + break; + case 'TD': + div.innerHTML = '
      ' + html.stripScripts() + '
      '; + depth = 4; + } + $A(element.childNodes).each(function(node){ + element.removeChild(node) + }); + depth.times(function(){ div = div.firstChild }); + + $A(div.childNodes).each( + function(node){ element.appendChild(node) }); + } else { + element.innerHTML = html.stripScripts(); + } + setTimeout(function() {html.evalScripts()}, 10); + return element; + } +}; + +Object.extend(Element, Element.Methods); + +var _nativeExtensions = false; + +if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)) + ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) { + var className = 'HTML' + tag + 'Element'; + if(window[className]) return; + var klass = window[className] = {}; + klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__; + }); + +Element.addMethods = function(methods) { + Object.extend(Element.Methods, methods || {}); + + function copy(methods, destination, onlyIfAbsent) { + onlyIfAbsent = onlyIfAbsent || false; + var cache = Element.extend.cache; + for (var property in methods) { + var value = methods[property]; + if (!onlyIfAbsent || !(property in destination)) + destination[property] = cache.findOrStore(value); + } + } + + if (typeof HTMLElement != 'undefined') { + copy(Element.Methods, HTMLElement.prototype); + copy(Element.Methods.Simulated, HTMLElement.prototype, true); + copy(Form.Methods, HTMLFormElement.prototype); + [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) { + copy(Form.Element.Methods, klass.prototype); + }); + _nativeExtensions = true; + } +} + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + var tagName = this.element.tagName.toUpperCase(); + if (['TBODY', 'TR'].include(tagName)) { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '' + this.content + '
      '; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set($A(this).concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set($A(this).without(classNameToRemove).join(' ')); + }, + + toString: function() { + return $A(this).join(' '); + } +}; + +Object.extend(Element.ClassNames.prototype, Enumerable); +var Selector = Class.create(); +Selector.prototype = { + initialize: function(expression) { + this.params = {classNames: []}; + this.expression = expression.toString().strip(); + this.parseExpression(); + this.compileMatcher(); + }, + + parseExpression: function() { + function abort(message) { throw 'Parse error in selector: ' + message; } + + if (this.expression == '') abort('empty expression'); + + var params = this.params, expr = this.expression, match, modifier, clause, rest; + while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) { + params.attributes = params.attributes || []; + params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''}); + expr = match[1]; + } + + if (expr == '*') return this.params.wildcard = true; + + while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) { + modifier = match[1], clause = match[2], rest = match[3]; + switch (modifier) { + case '#': params.id = clause; break; + case '.': params.classNames.push(clause); break; + case '': + case undefined: params.tagName = clause.toUpperCase(); break; + default: abort(expr.inspect()); + } + expr = rest; + } + + if (expr.length > 0) abort(expr.inspect()); + }, + + buildMatchExpression: function() { + var params = this.params, conditions = [], clause; + + if (params.wildcard) + conditions.push('true'); + if (clause = params.id) + conditions.push('element.readAttribute("id") == ' + clause.inspect()); + if (clause = params.tagName) + conditions.push('element.tagName.toUpperCase() == ' + clause.inspect()); + if ((clause = params.classNames).length > 0) + for (var i = 0, length = clause.length; i < length; i++) + conditions.push('element.hasClassName(' + clause[i].inspect() + ')'); + if (clause = params.attributes) { + clause.each(function(attribute) { + var value = 'element.readAttribute(' + attribute.name.inspect() + ')'; + var splitValueBy = function(delimiter) { + return value + ' && ' + value + '.split(' + delimiter.inspect() + ')'; + } + + switch (attribute.operator) { + case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break; + case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break; + case '|=': conditions.push( + splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect() + ); break; + case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break; + case '': + case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break; + default: throw 'Unknown operator ' + attribute.operator + ' in selector'; + } + }); + } + + return conditions.join(' && '); + }, + + compileMatcher: function() { + this.match = new Function('element', 'if (!element.tagName) return false; \ + element = $(element); \ + return ' + this.buildMatchExpression()); + }, + + findElements: function(scope) { + var element; + + if (element = $(this.params.id)) + if (this.match(element)) + if (!scope || Element.childOf(element, scope)) + return [element]; + + scope = (scope || document).getElementsByTagName(this.params.tagName || '*'); + + var results = []; + for (var i = 0, length = scope.length; i < length; i++) + if (this.match(element = scope[i])) + results.push(Element.extend(element)); + + return results; + }, + + toString: function() { + return this.expression; + } +} + +Object.extend(Selector, { + matchElements: function(elements, expression) { + var selector = new Selector(expression); + return elements.select(selector.match.bind(selector)).map(Element.extend); + }, + + findElement: function(elements, expression, index) { + if (typeof expression == 'number') index = expression, expression = false; + return Selector.matchElements(elements, expression || '*')[index || 0]; + }, + + findChildElements: function(element, expressions) { + return expressions.map(function(expression) { + return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) { + var selector = new Selector(expr); + return results.inject([], function(elements, result) { + return elements.concat(selector.findElements(result || element)); + }); + }); + }).flatten(); + } +}); + +function $$() { + return Selector.findChildElements(document, $A(arguments)); +} +var Form = { + reset: function(form) { + $(form).reset(); + return form; + }, + + serializeElements: function(elements, getHash) { + var data = elements.inject({}, function(result, element) { + if (!element.disabled && element.name) { + var key = element.name, value = $(element).getValue(); + if (value != undefined) { + if (result[key]) { + if (result[key].constructor != Array) result[key] = [result[key]]; + result[key].push(value); + } + else result[key] = value; + } + } + return result; + }); + + return getHash ? data : Hash.toQueryString(data); + } +}; + +Form.Methods = { + serialize: function(form, getHash) { + return Form.serializeElements(Form.getElements(form), getHash); + }, + + getElements: function(form) { + return $A($(form).getElementsByTagName('*')).inject([], + function(elements, child) { + if (Form.Element.Serializers[child.tagName.toLowerCase()]) + elements.push(Element.extend(child)); + return elements; + } + ); + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) return $A(inputs).map(Element.extend); + + for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || (name && input.name != name)) + continue; + matchingInputs.push(Element.extend(input)); + } + + return matchingInputs; + }, + + disable: function(form) { + form = $(form); + form.getElements().each(function(element) { + element.blur(); + element.disabled = 'true'; + }); + return form; + }, + + enable: function(form) { + form = $(form); + form.getElements().each(function(element) { + element.disabled = ''; + }); + return form; + }, + + findFirstElement: function(form) { + return $(form).getElements().find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + form = $(form); + form.findFirstElement().activate(); + return form; + } +} + +Object.extend(Form, Form.Methods); + +/*--------------------------------------------------------------------------*/ + +Form.Element = { + focus: function(element) { + $(element).focus(); + return element; + }, + + select: function(element) { + $(element).select(); + return element; + } +} + +Form.Element.Methods = { + serialize: function(element) { + element = $(element); + if (!element.disabled && element.name) { + var value = element.getValue(); + if (value != undefined) { + var pair = {}; + pair[element.name] = value; + return Hash.toQueryString(pair); + } + } + return ''; + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + return Form.Element.Serializers[method](element); + }, + + clear: function(element) { + $(element).value = ''; + return element; + }, + + present: function(element) { + return $(element).value != ''; + }, + + activate: function(element) { + element = $(element); + element.focus(); + if (element.select && ( element.tagName.toLowerCase() != 'input' || + !['button', 'reset', 'submit'].include(element.type) ) ) + element.select(); + return element; + }, + + disable: function(element) { + element = $(element); + element.disabled = true; + return element; + }, + + enable: function(element) { + element = $(element); + element.blur(); + element.disabled = false; + return element; + } +} + +Object.extend(Form.Element, Form.Element.Methods); +var Field = Form.Element; +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + default: + return Form.Element.Serializers.textarea(element); + } + }, + + inputSelector: function(element) { + return element.checked ? element.value : null; + }, + + textarea: function(element) { + return element.value; + }, + + select: function(element) { + return this[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var index = element.selectedIndex; + return index >= 0 ? this.optionValue(element.options[index]) : null; + }, + + selectMany: function(element) { + var values, length = element.length; + if (!length) return null; + + for (var i = 0, values = []; i < length; i++) { + var opt = element.options[i]; + if (opt.selected) values.push(this.optionValue(opt)); + } + return values; + }, + + optionValue: function(opt) { + // extend element because hasAttribute may not be native + return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; + } +} + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + var changed = ('string' == typeof this.lastValue && 'string' == typeof value + ? this.lastValue != value : String(this.lastValue) != String(value)); + if (changed) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + Form.getElements(this.element).each(this.registerCallback.bind(this)); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + default: + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + KEY_HOME: 36, + KEY_END: 35, + KEY_PAGEUP: 33, + KEY_PAGEDOWN: 34, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0, length = Event.observers.length; i < length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) + name = 'keydown'; + + Event._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + try { + element.detachEvent('on' + name, observer); + } catch (e) {} + } + } +}); + +/* prevent memory leaks in IE */ +if (navigator.appVersion.match(/\bMSIE\b/)) + Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + if(element.tagName=='BODY') break; + var p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent==document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + if (!window.opera || element.tagName=='BODY') { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.width = width + 'px'; + element.style.height = height + 'px'; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } +} + +Element.addMethods(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/scriptaculous.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/scriptaculous.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/prototype/scriptaculous.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,59 @@ +/* + * Ext JS Library 1.0 Beta 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://www.extjs.com/license + */ + +// script.aculo.us scriptaculous.js v1.7.0, Fri Jan 19 19:16:36 CET 2007 + +// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// For details, see the script.aculo.us web site: http://script.aculo.us/ + +var Scriptaculous = { + Version: '1.7.0', + require: function(libraryName) { + // inserting via DOM fails in Safari 2.0, so brute force approach + document.write(''); + }, + load: function() { + if((typeof Prototype=='undefined') || + (typeof Element == 'undefined') || + (typeof Element.Methods=='undefined') || + parseFloat(Prototype.Version.split(".")[0] + "." + + Prototype.Version.split(".")[1]) < 1.5) + throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0"); + + $A(document.getElementsByTagName("script")).findAll( function(s) { + return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) + }).each( function(s) { + var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); + var includes = s.src.match(/\?.*load=([a-z,]*)/); + (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each( + function(include) { Scriptaculous.require(path+include+'.js') }); + }); + } +} + +Scriptaculous.load(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/yui/ext-yui-adapter.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/yui/ext-yui-adapter.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/adapter/yui/ext-yui-adapter.js 4 Dec 2007 02:48:30 -0000 1.1 @@ -0,0 +1,10 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext={version:"2.0"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B){Ext.apply(C,B)}if(C&&D&&typeof D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i-1){return true}else{return YAHOO.lang.isObject(A)&&A.constructor==Array}},isBoolean:function(A){return typeof A=="boolean"},isFunction:function(A){return typeof A=="function"},isNull:function(A){return A===null},isNumber:function(A){return typeof A=="number"&&isFinite(A)},isObject:function(A){return typeof A=="object"||YAHOO.lang.isFunction(A)},isString:function(A){return typeof A=="string"},isUndefined:function(A){return typeof A=="undefined"},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B)}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B]},extend:function(D,E,C){var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E}if(C){for(var A in C){D.prototype[A]=C[A]}}},augment:function(E,D){var C=E.prototype,F=D.prototype,A=arguments,B,G;if(A[2]){for(B=2;B-1),K=(B.indexOf("safari")>-1),A=(!D&&!K&&B.indexOf("gecko")>-1),F=(!D&&B.indexOf("msie")>-1);var E={HYPHEN:/(-[a-z])/i};var L=function(M){if(!E.HYPHEN.test(M)){return M}if(I[M]){return I[M]}while(E.HYPHEN.exec(M)){M=M.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}I[M]=M;return M};if(document.defaultView&&document.defaultView.getComputedStyle){J=function(M,P){var O=null;var N=document.defaultView.getComputedStyle(M,"");if(N){O=N[L(P)]}return M.style[P]||O}}else{if(document.documentElement.currentStyle&&F){J=function(M,O){switch(L(O)){case"opacity":var Q=100;try{Q=M.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(P){try{Q=M.filters("alpha").opacity}catch(P){}}return Q/100;break;default:var N=M.currentStyle?M.currentStyle[O]:null;return(M.style[O]||N)}}}else{J=function(M,N){return M.style[N]}}}if(F){H=function(M,N,O){switch(N){case"opacity":if(typeof M.style.filter=="string"){M.style.filter="alpha(opacity="+O*100+")";if(!M.currentStyle||!M.currentStyle.hasLayout){M.style.zoom=1}}break;default:M.style[N]=O}}}else{H=function(M,N,O){M.style[N]=O}}YAHOO.util.Dom={get:function(O){if(!O){return null}if(typeof O!="string"&&!(O instanceof Array)){return O}if(typeof O=="string"){return document.getElementById(O)}else{var P=[];for(var N=0,M=O.length;N=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(A instanceof Array){B=A[1];A=A[0]}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.0",build:"127"}); +if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var F=[];var D=[];var C=0;var E=[];var B=[];var A=0;var G=null;return{POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var K=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(K&&K[1]){return K[1]}return null}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach()};this._interval=setInterval(L,this.POLL_INTERVAL)}},onAvailable:function(M,K,N,L){E.push({id:M,fn:K,obj:N,override:L,checkReady:false});C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(M,K,N,L){E.push({id:M,fn:K,obj:N,override:L,checkReady:true});C=this.POLL_RETRYS;this.startInterval()},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R=0){P=I[Q]}if(!L||!P){return false}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=D[N];if(M){for(O=0,R=M.length;O0)}var P=[];for(var L=0,K=E.length;L0){for(var Q=0,R=S.length;Q0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M)}N=N-1}L=null;Q.clearCache()}for(O=0,K=F.length;O0){H=C[0]}B=F.fn.call(E,H,F.obj)}else{B=F.fn.call(E,this.type,C,F.obj)}if(false===B){if(!this.silent){}return false}}}return true},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B=200&&C<300){B=this.createResponseObject(E,F.argument);if(F.success){if(!F.scope){F.success(B)}else{F.success.apply(F.scope,[B])}}}else{switch(C){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:B=this.createExceptionObject(E.tId,F.argument,(A?A:false));if(F.failure){if(!F.scope){F.failure(B)}else{F.failure.apply(F.scope,[B])}}break;default:B=this.createResponseObject(E,F.argument);if(F.failure){if(!F.scope){F.failure(B)}else{F.failure.apply(F.scope,[B])}}}}this.releaseObject(E);B=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E");if(typeof A=="boolean"){C.src="javascript:false"}else{if(typeof secureURI=="string"){C.src=A}}}else{var C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C0){for(var E=0;E0)?C:0}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B)},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E)}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)]}else{E=0}return E},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px"}return""},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined")};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"]}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0&&!(K[0] instanceof Array)){K=[K]}else{var J=[];for(L=0,N=K.length;L0){this.runtimeAttributes[O]=this.runtimeAttributes[O].concat(K)}this.runtimeAttributes[O][this.runtimeAttributes[O].length]=H}else{E.setRuntimeAttribute.call(this,O)}};var A=function(F,H){var G=D.Dom.getXY(this.getEl());F=[F[0]-G[0]+H[0],F[1]-G[1]+H[1]];return F};var C=function(F){return(typeof F!=="undefined")}})();(function(){YAHOO.util.Scroll=function(E,D,F,G){if(E){YAHOO.util.Scroll.superclass.constructor.call(this,E,D,F,G)}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var B=YAHOO.util;var C=B.Scroll.superclass;var A=B.Scroll.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("Scroll "+E)};A.doMethod=function(D,G,E){var F=null;if(D=="scroll"){F=[this.method(this.currentFrame,G[0],E[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],E[1]-G[1],this.totalFrames)]}else{F=C.doMethod.call(this,D,G,E)}return F};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop]}else{F=C.getAttribute.call(this,D)}return F};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1]}else{C.setAttribute.call(this,D,G,F)}}})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.2.0",build:"127"}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/debug-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/debug-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/debug-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.debug={};(function(){var B;function A(){var E=new Ext.debug.ScriptsPanel();var G=new Ext.debug.LogPanel();var C=new Ext.debug.DomTree();var D=new Ext.TabPanel({activeTab:0,border:false,tabPosition:"bottom",items:[{title:"Debug Console",layout:"border",items:[G,E]},{title:"DOM Inspector",layout:"border",items:[C]}]});B=new Ext.Panel({id:"x-debug-browser",title:"Console",collapsible:true,animCollapse:false,style:"position:absolute;left:0;bottom:0;",height:200,logView:G,layout:"fit",tools:[{id:"close",handler:function(){B.destroy();B=null;Ext.EventManager.removeResizeListener(F)}}],items:D});B.render(document.body);B.resizer=new Ext.Resizable(B.el,{minHeight:50,handles:"n",pinned:true,transparent:true,resizeElement:function(){var H=this.proxy.getBox();this.proxy.hide();B.setHeight(H.height);return H}});function F(){B.setWidth(Ext.getBody().getViewSize().width)}Ext.EventManager.onWindowResize(F);F()}Ext.apply(Ext,{log:function(){if(!B){A()}B.logView.log.apply(B.logView,arguments)},logf:function(F,E,C,D){Ext.log(String.format.apply(String,arguments))},dump:function(F){if(typeof F=="string"||typeof F=="number"||typeof F=="undefined"||F instanceof Date){Ext.log(F)}else{if(!F){Ext.log("null")}else{if(typeof F!="object"){Ext.log("Unknown return type")}else{if(F instanceof Array){Ext.log("["+F.join(",")+"]")}else{var C=["{\n"];for(var D in F){var G=typeof F[D];if(G!="function"&&G!="object"){C.push(String.format(" {0}: {1},\n",D,F[D]))}}var E=C.join("");if(E.length>3){E=E.substr(0,E.length-2)}Ext.log(E+"\n}")}}}}},_timers:{},time:function(C){C=C||"def";Ext._timers[C]=new Date().getTime()},timeEnd:function(D,F){var E=new Date().getTime();D=D||"def";var C=String.format("{0} ms",E-Ext._timers[D]);Ext._timers[D]=new Date().getTime();if(F!==false){Ext.log("Timer "+(D=="def"?C:D+": "+C))}return C}})})();Ext.debug.ScriptsPanel=Ext.extend(Ext.Panel,{id:"x-debug-scripts",region:"east",minWidth:200,split:true,width:350,border:false,layout:"anchor",style:"border-width:0 0 0 1px;",initComponent:function(){this.scriptField=new Ext.form.TextArea({anchor:"100% -26",style:"border-width:0;"});this.trapBox=new Ext.form.Checkbox({id:"console-trap",boxLabel:"Trap Errors",checked:true});this.toolbar=new Ext.Toolbar([{text:"Run",scope:this,handler:this.evalScript},{text:"Clear",scope:this,handler:this.clear},"->",this.trapBox," "," "]);this.items=[this.toolbar,this.scriptField];Ext.debug.ScriptsPanel.superclass.initComponent.call(this)},evalScript:function(){var s=this.scriptField.getValue();if(this.trapBox.getValue()){try{var rt=eval(s);Ext.dump(rt===undefined?"(no return)":rt)}catch(e){Ext.log(e.message||e.descript)}}else{var rt=eval(s);Ext.dump(rt===undefined?"(no return)":rt)}},clear:function(){this.scriptField.setValue("");this.scriptField.focus()}});Ext.debug.LogPanel=Ext.extend(Ext.Panel,{autoScroll:true,region:"center",border:false,style:"border-width:0 1px 0 0",log:function(){var A=["
      ",Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments,", ")).replace(/\n/g,"
      ").replace(/\s/g," "),"
      "].join("");this.body.insertHtml("beforeend",A);this.body.scrollTo("top",100000)},clear:function(){this.body.update("");this.body.dom.scrollTop=0}});Ext.debug.DomTree=Ext.extend(Ext.tree.TreePanel,{enableDD:false,lines:false,rootVisible:false,animate:false,hlColor:"ffff9c",autoScroll:true,region:"center",border:false,initComponent:function(){Ext.debug.DomTree.superclass.initComponent.call(this);var H=false,A;var I=/^\s*$/;var E=Ext.util.Format.htmlEncode;var G=Ext.util.Format.ellipsis;var D=/\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi;function B(P){if(!P||P.nodeType!=1||P==document.body||P==document){return false}var L=[P],N=P;while((N=N.parentNode)&&N.nodeType==1&&N.tagName.toUpperCase()!="HTML"){L.unshift(N)}var O=A;for(var M=0,J=L.length;M"+G(E(String(M.nodeValue)),35)+"",cls:"x-tree-noicon"}))}}}J()};this.root=this.setRootNode(new Ext.tree.TreeNode("Ext"));A=this.root.appendChild(new Ext.debug.HtmlNode(document.getElementsByTagName("html")[0]))}});Ext.debug.HtmlNode=function(){var D=Ext.util.Format.htmlEncode;var B=Ext.util.Format.ellipsis;var A=/^\s*$/;var C=[{n:"id",v:"id"},{n:"className",v:"class"},{n:"name",v:"name"},{n:"type",v:"type"},{n:"src",v:"src"},{n:"href",v:"href"}];function F(J){for(var H=0,I;I=J.childNodes[H];H++){if(I.nodeType==1){return true}}return false}function E(I,L){var P=I.tagName.toLowerCase();var O="<"+P;for(var J=0,K=C.length;J"+D(N)+"""}}var H=I.style?I.style.cssText:"";if(H){O+=" style=""+D(H.toLowerCase())+"""}if(L&&I.childNodes.length>0){O+=">"+B(D(String(I.innerHTML)),35)+"</"+P+">"}else{if(L){O+=" />"}else{O+=">"}}return O}var G=function(J){var I=!F(J);this.htmlNode=J;this.tagName=J.tagName.toLowerCase();var H={text:E(J,I),leaf:I,cls:"x-tree-noicon"};G.superclass.constructor.call(this,H);this.attributes.htmlNode=J;if(!I){this.on("expand",this.onExpand,this);this.on("collapse",this.onCollapse,this)}};Ext.extend(G,Ext.tree.AsyncTreeNode,{cls:"x-tree-noicon",preventHScroll:true,refresh:function(I){var H=!F(this.htmlNode);this.setText(E(this.htmlNode,H));if(I){Ext.fly(this.ui.textNode).highlight()}},onExpand:function(){if(!this.closeNode&&this.parentNode){this.closeNode=this.parentNode.insertBefore(new Ext.tree.TreeNode({text:"</"+this.tagName+">",cls:"x-tree-noicon"}),this.nextSibling)}else{if(this.closeNode){this.closeNode.ui.show()}}},onCollapse:function(){if(this.closeNode){this.closeNode.ui.hide()}},render:function(H){G.superclass.render.call(this,H)},highlightNode:function(){},highlight:function(){},frame:function(){this.htmlNode.style.border="1px solid #0000ff"},unframe:function(){this.htmlNode.style.border=""}});return G}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/ext-base-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/ext-base-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/ext-base-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +(function(){var B;Ext.lib.Dom={getViewWidth:function(E){return E?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(E){return E?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){var E=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;return Math.max(E,this.getViewportHeight())},getDocumentWidth:function(){var E=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;return Math.max(E,this.getViewportWidth())},getViewportHeight:function(){if(Ext.isIE){return Ext.isStrict?document.documentElement.clientHeight:document.body.clientHeight}else{return self.innerHeight}},getViewportWidth:function(){if(Ext.isIE){return Ext.isStrict?document.documentElement.clientWidth:document.body.clientWidth}else{return self.innerWidth}},isAncestor:function(F,G){F=Ext.getDom(F);G=Ext.getDom(G);if(!F||!G){return false}if(F.contains&&!Ext.isSafari){return F.contains(G)}else{if(F.compareDocumentPosition){return !!(F.compareDocumentPosition(G)&16)}else{var E=G.parentNode;while(E){if(E==F){return true}else{if(!E.tagName||E.tagName.toUpperCase()=="HTML"){return false}}E=E.parentNode}return false}}},getRegion:function(E){return Ext.lib.Region.getRegion(E)},getY:function(E){return this.getXY(E)[1]},getX:function(E){return this.getXY(E)[0]},getXY:function(G){var F,K,M,N,J=(document.body||document.documentElement);G=Ext.getDom(G);if(G==J){return[0,0]}if(G.getBoundingClientRect){M=G.getBoundingClientRect();N=C(document).getScroll();return[M.left+N.left,M.top+N.top]}var O=0,L=0;F=G;var E=C(G).getStyle("position")=="absolute";while(F){O+=F.offsetLeft;L+=F.offsetTop;if(!E&&C(F).getStyle("position")=="absolute"){E=true}if(Ext.isGecko){K=C(F);var P=parseInt(K.getStyle("borderTopWidth"),10)||0;var H=parseInt(K.getStyle("borderLeftWidth"),10)||0;O+=H;L+=P;if(F!=G&&K.getStyle("overflow")!="visible"){O+=H;L+=P}}F=F.offsetParent}if(Ext.isSafari&&E){O-=J.offsetLeft;L-=J.offsetTop}if(Ext.isGecko&&!E){var I=C(J);O+=parseInt(I.getStyle("borderLeftWidth"),10)||0;L+=parseInt(I.getStyle("borderTopWidth"),10)||0}F=G.parentNode;while(F&&F!=J){if(!Ext.isOpera||(F.tagName!="TR"&&C(F).getStyle("display")!="inline")){O-=F.scrollLeft;L-=F.scrollTop}F=F.parentNode}return[O,L]},setXY:function(E,F){E=Ext.fly(E,"_setXY");E.position();var G=E.translatePoints(F);if(F[0]!==false){E.dom.style.left=G.left+"px"}if(F[1]!==false){E.dom.style.top=G.top+"px"}},setX:function(F,E){this.setXY(F,[E,false])},setY:function(E,F){this.setXY(E,[false,F])}};Ext.lib.Event=function(){var F=false;var G=[];var K=[];var I=0;var H=[];var E=0;var J=null;return{POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,_interval:null,startInterval:function(){if(!this._interval){var L=this;var M=function(){L._tryPreloadAttach()};this._interval=setInterval(M,this.POLL_INTERVAL)}},onAvailable:function(N,L,O,M){H.push({id:N,fn:L,obj:O,override:M,checkReady:false});I=this.POLL_RETRYS;this.startInterval()},addListener:function(Q,M,P){Q=Ext.getDom(Q);if(!Q||!P){return false}if("unload"==M){K[K.length]=[Q,M,P];return true}var O=function(R){return typeof Ext!="undefined"?P(Ext.lib.Event.getEvent(R)):false};var L=[Q,M,P,O];var N=G.length;G[N]=L;this.doAdd(Q,M,O,false);return true},removeListener:function(S,O,R){var Q,N;S=Ext.getDom(S);if(!R){return this.purgeElement(S,false,O)}if("unload"==O){for(Q=0,N=K.length;Q=0){L=G[P]}if(!S||!L){return false}this.doRemove(S,O,L[this.WFN],false);delete G[P][this.WFN];delete G[P][this.FN];G.splice(P,1);return true},getTarget:function(N,M){N=N.browserEvent||N;var L=N.target||N.srcElement;return this.resolveTextNode(L)},resolveTextNode:function(L){if(Ext.isSafari&&L&&3==L.nodeType){return L.parentNode}else{return L}},getPageX:function(M){M=M.browserEvent||M;var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(Ext.isIE){L+=this.getScroll()[1]}}return L},getPageY:function(L){L=L.browserEvent||L;var M=L.pageY;if(!M&&0!==M){M=L.clientY||0;if(Ext.isIE){M+=this.getScroll()[0]}}return M},getXY:function(L){L=L.browserEvent||L;return[this.getPageX(L),this.getPageY(L)]},getRelatedTarget:function(M){M=M.browserEvent||M;var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement}else{if(M.type=="mouseover"){L=M.fromElement}}}return this.resolveTextNode(L)},getTime:function(N){N=N.browserEvent||N;if(!N.time){var M=new Date().getTime();try{N.time=M}catch(L){this.lastError=L;return M}}return N.time},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L)},stopPropagation:function(L){L=L.browserEvent||L;if(L.stopPropagation){L.stopPropagation()}else{L.cancelBubble=true}},preventDefault:function(L){L=L.browserEvent||L;if(L.preventDefault){L.preventDefault()}else{L.returnValue=false}},getEvent:function(M){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break}N=N.caller}}return L},getCharCode:function(L){L=L.browserEvent||L;return L.charCode||L.keyCode||0},_getCacheIndex:function(Q,N,P){for(var O=0,M=G.length;O0)}var Q=[];for(var M=0,L=H.length;M0){for(var Q=0,S=T.length;Q0){O=G.length;while(O){N=O-1;M=G[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N)}O=O-1}M=null;R.clearCache()}R.doRemove(window,"unload",R._unload)},getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft]}else{if(M){return[M.scrollTop,M.scrollLeft]}else{return[0,0]}}},doAdd:function(){if(window.addEventListener){return function(O,M,N,L){O.addEventListener(M,N,(L))}}else{if(window.attachEvent){return function(O,M,N,L){O.attachEvent("on"+M,N)}}else{return function(){}}}}(),doRemove:function(){if(window.removeEventListener){return function(O,M,N,L){O.removeEventListener(M,N,(L))}}else{if(window.detachEvent){return function(N,L,M){N.detachEvent("on"+L,M)}}else{return function(){}}}}()}}();var D=Ext.lib.Event;D.on=D.addListener;D.un=D.removeListener;if(document&&document.body){D._load()}else{D.doAdd(window,"load",D._load)}D.doAdd(window,"unload",D._unload);D._tryPreloadAttach();Ext.lib.Ajax={request:function(K,I,E,J,F){if(F){var G=F.headers;if(G){for(var H in G){if(G.hasOwnProperty(H)){this.initHeader(H,G[H],false)}}}if(F.xmlData){this.initHeader("Content-Type","text/xml",false);K="POST";J=F.xmlData}else{if(F.jsonData){this.initHeader("Content-Type","text/javascript",false);K="POST";J=typeof F.jsonData=="object"?Ext.encode(F.jsonData):F.jsonData}}}return this.asyncRequest(K,I,E,J)},serializeForm:function(F){if(typeof F=="string"){F=(document.getElementById(F)||document.forms[F])}var G,E,H,J,K="",M=false;for(var L=0;L=200&&G<300){F=this.createResponseObject(I,J.argument);if(J.success){if(!J.scope){J.success(F)}else{J.success.apply(J.scope,[F])}}}else{switch(G){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:F=this.createExceptionObject(I.tId,J.argument,(E?E:false));if(J.failure){if(!J.scope){J.failure(F)}else{J.failure.apply(J.scope,[F])}}break;default:F=this.createResponseObject(I,J.argument);if(J.failure){if(!J.scope){J.failure(F)}else{J.failure.apply(J.scope,[F])}}}}this.releaseObject(I);F=null},createResponseObject:function(E,K){var H={};var M={};try{var G=E.conn.getAllResponseHeaders();var J=G.split("\n");for(var I=0;I=this.left&&E.right<=this.right&&E.top>=this.top&&E.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(I){var G=Math.max(this.top,I.top);var H=Math.min(this.right,I.right);var E=Math.min(this.bottom,I.bottom);var F=Math.max(this.left,I.left);if(E>=G&&H>=F){return new Ext.lib.Region(G,H,E,F)}else{return null}},union:function(I){var G=Math.min(this.top,I.top);var H=Math.max(this.right,I.right);var E=Math.max(this.bottom,I.bottom);var F=Math.min(this.left,I.left);return new Ext.lib.Region(G,H,E,F)},constrainTo:function(E){this.top=this.top.constrain(E.top,E.bottom);this.bottom=this.bottom.constrain(E.top,E.bottom);this.left=this.left.constrain(E.left,E.right);this.right=this.right.constrain(E.left,E.right);return this},adjust:function(G,F,E,H){this.top+=G;this.left+=F;this.right+=H;this.bottom+=E;return this}};Ext.lib.Region.getRegion=function(H){var J=Ext.lib.Dom.getXY(H);var G=J[1];var I=J[0]+H.offsetWidth;var E=J[1]+H.offsetHeight;var F=J[0];return new Ext.lib.Region(G,I,E,F)};Ext.lib.Point=function(E,F){if(E instanceof Array){F=E[1];E=E[0]}this.x=this.right=this.left=this[0]=E;this.y=this.top=this.bottom=this[1]=F};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.lib.Anim={scroll:function(H,F,I,J,E,G){this.run(H,F,I,J,E,G,Ext.lib.Scroll)},motion:function(H,F,I,J,E,G){this.run(H,F,I,J,E,G,Ext.lib.Motion)},color:function(H,F,I,J,E,G){this.run(H,F,I,J,E,G,Ext.lib.ColorAnim)},run:function(I,F,K,L,E,H,G){G=G||Ext.lib.AnimBase;if(typeof L=="string"){L=Ext.lib.Easing[L]}var J=new G(I,F,K,L);J.animateX(function(){Ext.callback(E,H)});return J}};function C(E){if(!B){B=new Ext.Element.Flyweight()}B.dom=E;return B}if(Ext.isIE){function A(){var E=Function.prototype;delete E.createSequence;delete E.defer;delete E.createDelegate;delete E.createCallback;delete E.createInterceptor;window.detachEvent("onunload",A)}window.attachEvent("onunload",A)}Ext.lib.AnimBase=function(F,E,G,H){if(F){this.init(F,E,G,H)}};Ext.lib.AnimBase.prototype={toString:function(){var E=this.getEl();var F=E.id||E.tagName;return("Anim "+F)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(E,G,F){return this.method(this.currentFrame,G,F-G,this.totalFrames)},setAttribute:function(E,G,F){if(this.patterns.noNegatives.test(E)){G=(G>0)?G:0}Ext.fly(this.getEl(),"_anim").setStyle(E,G+F)},getAttribute:function(E){var G=this.getEl();var I=C(G).getStyle(E);if(I!=="auto"&&!this.patterns.offsetUnit.test(I)){return parseFloat(I)}var F=this.patterns.offsetAttribute.exec(E)||[];var J=!!(F[3]);var H=!!(F[2]);if(H||(C(G).getStyle("position")=="absolute"&&J)){I=G["offset"+F[0].charAt(0).toUpperCase()+F[0].substr(1)]}else{I=0}return I},getDefaultUnit:function(E){if(this.patterns.defaultUnit.test(E)){return"px"}return""},animateX:function(G,E){var F=function(){this.onComplete.removeListener(F);if(typeof G=="function"){G.call(E||this,this)}};this.onComplete.addListener(F,this);this.animate()},setRuntimeAttribute:function(F){var K;var G;var H=this.attributes;this.runtimeAttributes[F]={};var J=function(L){return(typeof L!=="undefined")};if(!J(H[F]["to"])&&!J(H[F]["by"])){return false}K=(J(H[F]["from"]))?H[F]["from"]:this.getAttribute(F);if(J(H[F]["to"])){G=H[F]["to"]}else{if(J(H[F]["by"])){if(K.constructor==Array){G=[];for(var I=0,E=K.length;I0&&isFinite(O)){if(K.currentFrame+O>=N){O=N-(M+1)}K.currentFrame+=O}}};Ext.lib.Bezier=new function(){this.getPosition=function(I,H){var J=I.length;var G=[];for(var F=0;F0&&!(O[0] instanceof Array)){O=[O]}else{var N=[];for(P=0,R=O.length;P0){this.runtimeAttributes[S]=this.runtimeAttributes[S].concat(O)}this.runtimeAttributes[S][this.runtimeAttributes[S].length]=L}else{I.setRuntimeAttribute.call(this,S)}};var E=function(J,L){var K=Ext.lib.Dom.getXY(this.getEl());J=[J[0]-K[0]+L[0],J[1]-K[1]+L[1]];return J};var G=function(J){return(typeof J!=="undefined")}})();(function(){Ext.lib.Scroll=function(I,H,J,K){if(I){Ext.lib.Scroll.superclass.constructor.call(this,I,H,J,K)}};Ext.extend(Ext.lib.Scroll,Ext.lib.ColorAnim);var F=Ext.lib;var G=F.Scroll.superclass;var E=F.Scroll.prototype;E.toString=function(){var H=this.getEl();var I=H.id||H.tagName;return("Scroll "+I)};E.doMethod=function(H,K,I){var J=null;if(H=="scroll"){J=[this.method(this.currentFrame,K[0],I[0]-K[0],this.totalFrames),this.method(this.currentFrame,K[1],I[1]-K[1],this.totalFrames)]}else{J=G.doMethod.call(this,H,K,I)}return J};E.getAttribute=function(H){var J=null;var I=this.getEl();if(H=="scroll"){J=[I.scrollLeft,I.scrollTop]}else{J=G.getAttribute.call(this,H)}return J};E.setAttribute=function(H,K,J){var I=this.getEl();if(H=="scroll"){I.scrollLeft=K[0];I.scrollTop=K[1]}else{G.setAttribute.call(this,H,K,J)}}})()})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/jquery-bridge-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/jquery-bridge-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/jquery-bridge-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +if(typeof jQuery=="undefined"){throw"Unable to load Ext, jQuery not found."}(function(){var B;Ext.lib.Dom={getViewWidth:function(D){return D?Math.max(jQuery(document).width(),jQuery(window).width()):jQuery(window).width()},getViewHeight:function(D){return D?Math.max(jQuery(document).height(),jQuery(window).height()):jQuery(window).height()},isAncestor:function(E,F){E=Ext.getDom(E);F=Ext.getDom(F);if(!E||!F){return false}if(E.contains&&!Ext.isSafari){return E.contains(F)}else{if(E.compareDocumentPosition){return !!(E.compareDocumentPosition(F)&16)}else{var D=F.parentNode;while(D){if(D==E){return true}else{if(!D.tagName||D.tagName.toUpperCase()=="HTML"){return false}}D=D.parentNode}return false}}},getRegion:function(D){return Ext.lib.Region.getRegion(D)},getY:function(D){return this.getXY(D)[1]},getX:function(D){return this.getXY(D)[0]},getXY:function(F){var E,J,L,M,I=(document.body||document.documentElement);F=Ext.getDom(F);if(F==I){return[0,0]}if(F.getBoundingClientRect){L=F.getBoundingClientRect();M=C(document).getScroll();return[L.left+M.left,L.top+M.top]}var N=0,K=0;E=F;var D=C(F).getStyle("position")=="absolute";while(E){N+=E.offsetLeft;K+=E.offsetTop;if(!D&&C(E).getStyle("position")=="absolute"){D=true}if(Ext.isGecko){J=C(E);var O=parseInt(J.getStyle("borderTopWidth"),10)||0;var G=parseInt(J.getStyle("borderLeftWidth"),10)||0;N+=G;K+=O;if(E!=F&&J.getStyle("overflow")!="visible"){N+=G;K+=O}}E=E.offsetParent}if(Ext.isSafari&&D){N-=I.offsetLeft;K-=I.offsetTop}if(Ext.isGecko&&!D){var H=C(I);N+=parseInt(H.getStyle("borderLeftWidth"),10)||0;K+=parseInt(H.getStyle("borderTopWidth"),10)||0}E=F.parentNode;while(E&&E!=I){if(!Ext.isOpera||(E.tagName!="TR"&&C(E).getStyle("display")!="inline")){N-=E.scrollLeft;K-=E.scrollTop}E=E.parentNode}return[N,K]},setXY:function(D,E){D=Ext.fly(D,"_setXY");D.position();var F=D.translatePoints(E);if(E[0]!==false){D.dom.style.left=F.left+"px"}if(E[1]!==false){D.dom.style.top=F.top+"px"}},setX:function(E,D){this.setXY(E,[D,false])},setY:function(D,E){this.setXY(D,[false,E])}};function C(D){if(!B){B=new Ext.Element.Flyweight()}B.dom=D;return B}Ext.lib.Event={getPageX:function(D){D=D.browserEvent||D;return D.pageX},getPageY:function(D){D=D.browserEvent||D;return D.pageY},getXY:function(D){D=D.browserEvent||D;return[D.pageX,D.pageY]},getTarget:function(D){return D.target},on:function(H,D,G,F,E){jQuery(H).bind(D,G)},un:function(F,D,E){jQuery(F).unbind(D,E)},purgeElement:function(D){jQuery(D).unbind()},preventDefault:function(D){D=D.browserEvent||D;if(D.preventDefault){D.preventDefault()}else{D.returnValue=false}},stopPropagation:function(D){D=D.browserEvent||D;if(D.stopPropagation){D.stopPropagation()}else{D.cancelBubble=true}},stopEvent:function(D){this.preventDefault(D);this.stopPropagation(D)},onAvailable:function(I,E,D){var H=new Date();var F=function(){if(H.getElapsed()>10000){clearInterval(G)}var J=document.getElementById(I);if(J){clearInterval(G);E.call(D||window,J)}};var G=setInterval(F,50)},resolveTextNode:function(D){if(D&&3==D.nodeType){return D.parentNode}else{return D}},getRelatedTarget:function(E){E=E.browserEvent||E;var D=E.relatedTarget;if(!D){if(E.type=="mouseout"){D=E.toElement}else{if(E.type=="mouseover"){D=E.fromElement}}}return this.resolveTextNode(D)}};Ext.lib.Ajax=function(){var D=function(E){return function(G,F){if((F=="error"||F=="timeout")&&E.failure){E.failure.call(E.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:E.argument})}else{if(E.success){E.success.call(E.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:E.argument})}}}};return{request:function(J,G,E,H,F){var I={type:J,url:G,data:H,timeout:E.timeout,complete:D(E)};if(F){if(F.xmlData){I.data=F.xmlData;I.processData=false;I.type="POST";I.contentType="text/xml"}else{if(F.jsonData){I.data=typeof F.jsonData=="object"?Ext.encode(F.jsonData):F.jsonData;I.processData=false;I.type="POST";I.contentType="text/javascript"}}if(F.headers){I.beforeSend=function(M){var K=F.headers;for(var L in K){if(K.hasOwnProperty(L)){M.setRequestHeader(L,K[L])}}}}}jQuery.ajax(I)},formRequest:function(I,H,F,J,E,G){jQuery.ajax({type:Ext.getDom(I).method||"POST",url:H,data:jQuery(I).formSerialize()+(J?"&"+J:""),timeout:F.timeout,complete:D(F)})},isCallInProgress:function(E){return false},abort:function(E){return false},serializeForm:function(E){return jQuery(E.dom||E).formSerialize()}}}();Ext.lib.Anim=function(){var D=function(E,F){var G=true;return{stop:function(H){},isAnimated:function(){return G},proxyCallback:function(){G=false;Ext.callback(E,F)}}};return{scroll:function(H,F,J,K,E,G){var I=D(E,G);H=Ext.getDom(H);if(typeof F.scroll.to[0]=="number"){H.scrollLeft=F.scroll.to[0]}if(typeof F.scroll.to[1]=="number"){H.scrollTop=F.scroll.to[1]}I.proxyCallback();return I},motion:function(H,F,I,J,E,G){return this.run(H,F,I,J,E,G)},color:function(H,F,J,K,E,G){var I=D(E,G);I.proxyCallback();return I},run:function(F,N,I,M,G,P,O){var J=D(G,P),K=Ext.fly(F,"_animrun");var E={};for(var H in N){if(N[H].from){if(H!="points"){K.setStyle(H,N[H].from)}}switch(H){case"points":var L,R;K.position();if(L=N.points.by){var Q=K.getXY();R=K.translatePoints([Q[0]+L[0],Q[1]+L[1]])}else{R=K.translatePoints(N.points.to)}E.left=R.left;E.top=R.top;if(!parseInt(K.getStyle("left"),10)){K.setLeft(0)}if(!parseInt(K.getStyle("top"),10)){K.setTop(0)}if(N.points.from){K.setXY(N.points.from)}break;case"width":E.width=N.width.to;break;case"height":E.height=N.height.to;break;case"opacity":E.opacity=N.opacity.to;break;case"left":E.left=N.left.to;break;case"top":E.top=N.top.to;break;default:E[H]=N[H].to;break}}jQuery(F).animate(E,I*1000,undefined,J.proxyCallback);return J}}}();Ext.lib.Region=function(F,G,D,E){this.top=F;this[1]=F;this.right=G;this.bottom=D;this.left=E;this[0]=E};Ext.lib.Region.prototype={contains:function(D){return(D.left>=this.left&&D.right<=this.right&&D.top>=this.top&&D.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(H){var F=Math.max(this.top,H.top);var G=Math.min(this.right,H.right);var D=Math.min(this.bottom,H.bottom);var E=Math.max(this.left,H.left);if(D>=F&&G>=E){return new Ext.lib.Region(F,G,D,E)}else{return null}},union:function(H){var F=Math.min(this.top,H.top);var G=Math.max(this.right,H.right);var D=Math.max(this.bottom,H.bottom);var E=Math.min(this.left,H.left);return new Ext.lib.Region(F,G,D,E)},constrainTo:function(D){this.top=this.top.constrain(D.top,D.bottom);this.bottom=this.bottom.constrain(D.top,D.bottom);this.left=this.left.constrain(D.left,D.right);this.right=this.right.constrain(D.left,D.right);return this},adjust:function(F,E,D,G){this.top+=F;this.left+=E;this.right+=G;this.bottom+=D;return this}};Ext.lib.Region.getRegion=function(G){var I=Ext.lib.Dom.getXY(G);var F=I[1];var H=I[0]+G.offsetWidth;var D=I[1]+G.offsetHeight;var E=I[0];return new Ext.lib.Region(F,H,D,E)};Ext.lib.Point=function(D,E){if(D instanceof Array){E=D[1];D=D[0]}this.x=this.right=this.left=this[0]=D;this.y=this.top=this.bottom=this[1]=E};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function A(){var D=Function.prototype;delete D.createSequence;delete D.defer;delete D.createDelegate;delete D.createCallback;delete D.createInterceptor;window.detachEvent("onunload",A)}window.attachEvent("onunload",A)}})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/prototype-bridge-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/prototype-bridge-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/prototype-bridge-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +(function(){var B;Ext.lib.Dom={getViewWidth:function(D){return D?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(D){return D?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){var D=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;return Math.max(D,this.getViewportHeight())},getDocumentWidth:function(){var D=(document.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;return Math.max(D,this.getViewportWidth())},getViewportHeight:function(){var D=self.innerHeight;var E=document.compatMode;if((E||Ext.isIE)&&!Ext.isOpera){D=(E=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight}return D},getViewportWidth:function(){var D=self.innerWidth;var E=document.compatMode;if(E||Ext.isIE){D=(E=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth}return D},isAncestor:function(E,F){E=Ext.getDom(E);F=Ext.getDom(F);if(!E||!F){return false}if(E.contains&&!Ext.isSafari){return E.contains(F)}else{if(E.compareDocumentPosition){return !!(E.compareDocumentPosition(F)&16)}else{var D=F.parentNode;while(D){if(D==E){return true}else{if(!D.tagName||D.tagName.toUpperCase()=="HTML"){return false}}D=D.parentNode}return false}}},getRegion:function(D){return Ext.lib.Region.getRegion(D)},getY:function(D){return this.getXY(D)[1]},getX:function(D){return this.getXY(D)[0]},getXY:function(F){var E,J,L,M,I=(document.body||document.documentElement);F=Ext.getDom(F);if(F==I){return[0,0]}if(F.getBoundingClientRect){L=F.getBoundingClientRect();M=C(document).getScroll();return[L.left+M.left,L.top+M.top]}var N=0,K=0;E=F;var D=C(F).getStyle("position")=="absolute";while(E){N+=E.offsetLeft;K+=E.offsetTop;if(!D&&C(E).getStyle("position")=="absolute"){D=true}if(Ext.isGecko){J=C(E);var O=parseInt(J.getStyle("borderTopWidth"),10)||0;var G=parseInt(J.getStyle("borderLeftWidth"),10)||0;N+=G;K+=O;if(E!=F&&J.getStyle("overflow")!="visible"){N+=G;K+=O}}E=E.offsetParent}if(Ext.isSafari&&D){N-=I.offsetLeft;K-=I.offsetTop}if(Ext.isGecko&&!D){var H=C(I);N+=parseInt(H.getStyle("borderLeftWidth"),10)||0;K+=parseInt(H.getStyle("borderTopWidth"),10)||0}E=F.parentNode;while(E&&E!=I){if(!Ext.isOpera||(E.tagName!="TR"&&C(E).getStyle("display")!="inline")){N-=E.scrollLeft;K-=E.scrollTop}E=E.parentNode}return[N,K]},setXY:function(D,E){D=Ext.fly(D,"_setXY");D.position();var F=D.translatePoints(E);if(E[0]!==false){D.dom.style.left=F.left+"px"}if(E[1]!==false){D.dom.style.top=F.top+"px"}},setX:function(E,D){this.setXY(E,[D,false])},setY:function(D,E){this.setXY(D,[false,E])}};Ext.lib.Event={getPageX:function(D){return Event.pointerX(D.browserEvent||D)},getPageY:function(D){return Event.pointerY(D.browserEvent||D)},getXY:function(D){D=D.browserEvent||D;return[Event.pointerX(D),Event.pointerY(D)]},getTarget:function(D){return Event.element(D.browserEvent||D)},resolveTextNode:function(D){if(D&&3==D.nodeType){return D.parentNode}else{return D}},getRelatedTarget:function(E){E=E.browserEvent||E;var D=E.relatedTarget;if(!D){if(E.type=="mouseout"){D=E.toElement}else{if(E.type=="mouseover"){D=E.fromElement}}}return this.resolveTextNode(D)},on:function(F,D,E){Event.observe(F,D,E,false)},un:function(F,D,E){Event.stopObserving(F,D,E,false)},purgeElement:function(D){},preventDefault:function(D){D=D.browserEvent||D;if(D.preventDefault){D.preventDefault()}else{D.returnValue=false}},stopPropagation:function(D){D=D.browserEvent||D;if(D.stopPropagation){D.stopPropagation()}else{D.cancelBubble=true}},stopEvent:function(D){Event.stop(D.browserEvent||D)},onAvailable:function(I,E,D){var H=new Date(),G;var F=function(){if(H.getElapsed()>10000){clearInterval(G)}var J=document.getElementById(I);if(J){clearInterval(G);E.call(D||window,J)}};G=setInterval(F,50)}};Ext.lib.Ajax=function(){var E=function(F){return F.success?function(G){F.success.call(F.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:F.argument})}:Ext.emptyFn};var D=function(F){return F.failure?function(G){F.failure.call(F.scope||window,{responseText:G.responseText,responseXML:G.responseXML,argument:F.argument})}:Ext.emptyFn};return{request:function(K,H,F,I,G){var J={method:K,parameters:I||"",timeout:F.timeout,onSuccess:E(F),onFailure:D(F)};if(G){if(G.headers){J.requestHeaders=G.headers}if(G.xmlData){K="POST";J.contentType="text/xml";J.postBody=G.xmlData;delete J.parameters}if(G.jsonData){K="POST";J.contentType="text/javascript";J.postBody=typeof G.jsonData=="object"?Ext.encode(G.jsonData):G.jsonData;delete J.parameters}}new Ajax.Request(H,J)},formRequest:function(J,I,G,K,F,H){new Ajax.Request(I,{method:Ext.getDom(J).method||"POST",parameters:Form.serialize(J)+(K?"&"+K:""),timeout:G.timeout,onSuccess:E(G),onFailure:D(G)})},isCallInProgress:function(F){return false},abort:function(F){return false},serializeForm:function(F){return Form.serialize(F.dom||F)}}}();Ext.lib.Anim=function(){var D={easeOut:function(F){return 1-Math.pow(1-F,2)},easeIn:function(F){return 1-Math.pow(1-F,2)}};var E=function(F,G){return{stop:function(H){this.effect.cancel()},isAnimated:function(){return this.effect.state=="running"},proxyCallback:function(){Ext.callback(F,G)}}};return{scroll:function(I,G,K,L,F,H){var J=E(F,H);I=Ext.getDom(I);if(typeof G.scroll.to[0]=="number"){I.scrollLeft=G.scroll.to[0]}if(typeof G.scroll.to[1]=="number"){I.scrollTop=G.scroll.to[1]}J.proxyCallback();return J},motion:function(I,G,J,K,F,H){return this.run(I,G,J,K,F,H)},color:function(I,G,J,K,F,H){return this.run(I,G,J,K,F,H)},run:function(G,O,K,N,H,Q,P){var F={};for(var J in O){switch(J){case"points":var M,S,L=Ext.fly(G,"_animrun");L.position();if(M=O.points.by){var R=L.getXY();S=L.translatePoints([R[0]+M[0],R[1]+M[1]])}else{S=L.translatePoints(O.points.to)}F.left=S.left+"px";F.top=S.top+"px";break;case"width":F.width=O.width.to+"px";break;case"height":F.height=O.height.to+"px";break;case"opacity":F.opacity=String(O.opacity.to);break;default:F[J]=String(O[J].to);break}}var I=E(H,Q);I.effect=new Effect.Morph(Ext.id(G),{duration:K,afterFinish:I.proxyCallback,transition:D[N]||Effect.Transitions.linear,style:F});return I}}}();function C(D){if(!B){B=new Ext.Element.Flyweight()}B.dom=D;return B}Ext.lib.Region=function(F,G,D,E){this.top=F;this[1]=F;this.right=G;this.bottom=D;this.left=E;this[0]=E};Ext.lib.Region.prototype={contains:function(D){return(D.left>=this.left&&D.right<=this.right&&D.top>=this.top&&D.bottom<=this.bottom)},getArea:function(){return((this.bottom-this.top)*(this.right-this.left))},intersect:function(H){var F=Math.max(this.top,H.top);var G=Math.min(this.right,H.right);var D=Math.min(this.bottom,H.bottom);var E=Math.max(this.left,H.left);if(D>=F&&G>=E){return new Ext.lib.Region(F,G,D,E)}else{return null}},union:function(H){var F=Math.min(this.top,H.top);var G=Math.max(this.right,H.right);var D=Math.max(this.bottom,H.bottom);var E=Math.min(this.left,H.left);return new Ext.lib.Region(F,G,D,E)},constrainTo:function(D){this.top=this.top.constrain(D.top,D.bottom);this.bottom=this.bottom.constrain(D.top,D.bottom);this.left=this.left.constrain(D.left,D.right);this.right=this.right.constrain(D.left,D.right);return this},adjust:function(F,E,D,G){this.top+=F;this.left+=E;this.right+=G;this.bottom+=D;return this}};Ext.lib.Region.getRegion=function(G){var I=Ext.lib.Dom.getXY(G);var F=I[1];var H=I[0]+G.offsetWidth;var D=I[1]+G.offsetHeight;var E=I[0];return new Ext.lib.Region(F,H,D,E)};Ext.lib.Point=function(D,E){if(D instanceof Array){E=D[1];D=D[0]}this.x=this.right=this.left=this[0]=D;this.y=this.top=this.bottom=this[1]=E};Ext.lib.Point.prototype=new Ext.lib.Region();if(Ext.isIE){function A(){var D=Function.prototype;delete D.createSequence;delete D.defer;delete D.createDelegate;delete D.createCallback;delete D.createInterceptor;window.detachEvent("onunload",A)}window.attachEvent("onunload",A)}})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/yui-bridge-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/yui-bridge-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/adapter/yui-bridge-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +if(typeof YAHOO=="undefined"){throw"Unable to load Ext, core YUI utilities (yahoo, dom, event) not found."}(function(){var I=YAHOO.util.Event;var J=YAHOO.util.Dom;var C=YAHOO.util.Connect;var K=YAHOO.util.Easing;var B=YAHOO.util.Anim;var G;Ext.lib.Dom={getViewWidth:function(A){return A?J.getDocumentWidth():J.getViewportWidth()},getViewHeight:function(A){return A?J.getDocumentHeight():J.getViewportHeight()},isAncestor:function(A,D){return J.isAncestor(A,D)},getRegion:function(A){return J.getRegion(A)},getY:function(A){return this.getXY(A)[1]},getX:function(A){return this.getXY(A)[0]},getXY:function(E){var D,O,Q,R,N=(document.body||document.documentElement);E=Ext.getDom(E);if(E==N){return[0,0]}if(E.getBoundingClientRect){Q=E.getBoundingClientRect();R=H(document).getScroll();return[Q.left+R.left,Q.top+R.top]}var S=0,P=0;D=E;var A=H(E).getStyle("position")=="absolute";while(D){S+=D.offsetLeft;P+=D.offsetTop;if(!A&&H(D).getStyle("position")=="absolute"){A=true}if(Ext.isGecko){O=H(D);var T=parseInt(O.getStyle("borderTopWidth"),10)||0;var L=parseInt(O.getStyle("borderLeftWidth"),10)||0;S+=L;P+=T;if(D!=E&&O.getStyle("overflow")!="visible"){S+=L;P+=T}}D=D.offsetParent}if(Ext.isSafari&&A){S-=N.offsetLeft;P-=N.offsetTop}if(Ext.isGecko&&!A){var M=H(N);S+=parseInt(M.getStyle("borderLeftWidth"),10)||0;P+=parseInt(M.getStyle("borderTopWidth"),10)||0}D=E.parentNode;while(D&&D!=N){if(!Ext.isOpera||(D.tagName!="TR"&&H(D).getStyle("display")!="inline")){S-=D.scrollLeft;P-=D.scrollTop}D=D.parentNode}return[S,P]},setXY:function(A,D){A=Ext.fly(A,"_setXY");A.position();var E=A.translatePoints(D);if(D[0]!==false){A.dom.style.left=E.left+"px"}if(D[1]!==false){A.dom.style.top=E.top+"px"}},setX:function(D,A){this.setXY(D,[A,false])},setY:function(A,D){this.setXY(A,[false,D])}};Ext.lib.Event={getPageX:function(A){return I.getPageX(A.browserEvent||A)},getPageY:function(A){return I.getPageY(A.browserEvent||A)},getXY:function(A){return I.getXY(A.browserEvent||A)},getTarget:function(A){return I.getTarget(A.browserEvent||A)},getRelatedTarget:function(A){return I.getRelatedTarget(A.browserEvent||A)},on:function(M,A,L,E,D){I.on(M,A,L,E,D)},un:function(E,A,D){I.removeListener(E,A,D)},purgeElement:function(A){I.purgeElement(A)},preventDefault:function(A){I.preventDefault(A.browserEvent||A)},stopPropagation:function(A){I.stopPropagation(A.browserEvent||A)},stopEvent:function(A){I.stopEvent(A.browserEvent||A)},onAvailable:function(L,E,D,A){return I.onAvailable(L,E,D,A)}};Ext.lib.Ajax={request:function(O,M,A,N,D){if(D){var E=D.headers;if(E){for(var L in E){if(E.hasOwnProperty(L)){C.initHeader(L,E[L],false)}}}if(D.xmlData){C.initHeader("Content-Type","text/xml",false);O="POST";N=D.xmlData}else{if(D.jsonData){C.initHeader("Content-Type","text/javascript",false);O="POST";N=typeof D.jsonData=="object"?Ext.encode(D.jsonData):D.jsonData}}}return C.asyncRequest(O,M,A,N)},formRequest:function(M,L,D,N,A,E){C.setForm(M,A,E);return C.asyncRequest(Ext.getDom(M).method||"POST",L,D,N)},isCallInProgress:function(A){return C.isCallInProgress(A)},abort:function(A){return C.abort(A)},serializeForm:function(A){var D=C.setForm(A.dom||A);C.resetFormState();return D}};Ext.lib.Region=YAHOO.util.Region;Ext.lib.Point=YAHOO.util.Point;Ext.lib.Anim={scroll:function(L,D,M,N,A,E){this.run(L,D,M,N,A,E,YAHOO.util.Scroll)},motion:function(L,D,M,N,A,E){this.run(L,D,M,N,A,E,YAHOO.util.Motion)},color:function(L,D,M,N,A,E){this.run(L,D,M,N,A,E,YAHOO.util.ColorAnim)},run:function(M,D,O,P,A,L,E){E=E||YAHOO.util.Anim;if(typeof P=="string"){P=YAHOO.util.Easing[P]}var N=new E(M,D,O,P);N.animateX(function(){Ext.callback(A,L)});return N}};function H(A){if(!G){G=new Ext.Element.Flyweight()}G.dom=A;return G}if(Ext.isIE){function F(){var A=Function.prototype;delete A.createSequence;delete A.defer;delete A.createDelegate;delete A.createCallback;delete A.createInterceptor;window.detachEvent("onunload",F)}window.attachEvent("onunload",F)}if(YAHOO.util.Anim){YAHOO.util.Anim.prototype.animateX=function(E,A){var D=function(){this.onComplete.unsubscribe(D);if(typeof E=="function"){E.call(A||this,this)}};this.onComplete.subscribe(D,this,true);this.animate()}}if(YAHOO.util.DragDrop&&Ext.dd.DragDrop){YAHOO.util.DragDrop.defaultPadding=Ext.dd.DragDrop.defaultPadding;YAHOO.util.DragDrop.constrainTo=Ext.dd.DragDrop.constrainTo}YAHOO.util.Dom.getXY=function(A){var D=function(E){return Ext.lib.Dom.getXY(E)};return YAHOO.util.Dom.batch(A,D,YAHOO.util.Dom,true)};if(YAHOO.util.AnimMgr){YAHOO.util.AnimMgr.fps=1000}YAHOO.util.Region.prototype.adjust=function(E,D,A,L){this.top+=E;this.left+=D;this.right+=L;this.bottom+=A;return this};YAHOO.util.Region.prototype.constrainTo=function(A){this.top=this.top.constrain(A.top,A.bottom);this.bottom=this.bottom.constrain(A.top,A.bottom);this.left=this.left.constrain(A.left,A.right);this.right=this.right.constrain(A.left,A.right);return this}})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/CompositeElement-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/CompositeElement-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/CompositeElement-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.CompositeElement=function(A){this.elements=[];this.addElements(A)};Ext.CompositeElement.prototype={isComposite:true,addElements:function(E){if(!E){return this}if(typeof E=="string"){E=Ext.Element.selectorFunction(E)}var D=this.elements;var B=D.length-1;for(var C=0,A=E.length;C"}else{P+=">";var U=T.children||T.cn;if(U){if(U instanceof Array){for(var Q=0,N=U.length;Q"}return P};var M=function(T,P){var S=document.createElement(T.tag||"div");var Q=S.setAttribute?true:false;for(var O in T){if(O=="tag"||O=="children"||O=="cn"||O=="html"||O=="style"||typeof T[O]=="function"){continue}if(O=="cls"){S.className=T["cls"]}else{if(Q){S.setAttribute(O,T[O])}else{S[O]=T[O]}}}Ext.DomHelper.applyStyles(S,T.style);var U=T.children||T.cn;if(U){if(U instanceof Array){for(var R=0,N=U.length;R",K=""+E,H=C+"",D=""+K;var G=function(N,O,Q,P){if(!L){L=document.createElement("div")}var R;var S=null;if(N=="td"){if(O=="afterbegin"||O=="beforeend"){return }if(O=="beforebegin"){S=Q;Q=Q.parentNode}else{S=Q.nextSibling;Q=Q.parentNode}R=I(4,H,P,D)}else{if(N=="tr"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(4,H,P,D)}}}else{if(N=="tbody"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(3,C,P,K)}}}else{if(O=="beforebegin"||O=="afterend"){return }if(O=="afterbegin"){S=Q.firstChild}R=I(2,J,P,E)}}}Q.insertBefore(R,S);return R};return{useDom:false,markup:function(N){return A(N)},applyStyles:function(P,Q){if(Q){P=Ext.fly(P);if(typeof Q=="string"){var O=/\s?([a-z\-]*)\:\s?([^;]*);?/gi;var R;while((R=O.exec(Q))!=null){P.setStyle(R[1],R[2])}}else{if(typeof Q=="object"){for(var N in Q){P.setStyle(N,Q[N])}}else{if(typeof Q=="function"){Ext.DomHelper.applyStyles(P,Q.call())}}}}},insertHtml:function(P,R,Q){P=P.toLowerCase();if(R.insertAdjacentHTML){if(B.test(R.tagName)){var O;if(O=G(R.tagName.toLowerCase(),P,R,Q)){return O}}switch(P){case"beforebegin":R.insertAdjacentHTML("BeforeBegin",Q);return R.previousSibling;case"afterbegin":R.insertAdjacentHTML("AfterBegin",Q);return R.firstChild;case"beforeend":R.insertAdjacentHTML("BeforeEnd",Q);return R.lastChild;case"afterend":R.insertAdjacentHTML("AfterEnd",Q);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""}var N=R.ownerDocument.createRange();var S;switch(P){case"beforebegin":N.setStartBefore(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R);return R.previousSibling;case"afterbegin":if(R.firstChild){N.setStartBefore(R.firstChild);S=N.createContextualFragment(Q);R.insertBefore(S,R.firstChild);return R.firstChild}else{R.innerHTML=Q;return R.firstChild}case"beforeend":if(R.lastChild){N.setStartAfter(R.lastChild);S=N.createContextualFragment(Q);R.appendChild(S);return R.lastChild}else{R.innerHTML=Q;return R.lastChild}case"afterend":N.setStartAfter(R);S=N.createContextualFragment(Q);R.parentNode.insertBefore(S,R.nextSibling);return R.nextSibling}throw"Illegal insertion point -> \""+P+"\""},insertBefore:function(N,P,O){return this.doInsert(N,P,O,"beforeBegin")},insertAfter:function(N,P,O){return this.doInsert(N,P,O,"afterEnd","nextSibling")},insertFirst:function(N,P,O){return this.doInsert(N,P,O,"afterBegin","firstChild")},doInsert:function(Q,S,R,T,P){Q=Ext.getDom(Q);var O;if(this.useDom){O=M(S,null);(P==="firstChild"?Q:Q.parentNode).insertBefore(O,P?Q[P]:Q)}else{var N=A(S);O=this.insertHtml(T,Q,N)}return R?Ext.get(O,true):O},append:function(P,R,Q){P=Ext.getDom(P);var O;if(this.useDom){O=M(R,null);P.appendChild(O)}else{var N=A(R);O=this.insertHtml("beforeEnd",P,N)}return Q?Ext.get(O,true):O},overwrite:function(N,P,O){N=Ext.getDom(N);N.innerHTML=A(P);return O?Ext.get(N.firstChild,true):N.firstChild},createTemplate:function(O){var N=A(O);return new Ext.Template(N)}}}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/DomQuery-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/DomQuery-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/DomQuery-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/\S/;var trimRe=/^\s+|\s+$/g;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>+~]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;function child(p,index){var i=0;var n=p.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(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}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.children||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=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n.nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){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},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);n=n[0]?n[0]:n;var 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=(el instanceof Array);var 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, null, \" {1} \");"},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([\w-]+)/,select:"n = byId(n, null, \"{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;var m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var 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("|");var 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;var 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;var 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;var 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; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Element-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Element-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Element-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +(function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){var dom=typeof element=="string"?document.getElementById(element):element;if(!dom){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){return Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Element;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibilityMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayMode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="undefined"){this.originalDisplay=display}return this},findParent:function(simpleSelector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery,stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(maxDepth);maxDepth=10}while(p&&p.nodeType==1&&depthch||tcb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false){if(el.offsetWidth>c.clientWidth||lcr){c.scrollLeft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:function(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDelegate(this),0);return this},contains:function(el){if(!el){return false}return D.isAncestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.getStyle("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true||!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="body"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},select:function(selector,unique){return El.select(selector,unique,this.dom)},query:function(selector,unique){return Ext.DomQuery.select(selector,this.dom)},child:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom);return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQuery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},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)},setVisible:function(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this.setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible?"visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(visible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visible?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if(visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden"}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this.getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVisible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if(typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle("display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}return this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:function(className){if(className instanceof Array){for(var i=0,len=className.length;idw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(xdh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(yvr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=true}if(x";E.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeRe=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match[1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function(){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater:function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}return this.updateManager},unselectable:function(){this.dom.unselectable="on";this.swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml-user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:function(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this.alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return noBoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(contentBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getStyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}var el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0],y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+this.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=this.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this.getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height:h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWidth:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this.getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,animate){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(arguments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return this},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(sides,styles){var val=0,v,w;for(var i=0,len=sides.length;i=0?w:-1*w)}}}return val},createProxy:function(config,renderTo,matchBox){config=typeof config=="object"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper.append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,config,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(msg,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","relative")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._maskMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true);var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-mask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._mask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:function(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMasked:function(){return this._mask&&this._mask.isVisible()},createShim:function(){var el=document.createElement("iframe");el.frameBorder="no";el.className="ext-shim";if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remove:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:function(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overFn.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true)){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom);this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(className,preventFlicker){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},function(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOnFocus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").addClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal").removeClass(className)},this.dom);return this},addClassOnClick:function(className){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").addClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal").removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});return this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.stopPropagation();if(preventDefault){e.preventDefault()}};if(eventName instanceof Array){for(var i=0,len=eventName.length;idom.clientHeight||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var prop=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom[prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom.scrollLeft,value];this.anim({scroll:{"to":to}},this.preanim(arguments,2),"scroll")}return this},scroll:function(direction,distance,animate){if(!this.isScrollable()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direction.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(direction){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrollTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l-distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":case"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=true}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-ch);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints:function(x,y){if(typeof x=="object"||x instanceof Array){y=x[1];x=x[0]}var p=this.getStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10);var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x-o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d==doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrollLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrollTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffset||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,top:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle(attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=typeof prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toString(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.substr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:function(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.format("
      "+El.boxMarkup+"
      ",cls)));el.child("."+cls+"-mc").dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)||d[name]},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)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.getUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUnit){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarkup="
      ";El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el=="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if(!(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=new El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){return el}else{if(el instanceof Array){return El.select(el)}else{if(el==document){if(!docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=document}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=arguments,len=a.length;i");var D=document.getElementById("ie-deferred-loader");D.onreadystatechange=function(){if(this.readyState=="complete"){B()}}}else{if(Ext.isSafari){M=setInterval(function(){var E=document.readyState;if(E=="complete"){B()}},10)}}}L.on(window,"load",B)};var R=function(E,U){var D=new Ext.util.DelayedTask(E);return function(V){V=new Ext.EventObjectImpl(V);D.delay(U.buffer,E,null,[V])}};var P=function(V,U,D,E){return function(W){Ext.EventManager.removeListener(U,D,E);V(W)}};var F=function(D,E){return function(U){U=new Ext.EventObjectImpl(U);setTimeout(function(){D(U)},E.delay||10)}};var J=function(U,E,D,Y,X){var Z=(!D||typeof D=="boolean")?{}:D;Y=Y||Z.fn;X=X||Z.scope;var W=Ext.getDom(U);if(!W){throw"Error listening for \""+E+"\". Element \""+U+"\" doesn't exist."}var V=function(b){b=Ext.EventObject.setEvent(b);var a;if(Z.delegate){a=b.getTarget(Z.delegate,W);if(!a){return }}else{a=b.target}if(Z.stopEvent===true){b.stopEvent()}if(Z.preventDefault===true){b.preventDefault()}if(Z.stopPropagation===true){b.stopPropagation()}if(Z.normalized===false){b=b.browserEvent}Y.call(X||W,b,a,Z)};if(Z.delay){V=F(V,Z)}if(Z.single){V=P(V,W,E,Y)}if(Z.buffer){V=R(V,Z)}Y._handlers=Y._handlers||[];Y._handlers.push([Ext.id(W),E,V]);L.on(W,E,V);if(E=="mousewheel"&&W.addEventListener){W.addEventListener("DOMMouseScroll",V,false);L.on(window,"unload",function(){W.removeEventListener("DOMMouseScroll",V,false)})}if(E=="mousedown"&&W==document){Ext.EventManager.stoppedMouseDownEvent.addListener(V)}return V};var G=function(E,U,Z){var D=Ext.id(E),a=Z._handlers,X=Z;if(a){for(var V=0,Y=a.length;V=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC},isSpecialKey:function(){var D=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||D==9||D==13||D==40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D>=44&&D<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}B.stopPropagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){var D=this.keyCode||this.charCode;return Ext.isSafari?(A[D]||D):D},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return B.getTime(this.browserEvent)}return null},getXY:function(){return this.xy},getTarget:function(E,G,D){var F=Ext.get(this.target);return E?F.findParent(E,G,D):(D?F:this.target)},getRelatedTarget:function(){if(this.browserEvent){return B.getRelatedTarget(this.browserEvent)}return null},getWheelDelta:function(){var D=this.browserEvent;var E=0;if(D.wheelDelta){E=D.wheelDelta/120}else{if(D.detail){E=-D.detail/3}}return E},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)?true:false},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarget"]();return D&&Ext.fly(E).contains(D)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Ext-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Ext-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Ext-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext={version:"2.0"};window["undefined"]=window["undefined"];Ext.apply=function(C,D,B){if(B){Ext.apply(C,B)}if(C&&D&&typeof D=="object"){for(var A in D){C[A]=D[A]}}return C};(function(){var idSeed=0;var ua=navigator.userAgent.toLowerCase();var isStrict=document.compatMode=="CSS1Compat",isOpera=ua.indexOf("opera")>-1,isSafari=(/webkit|khtml/).test(ua),isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isLinux=(ua.indexOf("linux")!=-1),isSecure=window.location.href.toLowerCase().indexOf("https")===0;if(isIE&&!isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,SSL_SECURE_URL:"javascript:false",BLANK_IMAGE_URL:"http:/"+"/extjs.com/s.gif",emptyFn:function(){},applyIf:function(o,c){if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p]}}}return o},addBehaviors:function(o){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(o)});return }var cache={};for(var b in o){var parts=b.split("@");if(parts[1]){var s=parts[0];if(!cache[s]){cache[s]=Ext.select(s)}cache[s].on(parts[1],o[b])}}cache=null},id:function(el,prefix){prefix=prefix||"ext-gen";el=Ext.getDom(el);var id=prefix+(++idSeed);return el?(el.id?el.id:(el.id=id)):id},extend:function(){var io=function(o){for(var m in o){this[m]=o[m]}};return function(sb,sp,overrides){if(typeof sp=="object"){overrides=sp;sp=sb;sb=function(){sp.apply(this,arguments)}}var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==Object.prototype.constructor){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.override=io;Ext.override(sb,overrides);return sb}}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method]}}},namespace:function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i0){F()}else{B.afterFx(D)}})};F.call(this)});return this},pause:function(C){var A=this.getFxEl();var B={};A.queueFx(B,function(){setTimeout(function(){A.afterFx(B)},C*1000)});return this},fadeIn:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visible";var C=B.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},B,null,0.5,"easeOut",function(){if(C==1){this.clearOpacity()}A.afterFx(B)})});return this},fadeOut:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){arguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,0.5,"easeOut",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay){this.dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpacity();A.afterFx(B)})});return this},scale:function(A,B,C){this.shift(Ext.apply({},C,{width:A,height:B}));return this},shift:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity;if(D!==undefined){E.width={to:this.adjustWidth(D)}}if(F!==undefined){E.height={to:this.adjustHeight(F)}}if(C!==undefined||H!==undefined){E.points={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]}}if(G!==undefined){E.opacity={to:G}}if(B.xy!==undefined){E.points={to:B.xy}}arguments.callee.anim=this.fxanim(E,B,"motion",0.35,"easeOut",function(){A.afterFx(B)})});return this},ghost:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"b";var H=this.getFxRestore();var E=this.getWidth(),G=this.getHeight();var F=this.dom.style;var J=function(){if(C.useDisplay){B.setDisplayed(false)}else{B.hide()}B.clearOpacity();B.setPositioning(H.pos);F.width=H.width;F.height=H.height;B.afterFx(C)};var D={opacity:{to:0},points:{}},I=D.points;switch(A.toLowerCase()){case"t":I.by=[0,-G];break;case"l":I.by=[-E,0];break;case"r":I.by=[E,0];break;case"b":I.by=[0,G];break;case"tl":I.by=[-E,-G];break;case"bl":I.by=[-E,G];break;case"br":I.by=[E,G];break;case"tr":I.by=[E,-G];break}arguments.callee.anim=this.fxanim(D,C,"motion",0.5,"easeOut",J)});return this},syncFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});return this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{block:false,concurrent:false,stopFx:false});return this},nextFx:function(){var A=this.fxQueue[0];if(A){A.call(this)}},hasActiveFx:function(){return this.fxQueue&&this.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];if(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true)}}return this},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this.stopFx();return true}return false}return true},hasFxBlock:function(){var A=this.fxQueue;return A&&A[0]&&A[0].block},queueFx:function(C,A){if(!this.fxQueue){this.fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurrent){var B=this.beforeFx(C);A.block=C.block;this.fxQueue.push(A);if(B){this.nextFx()}}else{A.call(this)}}return this},fxWrap:function(F,D,C){var B;if(!D.wrap||!(B=Ext.get(D.wrap))){var A;if(D.fixPosition){A=this.getXY()}var E=document.createElement("div");E.style.visibility=C;B=Ext.get(this.dom.parentNode.insertBefore(E,this.dom));B.setPositioning(F);if(B.getStyle("position")=="static"){B.position("relative")}this.clearPositioning("auto");B.clip();B.dom.appendChild(this.dom);if(A){B.setXY(A)}}return B},fxUnwrap:function(A,C,B){this.clearPositioning();this.setPositioning(C);if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.remove()}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositioning(),width:A.width,height:A.height}},afterFx:function(A){if(A.afterStyle){this.applyStyles(A.afterStyle)}if(A.afterCls){this.addClass(A.afterCls)}if(A.remove===true){this.remove()}Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent){this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom)},fxanim:function(D,E,B,F,C,A){B=B||"run";E=E||{};var G=Ext.lib.Anim[B](this.dom,D,(E.duration||F)||0.35,(E.easing||C)||"easeOut",function(){Ext.callback(A,this)},this);E.anim=G;return G}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.prototype,Ext.Fx); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Template-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Template-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/core/Template-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.Template=function(E){var B=arguments;if(E instanceof Array){E=E.join("")}else{if(B.length>1){var C=[];for(var D=0,A=B.length;D"+A.text+""}if(typeof A.scripts!="undefined"){this.loadScripts=A.scripts}if(typeof A.timeout!="undefined"){this.timeout=A.timeout}}this.showLoading();if(!D){this.defaultUrl=B}if(typeof B=="function"){B=B.call(this)}G=G||(F?"POST":"GET");if(G=="GET"){B=this.prepareUrl(B)}var E=Ext.apply(A||{},{url:B,params:(typeof F=="function"&&C)?F.createDelegate(C):F,success:this.processSuccess,failure:this.processFailure,scope:this,callback:undefined,timeout:(this.timeout*1000),argument:{"options":A,"url":B,"form":null,"callback":H,"scope":C||window,"params":F}});this.transaction=Ext.Ajax.request(E)}},formUpdate:function(C,A,B,D){if(this.fireEvent("beforeupdate",this.el,C,A)!==false){if(typeof A=="function"){A=A.call(this)}C=Ext.getDom(C);this.transaction=Ext.Ajax.request({form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this,timeout:(this.timeout*1000),argument:{"url":A,"form":C,"callback":D,"reset":B}});this.showLoading.defer(1,this)}},refresh:function(A){if(this.defaultUrl==null){return }this.update(this.defaultUrl,null,A,true)},startAutoRefresh:function(B,C,D,E,A){if(A){this.update(C||this.defaultUrl,D,E,true)}if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[C||this.defaultUrl,D,E,true]),B*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefreshProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText)}},prepareUrl:function(B){if(this.disableCaching){var A="_dc="+(new Date().getTime());if(B.indexOf("?")!==-1){B+="&"+A}else{B+="?"+A}}return B},processSuccess:function(A){this.transaction=null;if(A.argument.form&&A.argument.reset){try{A.argument.form.reset()}catch(B){}}if(this.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDelegate(this,[A]))}else{this.renderer.render(this.el,A,this);this.updateComplete(A)}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,true,A,A.argument.options)}},processFailure:function(A){this.transaction=null;this.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,false,A,A.argument.options)}},setRenderer:function(A){this.renderer=A},getRenderer:function(){return this.renderer},setDefaultUrl:function(A){this.defaultUrl=A},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transaction){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defaults={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:false"),disableCaching:false,showLoadIndicator:true,indicatorText:"
      Loading...
      "};Ext.Updater.updateElement=function(D,C,E,B){var A=Ext.get(D).getUpdater();Ext.apply(A,B);A.update(C,E,B?B.callback:null)};Ext.Updater.update=Ext.Updater.updateElement;Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D)}};Ext.UpdateManager=Ext.Updater; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/data/ArrayReader-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/data/ArrayReader-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/data/ArrayReader-min.js 4 Dec 2007 02:48:31 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(C){var B=this.meta?this.meta.id:null;var G=this.recordType,K=G.prototype.fields;var E=[];var M=C;for(var I=0;I]+>/gi,asText:function(A){return String(A).replace(this.stripTagsRE,"")},asUCText:function(A){return String(A).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(A){return String(A).toUpperCase()},asDate:function(A){if(!A){return 0}if(A instanceof Date){return A.getTime()}return Date.parse(String(A))},asFloat:function(A){var B=parseFloat(String(A).replace(/,/g,""));if(isNaN(B)){B=0}return B},asInt:function(A){var B=parseInt(String(A).replace(/,/g,""));if(isNaN(B)){B=0}return B}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/data/Store-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/data/Store-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/data/Store-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.data.Store=function(A){this.data=new Ext.util.MixedCollection(false);this.data.getKey=function(B){return B.id};this.baseParams={};this.paramNames={"start":"start","limit":"limit","sort":"sort","dir":"dir"};if(A&&A.data){this.inlineData=A.data;delete A.data}Ext.apply(this,A);if(this.url&&!this.proxy){this.proxy=new Ext.data.HttpProxy({url:this.url})}if(this.reader){if(!this.recordType){this.recordType=this.reader.recordType}if(this.reader.onMetaChange){this.reader.onMetaChange=this.onMetaChange.createDelegate(this)}}if(this.recordType){this.fields=this.recordType.prototype.fields}this.modified=[];this.addEvents("datachanged","metachange","add","remove","update","clear","beforeload","load","loadexception");if(this.proxy){this.relayEvents(this.proxy,["loadexception"])}this.sortToggle={};Ext.data.Store.superclass.constructor.call(this);if(this.storeId||this.id){Ext.StoreMgr.register(this)}if(this.inlineData){this.loadData(this.inlineData);delete this.inlineData}else{if(this.autoLoad){this.load.defer(10,this,[typeof this.autoLoad=="object"?this.autoLoad:undefined])}}};Ext.extend(Ext.data.Store,Ext.util.Observable,{remoteSort:false,pruneModifiedRecords:false,lastOptions:null,destroy:function(){if(this.id){Ext.StoreMgr.unregister(this)}this.data=null;this.purgeListeners()},add:function(B){B=[].concat(B);if(B.length<1){return }for(var D=0,A=B.length;DG?1:(H0},appendChild:function(E){var F=false;if(E instanceof Array){F=E}else{if(arguments.length>1){F=arguments}}if(F){for(var D=0,A=F.length;D0){var F=D?function(){E.apply(D,arguments)}:E;C.sort(F);for(var B=0;B=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(E,D,C){this.leftConstraint=E;this.rightConstraint=D;this.minX=this.initPageX-E;this.maxX=this.initPageX+D;if(C){this.setXTicks(this.initPageX,C)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(C,E,D){this.topConstraint=C;this.bottomConstraint=E;this.minY=this.initPageY-C;this.maxY=this.initPageY+E;if(D){this.setYTicks(this.initPageY,D)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(I,F){if(!F){return I}else{if(F[0]>=I){return F[0]}else{for(var D=0,C=F.length;D=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E]}}return F[F.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var A=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(D,C){for(var E in this.ids){for(var B in this.ids[E]){var F=this.ids[E][B];if(!this.isTypeOfDD(F)){continue}F[D].apply(F,C)}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true)},_onResize:function(B){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(C,B){if(!this.initialized){this.init()}if(!this.ids[B]){this.ids[B]={}}this.ids[B][C.id]=C},removeDDFromGroup:function(D,B){if(!this.ids[B]){this.ids[B]={}}var C=this.ids[B];if(C&&C[D.id]){delete C[D.id]}},_remove:function(C){for(var B in C.groups){if(B&&this.ids[B][C.id]){delete this.ids[B][C.id]}}delete this.handleIds[C.id]},regHandle:function(C,B){if(!this.handleIds[C]){this.handleIds[C]={}}this.handleIds[C][B]=B},isDragDrop:function(B){return(this.getDDById(B))?true:false},getRelated:function(F,C){var E=[];for(var D in F.groups){for(j in this.ids[D]){var B=this.ids[D][j];if(!this.isTypeOfDD(B)){continue}if(!C||B.isTarget){E[E.length]=B}}}return E},isLegalTarget:function(F,E){var C=this.getRelated(F,true);for(var D=0,B=C.length;Dthis.clickPixelThresh||B>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(D);this.dragCurrent.onDrag(D);if(!this.dragCurrent.moveOnly){this.fireEvents(D,false)}}this.stopEvent(D);return true},fireEvents:function(K,L){var N=this.dragCurrent;if(!N||N.isLocked()){return }var O=K.getPoint();var B=[];var E=[];var I=[];var G=[];var D=[];for(var F in this.dragOvers){var C=this.dragOvers[F];if(!this.isTypeOfDD(C)){continue}if(!this.isOverTarget(O,C,this.mode)){E.push(C)}B[F]=true;delete this.dragOvers[F]}for(var M in N.groups){if("string"!=typeof M){continue}for(F in this.ids[M]){var H=this.ids[M][F];if(!this.isTypeOfDD(H)){continue}if(H.isTarget&&!H.isLocked()&&H!=N){if(this.isOverTarget(O,H,this.mode)){if(L){G.push(H)}else{if(!B[H.id]){D.push(H)}else{I.push(H)}this.dragOvers[H.id]=H}}}}}if(this.mode){if(E.length){N.b4DragOut(K,E);N.onDragOut(K,E)}if(D.length){N.onDragEnter(K,D)}if(I.length){N.b4DragOver(K,I);N.onDragOver(K,I)}if(G.length){N.b4DragDrop(K,G);N.onDragDrop(K,G)}}else{var J=0;for(F=0,J=E.length;F2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true}else{C=C.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(C,A,B){if(C){this.init(C,A,B)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D)},setDelta:function(B,A){this.deltaX=B;this.deltaY=A},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B)},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);var B=C.dom?C:Ext.fly(C,"_dd");if(!this.deltaSetXY){var H=[E.x,E.y];B.setXY(H);var D=B.getLeft(true);var A=B.getTop(true);this.deltaSetXY=[D-E.x,A-E.y]}else{B.setLeftTop(E.x+this.deltaSetXY[0],E.y+this.deltaSetXY[1])}this.cachePosition(E.x,E.y);this.autoScroll(E.x,E.y,C.offsetHeight,C.offsetWidth);return E},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A}else{var C=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1]}},autoScroll:function(J,I,E,K){if(this.scroll){var L=Ext.lib.Dom.getViewHeight();var B=Ext.lib.Dom.getViewWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-Dthis.maxX){A=this.maxX}}if(this.constrainY){if(Dthis.maxY){D=this.maxY}}A=this.getTick(A,this.xTicks);D=this.getTick(D,this.yTicks);return{x:A,y:D}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(A){this.autoOffset(A.getPageX(),A.getPageY())},b4Drag:function(A){this.setDragElPos(A.getPageX(),A.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this;var A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame()},50);return }var D=this.getDragEl();if(!D){D=document.createElement("div");D.id=this.dragElId;var C=D.style;C.position="absolute";C.visibility="hidden";C.cursor="move";C.border="2px solid #aaa";C.zIndex=999;A.insertBefore(D,A.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2))}this.setDragElPos(E,D);Ext.fly(A).show()},_resizeProxy:function(){if(this.resizeFrame){var A=this.getEl();Ext.fly(this.getDragEl()).setSize(A.offsetWidth,A.offsetHeight)}},b4MouseDown:function(B){var A=B.getPageX();var C=B.getPageY();this.autoOffset(A,C);this.setDragElPos(A,C)},b4StartDrag:function(A,B){this.showFrame(A,B)},b4EndDrag:function(A){Ext.fly(this.getDragEl()).hide()},endDrag:function(C){var B=this.getEl();var A=this.getDragEl();A.style.visibility="";this.beforeMove();B.style.visibility="hidden";Ext.dd.DDM.moveToEl(B,A);A.style.visibility="hidden";B.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{toString:function(){return("DDTarget "+this.id)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragSource-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragSource-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragSource-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.dd.DragSource=function(B,A){this.el=Ext.get(B);if(!this.dragData){this.dragData={}}Ext.apply(this,A);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy()}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(A){return this.dragData},onDragEnter:function(C,D){var B=Ext.dd.DragDropMgr.getDDById(D);this.cachedTarget=B;if(this.beforeDragEnter(B,C,D)!==false){if(B.isNotifyTarget){var A=B.notifyEnter(this,C,this.dragData);this.proxy.setStatus(A)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(B,C,D)}}},beforeDragEnter:function(B,A,C){return true},alignElWithMouse:function(){Ext.dd.DragSource.superclass.alignElWithMouse.apply(this,arguments);this.proxy.sync()},onDragOver:function(C,D){var B=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(D);if(this.beforeDragOver(B,C,D)!==false){if(B.isNotifyTarget){var A=B.notifyOver(this,C,this.dragData);this.proxy.setStatus(A)}if(this.afterDragOver){this.afterDragOver(B,C,D)}}},beforeDragOver:function(B,A,C){return true},onDragOut:function(B,C){var A=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(C);if(this.beforeDragOut(A,B,C)!==false){if(A.isNotifyTarget){A.notifyOut(this,B,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(A,B,C)}}this.cachedTarget=null},beforeDragOut:function(B,A,C){return true},onDragDrop:function(B,C){var A=this.cachedTarget||Ext.dd.DragDropMgr.getDDById(C);if(this.beforeDragDrop(A,B,C)!==false){if(A.isNotifyTarget){if(A.notifyDrop(this,B,this.dragData)){this.onValidDrop(A,B,C)}else{this.onInvalidDrop(A,B,C)}}else{this.onValidDrop(A,B,C)}if(this.afterDragDrop){this.afterDragDrop(A,B,C)}}delete this.cachedTarget},beforeDragDrop:function(B,A,C){return true},onValidDrop:function(B,A,C){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(B,A,C)}},getRepairXY:function(B,A){return this.el.getXY()},onInvalidDrop:function(B,A,C){this.beforeInvalidDrop(B,A,C);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,A,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(A,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(A,C)}},afterRepair:function(){if(Ext.enableFx){this.el.highlight(this.hlColor||"c3daf9")}this.dragging=false},beforeInvalidDrop:function(B,A,C){return true},handleMouseDown:function(B){if(this.dragging){return }var A=this.getDragData(B);if(A&&this.onBeforeDrag(A,B)!==false){this.dragData=A;this.proxy.stop();Ext.dd.DragSource.superclass.handleMouseDown.apply(this,arguments)}},onBeforeDrag:function(A,B){return true},onStartDrag:Ext.emptyFn,startDrag:function(A,B){this.proxy.reset();this.dragging=true;this.proxy.update("");this.onInitDrag(A,B);this.proxy.show()},onInitDrag:function(A,C){var B=this.el.dom.cloneNode(true);B.id=Ext.id();this.proxy.update(B);this.onStartDrag(A,C);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(A){},endDrag:function(A){this.onEndDrag(this.dragData,A)},onEndDrag:function(A,B){},autoOffset:function(A,B){this.setDelta(-12,-20)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragTracker-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragTracker-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragTracker-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.dd.DragTracker=function(A){Ext.apply(this,A);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}};Ext.extend(Ext.dd.DragTracker,Ext.util.Observable,{active:false,tolerance:5,autoStart:false,initEl:function(A){this.el=Ext.get(A);A.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(C,B){if(this.fireEvent("mousedown",this,C)!==false&&this.onBeforeStart(C)!==false){this.startXY=this.lastXY=C.getXY();this.dragTarget=this.delegate?B:this.el.dom;C.preventDefault();var A=Ext.getDoc();A.on("mouseup",this.onMouseUp,this);A.on("mousemove",this.onMouseMove,this);A.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this)}}},onMouseMove:function(D,C){D.preventDefault();var B=D.getXY(),A=this.startXY;this.lastXY=B;if(!this.active){if(Math.abs(A[0]-B[0])>this.tolerance||Math.abs(A[1]-B[1])>this.tolerance){this.triggerStart()}else{return }}this.fireEvent("mousemove",this,D);this.onDrag(D);this.fireEvent("drag",this,D)},onMouseUp:function(B){var A=Ext.getDoc();A.un("mousemove",this.onMouseMove,this);A.un("mouseup",this.onMouseUp,this);A.un("selectstart",this.stopSelect,this);B.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,B);this.onEnd(B);this.fireEvent("dragend",this,B)},triggerStart:function(A){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(A){A.stopEvent();return false},onBeforeStart:function(A){},onStart:function(A){},onDrag:function(A){},onEnd:function(A){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(A){return A?this.constrainModes[A].call(this,this.lastXY):this.lastXY},getOffset:function(C){var B=this.getXY(C);var A=this.startXY;return[A[0]-B[0],A[1]-B[1]]},constrainModes:{"point":function(B){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var A=this.dragRegion;A.left=B[0];A.top=B[1];A.right=B[0];A.bottom=B[1];A.constrainTo(this.elRegion);return[A.left,A.top]}}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragZone-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragZone-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DragZone-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.dd.DragZone=function(B,A){Ext.dd.DragZone.superclass.constructor.call(this,B,A);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}};Ext.extend(Ext.dd.DragZone,Ext.dd.DragSource,{getDragData:function(A){return Ext.dd.Registry.getHandleFromEvent(A)},onInitDrag:function(A,B){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(A,B);return true},afterRepair:function(){if(Ext.enableFx){Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor||"c3daf9")}this.dragging=false},getRepairXY:function(A){return Ext.Element.fly(this.dragData.ddel).getXY()}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DropTarget-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DropTarget-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DropTarget-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.dd.DropTarget=function(B,A){this.el=Ext.get(B);Ext.apply(this,A);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.extend(Ext.dd.DropTarget,Ext.dd.DDTarget,{dropAllowed:"x-dd-drop-ok",dropNotAllowed:"x-dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(A,C,B){if(this.overClass){this.el.addClass(this.overClass)}return this.dropAllowed},notifyOver:function(A,C,B){return this.dropAllowed},notifyOut:function(A,C,B){if(this.overClass){this.el.removeClass(this.overClass)}},notifyDrop:function(A,C,B){return false}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DropZone-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DropZone-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/DropZone-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.dd.DropZone=function(B,A){Ext.dd.DropZone.superclass.constructor.call(this,B,A)};Ext.extend(Ext.dd.DropZone,Ext.dd.DropTarget,{getTargetFromEvent:function(A){return Ext.dd.Registry.getTargetFromEvent(A)},onNodeEnter:function(D,A,C,B){},onNodeOver:function(D,A,C,B){return this.dropAllowed},onNodeOut:function(D,A,C,B){},onNodeDrop:function(D,A,C,B){return false},onContainerOver:function(A,C,B){return this.dropNotAllowed},onContainerDrop:function(A,C,B){return false},notifyEnter:function(A,C,B){return this.dropNotAllowed},notifyOver:function(A,C,B){var D=this.getTargetFromEvent(C);if(!D){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B);this.lastOverNode=null}return this.onContainerOver(A,C,B)}if(this.lastOverNode!=D){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B)}this.onNodeEnter(D,A,C,B);this.lastOverNode=D}return this.onNodeOver(D,A,C,B)},notifyOut:function(A,C,B){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B);this.lastOverNode=null}},notifyDrop:function(A,C,B){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,A,C,B);this.lastOverNode=null}var D=this.getTargetFromEvent(C);return D?this.onNodeDrop(D,A,C,B):this.onContainerDrop(A,C,B)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/Registry-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/Registry-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/dd/Registry-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.dd.Registry=function(){var D={};var B={};var A=0;var C=function(F,E){if(typeof F=="string"){return F}var G=F.id;if(!G&&E!==false){G="extdd-"+(++A);F.id=G}return G};return{register:function(H,I){I=I||{};if(typeof H=="string"){H=document.getElementById(H)}I.ddel=H;D[C(H)]=I;if(I.isHandle!==false){B[I.ddel.id]=I}if(I.handles){var G=I.handles;for(var F=0,E=G.length;F .x-dlg-hd");this.body=C.child("> .x-dlg-bd");this.footer=C.child("> .x-dlg-ft");if(!this.header){this.header=C.createChild({tag:"div",cls:"x-dlg-hd",html:" "},this.body?this.body.dom:null)}if(!this.body){this.body=C.createChild({tag:"div",cls:"x-dlg-bd"})}this.header.unselectable();if(this.title){this.header.update(this.title)}this.focusEl=C.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1"});this.focusEl.swallowEvent("click",true);this.header.wrap({cls:"x-dlg-hd-right"}).wrap({cls:"x-dlg-hd-left"},true);this.bwrap=this.body.wrap({tag:"div",cls:"x-dlg-dlg-body"});if(this.footer){this.bwrap.dom.appendChild(this.footer.dom)}this.bg=this.el.createChild({tag:"div",cls:"x-dlg-bg",html:"
       
      "});this.centerBg=this.bg.child("div.x-dlg-bg-center");if(this.autoScroll!==false&&!this.autoTabs){this.body.setStyle("overflow","auto")}this.toolbox=this.el.createChild({cls:"x-dlg-toolbox"});if(this.closable!==false){this.el.addClass("x-dlg-closable");this.close=this.toolbox.createChild({cls:"x-dlg-close"});this.close.on("click",this.closeClick,this);this.close.addClassOnOver("x-dlg-close-over")}if(this.collapsible!==false){this.collapseBtn=this.toolbox.createChild({cls:"x-dlg-collapse"});this.collapseBtn.on("click",this.collapseClick,this);this.collapseBtn.addClassOnOver("x-dlg-collapse-over");this.header.on("dblclick",this.collapseClick,this)}if(this.resizable!==false){this.el.addClass("x-dlg-resizable");this.resizer=new Ext.Resizable(C,{minWidth:this.minWidth||80,minHeight:this.minHeight||80,handles:this.resizeHandles||"all",pinned:true});this.resizer.on("beforeresize",this.beforeResize,this);this.resizer.on("resize",this.onResize,this)}if(this.draggable!==false){C.addClass("x-dlg-draggable");if(!this.proxyDrag){var A=new Ext.dd.DD(C.dom.id,"WindowDrag")}else{var A=new Ext.dd.DDProxy(C.dom.id,"WindowDrag",{dragElId:this.proxy.id})}A.setHandleElId(this.header.id);A.endDrag=this.endMove.createDelegate(this);A.startDrag=this.startMove.createDelegate(this);A.onDrag=this.onDrag.createDelegate(this);A.scroll=false;this.dd=A}if(this.modal){this.mask=D.append(document.body,{tag:"div",cls:"x-dlg-mask"},true);this.mask.enableDisplayMode("block");this.mask.hide();this.el.addClass("x-dlg-modal")}if(this.shadow){this.shadow=new Ext.Shadow({mode:typeof this.shadow=="string"?this.shadow:"sides",offset:this.shadowOffset})}else{this.shadowOffset=0}if(Ext.useShims&&this.shim!==false){this.shim=this.el.createShim();this.shim.hide=this.hideAction;this.shim.hide()}else{this.shim=false}if(this.autoTabs){this.initTabs()}this.addEvents({"keydown":true,"move":true,"resize":true,"beforehide":true,"hide":true,"beforeshow":true,"show":true});C.on("keydown",this.onKeyDown,this);C.on("mousedown",this.toFront,this);Ext.EventManager.onWindowResize(this.adjustViewport,this,true);this.el.hide();Ext.DialogManager.register(this);Ext.BasicDialog.superclass.constructor.call(this)};Ext.extend(Ext.BasicDialog,Ext.util.Observable,{shadowOffset:Ext.isIE?6:5,minHeight:80,minWidth:200,minButtonWidth:75,defaultButton:null,buttonAlign:"right",tabTag:"div",firstShow:true,setTitle:function(A){this.header.update(A);return this},closeClick:function(){this.hide()},collapseClick:function(){this[this.collapsed?"expand":"collapse"]()},collapse:function(){if(!this.collapsed){this.collapsed=true;this.el.addClass("x-dlg-collapsed");this.restoreHeight=this.el.getHeight();this.resizeTo(this.el.getWidth(),this.header.getHeight())}},expand:function(){if(this.collapsed){this.collapsed=false;this.el.removeClass("x-dlg-collapsed");this.resizeTo(this.el.getWidth(),this.restoreHeight)}},initTabs:function(){var A=this.getTabs();while(A.getTab(0)){A.removeTab(0)}this.el.select(this.tabTag+".x-dlg-tab").each(function(B){var C=B.dom;A.addTab(Ext.id(C),C.title);C.title=""});A.activate(0);return A},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getHeaderFooterHeight(true)+40)},onResize:function(){this.refreshSize();this.syncBodyHeight();this.adjustAssets();this.focus();this.fireEvent("resize",this,this.size.width,this.size.height)},onKeyDown:function(A){if(this.isVisible()){this.fireEvent("keydown",this,A)}},resizeTo:function(B,A){this.el.setSize(B,A);this.size={width:B,height:A};this.syncBodyHeight();if(this.fixedcenter){this.center()}if(this.isVisible()){this.constrainXY();this.adjustAssets()}this.fireEvent("resize",this,B,A);return this},setContentSize:function(A,B){B+=this.getHeaderFooterHeight()+this.body.getMargins("tb");A+=this.body.getMargins("lr")+this.bwrap.getMargins("lr")+this.centerBg.getPadding("lr");B+=this.body.getPadding("tb")+this.bwrap.getBorderWidth("tb")+this.body.getBorderWidth("tb")+this.el.getBorderWidth("tb");A+=this.body.getPadding("lr")+this.bwrap.getBorderWidth("lr")+this.body.getBorderWidth("lr")+this.bwrap.getPadding("lr")+this.el.getBorderWidth("lr");if(this.tabs){B+=this.tabs.stripWrap.getHeight()+this.tabs.bodyEl.getMargins("tb")+this.tabs.bodyEl.getPadding("tb");A+=this.tabs.bodyEl.getMargins("lr")+this.tabs.bodyEl.getPadding("lr")}this.resizeTo(A,B);return this},addKeyListener:function(B,E,D){var H,A,F,G;if(typeof B=="object"&&!(B instanceof Array)){H=B["key"];A=B["shift"];F=B["ctrl"];G=B["alt"]}else{H=B}var C=function(M,L){if((!A||L.shiftKey)&&(!F||L.ctrlKey)&&(!G||L.altKey)){var J=L.getKey();if(H instanceof Array){for(var K=0,I=H.length;K
      "},null,true);this.btnContainer=A.firstChild.firstChild.firstChild}var D={handler:F,scope:E,minWidth:this.minButtonWidth,hideParent:true};if(typeof B=="string"){D.text=B}else{if(B.tag){D.dhconfig=B}else{Ext.apply(D,B)}}var C=new Ext.Button(D);C.render(this.btnContainer.appendChild(document.createElement("td")));this.syncBodyHeight();if(!this.buttons){this.buttons=[]}this.buttons.push(C);return C},setDefaultButton:function(A){this.defaultButton=A;return this},getHeaderFooterHeight:function(C){var A=0;if(this.header){A+=this.header.getHeight()}if(this.footer){var B=this.footer.getMargins();A+=(this.footer.getHeight()+B.top+B.bottom)}A+=this.bwrap.getPadding("tb")+this.bwrap.getBorderWidth("tb");A+=this.centerBg.getPadding("tb");return A},syncBodyHeight:function(){var E=this.body,B=this.centerBg,F=this.bwrap;var A=this.size.height-this.getHeaderFooterHeight(false);E.setHeight(A-E.getMargins("tb"));var C=this.header.getHeight();var D=this.size.height-C;B.setHeight(D);F.setLeftTop(B.getPadding("l"),C+B.getPadding("t"));F.setHeight(D-B.getPadding("tb"));F.setWidth(this.el.getWidth(true)-B.getPadding("lr"));E.setWidth(F.getWidth(true));if(this.tabs){this.tabs.syncHeight();if(Ext.isIE){this.tabs.el.repaint()}}},restoreState:function(){var A=Ext.state.Manager.get(this.stateId||(this.el.id+"-state"));if(A&&A.width){this.xy=[A.x,A.y];this.resizeTo(A.width,A.height)}return this},beforeShow:function(){this.expand();if(this.fixedcenter){this.xy=this.el.getCenterXY(true)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}this.constrainXY()},animShow:function(){var A=Ext.get(this.animateTarget,true).getBox();this.proxy.setSize(A.width,A.height);this.proxy.setLocation(A.x,A.y);this.proxy.show();this.proxy.setBounds(this.xy[0],this.xy[1],this.size.width,this.size.height,true,0.35,this.showEl.createDelegate(this))},show:function(A){if(this.fireEvent("beforeshow",this)===false){return }if(this.syncHeightBeforeShow){this.syncBodyHeight()}else{if(this.firstShow){this.firstShow=false;this.syncBodyHeight()}}this.animateTarget=A||this.animateTarget;if(!this.el.isVisible()){this.beforeShow();if(this.animateTarget){this.animShow()}else{this.showEl()}}return this},showEl:function(){this.proxy.hide();this.el.setXY(this.xy);this.el.show();this.adjustAssets(true);this.toFront();this.focus();if(Ext.isIE){this.el.repaint()}this.fireEvent("show",this)},focus:function(){if(this.defaultButton){this.defaultButton.focus()}else{this.focusEl.focus()}},constrainXY:function(){if(this.constraintoviewport!==false){if(!this.viewSize){if(this.container){var E=this.container.getSize();this.viewSize=[E.width,E.height]}else{this.viewSize=[Ext.lib.Dom.getViewWidth(),Ext.lib.Dom.getViewHeight()]}}var E=Ext.get(this.container||document).getScroll();var A=this.xy[0],H=this.xy[1];var B=this.size.width,D=this.size.height;var F=this.viewSize[0],G=this.viewSize[1];var C=false;if(A+B>F+E.left){A=F-B;C=true}if(H+D>G+E.top){H=G-D;C=true}if(A","
      ","
      ","
      ","
      {lockedHeader}
      ","
      {lockedBody}
      ","
      ","
      ","
      {header}
      ","
      {body}
      ","
      ","
      ","","
       
      ","");B.master.disableformats=true}if(!B.header){B.header=new Ext.Template("","{cells}","
      {splits}");B.header.disableformats=true}B.header.compile();if(!B.hcell){B.hcell=new Ext.Template("
      ","
      {value}
      ","
      ");B.hcell.disableFormats=true}B.hcell.compile();if(!B.hsplit){B.hsplit=new Ext.Template("
       
      ");B.hsplit.disableFormats=true}B.hsplit.compile();if(!B.body){B.body=new Ext.Template("","{rows}","
      ");B.body.disableFormats=true}B.body.compile();if(!B.row){B.row=new Ext.Template("{cells}");B.row.disableFormats=true}B.row.compile();if(!B.cell){B.cell=new Ext.Template("","
      {value}
      ","");B.cell.disableFormats=true}B.cell.compile();this.templates=B},onColWidthChange:function(){this.updateColumns.apply(this,arguments)},onHeaderChange:function(){this.updateHeaders.apply(this,arguments)},onHiddenChange:function(){this.handleHiddenChange.apply(this,arguments)},onColumnMove:function(){this.handleColumnMove.apply(this,arguments)},onColumnLock:function(){this.handleLockChange.apply(this,arguments)},onDataChange:function(){this.refresh();this.updateHeaderSortState()},onClear:function(){this.refresh()},onUpdate:function(B,A){this.refreshRow(A)},refreshRow:function(A){var C=this.ds,B;if(typeof A=="number"){B=A;A=C.getAt(B)}else{B=C.indexOf(A)}this.insertRows(C,B,B,true);this.onRemove(C,A,B+1,true);this.syncRowHeights(B,B);this.layout();this.fireEvent("rowupdated",this,B,A)},onAdd:function(C,A,B){this.insertRows(C,B,B+(A.length-1))},onRemove:function(F,B,D,E){if(E!==true){this.fireEvent("beforerowremoved",this,D,B)}var C=this.getBodyTable(),A=this.getLockedTable();if(C.rows[D]){C.firstChild.removeChild(C.rows[D])}if(A.rows[D]){A.firstChild.removeChild(A.rows[D])}if(E!==true){this.stripeRows(D);this.syncRowHeights(D,D);this.layout();this.fireEvent("rowremoved",this,D,B)}},onLoad:function(){this.scrollToTop()},scrollToTop:function(){if(this.scroller){this.scroller.dom.scrollTop=0;this.syncScroll()}},getHeaderPanel:function(A){if(A){this.headerPanel.show()}return this.headerPanel},getFooterPanel:function(A){if(A){this.footerPanel.show()}return this.footerPanel},initElements:function(){var C=Ext.Element;var B=this.grid.getGridEl().dom.firstChild;var A=B.childNodes;this.el=new C(B);this.headerPanel=new C(B.firstChild);this.headerPanel.enableDisplayMode("block");this.scroller=new C(A[1]);this.scrollSizer=new C(this.scroller.dom.firstChild);this.lockedWrap=new C(A[2]);this.lockedHd=new C(this.lockedWrap.dom.firstChild);this.lockedBody=new C(this.lockedWrap.dom.childNodes[1]);this.mainWrap=new C(A[3]);this.mainHd=new C(this.mainWrap.dom.firstChild);this.mainBody=new C(this.mainWrap.dom.childNodes[1]);this.footerPanel=new C(A[4]);this.footerPanel.enableDisplayMode("block");this.focusEl=new C(A[5]);this.focusEl.swallowEvent("click",true);this.resizeProxy=new C(A[6]);this.headerSelector=String.format("#{0} td.x-grid-hd, #{1} td.x-grid-hd",this.lockedHd.id,this.mainHd.id);this.splitterSelector=String.format("#{0} div.x-grid-split, #{1} div.x-grid-split",this.lockedHd.id,this.mainHd.id)},getHeaderCell:function(A){return Ext.DomQuery.select(this.headerSelector)[A]},getHeaderCellMeasure:function(A){return this.getHeaderCell(A).firstChild},getHeaderCellText:function(A){return this.getHeaderCell(A).firstChild.firstChild},getLockedTable:function(){return this.lockedBody.dom.firstChild},getBodyTable:function(){return this.mainBody.dom.firstChild},getLockedRow:function(A){return this.getLockedTable().rows[A]},getRow:function(A){return this.getBodyTable().rows[A]},getRowComposite:function(B){if(!this.rowEl){this.rowEl=new Ext.CompositeElementLite()}var D=[],C,A;if(C=this.getLockedRow(B)){D.push(C)}if(A=this.getRow(B)){D.push(A)}this.rowEl.elements=D;return this.rowEl},getCell:function(D,B){var A=this.cm.getLockedCount();var C;if(B=this.ds.getCount()){return }E=(E!==undefined?E:0);var M=this.grid.colModel;while(M.isHidden(E)){E++}var C=this.getCell(O,E);if(!C){return }var J=this.scroller.dom;var N=parseInt(C.offsetTop,10);var I=parseInt(C.offsetLeft,10);var L=N+C.offsetHeight;var G=I+C.offsetWidth;var A=J.clientHeight-this.mainHd.dom.offsetHeight;var K=parseInt(J.scrollTop,10);var F=parseInt(J.scrollLeft,10);var H=K+A;var B=F+J.clientWidth;if(NH){J.scrollTop=L-A}}if(D!==false){if(IB){J.scrollLeft=G-J.clientWidth}}}return C},updateColumns:function(){this.grid.stopEditing();var B=this.grid.colModel,E=this.getColumnIds();var F=0;for(var D=0,A=B.getColumnCount();D"+I+"";var J=F.firstChild.rows;for(var A=0,C=J.length;A0){I=I||0;var F=this.getBodyTable().rows;var H=this.getLockedTable().rows;var G=F.length-1;E=Math.min(E||G,G);for(var C=I;C<=E;C++){var A=F[C],B=H[C];var D=Math.max(A.offsetHeight,B.offsetHeight);A.style.height=B.style.height=D+"px"}}},layout:function(B,C){var W=this.grid;var E=W.autoHeight;var L=16;var a=W.getGridEl(),H=this.cm,I=W.autoExpandColumn,O=this;if(!a.dom.offsetWidth){if(B){this.lockedWrap.show();this.mainWrap.show()}return }var V=this.cm.isLocked(0);var F=this.headerPanel.getHeight();var G=this.footerPanel.getHeight();if(E){var K=this.getBodyTable().offsetHeight+F+G+this.mainHd.getHeight();var U=K+a.getBorderWidth("tb");if(W.maxHeight){U=Math.min(W.maxHeight,U)}a.setHeight(U)}if(W.autoWidth){a.setWidth(H.getTotalWidth()+a.getBorderWidth("lr"))}var N=this.scroller;var T=a.getSize(true);this.el.setSize(T.width,T.height);this.headerPanel.setWidth(T.width);this.footerPanel.setWidth(T.width);var M=this.mainHd.getHeight();var Q=T.width;var d=T.height-(F+G);N.setSize(Q,d);var Z=this.getBodyTable();var S=V?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;var X=Z.offsetHeight;var J=S+Z.offsetWidth;var b=false,Y=false;this.scrollSizer.setSize(J,X+M);var D=this.lockedWrap,P=this.mainWrap;var R=this.lockedBody,A=this.mainBody;setTimeout(function(){var j=N.dom.offsetTop;var e=N.dom.clientWidth,k=N.dom.clientHeight;D.setTop(j);D.setSize(S,k);P.setLeftTop(S,j);P.setSize(e-S,k);R.setHeight(k-M);A.setHeight(k-M);if(C!==true&&!O.userResized&&I){var i=H.getIndexById(I);var f=H.getTotalWidth(false);var g=H.getColumnWidth(i);var c=Math.min(Math.max(((e-f)+g-2)-(e<=N.dom.offsetWidth?0:18),W.autoExpandMin),W.autoExpandMax);if(g!=c){H.setColumnWidth(i,c,true);O.css.updateRule(O.colSelector+I,"width",(c-O.borderWidth)+"px");O.css.updateRule(O.hdSelector+I,"width",(c-O.borderWidth)+"px");O.updateSplitters();O.layout(false,true)}}if(B){D.show();P.show()}},10)},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return }this.layout()},appendFooter:function(A){return null},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns"}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/JsonView-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/JsonView-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/JsonView-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.JsonView=function(A,D,C){Ext.JsonView.superclass.constructor.call(this,A,D,C);var B=this.el.getUpdater();B.setRenderer(this);B.on("update",this.onLoad,this);B.on("failure",this.onLoadException,this);this.addEvents({"beforerender":true,"load":true,"loadexception":true})};Ext.extend(Ext.JsonView,Ext.View,{jsonRoot:"",refresh:function(){this.clearSelections();this.el.update("");var C=[];var E=this.jsonData;if(E&&E.length>0){for(var B=0,A=E.length;BI){return B?-1:+1}else{return 0}}};this.jsonData.sort(C);this.refresh();if(this.jsonData!=this.snapshot){this.snapshot.sort(C)}}}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/MasterTemplate-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/MasterTemplate-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/MasterTemplate-min.js 4 Dec 2007 02:48:32 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.MasterTemplate=function(){Ext.MasterTemplate.superclass.constructor.apply(this,arguments);this.originalHtml=this.html;var D={};var A,E=this.subTemplateRe;E.lastIndex=0;var C=0;while(A=E.exec(this.html)){var B=A[1],F=A[2];D[C]={name:B,index:C,buffer:[],tpl:new Ext.Template(F)};if(B){D[B]=D[C]}D[C].tpl.compile();D[C].tpl.call=this.call.createDelegate(this);C++}this.subCount=C;this.subs=D};Ext.extend(Ext.MasterTemplate,Ext.Template,{subTemplateRe:/((?:.|\n)*?)<\/tpl>/gi,add:function(B,A){if(arguments.length==1){A=arguments[0];B=0}var C=this.subs[B];C.buffer[C.buffer.length]=C.tpl.apply(A);return this},fill:function(D,C,F){var B=arguments;if(B.length==1||(B.length==2&&typeof B[1]=="boolean")){C=B[0];D=0;F=B[1]}if(F){this.reset()}for(var E=0,A=C.length;E0){this.cmp.elements=this.selections;this.cmp.removeClass(this.selectedClass);this.selections=[];if(!A){this.fireEvent("selectionchange",this,this.selections)}}},isSelected:function(B){var A=this.selections;if(A.length<1){return false}B=this.getNode(B);return A.indexOf(B)!==-1},select:function(D,F,B){if(D instanceof Array){if(!F){this.clearSelections(true)}for(var C=0,A=D.length;C=A;C--){B.push(D[C])}}return B},indexOf:function(D){D=this.getNode(D);if(typeof D.nodeIndex=="number"){return D.nodeIndex}var C=this.nodes;for(var B=0,A=C.length;B1){for(var C=0,A=arguments.length;C0?A:" ")}},setActivePanel:function(A){A=this.getPanel(A);if(this.activePanel&&this.activePanel!=A){this.activePanel.setActiveState(false)}this.activePanel=A;A.setActiveState(true);if(this.panelSize){A.setSize(this.panelSize.width,this.panelSize.height)}if(this.closeBtn){this.closeBtn.setVisible(!this.config.closeOnTab&&!this.isSlid&&A.isClosable())}this.updateTitle(A.getTitle());if(this.tabs){this.fireEvent("invalidated",this)}this.fireEvent("panelactivated",this,A)},showPanel:function(A){if(A=this.getPanel(A)){if(this.tabs){var B=this.tabs.getTab(A.getEl().id);if(B.isHidden()){this.tabs.unhideTab(B.id)}B.activate()}else{this.setActivePanel(A)}}return A},getActivePanel:function(){return this.activePanel},validateVisibility:function(){if(this.panels.getCount()<1){this.updateTitle(" ");this.closeBtn.hide();this.hide()}else{if(!this.isVisible()){this.show()}}},add:function(B){if(arguments.length>1){for(var C=0,A=arguments.length;C0){this.remove(this.panels.first())}},remove:function(B,A){B=this.getPanel(B);if(!B){return null}var E={};this.fireEvent("beforeremove",this,B,E);if(E.cancel===true){return null}A=(typeof A!="undefined"?A:(this.config.preservePanels===true||B.preserve===true));var C=B.getId();this.panels.removeKey(C);if(A){document.body.appendChild(B.getEl().dom)}if(this.tabs){this.tabs.removeTab(B.getEl().id)}else{if(!A){this.bodyEl.dom.removeChild(B.getEl().dom)}}if(this.panels.getCount()==1&&this.tabs&&!this.config.alwaysShowTabs){var D=this.panels.first();var F=document.createElement("div");F.appendChild(D.getEl().dom);this.bodyEl.update("");this.bodyEl.dom.appendChild(D.getEl().dom);F=null;this.updateTitle(D.getTitle());this.tabs=null;this.bodyEl.setStyle("overflow",this.config.autoScroll?"auto":"hidden");this.setActivePanel(D)}B.setRegion(null);if(this.activePanel==B){this.activePanel=null}if(this.config.autoDestroy!==false&&A!==true){try{B.destroy()}catch(E){}}this.fireEvent("panelremoved",this,B);return B},getTabs:function(){return this.tabs},createTool:function(C,B){var A=Ext.DomHelper.append(C,{tag:"div",cls:"x-layout-tools-button",children:[{tag:"div",cls:"x-layout-tools-button-inner "+B,html:" "}]},true);A.addClassOnOver("x-layout-tools-button-over");return A}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/LayoutStateManager-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/LayoutStateManager-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/LayoutStateManager-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.LayoutStateManager=function(A){this.state={north:{},south:{},east:{},west:{}}};Ext.LayoutStateManager.prototype={init:function(D,G){this.provider=G;var F=G.get(D.id+"-layout-state");if(F){var E=D.isUpdating();if(!E){D.beginUpdate()}for(var A in F){if(typeof F[A]!="function"){var B=F[A];var C=D.getRegion(A);if(C&&B){if(B.size){C.resizeTo(B.size)}if(B.collapsed==true){C.collapse(true)}else{C.expand(null,true)}}}}if(!E){D.endUpdate()}this.state=F}this.layout=D;D.on("regionresized",this.onRegionResized,this);D.on("regioncollapsed",this.onRegionCollapsed,this);D.on("regionexpanded",this.onRegionExpanded,this)},storeState:function(){this.provider.set(this.layout.id+"-layout-state",this.state)},onRegionResized:function(B,A){this.state[B.getPosition()].size=A;this.storeState()},onRegionCollapsed:function(A){this.state[A.getPosition()].collapsed=true;this.storeState()},onRegionExpanded:function(A){this.state[A.getPosition()].collapsed=false;this.storeState()}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/ReaderLayout-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/ReaderLayout-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/ReaderLayout-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.ReaderLayout=function(B,C){var D=B||{size:{}};Ext.ReaderLayout.superclass.constructor.call(this,C||document.body,{north:D.north!==false?Ext.apply({split:false,initialSize:32,titlebar:false},D.north):false,west:D.west!==false?Ext.apply({split:true,initialSize:200,minSize:175,maxSize:400,titlebar:true,collapsible:true,animate:true,margins:{left:5,right:0,bottom:5,top:5},cmargins:{left:5,right:5,bottom:5,top:5}},D.west):false,east:D.east!==false?Ext.apply({split:true,initialSize:200,minSize:175,maxSize:400,titlebar:true,collapsible:true,animate:true,margins:{left:0,right:5,bottom:5,top:5},cmargins:{left:5,right:5,bottom:5,top:5}},D.east):false,center:Ext.apply({tabPosition:"top",autoScroll:false,closeOnTab:true,titlebar:false,margins:{left:D.west!==false?0:5,right:D.east!==false?0:5,bottom:5,top:2}},D.center)});this.el.addClass("x-reader");this.beginUpdate();var A=new Ext.BorderLayout(Ext.getBody().createChild(),{south:D.preview!==false?Ext.apply({split:true,initialSize:200,minSize:100,autoScroll:true,collapsible:true,titlebar:true,cmargins:{top:5,left:0,right:0,bottom:0}},D.preview):false,center:Ext.apply({autoScroll:false,titlebar:false,minHeight:200},D.listView)});this.add("center",new Ext.NestedLayoutPanel(A,Ext.apply({title:D.mainTitle||"",tabTip:""},D.innerPanelCfg)));this.endUpdate();this.regions.preview=A.getRegion("south");this.regions.listView=A.getRegion("center")};Ext.extend(Ext.ReaderLayout,Ext.BorderLayout); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/SplitLayoutRegion-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/SplitLayoutRegion-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/legacy/layout/SplitLayoutRegion-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.SplitLayoutRegion=function(B,A,D,C){this.cursor=C;Ext.SplitLayoutRegion.superclass.constructor.call(this,B,A,D)};Ext.extend(Ext.SplitLayoutRegion,Ext.LayoutRegion,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,applyConfig:function(A){Ext.SplitLayoutRegion.superclass.applyConfig.call(this,A);if(A.split){if(!this.split){var B=Ext.DomHelper.append(this.mgr.el.dom,{tag:"div",id:this.el.id+"-split",cls:"x-layout-split x-layout-split-"+this.position,html:" "});this.split=new Ext.SplitBar(B,this.el,this.orientation);this.split.on("moved",this.onSplitMove,this);this.split.useShim=A.useShim===true;this.split.getMaximumSize=this[this.position=="north"||this.position=="south"?"getVMaxSize":"getHMaxSize"].createDelegate(this);if(this.useSplitTips){this.split.el.dom.title=A.collapsible?this.collapsibleSplitTip:this.splitTip}if(A.collapsible){this.split.el.on("dblclick",this.collapse,this)}}if(typeof A.minSize!="undefined"){this.split.minSize=A.minSize}if(typeof A.maxSize!="undefined"){this.split.maxSize=A.maxSize}if(A.hideWhenEmpty||A.hidden){this.hideSplitter()}}},getHMaxSize:function(){var B=this.config.maxSize||10000;var A=this.mgr.getRegion("center");return Math.min(B,(this.el.getWidth()+A.getEl().getWidth())-A.getMinWidth())},getVMaxSize:function(){var B=this.config.maxSize||10000;var A=this.mgr.getRegion("center");return Math.min(B,(this.el.getHeight()+A.getEl().getHeight())-A.getMinHeight())},onSplitMove:function(B,A){this.fireEvent("resized",this,A)},getSplitBar:function(){return this.split},hide:function(){this.hideSplitter();Ext.SplitLayoutRegion.superclass.hide.call(this)},hideSplitter:function(){if(this.split){this.split.el.setLocation(-2000,-2000);this.split.el.hide()}},show:function(){if(this.split){this.split.el.show()}Ext.SplitLayoutRegion.superclass.show.call(this)},beforeSlide:function(){if(Ext.isGecko){this.bodyEl.clip();if(this.tabs){this.tabs.bodyEl.clip()}if(this.activePanel){this.activePanel.getEl().clip();if(this.activePanel.beforeSlide){this.activePanel.beforeSlide()}}}},afterSlide:function(){if(Ext.isGecko){this.bodyEl.unclip();if(this.tabs){this.tabs.bodyEl.unclip()}if(this.activePanel){this.activePanel.getEl().unclip();if(this.activePanel.afterSlide){this.activePanel.afterSlide()}}}},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={"mouseout":function(B){if(!B.within(this.el,true)){A.delay(500)}},"mouseover":function(B){A.cancel()},scope:this}}this.el.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return }this.isSlid=true;if(this.collapseBtn){this.collapseBtn.hide()}this.closeBtnState=this.closeBtn.getStyle("display");this.closeBtn.hide();if(this.stickBtn){this.stickBtn.show()}this.el.show();this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.beforeSlide();this.el.setStyle("z-index",10001);this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this);this.fireEvent("slideshow",this)},scope:this,block:true})},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");if(this.collapseBtn){this.collapseBtn.show()}this.closeBtn.setStyle("display",this.closeBtnState);if(this.stickBtn){this.stickBtn.hide()}this.fireEvent("slidehide",this)},slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);return }this.isSlid=false;this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.setLeftTop(-10000,-10000);this.afterSlide();this.afterSlideIn();Ext.callback(A)},scope:this,block:true})},slideInIf:function(A){if(!A.within(this.el)){this.slideIn()}},animateCollapse:function(){this.beforeSlide();this.el.setStyle("z-index",20000);var A=this.getSlideAnchor();this.el.slideOut(A,{callback:function(){this.el.setStyle("z-index","");this.collapsedEl.slideIn(A,{duration:0.3});this.afterSlide();this.el.setLocation(-10000,-10000);this.el.hide();this.fireEvent("collapsed",this)},scope:this,block:true})},animateExpand:function(){this.beforeSlide();this.el.alignTo(this.collapsedEl,this.getCollapseAnchor(),this.getExpandAdj());this.el.setStyle("z-index",20000);this.collapsedEl.hide({duration:0.1});this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.el.setStyle("z-index","");this.afterSlide();if(this.split){this.split.el.show()}this.fireEvent("invalidated",this);this.fireEvent("expanded",this)},scope:this,block:true})},anchors:{"west":"left","east":"right","north":"top","south":"bottom"},sanchors:{"west":"l","east":"r","north":"t","south":"b"},canchors:{"west":"tl-tr","east":"tr-tl","north":"tl-bl","south":"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var B=this.collapsedEl,A=this.cmargins;switch(this.position){case"west":return[-(A.right+B.getWidth()+A.left),0];break;case"east":return[A.right+B.getWidth()+A.left,0];break;case"north":return[0,-(A.top+A.bottom+B.getHeight())];break;case"south":return[0,A.top+A.bottom+B.getHeight()];break}}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-af-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-af-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-af-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Besig om te laai...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} geselekteerde ry(e)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Maak die oortjie toe"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Die waarde in hierdie veld is foutief"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Besig om te laai..."}Date.monthNames=["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"];Date.dayNames=["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Kanselleer",yes:"Ja",no:"Nee"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d-m-y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Vandag",minText:"Hierdie datum is vroër as die minimum datum",maxText:"Hierdie dataum is later as die maximum datum",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Volgende Maand (Beheer+Regs)",prevText:"Vorige Maand (Beheer+Links)",monthYearText:"Kies 'n maand (Beheer+Op/Af volgende/vorige jaar)",todayTip:"{0} (Spasie)",format:"d-m-y",startDay:0})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Bladsy",afterPageText:"van {0}",firstText:"Eerste Bladsy",prevText:"Vorige Bladsy",nextText:"Volgende Bladsy",lastText:"Laatste Bladsy",refreshText:"Verfris",displayMsg:"Wys {0} - {1} van {2}",emptyMsg:"Geen data om te wys nie"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Die minimum lengte van die veld is {0}",maxLengthText:"Die maximum lengte van die veld is {0}",blankText:"Die veld is verpligtend",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Die minimum waarde vir die veld is {0}",maxText:"Die maximum waarde vir die veld is {0}",nanText:"{0} is nie 'n geldige waarde nie"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Afgeskakel",disabledDatesText:"Afgeskakel",minText:"Die datum in hierdie veld moet na {0} wees",maxText:"Die datum in hierdie veld moet voor {0} wees",invalidText:"{0} is nie 'n geldige datum nie - datumformaat is {1}",format:"d/m/y",altFormats:"d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Besig om te laai...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Hierdie veld moet 'n e-pos adres wees met die formaat 'gebruiker@domein.za'",urlText:"Hierdie veld moet 'n URL wees me die formaat 'http:/'+'/www.domein.za'",alphaText:"Die veld mag alleenlik letters en _ bevat",alphanumText:"Die veld mag alleenlik letters, syfers en _ bevat"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sorteer Oplopend",sortDescText:"Sorteer Aflopend",lockText:"Vries Kolom",unlockText:"Ontvries Kolom",columnsText:"Kolomme"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Naam",valueText:"Waarde",dateFormat:"Y-m-j"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Trek om grootte aan te pas.",collapsibleSplitTip:"Trek om grootte aan te pas. Dubbel-klik om weg te steek."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-af.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-af.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-af.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,179 @@ +/* + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * Afrikaans Translations + * by Thys Meintjes (20 July 2007) + */ + +/* Ext Core translations */ +Ext.UpdateManager.defaults.indicatorText = '
      Besig om te laai...
      '; + +/* Ext single string translations */ +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} geselekteerde ry(e)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Maak die oortjie toe"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Die waarde in hierdie veld is foutief"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Besig om te laai..."; +} + +/* Javascript month and days translations */ +Date.monthNames = [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" +]; + +Date.dayNames = [ + "Sondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrydag", + "Saterdag" +]; + +/* Ext components translations */ +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Kanselleer", + yes : "Ja", + no : "Nee" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d-m-y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Vandag", + minText : "Hierdie datum is vroër as die minimum datum", + maxText : "Hierdie dataum is later as die maximum datum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Volgende Maand (Beheer+Regs)', + prevText : 'Vorige Maand (Beheer+Links)', + monthYearText : "Kies 'n maand (Beheer+Op/Af volgende/vorige jaar)", + todayTip : "{0} (Spasie)", + format : "d-m-y", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Bladsy", + afterPageText : "van {0}", + firstText : "Eerste Bladsy", + prevText : "Vorige Bladsy", + nextText : "Volgende Bladsy", + lastText : "Laatste Bladsy", + refreshText : "Verfris", + displayMsg : "Wys {0} - {1} van {2}", + emptyMsg : 'Geen data om te wys nie' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Die minimum lengte van die veld is {0}", + maxLengthText : "Die maximum lengte van die veld is {0}", + blankText : "Die veld is verpligtend", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Die minimum waarde vir die veld is {0}", + maxText : "Die maximum waarde vir die veld is {0}", + nanText : "{0} is nie 'n geldige waarde nie" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Afgeskakel", + disabledDatesText : "Afgeskakel", + minText : "Die datum in hierdie veld moet na {0} wees", + maxText : "Die datum in hierdie veld moet voor {0} wees", + invalidText : "{0} is nie 'n geldige datum nie - datumformaat is {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Besig om te laai...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : "Hierdie veld moet 'n e-pos adres wees met die formaat 'gebruiker@domein.za'", + urlText : "Hierdie veld moet 'n URL wees me die formaat 'http:/'+'/www.domein.za'", + alphaText : 'Die veld mag alleenlik letters en _ bevat', + alphanumText : 'Die veld mag alleenlik letters, syfers en _ bevat' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sorteer Oplopend", + sortDescText : "Sorteer Aflopend", + lockText : "Vries Kolom", + unlockText : "Ontvries Kolom", + columnsText : "Kolomme" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Naam", + valueText : "Waarde", + dateFormat : "Y-m-j" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Trek om grootte aan te pas.", + collapsibleSplitTip : "Trek om grootte aan te pas. Dubbel-klik om weg te steek." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-bg-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-bg-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-bg-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Зареждане...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} избрани колони"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Затвори таб"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="�?евалидна �?тойно�?т на полето"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Зареждане..."}Date.monthNames=["Януари","Февруари","Март","�?прил","Май","Юни","Юли","�?вгу�?т","Септември","Октомври","�?оември","Декември"];Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.dayNames=["�?едел�?","Понеделник","Вторник","Ср�?да","Четвъртък","Петък","Събота"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Отмени",yes:"Да",no:"�?е"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d.m.Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Дне�?",minText:"Тази дата е преди минималната",maxText:"Тази дата е �?лед мак�?ималната",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Следващ ме�?ец (Control+Right)",prevText:"Предишен ме�?ец (Control+Left)",monthYearText:"Избери ме�?ец (Control+Up/Down за преме�?тване по години)",todayTip:"{0} (Spacebar)",format:"d.m.y",okText:" OK ",cancelText:"Отмени",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Страница",afterPageText:"от {0}",firstText:"Първа �?траница",prevText:"Предишна �?траница",nextText:"Следваща �?траница",lastText:"По�?ледна �?траница",refreshText:"Презареди",displayMsg:"Показвайки {0} - {1} от {2}",emptyMsg:"�?�?ма данни за показване"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Минималната дължина на това поле е {0}",maxLengthText:"Мак�?ималната дължина на това поле е {0}",blankText:"Това поле е задължително",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Минималната �?тойно�?т за това поле е {0}",maxText:"Мак�?ималната �?тойно�?т за това поле е {0}",nanText:"{0} не е валидно чи�?ло"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"�?едо�?тъпен",disabledDatesText:"�?едо�?тъпен",minText:"Датата в това поле тр�?бва да е �?лед {0}",maxText:"Датата в това поле тр�?бва да е преди {0}",invalidText:"{0} не е валидна дата - тр�?бва да бъде във формат {1}",format:"d.m.y",altFormats:"d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Зареждане...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Това поле тр�?бва да бъде емейл във формат \"user@domain.com\"",urlText:"Това поле тр�?бва да бъде URL във формат \"http:/"+"/www.domain.com\"",alphaText:"Това поле тр�?бва да �?ъдържа �?амо букви и _",alphanumText:"Това поле тр�?бва да �?ъдържа �?амо букви, цифри и _"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Мол�?, въведете URL за връзката:",buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Удебел�?ва избрани�? тек�?т.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Прави избрани�? тек�?т кур�?ив.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Подчертава избрани�? тек�?т.",cls:"x-html-editor-tip"},increasefontsize:{title:"Уголеми тек�?та",text:"Уголем�?ва размера на шрифта.",cls:"x-html-editor-tip"},decreasefontsize:{title:"�?амали тек�?та",text:"�?амал�?ва размера на шрифта.",cls:"x-html-editor-tip"},backcolor:{title:"Цв�?т на маркирани�? тек�?т",text:"Промен�? фонови�? цв�?т на избрани�? тек�?т.",cls:"x-html-editor-tip"},forecolor:{title:"Цв�?т на шрифта",text:"Промен�? цвета на избрани�? тек�?т.",cls:"x-html-editor-tip"},justifyleft:{title:"Л�?во подравн�?ване",text:"Подравн�?ва тек�?та на л�?во.",cls:"x-html-editor-tip"},justifycenter:{title:"Центриране",text:"Центрира тек�?та.",cls:"x-html-editor-tip"},justifyright:{title:"Д�?�?но подравн�?ване",text:"Подравн�?ва тек�?та на д�?�?но.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"�?еномериран �?пи�?ък",text:"Започва неномериран �?пи�?ък.",cls:"x-html-editor-tip"},insertorderedlist:{title:"�?омериран �?пи�?ък",text:"Започва номериран �?пи�?ък.",cls:"x-html-editor-tip"},createlink:{title:"Хипервръзка",text:"Превръща избрани�? тек�?т в хипервръзка.",cls:"x-html-editor-tip"},sourceedit:{title:"Редактиране на кода",text:"Преминаване в режим на редактиране на кода.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Подреди в нара�?тващ ред",sortDescText:"Подреди в намал�?ващ ред",lockText:"Заключи колона",unlockText:"Отключи колона",columnsText:"Колони"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Име",valueText:"Стойно�?т",dateFormat:"d.m.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Влачете �? мишката за да промените размера.",collapsibleSplitTip:"Влачете �? мишката за да промените размера. Чукнете два пъти за да �?криете."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-cs-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-cs-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-cs-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Pros�m �?ekejte...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} vybraných řádků"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Zavř�t záložku"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Hodnota v tomto poli je neplatná"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Pros�m �?ekejte..."}Date.monthNames=["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Zář�","Ř�jen","Listopad","Prosinec"];Date.dayNames=["Neděle","Ponděl�","Úterý","Středa","Čtvrtek","Pátek","Sobota"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Storno",yes:"Ano",no:"Ne"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"m.d.Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Dnes",minText:"Datum nesm� být starš� než je minimáln�",maxText:"Datum nesm� být dř�vějš� než je maximáln�",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Následuj�c� měs�c (Control+Right)",prevText:"Předcházej�c� měs�c (Control+Left)",monthYearText:"Zvolte měs�c (ke změně let použijte Control+Up/Down)",todayTip:"{0} (Spacebar)",format:"m.d.y"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Strana",afterPageText:"z {0}",firstText:"Prvn� strana",prevText:"Přecházej�c� strana",nextText:"Následuj�c� strana",lastText:"Posledn� strana",refreshText:"Aktualizovat",displayMsg:"Zobrazeno {0} - {1} z celkových {2}",emptyMsg:"Žádné záznamy nebyly nalezeny"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Pole nesm� m�t méně {0} znaků",maxLengthText:"Pole nesm� být delš� než {0} znaků",blankText:"This field is required",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Hodnota v tomto poli nesm� být menš� než {0}",maxText:"Hodnota v tomto poli nesm� být větš� než {0}",nanText:"{0} nen� platné �?�slo"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Neaktivn�",disabledDatesText:"Neaktivn�",minText:"Datum v tomto poli nesm� být starš� než {0}",maxText:"Datum v tomto poli nesm� být novějš� než {0}",invalidText:"{0} nen� platným datem - zkontrolujte zda-li je ve formátu {1}",format:"m.d.y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Pros�m �?ekejte...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"V tomto poli může být vyplněna pouze emailová adresa ve formátu \"uživatel@doména.cz\"",urlText:"V tomto poli může být vyplněna pouze URL (adresa internetové stránky) ve formátu \"http:/"+"/www.doména.cz\"",alphaText:"Toto pole může obsahovat pouze p�smena abecedy a znak _",alphanumText:"Toto pole může obsahovat pouze p�smena abecedy, �?�sla a znak _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Řadit vzestupně",sortDescText:"Řadit sestupně",lockText:"Ukotvit sloupec",unlockText:"Uvolnit sloupec",columnsText:"Sloupce"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Název",valueText:"Hodnota",dateFormat:"m.j.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Tahem změnit velikost.",collapsibleSplitTip:"Tahem změnit velikost. Dvojklikem skrýt."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-cs.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-cs.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-cs.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,170 @@ +/** + * Czech Translations / Český překlad + * Translated by Tomáš Korčák (72) + * 2007/05/01 21:29, Ext-1.0.1a + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Prosím čekejte...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} vybraných řádků"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zavřít záložku"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je neplatná"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Prosím čekejte..."; +} + +Date.monthNames = [ + "Leden", + "Únor", + "Březen", + "Duben", + "Květen", + "Červen", + "Červenec", + "Srpen", + "Září", + "Říjen", + "Listopad", + "Prosinec" +]; + +Date.dayNames = [ + "Neděle", + "Pondělí", + "Úterý", + "Středa", + "Čtvrtek", + "Pátek", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Storno", + yes : "Ano", + no : "Ne" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m.d.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Dnes", + minText : "Datum nesmí být starší než je minimální", + maxText : "Datum nesmí být dřívější než je maximální", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Následující měsíc (Control+Right)', + prevText : 'Předcházející měsíc (Control+Left)', + monthYearText : 'Zvolte měsíc (ke změně let použijte Control+Up/Down)', + todayTip : "{0} (Spacebar)", + format : "m.d.y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Strana", + afterPageText : "z {0}", + firstText : "První strana", + prevText : "Přecházející strana", + nextText : "Následující strana", + lastText : "Poslední strana", + refreshText : "Aktualizovat", + displayMsg : "Zobrazeno {0} - {1} z celkových {2}", + emptyMsg : 'Žádné záznamy nebyly nalezeny' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Pole nesmí mít méně {0} znaků", + maxLengthText : "Pole nesmí být delší než {0} znaků", + blankText : "This field is required", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Hodnota v tomto poli nesmí být menší než {0}", + maxText : "Hodnota v tomto poli nesmí být větší než {0}", + nanText : "{0} není platné číslo" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Neaktivní", + disabledDatesText : "Neaktivní", + minText : "Datum v tomto poli nesmí být starší než {0}", + maxText : "Datum v tomto poli nesmí být novější než {0}", + invalidText : "{0} není platným datem - zkontrolujte zda-li je ve formátu {1}", + format : "m.d.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Prosím čekejte...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'V tomto poli může být vyplněna pouze emailová adresa ve formátu "uživatel@doména.cz"', + urlText : 'V tomto poli může být vyplněna pouze URL (adresa internetové stránky) ve formátu "http:/'+'/www.doména.cz"', + alphaText : 'Toto pole může obsahovat pouze písmena abecedy a znak _', + alphanumText : 'Toto pole může obsahovat pouze písmena abecedy, čísla a znak _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Řadit vzestupně", + sortDescText : "Řadit sestupně", + lockText : "Ukotvit sloupec", + unlockText : "Uvolnit sloupec", + columnsText : "Sloupce" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Název", + valueText : "Hodnota", + dateFormat : "m.j.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Tahem změnit velikost.", + collapsibleSplitTip : "Tahem změnit velikost. Dvojklikem skrýt." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-da-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-da-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-da-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Henter...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} markerede rækker"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Luk denne fane"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Værdien i dette felt er ikke tilladt"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Henter..."}Date.monthNames=["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"];Date.dayNames=["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Fortryd",yes:"Ja",no:"Nej"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"I dag",minText:"Denne dato er før den tidligst tilladte",maxText:"Denne dato er senere end den senest tilladte",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Næste måned (Ctrl + højre piltast)",prevText:"Forrige måned (Ctrl + venstre piltast)",monthYearText:"Vælg en måned (Ctrl + op/ned pil for at ændre årstal)",todayTip:"{0} (mellemrum)",format:"d/m/y",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Side",afterPageText:"af {0}",firstText:"Første side",prevText:"Forrige side",nextText:"Næste side",lastText:"Sidste side",refreshText:"Opfrisk",displayMsg:"Viser {0} - {1} af {2}",emptyMsg:"Der er ingen data at vise"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minimum længden for dette felt er {0}",maxLengthText:"Maksimum længden for dette felt er {0}",blankText:"Dette felt skal udfyldes",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Mindste-værdien for dette felt er {0}",maxText:"Maksimum-værdien for dette felt er {0}",nanText:"{0} er ikke et tilladt nummer"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Inaktiveret",disabledDatesText:"Inaktiveret",minText:"Datoen i dette felt skal være efter {0}",maxText:"Datoen i dette felt skal være før {0}",invalidText:"{0} er ikke en tilladt dato - datoer skal angives i formatet {1}",format:"d/m/y",altFormats:"d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Henter...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Dette felt skal være en email adresse i formatet \"navn@domæne.dk\"",urlText:"Dette felt skal være et link (URL) i formatet \"http:/"+"/www.domæne.dk\"",alphaText:"Dette felt kan kun indeholde bogstaver og \"_\" (understregning)",alphanumText:"Dette felt kan kun indeholde bogstaver, tal og \"_\" (understregning)"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sortér stigende",sortDescText:"Sortér faldende",lockText:"Lås kolonne",unlockText:"Fjern lås fra kolonne",columnsText:"Kolonner"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Navn",valueText:"Værdi",dateFormat:"d/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Træk for at ændre størrelsen.",collapsibleSplitTip:"Træk for at ændre størrelsen. Dobbelt-klik for at skjule."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-da.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-da.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-da.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,172 @@ +/* + * Danish translation + * By JohnF + * 04-09-2007, 05:28 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Henter...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} markerede rækker"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Luk denne fane"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Værdien i dette felt er ikke tilladt"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Henter..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "Marts", + "April", + "Maj", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "December" +]; + +Date.dayNames = [ + "Søndag", + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Fortryd", + yes : "Ja", + no : "Nej" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "I dag", + minText : "Denne dato er før den tidligst tilladte", + maxText : "Denne dato er senere end den senest tilladte", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Næste måned (Ctrl + højre piltast)', + prevText : 'Forrige måned (Ctrl + venstre piltast)', + monthYearText : 'Vælg en måned (Ctrl + op/ned pil for at ændre årstal)', + todayTip : "{0} (mellemrum)", + format : "d/m/y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Side", + afterPageText : "af {0}", + firstText : "Første side", + prevText : "Forrige side", + nextText : "Næste side", + lastText : "Sidste side", + refreshText : "Opfrisk", + displayMsg : "Viser {0} - {1} af {2}", + emptyMsg : 'Der er ingen data at vise' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimum længden for dette felt er {0}", + maxLengthText : "Maksimum længden for dette felt er {0}", + blankText : "Dette felt skal udfyldes", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Mindste-værdien for dette felt er {0}", + maxText : "Maksimum-værdien for dette felt er {0}", + nanText : "{0} er ikke et tilladt nummer" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Inaktiveret", + disabledDatesText : "Inaktiveret", + minText : "Datoen i dette felt skal være efter {0}", + maxText : "Datoen i dette felt skal være før {0}", + invalidText : "{0} er ikke en tilladt dato - datoer skal angives i formatet {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Henter...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dette felt skal være en email adresse i formatet "navn@domæne.dk"', + urlText : 'Dette felt skal være et link (URL) i formatet "http:/'+'/www.domæne.dk"', + alphaText : 'Dette felt kan kun indeholde bogstaver og "_" (understregning)', + alphanumText : 'Dette felt kan kun indeholde bogstaver, tal og "_" (understregning)' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortér stigende", + sortDescText : "Sortér faldende", + lockText : "Lås kolonne", + unlockText : "Fjern lås fra kolonne", + columnsText : "Kolonner" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Navn", + valueText : "Værdi", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Træk for at ændre størrelsen.", + collapsibleSplitTip : "Træk for at ændre størrelsen. Dobbelt-klik for at skjule." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-de-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-de-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-de-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Übertrage Daten ...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} Zeile(n) ausgewählt"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Diesen Tab schließen"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Der Wert des Feldes ist nicht korrekt"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Übertrage Daten..."}Date.monthNames=["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];Date.getShortMonthName=function(A){return Date.monthNames[A].substring(0,3)};Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.getMonthNumber=function(A){return Date.monthNumbers[A.substring(0,1).toUpperCase()+A.substring(1,3).toLowerCase()]};Date.dayNames=["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"];Date.getShortDayName=function(A){return Date.dayNames[A].substring(0,3)};if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Abbrechen",yes:"Ja",no:"Nein"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d.m.Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Heute",minText:"Dieses Datum liegt von dem erstmöglichen Datum",maxText:"Dieses Datum liegt nach dem letztmöglichen Datum",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Nächster Monat (Strg/Control + Rechts)",prevText:"Vorheriger Monat (Strg/Control + Links)",monthYearText:"Monat auswählen (Strg/Control + Hoch/Runter, um ein Jahr auszuwählen)",todayTip:"Heute ({0}) (Leertaste)",format:"d.m.Y",okText:" OK ",cancelText:"Abbrechen",startDay:0})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Seite",afterPageText:"von {0}",firstText:"Erste Seite",prevText:"vorherige Seite",nextText:"nächste Seite",lastText:"letzte Seite",refreshText:"Aktualisieren",displayMsg:"Anzeige Eintrag {0} - {1} von {2}",emptyMsg:"Keine Daten vorhanden"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Bitte geben Sie mindestens {0} Zeichen ein",maxLengthText:"Bitte geben Sie maximal {0} Zeichen ein",blankText:"Dieses Feld darf nicht leer sein",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Der Mindestwert für dieses Feld ist {0}",maxText:"Der Maximalwert für dieses Feld ist {0}",nanText:"{0} ist keine Zahl"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"nicht erlaubt",disabledDatesText:"nicht erlaubt",minText:"Das Datum in diesem Feld muß nach dem {0} liegen",maxText:"Das Datum in diesem Feld muß vor dem {0} liegen",invalidText:"{0} ist kein valides Datum - es muß im Format {1} eingegeben werden",format:"d.m.Y",altFormats:"d.m.Y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Lade Daten ...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Dieses Feld sollte eine E-Mail-Adresse enthalten. Format: \"user@domain.com\"",urlText:"Dieses Feld sollte eine URL enthalten. Format: \"http:/"+"/www.domain.com\"",alphaText:"Dieses Feld darf nur Buchstaben enthalten und _",alphanumText:"Dieses Feld darf nur Buchstaben und Zahlen enthalten und _"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Bitte geben Sie die URL für den Link ein:",buttonTips:{bold:{title:"Fett (Ctrl+B)",text:"Erstellt den ausgewählten Text in Fettschrift.",cls:"x-html-editor-tip"},italic:{title:"Kursiv (Ctrl+I)",text:"Erstellt den ausgewählten Text in Schrägschrift.",cls:"x-html-editor-tip"},underline:{title:"Unterstrichen (Ctrl+U)",text:"Unterstreicht den ausgewählten Text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Text vergößern",text:"Erhöht die Schriftgröße.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Text verkleinern",text:"Verringert die Schriftgröße.",cls:"x-html-editor-tip"},backcolor:{title:"Text farblich hervorheben",text:"Hintergrundfarbe des ausgewählten Textes ändern.",cls:"x-html-editor-tip"},forecolor:{title:"Schriftfarbe",text:"Farbe des ausgewählten Textes ändern.",cls:"x-html-editor-tip"},justifyleft:{title:"Linksbündig",text:"Setzt den Text linksbündig.",cls:"x-html-editor-tip"},justifycenter:{title:"Zentrieren",text:"Zentriert den Text in Editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Aufzählungsliste",text:"Beginnt eine Aufzählungsliste mit Spiegelstrichen.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numerierte Liste",text:"Beginnt eine numerierte Liste.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Erstellt einen Hyperlink aus dem ausgewählten text.",cls:"x-html-editor-tip"},sourceedit:{title:"Source bearbeiten",text:"Zur Bearbeitung des Quelltextes wechseln.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Aufsteigend sortieren",sortDescText:"Absteigend sortieren",lockText:"Spalte sperren",unlockText:"Spalte freigeben (entsperren)",columnsText:"Spalten"})}if(Ext.grid.GroupingView){Ext.apply(Ext.grid.GroupingView.prototype,{emptyGroupText:"(Keine)",groupByText:"Dieses Feld gruppieren",showGroupsText:"In Gruppen anzeigen"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Name",valueText:"Wert",dateFormat:"d.m.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Ziehen, um Größe zu ändern.",collapsibleSplitTip:"Ziehen, um Größe zu ändern. Doppelklick um Panel auszublenden."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-de.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-de.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,289 @@ +/* + * German translation + * By schmidetzki and humpdi + * 04-07-2007 + * Updated by wm003 10-31-2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Übertrage Daten ...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} Zeile(n) ausgewählt"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Diesen Tab schließen"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Der Wert des Feldes ist nicht korrekt"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Übertrage Daten..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "März", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" +]; + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +}; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +}; + +Date.dayNames = [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" +]; + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +}; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Abbrechen", + yes : "Ja", + no : "Nein" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Heute", + minText : "Dieses Datum liegt von dem erstmöglichen Datum", + maxText : "Dieses Datum liegt nach dem letztmöglichen Datum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : "Nächster Monat (Strg/Control + Rechts)", + prevText : "Vorheriger Monat (Strg/Control + Links)", + monthYearText : "Monat auswählen (Strg/Control + Hoch/Runter, um ein Jahr auszuwählen)", + todayTip : "Heute ({0}) (Leertaste)", + format : "d.m.Y", + okText : " OK ", + cancelText : "Abbrechen", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Seite", + afterPageText : "von {0}", + firstText : "Erste Seite", + prevText : "vorherige Seite", + nextText : "nächste Seite", + lastText : "letzte Seite", + refreshText : "Aktualisieren", + displayMsg : "Anzeige Eintrag {0} - {1} von {2}", + emptyMsg : "Keine Daten vorhanden" + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Bitte geben Sie mindestens {0} Zeichen ein", + maxLengthText : "Bitte geben Sie maximal {0} Zeichen ein", + blankText : "Dieses Feld darf nicht leer sein", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Der Mindestwert für dieses Feld ist {0}", + maxText : "Der Maximalwert für dieses Feld ist {0}", + nanText : "{0} ist keine Zahl" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "nicht erlaubt", + disabledDatesText : "nicht erlaubt", + minText : "Das Datum in diesem Feld muß nach dem {0} liegen", + maxText : "Das Datum in diesem Feld muß vor dem {0} liegen", + invalidText : "{0} ist kein valides Datum - es muß im Format {1} eingegeben werden", + format : "d.m.Y", + altFormats : "d.m.Y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Lade Daten ...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dieses Feld sollte eine E-Mail-Adresse enthalten. Format: "user@domain.com"', + urlText : 'Dieses Feld sollte eine URL enthalten. Format: "http:/'+'/www.domain.com"', + alphaText : 'Dieses Feld darf nur Buchstaben enthalten und _', + alphanumText : 'Dieses Feld darf nur Buchstaben und Zahlen enthalten und _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Bitte geben Sie die URL für den Link ein:', + buttonTips : { + bold : { + title: 'Fett (Ctrl+B)', + text: 'Erstellt den ausgewählten Text in Fettschrift.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Kursiv (Ctrl+I)', + text: 'Erstellt den ausgewählten Text in Schrägschrift.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Unterstrichen (Ctrl+U)', + text: 'Unterstreicht den ausgewählten Text.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Text vergößern', + text: 'Erhöht die Schriftgröße.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Text verkleinern', + text: 'Verringert die Schriftgröße.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Text farblich hervorheben', + text: 'Hintergrundfarbe des ausgewählten Textes ändern.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Schriftfarbe', + text: 'Farbe des ausgewählten Textes ändern.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Linksbündig', + text: 'Setzt den Text linksbündig.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Zentrieren', + text: 'Zentriert den Text in Editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Align Text Right', + text: 'Align text to the right.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Aufzählungsliste', + text: 'Beginnt eine Aufzählungsliste mit Spiegelstrichen.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Numerierte Liste', + text: 'Beginnt eine numerierte Liste.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Erstellt einen Hyperlink aus dem ausgewählten text.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Source bearbeiten', + text: 'Zur Bearbeitung des Quelltextes wechseln.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Aufsteigend sortieren", + sortDescText : "Absteigend sortieren", + lockText : "Spalte sperren", + unlockText : "Spalte freigeben (entsperren)", + columnsText : "Spalten" + }); +} + +if(Ext.grid.GroupingView){ + Ext.apply(Ext.grid.GroupingView.prototype, { + emptyGroupText : '(Keine)', + groupByText : 'Dieses Feld gruppieren', + showGroupsText : 'In Gruppen anzeigen' + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Name", + valueText : "Wert", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Ziehen, um Größe zu ändern.", + collapsibleSplitTip : "Ziehen, um Größe zu ändern. Doppelklick um Panel auszublenden." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-el_GR-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-el_GR-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-el_GR-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Μεταφό�?τωση δεδομ�νων...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} Επιλεγμ�νες σει�?�ς"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Κλείστε το tab"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Το πε�?ιεχόμενο του πεδίου δεν είναι αποδεκτό"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Μεταφό�?τωση δεδομ�νων..."}Date.monthNames=["Ιανουά�?ιος","Φεβ�?ουά�?ιος","Μά�?τιος","Απ�?ίλιος","Μάιος","Ιο�?νιος","Ιο�?λιος","Α�?γουστος","Σεπτ�μβ�?ιος","Οκτώβ�?ιος","�?ο�μβ�?ιος","Δεκ�μβ�?ιος"];Date.dayNames=["Κυ�?ιακή","Δευτ��?α","Τ�?ίτη","Τετά�?τη","Π�μπτη","Πα�?ασκευή","Σάββατο"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Άκυ�?ο",yes:"�?αι",no:"Όχι"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Σήμε�?α",minText:"Η Ημε�?ομηνία είναι π�?ογεν�στε�?η από την παλαιότε�?η αποδεκτή",maxText:"Η Ημε�?ομηνία είναι μεταγεν�στε�?η από την νεότε�?η αποδεκτή",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Επόμενος Μήνας (Control+Δεξί Β�λος)",prevText:"Π�?οηγο�?μενος Μήνας (Control + Α�?ιστε�?ό Β�λος)",monthYearText:"Επιλογή Μηνός (Control + Επάνω/Κάτω Β�λος για μεταβολή ετών)",todayTip:"{0} (ΠΛήκτ�?ο Διαστήματος)",format:"d/m/y"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Σελίδα",afterPageText:"από {0}",firstText:"Π�?ώτη Σελίδα",prevText:"Π�?οηγο�?μενη Σελίδα",nextText:"Επόμενη Σελίδα",lastText:"Τελευταία Σελίδα",refreshText:"Αναν�ωση",displayMsg:"Εμφάνιση {0} - {1} από {2}",emptyMsg:"Δεν υπά�?χουν δεδομ�να"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Το μικ�?ότε�?ο αποδεκτό μήκος για το πεδίο είναι {0}",maxLengthText:"Το μεγαλ�?τε�?ο αποδεκτό μήκος για το πεδίο είναι {0}",blankText:"Το πεδίο είναι υποχ�?εωτικό",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Η μικ�?ότε�?η τιμή του πεδίου είναι {0}",maxText:"Η μεγαλ�?τε�?η τιμή του πεδίου είναι {0}",nanText:"{0} δεν είναι αποδεκτός α�?ιθμός"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Ανενε�?γό",disabledDatesText:"Ανενε�?γό",minText:"Η ημε�?ομηνία αυτο�? του πεδίου π�?�πει να είναι μετά την {0}",maxText:"Η ημε�?ομηνία αυτο�? του πεδίου π�?�πει να είναι π�?ιν την {0}",invalidText:"{0} δεν είναι �γκυ�?η ημε�?ομηνία - π�?�πει να είναι στη μο�?φή {1}",format:"d/m/y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Μεταφό�?τωση δεδομ�νων...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Το πεδίο δ�χεται μόνο διευθ�?νσεις Email σε μο�?φή \"user@domain.com\"",urlText:"Το πεδίο δ�χεται μόνο URL σε μο�?φή \"http:/"+"/www.domain.com\"",alphaText:"Το πεδίο δ�χεται μόνο χα�?ακτή�?ες και _",alphanumText:"Το πεδίο δ�χεται μόνο χα�?ακτή�?ες, α�?ιθμο�?ς και _"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Δώστε τη διε�?θυνση (URL) για το σ�?νδεσμο (link):",buttonTips:{bold:{title:"Έντονα (Ctrl+B)",text:"Κάνετε το π�?οεπιλεγμ�νο κείμενο �ντονο.",cls:"x-html-editor-tip"},italic:{title:"Πλάγια (Ctrl+I)",text:"Κάνετε το π�?οεπιλεγμ�νο κείμενο πλάγιο.",cls:"x-html-editor-tip"},underline:{title:"Υπογ�?άμμιση (Ctrl+U)",text:"Υπογ�?αμμίζετε το π�?οεπιλεγμ�νο κείμενο.",cls:"x-html-editor-tip"},increasefontsize:{title:"Μεγ�θυνση κειμ�νου",text:"Μεγαλώνετε τη γ�?αμματοσει�?ά.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Σμίκ�?υνση κειμ�νου",text:"Μικ�?αίνετε τη γ�?αμματοσει�?ά.",cls:"x-html-editor-tip"},backcolor:{title:"Χ�?ώμα Φόντου Κειμ�νου",text:"Αλλάζετε το χ�?ώμα στο φόντο του π�?οεπιλεγμ�νου κειμ�νου.",cls:"x-html-editor-tip"},forecolor:{title:"Χ�?ώμα Γ�?αμματοσει�?άς",text:"Αλλάζετε το χ�?ώμα στη γ�?αμματοσει�?ά του π�?οεπιλεγμ�νου κειμ�νου.",cls:"x-html-editor-tip"},justifyleft:{title:"Α�?ιστε�?ή Στοίχιση Κειμ�νου",text:"Στοιχίζετε το κείμενο στα α�?ιστε�?ά.",cls:"x-html-editor-tip"},justifycenter:{title:"Κεντ�?ά�?ισμα Κειμ�νου",text:"Στοιχίζετε το κείμενο στο κ�ντ�?ο.",cls:"x-html-editor-tip"},justifyright:{title:"Δεξιά Στοίχιση Κειμ�νου",text:"Στοιχίζετε το κείμενο στα δεξιά.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Εισαγωγή Λίστας Κουκίδων",text:"Ξεκινήστε μια λίστα με κουκίδες.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Εισαγωγή Λίστας Α�?ίθμησης",text:"Ξεκινήστε μια λίστα με α�?ίθμηση.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Μετατ�?�πετε το π�?οεπιλεγμ�νο κείμενο σε Link.",cls:"x-html-editor-tip"},sourceedit:{title:"Επεξε�?γασία Κώδικα",text:"Μεταβαίνετε στη λειτου�?γία επεξε�?γασίας κώδικα.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Α�?ξουσα ταξινόμηση",sortDescText:"Φθίνουσα ταξινόμηση",lockText:"Κλείδωμα στήλης",unlockText:"Ξεκλείδωμα στήλης",columnsText:"Στήλες"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Όνομα",valueText:"Πε�?ιεχόμενο",dateFormat:"m/d/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Σ�?�?ετε για αλλαγή μεγ�θους.",collapsibleSplitTip:"Σ�?�?ετε για αλλαγή μεγ�θους. Διπλό κλικ για απόκ�?υψη."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-el_GR.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-el_GR.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-el_GR.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,254 @@ +/** + * Greek translation + * By thesilentman (utf8 encoding) + * 22 Sep 2007 + * + * Changes since previous (first) Version: + * - HTMLEditor Translation + * - some minor corrections + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Μεταφόρτωση δεδομένων...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} Επιλεγμένες σειρές"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Κλείστε το tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Το περιεχόμενο του πεδίου δεν είναι αποδεκτό"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Μεταφόρτωση δεδομένων..."; +} + +Date.monthNames = [ + "Ιανουάριος", + "Φεβρουάριος", + "Μάρτιος", + "Απρίλιος", + "Μάιος", + "Ιούνιος", + "Ιούλιος", + "Αύγουστος", + "Σεπτέμβριος", + "Οκτώβριος", + "Νοέμβριος", + "Δεκέμβριος" +]; + +Date.dayNames = [ + "Κυριακή", + "Δευτέρα", + "Τρίτη", + "Τετάρτη", + "Πέμπτη", + "Παρασκευή", + "Σάββατο" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Άκυρο", + yes : "Ναι", + no : "Όχι" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Σήμερα", + minText : "Η Ημερομηνία είναι προγενέστερη από την παλαιότερη αποδεκτή", + maxText : "Η Ημερομηνία είναι μεταγενέστερη από την νεότερη αποδεκτή", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Επόμενος Μήνας (Control+Δεξί Βέλος)', + prevText : 'Προηγούμενος Μήνας (Control + Αριστερό Βέλος)', + monthYearText : 'Επιλογή Μηνός (Control + Επάνω/Κάτω Βέλος για μεταβολή ετών)', + todayTip : "{0} (ΠΛήκτρο Διαστήματος)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Σελίδα", + afterPageText : "από {0}", + firstText : "Πρώτη Σελίδα", + prevText : "Προηγούμενη Σελίδα", + nextText : "Επόμενη Σελίδα", + lastText : "Τελευταία Σελίδα", + refreshText : "Ανανέωση", + displayMsg : "Εμφάνιση {0} - {1} από {2}", + emptyMsg : 'Δεν υπάρχουν δεδομένα' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Το μικρότερο αποδεκτό μήκος για το πεδίο είναι {0}", + maxLengthText : "Το μεγαλύτερο αποδεκτό μήκος για το πεδίο είναι {0}", + blankText : "Το πεδίο είναι υποχρεωτικό", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Η μικρότερη τιμή του πεδίου είναι {0}", + maxText : "Η μεγαλύτερη τιμή του πεδίου είναι {0}", + nanText : "{0} δεν είναι αποδεκτός αριθμός" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Ανενεργό", + disabledDatesText : "Ανενεργό", + minText : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι μετά την {0}", + maxText : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι πριν την {0}", + invalidText : "{0} δεν είναι έγκυρη ημερομηνία - πρέπει να είναι στη μορφή {1}", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Μεταφόρτωση δεδομένων...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Το πεδίο δέχεται μόνο διευθύνσεις Email σε μορφή "user@domain.com"', + urlText : 'Το πεδίο δέχεται μόνο URL σε μορφή "http:/'+'/www.domain.com"', + alphaText : 'Το πεδίο δέχεται μόνο χαρακτήρες και _', + alphanumText : 'Το πεδίο δέχεται μόνο χαρακτήρες, αριθμούς και _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Δώστε τη διεύθυνση (URL) για το σύνδεσμο (link):', + buttonTips : { + bold : { + title: 'Έντονα (Ctrl+B)', + text: 'Κάνετε το προεπιλεγμένο κείμενο έντονο.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Πλάγια (Ctrl+I)', + text: 'Κάνετε το προεπιλεγμένο κείμενο πλάγιο.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Υπογράμμιση (Ctrl+U)', + text: 'Υπογραμμίζετε το προεπιλεγμένο κείμενο.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Μεγέθυνση κειμένου', + text: 'Μεγαλώνετε τη γραμματοσειρά.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Σμίκρυνση κειμένου', + text: 'Μικραίνετε τη γραμματοσειρά.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Χρώμα Φόντου Κειμένου', + text: 'Αλλάζετε το χρώμα στο φόντο του προεπιλεγμένου κειμένου.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Χρώμα Γραμματοσειράς', + text: 'Αλλάζετε το χρώμα στη γραμματοσειρά του προεπιλεγμένου κειμένου.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Αριστερή Στοίχιση Κειμένου', + text: 'Στοιχίζετε το κείμενο στα αριστερά.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Κεντράρισμα Κειμένου', + text: 'Στοιχίζετε το κείμενο στο κέντρο.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Δεξιά Στοίχιση Κειμένου', + text: 'Στοιχίζετε το κείμενο στα δεξιά.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Εισαγωγή Λίστας Κουκίδων', + text: 'Ξεκινήστε μια λίστα με κουκίδες.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Εισαγωγή Λίστας Αρίθμησης', + text: 'Ξεκινήστε μια λίστα με αρίθμηση.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Μετατρέπετε το προεπιλεγμένο κείμενο σε Link.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Επεξεργασία Κώδικα', + text: 'Μεταβαίνετε στη λειτουργία επεξεργασίας κώδικα.', + cls: 'x-html-editor-tip' + } + } + }); +} + + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Αύξουσα ταξινόμηση", + sortDescText : "Φθίνουσα ταξινόμηση", + lockText : "Κλείδωμα στήλης", + unlockText : "Ξεκλείδωμα στήλης", + columnsText : "Στήλες" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Όνομα", + valueText : "Περιεχόμενο", + dateFormat : "m/d/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Σύρετε για αλλαγή μεγέθους.", + collapsibleSplitTip : "Σύρετε για αλλαγή μεγέθους. Διπλό κλικ για απόκρυψη." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Loading...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} selected row(s)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Close this tab"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="The value in this field is invalid"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Loading..."}Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.getShortMonthName=function(A){return Date.monthNames[A].substring(0,3)};Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.getMonthNumber=function(A){return Date.monthNumbers[A.substring(0,1).toUpperCase()+A.substring(1,3).toLowerCase()]};Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.getShortDayName=function(A){return Date.dayNames[A].substring(0,3)};if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"m/d/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Today",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"",disabledDatesText:"",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)",todayTip:"{0} (Spacebar)",format:"m/d/y",okText:" OK ",cancelText:"Cancel",startDay:0})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{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"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be after {0}",maxText:"The date in this field must be before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Loading...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"This field should be an e-mail address in the format \"user@domain.com\"",urlText:"This field should be a URL in the format \"http:/"+"/www.domain.com\"",alphaText:"This field should only contain letters and _",alphanumText:"This field should only contain letters, numbers and _"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Please enter the URL for the link:",buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns"})}if(Ext.grid.GroupingView){Ext.apply(Ext.grid.GroupingView.prototype,{emptyGroupText:"(None)",groupByText:"Group By This Field",showGroupsText:"Show in Groups"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,288 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * English Translations + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Loading...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} selected row(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Close this tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "The value in this field is invalid"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Loading..."; +} + +Date.monthNames = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +}; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +}; + +Date.dayNames = [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" +]; + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +}; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Cancel", + yes : "Yes", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m/d/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Today", + minText : "This date is before the minimum date", + maxText : "This date is after the maximum date", + disabledDaysText : "", + disabledDatesText : "", + 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)', + todayTip : "{0} (Spacebar)", + format : "m/d/y", + okText : " OK ", + cancelText : "Cancel", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "of {0}", + firstText : "First Page", + prevText : "Previous Page", + nextText : "Next Page", + lastText : "Last Page", + refreshText : "Refresh", + displayMsg : "Displaying {0} - {1} of {2}", + emptyMsg : 'No data to display' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "The minimum length for this field is {0}", + maxLengthText : "The maximum length for this field is {0}", + blankText : "This field is required", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + 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" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Disabled", + disabledDatesText : "Disabled", + minText : "The date in this field must be after {0}", + maxText : "The date in this field must be before {0}", + invalidText : "{0} is not a valid date - it must be in the format {1}", + format : "m/d/y", + altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Loading...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'This field should be an e-mail address in the format "user@domain.com"', + urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + alphaText : 'This field should only contain letters and _', + alphanumText : 'This field should only contain letters, numbers and _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Please enter the URL for the link:', + buttonTips : { + bold : { + title: 'Bold (Ctrl+B)', + text: 'Make the selected text bold.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italic (Ctrl+I)', + text: 'Make the selected text italic.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Underline (Ctrl+U)', + text: 'Underline the selected text.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Grow Text', + text: 'Increase the font size.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Shrink Text', + text: 'Decrease the font size.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Text Highlight Color', + text: 'Change the background color of the selected text.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Font Color', + text: 'Change the color of the selected text.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Align Text Left', + text: 'Align text to the left.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Center Text', + text: 'Center text in the editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Align Text Right', + text: 'Align text to the right.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Bullet List', + text: 'Start a bulleted list.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Numbered List', + text: 'Start a numbered list.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Make the selected text a hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Source Edit', + text: 'Switch to source editing mode.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sort Ascending", + sortDescText : "Sort Descending", + lockText : "Lock Column", + unlockText : "Unlock Column", + columnsText : "Columns" + }); +} + +if(Ext.grid.GroupingView){ + Ext.apply(Ext.grid.GroupingView.prototype, { + emptyGroupText : '(None)', + groupByText : 'Group By This Field', + showGroupsText : 'Show in Groups' + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Name", + valueText : "Value", + dateFormat : "m/j/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Drag to resize.", + collapsibleSplitTip : "Drag to resize. Double click to hide." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en_UK-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en_UK-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en_UK-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Loading...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} selected row(s)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Close this tab"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="The value in this field is invalid"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Loading..."}Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Today",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"",disabledDatesText:"",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)",todayTip:"{0} (Spacebar)",format:"d/m/y"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{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"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be after {0}",maxText:"The date in this field must be before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",format:"d/m/y",altFormats:"d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Loading...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"This field should be an e-mail address in the format \"user@domain.com\"",urlText:"This field should be a URL in the format \"http:/"+"/www.domain.com\"",alphaText:"This field should only contain letters and _",alphanumText:"This field should only contain letters, numbers and _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Name",valueText:"Value",dateFormat:"j/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en_UK.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en_UK.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-en_UK.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,173 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * English (UK) Translations + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Loading...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} selected row(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Close this tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "The value in this field is invalid"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Loading..."; +} + +Date.monthNames = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; + +Date.dayNames = [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Cancel", + yes : "Yes", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Today", + minText : "This date is before the minimum date", + maxText : "This date is after the maximum date", + disabledDaysText : "", + disabledDatesText : "", + 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)', + todayTip : "{0} (Spacebar)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "of {0}", + firstText : "First Page", + prevText : "Previous Page", + nextText : "Next Page", + lastText : "Last Page", + refreshText : "Refresh", + displayMsg : "Displaying {0} - {1} of {2}", + emptyMsg : 'No data to display' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "The minimum length for this field is {0}", + maxLengthText : "The maximum length for this field is {0}", + blankText : "This field is required", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + 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" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Disabled", + disabledDatesText : "Disabled", + minText : "The date in this field must be after {0}", + maxText : "The date in this field must be before {0}", + invalidText : "{0} is not a valid date - it must be in the format {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Loading...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'This field should be an e-mail address in the format "user@domain.com"', + urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + alphaText : 'This field should only contain letters and _', + alphanumText : 'This field should only contain letters, numbers and _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sort Ascending", + sortDescText : "Sort Descending", + lockText : "Lock Column", + unlockText : "Unlock Column", + columnsText : "Columns" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Name", + valueText : "Value", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Drag to resize.", + collapsibleSplitTip : "Drag to resize. Double click to hide." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fa-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fa-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fa-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      در �ال بارگذاری ...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} رکورد انتخاب شده"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="بستن"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="مقدار �?یلد ص�ی� نیست"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="در �ال بارگذاری ..."}Date.monthNames=["ژانویه","�?وریه","مارس","آپریل","می","ژوئن","جولای","آگوست","سپتامبر","اکتبر","نوامبر","دسامبر"];Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.dayNames=["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"تایید",cancel:"بازگشت",yes:"بله",no:"خیر"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"Y/m/d")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"امروز",minText:"این تاریخ قبل از م�دوده مجاز است",maxText:"این تاریخ پس از م�دوده مجاز است",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"ماه بعد (Control + Right)",prevText:"ماه قبل (Control+Left)",monthYearText:"یک ماه را انتخاب کنید (Control+Up/Down برای انتقال در سال)",todayTip:"{0} (Spacebar)",format:"y/m/d",okText:" OK ",cancelText:"Cancel",startDay:0})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"ص�?�ه",afterPageText:"از {0}",firstText:"ص�?�ه اول",prevText:"ص�?�ه قبل",nextText:"ص�?�ه بعد",lastText:"ص�?�ه آخر",refreshText:"بازخوانی",displayMsg:"نمایش {0} - {1} of {2}",emptyMsg:"داده ای برای نمایش وجود ندارد"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"�داقل طول این �?یلد برابر است با {0}",maxLengthText:"�داکثر طول این �?یلد برابر است با {0}",blankText:"این �?یلد باید مقداری داشته باشد",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"�داقل مقدار این �?یلد برابر است با {0}",maxText:"�داکثر مقدار این �?یلد برابر است با {0}",nanText:"{0} یک عدد نیست"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"غیر�?عال",disabledDatesText:"غیر�?عال",minText:"تاریخ باید پس از {0} باشد",maxText:"تاریخ باید پس از {0} باشد",invalidText:"{0} تاریخ ص�ی�ی نیست - �?رمت ص�ی� {1}",format:"y/m/d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"در �ال بارگذاری ...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"مقدار این �?یلد باید یک ایمیل با این �?رمت باشد \"user@domain.com\"",urlText:"مقدار این آدرس باید یک آدرس سایت با این �?رمت باشد \"http:/"+"/www.domain.com\"",alphaText:"مقدار این �?یلد باید �?قط از �رو�? ال�?با و _ تشکیل شده باشد ",alphanumText:"مقدار این �?یلد باید �?قط از �رو�? ال�?با، اعداد و _ تشکیل شده باشد"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"لط�?ا آدرس لینک را وارد کنید:",buttonTips:{bold:{title:"تیره (Ctrl+B)",text:"متن انتخاب شده را تیره می کند.",cls:"x-html-editor-tip"},italic:{title:"ایتالیک (Ctrl+I)",text:"متن انتخاب شده را ایتالیک می کند.",cls:"x-html-editor-tip"},underline:{title:"زیرخط (Ctrl+U)",text:"زیر هر نوشته یک خط نمایش می دهد.",cls:"x-html-editor-tip"},increasefontsize:{title:"ا�?زایش اندازه",text:"اندازه �?ونت را ا�?زایش می دهد.",cls:"x-html-editor-tip"},decreasefontsize:{title:"کاهش اندازه",text:"اندازه متن را کاهش می دهد.",cls:"x-html-editor-tip"},backcolor:{title:"رنگ زمینه متن",text:"برای تغییر رنگ زمینه متن است�?اده می شود.",cls:"x-html-editor-tip"},forecolor:{title:"رنگ قلم",text:"رنگ قلم متن را تغییر می دهد.",cls:"x-html-editor-tip"},justifyleft:{title:"چیدن متن از سمت چپ",text:"متن از سمت چپ چیده شده می شود.",cls:"x-html-editor-tip"},justifycenter:{title:"متن در وسط ",text:"نمایش متن در قسمت وسط ص�?�ه و رعابت سمت چپ و راست.",cls:"x-html-editor-tip"},justifyright:{title:"چیدن متن از سمت راست",text:"متن از سمت راست پیده خواهد شد.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"لیست همراه با علامت",text:"یک لیست جدید ایجاد می کند.",cls:"x-html-editor-tip"},insertorderedlist:{title:"لیست عددی",text:"یک لیست عددی ایجاد می کند. ",cls:"x-html-editor-tip"},createlink:{title:"لینک",text:"متن انتخاب شده را به لینک تبدیل کنید.",cls:"x-html-editor-tip"},sourceedit:{title:"ویرایش سورس",text:"ر�?تن به �الت ویرایش سورس.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"مرتب سازی ا�?زایشی",sortDescText:"مرتب سازی کاهشی",lockText:"ق�?ل ستون ها",unlockText:"بازکردن ستون ها",columnsText:"ستون ها"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"نام",valueText:"مقدار",dateFormat:"Y/m/d"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"درگ برای تغییر اندازه.",collapsibleSplitTip:"برای تغییر اندازه درگ کنید."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      En cours de chargement...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} ligne(s) sélectionné(s)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Fermer cet onglet"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="La valeur de ce champ est invalide"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="En cours de chargement..."}Date.monthNames=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"];Date.dayNames=["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Annuler",yes:"Oui",no:"Non"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Aujourd'hui",minText:"Cette date est plus petite que la date minimum",maxText:"Cette date est plus grande que la date maximum",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Prochain mois (CTRL+Fléche droite)",prevText:"Mois précédent (CTRL+Fléche gauche)",monthYearText:"Choisissez un mois (CTRL+Fléche haut ou bas pour changer d'année.)",todayTip:"{0} (Barre d'espace)",okText:" OK ",cancelText:"Annuler",format:"d/m/y",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Page",afterPageText:"sur {0}",firstText:"Première page",prevText:"Page précédente",nextText:"Page suivante",lastText:"Dernière page",refreshText:"Actualiser la page",displayMsg:"Page courante {0} - {1} sur {2}",emptyMsg:"Aucune donnée à afficher"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"La longueur minimum de ce champ est de {0} caractères",maxLengthText:"La longueur maximum de ce champ est de {0} caractères",blankText:"Ce champ est obligatoire",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"La valeur minimum de ce champ doit être de {0}",maxText:"La valeur maximum de ce champ doit être de {0}",nanText:"{0} n'est pas un nombre valide"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Désactivé",disabledDatesText:"Désactivé",minText:"La date de ce champ doit être avant le {0}",maxText:"La date de ce champ doit être après le {0}",invalidText:"{0} n'est pas une date valide - elle doit être au format suivant: {1}",format:"d/m/y",altFormats:"d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"En cours de chargement...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Ce champ doit contenir une adresse email au format: \"usager@domaine.com\"",urlText:"Ce champ doit contenir une URL au format suivant: \"http:/"+"/www.domaine.com\"",alphaText:"Ce champ ne peut contenir que des lettres et le caractère souligné (_)",alphanumText:"Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Veuillez entrer l'URL pour ce lien:",buttonTips:{bold:{title:"Gras (Ctrl+B)",text:"Met le texte sélectionné en gras.",cls:"x-html-editor-tip"},italic:{title:"Italique (Ctrl+I)",text:"Met le texte sélectionné en italique.",cls:"x-html-editor-tip"},underline:{title:"Souligné (Ctrl+U)",text:"Souligne le texte sélectionné.",cls:"x-html-editor-tip"},increasefontsize:{title:"Agrandir la police",text:"Augmente la taille de la police.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Réduire la police",text:"Réduit la taille de la police.",cls:"x-html-editor-tip"},backcolor:{title:"Couleur de surbrillance",text:"Modifie la couleur de fond du texte sélectionné.",cls:"x-html-editor-tip"},forecolor:{title:"Couleur de police",text:"Modifie la couleur du texte sélectionné.",cls:"x-html-editor-tip"},justifyleft:{title:"Aligner à gauche",text:"Aligne le texte à gauche.",cls:"x-html-editor-tip"},justifycenter:{title:"Centrer",text:"Centre le texte.",cls:"x-html-editor-tip"},justifyright:{title:"Aligner à droite",text:"Aligner le texte à droite.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Liste à puce",text:"Démarre une liste à puce.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Liste numérotée",text:"Démarre une liste numérotée.",cls:"x-html-editor-tip"},createlink:{title:"Lien hypertexte",text:"Transforme en lien hypertexte.",cls:"x-html-editor-tip"},sourceedit:{title:"Code source",text:"Basculer en mode édition du code source.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Tri croissant",sortDescText:"Tri décroissant",lockText:"Verrouiller la colonne",unlockText:"Déverrouiller la colonne",columnsText:"Colonnes"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Propriété",valueText:"Valeur",dateFormat:"d/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Cliquer et glisser pour redimensionner le panneau.",collapsibleSplitTip:"Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour le cacher."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,252 @@ +/* + * France (France) translation + * By Perrich + * 06-08-2007, 09:07 PM + */ + +Ext.UpdateManager.defaults.indicatorText = '
      En cours de chargement...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} ligne(s) sélectionné(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fermer cet onglet"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "En cours de chargement..."; +} + +Date.monthNames = [ + "Janvier", + "Février", + "Mars", + "Avril", + "Mai", + "Juin", + "Juillet", + "Août", + "Septembre", + "Octobre", + "Novembre", + "Décembre" +]; + +Date.dayNames = [ + "Dimanche", + "Lundi", + "Mardi", + "Mercredi", + "Jeudi", + "Vendredi", + "Samedi" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annuler", + yes : "Oui", + no : "Non" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Aujourd'hui", + minText : "Cette date est plus petite que la date minimum", + maxText : "Cette date est plus grande que la date maximum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Prochain mois (CTRL+Fléche droite)', + prevText : "Mois précédent (CTRL+Fléche gauche)", + monthYearText : "Choisissez un mois (CTRL+Fléche haut ou bas pour changer d\'année.)", + todayTip : "{0} (Barre d'espace)", + okText : " OK ", + cancelText : "Annuler", + format : "d/m/y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "sur {0}", + firstText : "Première page", + prevText : "Page précédente", + nextText : "Page suivante", + lastText : "Dernière page", + refreshText : "Actualiser la page", + displayMsg : "Page courante {0} - {1} sur {2}", + emptyMsg : 'Aucune donnée à afficher' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "La longueur minimum de ce champ est de {0} caractères", + maxLengthText : "La longueur maximum de ce champ est de {0} caractères", + blankText : "Ce champ est obligatoire", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "La valeur minimum de ce champ doit être de {0}", + maxText : "La valeur maximum de ce champ doit être de {0}", + nanText : "{0} n'est pas un nombre valide" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Désactivé", + disabledDatesText : "Désactivé", + minText : "La date de ce champ doit être avant le {0}", + maxText : "La date de ce champ doit être après le {0}", + invalidText : "{0} n'est pas une date valide - elle doit être au format suivant: {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "En cours de chargement...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ce champ doit contenir une adresse email au format: "usager@domaine.com"', + urlText : 'Ce champ doit contenir une URL au format suivant: "http:/'+'/www.domaine.com"', + alphaText : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', + alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : "Veuillez entrer l'URL pour ce lien:", + buttonTips : { + bold : { + title: 'Gras (Ctrl+B)', + text: 'Met le texte sélectionné en gras.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italique (Ctrl+I)', + text: 'Met le texte sélectionné en italique.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Souligné (Ctrl+U)', + text: 'Souligne le texte sélectionné.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Agrandir la police', + text: 'Augmente la taille de la police.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Réduire la police', + text: 'Réduit la taille de la police.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Couleur de surbrillance', + text: 'Modifie la couleur de fond du texte sélectionné.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Couleur de police', + text: 'Modifie la couleur du texte sélectionné.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Aligner à gauche', + text: 'Aligne le texte à gauche.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centrer', + text: 'Centre le texte.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Aligner à droite', + text: 'Aligner le texte à droite.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Liste à puce', + text: 'Démarre une liste à puce.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Liste numérotée', + text: 'Démarre une liste numérotée.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Lien hypertexte', + text: 'Transforme en lien hypertexte.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Code source', + text: 'Basculer en mode édition du code source.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Tri croissant", + sortDescText : "Tri décroissant", + lockText : "Verrouiller la colonne", + unlockText : "Déverrouiller la colonne", + columnsText : "Colonnes" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Propriété", + valueText : "Valeur", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Cliquer et glisser pour redimensionner le panneau.", + collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour le cacher." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr_CA-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr_CA-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr_CA-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr_CA.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr_CA.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-fr_CA.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,170 @@ +/* + * France (Canadian) translation + * By BernardChhun + * 04-08-2007, 03:07 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
      En cours de chargement...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} ligne(s) sélectionné(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fermer cette onglet"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "En cours de chargement..."; +} + +Date.monthNames = [ + "Janvier", + "Février", + "Mars", + "Avril", + "Mai", + "Juin", + "Juillet", + "Août", + "Septembre", + "Octobre", + "Novembre", + "Décembre" +]; + +Date.dayNames = [ + "Dimanche", + "Lundi", + "Mardi", + "Mercredi", + "Jeudi", + "Vendredi", + "Samedi" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annuler", + yes : "Oui", + no : "Non" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Aujourd'hui", + minText : "Cette date est plus petite que la date minimum", + maxText : "Cette date est plus grande que la date maximum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Prochain mois (CTRL+Fléche droite)', + prevText : 'Mois précédent (CTRL+Fléche gauche)', + monthYearText : 'Choissisez un mois (CTRL+Fléche haut ou bas pour changer d\'année.)', + todayTip : "{0} (Barre d'espace)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "de {0}", + firstText : "Première page", + prevText : "Page précédente", + nextText : "Prochaine page", + lastText : "Dernière page", + refreshText : "Recharger la page", + displayMsg : "Page courante {0} - {1} de {2}", + emptyMsg : 'Aucune donnée à afficher' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "La longueur minimum de ce champ est de {0} caractères", + maxLengthText : "La longueur maximum de ce champ est de {0} caractères", + blankText : "Ce champ est obligatoire", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "La valeur minimum de ce champ doit être de {0}", + maxText : "La valeur maximum de ce champ doit être de {0}", + nanText : "{0} n'est pas un nombre valide" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Désactivé", + disabledDatesText : "Désactivé", + minText : "La date de ce champ doit être avant le {0}", + maxText : "La date de ce champ doit être après le {0}", + invalidText : "{0} n'est pas une date valide - il doit être au format suivant: {1}", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "En cours de chargement...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ce champ doit contenir un courriel et doit être sous ce format: "usager@domaine.com"', + urlText : 'Ce champ doit contenir une URL sous le format suivant: "http:/'+'/www.domaine.com"', + alphaText : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', + alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Tri ascendant", + sortDescText : "Tri descendant", + lockText : "Verrouillé la colonne", + unlockText : "Déverrouillé la colonne", + columnsText : "Colonnes" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Propriété", + valueText : "Valeur", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Cliquer et glisser pour redimensionner le panneau.", + collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour cacher le panneau." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-gr-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-gr-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-gr-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Öüñôùóç...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} åðéëåãì�?�ç(åò) ãñáììÞ(�?ò)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Êëåßóôå áõôÞ ôç� êáñô�?ëá"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Ç ôéìÞ óôï ðåäßï äå� åß�áé �?ãêõñç"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Öüñôùóç..."}Date.monthNames=["Éá�ïõÜñéïò","ÖåâñïõÜñéïò","ÌÜñôéïò","�?ðñßëéïò","ÌÜéïò","Éïý�éïò","Éïýëéïò","�?ýãïõóôïò","Óåðô�?ìâñéïò","�?êôþâñéïò","�?ï�?ìâñéïò","Äåê�?ìâñéïò"];Date.dayNames=["ÊõñéáêÞ","Äåõô�?ñá","Ôñßôç","ÔåôÜñôç","�?�?ìðôç","�?áñáóêåõÞ","ÓÜââáôï"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"Å�ôÜîåé",cancel:"�?êýñùóç",yes:"�?áé",no:"¼÷é"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"ì/ç/Å")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"ÓÞìåñá",minText:"Ç çìåñïìç�ßá áõôÞ åß�áé ðñé� ôç� ìéêñüôåñç çìåñïìç�ßá",maxText:"Ç çìåñïìç�ßá áõôÞ åß�áé ìåôÜ ôç� ìåãáëýôåñç çìåñïìç�ßá",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Åðüìå�ïò ÌÞ�áò (Control+Right)",prevText:"�?ñïçãïýìå�ïò ÌÞ�áò (Control+Left)",monthYearText:"Åðéë�?îôå ÌÞ�á (Control+Up/Down ãéá ìåôáêß�çóç óôá �?ôç)",todayTip:"{0} (Spacebar)",format:"ì/ç/Å"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Óåëßäá",afterPageText:"áðü {0}",firstText:"�?ñþôç óåëßäá",prevText:"�?ñïçãïýìå�ç óåëßäá",nextText:"Åðüìå�ç óåëßäá",lastText:"Ôåëåõôáßá óåëßäá",refreshText:"�?�á��?ùóç",displayMsg:"ÅìöÜ�éóç {0} - {1} áðü {2}",emptyMsg:"Äå� âñ�?èçêá� åããñáö�?ò ãéá åìöÜ�éóç"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Ôï åëÜ÷éóôï ì�?ãåèïò ãéá áõôü ôï ðåäßï åß�áé {0}",maxLengthText:"Ôï ì�?ãéóôï ì�?ãåèïò ãéá áõôü ôï ðåäßï åß�áé {0}",blankText:"Ôï ðåäßï áõôü åß�áé õðï÷ñåùôïêü",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Ç åëÜ÷éóôç ôéìÞ ãéá áõôü ôï ðåäßï åß�áé {0}",maxText:"Ç ì�?ãéóôç ôéìÞ ãéá áõôü ôï ðåäßï åß�áé {0}",nanText:"{0} äå� åß�áé �?ãêõñïò áñéèìüò"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"�?ðå�åñãïðïéçì�?�ï",disabledDatesText:"�?ðå�åñãïðïéçì�?�ï",minText:"Ç çìåñïìç�ßá ó' áõôü ôï ðåäßï ðñ�?ðåé �á åß�áé ìåôÜ áðü {0}",maxText:"Ç çìåñïìç�ßá ó' áõôü ôï ðåäßï ðñ�?ðåé �á åß�áé ðñé� áðü {0}",invalidText:"{0} äå� åß�áé �?ãêõñç çìåñïìç�ßá - ðñ�?ðåé �á åß�áé ôçò ìïñöÞò {1}",format:"ì/ç/Å"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Öüñôùóç...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"�?õôü ôï ðåäßï ðñ�?ðåé �á åß�áé e-mail address ôçò ìïñöÞò \"user@domain.com\"",urlText:"�?õôü ôï ðåäßï ðñ�?ðåé �á åß�áé ìéá äéåýèõ�óç URL ôçò ìïñöÞò \"http:/"+"/www.domain.com\"",alphaText:"�?õôü ôï ðåäßï ðñ�?ðåé �á ðåñé�?÷åé ãñÜììáôá êáé _",alphanumText:"�?õôü ôï ðåäßï ðñ�?ðåé �á ðåñé�?÷åé ãñÜììáôá, áñéèìïýò êáé _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"�?ýîïõóá Ôáîé�üìçóç",sortDescText:"Öèß�ïõóá Ôáîé�üìçóç",lockText:"Êëåßäùìá óôÞëçò",unlockText:"Îåêëåßäùìá óôÞëçò",columnsText:"ÓôÞëåò"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"¼�ïìá",valueText:"ÔéìÞ",dateFormat:"ì/ç/Å"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Óýñåôå ãéá áëëáãÞ ìåã�?èïõò.",collapsibleSplitTip:"Óýñåôå ãéá áëëáãÞ ìåã�?èïõò. Double click ãéá áðüêñõøç."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-gr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-gr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-gr.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,169 @@ +/** + * Greek Translations by Vagelis + * 03-June-2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Öüñôùóç...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} åðéëåãìÝíç(åò) ãñáììÞ(Ýò)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Êëåßóôå áõôÞ ôçí êáñôÝëá"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Ç ôéìÞ óôï ðåäßï äåí åßíáé Ýãêõñç"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Öüñôùóç..."; +} + +Date.monthNames = [ + "ÉáíïõÜñéïò", + "ÖåâñïõÜñéïò", + "ÌÜñôéïò", + "Áðñßëéïò", + "ÌÜéïò", + "Éïýíéïò", + "Éïýëéïò", + "Áýãïõóôïò", + "ÓåðôÝìâñéïò", + "Ïêôþâñéïò", + "ÍïÝìâñéïò", + "ÄåêÝìâñéïò" +]; + +Date.dayNames = [ + "ÊõñéáêÞ", + "ÄåõôÝñá", + "Ôñßôç", + "ÔåôÜñôç", + "ÐÝìðôç", + "ÐáñáóêåõÞ", + "ÓÜââáôï" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "ÅíôÜîåé", + cancel : "Áêýñùóç", + yes : "Íáé", + no : "¼÷é" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "ì/ç/Å"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "ÓÞìåñá", + minText : "Ç çìåñïìçíßá áõôÞ åßíáé ðñéí ôçí ìéêñüôåñç çìåñïìçíßá", + maxText : "Ç çìåñïìçíßá áõôÞ åßíáé ìåôÜ ôçí ìåãáëýôåñç çìåñïìçíßá", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Åðüìåíïò ÌÞíáò (Control+Right)', + prevText : 'Ðñïçãïýìåíïò ÌÞíáò (Control+Left)', + monthYearText : 'ÅðéëÝîôå ÌÞíá (Control+Up/Down ãéá ìåôáêßíçóç óôá Ýôç)', + todayTip : "{0} (Spacebar)", + format : "ì/ç/Å" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Óåëßäá", + afterPageText : "áðü {0}", + firstText : "Ðñþôç óåëßäá", + prevText : "Ðñïçãïýìåíç óåëßäá", + nextText : "Åðüìåíç óåëßäá", + lastText : "Ôåëåõôáßá óåëßäá", + refreshText : "ÁíáíÝùóç", + displayMsg : "ÅìöÜíéóç {0} - {1} áðü {2}", + emptyMsg : 'Äåí âñÝèçêáí åããñáöÝò ãéá åìöÜíéóç' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Ôï åëÜ÷éóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", + maxLengthText : "Ôï ìÝãéóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", + blankText : "Ôï ðåäßï áõôü åßíáé õðï÷ñåùôïêü", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Ç åëÜ÷éóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", + maxText : "Ç ìÝãéóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", + nanText : "{0} äåí åßíáé Ýãêõñïò áñéèìüò" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "ÁðåíåñãïðïéçìÝíï", + disabledDatesText : "ÁðåíåñãïðïéçìÝíï", + minText : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìåôÜ áðü {0}", + maxText : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ðñéí áðü {0}", + invalidText : "{0} äåí åßíáé Ýãêõñç çìåñïìçíßá - ðñÝðåé íá åßíáé ôçò ìïñöÞò {1}", + format : "ì/ç/Å" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Öüñôùóç...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé e-mail address ôçò ìïñöÞò "user@domain.com"', + urlText : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìéá äéåýèõíóç URL ôçò ìïñöÞò "http:/'+'/www.domain.com"', + alphaText : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá êáé _', + alphanumText : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá, áñéèìïýò êáé _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Áýîïõóá Ôáîéíüìçóç", + sortDescText : "Öèßíïõóá Ôáîéíüìçóç", + lockText : "Êëåßäùìá óôÞëçò", + unlockText : "Îåêëåßäùìá óôÞëçò", + columnsText : "ÓôÞëåò" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "¼íïìá", + valueText : "ÔéìÞ", + dateFormat : "ì/ç/Å" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò.", + collapsibleSplitTip : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò. Double click ãéá áðüêñõøç." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hr-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hr-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hr-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      U�?itavanje...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} odabranih redova"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Zatvori ovaj tab"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Unesena vrijednost u ovom polju je neispravna"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="U�?itavanje..."}Date.monthNames=["Sije�?anj","Velja�?a","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"];Date.dayNames=["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"U redu",cancel:"Odustani",yes:"Da",no:"Ne"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d.m.Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Danas",minText:"Taj datum je prije najmanjeg datuma",maxText:"Taj datum je poslije najvećeg datuma",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Slijedeći mjesec (Control+Desno)",prevText:"Prethodni mjesec (Control+Lijevo)",monthYearText:"Odaberite mjesec (Control+Gore/Dolje za promjenu godine)",todayTip:"{0} (Razmaknica)",format:"d.m.y",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Stranica",afterPageText:"od {0}",firstText:"Prva stranica",prevText:"Prethodna stranica",nextText:"Slijedeća stranica",lastText:"Posljednja stranica",refreshText:"Obnovi",displayMsg:"Prikazujem {0} - {1} od {2}",emptyMsg:"Nema podataka za prikaz"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minimalna dužina za ovo polje je {0}",maxLengthText:"Maksimalna dužina za ovo polje je {0}",blankText:"Ovo polje je obavezno",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Minimalna vrijednost za ovo polje je {0}",maxText:"Maksimalna vrijednost za ovo polje je {0}",nanText:"{0} nije ispravan broj"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Neaktivno",disabledDatesText:"Neaktivno",minText:"Datum u ovom polje mora biti poslije {0}",maxText:"Datum u ovom polju mora biti prije {0}",invalidText:"{0} nije ispravan datum - mora biti u obliku {1}",format:"d.m.y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"U�?itavanje...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Ovdje možete unijeti samo e-mail adresu u obliku \"korisnik@domena.com\"",urlText:"Ovdje možete unijeti samo URL u obliku \"http:/"+"/www.domena.com\"",alphaText:"Ovo polje može sadržavati samo slova i znak _",alphanumText:"Ovo polje može sadržavati samo slova, brojeve i znak _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sortiraj rastućim redoslijedom",sortDescText:"Sortiraj padajućim redoslijedom",lockText:"Zaklju�?aj stupac",unlockText:"Otklju�?aj stupac",columnsText:"Stupci"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Naziv",valueText:"Vrijednost",dateFormat:"d.m.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Povuci za promjenu veli�?ine.",collapsibleSplitTip:"Povuci za promjenu veli�?ine. Dvostruki klik za skrivanje."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hr.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,171 @@ +/* + * Croatian translation + * By Ylodi (utf8 encoding) + * 8 May 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Učitavanje...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} odabranih redova"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zatvori ovaj tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Unesena vrijednost u ovom polju je neispravna"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Učitavanje..."; +} + +Date.monthNames = [ + "Siječanj", + "Veljača", + "Ožujak", + "Travanj", + "Svibanj", + "Lipanj", + "Srpanj", + "Kolovoz", + "Rujan", + "Listopad", + "Studeni", + "Prosinac" +]; + +Date.dayNames = [ + "Nedjelja", + "Ponedjeljak", + "Utorak", + "Srijeda", + "Četvrtak", + "Petak", + "Subota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "U redu", + cancel : "Odustani", + yes : "Da", + no : "Ne" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Danas", + minText : "Taj datum je prije najmanjeg datuma", + maxText : "Taj datum je poslije najvećeg datuma", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Slijedeći mjesec (Control+Desno)', + prevText : 'Prethodni mjesec (Control+Lijevo)', + monthYearText : 'Odaberite mjesec (Control+Gore/Dolje za promjenu godine)', + todayTip : "{0} (Razmaknica)", + format : "d.m.y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Stranica", + afterPageText : "od {0}", + firstText : "Prva stranica", + prevText : "Prethodna stranica", + nextText : "Slijedeća stranica", + lastText : "Posljednja stranica", + refreshText : "Obnovi", + displayMsg : "Prikazujem {0} - {1} od {2}", + emptyMsg : 'Nema podataka za prikaz' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimalna dužina za ovo polje je {0}", + maxLengthText : "Maksimalna dužina za ovo polje je {0}", + blankText : "Ovo polje je obavezno", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimalna vrijednost za ovo polje je {0}", + maxText : "Maksimalna vrijednost za ovo polje je {0}", + nanText : "{0} nije ispravan broj" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Neaktivno", + disabledDatesText : "Neaktivno", + minText : "Datum u ovom polje mora biti poslije {0}", + maxText : "Datum u ovom polju mora biti prije {0}", + invalidText : "{0} nije ispravan datum - mora biti u obliku {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Učitavanje...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ovdje možete unijeti samo e-mail adresu u obliku "korisnik@domena.com"', + urlText : 'Ovdje možete unijeti samo URL u obliku "http:/'+'/www.domena.com"', + alphaText : 'Ovo polje može sadržavati samo slova i znak _', + alphanumText : 'Ovo polje može sadržavati samo slova, brojeve i znak _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortiraj rastućim redoslijedom", + sortDescText : "Sortiraj padajućim redoslijedom", + lockText : "Zaključaj stupac", + unlockText : "Otključaj stupac", + columnsText : "Stupci" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Naziv", + valueText : "Vrijednost", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Povuci za promjenu veličine.", + collapsibleSplitTip : "Povuci za promjenu veličine. Dvostruki klik za skrivanje." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hu-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hu-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hu-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Betöltés...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} kiválasztott sor"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Fül bezárása"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="A mező tartalma érvénytelen"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Betöltés..."}Date.monthNames=["Január","Február","Március","�?prilis","Május","Június","Július","Augusztus","Szeptember","Október","November","December"];Date.dayNames=["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Mégsem",yes:"Igen",no:"Nem"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"y.m.d")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Ma",minText:"Ez a dátum korábbi a megengedettnél",maxText:"Ez a dátum későbbi a megengedettnél",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Következő hónap (Control+Jobbra)",prevText:"Előző hónap (Control+Balra)",monthYearText:"Hónaőválasztás (Control+Fel/Le: év választás)",todayTip:"{0} (Szóköz)",format:"y.m.d",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Oldal",afterPageText:"a {0}-ból/ből",firstText:"Első oldal",prevText:"Előző oldal",nextText:"Következő",lastText:"Utolsó oldal",refreshText:"Friss�t",displayMsg:"{0} - {1} a {2}-ból/ből",emptyMsg:"Nincs megjelen�thető adat"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"A mező hossza minimum {0}",maxLengthText:"A mező hossza maximum {0}",blankText:"Kötelező mező",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"A mező minimum értéke {0} lehet",maxText:"A mező maximum értéke {0} lehet",nanText:"{0} nem értelmezhető számként"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Letiltva",disabledDatesText:"Letiltva",minText:"A dátum későbbi kell legyen {0}-nál/nél",maxText:"A dátum korábbi kell legyen {0}-nál/nél",invalidText:"{0} nem valódi dátum - a mező formátuma: {1}",format:"y.m.d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Betöltés...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"A mező tartalma e-mail c�m lehet, formátum: \"user@domain.com\"",urlText:"A mező tartalma webc�m lehet, formátum: \"http:/"+"/www.domain.com\"",alphaText:"A mező csak betűket (a-z) és aláhúzás (_) karaktert tartalmazhat.",alphanumText:"A mező csak betűket (a-z), számokat (0-9) és aláhúzás (_) karaktert tartalmazhat"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Növekvő rendezés",sortDescText:"Csökkenő rendezés",lockText:"Oszlop lezárás",unlockText:"Oszlop felengedés",columnsText:"Oszlopok"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Név",valueText:"Érték",dateFormat:"Y m j"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Húzás: átméretezés",collapsibleSplitTip:"Húzás: átméretezés, duplaklikk: eltüntetés."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hu.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hu.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-hu.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,176 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + +/* + * Hungarian translation + * By amon (utf-8 encoded) + * 14 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Betöltés...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} kiválasztott sor"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fül bezárása"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "A mező tartalma érvénytelen"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Betöltés..."; +} + +Date.monthNames = [ + "Január", + "Február", + "Március", + "Április", + "Május", + "Június", + "Július", + "Augusztus", + "Szeptember", + "Október", + "November", + "December" +]; + +Date.dayNames = [ + "Vasárnap", + "Hétfő", + "Kedd", + "Szerda", + "Csütörtök", + "Péntek", + "Szombat" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Mégsem", + yes : "Igen", + no : "Nem" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "y.m.d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Ma", + minText : "Ez a dátum korábbi a megengedettnél", + maxText : "Ez a dátum későbbi a megengedettnél", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Következő hónap (Control+Jobbra)', + prevText : 'Előző hónap (Control+Balra)', + monthYearText : 'Hónaőválasztás (Control+Fel/Le: év választás)', + todayTip : "{0} (Szóköz)", + format : "y.m.d", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Oldal", + afterPageText : "a {0}-ból/ből", + firstText : "Első oldal", + prevText : "Előző oldal", + nextText : "Következő", + lastText : "Utolsó oldal", + refreshText : "Frissít", + displayMsg : "{0} - {1} a {2}-ból/ből", + emptyMsg : 'Nincs megjeleníthető adat' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "A mező hossza minimum {0}", + maxLengthText : "A mező hossza maximum {0}", + blankText : "Kötelező mező", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "A mező minimum értéke {0} lehet", + maxText : "A mező maximum értéke {0} lehet", + nanText : "{0} nem értelmezhető számként" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Letiltva", + disabledDatesText : "Letiltva", + minText : "A dátum későbbi kell legyen {0}-nál/nél", + maxText : "A dátum korábbi kell legyen {0}-nál/nél", + invalidText : "{0} nem valódi dátum - a mező formátuma: {1}", + format : "y.m.d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Betöltés...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'A mező tartalma e-mail cím lehet, formátum: "user@domain.com"', + urlText : 'A mező tartalma webcím lehet, formátum: "http:/'+'/www.domain.com"', + alphaText : 'A mező csak betűket (a-z) és aláhúzás (_) karaktert tartalmazhat.', + alphanumText : 'A mező csak betűket (a-z), számokat (0-9) és aláhúzás (_) karaktert tartalmazhat' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Növekvő rendezés", + sortDescText : "Csökkenő rendezés", + lockText : "Oszlop lezárás", + unlockText : "Oszlop felengedés", + columnsText : "Oszlopok" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Név", + valueText : "Érték", + dateFormat : "Y m j" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Húzás: átméretezés", + collapsibleSplitTip : "Húzás: átméretezés, duplaklikk: eltüntetés." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-it-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-it-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-it-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Caricamento in corso...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} righe selezionate"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Chiudi pannello"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Valore del campo non valido"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Caricamento in corso..."}Date.monthNames=["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"];Date.dayNames=["Domenica","Lunedi","Martedi","Mercoledi","Giovedi","Venerdi","Sabato"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Annulla",yes:"Si",no:"No"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Oggi",minText:"Data precedente alla data minima",maxText:"Data successiva alla data massima",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Mese successivo (Ctrl+Destra)",prevText:"Mese precedente (Ctrl+Sinistra)",monthYearText:"Scegli un mese (Ctrl+Su/Giu per cambiare anno)",todayTip:"{0} (Barra spaziatrice)",format:"d/m/y",cancelText:"Annulla"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Pagina",afterPageText:"di {0}",firstText:"Prima pagina",prevText:"Pagina precedente",nextText:"Pagina successiva",lastText:"Ultima pagina",refreshText:"Aggiorna",displayMsg:"Vista {0} - {1} di {2}",emptyMsg:"Nessun dato da mostrare"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"La lunghezza minima del campo risulta {0}",maxLengthText:"La lunghezza massima del campo risulta {0}",blankText:"Campo obbligatorio",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Il valore minimo del campo risulta {0}",maxText:"Il valore massimo del campo risulta {0}",nanText:"{0} non ` un numero corretto"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Disabilitato",disabledDatesText:"Disabilitato",minText:"La data del campo deve essere successiva a {0}",maxText:"La data del campo deve essere precedente a {0}",invalidText:"{0} non ` una data valida. Deve essere nel formato {1}",format:"d/m/y",altFormats:"d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Caricamento in corso...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Il campo deve essere un indirizzo e-mail nel formato \"user@domain.com\"",urlText:"Il campo deve essere un indirizzo web nel formato \"http:/"+"/www.domain.com\"",alphaText:"Il campo deve contenere solo lettere e _",alphanumText:"Il campo deve contenere solo lettere, numeri e _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Ordinamento crescente",sortDescText:"Ordinamento decrescente",lockText:"Blocca colonna",unlockText:"Sblocca colonna",columnsText:"Colonne"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Nome",valueText:"Valore",dateFormat:"j/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Trascina per cambiare dimensioni.",collapsibleSplitTip:"Trascina per cambiare dimensioni. Doppio click per nascondere."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-it.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-it.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-it.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,173 @@ +/* + * Italian translation + * By eric_void + * 04-10-2007, 11:25 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Caricamento in corso...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} righe selezionate"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Chiudi pannello"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Valore del campo non valido"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Caricamento in corso..."; +} + +Date.monthNames = [ + "Gennaio", + "Febbraio", + "Marzo", + "Aprile", + "Maggio", + "Giugno", + "Luglio", + "Agosto", + "Settembre", + "Ottobre", + "Novembre", + "Dicembre" +]; + +Date.dayNames = [ + "Domenica", + "Lunedi", + "Martedi", + "Mercoledi", + "Giovedi", + "Venerdi", + "Sabato" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annulla", + yes : "Si", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Oggi", + minText : "Data precedente alla data minima", + maxText : "Data successiva alla data massima", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Mese successivo (Ctrl+Destra)', + prevText : 'Mese precedente (Ctrl+Sinistra)', + monthYearText : 'Scegli un mese (Ctrl+Su/Giu per cambiare anno)', + todayTip : "{0} (Barra spaziatrice)", + format : "d/m/y", + cancelText : "Annulla" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Pagina", + afterPageText : "di {0}", + firstText : "Prima pagina", + prevText : "Pagina precedente", + nextText : "Pagina successiva", + lastText : "Ultima pagina", + refreshText : "Aggiorna", + displayMsg : "Vista {0} - {1} di {2}", + emptyMsg : 'Nessun dato da mostrare' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "La lunghezza minima del campo risulta {0}", + maxLengthText : "La lunghezza massima del campo risulta {0}", + blankText : "Campo obbligatorio", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Il valore minimo del campo risulta {0}", + maxText : "Il valore massimo del campo risulta {0}", + nanText : "{0} non ` un numero corretto" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Disabilitato", + disabledDatesText : "Disabilitato", + minText : "La data del campo deve essere successiva a {0}", + maxText : "La data del campo deve essere precedente a {0}", + invalidText : "{0} non ` una data valida. Deve essere nel formato {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Caricamento in corso...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Il campo deve essere un indirizzo e-mail nel formato "user@domain.com"', + urlText : 'Il campo deve essere un indirizzo web nel formato "http:/'+'/www.domain.com"', + alphaText : 'Il campo deve contenere solo lettere e _', + alphanumText : 'Il campo deve contenere solo lettere, numeri e _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Ordinamento crescente", + sortDescText : "Ordinamento decrescente", + lockText : "Blocca colonna", + unlockText : "Sblocca colonna", + columnsText : "Colonne" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nome", + valueText : "Valore", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Trascina per cambiare dimensioni.", + collapsibleSplitTip : "Trascina per cambiare dimensioni. Doppio click per nascondere." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ja-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ja-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ja-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      ��?�込�?��...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} 行�?�択"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="�?��?�タブを閉�?�る"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="フィールド�?�値�?��?��?��?�。"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="��?�込�?��..."}Date.monthNames=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];Date.dayNames=["日","月","�?�","水","木","金","土"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"�ャンセル",yes:"�?��?�",no:"�?��?��?�"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"Y/m/d")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"今日",minText:"�?�択�?��?�日付�?�最�?値以下�?��?�。",maxText:"�?�択�?��?�日付�?�最大値以上�?��?�。",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"次月�?� (コント�ール+�?�)",prevText:"�?月�?� (コント�ール+左)",monthYearText:"月�?�択 (コント�ール+上/下�?�年移動)",todayTip:"{0} (スペース�ー)",format:"Y/m/d"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"ページ",afterPageText:"/ {0}",firstText:"最�?�?�ページ",prevText:"�?�?�ページ",nextText:"次�?�ページ",lastText:"最後�?�ページ",refreshText:"更新",displayMsg:"{2} 件� {0} - {1} を表示",emptyMsg:"表示�?�るデータ�?��?�り�?��?�ん。"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"�?��?�フィールド�?�最�?値�?� {0} �?��?�。",maxLengthText:"�?��?�フィールド�?�最大値�?� {0} �?��?�。",blankText:"必須項目�?��?�。",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"�?��?�フィールド�?�最�?値�?� {0} �?��?�。",maxText:"�?��?�フィールド�?�最大値�?� {0} �?��?�。",nanText:"{0} �?�数値�?��?��?�り�?��?�ん。"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"無効",disabledDatesText:"無効",minText:"�?��?�フィールド�?�日付�?��? {0} 以�?�?�日付�?��定�?��?��??�?��?��?�。",maxText:"�?��?�フィールド�?�日付�?��? {0} 以�?�?�日付�?��定�?��?��??�?��?��?�。",invalidText:"{0} �?�間�?��?��?�日付入力�?��?�。 - 入力形�?�?�「{1}�?�?��?�。",format:"Y/m/d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"��?�込�?��...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"メールアドレスを\"user@domain.com\"�?�形�?�?�入力�?��?��??�?��?��?�。",urlText:"URLを\"http:/"+"/www.domain.com\"�?�形�?�?�入力�?��?��??�?��?��?�。",alphaText:"�?�角英��?�\"_\"�?��?��?��?�。",alphanumText:"�?�角英数�?�\"_\"�?��?��?��?�。"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"昇順",sortDescText:"�?順",lockText:"カラム�ック",unlockText:"カラム�ック解除",columnsText:"Columns"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"�??称",valueText:"値",dateFormat:"Y/m/d"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"ドラッグ�?�る�?�リサイズ�?��??�?��?�。",collapsibleSplitTip:"ドラッグ�?�リサイズ。 ダブルクリック�?�隠�?�。"})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ja.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ja.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ja.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,156 @@ +/* + * Japanese translation + * By tyama + * 04-08-2007, 05:49 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
      読み込み中...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} 行選択"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "このタブを閉じる"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "フィールドの値が不正です。"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "読み込み中..."; +} + +Date.monthNames = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月','11月','12月']; + +Date.dayNames = [ + "日", + "月", + "火", + "水", + "木", + "金", + "土"]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "キャンセル", + yes : "はい", + no : "いいえ" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y/m/d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "今日", + minText : "選択した日付は最小値以下です。", + maxText : "選択した日付は最大値以上です。", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : '次月へ (コントロール+右)', + prevText : '前月へ (コントロール+左)', + monthYearText : '月選択 (コントロール+上/下で年移動)', + todayTip : "{0} (スペースキー)", + format : "Y/m/d" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "ページ", + afterPageText : "/ {0}", + firstText : "最初のページ", + prevText : "前のページ", + nextText : "次のページ", + lastText : "最後のページ", + refreshText : "更新", + displayMsg : "{2} 件中 {0} - {1} を表示", + emptyMsg : '表示するデータがありません。' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "このフィールドの最小値は {0} です。", + maxLengthText : "このフィールドの最大値は {0} です。", + blankText : "必須項目です。", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "このフィールドの最小値は {0} です。", + maxText : "このフィールドの最大値は {0} です。", + nanText : "{0} は数値ではありません。" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "無効", + disabledDatesText : "無効", + minText : "このフィールドの日付は、 {0} 以降の日付に設定してください。", + maxText : "このフィールドの日付は、 {0} 以前の日付に設定してください。", + invalidText : "{0} は間違った日付入力です。 - 入力形式は「{1}」です。", + format : "Y/m/d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "読み込み中...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'メールアドレスを"user@domain.com"の形式で入力してください。', + urlText : 'URLを"http:/'+'/www.domain.com"の形式で入力してください。', + alphaText : '半角英字と"_"のみです。', + alphanumText : '半角英数と"_"のみです。' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "昇順", + sortDescText : "降順", + lockText : "カラムロック", + unlockText : "カラムロック解除", + columnsText : "Columns" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "名称", + valueText : "値", + dateFormat : "Y/m/d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "ドラッグするとリサイズできます。", + collapsibleSplitTip : "ドラッグでリサイズ。 ダブルクリックで隠す。" + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ko-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ko-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ko-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      로딩...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} 개가 선�?�?�었습니다."}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="닫기"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="올바른 값�?� 아닙니다."}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="로딩..."}Date.monthNames=["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"];Date.dayNames=["�?�","월","화","수","목","금","토"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"확�?�",cancel:"취소",yes:"예",no:"아니오"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"m/d/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"오늘",minText:"최소 날짜범위를 넘었습니다.",maxText:"최대 날짜범위를 넘었습니다.",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"다�?�달(컨트롤키+오른쪽 화살표)",prevText:"�?�전달 (컨트롤키+왼족 화살표)",monthYearText:"월�?� 선�?해주세요. (컨트롤키+위/아래 화살표)",todayTip:"{0} (스페�?�스바)",format:"m/d/y",okText:"확�?�",cancelText:"취소",startDay:0})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"페�?�지",afterPageText:"/ {0}",firstText:"첫 페�?�지",prevText:"�?�전 페�?�지",nextText:"다�?� 페�?�지",lastText:"마지막 페�?�지",refreshText:"새로고침",displayMsg:"전체 {2} 중 {0} - {1}",emptyMsg:"표시할 �?��?�터가 없습니다."})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"최소길�?�는 {0}입니다.",maxLengthText:"최대길�?�는 {0}입니다.",blankText:"값�?� 입력해주세요.",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"최소값�?� {0}입니다.",maxText:"최대값�?� {0}입니다.",nanText:"{0}는 올바른 숫�?가 아닙니다."})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"비활성",disabledDatesText:"비활성",minText:"{0}�?� �?�후여야 합니다.",maxText:"{0}�?� �?�전�?�어야 합니다.",invalidText:"{0}는 올바른 날짜형�?�?� 아닙니다. - 다�?�과 같�?� 형�?�?�어야 합니다. {1}",format:"m/d/y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"로딩...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"�?�메�?� 주소 형�?�? 맞게 입력해야합니다. (예: \"user@domain.com\")",urlText:"URL 형�?�? 맞게 입력해야합니다. (예: \"http:/"+"/www.domain.com\")",alphaText:"�?문, 밑줄(_)만 입력할 수 있습니다.",alphanumText:"�?문, 숫�?, 밑줄(_)만 입력할 수 있습니다."})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"URL�?� 입력해주세요:",buttonTips:{bold:{title:"굵게 (Ctrl+B)",text:"선�?한 �?스트를 굵게 표시합니다.",cls:"x-html-editor-tip"},italic:{title:"기울임꼴 (Ctrl+I)",text:"선�?한 �?스트를 기울임꼴로 표시합니다.",cls:"x-html-editor-tip"},underline:{title:"밑줄 (Ctrl+U)",text:"선�?한 �?스트�? 밑줄�?� 표시합니다.",cls:"x-html-editor-tip"},increasefontsize:{title:"글꼴�?�기 늘림",text:"글꼴 �?�기를 �?�게 합니다.",cls:"x-html-editor-tip"},decreasefontsize:{title:"글꼴�?�기 줄임",text:"글꼴 �?�기를 작게 합니다.",cls:"x-html-editor-tip"},backcolor:{title:"�?스트 강조 색",text:"선�?한 �?스트�?� 배경색�?� 변경합니다.",cls:"x-html-editor-tip"},forecolor:{title:"글꼴색",text:"선�?한 �?스트�?� 색�?� 변경합니다.",cls:"x-html-editor-tip"},justifyleft:{title:"�?스트 왼쪽 맞춤",text:"왼쪽�? �?스트를 맞춥니다.",cls:"x-html-editor-tip"},justifycenter:{title:"가운�?� 맞춤",text:"가운�?��? �?스트를 맞춥니다.",cls:"x-html-editor-tip"},justifyright:{title:"�?스트 오른쪽 맞춤",text:"오른쪽�? �?스트를 맞춥니다.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"글머리 기호",text:"글머리 기호 목�?�?� 시작합니다.",cls:"x-html-editor-tip"},insertorderedlist:{title:"번호 매기기",text:"번호 매기기 목�?�?� 시작합니다.",cls:"x-html-editor-tip"},createlink:{title:"하�?��?��?�?�",text:"선�?한 �?스트�? 하�?��?��?�?�를 만�니다.",cls:"x-html-editor-tip"},sourceedit:{title:"소스편집",text:"소스편집 모드로 변환합니다.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"오름차순 정렬",sortDescText:"내림차순 정렬",lockText:"칼럼 잠금",unlockText:"칼럼 잠금해제",columnsText:"칼럼 목�?"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"�목",valueText:"값",dateFormat:"m/j/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"�?�기변경�?� 위해 드래그하세요.",collapsibleSplitTip:"�?�기변경�?� 위해 드래그, 숨기기 위해 �?�블�?�� 하세요."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-lv-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-lv-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-lv-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Notiek iel�?de...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} iezīmētu rindu"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Aizver šo zīmni"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Vērtība šaj�? lauk�? nav pareiza"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Iel�?dē..."}Date.monthNames=["Janv�?ris","Febru�?ris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"];Date.dayNames=["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"Labi",cancel:"Atcelt",yes:"J�?",no:"Nē"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d.m.Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Šodiena",minText:"Nor�?dītais datums ir maz�?ks par minim�?lo datumu",maxText:"Nor�?dītais datums ir liel�?ks par maksim�?lo datumu",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"N�?kamais mēnesis (Control+pa labi)",prevText:"Iepriekšējais mēnesis (Control+pa kreisi)",monthYearText:"Mēneša izvēle (Control+uz augšu/uz leju lai p�?rslēgtu gadus)",todayTip:"{0} (Tukšumzīme)",format:"d.m.Y",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Lapa",afterPageText:"no {0}",firstText:"Pirm�? lapa",prevText:"iepriekšēj�? lapa",nextText:"N�?kam�? lapa",lastText:"Pēdēj�? lapa",refreshText:"Atsvaidzin�?t",displayMsg:"R�?da no {0} līdz {1} ierakstiem, kop�? {2}",emptyMsg:"Nav datu, ko par�?dīt"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minim�?lais garums šim laukam ir {0}",maxLengthText:"Maksim�?lais garums šim laukam ir {0}",blankText:"Šis ir oblig�?ts lauks",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Minim�?lais garums šim laukam ir {0}",maxText:"Maksim�?lais garums šim laukam ir {0}",nanText:"{0} nav pareizs skaitlis"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Atspējots",disabledDatesText:"Atspējots",minText:"Datumam šaj�? lauk�? j�?būt liel�?kam k�? {0}",maxText:"Datumam šaj�? lauk�? j�?būt maz�?kam k�? {0}",invalidText:"{0} nav pareizs datums - tam j�?būt š�?d�? form�?t�?: {1}",format:"d.m.Y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Iel�?dē...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Šaj�? lauk�? j�?ieraksta e-pasta adrese form�?t�? \"lietot�?s@domēns.lv\"",urlText:"Šaj�? lauk�? j�?ieraksta URL form�?t�? \"http:/"+"/www.domēns.lv\"",alphaText:"Šis lauks drīkst saturēt tikai burtus un _ zīmi",alphanumText:"Šis lauks drīkst saturēt tikai burtus, ciparus un _ zīmi"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"K�?rtot pieaugoš�? secīb�?",sortDescText:"K�?rtot dilstoš�? secīb�?",lockText:"Noslēgt kolonnu",unlockText:"Atslēgt kolonnu",columnsText:"Kolonnas"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Nosaukums",valueText:"Vērtība",dateFormat:"j.m.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Velc, lai mainītu izmēru.",collapsibleSplitTip:"Velc, lai mainītu izmēru. Dubultklikšķis noslēpj apgabalu."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-lv.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-lv.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-lv.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,170 @@ +/** + * Latvian Translations + * By salix 17 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Notiek ielāde...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} iezīmētu rindu"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Aizver šo zīmni"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Vērtība šajā laukā nav pareiza"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Ielādē..."; +} + +Date.monthNames = [ + "Janvāris", + "Februāris", + "Marts", + "Aprīlis", + "Maijs", + "Jūnijs", + "Jūlijs", + "Augusts", + "Septembris", + "Oktobris", + "Novembris", + "Decembris" +]; + +Date.dayNames = [ + "Svētdiena", + "Pirmdiena", + "Otrdiena", + "Trešdiena", + "Ceturtdiena", + "Piektdiena", + "Sestdiena" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Labi", + cancel : "Atcelt", + yes : "Jā", + no : "Nē" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Šodiena", + minText : "Norādītais datums ir mazāks par minimālo datumu", + maxText : "Norādītais datums ir lielāks par maksimālo datumu", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Nākamais mēnesis (Control+pa labi)', + prevText : 'Iepriekšējais mēnesis (Control+pa kreisi)', + monthYearText : 'Mēneša izvēle (Control+uz augšu/uz leju lai pārslēgtu gadus)', + todayTip : "{0} (Tukšumzīme)", + format : "d.m.Y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Lapa", + afterPageText : "no {0}", + firstText : "Pirmā lapa", + prevText : "iepriekšējā lapa", + nextText : "Nākamā lapa", + lastText : "Pēdējā lapa", + refreshText : "Atsvaidzināt", + displayMsg : "Rāda no {0} līdz {1} ierakstiem, kopā {2}", + emptyMsg : 'Nav datu, ko parādīt' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimālais garums šim laukam ir {0}", + maxLengthText : "Maksimālais garums šim laukam ir {0}", + blankText : "Šis ir obligāts lauks", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimālais garums šim laukam ir {0}", + maxText : "Maksimālais garums šim laukam ir {0}", + nanText : "{0} nav pareizs skaitlis" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Atspējots", + disabledDatesText : "Atspējots", + minText : "Datumam šajā laukā jābūt lielākam kā {0}", + maxText : "Datumam šajā laukā jābūt mazākam kā {0}", + invalidText : "{0} nav pareizs datums - tam jābūt šādā formātā: {1}", + format : "d.m.Y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Ielādē...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Šajā laukā jāieraksta e-pasta adrese formātā "lietotās@domēns.lv"', + urlText : 'Šajā laukā jāieraksta URL formātā "http:/'+'/www.domēns.lv"', + alphaText : 'Šis lauks drīkst saturēt tikai burtus un _ zīmi', + alphanumText : 'Šis lauks drīkst saturēt tikai burtus, ciparus un _ zīmi' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Kārtot pieaugošā secībā", + sortDescText : "Kārtot dilstošā secībā", + lockText : "Noslēgt kolonnu", + unlockText : "Atslēgt kolonnu", + columnsText : "Kolonnas" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nosaukums", + valueText : "Vērtība", + dateFormat : "j.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Velc, lai mainītu izmēru.", + collapsibleSplitTip : "Velc, lai mainītu izmēru. Dubultklikšķis noslēpj apgabalu." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-mk-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-mk-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-mk-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Вчитувам...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} избрани редици"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Затвори tab"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Вредно�?та во ова поле е невалидна"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Вчитувам..."}Date.monthNames=["Јануари","Февруари","Март","�?прил","Мај","Јуни","Јули","�?вгу�?т","Септември","Октомври","�?оември","Декември"];Date.dayNames=["�?едела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"Потврди",cancel:"Поништи",yes:"Да",no:"�?е"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d.m.y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Дене�?ка",minText:"Овој датум е пред најмалиот датум",maxText:"Овој датум е пред најголемиот датум",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Следен ме�?ец (Control+Стрелка де�?но)",prevText:"Претходен ме�?ец (Control+Стрелка лево)",monthYearText:"Изберете ме�?ец (Control+Стрелка горе/Стрелка де�?но за менување година)",todayTip:"{0} (Spacebar)",format:"d.m.y"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Страница",afterPageText:"од {0}",firstText:"Прва Страница",prevText:"Претходна Страница",nextText:"Следна Страница",lastText:"По�?ледна Страница",refreshText:"О�?вежи",displayMsg:"Прикажувам {0} - {1} од {2}",emptyMsg:"�?ема податоци за приказ"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Минималната должина за ова поле е {0}",maxLengthText:"Мак�?ималната должина за ова поле е {0}",blankText:"Податоците во ова поле �?е потребни",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Минималната вредно�?т за ова поле е {0}",maxText:"Мак�?ималната вредно�?т за ова поле е {0}",nanText:"{0} не е валиден број"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"�?еактивно",disabledDatesText:"�?еактивно",minText:"Датумот во ова поле мора да биде пред {0}",maxText:"Датумот во ова поле мора да биде по {0}",invalidText:"{0} не е валиден датум - мора да биде во формат {1}",format:"d.m.y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Вчитувам...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Ова поле треба да биде e-mail адре�?а во формат \"user@domain.com\"",urlText:"Ова поле треба да биде URL во формат \"http:/"+"/www.domain.com\"",alphaText:"Ова поле треба да �?одржи �?амо букви и _",alphanumText:"Ова поле треба да �?одржи �?амо букви, бројки и _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Сортирај Ра�?течки",sortDescText:"Сортирај Опаѓачки",lockText:"Заклучи Колона",unlockText:"Отклучи колона",columnsText:"Колони"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Име",valueText:"Вредно�?т",dateFormat:"m.d.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Повлечете за менување на големината.",collapsibleSplitTip:"Повлечете за менување на големината. Дупли клик за криење."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-mk.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-mk.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-mk.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,170 @@ +/* + * Macedonia translation + * By PetarD petar.dimitrijevic@vorteksed.com.mk (utf8 encoding) + * 23 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Вчитувам...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} избрани редици"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Затвори tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Вредноста во ова поле е невалидна"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Вчитувам..."; +} + +Date.monthNames = [ + "Јануари", + "Февруари", + "Март", + "Април", + "Мај", + "Јуни", + "Јули", + "Август", + "Септември", + "Октомври", + "Ноември", + "Декември" +]; + +Date.dayNames = [ + "Недела", + "Понеделник", + "Вторник", + "Среда", + "Четврток", + "Петок", + "Сабота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Потврди", + cancel : "Поништи", + yes : "Да", + no : "Не" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Денеска", + minText : "Овој датум е пред најмалиот датум", + maxText : "Овој датум е пред најголемиот датум", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Следен месец (Control+Стрелка десно)', + prevText : 'Претходен месец (Control+Стрелка лево)', + monthYearText : 'Изберете месец (Control+Стрелка горе/Стрелка десно за менување година)', + todayTip : "{0} (Spacebar)", + format : "d.m.y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Страница", + afterPageText : "од {0}", + firstText : "Прва Страница", + prevText : "Претходна Страница", + nextText : "Следна Страница", + lastText : "Последна Страница", + refreshText : "Освежи", + displayMsg : "Прикажувам {0} - {1} од {2}", + emptyMsg : 'Нема податоци за приказ' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Минималната должина за ова поле е {0}", + maxLengthText : "Максималната должина за ова поле е {0}", + blankText : "Податоците во ова поле се потребни", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Минималната вредност за ова поле е {0}", + maxText : "Максималната вредност за ова поле е {0}", + nanText : "{0} не е валиден број" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Неактивно", + disabledDatesText : "Неактивно", + minText : "Датумот во ова поле мора да биде пред {0}", + maxText : "Датумот во ова поле мора да биде по {0}", + invalidText : "{0} не е валиден датум - мора да биде во формат {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Вчитувам...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ова поле треба да биде e-mail адреса во формат "user@domain.com"', + urlText : 'Ова поле треба да биде URL во формат "http:/'+'/www.domain.com"', + alphaText : 'Ова поле треба да содржи само букви и _', + alphanumText : 'Ова поле треба да содржи само букви, бројки и _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Сортирај Растечки", + sortDescText : "Сортирај Опаѓачки", + lockText : "Заклучи Колона", + unlockText : "Отклучи колона", + columnsText : "Колони" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Име", + valueText : "Вредност", + dateFormat : "m.d.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Повлечете за менување на големината.", + collapsibleSplitTip : "Повлечете за менување на големината. Дупли клик за криење." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-nl-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-nl-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-nl-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Bezig met laden...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} geselecteerde rij(en)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Sluit dit tabblad"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="De waarde in dit veld is onjuist"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Bezig met laden..."}Date.monthNames=["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"];Date.getShortMonthName=function(A){return Date.monthNames[A].substring(0,3)};Date.monthNumbers={Jan:0,Feb:1,Maa:2,Apr:3,Mei:4,Jun:5,Jul:6,Aug:7,Sep:8,Okt:9,Nov:10,Dec:11};Date.getMonthNumber=function(A){return Date.monthNumbers[A.substring(0,1).toUpperCase()+A.substring(1,3).toLowerCase()]};Date.dayNames=["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"];Date.getShortDayName=function(A){return Date.dayNames[A].substring(0,3)};if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Annuleren",yes:"Ja",no:"Nee"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d-m-y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Vandaag",minText:"Deze datum is eerder dan de minimum datum",maxText:"Deze datum is later dan de maximum datum",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Volgende Maand (Control+Rechts)",prevText:"Vorige Maand (Control+Links)",monthYearText:"Kies een maand (Control+Omhoog/Beneden volgend/vorige jaar)",todayTip:"{0} (Spatie)",format:"d-m-y",okText:" OK ",cancelText:"Annuleren",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Pagina",afterPageText:"van {0}",firstText:"Eerste Pagina",prevText:"Vorige Pagina",nextText:"Volgende Pagina",lastText:"Laatste Pagina",refreshText:"Ververs",displayMsg:"Getoond {0} - {1} van {2}",emptyMsg:"Geen gegeven om weer te geven"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"De minimale lengte voor dit veld is {0}",maxLengthText:"De maximale lengte voor dit veld is {0}",blankText:"Dit veld is verplicht",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"De minimale waarde voor dit veld is {0}",maxText:"De maximale waarde voor dit veld is {0}",nanText:"{0} is geen geldig getal"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Uitgeschakeld",disabledDatesText:"Uitgeschakeld",minText:"De datum in dit veld moet na {0} liggen",maxText:"De datum in dit veld moet voor {0} liggen",invalidText:"{0} is geen geldige datum - formaat voor datum is {1}",format:"d-m-y",altFormats:"d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Bezig met laden...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Dit veld moet een e-mail adres zijn in het formaat \"gebruiker@domein.nl\"",urlText:"Dit veld moet een URL zijn in het formaat \"http:/"+"/www.domein.nl\"",alphaText:"Dit veld mag alleen letters en _ bevatten",alphanumText:"Dit veld mag alleen letters, cijfers en _ bevatten"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Vul hier het Internet adres voor de link in:",buttonTips:{bold:{title:"Vet (Ctrl+B)",text:"Maak de geselecteerde tekst vet gedrukt.",cls:"x-html-editor-tip"},italic:{title:"Cursief (Ctrl+I)",text:"Maak de geselecteerde tekst cursief.",cls:"x-html-editor-tip"},underline:{title:"Onderstrepen (Ctrl+U)",text:"Onderstreep de geselecteerde tekst.",cls:"x-html-editor-tip"},increasefontsize:{title:"Tekst Vergroten",text:"Vergroot het lettertype.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Tekst Verkleinen",text:"Verklein het lettertype.",cls:"x-html-editor-tip"},backcolor:{title:"Tekst Achtergrond Kleur",text:"Verander de achtergrond kleur van de geselecteerde tekst.",cls:"x-html-editor-tip"},forecolor:{title:"Lettertype Kleur",text:"Verander de kleur van de geselecteerde tekst.",cls:"x-html-editor-tip"},justifyleft:{title:"Tekst Links Uitlijnen",text:"Lijn de tekst links uit.",cls:"x-html-editor-tip"},justifycenter:{title:"Tekst Centreren",text:"Centreer de tekst in de editor.",cls:"x-html-editor-tip"},justifyright:{title:"Tekst Richts Uitlijnen",text:"Lijn de tekst rechts uit.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Punten Lijst",text:"Begin een ongenummerde lijst.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Genummerde Lijst",text:"Begin een genummerde lijst.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Maak van de geselecteerde tekst een hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Bron Aanpassen",text:"Schakel modus over naar bron aanpassen.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sorteer Oplopend",sortDescText:"Sorteer Aflopend",lockText:"Kolom Vastzetten",unlockText:"Kolom Vrijgeven",columnsText:"Kolommen"})}if(Ext.grid.GroupingView){Ext.apply(Ext.grid.GroupingView.prototype,{emptyGroupText:"(Geen)",groupByText:"Dit veld groeperen",showGroupsText:"Zien als groepen"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Naam",valueText:"Waarde",dateFormat:"Y-m-j"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Sleep om grootte aan te passen.",collapsibleSplitTip:"Sleep om grootte aan te passen. Dubbel klikken om te verbergen."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-nl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-nl.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-nl.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,292 @@ +/* + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * Dutch Translations + * by Ido Sebastiaan Bas van Oostveen (12 Oct 2007) + */ + +/* Ext Core translations */ +Ext.UpdateManager.defaults.indicatorText = '
      Bezig met laden...
      '; + +/* Ext single string translations */ +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} geselecteerde rij(en)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Sluit dit tabblad"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "De waarde in dit veld is onjuist"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Bezig met laden..."; +} + +/* Javascript month and days translations */ +Date.monthNames = [ + "Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December" +]; + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +}; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Maa : 2, + Apr : 3, + Mei : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Okt : 9, + Nov : 10, + Dec : 11 +}; + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +}; + +Date.dayNames = [ + "Zondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag" +]; + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +}; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annuleren", + yes : "Ja", + no : "Nee" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d-m-y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Vandaag", + minText : "Deze datum is eerder dan de minimum datum", + maxText : "Deze datum is later dan de maximum datum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Volgende Maand (Control+Rechts)', + prevText : 'Vorige Maand (Control+Links)', + monthYearText : 'Kies een maand (Control+Omhoog/Beneden volgend/vorige jaar)', + todayTip : "{0} (Spatie)", + format : "d-m-y", + okText : " OK ", + cancelText : "Annuleren", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Pagina", + afterPageText : "van {0}", + firstText : "Eerste Pagina", + prevText : "Vorige Pagina", + nextText : "Volgende Pagina", + lastText : "Laatste Pagina", + refreshText : "Ververs", + displayMsg : "Getoond {0} - {1} van {2}", + emptyMsg : 'Geen gegeven om weer te geven' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "De minimale lengte voor dit veld is {0}", + maxLengthText : "De maximale lengte voor dit veld is {0}", + blankText : "Dit veld is verplicht", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "De minimale waarde voor dit veld is {0}", + maxText : "De maximale waarde voor dit veld is {0}", + nanText : "{0} is geen geldig getal" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Uitgeschakeld", + disabledDatesText : "Uitgeschakeld", + minText : "De datum in dit veld moet na {0} liggen", + maxText : "De datum in dit veld moet voor {0} liggen", + invalidText : "{0} is geen geldige datum - formaat voor datum is {1}", + format : "d-m-y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Bezig met laden...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dit veld moet een e-mail adres zijn in het formaat "gebruiker@domein.nl"', + urlText : 'Dit veld moet een URL zijn in het formaat "http:/'+'/www.domein.nl"', + alphaText : 'Dit veld mag alleen letters en _ bevatten', + alphanumText : 'Dit veld mag alleen letters, cijfers en _ bevatten' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Vul hier het Internet adres voor de link in:', + buttonTips : { + bold : { + title: 'Vet (Ctrl+B)', + text: 'Maak de geselecteerde tekst vet gedrukt.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Cursief (Ctrl+I)', + text: 'Maak de geselecteerde tekst cursief.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Onderstrepen (Ctrl+U)', + text: 'Onderstreep de geselecteerde tekst.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Tekst Vergroten', + text: 'Vergroot het lettertype.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Tekst Verkleinen', + text: 'Verklein het lettertype.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Tekst Achtergrond Kleur', + text: 'Verander de achtergrond kleur van de geselecteerde tekst.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Lettertype Kleur', + text: 'Verander de kleur van de geselecteerde tekst.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Tekst Links Uitlijnen', + text: 'Lijn de tekst links uit.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Tekst Centreren', + text: 'Centreer de tekst in de editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Tekst Richts Uitlijnen', + text: 'Lijn de tekst rechts uit.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Punten Lijst', + text: 'Begin een ongenummerde lijst.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Genummerde Lijst', + text: 'Begin een genummerde lijst.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Maak van de geselecteerde tekst een hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Bron Aanpassen', + text: 'Schakel modus over naar bron aanpassen.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sorteer Oplopend", + sortDescText : "Sorteer Aflopend", + lockText : "Kolom Vastzetten", + unlockText : "Kolom Vrijgeven", + columnsText : "Kolommen" + }); +} + +if(Ext.grid.GroupingView){ + Ext.apply(Ext.grid.GroupingView.prototype, { + emptyGroupText : '(Geen)', + groupByText : 'Dit veld groeperen', + showGroupsText : 'Zien als groepen' + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Naam", + valueText : "Waarde", + dateFormat : "Y-m-j" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Sleep om grootte aan te passen.", + collapsibleSplitTip : "Sleep om grootte aan te passen. Dubbel klikken om te verbergen." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-no-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-no-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-no-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Laster...
      ";if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} markerte rader"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Lukk denne fanen"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Verdien i dette felter er ugyldig"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Laster..."}Date.monthNames=["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"];Date.dayNames=["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Avbryt",yes:"Ja",no:"Nei"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"I dag",minText:"Denne datoen er tidligere enn den tidligste tillatte",maxText:"Denne datoen er senere enn den seneste tillatte",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Neste måned (Control+Pil Høyre)",prevText:"Forrige måned (Control+Pil Venstre)",monthYearText:"Velg en måned (Control+Pil Opp/Ned for å skifte år)",todayTip:"{0} (mellomrom)",format:"d/m/y"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Side",afterPageText:"av {0}",firstText:"Første side",prevText:"Forrige side",nextText:"Neste side",lastText:"Siste side",refreshText:"Oppdater",displayMsg:"Viser {0} - {1} of {2}",emptyMsg:"Ingen data å vise"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Den minste lengden for dette feltet er {0}",maxLengthText:"Den største lengden for dette feltet er {0}",blankText:"Dette feltet er påkrevd",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Den minste verdien for dette feltet er {0}",maxText:"Den største verdien for dette feltet er {0}",nanText:"{0} er ikke et gyldig nummer"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Deaktivert",disabledDatesText:"Deaktivert",minText:"Datoen i dette feltet må være etter {0}",maxText:"Datoen i dette feltet må være før {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",format:"m/d/y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Laster...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Dette feltet skal være en epost adresse i formatet \"user@domain.com\"",urlText:"Dette feltet skal være en link (URL) i formatet \"http:/"+"/www.domain.com\"",alphaText:"Dette feltet skal kun inneholde bokstaver og _",alphanumText:"Dette feltet skal kun inneholde bokstaver, tall og _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sorter stigende",sortDescText:"Sorter synkende",lockText:"Lås kolonne",unlockText:"Lås opp kolonne",columnsText:"Kolonner"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Navn",valueText:"Verdi",dateFormat:"d/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Dra for å endre størrelse.",collapsibleSplitTip:"Dra for å endre størrelse, dobbelklikk for å skjule."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-no.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-no.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-no.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,165 @@ +/* + * Norwegian translation + * By grEvenX 16-April-2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Laster...
      '; + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} markerte rader"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Lukk denne fanen"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Verdien i dette felter er ugyldig"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Laster..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "Mars", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Desember" +]; + +Date.dayNames = [ + "Søndag", + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Avbryt", + yes : "Ja", + no : "Nei" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "I dag", + minText : "Denne datoen er tidligere enn den tidligste tillatte", + maxText : "Denne datoen er senere enn den seneste tillatte", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Neste måned (Control+Pil Høyre)', + prevText : 'Forrige måned (Control+Pil Venstre)', + monthYearText : 'Velg en måned (Control+Pil Opp/Ned for å skifte år)', + todayTip : "{0} (mellomrom)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Side", + afterPageText : "av {0}", + firstText : "Første side", + prevText : "Forrige side", + nextText : "Neste side", + lastText : "Siste side", + refreshText : "Oppdater", + displayMsg : "Viser {0} - {1} of {2}", + emptyMsg : 'Ingen data å vise' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Den minste lengden for dette feltet er {0}", + maxLengthText : "Den største lengden for dette feltet er {0}", + blankText : "Dette feltet er påkrevd", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Den minste verdien for dette feltet er {0}", + maxText : "Den største verdien for dette feltet er {0}", + nanText : "{0} er ikke et gyldig nummer" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Deaktivert", + disabledDatesText : "Deaktivert", + minText : "Datoen i dette feltet må være etter {0}", + maxText : "Datoen i dette feltet må være før {0}", + invalidText : "{0} is not a valid date - it must be in the format {1}", + format : "m/d/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Laster...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dette feltet skal være en epost adresse i formatet "user@domain.com"', + urlText : 'Dette feltet skal være en link (URL) i formatet "http:/'+'/www.domain.com"', + alphaText : 'Dette feltet skal kun inneholde bokstaver og _', + alphanumText : 'Dette feltet skal kun inneholde bokstaver, tall og _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sorter stigende", + sortDescText : "Sorter synkende", + lockText : "Lås kolonne", + unlockText : "Lås opp kolonne", + columnsText : "Kolonner" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Navn", + valueText : "Verdi", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Dra for å endre størrelse.", + collapsibleSplitTip : "Dra for å endre størrelse, dobbelklikk for å skjule." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pl-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pl-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pl-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Wczytywanie danych...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} wybrano wiersze(y)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Zamknij zakładkę"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Wartość tego pola jest niewłaściwa"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Wczytywanie danych..."}Date.monthNames=["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"];Date.dayNames=["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Anuluj",yes:"Tak",no:"Nie"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"Y-m-d")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{startDay:1,todayText:"Dzisiaj",minText:"Data jest wcześniejsza od daty minimalnej",maxText:"Data jest późniejsza od daty maksymalnej",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Następny miesiąc (Control+StrzałkaWPrawo)",prevText:"Poprzedni miesiąc (Control+StrzałkaWLewo)",monthYearText:"Wybierz miesiąc (Control+Up/Down aby zmienić rok)",todayTip:"{0} (Spacja)",format:"Y-m-d"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Strona",afterPageText:"z {0}",firstText:"Pierwsza strona",prevText:"Poprzednia strona",nextText:"Następna strona",lastText:"Ostatnia strona",refreshText:"Odśwież",displayMsg:"Wyświetlono {0} - {1} z {2}",emptyMsg:"Brak danych do wyświetlenia"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minimalna ilość znaków dla tego pola to {0}",maxLengthText:"Maksymalna ilość znaków dla tego pola to {0}",blankText:"To pole jest wymagane",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Minimalna wartość dla tego pola to {0}",maxText:"Maksymalna wartość dla tego pola to {0}",nanText:"{0} to nie jest właściwa wartość"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Wyłączony",disabledDatesText:"Wyłączony",minText:"Data w tym polu musi być późniejsza od {0}",maxText:"Data w tym polu musi być wcześniejsza od {0}",invalidText:"{0} to nie jest prawidłowa data - prawidłowy format daty {1}",format:"Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Wczytuję...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"To pole wymaga podania adresu e-mail w formacie: \"nazwa@domena.pl\"",urlText:"To pole wymaga podania adresu strony www w formacie: \"http:/"+"/www.domena.pl\"",alphaText:"To pole wymaga podania tylko liter i _",alphanumText:"To pole wymaga podania tylko liter, cyfr i _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sortuj rosnąco",sortDescText:"Sortuj malejąco",lockText:"Zablokuj kolumnę",unlockText:"Odblokuj kolumnę",columnsText:"Kolumny"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Nazwa",valueText:"Wartość",dateFormat:"Y-m-d"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Przeciągnij aby zmienić rozmiar.",collapsibleSplitTip:"Przeciągnij aby zmienić rozmiar. Kliknij dwukrotnie aby ukryć."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pl.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pl.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,171 @@ +/** + * Polish Translations + * By vbert 17-April-2007 + * Encoding: utf-8 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Wczytywanie danych...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} wybrano wiersze(y)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zamknij zakładkę"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Wartość tego pola jest niewłaściwa"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Wczytywanie danych..."; +} + +Date.monthNames = [ + "Styczeń", + "Luty", + "Marzec", + "Kwiecień", + "Maj", + "Czerwiec", + "Lipiec", + "Sierpień", + "Wrzesień", + "Październik", + "Listopad", + "Grudzień" +]; + +Date.dayNames = [ + "Niedziela", + "Poniedziałek", + "Wtorek", + "Środa", + "Czwartek", + "Piątek", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Anuluj", + yes : "Tak", + no : "Nie" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y-m-d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + startDay : 1, + todayText : "Dzisiaj", + minText : "Data jest wcześniejsza od daty minimalnej", + maxText : "Data jest późniejsza od daty maksymalnej", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : "Następny miesiąc (Control+StrzałkaWPrawo)", + prevText : "Poprzedni miesiąc (Control+StrzałkaWLewo)", + monthYearText : "Wybierz miesiąc (Control+Up/Down aby zmienić rok)", + todayTip : "{0} (Spacja)", + format : "Y-m-d" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Strona", + afterPageText : "z {0}", + firstText : "Pierwsza strona", + prevText : "Poprzednia strona", + nextText : "Następna strona", + lastText : "Ostatnia strona", + refreshText : "Odśwież", + displayMsg : "Wyświetlono {0} - {1} z {2}", + emptyMsg : "Brak danych do wyświetlenia" + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimalna ilość znaków dla tego pola to {0}", + maxLengthText : "Maksymalna ilość znaków dla tego pola to {0}", + blankText : "To pole jest wymagane", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimalna wartość dla tego pola to {0}", + maxText : "Maksymalna wartość dla tego pola to {0}", + nanText : "{0} to nie jest właściwa wartość" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Wyłączony", + disabledDatesText : "Wyłączony", + minText : "Data w tym polu musi być późniejsza od {0}", + maxText : "Data w tym polu musi być wcześniejsza od {0}", + invalidText : "{0} to nie jest prawidłowa data - prawidłowy format daty {1}", + format : "Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Wczytuję...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'To pole wymaga podania adresu e-mail w formacie: "nazwa@domena.pl"', + urlText : 'To pole wymaga podania adresu strony www w formacie: "http:/'+'/www.domena.pl"', + alphaText : 'To pole wymaga podania tylko liter i _', + alphanumText : 'To pole wymaga podania tylko liter, cyfr i _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortuj rosnąco", + sortDescText : "Sortuj malejąco", + lockText : "Zablokuj kolumnę", + unlockText : "Odblokuj kolumnę", + columnsText : "Kolumny" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nazwa", + valueText : "Wartość", + dateFormat : "Y-m-d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Przeciągnij aby zmienić rozmiar.", + collapsibleSplitTip : "Przeciągnij aby zmienić rozmiar. Kliknij dwukrotnie aby ukryć." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pt_BR.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pt_BR.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pt_BR.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,252 @@ +/* + * Portuguese/Brazil Translation by Weber Souza + * 08 April 2007 + * Updated by Allan Brazute Alves (EthraZa) + * 06 September 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Carregando...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} linha(s) selecionada(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fechar"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "O valor para este campo é inválido"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Carregando..."; +} + +Date.monthNames = [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" +]; + +Date.dayNames = [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Cancelar", + yes : "Sim", + no : "Não" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Hoje", + minText : "Esta data é anterior a menor data", + maxText : "Esta data é posterior a maior data", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Próximo Mês (Control+Direita)', + prevText : 'Mês Anterior (Control+Esquerda)', + monthYearText : 'Escolha um Mês (Control+Cima/Baixo para mover entre os anos)', + todayTip : "{0} (Espaço)", + format : "d/m/Y", + okText : " OK ", + cancelText : "Cancelar", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Página", + afterPageText : "de {0}", + firstText : "Primeira Página", + prevText : "Página Anterior", + nextText : "Próxima Página", + lastText : "Última Página", + refreshText : "Atualizar", + displayMsg : "{0} à {1} de {2} registro(s)", + emptyMsg : 'Sem registros para exibir' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "O tamanho mínimo para este campo é {0}", + maxLengthText : "O tamanho máximo para este campo é {0}", + blankText : "Este campo é obrigatório.", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "O valor mínimo para este campo é {0}", + maxText : "O valor máximo para este campo é {0}", + nanText : "{0} não é um número válido" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Desabilitado", + disabledDatesText : "Desabilitado", + minText : "A data deste campo deve ser posterior a {0}", + maxText : "A data deste campo deve ser anterior a {0}", + invalidText : "{0} não é uma data válida - deve ser informado no formato {1}", + format : "d/m/Y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Carregando...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Este campo deve ser um endereço de e-mail válido, no formado "usuario@dominio.com.br"', + urlText : 'Este campo deve ser uma URL no formato "http:/'+'/www.dominio.com.br"', + alphaText : 'Este campo deve conter apenas letras e _', + alphanumText : 'Este campo deve conter apenas letras, números e _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Porfavor, entre com a URL do link:', + buttonTips : { + bold : { + title: 'Negrito (Ctrl+B)', + text: 'Deixa o texto selecionado em negrito.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italico (Ctrl+I)', + text: 'Deixa o texto selecionado em italico.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Sublinhado (Ctrl+U)', + text: 'Sublinha o texto selecionado.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Aumentar Texto', + text: 'Aumenta o tamanho da fonte.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Diminuir Texto', + text: 'Diminui o tamanho da fonte.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Cor de Fundo', + text: 'Muda a cor do fundo do texto selecionado.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Cor da Fonte', + text: 'Muda a cor do texto selecionado.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Alinhar à Esquerda', + text: 'Alinha o texto à esquerda.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centralizar Texto', + text: 'Centraliza o texto no editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Alinhar à Direita', + text: 'Alinha o texto à direita.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Lista com Marcadores', + text: 'Inicia uma lista com marcadores.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Lista Numerada', + text: 'Inicia uma lista numerada.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperligação', + text: 'Transforma o texto selecionado em um hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Editar Fonte', + text: 'Troca para o modo de edição de código fonte.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Ordem Ascendente", + sortDescText : "Ordem Descendente", + lockText : "Bloquear Coluna", + unlockText : "Desbloquear Coluna", + columnsText : "Colunas" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nome", + valueText : "Valor", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Arraste para redimencionar.", + collapsibleSplitTip : "Arraste para redimencionar. Duplo clique para esconder." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pt_br-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pt_br-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-pt_br-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Carregando...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} linha(s) selecionada(s)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Fechar"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="O valor para este campo é inválido"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Carregando..."}Date.monthNames=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"];Date.dayNames=["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Cancelar",yes:"Sim",no:"Não"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Hoje",minText:"Esta data é anterior a menor data",maxText:"Esta data é posterior a maior data",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Próximo Mês (Control+Direita)",prevText:"Mês Anterior (Control+Esquerda)",monthYearText:"Escolha um Mês (Control+Cima/Baixo para mover entre os anos)",todayTip:"{0} (Espaço)",format:"d/m/Y",okText:" OK ",cancelText:"Cancelar",startDay:0})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Página",afterPageText:"de {0}",firstText:"Primeira Página",prevText:"Página Anterior",nextText:"Próxima Página",lastText:"Última Página",refreshText:"Atualizar",displayMsg:"{0} à {1} de {2} registro(s)",emptyMsg:"Sem registros para exibir"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"O tamanho mínimo para este campo é {0}",maxLengthText:"O tamanho máximo para este campo é {0}",blankText:"Este campo é obrigatório.",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"O valor mínimo para este campo é {0}",maxText:"O valor máximo para este campo é {0}",nanText:"{0} não é um número válido"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Desabilitado",disabledDatesText:"Desabilitado",minText:"A data deste campo deve ser posterior a {0}",maxText:"A data deste campo deve ser anterior a {0}",invalidText:"{0} não é uma data válida - deve ser informado no formato {1}",format:"d/m/Y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Carregando...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Este campo deve ser um endereço de e-mail válido, no formado \"usuario@dominio.com.br\"",urlText:"Este campo deve ser uma URL no formato \"http:/"+"/www.dominio.com.br\"",alphaText:"Este campo deve conter apenas letras e _",alphanumText:"Este campo deve conter apenas letras, números e _"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Porfavor, entre com a URL do link:",buttonTips:{bold:{title:"Negrito (Ctrl+B)",text:"Deixa o texto selecionado em negrito.",cls:"x-html-editor-tip"},italic:{title:"Italico (Ctrl+I)",text:"Deixa o texto selecionado em italico.",cls:"x-html-editor-tip"},underline:{title:"Sublinhado (Ctrl+U)",text:"Sublinha o texto selecionado.",cls:"x-html-editor-tip"},increasefontsize:{title:"Aumentar Texto",text:"Aumenta o tamanho da fonte.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Diminuir Texto",text:"Diminui o tamanho da fonte.",cls:"x-html-editor-tip"},backcolor:{title:"Cor de Fundo",text:"Muda a cor do fundo do texto selecionado.",cls:"x-html-editor-tip"},forecolor:{title:"Cor da Fonte",text:"Muda a cor do texto selecionado.",cls:"x-html-editor-tip"},justifyleft:{title:"Alinhar à Esquerda",text:"Alinha o texto à esquerda.",cls:"x-html-editor-tip"},justifycenter:{title:"Centralizar Texto",text:"Centraliza o texto no editor.",cls:"x-html-editor-tip"},justifyright:{title:"Alinhar à Direita",text:"Alinha o texto à direita.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Lista com Marcadores",text:"Inicia uma lista com marcadores.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Lista Numerada",text:"Inicia uma lista numerada.",cls:"x-html-editor-tip"},createlink:{title:"Hyperligação",text:"Transforma o texto selecionado em um hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Editar Fonte",text:"Troca para o modo de edição de código fonte.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Ordem Ascendente",sortDescText:"Ordem Descendente",lockText:"Bloquear Coluna",unlockText:"Desbloquear Coluna",columnsText:"Colunas"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Nome",valueText:"Valor",dateFormat:"d/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Arraste para redimencionar.",collapsibleSplitTip:"Arraste para redimencionar. Duplo clique para esconder."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ro-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ro-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ro-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Încărcare...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} rând(uri) selectate"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Închide acest tab"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Valoarea acestui câmp este invalidă"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Încărcare..."}Date.monthNames=["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"];Date.dayNames=["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Renunţă",yes:"Da",no:"Nu"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d-m-Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Astăzi",minText:"Această zi este înaintea datei de început",maxText:"Această zi este după ultimul termen",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Următoarea lună (Control+Right)",prevText:"Luna anterioară (Control+Left)",monthYearText:"Alege o lună (Control+Up/Down pentru a parcurge anii)",todayTip:"{0} (Spacebar)",format:"d-m-y"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Pagina",afterPageText:"din {0}",firstText:"Prima pagină",prevText:"Pagina precedentă",nextText:"Următoarea pagină",lastText:"Ultima pagină",refreshText:"Reîmprospătare",displayMsg:"Afişează {0} - {1} din {2}",emptyMsg:"Nu sunt date de afişat"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Lungimea minimă pentru acest câmp este de {0}",maxLengthText:"Lungimea maximă pentru acest câmp este {0}",blankText:"Acest câmp este obligatoriu",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Valoarea minimă permisă a acestui câmp este {0}",maxText:"Valaorea maximă permisă a acestui câmp este {0}",nanText:"{0} nu este un număr valid"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Inactiv",disabledDatesText:"Inactiv",minText:"Data acestui câmp trebuie să fie după {0}",maxText:"Data acestui câmp trebuie sa fie înainte de {0}",invalidText:"{0} nu este o dată validă - trebuie să fie în formatul {1}",format:"d-m-y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Încărcare...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Acest câmp trebuie să conţină o adresă de e-mail în formatul \"user@domain.com\"",urlText:"Acest câmp trebuie să conţină o adresă URL în formatul \"http:/"+"/www.domain.com\"",alphaText:"Acest câmp trebuie să conţină doar litere şi _",alphanumText:"Acest câmp trebuie să conţină doar litere, cifre şi _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sortare ascendentă",sortDescText:"Sortare descendentă",lockText:"Blochează coloana",unlockText:"Deblochează coloana",columnsText:"Coloane"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Nume",valueText:"Valoare",dateFormat:"m/j/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Trage pentru redimensionare.",collapsibleSplitTip:"Trage pentru redimensionare. Dublu-click pentru ascundere."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ro.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ro.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ro.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,169 @@ +/** + * Translation by Lucian Lature 04-24-2007 + * Romanian Translations + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Încărcare...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} rând(uri) selectate"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Închide acest tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Valoarea acestui câmp este invalidă"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Încărcare..."; +} + +Date.monthNames = [ + "Ianuarie", + "Februarie", + "Martie", + "Aprilie", + "Mai", + "Iunie", + "Iulie", + "August", + "Septembrie", + "Octombrie", + "Noiembrie", + "Decembrie" +]; + +Date.dayNames = [ + "Duminică", + "Luni", + "Marţi", + "Miercuri", + "Joi", + "Vineri", + "Sâmbătă" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Renunţă", + yes : "Da", + no : "Nu" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d-m-Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Astăzi", + minText : "Această zi este înaintea datei de început", + maxText : "Această zi este după ultimul termen", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Următoarea lună (Control+Right)', + prevText : 'Luna anterioară (Control+Left)', + monthYearText : 'Alege o lună (Control+Up/Down pentru a parcurge anii)', + todayTip : "{0} (Spacebar)", + format : "d-m-y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Pagina", + afterPageText : "din {0}", + firstText : "Prima pagină", + prevText : "Pagina precedentă", + nextText : "Următoarea pagină", + lastText : "Ultima pagină", + refreshText : "Reîmprospătare", + displayMsg : "Afişează {0} - {1} din {2}", + emptyMsg : 'Nu sunt date de afişat' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Lungimea minimă pentru acest câmp este de {0}", + maxLengthText : "Lungimea maximă pentru acest câmp este {0}", + blankText : "Acest câmp este obligatoriu", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Valoarea minimă permisă a acestui câmp este {0}", + maxText : "Valaorea maximă permisă a acestui câmp este {0}", + nanText : "{0} nu este un număr valid" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Inactiv", + disabledDatesText : "Inactiv", + minText : "Data acestui câmp trebuie să fie după {0}", + maxText : "Data acestui câmp trebuie sa fie înainte de {0}", + invalidText : "{0} nu este o dată validă - trebuie să fie în formatul {1}", + format : "d-m-y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Încărcare...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Acest câmp trebuie să conţină o adresă de e-mail în formatul "user@domain.com"', + urlText : 'Acest câmp trebuie să conţină o adresă URL în formatul "http:/'+'/www.domain.com"', + alphaText : 'Acest câmp trebuie să conţină doar litere şi _', + alphanumText : 'Acest câmp trebuie să conţină doar litere, cifre şi _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortare ascendentă", + sortDescText : "Sortare descendentă", + lockText : "Blochează coloana", + unlockText : "Deblochează coloana", + columnsText : "Coloane" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nume", + valueText : "Valoare", + dateFormat : "m/j/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Trage pentru redimensionare.", + collapsibleSplitTip : "Trage pentru redimensionare. Dublu-click pentru ascundere." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ru-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ru-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ru-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ru.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ru.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ru.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,267 @@ +/* + * Russian translation + * By ZooKeeper (utf-8 encoding) + * 12 October 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Идет загрузка...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} выбранных строк"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Закрыть эту вкладку"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Значение в этом поле неверное"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Загрузка..."; +} + +Date.monthNames = [ + "Январь", + "Февраль", + "Март", + "Апрель", + "Май", + "Июнь", + "Июль", + "Август", + "Сентябрь", + "Октябрь", + "Ноябрь", + "Декабрь" +]; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.dayNames = [ + "Воскресенье", + "Понедельник", + "Вторник", + "Среда", + "Четверг", + "Пятница", + "Суббота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Отмена", + yes : "Да", + no : "Нет" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Сегодня", + minText : "Эта дата раньше минимальной даты", + maxText : "Эта дата позже максимальной даты", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Следующий месяц (Control+Вправо)', + prevText : 'Предыдущий месяц (Control+Влево)', + monthYearText : 'Выбор месяца (Control+Вверх/Вниз для выбора года)', + todayTip : "{0} (Пробел)", + format : "d.m.y", + okText : " OK ", + cancelText : "Отмена", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Страница", + afterPageText : "из {0}", + firstText : "Первая страница", + prevText : "Предыдущая страница", + nextText : "Следующая страница", + lastText : "Последняя страница", + refreshText : "Обновить", + displayMsg : "Отображаются записи с {0} по {1}, всего {2}", + emptyMsg : 'Нет данных для отображения' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Минимальная длина этого поля {0}", + maxLengthText : "Максимальная длина этого поля {0}", + blankText : "Это поле обязательно для заполнения", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Значение этого поля не может быть меньше {0}", + maxText : "Значение этого поля не может быть больше {0}", + nanText : "{0} не является числом" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Не доступно", + disabledDatesText : "Не доступно", + minText : "Дата в этом поле должна быть позде {0}", + maxText : "Дата в этом поле должна быть раньше {0}", + invalidText : "{0} не является правильной датой - дата должна быть указана в формате {1}", + format : "d.m.y", + altFormats : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Загрузка...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Это поле должно содержать адрес электронной почты в формате "user@domain.com"', + urlText : 'Это поле должно содержать URL в формате "http:/'+'/www.domain.com"', + alphaText : 'Это поле должно содержать только латинские буквы и символ подчеркивания "_"', + alphanumText : 'Это поле должно содержать только латинские буквы, цифры и символ подчеркивания "_"' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Пожалуйста введите адрес:', + buttonTips : { + bold : { + title: 'Полужирный (Ctrl+B)', + text: 'Применение полужирного начертания к выделенному тексту.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Курсив (Ctrl+I)', + text: 'Применение курсивного начертания к выделенному тексту.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Подчёркнутый (Ctrl+U)', + text: 'Подчёркивание выделенного текста.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Увеличить размер', + text: 'Увеличение размера шрифта.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Уменьшить размер', + text: 'Уменьшение размера шрифта.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Заливка', + text: 'Изменение цвета фона для выделенного текста или абзаца.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Цвет текста', + text: 'Измение цвета текста.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Выровнять текст по левому краю', + text: 'Выровнивание текста по левому краю.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'По центру', + text: 'Выровнивание текста по центру.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Выровнять текст по правому краю', + text: 'Выровнивание текста по правому краю.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Маркеры', + text: 'Начать маркированный список.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Нумерация', + text: 'Начать нумернованный список.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Вставить гиперссылку', + text: 'Создание ссылки из выделенного текста.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Исходный код', + text: 'Переключиться на исходный код.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Сортировать по возрастанию", + sortDescText : "Сортировать по убыванию", + lockText : "Закрепить столбец", + unlockText : "Снять закрепление столбца", + columnsText : "Столбцы" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Название", + valueText : "Значение", + dateFormat : "j.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Тяните для изменения размера.", + collapsibleSplitTip : "Тяните для изменения размера. Двойной щелчок спрячет панель." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sk-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sk-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sk-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Nahrávam...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} oznaèených riadkov"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Zavrie�? túto záložku"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Hodnota v tomto poli je nesprávna"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Nahrávam..."}Date.monthNames=["Január","Február","Marec","Apr�l","Máj","Jún","Júl","August","September","Október","November","December"];Date.dayNames=["NedeŸa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Zruši�?",yes:"�?no",no:"Nie"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"m/d/R")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Dnes",minText:"Tento dátum je menš� ako minimálny možný dátum",maxText:"Tento dátum je väèš� ako maximálny možný dátum",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"�?alš� Mesiac (Control+Doprava)",prevText:"Predch. Mesiac (Control+DoŸava)",monthYearText:"Vyberte Mesiac (Control+Hore/Dole pre posun rokov)",todayTip:"{0} (Medzern�k)",format:"m/d/r"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Strana",afterPageText:"z {0}",firstText:"Prvá Strana",prevText:"Predch. Strana",nextText:"�?alšia Strana",lastText:"Posledná strana",refreshText:"Obnovi�?",displayMsg:"Zobrazujem {0} - {1} z {2}",emptyMsg:"Žiadne dáta"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minimálna dåžka pre toto pole je {0}",maxLengthText:"Maximálna dåžka pre toto pole je {0}",blankText:"Toto pole je povinné",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Minimálna hodnota pre toto pole je {0}",maxText:"Maximálna hodnota pre toto pole je {0}",nanText:"{0} je nesprávne è�slo"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Zablokované",disabledDatesText:"Zablokované",minText:"Dátum v tomto poli mus� by�? až po {0}",maxText:"Dátum v tomto poli mus� by�? pred {0}",invalidText:"{0} nie je správny dátum - mus� by�? vo formáte {1}",format:"m/d/r"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Nahrávam...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Toto pole mus� by�? e-mailová adresa vo formáte \"user@domain.com\"",urlText:"Toto pole mus� by�? URL vo formáte \"http:/"+"/www.domain.com\"",alphaText:"Toto poŸe može obsahova�? iba p�smená a znak _",alphanumText:"Toto poŸe može obsahova�? iba p�smená,è�sla a znak _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Zoradi�? vzostupne",sortDescText:"Zoradi�? zostupne",lockText:"Zamknú�? ståpec",unlockText:"Odomknú�? stŸpec",columnsText:"Ståpce"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Názov",valueText:"Hodnota",dateFormat:"m/j/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Potiahnite pre zmenu rozmeru",collapsibleSplitTip:"Potiahnite pre zmenu rozmeru. Dvojklikom schováte."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sk.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sk.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sk.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,176 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + + /* Slovak Translation by Michal Thomka + * 14 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Nahrávam...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} oznaèených riadkov"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zavrie túto záložku"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je nesprávna"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Nahrávam..."; +} + +Date.monthNames = [ + "Január", + "Február", + "Marec", + "Apríl", + "Máj", + "Jún", + "Júl", + "August", + "September", + "Október", + "November", + "December" +]; + +Date.dayNames = [ + "NedeŸa", + "Pondelok", + "Utorok", + "Streda", + "Štvrtok", + "Piatok", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Zruši", + yes : "Áno", + no : "Nie" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m/d/R"); + }; +} + + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Dnes", + minText : "Tento dátum je menší ako minimálny možný dátum", + maxText : "Tento dátum je väèší ako maximálny možný dátum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Ïalší Mesiac (Control+Doprava)', + prevText : 'Predch. Mesiac (Control+DoŸava)', + monthYearText : 'Vyberte Mesiac (Control+Hore/Dole pre posun rokov)', + todayTip : "{0} (Medzerník)", + format : "m/d/r" + }); +} + + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Strana", + afterPageText : "z {0}", + firstText : "Prvá Strana", + prevText : "Predch. Strana", + nextText : "Ïalšia Strana", + lastText : "Posledná strana", + refreshText : "Obnovi", + displayMsg : "Zobrazujem {0} - {1} z {2}", + emptyMsg : 'Žiadne dáta' + }); +} + + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimálna dåžka pre toto pole je {0}", + maxLengthText : "Maximálna dåžka pre toto pole je {0}", + blankText : "Toto pole je povinné", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimálna hodnota pre toto pole je {0}", + maxText : "Maximálna hodnota pre toto pole je {0}", + nanText : "{0} je nesprávne èíslo" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Zablokované", + disabledDatesText : "Zablokované", + minText : "Dátum v tomto poli musí by až po {0}", + maxText : "Dátum v tomto poli musí by pred {0}", + invalidText : "{0} nie je správny dátum - musí by vo formáte {1}", + format : "m/d/r" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Nahrávam...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Toto pole musí by e-mailová adresa vo formáte "user@domain.com"', + urlText : 'Toto pole musí by URL vo formáte "http:/'+'/www.domain.com"', + alphaText : 'Toto poŸe može obsahova iba písmená a znak _', + alphanumText : 'Toto poŸe može obsahova iba písmená,èísla a znak _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Zoradi vzostupne", + sortDescText : "Zoradi zostupne", + lockText : "Zamknú ståpec", + unlockText : "Odomknú stŸpec", + columnsText : "Ståpce" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Názov", + valueText : "Hodnota", + dateFormat : "m/j/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Potiahnite pre zmenu rozmeru", + collapsibleSplitTip : "Potiahnite pre zmenu rozmeru. Dvojklikom schováte." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sl-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sl-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sl-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Nalagam...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} izbranih vrstic"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Zapri zavihek"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Neveljavna vrednost"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Nalagam..."}Date.monthNames=["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"];Date.dayNames=["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"V redu",cancel:"Prekli�?i",yes:"Da",no:"Ne"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d.m.Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Danes",minText:"Navedeni datum je pred spodnjim datumom",maxText:"Navedeni datum je za zgornjim datumom",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Naslednji mesec (Control+Desno)",prevText:"Prejšnji mesec (Control+Levo)",monthYearText:"Izberite mesec (Control+Gor/Dol za premik let)",todayTip:"{0} (Preslednica)",format:"d.m.y",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Stran",afterPageText:"od {0}",firstText:"Prva stran",prevText:"Prejšnja stran",nextText:"Naslednja stran",lastText:"Zadnja stran",refreshText:"Osveži",displayMsg:"Prikazujem {0} - {1} od {2}",emptyMsg:"Ni podatkov za prikaz"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minimalna dolžina tega polja je {0}",maxLengthText:"Maksimalna dolžina tega polja je {0}",blankText:"To polje je obvezno",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Minimalna vrednost tega polja je {0}",maxText:"Maksimalna vrednost tega polja je {0}",nanText:"{0} ni veljavna številka"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Onemogo�?en",disabledDatesText:"Onemogo�?en",minText:"Datum mora biti po {0}",maxText:"Datum mora biti pred {0}",invalidText:"{0} ni veljaven datum - mora biti v tem formatu {1}",format:"d.m.y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Nalagam...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"To polje je e-mail naslov formata \"ime@domena.si\"",urlText:"To polje je URL naslov formata \"http:/"+"/www.domena.si\"",alphaText:"To polje lahko vsebuje samo �?rke in _",alphanumText:"To polje lahko vsebuje samo �?rke, številke in _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sortiraj naraš�?ajo�?e",sortDescText:"Sortiraj padajo�?e",lockText:"Zakleni stolpec",unlockText:"Odkleni stolpec",columnsText:"Stolpci"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Ime",valueText:"Vrednost",dateFormat:"j.m.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Potegni za razširitev.",collapsibleSplitTip:"Potegni za razširitev. Dvojni klik, �?e želite skriti."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sl.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sl.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,170 @@ +/** + * Slovenian translation by Matjaž (UTF-8 encoding) + * 25 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Nalagam...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} izbranih vrstic"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zapri zavihek"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Neveljavna vrednost"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Nalagam..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "Marec", + "April", + "Maj", + "Junij", + "Julij", + "Avgust", + "September", + "Oktober", + "November", + "December" +]; + +Date.dayNames = [ + "Nedelja", + "Ponedeljek", + "Torek", + "Sreda", + "Četrtek", + "Petek", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "V redu", + cancel : "Prekliči", + yes : "Da", + no : "Ne" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Danes", + minText : "Navedeni datum je pred spodnjim datumom", + maxText : "Navedeni datum je za zgornjim datumom", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Naslednji mesec (Control+Desno)', + prevText : 'Prejšnji mesec (Control+Levo)', + monthYearText : 'Izberite mesec (Control+Gor/Dol za premik let)', + todayTip : "{0} (Preslednica)", + format : "d.m.y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Stran", + afterPageText : "od {0}", + firstText : "Prva stran", + prevText : "Prejšnja stran", + nextText : "Naslednja stran", + lastText : "Zadnja stran", + refreshText : "Osveži", + displayMsg : "Prikazujem {0} - {1} od {2}", + emptyMsg : 'Ni podatkov za prikaz' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimalna dolžina tega polja je {0}", + maxLengthText : "Maksimalna dolžina tega polja je {0}", + blankText : "To polje je obvezno", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimalna vrednost tega polja je {0}", + maxText : "Maksimalna vrednost tega polja je {0}", + nanText : "{0} ni veljavna številka" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Onemogočen", + disabledDatesText : "Onemogočen", + minText : "Datum mora biti po {0}", + maxText : "Datum mora biti pred {0}", + invalidText : "{0} ni veljaven datum - mora biti v tem formatu {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Nalagam...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'To polje je e-mail naslov formata "ime@domena.si"', + urlText : 'To polje je URL naslov formata "http:/'+'/www.domena.si"', + alphaText : 'To polje lahko vsebuje samo črke in _', + alphanumText : 'To polje lahko vsebuje samo črke, številke in _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortiraj naraščajoče", + sortDescText : "Sortiraj padajoče", + lockText : "Zakleni stolpec", + unlockText : "Odkleni stolpec", + columnsText : "Stolpci" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Ime", + valueText : "Vrednost", + dateFormat : "j.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Potegni za razširitev.", + collapsibleSplitTip : "Potegni za razširitev. Dvojni klik, če želite skriti." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sp-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sp-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sp-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Cargando...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} fila(s) seleccionada(s)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Cerrar esta pestaña"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="El valor en este campo es inválido"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Cargando..."}Date.monthNames=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];Date.dayNames=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"Aceptar",cancel:"Cancelar",yes:"Sí",no:"No"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d/m/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Hoy",minText:"Esta fecha es anterior a la fecha mínima",maxText:"Esta fecha es posterior a la fecha máxima",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Mes Siguiente (Control+Right)",prevText:"Mes Anterior (Control+Left)",monthYearText:"Seleccione un mes (Control+Up/Down para desplazar el año)",todayTip:"{0} (Barra espaciadora)",format:"d/m/Y"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Página",afterPageText:"de {0}",firstText:"Primera página",prevText:"Página anterior",nextText:"Página siguiente",lastText:"Última página",refreshText:"Actualizar",displayMsg:"Mostrando {0} - {1} de {2}",emptyMsg:"Sin datos para mostrar"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"El tamaño mínimo para este campo es de {0}",maxLengthText:"El tamaño máximo para este campo es de {0}",blankText:"Este campo es obligatorio",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"El valor mínimo para este campo es de {0}",maxText:"El valor máximo para este campo es de {0}",nanText:"{0} no es un número válido"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Deshabilitado",disabledDatesText:"Deshabilitado",minText:"La fecha para este campo debe ser posterior a {0}",maxText:"La fecha para este campo debe ser anterior a {0}",invalidText:"{0} no es una fecha válida - debe tener el formato {1}",format:"d/m/Y",altFormats:"d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Cargando...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Este campo debe ser una dirección de correo electrónico con el formato \"usuario@dominio.com\"",urlText:"Este campo debe ser una URL con el formato \"http:/"+"/www.dominio.com\"",alphaText:"Este campo solo debe contener letras y _",alphanumText:"Este campo solo debe contener letras, números y _"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Por favor, ingrese la direccion URL para el enlace:",buttonTips:{insertimage:{title:"Imagen",text:"Inserta una imagen en la posición actual",cls:"x-html-editor-tip"},bold:{title:"Negrita (Ctrl+B)",text:"Pone el texto seleccionado en negrita.",cls:"x-html-editor-tip"},italic:{title:"Italica (Ctrl+I)",text:"Pone el texto seleccionado ent italica.",cls:"x-html-editor-tip"},underline:{title:"Linea Baja (Ctrl+U)",text:"Pone un linea bajo el texto seleccionado.",cls:"x-html-editor-tip"},increasefontsize:{title:"Incrementar Texto",text:"Incrementa el tamaño de la fuente.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Decrementar Texto",text:"Decrementa el tamaño de la fuente.",cls:"x-html-editor-tip"},backcolor:{title:"Color de fondo",text:"Cambia el color de fondo del texto seleccionado.",cls:"x-html-editor-tip"},forecolor:{title:"Color de la fuente",text:"Cambia el color de la fuente del texto seleccionado.",cls:"x-html-editor-tip"},justifyleft:{title:"Alinear a la izquierda",text:"Alinea el texto a la izquierda.",cls:"x-html-editor-tip"},justifycenter:{title:"Centrar el texto",text:"Centra el texto en el editor.",cls:"x-html-editor-tip"},justifyright:{title:"Alinear a la derecha",text:"Alinea el texto a la derecha.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Lista tachada",text:"Comienza una lista tachada.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Lista numerada",text:"Comienza una lista numerada.",cls:"x-html-editor-tip"},createlink:{title:"Enlace",text:"Convierte el texto seleccionado en un enlace.",cls:"x-html-editor-tip"},sourceedit:{title:"Editar codigo",text:"Cambia al modo de edición de codigo fuente.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Ordenar en forma ascendente",sortDescText:"Ordenar en forma descendente",lockText:"Bloquear Columna",unlockText:"Desbloquear Columna",columnsText:"Columnas"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Nombre",valueText:"Valor",dateFormat:"j/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Arrastre para redimensionar.",collapsibleSplitTip:"Arrastre para redimensionar. Doble clic para ocultar."})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Por favor proporcione el URL para el enlace:",buttonTips:{bold:{title:"Negritas (Ctrl+B)",text:"Transforma el texto seleccionado en Negritas.",cls:"x-html-editor-tip"},italic:{title:"Italica (Ctrl+I)",text:"Transforma el texto seleccionado en Italicas.",cls:"x-html-editor-tip"},underline:{title:"Subrayado (Ctrl+U)",text:"Subraya el texto seleccionado.",cls:"x-html-editor-tip"},increasefontsize:{title:"Aumentar la fuente",text:"Aumenta el tamaño de la fuente",cls:"x-html-editor-tip"},decreasefontsize:{title:"Reducir la fuente",text:"Reduce el tamaño de la fuente.",cls:"x-html-editor-tip"},backcolor:{title:"Color de fondo",text:"Modifica el color de fondo del texto seleccionado.",cls:"x-html-editor-tip"},forecolor:{title:"Color de la fuente",text:"Modifica el color del texto seleccionado.",cls:"x-html-editor-tip"},justifyleft:{title:"Alinear a la izquierda",text:"Alinea el texto a la izquierda.",cls:"x-html-editor-tip"},justifycenter:{title:"Centrar",text:"Centrar el texto.",cls:"x-html-editor-tip"},justifyright:{title:"Alinear a la derecha",text:"Alinea el texto a la derecha.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Lista de viñetas",text:"Inicia una lista con viñetas.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Lista numerada",text:"Inicia una lista numerada.",cls:"x-html-editor-tip"},createlink:{title:"Enlace",text:"Inserta un enlace de hipertexto.",cls:"x-html-editor-tip"},sourceedit:{title:"Codigo Fuente",text:"Pasar al modo de edicion de codigo fuente.",cls:"x-html-editor-tip"}}})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sp.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sp.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sp.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,332 @@ +/* + * Spanish/Latin American Translation by genius551v 04-08-2007 + * Revised by efege, 2007-04-15. + * Revised by Rafaga2k 10-01-2007 (mm/dd/yyyy) + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Cargando...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} fila(s) seleccionada(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Cerrar esta pestaña"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "El valor en este campo es inválido"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Cargando..."; +} + +Date.monthNames = [ + "Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Septiembre", + "Octubre", + "Noviembre", + "Diciembre" +]; + +Date.dayNames = [ + "Domingo", + "Lunes", + "Martes", + "Miércoles", + "Jueves", + "Viernes", + "Sábado" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Aceptar", + cancel : "Cancelar", + yes : "Sí", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Hoy", + minText : "Esta fecha es anterior a la fecha mínima", + maxText : "Esta fecha es posterior a la fecha máxima", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Mes Siguiente (Control+Right)', + prevText : 'Mes Anterior (Control+Left)', + monthYearText : 'Seleccione un mes (Control+Up/Down para desplazar el año)', + todayTip : "{0} (Barra espaciadora)", + format : "d/m/Y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Página", + afterPageText : "de {0}", + firstText : "Primera página", + prevText : "Página anterior", + nextText : "Página siguiente", + lastText : "Última página", + refreshText : "Actualizar", + displayMsg : "Mostrando {0} - {1} de {2}", + emptyMsg : 'Sin datos para mostrar' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "El tamaño mínimo para este campo es de {0}", + maxLengthText : "El tamaño máximo para este campo es de {0}", + blankText : "Este campo es obligatorio", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "El valor mínimo para este campo es de {0}", + maxText : "El valor máximo para este campo es de {0}", + nanText : "{0} no es un número válido" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Deshabilitado", + disabledDatesText : "Deshabilitado", + minText : "La fecha para este campo debe ser posterior a {0}", + maxText : "La fecha para este campo debe ser anterior a {0}", + invalidText : "{0} no es una fecha válida - debe tener el formato {1}", + format : "d/m/Y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Cargando...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Este campo debe ser una dirección de correo electrónico con el formato "usuario@dominio.com"', + urlText : 'Este campo debe ser una URL con el formato "http:/'+'/www.dominio.com"', + alphaText : 'Este campo solo debe contener letras y _', + alphanumText : 'Este campo solo debe contener letras, números y _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Por favor, ingrese la direccion URL para el enlace:', + buttonTips : { + insertimage:{ + title:'Imagen', + text:'Inserta una imagen en la posición actual', + cls:'x-html-editor-tip' + }, + bold : { + title: 'Negrita (Ctrl+B)', + text: 'Pone el texto seleccionado en negrita.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italica (Ctrl+I)', + text: 'Pone el texto seleccionado ent italica.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Linea Baja (Ctrl+U)', + text: 'Pone un linea bajo el texto seleccionado.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Incrementar Texto', + text: 'Incrementa el tamaño de la fuente.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Decrementar Texto', + text: 'Decrementa el tamaño de la fuente.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Color de fondo', + text: 'Cambia el color de fondo del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Color de la fuente', + text: 'Cambia el color de la fuente del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Alinear a la izquierda', + text: 'Alinea el texto a la izquierda.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centrar el texto', + text: 'Centra el texto en el editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Alinear a la derecha', + text: 'Alinea el texto a la derecha.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Lista tachada', + text: 'Comienza una lista tachada.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Lista numerada', + text: 'Comienza una lista numerada.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Enlace', + text: 'Convierte el texto seleccionado en un enlace.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Editar codigo', + text: 'Cambia al modo de edición de codigo fuente.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Ordenar en forma ascendente", + sortDescText : "Ordenar en forma descendente", + lockText : "Bloquear Columna", + unlockText : "Desbloquear Columna", + columnsText : "Columnas" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nombre", + valueText : "Valor", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Arrastre para redimensionar.", + collapsibleSplitTip : "Arrastre para redimensionar. Doble clic para ocultar." + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : "Por favor proporcione el URL para el enlace:", + buttonTips : { + bold : { + title: 'Negritas (Ctrl+B)', + text: 'Transforma el texto seleccionado en Negritas.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italica (Ctrl+I)', + text: 'Transforma el texto seleccionado en Italicas.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Subrayado (Ctrl+U)', + text: 'Subraya el texto seleccionado.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Aumentar la fuente', + text: 'Aumenta el tamaño de la fuente', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Reducir la fuente', + text: 'Reduce el tamaño de la fuente.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Color de fondo', + text: 'Modifica el color de fondo del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Color de la fuente', + text: 'Modifica el color del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Alinear a la izquierda', + text: 'Alinea el texto a la izquierda.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centrar', + text: 'Centrar el texto.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Alinear a la derecha', + text: 'Alinea el texto a la derecha.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Lista de viñetas', + text: 'Inicia una lista con viñetas.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Lista numerada', + text: 'Inicia una lista numerada.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Enlace', + text: 'Inserta un enlace de hipertexto.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Codigo Fuente', + text: 'Pasar al modo de edicion de codigo fuente.', + cls: 'x-html-editor-tip' + } + } + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      U�?itavam...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} izabranih redova"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Zatvori оvu »karticu«"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Unešena vrednost nije pravilna"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="U�?itavam..."}Date.monthNames=["Januar","Februar","Mart","April","Мај","Jun","Јul","Avgust","Septembar","Oktobar","Novembar","Decembar"];Date.dayNames=["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"U redu",cancel:"Odustani",yes:"Da",no:"Ne"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"d.m.Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Danas",minText:"Datum је ispred najmanjeg dozvoljenog datuma",maxText:"Datum је nakon najvećeg dozvoljenog datuma",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Sledeći mesec (Control+Desno)",prevText:"Prethodni mesec (Control+Levo)",monthYearText:"Izaberite mesec (Control+Gore/Dole za izbor godine)",todayTip:"{0} (Razmaknica)",format:"d.m.y",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Strana",afterPageText:"od {0}",firstText:"Prva strana",prevText:"Prethodna strana",nextText:"Sledeća strana",lastText:"Poslednja strana",refreshText:"Osveži",displayMsg:"Prikazana {0} - {1} od {2}",emptyMsg:"Nemam šta prikazati"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minimalna dužina ovog polja је {0}",maxLengthText:"Maksimalna dužina ovog polja је {0}",blankText:"Polje је obavezno",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Minimalna vrednost u polju је {0}",maxText:"Maksimalna vrednost u polju је {0}",nanText:"{0} nije pravilan broj"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Pasivno",disabledDatesText:"Pasivno",minText:"Datum u ovom polju mora biti nakon {0}",maxText:"Datum u ovom polju mora biti pre {0}",invalidText:"{0} nije pravilan datum - zahtevani oblik je {1}",format:"d.m.y",altFormats:"d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"U�?itavam...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Ovo polje prihavata e-mail adresu isklju�?ivo u obliku \"korisnik@domen.com\"",urlText:"Ovo polje prihavata URL adresu isklju�?ivo u obliku \"http:/"+"/www.domen.com\"",alphaText:"Ovo polje može sadržati isklju�?ivo slova i znak _",alphanumText:"Ovo polje može sadržati �?амо slova, brojeve i znak _"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Rastući redosled",sortDescText:"Opadajući redosled",lockText:"Zaklju�?aj kolonu",unlockText:"Otklju�?aj kolonu",columnsText:"Kolone"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Naziv",valueText:"Vrednost",dateFormat:"d.m.Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Povući za izmenu veli�?ine.",collapsibleSplitTip:"Povući za izmenu veli�?ine. Dvostruku klik za skivanje."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr_RS-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr_RS-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr_RS-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr_RS.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr_RS.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sr_RS.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,172 @@ +/* + * Serbian Cyrillic Translation + * by Čolovic Vladan (cyrillic, utf8 encoding) + * sr_RS (ex: sr_CS, sr_YU) + * 12 May 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Учитавам...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} изабраних редова"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Затвори ову »картицу«"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Унешена вредност није правилна"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Учитавам..."; +} + +Date.monthNames = [ + "Јануар", + "Фебруар", + "Март", + "Април", + "Мај", + "Јун", + "Јул", + "Август", + "Септембар", + "Октобар", + "Новембар", + "Децембар" +]; + +Date.dayNames = [ + "Недеља", + "Понедељак", + "Уторак", + "Среда", + "Четвртак", + "Петак", + "Субота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "У реду", + cancel : "Одустани", + yes : "Да", + no : "Не" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Данас", + minText : "Датум је испред најмањег дозвољеног датума", + maxText : "Датум је након највећег дозвољеног датума", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Следећи месец (Control+Десно)', + prevText : 'Претходни месец (Control+Лево)', + monthYearText : 'Изаберите месец (Control+Горе/Доле за избор године)', + todayTip : "{0} (Размакница)", + format : "d.m.y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Страна", + afterPageText : "од {0}", + firstText : "Прва страна", + prevText : "Претходна страна", + nextText : "Следећа страна", + lastText : "Последња страна", + refreshText : "Освежи", + displayMsg : "Приказана {0} - {1} од {2}", + emptyMsg : 'Немам шта приказати' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Минимална дужина овог поља је {0}", + maxLengthText : "Максимална дужина овог поља је {0}", + blankText : "Поље је обавезно", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Минимална вредност у пољу је {0}", + maxText : "Максимална вредност у пољу је {0}", + nanText : "{0} није правилан број" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Пасивно", + disabledDatesText : "Пасивно", + minText : "Датум у овом пољу мора бити након {0}", + maxText : "Датум у овом пољу мора бити пре {0}", + invalidText : "{0} није правилан датум - захтевани облик је {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Учитавам...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ово поље прихвата e-mail адресу искључиво у облику "korisnik@domen.com"', + urlText : 'Ово поље прихвата URL адресу искључиво у облику "http:/'+'/www.domen.com"', + alphaText : 'Ово поље може садржати искључиво слова и знак _', + alphanumText : 'Ово поље може садржати само слова, бројеве и знак _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Растући редослед", + sortDescText : "Опадајући редослед", + lockText : "Закључај колону", + unlockText : "Откључај колону", + columnsText : "Колоне" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Назив", + valueText : "Вредност", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Повући за измену величине.", + collapsibleSplitTip : "Повући за измену величине. Двоструки клик за сакривање." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sv_SE.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sv_SE.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sv_SE.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,172 @@ +/** + * Swedish translation (utf8-encoding) + * By Erik Andersson, Monator Technologies + * 24 April 2007 + * Changed by Cariad, 29 July 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Laddar...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} markerade rad(er)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Stäng denna flik"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Värdet i detta fält är inte tillåtet"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Laddar..."; +} + +Date.monthNames = [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" +]; + +Date.dayNames = [ + "söndag", + "måndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "lördag" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Avbryt", + yes : "Ja", + no : "Nej" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y-m-d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Idag", + minText : "Detta datum inträffar före det tidigast tillåtna", + maxText : "Detta datum inträffar efter det senast tillåtna", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Nästa månad (Ctrl + högerpil)', + prevText : 'Föregående månad (Ctrl + vänsterpil)', + monthYearText : 'Välj en månad (Ctrl + uppåtpil/neråtpil för att ändra årtal)', + todayTip : "{0} (mellanslag)", + format : "Y-m-d", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Sida", + afterPageText : "av {0}", + firstText : "Första sidan", + prevText : "Föregående sida", + nextText : "Nästa sida", + lastText : "Sista sidan", + refreshText : "Uppdatera", + displayMsg : "Visar {0} - {1} av {2}", + emptyMsg : 'Det finns ingen data att visa' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minsta tillåtna längd för detta fält är {0}", + maxLengthText : "Största tillåtna längd för detta fält är {0}", + blankText : "Detta fält är obligatoriskt", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minsta tillåtna värde för detta fält är {0}", + maxText : "Största tillåtna värde för detta fält är {0}", + nanText : "{0} är inte ett tillåtet nummer" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Inaktiverad", + disabledDatesText : "Inaktiverad", + minText : "Datumet i detta fält måste inträffa efter {0}", + maxText : "Datumet i detta fält måste inträffa före {0}", + invalidText : "{0} är inte ett tillåtet datum - datum ska anges i formatet {1}", + format : "Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Laddar...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Detta fält ska innehålla en e-post adress i formatet "användare@domän.se"', + urlText : 'Detta fält ska innehålla en länk (URL) i formatet "http:/'+'/www.domän.se"', + alphaText : 'Detta fält får bara innehålla bokstäver och "_"', + alphanumText : 'Detta fält får bara innehålla bokstäver, nummer och "_"' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortera stigande", + sortDescText : "Sortera fallande", + lockText : "Lås kolumn", + unlockText : "Lås upp kolumn", + columnsText : "Kolumner" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Namn", + valueText : "Värde", + dateFormat : "Y-m-d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Dra för att ändra storleken.", + collapsibleSplitTip : "Dra för att ändra storleken. Dubbelklicka för att gömma." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sv_se-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sv_se-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-sv_se-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Laddar...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} markerade rad(er)"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Stäng denna flik"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Värdet i detta fält är inte tillåtet"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Laddar..."}Date.monthNames=["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"];Date.dayNames=["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Avbryt",yes:"Ja",no:"Nej"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"Y-m-d")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Idag",minText:"Detta datum inträffar före det tidigast tillåtna",maxText:"Detta datum inträffar efter det senast tillåtna",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Nästa månad (Ctrl + högerpil)",prevText:"Föregående månad (Ctrl + vänsterpil)",monthYearText:"Välj en månad (Ctrl + uppåtpil/neråtpil för att ändra årtal)",todayTip:"{0} (mellanslag)",format:"Y-m-d",startDay:1})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Sida",afterPageText:"av {0}",firstText:"Första sidan",prevText:"Föregående sida",nextText:"Nästa sida",lastText:"Sista sidan",refreshText:"Uppdatera",displayMsg:"Visar {0} - {1} av {2}",emptyMsg:"Det finns ingen data att visa"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Minsta tillåtna längd för detta fält är {0}",maxLengthText:"Största tillåtna längd för detta fält är {0}",blankText:"Detta fält är obligatoriskt",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Minsta tillåtna värde för detta fält är {0}",maxText:"Största tillåtna värde för detta fält är {0}",nanText:"{0} är inte ett tillåtet nummer"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Inaktiverad",disabledDatesText:"Inaktiverad",minText:"Datumet i detta fält måste inträffa efter {0}",maxText:"Datumet i detta fält måste inträffa före {0}",invalidText:"{0} är inte ett tillåtet datum - datum ska anges i formatet {1}",format:"Y-m-d"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Laddar...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Detta fält ska innehålla en e-post adress i formatet \"användare@domän.se\"",urlText:"Detta fält ska innehålla en länk (URL) i formatet \"http:/"+"/www.domän.se\"",alphaText:"Detta fält får bara innehålla bokstäver och \"_\"",alphanumText:"Detta fält får bara innehålla bokstäver, nummer och \"_\""})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Sortera stigande",sortDescText:"Sortera fallande",lockText:"Lås kolumn",unlockText:"Lås upp kolumn",columnsText:"Kolumner"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Namn",valueText:"Värde",dateFormat:"Y-m-d"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Dra för att ändra storleken.",collapsibleSplitTip:"Dra för att ändra storleken. Dubbelklicka för att gömma."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-tr-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-tr-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-tr-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      Yükleniyor...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} seçili satır"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Bu sekmeyi kapat"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Bu alandaki değer geçersiz"}if(Ext.LoadMask){Ext.LoadMask.prototype.msg="Yükleniyor..."}Date.monthNames=["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"];Date.dayNames=["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"Tamam",cancel:"İptal",yes:"Evet",no:"Hayır"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"m/d/Y")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Bugün",minText:"Bu tarih minimum tarihten önce",maxText:"Bu tarih maximum tarihten önce",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Sonraki ay (Ctrl+Sag)",prevText:"Önceki ay (Ctrl+Sol)",monthYearText:"Bir ay seçin (Yillari değiştirmek için Ctrl+Yukarı/Aşağı)",todayTip:"{0} (Bosluk)",format:"d/m/y",okText:"Tamam",cancelText:"  İptal   ",startDay:0})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"Sayfa",afterPageText:" / {0}",firstText:"İlk Sayfa",prevText:"Önceki Sayfa",nextText:"Sonraki Sayfa",lastText:"Son Sayfa",refreshText:"Yenile",displayMsg:"{2} satırdan {0} - {1} arası gösteriliyor",emptyMsg:"Gösterilecek veri yok"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Bu alan için minimum uzunluk {0}",maxLengthText:"Bu alan için maximum uzunluk {0}",blankText:"Bu alan gerekli",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"Bu alan için minimum değer {0}",maxText:"Bu alan için maximum değer {0}",nanText:"{0} geçerli bir sayı değil"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Pasif",disabledDatesText:"Pasif",minText:"Bu alana {0} tarihinden sonraki bir tarih girilmeli",maxText:"Bu alana {0} tarihinden önceki bir tarih girilmeli",invalidText:"{0} geçerli bir tarih değil - {1} biçiminde olmalı",format:"d/m/y"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Yükleniyor...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"Bu alan bir e-mail adresi biçiminde olmalı \"kullanici@alanadi.com\"",urlText:"Bu alan bir URL biçiminde olmalu \"http:/"+"/www.alanadi.com\"",alphaText:"Bu alan sadece harf ve _ içermeli",alphanumText:"Bu alan sadece harf, sayı ve _ içermeli"})}if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:"Lütfen link için URL giriniz:",buttonTips:{bold:{title:"Kalın (Ctrl+B)",text:"Seçilen metni kalın yap.",cls:"x-html-editor-tip"},italic:{title:"Yatık (Ctrl+I)",text:"Seçilen metni yatık yap.",cls:"x-html-editor-tip"},underline:{title:"Altçizgi (Ctrl+U)",text:"Seçilen metnin altını çiz.",cls:"x-html-editor-tip"},increasefontsize:{title:"Metni büyüt",text:"Yazi tipini büyüt.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Metni küçült",text:"Yazi tipini küçült.",cls:"x-html-editor-tip"},backcolor:{title:"Metin arkaplan rengi",text:"Seçilen metnin arkaplan rengini değiştir.",cls:"x-html-editor-tip"},forecolor:{title:"Metin rengi",text:"Seçilen metnin rengini değiştir.",cls:"x-html-editor-tip"},justifyleft:{title:"Metni sola yasla",text:"Metni sola yasla",cls:"x-html-editor-tip"},justifycenter:{title:"Metni ortala",text:"Metni ortala",cls:"x-html-editor-tip"},justifyright:{title:"Metni sağa yasla",text:"Metni sağa yasla",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Sırasız liste",text:"Sırasız liste başlat.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Sıralı liste",text:"Sıralı liste başlat",cls:"x-html-editor-tip"},createlink:{title:"Bağlanti",text:"Seçilen yazıya bağlantı ver.",cls:"x-html-editor-tip"},sourceedit:{title:"Kaynağı düzenle",text:"Kaynak düzenle görünümüne geç.",cls:"x-html-editor-tip"}}})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Artan sıra",sortDescText:"Azalan sıra",lockText:"Sütunu kilitle",unlockText:"Sütunun kilidini kaldır",columnsText:"Sütunlar"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Ad",valueText:"Değer",dateFormat:"j/m/Y"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Boyutlandırmak için sürükleyin.",collapsibleSplitTip:"Boyutlandırmak için sürükleyin. Gizlemek için çift tıklayın."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-tr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-tr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-tr.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,255 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + +/** + * Turkish translation by Hüseyin Tüfekçilerli + * 04-11-2007, 09:52 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Yükleniyor...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} seçili satır"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Bu sekmeyi kapat"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Bu alandaki değer geçersiz"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Yükleniyor..."; +} + +Date.monthNames = [ + "Ocak", + "Şubat", + "Mart", + "Nisan", + "Mayıs", + "Haziran", + "Temmuz", + "Ağustos", + "Eylül", + "Ekim", + "Kasım", + "Aralık" +]; + +Date.dayNames = [ + "Pazar", + "Pazartesi", + "Salı", + "Çarşamba", + "Perşembe", + "Cuma", + "Cumartesi" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Tamam", + cancel : "İptal", + yes : "Evet", + no : "Hayır" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m/d/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Bugün", + minText : "Bu tarih minimum tarihten önce", + maxText : "Bu tarih maximum tarihten önce", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Sonraki ay (Ctrl+Sag)', + prevText : 'Önceki ay (Ctrl+Sol)', + monthYearText : 'Bir ay seçin (Yillari değiştirmek için Ctrl+Yukarı/Aşağı)', + todayTip : "{0} (Bosluk)", + format : "d/m/y", + okText : "Tamam", + cancelText : "  İptal   ", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Sayfa", + afterPageText : " / {0}", + firstText : "İlk Sayfa", + prevText : "Önceki Sayfa", + nextText : "Sonraki Sayfa", + lastText : "Son Sayfa", + refreshText : "Yenile", + displayMsg : "{2} satırdan {0} - {1} arası gösteriliyor", + emptyMsg : 'Gösterilecek veri yok' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Bu alan için minimum uzunluk {0}", + maxLengthText : "Bu alan için maximum uzunluk {0}", + blankText : "Bu alan gerekli", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Bu alan için minimum değer {0}", + maxText : "Bu alan için maximum değer {0}", + nanText : "{0} geçerli bir sayı değil" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Pasif", + disabledDatesText : "Pasif", + minText : "Bu alana {0} tarihinden sonraki bir tarih girilmeli", + maxText : "Bu alana {0} tarihinden önceki bir tarih girilmeli", + invalidText : "{0} geçerli bir tarih değil - {1} biçiminde olmalı", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Yükleniyor...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Bu alan bir e-mail adresi biçiminde olmalı "kullanici@alanadi.com"', + urlText : 'Bu alan bir URL biçiminde olmalu "http:/'+'/www.alanadi.com"', + alphaText : 'Bu alan sadece harf ve _ içermeli', + alphanumText : 'Bu alan sadece harf, sayı ve _ içermeli' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Lütfen link için URL giriniz:', + buttonTips : { + bold : { + title: 'Kalın (Ctrl+B)', + text: 'Seçilen metni kalın yap.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Yatık (Ctrl+I)', + text: 'Seçilen metni yatık yap.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Altçizgi (Ctrl+U)', + text: 'Seçilen metnin altını çiz.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Metni büyüt', + text: 'Yazi tipini büyüt.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Metni küçült', + text: 'Yazi tipini küçült.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Metin arkaplan rengi', + text: 'Seçilen metnin arkaplan rengini değiştir.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Metin rengi', + text: 'Seçilen metnin rengini değiştir.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Metni sola yasla', + text: 'Metni sola yasla', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Metni ortala', + text: 'Metni ortala', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Metni sağa yasla', + text: 'Metni sağa yasla', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Sırasız liste', + text: 'Sırasız liste başlat.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Sıralı liste', + text: 'Sıralı liste başlat', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Bağlanti', + text: 'Seçilen yazıya bağlantı ver.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Kaynağı düzenle', + text: 'Kaynak düzenle görünümüne geç.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Artan sıra", + sortDescText : "Azalan sıra", + lockText : "Sütunu kilitle", + unlockText : "Sütunun kilidini kaldır", + columnsText : "Sütunlar" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Ad", + valueText : "Değer", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Boyutlandırmak için sürükleyin.", + collapsibleSplitTip : "Boyutlandırmak için sürükleyin. Gizlemek için çift tıklayın." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ukr-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ukr-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-ukr-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-vn-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-vn-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-vn-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-vn.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-vn.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-vn.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,175 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + +/** + * Vietnamese translation + * By bpmtri + * 12-April-2007 04:06PM + */ + +Ext.UpdateManager.defaults.indicatorText = '
      Đang tải...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} dòng được chọn"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Đóng thẻ này"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Giá trị của ô này không hợp lệ."; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Đang tải..."; +} + +Date.monthNames = [ + "Tháng 1", + "Tháng 2", + "Tháng 3", + "Tháng 4", + "Tháng 5", + "Tháng 6", + "Tháng 7", + "Tháng 8", + "Tháng 9", + "Tháng 10", + "Tháng 11", + "Tháng 12" +]; + +Date.dayNames = [ + "Chủ nhật", + "Thứ hai", + "Thứ ba", + "Thứ tư", + "Thứ năm", + "Thứ sáu", + "Thứ bảy" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Đồng ý", + cancel : "Hủy bỏ", + yes : "Có", + no : "Không" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Hôm nay", + minText : "Ngày này nhỏ hơn ngày nhỏ nhất", + maxText : "Ngày này lớn hơn ngày lớn nhất", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Tháng sau (Control+Right)', + prevText : 'Tháng trước (Control+Left)', + monthYearText : 'Chọn một tháng (Control+Up/Down để thay đổi năm)', + todayTip : "{0} (Spacebar - Phím trắng)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Trang", + afterPageText : "of {0}", + firstText : "Trang đầu", + prevText : "Trang trước", + nextText : "Trang sau", + lastText : "Trang cuối", + refreshText : "Tải lại", + displayMsg : "Hiển thị {0} - {1} của {2}", + emptyMsg : 'Không có dữ liệu để hiển thị' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Chiều dài tối thiểu của ô này là {0}", + maxLengthText : "Chiều dài tối đa của ô này là {0}", + blankText : "Ô này cần phải nhập giá trị", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Giá trị nhỏ nhất của ô này là {0}", + maxText : "Giá trị lớn nhất của ô này là {0}", + nanText : "{0} hông phải là một số hợp lệ" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Vô hiệu", + disabledDatesText : "Vô hiệu", + minText : "Ngày nhập trong ô này phải sau ngày {0}", + maxText : "Ngày nhập trong ô này phải trước ngày {0}", + invalidText : "{0} không phải là một ngày hợp lệ - phải có dạng {1}", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Đang tải...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Giá trị của ô này phải là một địa chỉ email có dạng như "ten@abc.com"', + urlText : 'Giá trị của ô này phải là một địa chỉ web(URL) hợp lệ, có dạng như "http:/'+'/www.domain.com"', + alphaText : 'Ô này chỉ được nhập các kí tự và gạch dưới(_)', + alphanumText : 'Ô này chỉ được nhập các kí tự, số và gạch dưới(_)' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Tăng dần", + sortDescText : "Giảm dần", + lockText : "Khóa cột", + unlockText : "Bỏ khóa cột", + columnsText : "Các cột" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Tên", + valueText : "Giá trị", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Kéo giữ chuột để thay đổi kích thước.", + collapsibleSplitTip : "Kéo giữ chuột để thay đổi kích thước. Nhấp đúp để ẩn đi." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_CN-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_CN-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_CN-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.UpdateManager.defaults.indicatorText="
      加载�...
      ";if(Ext.View){Ext.View.prototype.emptyText=""}if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="{0} 选择行"}if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="关�"}if(Ext.form.Field){Ext.form.Field.prototype.invalidText="输入值�?�法"}Date.monthNames=["一月","二月","三月","四月","五月","�月","七月","八月","�?月","�??月","�??一月","�??二月"];Date.dayNames=["日","一","二","三","四","五","�"];if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"确定",cancel:"�?�消",yes:"是",no:"�?�"}}if(Ext.util.Format){Ext.util.Format.date=function(A,B){if(!A){return""}if(!(A instanceof Date)){A=new Date(Date.parse(A))}return A.dateFormat(B||"y年m月d日")}}if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"今天",minText:"日期在最�?日期之�?",maxText:"日期在最大日期之�?�",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"下月 (Control+Right)",prevText:"上月 (Control+Left)",monthYearText:"选择一个月 (Control+Up/Down �?�改�?�年)",todayTip:"{0} (空格键选择)",format:"y年m月d日"})}if(Ext.PagingToolbar){Ext.apply(Ext.PagingToolbar.prototype,{beforePageText:"页",afterPageText:"页共 {0} 页",firstText:"第一页",prevText:"�?一页",nextText:"下一页",lastText:"最�?�页",refreshText:"刷新",displayMsg:"显示 {0} - {1},共 {2} �?�",emptyMsg:"没有数�?�需�?显示"})}if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"该输入项的最�?长度是 {0}",maxLengthText:"该输入项的最大长度是 {0}",blankText:"该输入项为必输项",regexText:"",emptyText:null})}if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"该输入项的最�?值是 {0}",maxText:"该输入项的最大值是 {0}",nanText:"{0} �?是有效数值"})}if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"�?用",disabledDatesText:"�?用",minText:"该输入项的日期必须在 {0} 之�?�",maxText:"该输入项的日期必须在 {0} 之�?",invalidText:"{0} 是无效的日期 - 必须符�?�格�?: {1}",format:"y年m月d日"})}if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"加载...",valueNotFoundText:undefined})}if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:"该输入项必须是电�?邮件地�?�,格�?如: \"user@domain.com\"",urlText:"该输入项必须是URL地�?�,格�?如: \"http:/"+"/www.domain.com\"",alphaText:"该输入项�?�能包�?��符和_",alphanumText:"该输入项�?�能包�?��符,数�和_"})}if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"��?",sortDescText:"逆�?",lockText:"�?列",unlockText:"解�?列",columnsText:"列"})}if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"�??称",valueText:"值",dateFormat:"y年m月d日"})}if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"拖动�?�改�?�尺寸.",collapsibleSplitTip:"拖动�?�改�?�尺寸. �?�击�?�?."})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_CN.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_CN.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_CN.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,166 @@ +/* + * Simplified Chinese translation + * By DavidHu + * 09 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      加载中...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} 选择行"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "关闭"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "输入值非法"; +} + +Date.monthNames = [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" +]; + +Date.dayNames = [ + "日", + "一", + "二", + "三", + "四", + "五", + "六" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "确定", + cancel : "取消", + yes : "是", + no : "否" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "y年m月d日"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "今天", + minText : "日期在最小日期之前", + maxText : "日期在最大日期之后", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : '下月 (Control+Right)', + prevText : '上月 (Control+Left)', + monthYearText : '选择一个月 (Control+Up/Down 来改变年)', + todayTip : "{0} (空格键选择)", + format : "y年m月d日" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "页", + afterPageText : "页共 {0} 页", + firstText : "第一页", + prevText : "前一页", + nextText : "下一页", + lastText : "最后页", + refreshText : "刷新", + displayMsg : "显示 {0} - {1},共 {2} 条", + emptyMsg : '没有数据需要显示' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "该输入项的最小长度是 {0}", + maxLengthText : "该输入项的最大长度是 {0}", + blankText : "该输入项为必输项", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "该输入项的最小值是 {0}", + maxText : "该输入项的最大值是 {0}", + nanText : "{0} 不是有效数值" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "禁用", + disabledDatesText : "禁用", + minText : "该输入项的日期必须在 {0} 之后", + maxText : "该输入项的日期必须在 {0} 之前", + invalidText : "{0} 是无效的日期 - 必须符合格式: {1}", + format : "y年m月d日" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "加载...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : '该输入项必须是电子邮件地址,格式如: "user@domain.com"', + urlText : '该输入项必须是URL地址,格式如: "http:/'+'/www.domain.com"', + alphaText : '该输入项只能包含字符和_', + alphanumText : '该输入项只能包含字符,数字和_' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "正序", + sortDescText : "逆序", + lockText : "锁列", + unlockText : "解锁列", + columnsText : "列" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "名称", + valueText : "值", + dateFormat : "y年m月d日" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "拖动来改变尺寸.", + collapsibleSplitTip : "拖动来改变尺寸. 双击隐藏." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_TW-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_TW-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_TW-min.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_TW.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_TW.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/locale/ext-lang-zh_TW.js 4 Dec 2007 02:48:33 -0000 1.1 @@ -0,0 +1,170 @@ +/* + * Traditional Chinese translation + * By hata1234 + * 09 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
      讀取中...
      '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "選擇了 {0} 行"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "關閉此標籤"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "數值不符合欄位規定"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "讀取中..."; +} + +Date.monthNames = [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" +]; + +Date.dayNames = [ + "日", + "一", + "二", + "三", + "四", + "五", + "六" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "確定", + cancel : "取消", + yes : "是", + no : "否" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y/m/d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "今天", + minText : "日期必須大於最小容許日期", + maxText : "日期必須小於最大容許日期", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : "下個月 (Ctrl+右方向鍵)", + prevText : "上個月 (Ctrl+左方向鍵)", + monthYearText : "選擇月份 (Ctrl+上/下方向鍵選擇年份)", + todayTip : "{0} (空白鍵)", + format : "y/m/d" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "第", + afterPageText : "頁,共{0}頁", + firstText : "第一頁", + prevText : "上一頁", + nextText : "下一頁", + lastText : "最後頁", + refreshText : "重新整理", + displayMsg : "顯示{0} - {1}頁,共{2}頁", + emptyMsg : '沒有任何資料' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "此欄位最少要輸入 {0} 個字", + maxLengthText : "此欄位最多輸入 {0} 個字", + blankText : "此欄位為必填", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "此欄位之數值必須大於 {0}", + maxText : "此欄位之數值必須小於 {0}", + nanText : "{0} 不是合法的數字" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "無法使用", + disabledDatesText : "無法使用", + minText : "此欄位之日期必須在 {0} 之後", + maxText : "此欄位之日期必須在 {0} 之前", + invalidText : "{0} 不是正確的日期格式 - 必須像是 「 {1} 」 這樣的格式", + format : "Y/m/d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "讀取中 ...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : '此欄位必須輸入像 "user@domain.com" 之E-Mail格式', + urlText : '此欄位必須輸入像 "http:/'+'/www.domain.com" 之網址格式', + alphaText : '此欄位僅能輸入半形英文字母及底線( _ )符號', + alphanumText : '此欄位僅能輸入半形英文字母、數字及底線( _ )符號' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "正向排序", + sortDescText : "反向排序", + lockText : "鎖定欄位", + unlockText : "解開欄位鎖定", + columnsText : "欄位" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "名稱", + valueText : "數值", + dateFormat : "Y/m/d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "拖曳縮放大小.", + collapsibleSplitTip : "拖曳縮放大小. 滑鼠雙擊隱藏." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/state/CookieProvider-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/state/CookieProvider-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/state/CookieProvider-min.js 4 Dec 2007 02:48:34 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.state.CookieProvider=function(A){Ext.state.CookieProvider.superclass.constructor.call(this);this.path="/";this.expires=new Date(new Date().getTime()+(1000*60*60*24*7));this.domain=null;this.secure=false;Ext.apply(this,A);this.state=this.readCookies()};Ext.extend(Ext.state.CookieProvider,Ext.state.Provider,{set:function(A,B){if(typeof B=="undefined"||B===null){this.clear(A);return }this.setCookie(A,B);Ext.state.CookieProvider.superclass.set.call(this,A,B)},clear:function(A){this.clearCookie(A);Ext.state.CookieProvider.superclass.clear.call(this,A)},readCookies:function(){var C={};var F=document.cookie+";";var B=/\s?(.*?)=(.*?);/g;var E;while((E=B.exec(F))!=null){var A=E[1];var D=E[2];if(A&&A.substring(0,3)=="ys-"){C[A.substr(3)]=this.decodeValue(D)}}return C},setCookie:function(A,B){document.cookie="ys-"+A+"="+this.encodeValue(B)+((this.expires==null)?"":("; expires="+this.expires.toGMTString()))+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")},clearCookie:function(A){document.cookie="ys-"+A+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((this.path==null)?"":("; path="+this.path))+((this.domain==null)?"":("; domain="+this.domain))+((this.secure==true)?"; secure":"")}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/state/Provider-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/state/Provider-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/state/Provider-min.js 4 Dec 2007 02:48:34 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)};Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(B,A){return typeof this.state[B]=="undefined"?A:this.state[B]},clear:function(A){delete this.state[A];this.fireEvent("statechange",this,A,null)},set:function(A,B){this.state[A]=B;this.fireEvent("statechange",this,A,B)},decodeValue:function(A){var J=/^(a|n|d|b|s|o)\:(.*)$/;var C=J.exec(unescape(A));if(!C||!C[1]){return }var F=C[1];var H=C[2];switch(F){case"n":return parseFloat(H);case"d":return new Date(Date.parse(H));case"b":return(H=="1");case"a":var G=[];var I=H.split("^");for(var B=0,D=I.length;B=0;--E){D[H[E].selectorText]=H[E]}}catch(G){}},getRules:function(F){if(D==null||F){D={};var H=C.styleSheets;for(var G=0,E=H.length;G 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0))) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() % 12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"u":return"String.leftPad(this.getMilliseconds(), 3, '0') + ";case"O":return"this.getGMTOffset() + ";case"P":return"this.getGMTOffset(true) + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";case"c":for(var F=Date.getFormatCode,G="Y-m-dTH:i:sP",C="",B=0,A=G.length;B 0) {";var regex="";var special=false;var ch="";for(var i=0;i= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0)\n"+"{v = new Date(y, m, d, h, i, s, ms);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n"+"{v = new Date(y, m, d, h, i, s);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n"+"{v = new Date(y, m, d, h, i);}\n"+"else if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n"+"{v = new Date(y, m, d, h);}\n"+"else if (y >= 0 && m >= 0 && d > 0)\n"+"{v = new Date(y, m, d);}\n"+"else if (y >= 0 && m >= 0)\n"+"{v = new Date(y, m);}\n"+"else if (y >= 0)\n"+"{v = new Date(y);}\n"+"}return (v && (z || o))?\n"+" (z ? v.add(Date.SECOND, (v.getTimezoneOffset() * 60) + (z*1)) :\n"+" v.add(Date.HOUR, (v.getGMTOffset() / 100) + (o / -100))) : v\n"+";}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code)};Date.formatCodeToRegex=function(G,F){switch(G){case"d":return{g:1,c:"d = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"D":for(var C=[],E=0;E<7;C.push(Date.getShortDayName(E)),++E){}return{g:0,c:null,s:"(?:"+C.join("|")+")"};case"j":return{g:1,c:"d = parseInt(results["+F+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"N":return{g:0,c:null,s:"[1-7]"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"[0-6]"};case"z":return{g:0,c:null,s:"(?:\\d{1,3}"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+F+"]), 10);\n",s:"("+Date.monthNames.join("|")+")"};case"m":return{g:1,c:"m = parseInt(results["+F+"], 10) - 1;\n",s:"(\\d{2})"};case"M":for(var C=[],E=0;E<12;C.push(Date.getShortMonthName(E)),++E){}return{g:1,c:"m = parseInt(Date.getMonthNumber(results["+F+"]), 10);\n",s:"("+C.join("|")+")"};case"n":return{g:1,c:"m = parseInt(results["+F+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"(?:\\d{2})"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"o":case"Y":return{g:1,c:"y = parseInt(results["+F+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+F+"], 10);\n"+"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+F+"] == 'am') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+F+"] == 'AM') {\n"+"if (h == 12) { h = 0; }\n"+"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":return{g:1,c:"h = parseInt(results["+F+"], 10);\n",s:"(\\d{1,2})"};case"h":case"H":return{g:1,c:"h = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"i":return{g:1,c:"i = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+F+"], 10);\n",s:"(\\d{2})"};case"u":return{g:1,c:"ms = parseInt(results["+F+"], 10);\n",s:"(\\d{3})"};case"O":return{g:1,c:["o = results[",F,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n","var mn = o.substring(3,5) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n"," (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+-]\\d{4})"};case"P":return{g:1,c:["o = results[",F,"];\n","var sn = o.substring(0,1);\n","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n","var mn = o.substring(4,6) % 60;\n","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n"," (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n"].join(""),s:"([+-]\\d{2}:\\d{2})"};case"T":return{g:0,c:null,s:"[A-Z]{1,4}"};case"Z":return{g:1,c:"z = results["+F+"] * 1;\n"+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+-]?\\d{1,5})"};case"c":var H=Date.formatCodeToRegex,D=[];var A=[H("Y",1),H("m",2),H("d",3),H("h",4),H("i",5),H("s",6),H("P",7)];for(var E=0,B=A.length;E0?"-":"+")+String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0")+(A?":":"")+String.leftPad(this.getTimezoneOffset()%60,2,"0")};Date.prototype.getDayOfYear=function(){var A=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var B=0;B28){A=Math.min(A,this.getFirstDateOfMonth().add("mo",C).getLastDateOfMonth().getDate())}D.setDate(A);D.setMonth(this.getMonth()+C);break;case Date.YEAR:D.setFullYear(this.getFullYear()+C);break}return D};Date.prototype.between=function(C,A){var B=this.getTime();return C.getTime()<=B&&B<=A.getTime()}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/DelayedTask-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/DelayedTask-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/DelayedTask-min.js 4 Dec 2007 02:48:34 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.util.DelayedTask=function(E,D,A){var G=null,F,B;var C=function(){var H=new Date().getTime();if(H-B>=F){clearInterval(G);G=null;E.apply(D,A||[])}};this.delay=function(I,K,J,H){if(G&&I!=F){this.cancel()}F=I;B=new Date().getTime();E=K||E;D=J||D;A=H||A;if(!G){G=setInterval(C,F)}};this.cancel=function(){if(G){clearInterval(G);G=null}}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/Format-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/Format-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/Format-min.js 4 Dec 2007 02:48:34 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.util.Format=function(){var trimRe=/^\s+|\s+$/g;return{ellipsis:function(value,len){if(value&&value.length>len){return value.substr(0,len-3)+"..."}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,"\"")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split(".");var whole=ps[0];var sub=ps[1]?"."+ps[1]:".00";var r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1"+","+"$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!(v instanceof Date)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTagsRE:/<\/?[^>]+>/gi,stripTags:function(v){return !v?v:String(v).replace(this.stripTagsRE,"")},stripScriptsRe:/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,stripScripts:function(v){return !v?v:String(v).replace(this.stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}()}}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/JSON-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/JSON-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/JSON-min.js 4 Dec 2007 02:48:34 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.util.JSON=new (function(){var useHasOwn={}.hasOwnProperty?true:false;var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"};var 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+"\""};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i=37&&A<=40){C.stopEvent()}},relay:function(C){var A=C.getKey();var B=this.keyToHandler[A];if(B&&this[B]){if(this.doRelay(C,this[B],B)!==true){C[this.defaultEventAction]()}}},doRelay:function(C,B,A){return B.call(this.scope||this,C)},enter:false,left:false,right:false,up:false,down:false,tab:false,esc:false,pageUp:false,pageDown:false,del:false,home:false,end:false,keyToHandler:{37:"left",39:"right",38:"up",40:"down",33:"pageUp",34:"pageDown",46:"del",36:"home",35:"end",13:"enter",27:"esc",9:"tab"},enable:function(){if(this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.on("keydown",this.relay,this)}else{this.el.on("keydown",this.prepareEvent,this);this.el.on("keypress",this.relay,this)}this.disabled=false}},disable:function(){if(!this.disabled){if(this.forceKeyDown||Ext.isIE||Ext.isAir){this.el.un("keydown",this.relay)}else{this.el.un("keydown",this.prepareEvent);this.el.un("keypress",this.relay)}this.disabled=true}}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/MixedCollection-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/MixedCollection-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/util/MixedCollection-min.js 4 Dec 2007 02:48:34 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.util.MixedCollection=function(B,A){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=B===true;if(A){this.getKey=A}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(B,C){if(arguments.length==1){C=arguments[0];B=this.getKey(C)}if(typeof B=="undefined"||B===null){this.length++;this.items.push(C);this.keys.push(null)}else{var A=this.map[B];if(A){return this.replace(B,C)}this.length++;this.items.push(C);this.map[B]=C;this.keys.push(B)}this.fireEvent("add",this.length-1,C,B);return C},getKey:function(A){return A.id},replace:function(C,D){if(arguments.length==1){D=arguments[0];C=this.getKey(D)}var A=this.item(C);if(typeof C=="undefined"||C===null||typeof A=="undefined"){return this.add(C,D)}var B=this.indexOfKey(C);this.items[B]=D;this.map[C]=D;this.fireEvent("replace",C,A,D);return D},addAll:function(E){if(arguments.length>1||E instanceof Array){var B=arguments.length>1?arguments:E;for(var D=0,A=B.length;D=this.length){return this.add(B,C)}this.length++;this.items.splice(A,0,C);if(typeof B!="undefined"&&B!=null){this.map[B]=C}this.keys.splice(A,0,B);this.fireEvent("add",A,C,B);return C},remove:function(A){return this.removeAt(this.indexOf(A))},removeAt:function(A){if(A=0){this.length--;var C=this.items[A];this.items.splice(A,1);var B=this.keys[A];if(typeof B!="undefined"){delete this.map[B]}this.keys.splice(A,1);this.fireEvent("remove",C,B);return C}return false},removeKey:function(A){return this.removeAt(this.indexOfKey(A))},getCount:function(){return this.length},indexOf:function(A){return this.items.indexOf(A)},indexOfKey:function(A){return this.keys.indexOf(A)},item:function(A){var B=typeof this.map[A]!="undefined"?this.map[A]:this.items[A];return typeof B!="function"||this.allowFunctions?B:null},itemAt:function(A){return this.items[A]},key:function(A){return this.map[A]},contains:function(A){return this.indexOf(A)!=-1},containsKey:function(A){return typeof this.map[A]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(I,A,H){var C=String(A).toUpperCase()=="DESC"?-1:1;H=H||function(K,J){return K-J};var G=[],B=this.keys,F=this.items;for(var D=0,E=F.length;D=A;C--){D[D.length]=B[C]}}return D},filter:function(C,B,D,A){if(Ext.isEmpty(B,false)){return this.clone()}B=this.createValueMatcher(B,D,A);return this.filterBy(function(E){return E&&B.test(E[C])})},filterBy:function(F,E){var G=new Ext.util.MixedCollection();G.getKey=this.getKey;var B=this.keys,D=this.items;for(var C=0,A=D.length;C0){for(var C=0;C0},suspendEvents:function(){this.eventsSuspended=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:function(G){if(!this.methodEvents){this.methodEvents={}}var F=this.methodEvents[G];if(!F){F={};this.methodEvents[G]=F;F.originalFn=this[G];F.methodName=G;F.before=[];F.after=[];var C,B,D;var E=this;var A=function(J,I,H){if((B=J.apply(I||E,H))!==undefined){if(typeof B==="object"){if(B.returnValue!==undefined){C=B.returnValue}else{C=B}if(B.cancel===true){D=true}}else{if(B===false){D=true}else{C=B}}}};this[G]=function(){C=B=undefined;D=false;var I=Array.prototype.slice.call(arguments,0);for(var J=0,H=F.before.length;J0){this.firing=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H0){for(var O=0,K=A.length;O",P,""].join("");var O=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var N=/^]*?for="(.*?)"/;var L=/^]*?if="(.*?)"/;var J=/^]*?exec="(.*?)"/;var C,B=0;var G=[];while(C=P.match(O)){var M=C[0].match(N);var K=C[0].match(L);var I=C[0].match(J);var E=null,H=null,D=null;var A=M&&M[1]?M[1]:"";if(K){E=K&&K[1]?K[1]:null;if(E){H=new Function("values","parent","xindex","xcount","with(values){ return "+(Ext.util.Format.htmlDecode(E))+"; }")}}if(I){E=I&&I[1]?I[1]:null;if(E){D=new Function("values","parent","xindex","xcount","with(values){ "+(Ext.util.Format.htmlDecode(E))+"; }")}}if(A){switch(A){case".":A=new Function("values","parent","with(values){ return values; }");break;case"..":A=new Function("values","parent","with(values){ return parent; }");break;default:A=new Function("values","parent","with(values){ return "+A+"; }")}}G.push({id:B,target:A,exec:D,test:H,body:C[1]||""});P=P.replace(C[0],"{xtpl"+B+"}");++B}for(var F=G.length-1;F>=0;--F){this.compileTpl(G[F])}this.master=G[G.length-1];this.tpls=G};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(A,H,G,D,C){var J=this.tpls[A];if(J.test&&!J.test.call(this,H,G,D,C)){return""}if(J.exec&&J.exec.call(this,H,G,D,C)){return""}var I=J.target?J.target.call(this,H,G):H;G=J.target?H:G;if(J.target&&I instanceof Array){var B=[];for(var E=0,F=I.length;E","  ","")}this.template=Ext.Button.buttonTemplate}var B,E=[this.text||" ",this.type];if(A){B=this.template.insertBefore(A,E,true)}else{B=this.template.append(C,E,true)}var D=B.child(this.buttonSelector);D.on("focus",this.onFocus,this);D.on("blur",this.onBlur,this);this.initButtonEl(B,D);if(this.menu){this.el.child(this.menuClassTarget).addClass("x-btn-with-menu")}Ext.ButtonToggleMgr.register(this)},initButtonEl:function(B,C){this.el=B;B.addClass("x-btn");if(this.icon){C.setStyle("background-image","url("+this.icon+")")}if(this.iconCls){C.addClass(this.iconCls);if(!this.cls){B.addClass(this.text?"x-btn-text-icon":"x-btn-icon")}}if(this.tabIndex!==undefined){C.dom.tabIndex=this.tabIndex}if(this.tooltip){if(typeof this.tooltip=="object"){Ext.QuickTips.register(Ext.apply({target:C.id},this.tooltip))}else{C.dom[this.tooltipType]=this.tooltip}}if(this.pressed){this.el.addClass("x-btn-pressed")}if(this.handleMouseEvents){B.on("mouseover",this.onMouseOver,this);B.on("mousedown",this.onMouseDown,this)}if(this.menu){this.menu.on("show",this.onMenuShow,this);this.menu.on("hide",this.onMenuHide,this)}if(this.id){this.el.dom.id=this.el.id=this.id}if(this.repeat){var A=new Ext.util.ClickRepeater(B,typeof this.repeat=="object"?this.repeat:{});A.on("click",this.onClick,this)}B.on(this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);if(Ext.isIE6){this.autoWidth.defer(1,this)}else{this.autoWidth()}},setIconClass:function(A){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,A)}this.iconCls=A},beforeDestroy:function(){var A=this.el.child(this.buttonSelector);if(A){A.removeAllListeners()}if(this.menu){Ext.destroy(this.menu)}},onDestroy:function(){if(this.rendered){Ext.ButtonToggleMgr.unregister(this)}},autoWidth:function(){if(this.el){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth() ");var D=document.createElement("div");D.className=this.itemCls;C.overwrite(D,this.colors);B.dom.insertBefore(D,A);this.el=Ext.get(D);this.el.on(this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.el.on("click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var A=this.value;this.value=null;this.select(A)}},handleClick:function(B,A){B.preventDefault();if(!this.disabled){var C=A.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(C.toUpperCase())}},select:function(A){A=A.replace("#","");if(A!=this.value||this.allowReselect){var B=this.el;if(this.value){B.child("a.color-"+this.value).removeClass("x-color-palette-sel")}B.child("a.color-"+A).addClass("x-color-palette-sel");this.value=A;this.fireEvent("select",this,A)}}});Ext.reg("colorpalette",Ext.ColorPalette); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Component-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Component-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Component-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.Component=function(B){B=B||{};if(B.initialConfig){if(B.isAction){this.baseAction=B}B=B.initialConfig}else{if(B.tagName||B.dom||typeof B=="string"){B={applyTo:B,id:B.id||B}}}this.initialConfig=B;Ext.apply(this,B);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);if(this.baseAction){this.baseAction.addComponent(this)}this.initComponent();if(this.plugins){if(this.plugins instanceof Array){for(var C=0,A=this.plugins.length;C1){for(var D=0;D2){for(var E=A-1;E>=1;--E){this.insert(D,B[E])}return }var F=this.lookupComponent(this.applyDefaults(C));if(F.ownerCt==this&&this.items.indexOf(F)=A;C--){B.push(D[C])}}return B},indexOf:function(A){A=this.getNode(A);if(typeof A.viewIndex=="number"){return A.viewIndex}return this.all.indexOf(A)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.el.update("
      "+this.loadingText+"
      ");this.all.clear()}}});Ext.reg("dataview",Ext.DataView); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/DatePicker-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/DatePicker-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/DatePicker-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.DatePicker=Ext.extend(Ext.Component,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minDate:null,maxDate:null,minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDays:null,disabledDaysText:"",disabledDatesRE:null,disabledDatesText:"",constrainToViewport:true,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,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime():new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;B","  ",""];var F=this.dayNames;for(var E=0;E<7;E++){var H=this.startDay+E;if(H>6){H=H-7}C.push("")}C[C.length]="";for(var E=0;E<42;E++){if(E%7==0&&E!=0){C[C.length]=""}C[C.length]=""}C[C.length]="
      ",F[H].substr(0,1),"
      ";var B=document.createElement("div");B.className="x-date-picker";B.innerHTML=C.join("");A.dom.insertBefore(B,G);this.el=Ext.get(B);this.eventEl=Ext.get(B.firstChild);new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.eventEl.on("mousewheel",this.handleMouseWheel,this);this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");var J=new Ext.KeyNav(this.eventEl,{"left":function(K){K.ctrlKey?this.showPrevMonth():this.update(this.activeDate.add("d",-1))},"right":function(K){K.ctrlKey?this.showNextMonth():this.update(this.activeDate.add("d",1))},"up":function(K){K.ctrlKey?this.showNextYear():this.update(this.activeDate.add("d",-7))},"down":function(K){K.ctrlKey?this.showPrevYear():this.update(this.activeDate.add("d",7))},"pageUp":function(K){this.showNextMonth()},"pageDown":function(K){this.showPrevMonth()},"enter":function(K){K.stopPropagation();return true},scope:this});this.eventEl.on("click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.on("click",this.showMonthPicker,this);this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu");var I=(new Date()).dateFormat(this.format);var D=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,I),tooltip:String.format(this.todayTip,I),handler:this.selectToday,scope:this});if(Ext.isIE){this.el.repaint()}this.update(this.value)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var A=[""];for(var B=0;B<6;B++){A.push("","",B==0?"":"")}A.push("","
      ",this.monthNames[B].substr(0,3),"",this.monthNames[B+6].substr(0,3),"
      ");this.monthPicker.update(A.join(""));this.monthPicker.on("click",this.onMonthClick,this);this.monthPicker.on("dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(C,D,E){E+=1;if((E%2)==0){C.dom.xmonth=5+Math.round(E*0.5)}else{C.dom.xmonth=Math.round((E-1)*0.5)}})}},showMonthPicker:function(){this.createMonthPicker();var A=this.el.getSize();this.monthPicker.setSize(A);this.monthPicker.child("table").setSize(A);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})},updateMPYear:function(E){this.mpyear=E;var C=this.mpYears.elements;for(var B=1;B<=10;B++){var D=C[B-1],A;if((B%2)==0){A=E+Math.round(B*0.5);D.firstChild.innerHTML=A;D.xyear=A}else{A=E-(5-Math.round(B*0.5));D.firstChild.innerHTML=A;D.xyear=A}this.mpYears.item(B-1)[A==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(A){this.mpMonths.each(function(B,C,D){B[B.dom.xmonth==A?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(A){},onMonthClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(C.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(C.is("button.x-date-mp-ok")){this.update(new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if(A=C.up("td.x-date-mp-month",2)){this.mpMonths.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelMonth=A.dom.xmonth}else{if(A=C.up("td.x-date-mp-year",2)){this.mpYears.removeClass("x-date-mp-sel");A.addClass("x-date-mp-sel");this.mpSelYear=A.dom.xyear}else{if(C.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(C.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(D,B){D.stopEvent();var C=new Ext.Element(B),A;if(A=C.up("td.x-date-mp-month",2)){this.update(new Date(this.mpSelYear,A.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if(A=C.up("td.x-date-mp-year",2)){this.update(new Date(A.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(A){if(this.monthPicker){if(A===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(A){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(A){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(A){var B=A.getWheelDelta();if(B>0){this.showPrevMonth();A.stopEvent()}else{if(B<0){this.showNextMonth();A.stopEvent()}}},handleDateClick:function(B,A){B.stopEvent();if(A.dateValue&&!Ext.fly(A.parentNode).hasClass("x-date-disabled")){this.setValue(new Date(A.dateValue));this.fireEvent("select",this,this.value)}},selectToday:function(){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)},update:function(W){var A=this.activeDate;this.activeDate=W;if(A&&this.el){var I=W.getTime();if(A.getMonth()==W.getMonth()&&A.getFullYear()==W.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(a){if(a.dom.firstChild.dateValue==I){a.addClass("x-date-selected");setTimeout(function(){try{a.dom.firstChild.focus()}catch(b){}},50);return false}});return }}var F=W.getDaysInMonth();var J=W.getFirstDateOfMonth();var C=J.getDay()-this.startDay;if(C<=this.startDay){C+=7}var S=W.add("mo",-1);var D=S.getDaysInMonth()-C;var B=this.cells.elements;var K=this.textNodes;F+=C;var P=86400000;var U=(new Date(S.getFullYear(),S.getMonth(),D)).clearTime();var T=new Date().clearTime().getTime();var N=W.clearTime().getTime();var M=this.minDate?this.minDate.clearTime():Number.NEGATIVE_INFINITY;var Q=this.maxDate?this.maxDate.clearTime():Number.POSITIVE_INFINITY;var X=this.disabledDatesRE;var L=this.disabledDatesText;var Z=this.disabledDays?this.disabledDays.join(""):false;var V=this.disabledDaysText;var R=this.format;var G=function(d,a){a.title="";var b=U.getTime();a.firstChild.dateValue=b;if(b==T){a.className+=" x-date-today";a.title=d.todayText}if(b==N){a.className+=" x-date-selected";setTimeout(function(){try{a.firstChild.focus()}catch(f){}},50)}if(bQ){a.className=" x-date-disabled";a.title=d.maxText;return }if(Z){if(Z.indexOf(U.getDay())!=-1){a.title=V;a.className=" x-date-disabled"}}if(X&&R){var c=U.dateFormat(R);if(X.test(c)){a.title=L.replace("%0",c);a.className=" x-date-disabled"}}};var O=0;for(;OG+L.left){H=G-I-this.shadowOffset;E=true}if((F+D)>C+L.top){F=C-D-this.shadowOffset;E=true}if(H=J){F=J-D-5}}K=[H,F];this.storeXY(K);A.setXY.call(this,K);this.sync()}}},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){A.setXY.call(this,this.lastXY)}else{if(this.lastLT){A.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(E,D,G,H,F){if(E){this.showAction()}if(D&&E){var C=function(){this.sync(true);if(H){H()}}.createDelegate(this);A.setVisible.call(this,true,true,G,C,F)}else{if(!E){this.hideUnders(true)}var C=H;if(D){C=function(){this.hideAction();if(H){H()}}.createDelegate(this)}A.setVisible.call(this,E,D,G,C,F);if(E){this.sync(true)}else{if(!D){this.hideAction()}}}},storeXY:function(C){delete this.lastLT;this.lastXY=C},storeLeftTop:function(D,C){delete this.lastXY;this.lastLT=[D,C]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(C){this.storeLeftTop(C,this.getTop(true));A.setLeft.apply(this,arguments);this.sync()},setTop:function(C){this.storeLeftTop(this.getLeft(true),C);A.setTop.apply(this,arguments);this.sync()},setLeftTop:function(D,C){this.storeLeftTop(D,C);A.setLeftTop.apply(this,arguments);this.sync()},setXY:function(F,D,G,H,E){this.fixDisplay();this.beforeAction();this.storeXY(F);var C=this.createCB(H);A.setXY.call(this,F,D,G,C,E);if(!D){C()}},createCB:function(D){var C=this;return function(){C.constrainXY();C.sync(true);if(D){D()}}},setX:function(C,D,F,G,E){this.setXY([C,this.getY()],D,F,G,E)},setY:function(G,C,E,F,D){this.setXY([this.getX(),G],C,E,F,D)},setSize:function(E,F,D,H,I,G){this.beforeAction();var C=this.createCB(I);A.setSize.call(this,E,F,D,H,C,G);if(!D){C()}},setWidth:function(E,D,G,H,F){this.beforeAction();var C=this.createCB(H);A.setWidth.call(this,E,D,G,C,F);if(!D){C()}},setHeight:function(E,D,G,H,F){this.beforeAction();var C=this.createCB(H);A.setHeight.call(this,E,D,G,C,F);if(!D){C()}},setBounds:function(J,H,K,D,I,F,G,E){this.beforeAction();var C=this.createCB(G);if(!I){this.storeXY([J,H]);A.setXY.call(this,[J,H]);A.setSize.call(this,K,D,I,F,C,E);C()}else{A.setBounds.call(this,J,H,K,D,I,F,C,E)}return this},setZIndex:function(C){this.zindex=C;this.setStyle("z-index",C+2);if(this.shadow){this.shadow.setZIndex(C+1)}if(this.shim){this.shim.setStyle("z-index",C)}}})})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/LoadMask-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/LoadMask-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/LoadMask-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.LoadMask=function(C,B){this.el=Ext.get(C);Ext.apply(this,B);if(this.store){this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,false)}else{var A=this.el.getUpdater();A.showLoadIndicator=false;A.on("beforeupdate",this.onBeforeLoad,this);A.on("update",this.onLoad,this);A.on("failure",this.onLoad,this);this.removeMask=Ext.value(this.removeMask,true)}};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);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.onLoad,this)}else{var A=this.el.getUpdater();A.un("beforeupdate",this.onBeforeLoad,this);A.un("update",this.onLoad,this);A.un("failure",this.onLoad,this)}}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/MessageBox-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/MessageBox-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/MessageBox-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.MessageBox=function(){var R,B,N,Q;var G,J,P,A,K,M,H,F;var O,S,L,C="";var D=function(U){R.hide();Ext.callback(B.fn,B.scope||window,[U,S.dom.value],1)};var T=function(){if(B&&B.cls){R.el.removeClass(B.cls)}K.reset()};var E=function(W,U,V){if(B&&B.closable!==false){R.hide()}if(V){V.stopEvent()}};var I=function(U){var W=0;if(!U){O["ok"].hide();O["cancel"].hide();O["yes"].hide();O["no"].hide();return W}R.footer.dom.style.display="";for(var V in O){if(typeof O[V]!="function"){if(U[V]){O[V].show();O[V].setText(typeof U[V]=="string"?U[V]:Ext.MessageBox.buttonText[V]);W+=O[V].el.getWidth()+15}else{O[V].hide()}}}return W};return{getDialog:function(U){if(!R){R=new Ext.Window({autoCreate:true,title:U,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(B&&B.buttons&&B.buttons.no&&!B.buttons.cancel){D("no")}else{D("cancel")}}});O={};var V=this.buttonText;O["ok"]=R.addButton(V["ok"],D.createCallback("ok"));O["yes"]=R.addButton(V["yes"],D.createCallback("yes"));O["no"]=R.addButton(V["no"],D.createCallback("no"));O["cancel"]=R.addButton(V["cancel"],D.createCallback("cancel"));O["ok"].hideMode=O["yes"].hideMode=O["no"].hideMode=O["cancel"].hideMode="offsets";R.render(document.body);R.getEl().addClass("x-window-dlg");N=R.mask;G=R.body.createChild({html:"

      "});H=Ext.get(G.dom.firstChild);var W=G.dom.childNodes[1];J=Ext.get(W.firstChild);P=Ext.get(W.childNodes[2]);P.enableDisplayMode();P.addKeyListener([10,13],function(){if(R.isVisible()&&B&&B.buttons){if(B.buttons.ok){D("ok")}else{if(B.buttons.yes){D("yes")}}}});A=Ext.get(W.childNodes[3]);A.enableDisplayMode();K=new Ext.ProgressBar({renderTo:G});G.createChild({cls:"x-clear"})}return R},updateText:function(X){if(!R.isVisible()&&!B.width){R.setSize(this.maxWidth,100)}J.update(X||" ");var V=C!=""?(H.getWidth()+H.getMargins("lr")):0;var Z=J.getWidth()+J.getMargins("lr");var W=R.getFrameWidth("lr");var Y=R.body.getFrameWidth("lr");if(Ext.isIE&&V>0){V+=3}var U=Math.max(Math.min(B.width||V+Z+W+Y,this.maxWidth),Math.max(B.minWidth||this.minWidth,L||0));if(B.prompt===true){S.setWidth(U-V-W-Y)}if(B.progress===true||B.wait===true){K.setSize(U-V-W-Y)}R.setSize(U,"auto").center();return this},updateProgress:function(V,U,W){K.updateProgress(V,U);if(W){this.updateText(W)}return this},isVisible:function(){return R&&R.isVisible()},hide:function(){if(this.isVisible()){R.hide();T()}return this},show:function(X){if(this.isVisible()){this.hide()}B=X;var Y=this.getDialog(B.title||" ");Y.setTitle(B.title||" ");var U=(B.closable!==false&&B.progress!==true&&B.wait!==true);Y.tools.close.setDisplayed(U);S=P;B.prompt=B.prompt||(B.multiline?true:false);if(B.prompt){if(B.multiline){P.hide();A.show();A.setHeight(typeof B.multiline=="number"?B.multiline:this.defaultTextHeight);S=A}else{P.show();A.hide()}}else{P.hide();A.hide()}S.dom.value=B.value||"";if(B.prompt){Y.focusEl=S}else{var W=B.buttons;var V=null;if(W&&W.ok){V=O["ok"]}else{if(W&&W.yes){V=O["yes"]}}if(V){Y.focusEl=V}}this.setIcon(B.icon);L=I(B.buttons);K.setVisible(B.progress===true||B.wait===true);this.updateProgress(0,B.progressText);this.updateText(B.msg);if(B.cls){Y.el.addClass(B.cls)}Y.proxyDrag=B.proxyDrag===true;Y.modal=B.modal!==false;Y.mask=B.modal!==false?N:false;if(!Y.isVisible()){document.body.appendChild(R.el.dom);Y.setAnimateTarget(B.animEl);Y.show(B.animEl)}Y.on("show",function(){if(U===true){Y.keyMap.enable()}else{Y.keyMap.disable()}});if(B.wait===true){K.wait(B.waitConfig)}return this},setIcon:function(U){if(U&&U!=""){H.removeClass("x-hidden");H.replaceClass(C,U);C=U}else{H.replaceClass(C,"x-hidden");C=""}return this},progress:function(W,V,U){this.show({title:W,msg:V,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:U});return this},wait:function(W,V,U){this.show({title:V,msg:W,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:U});return this},alert:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.OK,fn:V,scope:U});return this},confirm:function(X,W,V,U){this.show({title:X,msg:W,buttons:this.YESNO,fn:V,scope:U,icon:this.QUESTION});return this},prompt:function(Y,X,W,V,U){this.show({title:Y,msg:X,buttons:this.OKCANCEL,fn:W,minWidth:250,scope:V,prompt:true,multiline:U});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,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/PagingToolbar-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/PagingToolbar-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/PagingToolbar-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +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",paramNames:{start:"start",limit:"limit"},initComponent:function(){Ext.PagingToolbar.superclass.initComponent.call(this);this.cursor=0;this.bind(this.store)},onRender:function(B,A){Ext.PagingToolbar.superclass.onRender.call(this,B,A);this.first=this.addButton({tooltip:this.firstText,iconCls:"x-tbar-page-first",disabled:true,handler:this.onClick.createDelegate(this,["first"])});this.prev=this.addButton({tooltip:this.prevText,iconCls:"x-tbar-page-prev",disabled:true,handler:this.onClick.createDelegate(this,["prev"])});this.addSeparator();this.add(this.beforePageText);this.field=Ext.get(this.addDom({tag:"input",type:"text",size:"3",value:"1",cls:"x-tbar-page-number"}).el);this.field.on("keydown",this.onPagingKeydown,this);this.field.on("focus",function(){this.dom.select()});this.afterTextEl=this.addText(String.format(this.afterPageText,1));this.field.setHeight(18);this.addSeparator();this.next=this.addButton({tooltip:this.nextText,iconCls:"x-tbar-page-next",disabled:true,handler:this.onClick.createDelegate(this,["next"])});this.last=this.addButton({tooltip:this.lastText,iconCls:"x-tbar-page-last",disabled:true,handler:this.onClick.createDelegate(this,["last"])});this.addSeparator();this.loading=this.addButton({tooltip:this.refreshText,iconCls:"x-tbar-loading",handler:this.onClick.createDelegate(this,["refresh"])});if(this.displayInfo){this.displayEl=Ext.fly(this.el.dom).createChild({cls:"x-paging-info"})}if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayEl){var A=this.store.getCount();var B=A==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+A,this.store.getTotalCount());this.displayEl.update(B)}},onLoad:function(A,C,F){if(!this.rendered){this.dsLoaded=[A,C,F];return }this.cursor=F.params?F.params[this.paramNames.start]:0;var E=this.getPageData(),B=E.activePage,D=E.pages;this.afterTextEl.el.innerHTML=String.format(this.afterPageText,E.pages);this.field.dom.value=B;this.first.setDisabled(B==1);this.prev.setDisabled(B==1);this.next.setDisabled(B==D);this.last.setDisabled(B==D);this.loading.enable();this.updateInfo()},getPageData:function(){var A=this.store.getTotalCount();return{total:A,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:A=1&C<=E.pages){this.field.dom.value=C}}}}}},beforeLoad:function(){if(this.rendered&&this.loading){this.loading.disable()}},doLoad:function(C){var B={},A=this.paramNames;B[A.start]=C;B[A.limit]=this.pageSize;this.store.load({params:B})},onClick:function(E){var B=this.store;switch(E){case"first":this.doLoad(0);break;case"prev":this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case"next":this.doLoad(this.cursor+this.pageSize);break;case"last":var D=B.getTotalCount();var A=D%this.pageSize;var C=A?(D-A):D-this.pageSize;this.doLoad(C);break;case"refresh":this.doLoad(this.cursor);break}},unbind:function(A){A=Ext.StoreMgr.lookup(A);A.un("beforeload",this.beforeLoad,this);A.un("load",this.onLoad,this);A.un("loadexception",this.onLoadError,this);this.store=undefined},bind:function(A){A=Ext.StoreMgr.lookup(A);A.on("beforeload",this.beforeLoad,this);A.on("load",this.onLoad,this);A.on("loadexception",this.onLoadError,this);this.store=A}});Ext.reg("paging",Ext.PagingToolbar); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Panel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Panel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Panel-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +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",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.tbar){this.elements+=",tbar";if(typeof this.tbar=="object"){this.topToolbar=this.tbar}delete this.tbar}if(this.bbar){this.elements+=",bbar";if(typeof this.bbar=="object"){this.bottomToolbar=this.bbar}delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.title&&this.header!==false){this.elements+=",header"}}if(this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){var C=this.buttons;this.buttons=[];for(var B=0,A=C.length;B"+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible){this.tools=this.tools?this.tools.slice(0):[];if(!this.hideCollapseTool){this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.titleCollapse&&this.header){this.header.on("click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}}if(this.tools){var J=this.tools;this.tools={};this.addTool.apply(this,J)}else{this.tools={}}if(this.buttons&&this.buttons.length>0){var D=this.footer.createChild({cls:"x-panel-btns-ct",cn:{cls:"x-panel-btns x-panel-btns-"+this.buttonAlign,html:"
      "}},null,true);var L=D.getElementsByTagName("tr")[0];for(var F=0,I=this.buttons.length;F ");F.disableFormats=true;F.compile();Ext.Panel.prototype.toolTemplate=F}for(var E=0,C=arguments,B=C.length;E","
      ","
      ","
      ","
       
      ","
      ","
      ","
      ","
       
      ","
      ","
      ","");if(A){this.el=C.insertBefore(A,{cls:this.baseCls},true)}else{this.el=C.append(D,{cls:this.baseCls},true)}if(this.id){this.el.dom.id=this.id}var B=this.el.dom.firstChild;this.progressBar=Ext.get(B.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var E=Ext.get(B.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,E.dom.firstChild]);this.textEl.setWidth(B.offsetWidth)}if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}this.setSize(this.width||"auto","auto");this.progressBar.setHeight(B.offsetHeight)},updateProgress:function(B,C){this.value=B||0;if(C){this.updateText(C)}var A=Math.floor(B*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(A);if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(A)}this.fireEvent("update",this,B,C);return this},wait:function(B){if(!this.waitTimer){var A=this;B=B||{};this.waitTimer=Ext.TaskMgr.start({run:function(C){var D=B.increment||10;this.updateProgress(((((C+D)%D)+1)*(100/D))*0.01)},interval:B.interval||1000,duration:B.duration,onStop:function(){if(B.fn){B.fn.apply(B.scope||this)}this.reset()},scope:A})}return this},isWaiting:function(){return this.waitTimer!=null},updateText:function(A){this.text=A||" ";this.textEl.update(this.text);return this},setSize:function(A,C){Ext.ProgressBar.superclass.setSize.call(this,A,C);if(this.textTopEl){var B=this.el.dom.firstChild;this.textEl.setSize(B.offsetWidth,B.offsetHeight)}return this},reset:function(A){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}if(A===true){this.hide()}return this}});Ext.reg("progress",Ext.ProgressBar); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Resizable-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Resizable-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Resizable-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.Resizable=function(D,E){this.el=Ext.get(D);if(E&&E.wrap){E.resizeChild=this.el;this.el=this.el.wrap(typeof E.wrap=="object"?E.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=E.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(E.resizeChild.getPositioning());E.resizeChild.clearPositioning();if(!E.width||!E.height){var F=E.resizeChild.getSize();this.el.setSize(F.width,F.height)}if(E.pinned&&!E.adjustments){E.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"});this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,E);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var I=this.el.getStyle("position");if(I!="absolute"&&I!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}var M=this.handles.split(/\s*?[,;]\s*?| /);var C=Ext.Resizable.positions;for(var H=0,J=M.length;H0){if(A>(E/2)){D=C+(E-A)}else{D=C-A}}return Math.max(B,D)},resizeElement:function(){var A=this.proxy.getBox();if(this.updateBox){this.el.setBox(A,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(A.width,A.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}return A},constrain:function(B,C,A,D){if(B-CD){C=D-B}}return C},onMouseMove:function(S){if(this.enabled){try{if(this.resizeRegion&&!this.resizeRegion.contains(S.getPoint())){return }var Q=this.curSize||this.startBox;var I=this.startBox.x,H=this.startBox.y;var C=I,B=H;var J=Q.width,R=Q.height;var D=J,L=R;var K=this.minWidth,T=this.minHeight;var P=this.maxWidth,W=this.maxHeight;var F=this.widthIncrement;var A=this.heightIncrement;var U=S.getXY();var O=-(this.startPoint[0]-Math.max(this.minX,U[0]));var M=-(this.startPoint[1]-Math.max(this.minY,U[1]));var G=this.activeHandle.position;switch(G){case"east":J+=O;J=Math.min(Math.max(K,J),P);break;case"south":R+=M;R=Math.min(Math.max(T,R),W);break;case"southeast":J+=O;R+=M;J=Math.min(Math.max(K,J),P);R=Math.min(Math.max(T,R),W);break;case"north":M=this.constrain(R,M,T,W);H+=M;R-=M;break;case"west":O=this.constrain(J,O,K,P);I+=O;J-=O;break;case"northeast":J+=O;J=Math.min(Math.max(K,J),P);M=this.constrain(R,M,T,W);H+=M;R-=M;break;case"northwest":O=this.constrain(J,O,K,P);M=this.constrain(R,M,T,W);H+=M;R-=M;I+=O;J-=O;break;case"southwest":O=this.constrain(J,O,K,P);R+=M;R=Math.min(Math.max(T,R),W);I+=O;J-=O;break}var N=this.snap(J,F,K);var V=this.snap(R,A,T);if(N!=J||V!=R){switch(G){case"northeast":H-=V-R;break;case"north":H-=V-R;break;case"southwest":I-=N-J;break;case"west":I-=N-J;break;case"northwest":I-=N-J;H-=V-R;break}J=N;R=V}if(this.preserveRatio){switch(G){case"southeast":case"east":R=L*(J/D);R=Math.min(Math.max(T,R),W);J=D*(R/L);break;case"south":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case"northeast":J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);break;case"north":var X=J;J=D*(R/L);J=Math.min(Math.max(K,J),P);R=L*(J/D);I+=(X-J)/2;break;case"southwest":R=L*(J/D);R=Math.min(Math.max(T,R),W);var X=J;J=D*(R/L);I+=X-J;break;case"west":var E=R;R=L*(J/D);R=Math.min(Math.max(T,R),W);H+=(E-R)/2;var X=J;J=D*(R/L);I+=X-J;break;case"northwest":var X=J;var E=R;R=L*(J/D);R=Math.min(Math.max(T,R),W);J=D*(R/L);H+=E-R;I+=X-J;break}}this.proxy.setBounds(I,H,J,R);if(this.dynamic){this.resizeElement()}}catch(S){}}},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(C){this.proxy.remove();if(this.overlay){this.overlay.removeAllListeners();this.overlay.remove()}var D=Ext.Resizable.positions;for(var A in D){if(typeof D[A]!="function"&&this[D[A]]){var B=this[D[A]];B.el.removeAllListeners();B.el.remove()}}if(C){this.el.update("");this.el.remove()}},syncHandleHeight:function(){var A=this.el.getHeight(true);if(this.west){this.west.el.setHeight(A)}if(this.east){this.east.el.setHeight(A)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=function(C,E,B,D){if(!this.tpl){var A=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});A.compile();Ext.Resizable.Handle.prototype.tpl=A}this.position=E;this.rz=C;this.el=this.tpl.append(C.el.dom,[this.position],true);this.el.unselectable();if(D){this.el.setOpacity(0)}this.el.on("mousedown",this.onMouseDown,this);if(!B){this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this)}};Ext.Resizable.Handle.prototype={afterResize:function(A){},onMouseDown:function(A){this.rz.onMouseDown(this,A)},onMouseOver:function(A){this.rz.handleOver(this,A)},onMouseOut:function(A){this.rz.handleOut(this,A)}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Shadow-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Shadow-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/Shadow-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.Shadow=function(C){Ext.apply(this,C);if(typeof this.mode!="string"){this.mode=this.defaultMode}var D=this.offset,B={h:0};var A=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":B.w=0;B.l=B.t=D;B.t-=1;if(Ext.isIE){B.l-=this.offset+A;B.t-=this.offset+A;B.w-=A;B.h-=A;B.t+=1}break;case"sides":B.w=(D*2);B.l=-D;B.t=D-1;if(Ext.isIE){B.l-=(this.offset-A);B.t-=this.offset+A;B.l+=1;B.w-=(this.offset-A)*2;B.w-=A+1;B.h-=1}break;case"frame":B.w=B.h=(D*2);B.l=B.t=-D;B.t+=1;B.h-=2;if(Ext.isIE){B.l-=(this.offset-A);B.t-=(this.offset-A);B.l+=1;B.w-=(this.offset+A+1);B.h-=(this.offset+A);B.h+=1}break}this.adjusts=B};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(A){A=Ext.get(A);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=A.dom){this.el.insertBefore(A)}}this.el.setStyle("z-index",this.zIndex||parseInt(A.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(A.getLeft(true),A.getTop(true),A.getWidth(),A.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(A,M,L,D){if(!this.el){return }var I=this.adjusts,G=this.el.dom,N=G.style;var E=0;N.left=(A+I.l)+"px";N.top=(M+I.t)+"px";var K=(L+I.w),C=(D+I.h),F=K+"px",J=C+"px";if(N.width!=F||N.height!=J){N.width=F;N.height=J;if(!Ext.isIE){var H=G.childNodes;var B=Math.max(0,(K-12))+"px";H[0].childNodes[1].style.width=B;H[1].childNodes[1].style.width=B;H[2].childNodes[1].style.width=B;H[1].style.height=Math.max(0,(C-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(A){this.zIndex=A;if(this.el){this.el.setStyle("z-index",A)}}};Ext.Shadow.Pool=function(){var B=[];var A=Ext.isIE?"
      ":"
      ";return{pull:function(){var C=B.shift();if(!C){C=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,A));C.autoBoxAdjust=false}return C},push:function(C){B.push(C)}}}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/SplitBar-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/SplitBar-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/SplitBar-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.SplitBar=function(C,E,B,D,A){this.el=Ext.get(C,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(E,true);this.orientation=B||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!A){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(A).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=D||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=D||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(A,E){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var C=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var D=C-this.activeMinSize;var B=Math.max(this.activeMaxSize-C,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?D:B,this.placement==Ext.SplitBar.LEFT?B:D);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?D:B,this.placement==Ext.SplitBar.TOP?B:D)}this.dragSpecs.startSize=C;this.dragSpecs.startPoint=[A,E];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,A,E)},onEndProxyDrag:function(C){Ext.get(this.proxy).setDisplayed(false);var B=Ext.lib.Event.getXY(C);if(this.overlay){this.overlay.remove();delete this.overlay}var A;if(this.orientation==Ext.SplitBar.HORIZONTAL){A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?B[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-B[0])}else{A=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?B[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-B[1])}A=Math.min(Math.max(A,this.activeMinSize),this.activeMaxSize);if(A!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,A)!==false){this.adapter.setElementSize(this,A);this.fireEvent("moved",this,A);this.fireEvent("resize",this,A)}}},getAdapter:function(){return this.adapter},setAdapter:function(A){this.adapter=A;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(A){this.minSize=A},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(A){this.maxSize=A},setCurrentSize:function(B){var A=this.animate;this.animate=false;this.adapter.setElementSize(this,B);this.animate=A},destroy:function(A){if(this.shim){this.shim.remove()}this.dd.unreg();Ext.removeNode(this.proxy);if(A){this.el.remove()}}});Ext.SplitBar.createProxy=function(B){var C=new Ext.Element(document.createElement("div"));C.unselectable();var A="x-splitbar-proxy";C.addClass(A+" "+(B==Ext.SplitBar.HORIZONTAL?A+"-h":A+"-v"));document.body.appendChild(C.dom);return C.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(A){},getElementSize:function(A){if(A.orientation==Ext.SplitBar.HORIZONTAL){return A.resizingEl.getWidth()}else{return A.resizingEl.getHeight()}},setElementSize:function(B,A,C){if(B.orientation==Ext.SplitBar.HORIZONTAL){if(!B.animate){B.resizingEl.setWidth(A);if(C){C(B,A)}}else{B.resizingEl.setWidth(A,true,0.1,C,"easeOut")}}else{if(!B.animate){B.resizingEl.setHeight(A);if(C){C(B,A)}}else{B.resizingEl.setHeight(A,true,0.1,C,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(A){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(A)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(A){this.basic.init(A)},getElementSize:function(A){return this.basic.getElementSize(A)},setElementSize:function(B,A,C){this.basic.setElementSize(B,A,this.moveSplitter.createDelegate(this,[B]))},moveSplitter:function(A){var B=Ext.SplitBar;switch(A.placement){case B.LEFT:A.el.setX(A.resizingEl.getRight());break;case B.RIGHT:A.el.setStyle("right",(this.container.getWidth()-A.resizingEl.getLeft())+"px");break;case B.TOP:A.el.setY(A.resizingEl.getBottom());break;case B.BOTTOM:A.el.setY(A.resizingEl.getTop()-A.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/SplitButton-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/SplitButton-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/SplitButton-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.SplitButton=Ext.extend(Ext.Button,{arrowSelector:"button:last",initComponent:function(){Ext.SplitButton.superclass.initComponent.call(this);this.addEvents("arrowclick")},onRender:function(D,A){var B=new Ext.Template("
      ","","","
       
      ","","","
       
      ");var C,F=[this.text||" ",this.type];if(A){C=B.insertBefore(A,F,true)}else{C=B.append(D,F,true)}var E=C.child(this.buttonSelector);this.initButtonEl(C,E);this.arrowBtnTable=C.child("table:last");if(this.arrowTooltip){C.child(this.arrowSelector).dom[this.tooltipType]=this.arrowTooltip}},autoWidth:function(){if(this.el){var C=this.el.child("table:first");var B=this.el.child("table:last");this.el.setWidth("auto");C.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var A=this.el.child(this.buttonSelector);if(A&&A.getWidth()>20){A.clip();A.setWidth(Ext.util.TextMetrics.measure(A,this.text).width+A.getFrameWidth("lr"))}}if(this.minWidth){if((C.getWidth()+B.getWidth())","","{text}","");D.disableFormats=true;D.compile();Ext.TabPanel.prototype.itemTpl=D}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.on("add",this.onAdd,this);this.on("remove",this.onRemove,this);this.strip.on("mousedown",this.onStripMouseDown,this);this.strip.on("click",this.onStripClick,this);this.strip.on("contextmenu",this.onStripContextMenu,this);if(this.enableTabScroll){this.strip.on("mousewheel",this.onWheel,this)}},findTargets:function(C){var B=null;var A=C.getTarget("li",this.strip);if(A){B=this.getComponent(A.id.split("__")[1]);if(B.disabled){return{close:null,item:null,el:null}}}return{close:C.getTarget(".x-tab-strip-close",this.strip),item:B,el:A}},onStripMouseDown:function(B){B.preventDefault();if(B.button!=0){return }var A=this.findTargets(B);if(A.close){this.remove(A.item);return }if(A.item&&A.item!=this.activeTab){this.setActiveTab(A.item)}},onStripClick:function(B){var A=this.findTargets(B);if(!A.close&&A.item&&A.item!=this.activeTab){this.setActiveTab(A.item)}},onStripContextMenu:function(B){B.preventDefault();var A=this.findTargets(B);if(A.item){this.fireEvent("contextmenu",this,A.item,B)}},readTabs:function(D){if(D===true){this.items.each(function(G){this.remove(G)},this)}var C=this.el.query(this.autoTabSelector);for(var B=0,A=C.length;B20?C:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(G>(A-C)){E.dom.scrollLeft=A-C}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){var C=this.stripWrap.dom.offsetHeight;var A=this.header.insertFirst({cls:"x-tab-scroller-left"});A.setHeight(C);A.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(A,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=A;var B=this.header.insertFirst({cls:"x-tab-scroller-right"});B.setHeight(C);B.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(B,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=B},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(E,A){if(!E){return }var C=this.getTabEl(E);var G=this.getScrollPos(),D=this.getScrollArea();var F=Ext.fly(C).getOffsetsTo(this.stripWrap)[0]+G;var B=F+C.offsetWidth;if(F(G+D)){this.scrollTo(B-D,A)}}},scrollTo:function(B,A){this.stripWrap.scrollTo("left",B,A?this.getScrollAnim():false);if(!A){this.updateScrollButtons()}},onWheel:function(D){var E=D.getWheelDelta()*this.wheelIncrement*-1;D.stopEvent();var F=this.getScrollPos();var C=F+E;var A=this.getScrollWidth()-this.getScrollArea();var B=Math.max(0,Math.min(A,C));if(B!=F){this.scrollTo(B,false)}},onScrollRight:function(){var A=this.getScrollWidth()-this.getScrollArea();var C=this.getScrollPos();var B=Math.min(A,C+this.getScrollIncrement());if(B!=C){this.scrollTo(B,this.animScroll)}},onScrollLeft:function(){var B=this.getScrollPos();var A=Math.max(0,B-this.getScrollIncrement());if(A!=B){this.scrollTo(A,this.animScroll)}},updateScrollButtons:function(){var A=this.getScrollPos();this.scrollLeft[A==0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[A>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var A=[];return{add:function(B){A.push(B);if(A.length>10){A.shift()}},remove:function(E){var D=[];for(var C=0,B=A.length;C"},onRender:function(C,B){this.el=C.createChild(this.autoCreate,B);this.tr=this.el.child("tr",true)},afterRender:function(){A.superclass.afterRender.call(this);if(this.buttons){this.add.apply(this,this.buttons);delete this.buttons}},add:function(){var C=arguments,B=C.length;for(var D=0;D"){this.addFill()}else{this.addText(E)}}}}else{if(E.tagName){this.addElement(E)}else{if(typeof E=="object"){if(E.xtype){this.addField(Ext.ComponentMgr.create(E,"button"))}else{this.addButton(E)}}}}}}}},addSeparator:function(){return this.addItem(new A.Separator())},addSpacer:function(){return this.addItem(new A.Spacer())},addFill:function(){return this.addItem(new A.Fill())},addElement:function(B){return this.addItem(new A.Item(B))},addItem:function(B){var C=this.nextBlock();this.initMenuTracking(B);B.render(C);this.items.add(B);return B},addButton:function(D){if(D instanceof Array){var F=[];for(var E=0,C=D.length;E0){J.sort(C);var I=J[0].manager.zseed;for(var K=0;K=0;--H){if(!D[H].hidden){B(D[H]);return }}B(null)};return{zseed:9000,register:function(H){F[H.id]=H;D.push(H);H.on("hide",A)},unregister:function(H){delete F[H.id];H.un("hide",A);D.remove(H)},get:function(H){return typeof H=="object"?H:F[H]},bringToFront:function(H){H=this.get(H);if(H!=E){H._lastAccess=new Date().getTime();G();return true}return false},sendToBack:function(H){H=this.get(H);H._lastAccess=-(new Date().getTime());G();return H},hideAll:function(){for(var H in F){if(F[H]&&typeof F[H]!="function"&&F[H].isVisible()){F[H].hide()}}},getActive:function(){return E},getBy:function(J,I){var K=[];for(var H=D.length-1;H>=0;--H){var L=D[H];if(J.call(I||L,L)!==false){K.push(L)}}return K},each:function(I,H){for(var J in F){if(F[J]&&typeof F[J]!="function"){if(I.call(H||F[J],F[J])===false){return }}}}}};Ext.WindowMgr=new Ext.WindowGroup(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Action-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Action-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Action-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.Action=function(B,A){this.form=B;this.options=A||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(A){},success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(A){this.response=A;if(!A.responseText){return true}this.result=this.handleResponse(A);return this.result},getUrl:function(C){var A=this.options.url||this.form.url||this.form.el.dom.action;if(C){var B=this.getParams();if(B){A+=(A.indexOf("?")!=-1?"&":"?")+B}}return A},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var A=this.form.baseParams;var B=this.options.params;if(B){if(typeof B=="object"){B=Ext.urlEncode(Ext.applyIf(B,A))}else{if(typeof B=="string"&&A){B+="&"+Ext.urlEncode(A)}}}else{if(A){B=Ext.urlEncode(A)}}return B},createCallback:function(A){var A=A||{};return{success:this.success,failure:this.failure,scope:this,timeout:(A.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(B,A){Ext.form.Action.Submit.superclass.constructor.call(this,B,A)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var B=this.options;var C=this.getMethod();var A=C=="POST";if(B.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(B),{form:this.form.el.dom,url:this.getUrl(!A),method:C,params:A?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(B.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(B){var A=this.processResponse(B);if(A===true||A.success){this.form.afterAction(this,true);return }if(A.errors){this.form.markInvalid(A.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(C){if(this.form.errorReader){var B=this.form.errorReader.read(C);var F=[];if(B.records){for(var D=0,A=B.records.length;D
      {"+this.displayField+"}
      "}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+A+"-item"});this.view.on("click",this.onViewClick,this);this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.resizer.on("resize",function(E,C,D){this.maxHeight=D-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=C;this.innerList.setWidth(C-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},bindStore:function(A,B){if(this.store&&!B){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.collapse,this);if(!A){this.store=null;if(this.view){this.view.setStore(null)}}}if(A){this.store=Ext.StoreMgr.lookup(A);this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.collapse,this);if(this.view){this.view.setStore(A)}}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{"up":function(A){this.inKeyMode=true;this.selectPrev()},"down":function(A){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},"enter":function(A){this.onViewClick()},"esc":function(A){this.collapse()},"tab":function(A){this.onViewClick(false);return true},scope:this,doRelay:function(C,B,A){if(A=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments)}return true},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this)}if(this.forceSelection){this.on("blur",this.doForce,this)}},onDestroy:function(){if(this.view){this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners()}if(this.list){this.list.destroy()}this.bindStore(null);Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(A){if(A.isNavKeyPress()&&!this.list.isVisible()){this.fireEvent("specialkey",this,A)}},onResize:function(A,B){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&this.listWidth===undefined){var C=Math.max(A,this.minListWidth);this.list.setWidth(C);this.innerList.setWidth(C-this.list.getFrameWidth("lr"))}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=this.disabled}},setEditable:function(A){if(A==this.editable){return }this.editable=A;if(!A){this.el.dom.setAttribute("readOnly",true);this.el.on("mousedown",this.onTriggerClick,this);this.el.addClass("x-combo-noedit")}else{this.el.dom.setAttribute("readOnly",false);this.el.un("mousedown",this.onTriggerClick,this);this.el.removeClass("x-combo-noedit")}},onBeforeLoad:function(){if(!this.hasFocus){return }this.innerList.update(this.loadingText?"
      "+this.loadingText+"
      ":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return }if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(!this.selectByValue(this.value,true)){this.select(0,true)}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.onEmptyResults()}},onTypeAhead:function(){if(this.store.getCount()>0){var B=this.store.getAt(0);var C=B.data[this.displayField];var A=C.length;var D=this.getRawValue().length;if(D!=A){this.setRawValue(C);this.selectText(D,C.length)}}},onSelect:function(A,B){if(this.fireEvent("beforeselect",this,A,B)!==false){this.setValue(A.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,A,B)}},getValue:function(){if(this.valueField){return typeof this.value!="undefined"?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText()},setValue:function(A){var C=A;if(this.valueField){var B=this.findRecord(this.valueField,A);if(B){C=B.data[this.displayField]}else{if(this.valueNotFoundText!==undefined){C=this.valueNotFoundText}}}this.lastSelectionText=C;if(this.hiddenField){this.hiddenField.value=A}Ext.form.ComboBox.superclass.setValue.call(this,C);this.value=A},findRecord:function(C,B){var A;if(this.store.getCount()>0){this.store.each(function(D){if(D.data[C]==B){A=D;return false}})}return A},onViewMove:function(B,A){this.inKeyMode=false},onViewOver:function(D,B){if(this.inKeyMode){return }var C=this.view.findItemFromChild(B);if(C){var A=this.view.indexOf(C);this.select(A,false)}},onViewClick:function(B){var A=this.view.getSelectedIndexes()[0];var C=this.store.getAt(A);if(C){this.onSelect(C,A)}if(B!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var A=this.innerList.dom;var C=this.list.getFrameWidth("tb");var B=Math.max(A.clientHeight,A.offsetHeight,A.scrollHeight);this.innerList.setHeight(B0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!=0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(A){if(this.editable!==false&&!A.isSpecialKey()){this.lastKey=A.getKey();this.dqTask.delay(this.queryDelay)}},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===undefined?"":this.lastSelectionText;this.applyEmptyText()}},doQuery:function(C,B){if(C===undefined||C===null){C=""}var A={query:C,forceAll:B,combo:this,cancel:false};if(this.fireEvent("beforequery",A)===false||A.cancel){return false}C=A.query;B=A.forceAll;if(B===true||(C.length>=this.minChars)){if(this.lastQuery!==C){this.lastQuery=C;if(this.mode=="local"){this.selectedIndex=-1;if(B){this.store.clearFilter()}else{this.store.filter(this.displayField,C)}this.onLoad()}else{this.store.baseParams[this.queryParam]=C;this.store.load({params:this.getParams(C)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(A){var B={};if(this.pageSize){B.start=0;B.limit=this.pageSize}return B},collapse:function(){if(!this.isExpanded()){return }this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(A){if(!A.within(this.wrap)&&!A.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return }this.list.alignTo(this.wrap,this.listAlign);this.list.show();Ext.getDoc().on("mousewheel",this.collapseIf,this);Ext.getDoc().on("mousedown",this.collapseIf,this);this.fireEvent("expand",this)},onTriggerClick:function(){if(this.disabled){return }if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/DateField-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/DateField-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/DateField-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDays:null,disabledDaysText:"Disabled",disabledDates:null,disabledDatesText:"Disabled",minValue:null,maxValue:null,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",defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}this.ddMatch=null;if(this.disabledDates){var A=this.disabledDates;var C="(?:";for(var B=0;Bthis.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var A=E.getDay();for(var B=0;B0){this.setValue(this.el.dom.value)}}},isDirty:function(){if(this.disabled){return false}return String(this.getValue())!==String(this.originalValue)},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents()},fireKey:function(A){if(A.isSpecialKey()){this.fireEvent("specialkey",this,A)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.el.on(Ext.isIE?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);this.el.on("blur",this.onBlur,this);this.originalValue=this.getValue()},onFocus:function(){if(!Ext.isOpera&&this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(!Ext.isOpera&&this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate()}var A=this.getValue();if(String(A)!==String(this.startValue)){this.fireEvent("change",this,A,this.startValue)}this.fireEvent("blur",this)},isValid:function(A){if(this.disabled){return true}var C=this.preventMark;this.preventMark=A===true;var B=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=C;return B},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(A){return A},validateValue:function(A){return true},markInvalid:function(C){if(!this.rendered||this.preventMark){return }this.el.addClass(this.invalidClass);C=C||this.invalidText;switch(this.msgTarget){case"qtip":this.el.dom.qtip=C;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}break;case"title":this.el.dom.title=C;break;case"under":if(!this.errorEl){var B=this.el.findParent(".x-form-element",5,true);this.errorEl=B.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(B.getWidth(true)-20)}this.errorEl.update(C);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case"side":if(!this.errorIcon){var B=this.el.findParent(".x-form-element",5,true);this.errorIcon=B.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=C;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML=C;A.style.display=this.msgDisplay;break}this.fireEvent("invalid",this,C)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},clearInvalid:function(){if(!this.rendered||this.preventMark){return }this.el.removeClass(this.invalidClass);switch(this.msgTarget){case"qtip":this.el.dom.qtip="";break;case"title":this.el.dom.title="";break;case"under":if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)}break;case"side":if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML="";A.style.display="none";break}this.fireEvent("valid",this)},getRawValue:function(){var A=this.rendered?this.el.getValue():Ext.value(this.value,"");if(A===this.emptyText){A=""}return A},getValue:function(){if(!this.rendered){return this.value}var A=this.el.getValue();if(A===this.emptyText||A===undefined){A=""}return A},setRawValue:function(A){return this.el.dom.value=(A===null||A===undefined?"":A)},setValue:function(A){this.value=A;if(this.rendered){this.el.dom.value=(A===null||A===undefined?"":A);this.validate()}},adjustSize:function(A,C){var B=Ext.form.Field.superclass.adjustSize.call(this,A,C);B.width=this.adjustWidth(this.el.dom.tagName,B.width);return B},adjustWidth:function(A,B){A=A.toLowerCase();if(typeof B=="number"&&!Ext.isSafari){if(Ext.isIE&&(A=="input"||A=="textarea")){if(A=="input"&&!Ext.isStrict){return B-3}if(A=="input"&&Ext.isStrict){return B-(Ext.isIE6?4:1)}if(A="textarea"&&Ext.isStrict){return B-2}}else{if(Ext.isOpera&&Ext.isStrict){if(A=="input"){return B+2}if(A="textarea"){return B-2}}}}return B}});Ext.form.Field.msgFx={normal:{show:function(A,B){A.setDisplayed("block")},hide:function(A,B){A.setDisplayed(false).update("")}},slide:{show:function(A,B){A.slideIn("t",{stopFx:true})},hide:function(A,B){A.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(A,B){A.fixDisplay();A.alignTo(B.el,"tl-tr");A.slideIn("l",{stopFx:true})},hide:function(A,B){A.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/FieldSet-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/FieldSet-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/FieldSet-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.FieldSet=Ext.extend(Ext.Panel,{baseCls:"x-fieldset",layout:"form",onRender:function(B,A){if(!this.el){this.el=document.createElement("fieldset");this.el.id=this.id;this.el.appendChild(document.createElement("legend")).className="x-fieldset-header"}Ext.form.FieldSet.superclass.onRender.call(this,B,A);if(this.checkboxToggle){var C=typeof this.checkboxToggle=="object"?this.checkboxToggle:{tag:"input",type:"checkbox",name:this.checkboxName||this.id+"-checkbox"};this.checkbox=this.header.insertFirst(C);this.checkbox.dom.checked=!this.collapsed;this.checkbox.on("click",this.onCheckClick,this)}},onCollapse:function(A,B){if(this.checkbox){this.checkbox.dom.checked=false}this.afterCollapse()},onExpand:function(A,B){if(this.checkbox){this.checkbox.dom.checked=true}this.afterExpand()},onCheckClick:function(){this[this.checkbox.dom.checked?"expand":"collapse"]()}});Ext.reg("fieldset",Ext.form.FieldSet); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Form-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Form-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Form-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.FormPanel=Ext.extend(Ext.Panel,{buttonAlign:"center",minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,layout:"form",initComponent:function(){this.form=this.createForm();Ext.FormPanel.superclass.initComponent.call(this);this.addEvents("clientvalidation");this.relayEvents(this.form,["beforeaction","actionfailed","actioncomplete"])},createForm:function(){delete this.initialConfig.listeners;return new Ext.form.BasicForm(null,this.initialConfig)},initFields:function(){var C=this.form;var A=this;var B=function(D){if(D.doLayout&&D!=A){Ext.applyIf(D,{labelAlign:D.ownerCt.labelAlign,labelWidth:D.ownerCt.labelWidth,itemCls:D.ownerCt.itemCls});if(D.items){D.items.each(B)}}else{if(D.isFormField){C.add(D)}}};this.items.each(B)},getLayoutTarget:function(){return this.form.el},getForm:function(){return this.form},onRender:function(B,A){this.initFields();Ext.FormPanel.superclass.onRender.call(this,B,A);var C={tag:"form",method:this.method||"POST",id:this.formId||Ext.id()};if(this.fileUpload){C.enctype="multipart/form-data"}this.form.initEl(this.body.createChild(C))},beforeDestroy:function(){Ext.FormPanel.superclass.beforeDestroy.call(this);Ext.destroy(this.form)},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);if(this.monitorValid){this.startMonitoring()}},startMonitoring:function(){if(!this.bound){this.bound=true;Ext.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){this.bound=false},load:function(){this.form.load.apply(this.form,arguments)},onDisable:function(){Ext.FormPanel.superclass.onDisable.call(this);if(this.form){this.form.items.each(function(){this.disable()})}},onEnable:function(){Ext.FormPanel.superclass.onEnable.call(this);if(this.form){this.form.items.each(function(){this.enable()})}},bindHandler:function(){if(!this.bound){return false}var D=true;this.form.items.each(function(E){if(!E.isValid(true)){D=false;return false}});if(this.buttons){for(var C=0,A=this.buttons.length;C":">"),C,"")}return D.join("")},createToolbar:function(C){function B(F,D,E){return{itemId:F,cls:"x-btn-icon x-edit-"+F,enableToggle:D!==false,scope:C,handler:E||C.relayBtnCmd,clickEvent:"mousedown",tooltip:C.buttonTips[F]||undefined,tabIndex:-1}}var A=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});A.el.on("click",function(D){D.preventDefault()});if(this.enableFont&&!Ext.isSafari){this.fontSelect=A.el.createChild({tag:"select",cls:"x-font-select",html:this.createFontOptions()});this.fontSelect.on("change",function(){var D=this.fontSelect.dom.value;this.relayCmd("fontname",D);this.deferFocus()},this);A.add(this.fontSelect.dom,"-")}if(this.enableFormat){A.add(B("bold"),B("italic"),B("underline"))}if(this.enableFontSize){A.add("-",B("increasefontsize",false,this.adjustFont),B("decreasefontsize",false,this.adjustFont))}if(this.enableColors){A.add("-",{itemId:"forecolor",cls:"x-btn-icon x-edit-forecolor",clickEvent:"mousedown",tooltip:C.buttonTips["forecolor"]||undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,selectHandler:function(E,D){this.execCmd("forecolor",Ext.isSafari||Ext.isIE?"#"+D:D);this.deferFocus()},scope:this,clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon x-edit-backcolor",clickEvent:"mousedown",tooltip:C.buttonTips["backcolor"]||undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,selectHandler:function(E,D){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",D);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isSafari||Ext.isIE?"#"+D:D);this.deferFocus()}},scope:this,clickEvent:"mousedown"})})}if(this.enableAlignments){A.add("-",B("justifyleft"),B("justifycenter"),B("justifyright"))}if(!Ext.isSafari){if(this.enableLinks){A.add("-",B("createlink",false,this.createLink))}if(this.enableLists){A.add("-",B("insertorderedlist"),B("insertunorderedlist"))}if(this.enableSourceEdit){A.add("-",B("sourceedit",true,function(D){this.toggleSourceEdit(D.pressed)}))}}this.tb=A},getDocMarkup:function(){return""},getEditorBody:function(){return this.doc.body||this.doc.documentElement},onRender:function(C,A){Ext.form.HtmlEditor.superclass.onRender.call(this,C,A);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.tb.items.each(function(E){if(E.itemId!="sourceedit"){E.disable()}});var D=document.createElement("iframe");D.name=Ext.id();D.frameBorder="no";D.src=(Ext.SSL_SECURE_URL||"javascript:false");this.wrap.dom.appendChild(D);this.iframe=D;if(Ext.isIE){D.contentWindow.document.designMode="on";this.doc=D.contentWindow.document;this.win=D.contentWindow}else{this.doc=(D.contentDocument||window.frames[D.name].document);this.win=window.frames[D.name];this.doc.designMode="on"}this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var B={run:function(){if(this.doc.body||this.doc.readyState=="complete"){Ext.TaskMgr.stop(B);this.doc.designMode="on";this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(B);if(!this.width){this.setSize(this.el.getSize())}},onResize:function(B,C){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(typeof B=="number"){var D=B-this.wrap.getFrameWidth("lr");this.el.setWidth(this.adjustWidth("textarea",D));this.iframe.style.width=D+"px"}if(typeof C=="number"){var A=C-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(this.adjustWidth("textarea",A));this.iframe.style.height=A+"px";if(this.doc){this.getEditorBody().style.height=(A-(this.iframePad*2))+"px"}}}},toggleSourceEdit:function(A){if(A===undefined){A=!this.sourceEditMode}this.sourceEditMode=A===true;var C=this.tb.items.get("sourceedit");if(C.pressed!==this.sourceEditMode){C.toggle(this.sourceEditMode);return }if(this.sourceEditMode){this.tb.items.each(function(D){if(D.itemId!="sourceedit"){D.disable()}});this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus()}else{if(this.initialized){this.tb.items.each(function(D){D.enable()})}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus()}var B=this.lastSize;if(B){delete this.lastSize;this.setSize(B)}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var A=prompt(this.createLinkText,this.defaultLinkValue);if(A&&A!="http:/"+"/"){this.relayCmd("createlink",A)}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(A){Ext.form.HtmlEditor.superclass.setValue.call(this,A);this.pushValue()},cleanHtml:function(A){A=String(A);if(A.length>5){if(Ext.isSafari){A=A.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}}if(A==" "){A=""}return A},syncValue:function(){if(this.initialized){var D=this.getEditorBody();var C=D.innerHTML;if(Ext.isSafari){var B=D.getAttribute("style");var A=B.match(/text-align:(.*?);/i);if(A&&A[1]){C="
      "+C+"
      "}}C=this.cleanHtml(C);if(this.fireEvent("beforesync",this,C)!==false){this.el.dom.value=C;this.fireEvent("sync",this,C)}}},pushValue:function(){if(this.initialized){var A=this.el.dom.value;if(!this.activated&&A.length<1){A=" "}if(this.fireEvent("beforepush",this,A)!==false){this.getEditorBody().innerHTML=A;this.fireEvent("push",this,A)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){var B=this.getEditorBody();var A=this.el.getStyles("font-size","font-family","background-image","background-repeat");A["background-attachment"]="fixed";B.bgProperties="fixed";Ext.DomHelper.applyStyles(B,A);Ext.EventManager.on(this.doc,{"mousedown":this.onEditorEvent,"dblclick":this.onEditorEvent,"click":this.onEditorEvent,"keyup":this.onEditorEvent,buffer:100,scope:this});if(Ext.isGecko){Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isSafari||Ext.isOpera){Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this)}this.initialized=true;this.fireEvent("initialize",this);this.pushValue()},onDestroy:function(){if(this.rendered){this.tb.items.each(function(A){if(A.menu){A.menu.removeAll();if(A.menu.el){A.menu.el.destroy()}}A.destroy()});this.wrap.dom.innerHTML="";this.wrap.remove()}},onFirstFocus:function(){this.activated=true;this.tb.items.each(function(D){D.enable()});if(Ext.isGecko){this.win.focus();var A=this.win.getSelection();if(!A.focusNode||A.focusNode.nodeType!=3){var B=A.getRangeAt(0);B.selectNodeContents(this.getEditorBody());B.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(C){}}this.fireEvent("activate",this)},adjustFont:function(B){var C=B.itemId=="increasefontsize"?1:-1;if(Ext.isSafari){C*=2}var A=parseInt(this.doc.queryCommandValue("FontSize")||3,10);A=Math.max(1,A+C);this.execCmd("FontSize",A+(Ext.isSafari?"px":0))},onEditorEvent:function(A){this.updateToolbar()},updateToolbar:function(){if(!this.activated){this.onFirstFocus();return }var B=this.tb.items.map,C=this.doc;if(this.enableFont&&!Ext.isSafari){var A=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(A!=this.fontSelect.dom.value){this.fontSelect.dom.value=A}}if(this.enableFormat){B.bold.toggle(C.queryCommandState("bold"));B.italic.toggle(C.queryCommandState("italic"));B.underline.toggle(C.queryCommandState("underline"))}if(this.enableAlignments){B.justifyleft.toggle(C.queryCommandState("justifyleft"));B.justifycenter.toggle(C.queryCommandState("justifycenter"));B.justifyright.toggle(C.queryCommandState("justifyright"))}if(!Ext.isSafari&&this.enableLists){B.insertorderedlist.toggle(C.queryCommandState("insertorderedlist"));B.insertunorderedlist.toggle(C.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(A){this.relayCmd(A.itemId)},relayCmd:function(B,A){this.win.focus();this.execCmd(B,A);this.updateToolbar();this.deferFocus()},execCmd:function(B,A){this.doc.execCommand(B,false,A===undefined?null:A);this.syncValue()},applyCommand:function(B){if(B.ctrlKey){var C=B.getCharCode(),A;if(C>0){C=String.fromCharCode(C);switch(C){case"b":A="bold";break;case"i":A="italic";break;case"u":A="underline";break}if(A){this.win.focus();this.execCmd(A);this.deferFocus();B.preventDefault()}}}},insertAtCursor:function(B){if(!this.activated){return }if(Ext.isIE){this.win.focus();var A=this.doc.selection.createRange();if(A){A.collapse(true);A.pasteHTML(B);this.syncValue();this.deferFocus()}}else{if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",B);this.deferFocus()}else{if(Ext.isSafari){this.execCmd("InsertText",B);this.deferFocus()}}}},fixKeys:function(){if(Ext.isIE){return function(D){var A=D.getKey(),B;if(A==D.TAB){D.stopEvent();B=this.doc.selection.createRange();if(B){B.collapse(true);B.pasteHTML("    ");this.deferFocus()}}else{if(A==D.ENTER){B=this.doc.selection.createRange();if(B){var C=B.parentElement();if(!C||C.tagName.toLowerCase()!="li"){D.stopEvent();B.pasteHTML("
      ");B.collapse(false);B.select()}}}}}}else{if(Ext.isOpera){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.win.focus();this.execCmd("InsertHTML","    ");this.deferFocus()}}}else{if(Ext.isSafari){return function(B){var A=B.getKey();if(A==B.TAB){B.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/NumberField-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/NumberField-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/NumberField-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +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",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);var B=this.baseChars+"";if(this.allowDecimals){B+=this.decimalSeparator}if(this.allowNegative){B+="-"}this.stripCharsRe=new RegExp("[^"+B+"]","gi");var A=function(D){var C=D.getKey();if(!Ext.isIE&&(D.isSpecialKey()||C==D.BACKSPACE||C==D.DELETE)){return }var E=D.getCharCode();if(B.indexOf(String.fromCharCode(E))===-1){D.stopEvent()}};this.el.on("keypress",A,this)},validateValue:function(B){if(!Ext.form.NumberField.superclass.validateValue.call(this,B)){return false}if(B.length<1){return true}B=String(B).replace(this.decimalSeparator,".");if(isNaN(B)){this.markInvalid(String.format(this.nanText,B));return false}var A=this.parseValue(B);if(Athis.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));return false}return true},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(A){Ext.form.NumberField.superclass.setValue.call(this,String(parseFloat(A)).replace(".",this.decimalSeparator))},parseValue:function(A){A=parseFloat(String(A).replace(this.decimalSeparator,"."));return isNaN(A)?"":A},fixPrecision:function(B){var A=isNaN(B);if(!this.allowDecimals||this.decimalPrecision==-1||A||!B){return A?"":B}return parseFloat(parseFloat(B).toFixed(this.decimalPrecision))},beforeBlur:function(){var A=this.parseValue(this.getRawValue());if(A){this.setValue(this.fixPrecision(A))}}});Ext.reg("numberfield",Ext.form.NumberField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Radio-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Radio-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/Radio-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.Radio=Ext.extend(Ext.form.Checkbox,{inputType:"radio",markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,getGroupValue:function(){return this.el.up("form").child("input[name="+this.el.dom.name+"]:checked",true).value}});Ext.reg("radio",Ext.form.Radio); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TextArea-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TextArea-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TextArea-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.TextArea=Ext.extend(Ext.form.TextField,{growMin:60,growMax:1000,growAppend:" \n ",growPad:0,enterIsSpecial:false,preventScrollbars:false,onRender:function(B,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:100px;height:60px;",autocomplete:"off"}}Ext.form.TextArea.superclass.onRender.call(this,B,A);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars){this.el.setStyle("overflow","hidden")}this.el.setHeight(this.growMin)}},onDestroy:function(){if(this.textSizeEl){Ext.removeNode(this.textSizeEl)}Ext.form.TextArea.superclass.onDestroy.call(this)},fireKey:function(A){if(A.isSpecialKey()&&(this.enterIsSpecial||(A.getKey()!=A.ENTER||A.hasModifier()))){this.fireEvent("specialkey",this,A)}},onKeyUp:function(A){if(!A.isNavKeyPress()||A.getKey()==A.ENTER){this.autoSize()}},autoSize:function(){if(!this.grow||!this.textSizeEl){return }var C=this.el;var A=C.dom.value;var D=this.textSizeEl;D.innerHTML="";D.appendChild(document.createTextNode(A));A=D.innerHTML;Ext.fly(D).setWidth(this.el.getWidth());if(A.length<1){A="  "}else{if(Ext.isIE){A=A.replace(/\n/g,"

       

      ")}A+=this.growAppend}D.innerHTML=A;var B=Math.min(this.growMax,Math.max(D.offsetHeight,this.growMin)+this.growPad);if(B!=this.lastHeight){this.lastHeight=B;this.el.setHeight(B);this.fireEvent("autosize",this,B)}}});Ext.reg("textarea",Ext.form.TextArea); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TextField-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TextField-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TextField-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +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")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.el.on("keyup",this.filterValidation,this)}else{if(this.validationEvent!==false){this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);if(this.emptyText){this.on("blur",this.postBlur,this);this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.el.on("keypress",this.filterKeys,this)}if(this.grow){this.el.on("keyup",this.onKeyUp,this,{buffer:50});this.el.on("click",this.autoSize,this)}},processValue:function(A){if(this.stripCharsRe){var B=A.replace(this.stripCharsRe,"");if(B!==A){this.setRawValue(B);return B}}return A},filterValidation:function(A){if(!A.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onKeyUp:function(A){if(!A.isNavKeyPress()){this.autoSize()}},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue("")}this.el.removeClass(this.emptyClass)}if(this.selectOnFocus){this.el.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(B){var A=B.getKey();if(!Ext.isIE&&(B.isNavKeyPress()||A==B.BACKSPACE||(A==B.DELETE&&B.button==-1))){return }var D=B.getCharCode(),C=String.fromCharCode(D);if(Ext.isIE&&(B.isSpecialKey()||!C)){return }if(!this.maskRe.test(C)){B.stopEvent()}},setValue:function(A){if(this.emptyText&&this.el&&A!==undefined&&A!==null&&A!==""){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize()},validateValue:function(A){if(A.length<1||A===this.emptyText){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(A.lengththis.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false}if(this.vtype){var C=Ext.form.VTypes;if(!C[this.vtype](A,this)){this.markInvalid(this.vtypeText||C[this.vtype+"Text"]);return false}}if(typeof this.validator=="function"){var B=this.validator(A);if(B!==true){this.markInvalid(B);return false}}if(this.regex&&!this.regex.test(A)){this.markInvalid(this.regexText);return false}return true},selectText:function(E,A){var C=this.getRawValue();if(C.length>0){E=E===undefined?0:E;A=A===undefined?C.length:A;var D=this.el.dom;if(D.setSelectionRange){D.setSelectionRange(E,A)}else{if(D.createTextRange){var B=D.createTextRange();B.moveStart("character",E);B.moveEnd("character",C.length-A);B.select()}}}},autoSize:function(){if(!this.grow||!this.rendered){return }if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var C=this.el;var B=C.dom.value;var D=document.createElement("div");D.appendChild(document.createTextNode(B));B=D.innerHTML;D=null;B+=" ";var A=Math.min(this.growMax,Math.max(this.metrics.getWidth(B)+10,this.growMin));this.el.setWidth(A);this.fireEvent("autosize",this,A)}});Ext.reg("textfield",Ext.form.TextField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TimeField-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TimeField-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TimeField-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:null,maxValue:null,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",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initComponent:function(){Ext.form.TimeField.superclass.initComponent.call(this);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}if(!this.store){var B=this.parseDate(this.minValue);if(!B){B=new Date().clearTime()}var A=this.parseDate(this.maxValue);if(!A){A=new Date().clearTime().add("mi",(24*60)-1)}var C=[];while(B<=A){C.push([B.dateFormat(this.format)]);B=B.add("mi",this.increment)}this.store=new Ext.data.SimpleStore({fields:["text"],data:C});this.displayField="text"}},getValue:function(){var A=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(A))||""},setValue:function(A){Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)))},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var A=this.parseDate(this.getRawValue());if(A){this.setValue(A.dateFormat(this.format))}}});Ext.reg("timefield",Ext.form.TimeField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TriggerField-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TriggerField-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/TriggerField-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,onResize:function(A,B){Ext.form.TriggerField.superclass.onResize.call(this,A,B);if(typeof A=="number"){this.el.setWidth(this.adjustWidth("input",A-this.trigger.getWidth()))}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])},onRender:function(B,A){Ext.form.TriggerField.superclass.onRender.call(this,B,A);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(this.hideTrigger){this.trigger.setDisplayed(false)}this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}},initTrigger:function(){this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();this.trigger.remove()}if(this.wrap){this.wrap.remove()}Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass("x-trigger-wrap-focus");this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.el.on("keydown",this.checkTab,this)}}},checkTab:function(A){if(A.getKey()==A.TAB){this.triggerBlur()}},onBlur:function(){},mimicBlur:function(A){if(!this.wrap.contains(A.target)&&this.validateBlur(A)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur);if(this.monitorTab){this.el.un("keydown",this.checkTab,this)}this.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");Ext.form.TriggerField.superclass.onBlur.call(this)},beforeBlur:Ext.emptyFn,validateBlur:function(A){return true},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass("x-item-disabled")}},onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap){this.wrap.removeClass("x-item-disabled")}},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(A){return this.triggers[A]},initTrigger:function(){var A=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow","hidden");var B=this;A.each(function(D,F,C){D.hide=function(){var G=B.wrap.getWidth();this.dom.style.display="none";B.el.setWidth(G-B.trigger.getWidth())};D.show=function(){var G=B.wrap.getWidth();this.dom.style.display="";B.el.setWidth(G-B.trigger.getWidth())};var E="Trigger"+(C+1);if(this["hide"+E]){D.dom.style.display="none"}D.on("click",this["on"+E+"Click"],this,{preventDefault:true});D.addClassOnOver("x-form-trigger-over");D.addClassOnClick("x-form-trigger-click")},this);this.triggers=A.elements},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});Ext.reg("trigger",Ext.form.TriggerField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/VTypes-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/VTypes-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/form/VTypes-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.form.VTypes=function(){var C=/^[a-zA-Z_]+$/;var D=/^[a-zA-Z0-9_]+$/;var B=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/;var A=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{"email":function(E){return B.test(E)},"emailText":"This field should be an e-mail address in the format \"user@domain.com\"","emailMask":/[a-z0-9_\.\-@]/i,"url":function(E){return A.test(E)},"urlText":"This field should be a URL in the format \"http:/"+"/www.domain.com\"","alpha":function(E){return C.test(E)},"alphaText":"This field should only contain letters and _","alphaMask":/[a-z_]/i,"alphanum":function(E){return D.test(E)},"alphanumText":"This field should only contain letters, numbers and _","alphanumMask":/[a-z0-9_]/i}}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/AbstractSelectionModel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/AbstractSelectionModel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/AbstractSelectionModel-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.AbstractSelectionModel=function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(A){this.grid=A;this.initEvents()},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/CellSelectionModel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/CellSelectionModel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/CellSelectionModel-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.CellSelectionModel=function(A){Ext.apply(this,A);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.getGridEl().on(Ext.isIE?"keydown":"keypress",this.handleKeyDown,this);var A=this.grid.view;A.on("refresh",this.onViewChange,this);A.on("rowupdated",this.onRowUpdated,this);A.on("beforerowremoved",this.clearSelections,this);A.on("beforerowsinserted",this.clearSelections,this);if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(A){this.select(A.row,A.column,false,true,A.record)},onRowUpdated:function(A,B,C){if(this.selection&&this.selection.record==C){A.onCellSelect(B,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(B){var A=this.selection;if(A){if(B!==true){this.grid.view.onCellDeselect(A.cell[0],A.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(B,D,A,C){if(C.button!==0||this.isLocked()){return }this.select(D,A)},select:function(F,C,B,E,D){if(this.fireEvent("beforecellselect",this,F,C)!==false){this.clearSelections();D=D||this.grid.store.getAt(F);this.selection={record:D,cell:[F,C]};if(!B){var A=this.grid.getView();A.onCellSelect(F,C);if(E!==true){A.focusCell(F,C)}}this.fireEvent("cellselect",this,F,C);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(C,B,A){return !A.isHidden(B)},handleKeyDown:function(F){if(!F.isNavKeyPress()){return }var E=this.grid,J=this.selection;if(!J){F.stopEvent();var I=E.walkCells(0,0,1,this.isSelectable,this);if(I){this.select(I[0],I[1])}return }var B=this;var H=function(M,K,L){return E.walkCells(M,K,L,B.isSelectable,B)};var C=F.getKey(),A=J.cell[0],G=J.cell[1];var D;switch(C){case F.TAB:if(F.shiftKey){D=H(A,G-1,-1)}else{D=H(A,G+1,1)}break;case F.DOWN:D=H(A+1,G,1);break;case F.UP:D=H(A-1,G,-1);break;case F.RIGHT:D=H(A,G+1,1);break;case F.LEFT:D=H(A,G-1,-1);break;case F.ENTER:if(E.isEditor&&!E.editing){E.startEditing(A,G);F.stopEvent();return }break}if(D){this.select(D[0],D[1]);F.stopEvent()}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){if(D.shiftKey){F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this)}D.stopEvent()}else{if(B==D.ENTER){A.completeEdit();D.stopEvent()}else{if(B==D.ESC){D.stopEvent();A.cancelEdit()}}}if(F){C.startEditing(F[0],F[1])}}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/CheckboxSelectionModel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/CheckboxSelectionModel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/CheckboxSelectionModel-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:"
       
      ",width:20,sortable:false,fixed:true,dataIndex:"",id:"checker",initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var A=this.grid.getView();A.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(A.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},onMouseDown:function(C,B){if(B.className=="x-grid3-row-checker"){C.stopEvent();var D=C.getTarget(".x-grid3-row");if(D){var A=D.rowIndex;if(this.isSelected(A)){this.deselectRow(A)}else{this.selectRow(A,true)}}}},onHdMouseDown:function(C,A){if(A.className=="x-grid3-hd-checker"){C.stopEvent();var B=Ext.fly(A.parentNode);var D=B.hasClass("x-grid3-hd-checker-on");if(D){B.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{B.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(B,C,A){return"
       
      "}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/ColumnDD-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/ColumnDD-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/ColumnDD-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.HeaderDragZone=function(A,C,B){this.grid=A;this.view=A.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,C);if(B){this.setHandleElId(Ext.id(C));this.setOuterHandleElId(Ext.id(B))}this.scroll=false};Ext.extend(Ext.grid.HeaderDragZone,Ext.dd.DragZone,{maxDragWidth:120,getDragData:function(C){var A=Ext.lib.Event.getTarget(C);var B=this.view.findHeaderCell(A);if(B){return{ddel:B.firstChild,header:B}}return false},onInitDrag:function(A){this.view.headersDisabled=true;var B=this.dragData.ddel.cloneNode(true);B.id=Ext.id();B.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(B);return true},afterValidDrop:function(){var A=this.view;setTimeout(function(){A.headersDisabled=false},50)},afterInvalidDrop:function(){var A=this.view;setTimeout(function(){A.headersDisabled=false},50)}});Ext.grid.HeaderDropZone=function(A,C,B){this.grid=A;this.view=A.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:" "},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:" "},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,A.getGridEl().dom)};Ext.extend(Ext.grid.HeaderDropZone,Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,getTargetFromEvent:function(C){var A=Ext.lib.Event.getTarget(C);var B=this.view.findCellIndex(A);if(B!==false){return this.view.getHeaderCell(B)}},nextVisible:function(C){var B=this.view,A=this.grid.colModel;C=C.nextSibling;while(C){if(!A.isHidden(B.getCellIndex(C))){return C}C=C.nextSibling}return null},prevVisible:function(C){var B=this.view,A=this.grid.colModel;C=C.prevSibling;while(C){if(!A.isHidden(B.getCellIndex(C))){return C}C=C.prevSibling}return null},positionIndicator:function(D,B,E){var H=Ext.lib.Event.getPageX(E);var A=Ext.lib.Dom.getRegion(B.firstChild);var I,K,G=A.top+this.proxyOffsets[1];if((A.right-H)<=(A.right-A.left)/2){I=A.right+this.view.borderWidth;K="after"}else{I=A.left;K="before"}var F=this.view.getCellIndex(D);var J=this.view.getCellIndex(B);if(this.grid.colModel.isFixed(J)){return false}var C=this.grid.colModel.isLocked(J);if(K=="after"){J++}if(F=0&&this.config[A].resizable!==false&&this.config[A].fixed!==true},setHidden:function(A,B){var C=this.config[A];if(C.hidden!==B){C.hidden=B;this.totalWidth=null;this.fireEvent("hiddenchange",this,A,B)}},setEditor:function(A,B){this.config[A].editor=B}});Ext.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="string"&&A.length<1){return" "}return A};Ext.grid.DefaultColumnModel=Ext.grid.ColumnModel; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/ColumnSplitDD-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/ColumnSplitDD-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/ColumnSplitDD-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.SplitDragZone=function(A,C,B){this.grid=A;this.view=A.getView();this.proxy=this.view.resizeProxy;Ext.grid.SplitDragZone.superclass.constructor.call(this,C,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.setHandleElId(Ext.id(C));this.setOuterHandleElId(Ext.id(B));this.scroll=false};Ext.extend(Ext.grid.SplitDragZone,Ext.dd.DDProxy,{fly:Ext.Element.fly,b4StartDrag:function(A,D){this.view.headersDisabled=true;this.proxy.setHeight(this.view.mainWrap.getHeight());var B=this.cm.getColumnWidth(this.cellIndex);var C=Math.max(B-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(C,1000);this.setYConstraint(0,0);this.minX=A-C;this.maxX=A+1000;this.startPos=A;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,A,D)},handleMouseDown:function(B){ev=Ext.EventObject.setEvent(B);var A=this.fly(ev.getTarget());if(A.hasClass("x-grid-split")){this.cellIndex=this.view.getCellIndex(A.dom);this.split=A.dom;this.cm=this.grid.colModel;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}},endDrag:function(C){this.view.headersDisabled=false;var A=Math.max(this.minX,Ext.lib.Event.getPageX(C));var B=A-this.startPos;this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+B)},autoOffset:function(){this.setDelta(0,0)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/EditorGrid-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/EditorGrid-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/EditorGrid-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,isEditor:true,detectEdit:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.on("bodyscroll",this.stopEditing,this);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{if(this.clicksToEdit=="auto"&&this.view.mainBody){this.view.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}this.getGridEl().addClass("xedit-grid")},onCellDblClick:function(B,C,A){this.startEditing(C,A)},onAutoEditClick:function(C,B){var E=this.view.findRowIndex(B);var A=this.view.findCellIndex(B);if(E!==false&&A!==false){if(this.selModel.getSelectedCell){var D=this.selModel.getSelectedCell();if(D&&D.cell[0]===E&&D.cell[1]===A){this.startEditing(E,A)}}else{if(this.selModel.isSelected(E)){this.startEditing(E,A)}}}},onEditComplete:function(B,D,A){this.editing=false;this.activeEditor=null;B.un("specialkey",this.selModel.onEditorKey,this.selModel);if(String(D)!==String(A)){var C=B.record;var F=this.colModel.getDataIndex(B.col);var E={grid:this,record:C,field:F,originalValue:A,value:D,row:B.row,column:B.col,cancel:false};if(this.fireEvent("validateedit",E)!==false&&!E.cancel){C.set(F,E.value);delete E.cancel;this.fireEvent("afteredit",E)}}this.view.focusCell(B.row,B.col)},startEditing:function(F,B){this.stopEditing();if(this.colModel.isCellEditable(B,F)){this.view.ensureVisible(F,B,true);var C=this.store.getAt(F);var E=this.colModel.getDataIndex(B);var D={grid:this,record:C,field:E,value:C.data[E],row:F,column:B,cancel:false};if(this.fireEvent("beforeedit",D)!==false&&!D.cancel){this.editing=true;var A=this.colModel.getCellEditor(B,F);if(!A.rendered){A.render(this.view.getEditorParent(A))}(function(){A.row=F;A.col=B;A.record=C;A.on("complete",this.onEditComplete,this,{single:true});A.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=A;var G=C.data[E];A.startEdit(this.view.getCell(F,B),G)}).defer(50,this)}}},stopEditing:function(){if(this.activeEditor){this.activeEditor.completeEdit()}this.activeEditor=null}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridDD-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridDD-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridDD-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.GridDragZone=function(B,A){this.view=B.getView();Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,A);if(this.view.lockedBody){this.setHandleElId(Ext.id(this.view.mainBody.dom));this.setOuterHandleElId(Ext.id(this.view.lockedBody.dom))}this.scroll=false;this.grid=B;this.ddel=document.createElement("div");this.ddel.className="x-grid-dd-wrap"};Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(B){var A=Ext.lib.Event.getTarget(B);var D=this.view.findRowIndex(A);if(D!==false){var C=this.grid.selModel;if(!C.isSelected(D)||B.hasModifier()){C.handleMouseDown(this.grid,D,B)}return{grid:this.grid,ddel:this.ddel,rowIndex:D,selections:C.getSelections()}}return false},onInitDrag:function(B){var A=this.dragData;this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel)},afterRepair:function(){this.dragging=false},getRepairXY:function(B,A){return false},onEndDrag:function(A,B){},onValidDrop:function(A,B,C){this.hideProxy()},beforeInvalidDrop:function(A,B){}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridEditor-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridEditor-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridEditor-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.GridEditor=function(B,A){Ext.grid.GridEditor.superclass.constructor.call(this,B,A);B.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridPanel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridPanel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/grid/GridPanel-min.js 4 Dec 2007 02:48:35 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.GridPanel=Ext.extend(Ext.Panel,{ddText:"{0} selected row{1}",minColumnWidth:25,monitorWindowResize:true,maxRowsToMeasure:0,trackMouseOver:true,enableDragDrop:false,enableColumnMove:true,enableColumnHide:true,enableHdMenu:true,enableRowHeightSync:false,stripeRows:false,autoExpandColumn:false,autoExpandMin:50,autoExpandMax:1000,view:null,loadMask:false,rendered:false,viewReady:false,stateEvents:["columnmove","columnresize","sortchange"],initComponent:function(){Ext.grid.GridPanel.superclass.initComponent.call(this);this.autoScroll=false;if(this.columns&&(this.columns instanceof Array)){this.colModel=new Ext.grid.ColumnModel(this.columns);delete this.columns}if(this.ds){this.store=this.ds;delete this.ds}if(this.cm){this.colModel=this.cm;delete this.cm}if(this.sm){this.selModel=this.sm;delete this.sm}this.store=Ext.StoreMgr.lookup(this.store);this.addEvents("click","dblclick","contextmenu","mousedown","mouseup","mouseover","mouseout","keypress","keydown","cellmousedown","rowmousedown","headermousedown","cellclick","celldblclick","rowclick","rowdblclick","headerclick","headerdblclick","rowcontextmenu","cellcontextmenu","headercontextmenu","bodyscroll","columnresize","columnmove","sortchange")},onRender:function(C,A){Ext.grid.GridPanel.superclass.onRender.apply(this,arguments);var D=this.body;this.el.addClass("x-grid-panel");var B=this.getView();B.init(this);D.on("mousedown",this.onMouseDown,this);D.on("click",this.onClick,this);D.on("dblclick",this.onDblClick,this);D.on("contextmenu",this.onContextMenu,this);D.on("keydown",this.onKeyDown,this);this.relayEvents(D,["mousedown","mouseup","mouseover","mouseout","keypress"]);this.getSelectionModel().init(this);this.view.render()},initEvents:function(){Ext.grid.GridPanel.superclass.initEvents.call(this);if(this.loadMask){this.loadMask=new Ext.LoadMask(this.bwrap,Ext.apply({store:this.store},this.loadMask))}},initStateEvents:function(){Ext.grid.GridPanel.superclass.initStateEvents.call(this);this.colModel.on("hiddenchange",this.saveState,this,{delay:100})},applyState:function(F){var B=this.colModel;var E=F.columns;if(E){for(var C=0,A=E.length;C=0){if(!D){C=F-1}D=false;while(C>=0){if(E.call(I||this,J,C,H)===true){return[J,C]}C--}J--}}else{if(C>=F){J++;D=false}while(J","
      ","
      {header}
      ","
      {body}
      ","
      ","
       
      ","
       
      ","")}if(!C.header){C.header=new Ext.Template("","{cells}","
      ")}if(!C.hcell){C.hcell=new Ext.Template("
      ",this.grid.enableHdMenu?"":"","{value}","
      ")}if(!C.body){C.body=new Ext.Template("{rows}")}if(!C.row){C.row=new Ext.Template("
      ","{cells}",(this.enableRowBody?"":""),"
      {body}
      ")}if(!C.cell){C.cell=new Ext.Template("","
      {value}
      ","")}for(var A in C){var B=C[A];if(B&&typeof B.compile=="function"&&!B.compiled){B.disableFormats=true;B.compile()}}this.templates=C;this.tdClass="x-grid3-cell";this.cellSelector="td.x-grid3-cell";this.hdCls="x-grid3-hd";this.rowSelector="div.x-grid3-row";this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(A){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=A;return this._flyweight},getEditorParent:function(A){return this.scroller.dom},initElements:function(){var C=Ext.Element;var B=this.grid.getGridEl().dom.firstChild;var A=B.childNodes;this.el=new C(B);this.mainWrap=new C(A[0]);this.mainHd=new C(this.mainWrap.dom.firstChild);this.innerHd=this.mainHd.dom.firstChild;this.scroller=new C(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new C(this.scroller.dom.firstChild);this.focusEl=new C(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new C(A[1]);this.resizeProxy=new C(A[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(A){if(!A){return false}return this.fly(A).findParent(this.cellSelector,3)},findCellIndex:function(C,B){var A=this.findCell(C);if(A&&(!B||this.fly(A).hasClass(B))){return this.getCellIndex(A)}return false},getCellIndex:function(B){if(B){var A=B.className.match(this.colRe);if(A&&A[1]){return this.cm.getIndexById(A[1])}}return false},findHeaderCell:function(B){var A=this.findCell(B);return A&&this.fly(A).hasClass(this.hdCls)?A:null},findHeaderIndex:function(A){return this.findCellIndex(A,this.hdCls)},findRow:function(A){if(!A){return false}return this.fly(A).findParent(this.rowSelector,10)},findRowIndex:function(A){var B=this.findRow(A);return B?B.rowIndex:false},getRow:function(A){return this.getRows()[A]},getCell:function(B,A){return this.getRow(B).getElementsByTagName("td")[A]},getHeaderCell:function(A){return this.mainHd.dom.getElementsByTagName("td")[A]},addRowClass:function(C,A){var B=this.getRow(C);if(B){this.fly(B).addClass(A)}},removeRowClass:function(C,A){var B=this.getRow(C);if(B){this.fly(B).removeClass(A)}},removeRow:function(A){Ext.removeNode(this.getRow(A))},removeRows:function(C,A){var B=this.mainBody.dom;for(var D=C;D<=A;D++){Ext.removeNode(B.childNodes[C])}},getScrollState:function(){var A=this.scroller.dom;return{left:A.scrollLeft,top:A.scrollTop}},restoreScroll:function(A){var B=this.scroller.dom;B.scrollLeft=A.left;B.scrollTop=A.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=0},syncScroll:function(){var A=this.scroller.dom;this.innerHd.scrollLeft=A.scrollLeft;this.innerHd.scrollLeft=A.scrollLeft;this.grid.fireEvent("bodyscroll",A.scrollLeft,A.scrollTop)},updateSortIcon:function(B,A){var D=this.sortClasses;var C=this.mainHd.select("td").removeClass(D);C.item(B).addClass(D[A=="DESC"?1:0])},updateAllColumnWidths:function(){var D=this.getTotalWidth();var H=this.cm.getColumnCount();var F=[];for(var B=0;B=this.ds.getCount()){return }E=(E!==undefined?E:0);var I=this.getRow(P),F;if(!(D===false&&E===0)){while(this.cm.isHidden(E)){E++}F=this.getCell(P,E)}if(!I){return }var L=this.scroller.dom;var O=0;var C=I,M=this.el.dom;while(C&&C!=M){O+=C.offsetTop;C=C.offsetParent}O-=this.mainHd.dom.offsetHeight;var N=O+I.offsetHeight;var A=L.clientHeight;var M=parseInt(L.scrollTop,10);var K=M+A;if(OK){L.scrollTop=N-A}}if(D!==false){var J=parseInt(F.offsetLeft,10);var H=J+F.offsetWidth;var G=parseInt(L.scrollLeft,10);var B=G+L.clientWidth;if(JB){L.scrollLeft=H-L.clientWidth}}}return F||I},insertRows:function(A,F,C,E){if(F===0&&C==A.getCount()-1){this.refresh()}else{if(!E){this.fireEvent("beforerowsinserted",this,F,C)}var B=this.renderRows(F,C);var D=this.getRow(F);if(D){Ext.DomHelper.insertHtml("beforeBegin",D,B)}else{Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,B)}if(!E){this.fireEvent("rowsinserted",this,F,C);this.processRows(F)}}},deleteRows:function(A,C,B){if(A.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,C,B);this.removeRows(C,B);this.processRows(C);this.fireEvent("rowsdeleted",this,C,B)}},getColumnStyle:function(A,C){var B=!C?(this.cm.config[A].css||""):"";B+="width:"+this.getColumnWidth(A)+";";if(this.cm.isHidden(A)){B+="display:none;"}var D=this.cm.config[A].align;if(D){B+="text-align:"+D+";"}return B},getColumnWidth:function(B){var A=this.cm.getColumnWidth(B);if(typeof A=="number"){return(Ext.isBorderBox?A:(A-this.borderWidth>0?A-this.borderWidth:0))+"px"}return A},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(D,G,E){var F=this.cm,S,L,O;var R=F.getTotalWidth(false);var J=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(J<20){return }var B=J-R;if(B===0){return false}var A=F.getColumnCount(true);var P=A-(typeof E=="number"?1:0);if(P===0){P=1;E=undefined}var K=F.getColumnCount();var I=[];var N=0;var M=0;var H;for(O=0;OJ){var Q=P!=A?E:N;F.setColumnWidth(Q,Math.max(1,F.getColumnWidth(Q)-(R-J)),true)}if(D!==true){this.updateAllColumnWidths()}return true},autoExpand:function(B){var G=this.grid,A=this.cm;if(!this.userResized&&G.autoExpandColumn){var D=A.getTotalWidth(false);var H=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(D!=H){var F=A.getIndexById(G.autoExpandColumn);var E=A.getColumnWidth(F);var C=Math.min(Math.max(((H-D)+E),G.autoExpandMin),G.autoExpandMax);if(C!=E){A.setColumnWidth(F,C,true);if(B!==true){this.updateColumnWidth(F,C)}}}}},getColumnData:function(){var D=[],A=this.cm,E=A.getColumnCount();for(var C=0;C"+this.emptyText+"")}},updateHeaderSortState:function(){var B=this.ds.getSortState();if(!B){return }if(!this.sortState||(this.sortState.field!=B.field||this.sortState.direction!=B.direction)){this.grid.fireEvent("sortchange",this.grid,B)}this.sortState=B;var C=this.cm.findColumnIndex(B.field);if(C!=-1){var A=B.direction;this.updateSortIcon(C,A)}},destroy:function(){if(this.colMenu){this.colMenu.removeAll();Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.getEl().remove();delete this.colMenu}if(this.hmenu){this.hmenu.removeAll();Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.getEl().remove();delete this.hmenu}if(this.grid.enableColumnMove){var C=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(C){for(var A in C){if(!C[A].config.isTarget&&C[A].dragElId){var B=C[A].dragElId;C[A].unreg();Ext.get(B).remove()}else{if(C[A].config.isTarget){C[A].proxyTop.remove();C[A].proxyBottom.remove();C[A].unreg()}}if(Ext.dd.DDM.locationCache[A]){delete Ext.dd.DDM.locationCache[A]}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id]}}Ext.destroy(this.resizeMarker,this.resizeProxy);this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this)},onDenyColumnHide:function(){},render:function(){var A=this.cm;var B=A.getColumnCount();if(this.grid.monitorWindowResize===true){Ext.EventManager.onWindowResize(this.onWindowResize,this,true)}if(this.autoFill){this.fitColumns(true,true)}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.renderUI()},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return }this.layout()},initData:function(B,A){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this)}if(B){B.on("load",this.onLoad,this);B.on("datachanged",this.onDataChange,this);B.on("add",this.onAdd,this);B.on("remove",this.onRemove,this);B.on("update",this.onUpdate,this);B.on("clear",this.onClear,this)}this.ds=B;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this);this.cm.un("columnlockchange",this.onColumnLock,this)}if(A){A.on("configchange",this.onColConfigChange,this);A.on("widthchange",this.onColWidthChange,this);A.on("headerchange",this.onHeaderChange,this);A.on("hiddenchange",this.onHiddenChange,this);A.on("columnmoved",this.onColumnMove,this);A.on("columnlockchange",this.onColumnLock,this)}this.cm=A},onDataChange:function(){this.refresh();this.updateHeaderSortState()},onClear:function(){this.refresh()},onUpdate:function(B,A){this.refreshRow(A)},onAdd:function(C,A,B){this.insertRows(C,B,B+(A.length-1))},onRemove:function(D,A,B,C){if(C!==true){this.fireEvent("beforerowremoved",this,B,A)}this.removeRow(B);if(C!==true){this.processRows(B);this.applyEmptyText();this.fireEvent("rowremoved",this,B,A)}},onLoad:function(){this.scrollToTop()},onColWidthChange:function(A,B,C){this.updateColumnWidth(B,C)},onHeaderChange:function(A,B,C){this.updateHeaders()},onHiddenChange:function(A,B,C){this.updateColumnHidden(B,C)},onColumnMove:function(A,D,B){this.indexMap=null;var C=this.getScrollState();this.refresh(true);this.restoreScroll(C);this.afterMove(B)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(A){A.on("headerclick",this.onHeaderClick,this);if(A.trackMouseOver){A.on("mouseover",this.onRowOver,this);A.on("mouseout",this.onRowOut,this)}},initEvents:function(){},onHeaderClick:function(B,A){if(this.headersDisabled||!this.cm.isSortable(A)){return }B.stopEditing();B.store.sort(this.cm.getDataIndex(A))},onRowOver:function(B,A){var C;if((C=this.findRowIndex(A))!==false){this.addRowClass(C,"x-grid3-row-over")}},onRowOut:function(B,A){var C;if((C=this.findRowIndex(A))!==false&&C!==this.findRowIndex(B.getRelatedTarget())){this.removeRowClass(C,"x-grid3-row-over")}},handleWheel:function(A){A.stopPropagation()},onRowSelect:function(A){this.addRowClass(A,"x-grid3-row-selected")},onRowDeselect:function(A){this.removeRowClass(A,"x-grid3-row-selected")},onCellSelect:function(C,B){var A=this.getCell(C,B);if(A){this.fly(A).addClass("x-grid3-cell-selected")}},onCellDeselect:function(C,B){var A=this.getCell(C,B);if(A){this.fly(A).removeClass("x-grid3-cell-selected")}},onColumnSplitterMoved:function(C,B){this.userResized=true;var A=this.grid.colModel;A.setColumnWidth(C,B,true);if(this.forceFit){this.fitColumns(true,false,C);this.updateAllColumnWidths()}else{this.updateColumnWidth(C,B)}this.grid.fireEvent("columnresize",C,B)},handleHdMenuClick:function(C){var B=this.hdCtxIndex;var A=this.cm,D=this.ds;switch(C.id){case"asc":D.sort(A.getDataIndex(B),"ASC");break;case"desc":D.sort(A.getDataIndex(B),"DESC");break;default:B=A.getIndexById(C.id.substr(4));if(B!=-1){if(C.checked&&A.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}A.setHidden(B,C.checked)}}return true},isHideableColumn:function(A){return !A.hidden&&!A.fixed},beforeColMenuShow:function(){var A=this.cm,C=A.getColumnCount();this.colMenu.removeAll();for(var B=0;B","
      ",this.groupTextTpl,"
      ","
      ")}this.startGroup.compile();this.endGroup="
      "},findGroup:function(A){return Ext.fly(A).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(){if(this.enableGrouping&&!this.ignoreAdd){var A=this.getScrollState();this.refresh();this.restoreScroll(A)}else{if(!this.enableGrouping){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(E,A,B,D){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var C=document.getElementById(A._groupId);if(C&&C.childNodes[1].childNodes.length<1){Ext.removeNode(C)}this.applyEmptyText()},refreshRow:function(A){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var C=this.getGroupField();var B=this.hmenu.items.get("groupBy");if(B){B.setDisabled(this.cm.config[this.hdCtxIndex].groupable===false)}var A=this.hmenu.items.get("showGroups");if(A){A.setChecked(!!C)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{id:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({id:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},onGroupByClick:function(){this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex))},onShowGroupsClick:function(A,B){if(B){this.onGroupByClick()}else{this.grid.store.clearGrouping()}},toggleGroup:function(C,B){this.grid.stopEditing();C=Ext.getDom(C);var A=Ext.fly(C);B=B!==undefined?B:A.hasClass("x-grid-group-collapsed");this.state[A.dom.id]=B;A[B?"removeClass":"addClass"]("x-grid-group-collapsed")},toggleAllGroups:function(C){var B=this.getGroups();for(var D=0,A=B.length;D0},isSelected:function(A){var B=typeof A=="number"?this.grid.store.getAt(A):A;return(B&&this.selections.key(B.id)?true:false)},isIdSelected:function(A){return(this.selections.key(A)?true:false)},handleMouseDown:function(D,F,E){if(E.button!==0||this.isLocked()){return }var A=this.grid.getView();if(E.shiftKey&&this.last!==false){var C=this.last;this.selectRange(C,F,E.ctrlKey);this.last=C;A.focusRow(F)}else{var B=this.isSelected(F);if(E.ctrlKey&&B){this.deselectRow(F)}else{if(!B||this.getCount()>1){this.selectRow(F,E.ctrlKey||E.shiftKey);A.focusRow(F)}}}},selectRows:function(C,D){if(!D){this.clearSelections()}for(var B=0,A=C.length;B=A;C--){this.selectRow(C,true)}}},deselectRange:function(C,B,A){if(this.locked){return }for(var D=C;D<=B;D++){this.deselectRow(D,A)}},selectRow:function(B,D,A){if(this.locked||(B<0||B>=this.grid.store.getCount())){return }var C=this.grid.store.getAt(B);if(C&&this.fireEvent("beforerowselect",this,B,D,C)!==false){if(!D||this.singleSelect){this.clearSelections()}this.selections.add(C);this.last=this.lastActive=B;if(!A){this.grid.getView().onRowSelect(B)}this.fireEvent("rowselect",this,B,C);this.fireEvent("selectionchange",this)}},deselectRow:function(B,A){if(this.locked){return }if(this.last==B){this.last=false}if(this.lastActive==B){this.lastActive=false}var C=this.grid.store.getAt(B);if(C){this.selections.remove(C);if(!A){this.grid.getView().onRowDeselect(B)}this.fireEvent("rowdeselect",this,B,C);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){D.stopEvent();A.completeEdit();if(D.shiftKey){F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this)}}else{if(B==D.ENTER){D.stopEvent();A.completeEdit();if(D.shiftKey){F=C.walkCells(A.row-1,A.col,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row+1,A.col,1,this.acceptsNav,this)}}else{if(B==D.ESC){A.cancelEdit()}}}if(F){C.startEditing(F[0],F[1])}}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/AbsoluteLayout-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/AbsoluteLayout-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/AbsoluteLayout-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",onLayout:function(A,B){B.position();Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,A,B)}});Ext.Container.LAYOUTS["absolute"]=Ext.layout.AbsoluteLayout; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/AccordionLayout-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/AccordionLayout-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/AccordionLayout-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.layout.Accordion=Ext.extend(Ext.layout.FitLayout,{fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:false,sequence:false,activeOnTop:false,renderItem:function(A){if(this.animate===false){A.animCollapse=false}A.collapsible=true;if(this.autoWidth){A.autoWidth=true}if(this.titleCollapse){A.titleCollapse=true}if(this.hideCollapseTool){A.hideCollapseTool=true}if(this.collapseFirst!==undefined){A.collapseFirst=this.collapseFirst}if(!this.activeItem&&!A.collapsed){this.activeItem=A}else{if(this.activeItem){A.collapsed=true}}Ext.layout.Accordion.superclass.renderItem.apply(this,arguments);A.header.addClass("x-accordion-hd");A.on("beforeexpand",this.beforeExpand,this)},beforeExpand:function(C,B){var A=this.activeItem;if(A){if(this.sequence){delete this.activeItem;A.collapse({callback:function(){C.expand(B||true)},scope:this});return false}else{A.collapse(this.animate)}}this.activeItem=C;if(this.activeOnTop){C.el.dom.parentNode.insertBefore(C.el.dom,C.el.dom.parentNode.firstChild)}this.layout()},setItemSize:function(F,E){if(this.fill&&F){var B=this.container.items.items;var D=0;for(var C=0,A=B.length;C ");B.disableFormats=true;B.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=B}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{var A=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);A.addClassOnOver("x-tool-expand-"+this.position+"-over");A.on("click",this.onExpandClick,this,{stopEvent:true});if(this.floatable!==false){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.collapseClick,this)}}}return this.collapsedEl},onExpandClick:function(A){if(this.isSlid){this.afterSlideIn();this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(A){this.panel.collapse()},beforeCollapse:function(B,A){this.lastAnim=A;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();this.panel.el.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(A){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(A){var B=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,B.getHeight())}else{this.panel.setSize(B.getWidth(),undefined)}B.hide();B.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",100)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",1);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(A){if(this.isSlid){A.stopPropagation();this.slideIn()}else{A.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(A){this.panel=A},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(A){var B=this.getCollapsedEl();B.setLeftTop(A.x,A.y);B.setSize(A.width,A.height)},applyLayout:function(A){if(this.isCollapsed){this.applyLayoutCollapsed(A)}else{this.panel.setPosition(A.x,A.y);this.panel.setSize(A.width,A.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={"mouseout":function(B){if(!B.within(this.el,true)){A.delay(500)}},"mouseover":function(B){A.cancel()},scope:this}}this.el.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return }this.isSlid=true;var A=this.panel.tools;if(A&&A.toggle){A.toggle.hide()}this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,this.collapsedEl.getHeight())}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",102);if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var A=this.panel.tools;if(A&&A.toggle){A.toggle.show()}},slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);return }this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(A)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(A){if(!A.within(this.el)){this.slideIn()}},anchors:{"west":"left","east":"right","north":"top","south":"bottom"},sanchors:{"west":"l","east":"r","north":"t","south":"b"},canchors:{"west":"tl-tr","east":"tr-tl","north":"tl-bl","south":"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var B=this.collapsedEl,A=this.cmargins;switch(this.position){case"west":return[-(A.right+B.getWidth()+A.left),0];break;case"east":return[A.right+B.getWidth()+A.left,0];break;case"north":return[0,-(A.top+A.bottom+B.getHeight())];break;case"south":return[0,A.top+A.bottom+B.getHeight()];break}}};Ext.layout.BorderLayout.SplitRegion=function(B,A,C){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,B,A,C);this.applyLayout=this.applyFns[C]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;this.panel.setPosition(C.x,C.y);var A=D.offsetWidth;B.left=(C.x+C.width-A)+"px";B.top=(C.y)+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},east:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetWidth;this.panel.setPosition(C.x+A,C.y);B.left=(C.x)+"px";B.top=(C.y)+"px";B.height=Math.max(0,C.height)+"px";this.panel.setSize(C.width-A,C.height)},north:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y);B.left=(C.x)+"px";B.top=(C.y+C.height-A)+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A)},south:function(C){if(this.isCollapsed){return this.applyLayoutCollapsed(C)}var D=this.splitEl.dom,B=D.style;var A=D.offsetHeight;this.panel.setPosition(C.x,C.y+A);B.left=(C.x)+"px";B.top=(C.y)+"px";B.width=Math.max(0,C.width)+"px";this.panel.setSize(C.width,C.height-A)}},render:function(A,C){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,A,C);var D=this.position;this.splitEl=A.createChild({cls:"x-layout-split x-layout-split-"+D,html:" "});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+D,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var B=this.splitSettings[D];this.split=new Ext.SplitBar(this.splitEl.dom,C.el,B.orientation);this.split.placement=B.placement;this.split.getMaximumSize=this[B.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[B.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[B.maxProp];if(C.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var A=this.panel.getSize();if(this.position=="north"||this.position=="south"){A.height+=this.splitEl.dom.offsetHeight}else{A.width+=this.splitEl.dom.offsetWidth}return A},getHMaxSize:function(){var B=this.maxSize||10000;var A=this.layout.center;return Math.min(B,(this.el.getWidth()+A.el.getWidth())-A.getMinWidth())},getVMaxSize:function(){var B=this.maxSize||10000;var A=this.layout.center;return Math.min(B,(this.el.getHeight()+A.el.getHeight())-A.getMinHeight())},onSplitMove:function(B,A){var C=this.panel.getSize();this.lastSplitSize=A;if(this.position=="north"||this.position=="south"){this.panel.setSize(C.width,A);this.state.height=A}else{this.panel.setSize(A,C.height);this.state.width=A}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split}});Ext.Container.LAYOUTS["border"]=Ext.layout.BorderLayout; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/CardLayout-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/CardLayout-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/CardLayout-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,renderHidden:true,setActiveItem:function(A){A=this.container.getComponent(A);if(this.activeItem!=A){if(this.activeItem){this.activeItem.hide()}this.activeItem=A;A.show();this.layout()}},renderAll:function(A,B){if(this.deferredRender){this.renderItem(this.activeItem,undefined,B)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,A,B)}}});Ext.Container.LAYOUTS["card"]=Ext.layout.CardLayout; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/ColumnLayout-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/ColumnLayout-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/ColumnLayout-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.layout.ColumnLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,extraCls:"x-column",scrollOffset:0,isValidParent:function(B,A){return B.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(C,F){var D=C.items.items,E=D.length,G,A;if(!this.innerCt){F.addClass("x-column-layout-ct");this.innerCt=F.createChild({cls:"x-column-inner"});this.renderAll(C,this.innerCt);this.innerCt.createChild({cls:"x-clear"})}var J=F.getViewSize();if(J.width<1&&J.height<1){return }var H=J.width-F.getPadding("lr")-this.scrollOffset,B=J.height-F.getPadding("tb"),I=H;this.innerCt.setWidth(H);for(A=0;A0){B.setSize(A)}}});Ext.Container.LAYOUTS["fit"]=Ext.layout.FitLayout; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/FormLayout-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/FormLayout-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/FormLayout-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",getAnchorViewSize:function(A,B){return A.body.getStyleSize()},setContainer:function(B){Ext.layout.FormLayout.superclass.setContainer.call(this,B);if(B.labelAlign){B.addClass("x-form-label-"+B.labelAlign)}if(B.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;";this.labelAdjust=0}else{this.labelSeparator=B.labelSeparator||this.labelSeparator;if(typeof B.labelWidth=="number"){var C=(typeof B.labelPad=="number"?B.labelPad:5);this.labelAdjust=B.labelWidth+C;this.labelStyle="width:"+B.labelWidth+"px;";this.elementStyle="padding-left:"+(B.labelWidth+C)+"px"}if(B.labelAlign=="top"){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;"}}if(!this.fieldTpl){var A=new Ext.Template("
      ","","
      ","
      ","
      ");A.disableFormats=true;A.compile();Ext.layout.FormLayout.prototype.fieldTpl=A}},renderItem:function(D,A,C){if(D&&!D.rendered&&D.isFormField&&D.inputType!="hidden"){var B=[D.id,D.fieldLabel,D.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof D.labelSeparator=="undefined"?this.labelSeparator:D.labelSeparator,(D.itemCls||this.container.itemCls||"")+(D.hideLabel?" x-hide-label":""),D.clearCls||"x-form-clear-left"];if(typeof A=="number"){A=C.dom.childNodes[A]||null}if(A){this.fieldTpl.insertBefore(A,B)}else{this.fieldTpl.append(C,B)}D.render("x-form-el-"+D.id)}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments)}},adjustWidthAnchor:function(B,A){return B-(A.hideLabel?0:this.labelAdjust)},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["form"]=Ext.layout.FormLayout; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/TableLayout-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/TableLayout-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/layout/TableLayout-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,setContainer:function(A){Ext.layout.TableLayout.superclass.setContainer.call(this,A);this.currentRow=0;this.currentColumn=0;this.spanCells=[]},onLayout:function(C,E){var D=C.items.items,A=D.length,F,B;if(!this.table){E.addClass("x-table-layout-ct");this.table=E.createChild({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},null,true);this.renderAll(C,E)}},getRow:function(A){var B=this.table.tBodies[0].childNodes[A];if(!B){B=document.createElement("tr");this.table.tBodies[0].appendChild(B)}return B},getNextCell:function(E){var D=document.createElement("td"),I,G;if(!this.columns){I=this.getRow(0)}else{G=this.currentColumn;if(G!==0&&(G%this.columns===0)){this.currentRow++;G=(E.colspan||1)}else{G+=(E.colspan||1)}var H=this.getNextNonSpan(G,this.currentRow);this.currentColumn=H[0];if(H[1]!=this.currentRow){this.currentRow=H[1];if(E.colspan){this.currentColumn+=E.colspan-1}}I=this.getRow(this.currentRow)}if(E.colspan){D.colSpan=E.colspan}D.className="x-table-layout-cell";if(E.rowspan){D.rowSpan=E.rowspan;var F=this.currentRow,C=E.colspan||1;for(var A=F+1;Athis.columns){return this.getNextNonSpan(1,++C)}}else{break}}return[D,C]},renderItem:function(C,A,B){if(C&&!C.rendered){C.render(this.getNextCell(C))}},isValidParent:function(B,A){return true}});Ext.Container.LAYOUTS["table"]=Ext.layout.TableLayout; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Adapter-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Adapter-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Adapter-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.Adapter=function(B,A){Ext.menu.Adapter.superclass.constructor.call(this,A);this.component=B};Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(B,A){this.component.render(B);this.el=this.component.getEl()},activate:function(){if(this.disabled){return false}this.component.focus();this.fireEvent("activate",this);return true},deactivate:function(){this.fireEvent("deactivate",this)},disable:function(){this.component.disable();Ext.menu.Adapter.superclass.disable.call(this)},enable:function(){this.component.enable();Ext.menu.Adapter.superclass.enable.call(this)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/BaseItem-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/BaseItem-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/BaseItem-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.BaseItem=function(A){Ext.menu.BaseItem.superclass.constructor.call(this,A);this.addEvents("click","activate","deactivate");if(this.handler){this.on("click",this.handler,this.scope)}};Ext.extend(Ext.menu.BaseItem,Ext.Component,{canActivate:false,activeClass:"x-menu-item-active",hideOnClick:true,hideDelay:100,ctype:"Ext.menu.BaseItem",actionMode:"container",render:function(A,B){this.parentMenu=B;Ext.menu.BaseItem.superclass.render.call(this,A);this.container.menuItemId=this.id},onRender:function(B,A){this.el=Ext.get(this.el);B.dom.appendChild(this.el.dom)},setHandler:function(B,A){if(this.handler){this.un("click",this.handler,this.scope)}this.on("click",this.handler=B,this.scope=A)},onClick:function(A){if(!this.disabled&&this.fireEvent("click",this,A)!==false&&this.parentMenu.fireEvent("itemclick",this,A)!==false){this.handleClick(A)}else{A.stopEvent()}},activate:function(){if(this.disabled){return false}var A=this.container;A.addClass(this.activeClass);this.region=A.getRegion().adjust(2,2,-2,-2);this.fireEvent("activate",this);return true},deactivate:function(){this.container.removeClass(this.activeClass);this.fireEvent("deactivate",this)},shouldDeactivate:function(A){return !this.region||!this.region.contains(A.getPoint())},handleClick:function(A){if(this.hideOnClick){this.parentMenu.hide.defer(this.hideDelay,this.parentMenu,[true])}},expandMenu:function(A){},hideMenu:function(){}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/CheckItem-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/CheckItem-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/CheckItem-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.CheckItem=function(A){Ext.menu.CheckItem.superclass.constructor.call(this,A);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)};Ext.extend(Ext.menu.CheckItem,Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",onRender:function(A){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(B,A){if(this.checked!=B&&this.fireEvent("beforecheckchange",this,B)!==false){if(this.container){this.container[B?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=B;if(A!==true){this.fireEvent("checkchange",this,B)}}},handleClick:function(A){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/ColorItem-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/ColorItem-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/ColorItem-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.ColorItem=function(A){Ext.menu.ColorItem.superclass.constructor.call(this,new Ext.ColorPalette(A),A);this.palette=this.component;this.relayEvents(this.palette,["select"]);if(this.selectHandler){this.on("select",this.selectHandler,this.scope)}};Ext.extend(Ext.menu.ColorItem,Ext.menu.Adapter); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/ColorMenu-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/ColorMenu-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/ColorMenu-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.ColorMenu=function(A){Ext.menu.ColorMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.ColorItem(A);this.add(B);this.palette=B.palette;this.relayEvents(B,["select"])};Ext.extend(Ext.menu.ColorMenu,Ext.menu.Menu); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/DateItem-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/DateItem-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/DateItem-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.DateItem=function(A){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(A),A);this.picker=this.component;this.addEvents("select");this.picker.on("render",function(B){B.getEl().swallowEvent("click");B.container.addClass("x-menu-date-item")});this.picker.on("select",this.onSelect,this)};Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(B,A){this.fireEvent("select",this,A,B);Ext.menu.DateItem.superclass.handleClick.call(this)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/DateMenu-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/DateMenu-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/DateMenu-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.DateMenu=function(A){Ext.menu.DateMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.DateItem(A);this.add(B);this.picker=B.picker;this.relayEvents(B,["select"]);this.on("beforeshow",function(){if(this.picker){this.picker.hideMonthPicker(true)}},this)};Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu,{cls:"x-date-menu"}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Item-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Item-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Item-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.Item=function(A){Ext.menu.Item.superclass.constructor.call(this,A);if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)}};Ext.extend(Ext.menu.Item,Ext.menu.BaseItem,{itemCls:"x-menu-item",canActivate:true,showDelay:200,hideDelay:200,ctype:"Ext.menu.Item",onRender:function(B,A){var C=document.createElement("a");C.hideFocus=true;C.unselectable="on";C.href=this.href||"#";if(this.hrefTarget){C.target=this.hrefTarget}C.className=this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:"");C.innerHTML=String.format("{1}",this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||"");this.el=C;Ext.menu.Item.superclass.onRender.call(this,B,A)},setText:function(A){this.text=A;if(this.rendered){this.el.update(String.format("{1}",this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||""));this.parentMenu.autoWidth()}},setIconClass:function(A){var B=this.iconCls;this.iconCls=A;if(this.rendered){this.el.child("img.x-menu-item-icon").replaceClass(B,this.iconCls)}},handleClick:function(A){if(!this.href){A.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(A){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(A){this.expandMenu()}}return true},shouldDeactivate:function(A){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,A)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(A.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(A){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[A])}else{if(this.menu.isVisible()&&A){this.menu.tryActivate(0,1)}}}},deferExpand:function(A){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(A){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;this.menu.hide()}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Menu-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Menu-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/menu/Menu-min.js 4 Dec 2007 02:48:36 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.menu.Menu=function(A){if(A instanceof Array){A={items:A}}Ext.apply(this,A);this.id=this.id||Ext.id();this.addEvents("beforeshow","beforehide","show","hide","click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);Ext.menu.Menu.superclass.constructor.call(this);var B=this.items;this.items=new Ext.util.MixedCollection();if(B){this.add.apply(this,B)}};Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15000})},render:function(){if(this.el){return }var B=this.el=this.createEl();this.keyNav=new Ext.menu.MenuNav(this);if(this.plain){B.addClass("x-menu-plain")}if(this.cls){B.addClass(this.cls)}this.focusEl=B.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});var A=B.createChild({tag:"ul",cls:"x-menu-list"});A.on("click",this.onClick,this);A.on("mouseover",this.onMouseOver,this);A.on("mouseout",this.onMouseOut,this);this.items.each(function(D){var C=document.createElement("li");C.className="x-menu-list-item";A.dom.appendChild(C);D.render(C,this)},this);this.ul=A;this.autoWidth()},autoWidth:function(){var D=this.el,C=this.ul;if(!D){return }var A=this.width;if(A){D.setWidth(A)}else{if(Ext.isIE){D.setWidth(this.minWidth);var B=D.dom.offsetWidth;D.setWidth(C.getWidth()+D.getFrameWidth("lr"))}}},delayAutoWidth:function(){if(this.el){if(!this.awTask){this.awTask=new Ext.util.DelayedTask(this.autoWidth,this)}this.awTask.delay(20)}},findTargetItem:function(B){var A=B.getTarget(".x-menu-list-item",this.ul,true);if(A&&A.menuItemId){return this.items.get(A.menuItemId)}},onClick:function(B){var A;if(A=this.findTargetItem(B)){A.onClick(B);this.fireEvent("click",this,A,B)}},setActiveItem:function(A,B){if(A!=this.activeItem){if(this.activeItem){this.activeItem.deactivate()}this.activeItem=A;A.activate(B)}else{if(B){A.expandMenu()}}},tryActivate:function(F,E){var B=this.items;for(var C=F,A=B.length;C>=0&&C0){H()}})}function H(){if(D&&D.length>0){var N=D.clone();N.each(function(O){O.hide()})}}function E(N){D.remove(N);if(D.length<1){Ext.getDoc().un("mousedown",L);A=false}}function J(N){var O=D.last();K=new Date();D.add(N);if(!A){Ext.getDoc().on("mousedown",L);A=true}if(N.parentMenu){N.getEl().setZIndex(parseInt(N.parentMenu.getEl().getStyle("z-index"),10)+3);N.parentMenu.activeChild=N}else{if(O&&O.isVisible()){N.getEl().setZIndex(parseInt(O.getEl().getStyle("z-index"),10)+3)}}}function B(N){if(N.activeChild){N.activeChild.hide()}if(N.autoHideTimer){clearTimeout(N.autoHideTimer);delete N.autoHideTimer}}function G(N){var O=N.parentMenu;if(!O&&!N.allowOtherMenus){H()}else{if(O&&O.activeChild){O.activeChild.hide()}}}function L(N){if(K.getElapsed()>50&&D.length>0&&!N.getTarget(".x-menu")){H()}}function I(O,R){if(R){var Q=C[O.group];for(var P=0,N=Q.length;P=C){D=C-B-5}return{x:A,y:D}},onDestroy:function(){Ext.ToolTip.superclass.onDestroy.call(this);if(this.target){this.target.un("mouseover",this.onTargetOver,this);this.target.un("mouseout",this.onTargetOut,this);this.target.un("mousemove",this.onMouseMove,this)}}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/AsyncTreeNode-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/AsyncTreeNode-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/AsyncTreeNode-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.tree.AsyncTreeNode=function(A){this.loaded=false;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(B,D,F){if(this.loading){var E;var C=function(){if(!this.loading){clearInterval(E);this.expand(B,D,F)}}.createDelegate(this);E=setInterval(C,200);return }if(!this.loaded){if(this.fireEvent("beforeload",this)===false){return }this.loading=true;this.ui.beforeLoad(this);var A=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(A){A.load(this,this.loadComplete.createDelegate(this,[B,D,F]));return }}Ext.tree.AsyncTreeNode.superclass.expand.call(this,B,D,F)},isLoading:function(){return this.loading},loadComplete:function(A,B,C){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(A,B,C)},isLoaded:function(){return this.loaded},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded){return true}else{return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)}},reload:function(A){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild)}this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false}this.expand(false,false,A)}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeDragZone-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeDragZone-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeDragZone-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +if(Ext.dd.DragZone){Ext.tree.TreeDragZone=function(A,B){Ext.tree.TreeDragZone.superclass.constructor.call(this,A.getTreeEl(),B);this.tree=A};Ext.extend(Ext.tree.TreeDragZone,Ext.dd.DragZone,{ddGroup:"TreeDD",onBeforeDrag:function(A,B){var C=A.node;return C&&C.draggable&&!C.disabled},onInitDrag:function(B){var A=this.dragData;this.tree.getSelectionModel().select(A.node);this.tree.eventModel.disable();this.proxy.update("");A.node.ui.appendDDGhost(this.proxy.ghost.dom);this.tree.fireEvent("startdrag",this.tree,A.node,B)},getRepairXY:function(B,A){return A.node.ui.getDDRepairXY()},onEndDrag:function(A,B){this.tree.eventModel.enable.defer(100,this.tree.eventModel);this.tree.fireEvent("enddrag",this.tree,A.node,B)},onValidDrop:function(A,B,C){this.tree.fireEvent("dragdrop",this.tree,this.dragData.node,A,B);this.hideProxy()},beforeInvalidDrop:function(A,C){var B=this.tree.getSelectionModel();B.clearSelections();B.select(this.dragData.node)}})}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeDropZone-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeDropZone-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeDropZone-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(A,B){this.allowParentInsert=false;this.allowContainerDrop=false;this.appendOnly=false;Ext.tree.TreeDropZone.superclass.constructor.call(this,A.innerCt,B);this.tree=A;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(A){if(A.hasChildNodes()&&!A.isExpanded()){A.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(A){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[A])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(A,I,G,D,C){if(!A||!C){return false}var E=A.node;var F=C.node;if(!(E&&E.isTarget&&I)){return false}if(I=="append"&&E.allowChildren===false){return false}if((I=="above"||I=="below")&&(E.parentNode&&E.parentNode.allowChildren===false)){return false}if(F&&(E==F||F.contains(E))){return false}var B=this.dragOverData;B.tree=this.tree;B.target=E;B.data=C;B.point=I;B.source=G;B.rawEvent=D;B.dropNode=F;B.cancel=false;var H=this.tree.fireEvent("nodedragover",B);return B.cancel===false&&H!==false},getDropPoint:function(E,D,I){var J=D.node;if(J.isRoot){return J.allowChildren!==false?"append":false}var B=D.ddel;var K=Ext.lib.Dom.getY(B),G=K+B.offsetHeight;var F=Ext.lib.Event.getPageY(E);var H=J.allowChildren===false||J.isLeaf();if(this.appendOnly||J.parentNode.allowChildren===false){return H?false:"append"}var C=false;if(!this.allowParentInsert){C=J.hasChildNodes()&&J.isExpanded()}var A=(G-K)/(H?2:3);if(F>=K&&F<(K+A)){return"above"}else{if(!C&&(H||F>=G-A&&F<=G)){return"below"}else{return"append"}}},onNodeEnter:function(D,A,C,B){this.cancelExpand()},onNodeOver:function(B,G,F,E){var I=this.getDropPoint(F,B,G);var C=B.node;if(!this.expandProcId&&I=="append"&&C.hasChildNodes()&&!B.node.isExpanded()){this.queueExpand(C)}else{if(I!="append"){this.cancelExpand()}}var D=this.dropNotAllowed;if(this.isValidDropPoint(B,I,G,F,E)){if(I){var A=B.ddel;var H;if(I=="above"){D=B.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";H="x-tree-drag-insert-above"}else{if(I=="below"){D=B.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";H="x-tree-drag-insert-below"}else{D="x-tree-drop-ok-append";H="x-tree-drag-append"}}if(this.lastInsertClass!=H){Ext.fly(A).replaceClass(this.lastInsertClass,H);this.lastInsertClass=H}}}return D},onNodeOut:function(D,A,C,B){this.cancelExpand();this.removeDropIndicators(D)},onNodeDrop:function(C,I,E,D){var H=this.getDropPoint(E,C,I);var F=C.node;F.ui.startDrop();if(!this.isValidDropPoint(C,H,I,E,D)){F.ui.endDrop();return false}var G=D.node||(I.getTreeNode?I.getTreeNode(D,F,H,E):null);var B={tree:this.tree,target:F,data:D,point:H,source:I,rawEvent:E,dropNode:G,cancel:!G};var A=this.tree.fireEvent("beforenodedrop",B);if(A===false||B.cancel===true||!B.dropNode){F.ui.endDrop();return false}F=B.target;if(H=="append"&&!F.isExpanded()){F.expand(false,null,function(){this.completeDrop(B)}.createDelegate(this))}else{this.completeDrop(B)}return true},completeDrop:function(G){var D=G.dropNode,E=G.point,C=G.target;if(!(D instanceof Array)){D=[D]}var F;for(var B=0,A=D.length;BD.offsetLeft){E.scrollLeft=D.offsetLeft}var A=Math.min(this.maxWidth,(E.clientWidth>20?E.clientWidth:E.offsetWidth)-Math.max(0,D.offsetLeft-E.scrollLeft)-5);this.setSize(A,"")},triggerEdit:function(A){this.completeEdit();this.editNode=A;this.startEdit(A.ui.textNode,A.text)},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(B,C){var A=(this.lastClick?this.lastClick.getElapsed():0);this.lastClick=new Date();if(A>this.editDelay&&this.tree.getSelectionModel().isSelected(B)){C.stopEvent();this.triggerEdit(B);return false}},updateNode:function(A,B){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(B)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus()}},onSpecialKey:function(C,B){var A=B.getKey();if(A==B.ESC){B.stopEvent();this.cancelEdit()}else{if(A==B.ENTER&&!B.hasModifier()){B.stopEvent();this.completeEdit()}}}}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeEventModel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeEventModel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeEventModel-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.tree.TreeEventModel=function(A){this.tree=A;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var A=this.tree.getTreeEl();A.on("click",this.delegateClick,this);A.on("mouseover",this.delegateOver,this);A.on("mouseout",this.delegateOut,this);A.on("dblclick",this.delegateDblClick,this);A.on("contextmenu",this.delegateContextMenu,this)},getNode:function(B){var A;if(A=B.getTarget(".x-tree-node-el",10)){var C=Ext.fly(A,"_treeEvents").getAttributeNS("ext","tree-node-id");if(C){return this.tree.getNodeById(C)}}return null},getNodeTarget:function(B){var A=B.getTarget(".x-tree-node-icon",1);if(!A){A=B.getTarget(".x-tree-node-el",6)}return A},delegateOut:function(B,A){if(!this.beforeEvent(B)){return }A=this.getNodeTarget(B);if(A&&!B.within(A,true)){this.onNodeOut(B,this.getNode(B))}},delegateOver:function(B,A){if(!this.beforeEvent(B)){return }A=this.getNodeTarget(B);if(A){this.onNodeOver(B,this.getNode(B))}},delegateClick:function(B,A){if(!this.beforeEvent(B)){return }if(B.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(B,this.getNode(B))}else{if(B.getTarget(".x-tree-ec-icon",1)){this.onIconClick(B,this.getNode(B))}else{if(this.getNodeTarget(B)){this.onNodeClick(B,this.getNode(B))}}}},delegateDblClick:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B)){this.onNodeDblClick(B,this.getNode(B))}},delegateContextMenu:function(B,A){if(this.beforeEvent(B)&&this.getNodeTarget(B)){this.onNodeContextMenu(B,this.getNode(B))}},onNodeClick:function(B,A){A.ui.onClick(B)},onNodeOver:function(B,A){A.ui.onOver(B)},onNodeOut:function(B,A){A.ui.onOut(B)},onIconClick:function(B,A){A.ui.ecClick(B)},onCheckboxClick:function(B,A){A.ui.onCheckChange(B)},onNodeDblClick:function(B,A){A.ui.onDblClick(B)},onNodeContextMenu:function(B,A){A.ui.onContextMenu(B)},beforeEvent:function(A){if(this.disabled){A.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeFilter-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeFilter-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeFilter-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.tree.TreeFilter=function(A,B){this.tree=A;this.filtered={};Ext.apply(this,B)};Ext.tree.TreeFilter.prototype={clearBlank:false,reverse:false,autoClear:false,remove:false,filter:function(D,A,B){A=A||"text";var C;if(typeof D=="string"){var E=D.length;if(E==0&&this.clearBlank){this.clear();return }D=D.toLowerCase();C=function(F){return F.attributes[A].substr(0,E).toLowerCase()==D}}else{if(D.exec){C=function(F){return D.test(F.attributes[A])}}else{throw"Illegal filter type, must be string or regex"}}this.filterBy(C,null,B)},filterBy:function(D,C,B){B=B||this.tree.root;if(this.autoClear){this.clear()}var A=this.filtered,H=this.reverse;var E=function(J){if(J==B){return true}if(A[J.id]){return false}var I=D.call(C||J,J);if(!I||H){A[J.id]=J;J.ui.hide();return false}return true};B.cascade(E);if(this.remove){for(var G in A){if(typeof G!="function"){var F=A[G];if(F&&F.parentNode){F.parentNode.removeChild(F)}}}}},clear:function(){var B=this.tree;var A=this.filtered;for(var D in A){if(typeof D!="function"){var C=A[D];if(C){C.ui.show()}}}this.filtered={}}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeLoader-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeLoader-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeLoader-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.tree.TreeLoader=function(A){this.baseParams={};this.requestMethod="POST";Ext.apply(this,A);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(A,B){if(this.clearOnLoad){while(A.firstChild){A.removeChild(A.firstChild)}}if(this.doPreload(A)){if(typeof B=="function"){B()}}else{if(this.dataUrl||this.url){this.requestData(A,B)}}},doPreload:function(D){if(D.attributes.children){if(D.childNodes.length<1){var C=D.attributes.children;D.beginUpdate();for(var B=0,A=C.length;B
      ","",this.indentMarkup,"","","",E?("":"/>")):"","",D.text,"
      ","
        ",""].join("");var A;if(J!==true&&D.nextSibling&&(A=D.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",A,C)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",H,C)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var G=this.elNode.childNodes;this.indentNode=G[0];this.ecNode=G[1];this.iconNode=G[2];var F=3;if(E){this.checkbox=G[3];F++}this.anchor=G[F];this.textNode=G[F].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var F=this.node,D,C;var A=F.isLast()?"x-tree-elbow-end":"x-tree-elbow";var E=F.hasChildNodes();if(E||F.attributes.expandable){if(F.expanded){A+="-minus";D="x-tree-node-collapsed";C="x-tree-node-expanded"}else{A+="-plus";D="x-tree-node-expanded";C="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=D||this.c2!=C){Ext.fly(this.elNode).replaceClass(D,C);this.c1=D;this.c2=C}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var B="x-tree-ec-icon "+A;if(this.ecc!=B){this.ecNode.className=B;this.ecc=B}}},getChildIndent:function(){if(!this.childIndent){var A=[];var B=this.node;while(B){if(!B.isRoot||(B.isRoot&&B.ownerTree.rootVisible)){if(!B.isLast()){A.unshift("")}else{A.unshift("")}}B=B.parentNode}this.childIndent=A.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var A="";var B=this.node.parentNode;if(B){A=B.ui.getChildIndent()}if(this.indentMarkup!=A){this.indentNode.innerHTML=A;this.indentMarkup=A}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}delete this.elNode;delete this.ctNode;delete this.indentNode;delete this.ecNode;delete this.iconNode;delete this.checkbox;delete this.anchor;delete this.textNode;Ext.removeNode(this.ctNode)}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var A=this.node.ownerTree.innerCt.dom;this.node.expanded=true;A.innerHTML="
        ";this.wrap=this.ctNode=A.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreePanel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreePanel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreePanel-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,pathSeparator:"/",initComponent:function(){Ext.tree.TreePanel.superclass.initComponent.call(this);if(!this.eventModel){this.eventModel=new Ext.tree.TreeEventModel(this)}this.nodeHash={};if(this.root){this.setRootNode(this.root)}this.addEvents("append","remove","movenode","insert","beforeappend","beforeremove","beforemovenode","beforeinsert","beforeload","load","textchange","beforeexpandnode","beforecollapsenode","expandnode","disabledchange","collapsenode","beforeclick","click","checkchange","dblclick","contextmenu","beforechildrenrendered","startdrag","enddrag","dragdrop","beforenodedrop","nodedrop","nodedragover");if(this.singleExpand){this.on("beforeexpandnode",this.restrictExpand,this)}},proxyNodeEvent:function(C,B,A,G,F,E,D){if(C=="collapse"||C=="expand"||C=="beforecollapse"||C=="beforeexpand"||C=="move"||C=="beforemove"){C=C+"node"}return this.fireEvent(C,B,A,G,F,E,D)},getRootNode:function(){return this.root},setRootNode:function(B){this.root=B;B.ownerTree=this;B.isRoot=true;this.registerNode(B);if(!this.rootVisible){var A=B.attributes.uiProvider;B.ui=A?new A(B):new Ext.tree.RootTreeNodeUI(B)}return B},getNodeById:function(A){return this.nodeHash[A]},registerNode:function(A){this.nodeHash[A.id]=A},unregisterNode:function(A){delete this.nodeHash[A.id]},toString:function(){return"[Tree"+(this.id?" "+this.id:"")+"]"},restrictExpand:function(A){var B=A.parentNode;if(B){if(B.expandedChild&&B.expandedChild.parentNode==B){B.expandedChild.collapse()}B.expandedChild=A}},getChecked:function(A,B){B=B||this.root;var C=[];var D=function(){if(this.attributes.checked){C.push(!A?this:(A=="id"?this.id:this.attributes[A]))}};B.cascade(D);return C},getEl:function(){return this.el},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()}return this.selModel},expandPath:function(F,A,G){A=A||"id";var D=F.split(this.pathSeparator);var C=this.root;if(C.attributes[A]!=D[1]){if(G){G(false,null)}return }var B=1;var E=function(){if(++B==D.length){if(G){G(true,C)}return }var H=C.findChild(A,D[B]);if(!H){if(G){G(false,C)}return }C=H;H.expand(false,false,E)};C.expand(false,false,E)},selectPath:function(E,A,F){A=A||"id";var C=E.split(this.pathSeparator);var B=C.pop();if(C.length>0){var D=function(H,G){if(H&&G){var I=G.findChild(A,B);if(I){I.select();if(F){F(true,I)}}else{if(F){F(false,I)}}}else{if(F){F(false,I)}}};this.expandPath(C.join(this.pathSeparator),A,D)}else{this.root.select();if(F){F(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(B,A){Ext.tree.TreePanel.superclass.onRender.call(this,B,A);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}},onDestroy:function(){if(this.rendered){this.body.removeAllListeners();Ext.dd.ScrollManager.unregister(this.body);if(this.dropZone){this.dropZone.unreg()}if(this.dragZone){this.dragZone.unreg()}}this.root.destroy();this.nodeHash=null;Ext.tree.TreePanel.superclass.onDestroy.call(this)}});Ext.reg("treepanel",Ext.tree.TreePanel); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeSelectionModel-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeSelectionModel-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/widgets/tree/TreeSelectionModel-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.tree.DefaultSelectionModel=function(A){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,A);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A)},select:function(B){var A=this.selNode;if(A!=B&&this.fireEvent("beforeselect",this,B,A)!==false){if(A){A.ui.onSelectedChange(false)}this.selNode=B;B.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,B,A)}return B},unselect:function(A){if(this.selNode==A){this.clearSelections()}},clearSelections:function(){var A=this.selNode;if(A){A.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return A},getSelectedNode:function(){return this.selNode},isSelected:function(A){return this.selNode==A},selectPrevious:function(){var A=this.selNode||this.lastSelNode;if(!A){return null}var C=A.previousSibling;if(C){if(!C.isExpanded()||C.childNodes.length<1){return this.select(C)}else{var B=C.lastChild;while(B&&B.isExpanded()&&B.childNodes.length>0){B=B.lastChild}return this.select(B)}}else{if(A.parentNode&&(this.tree.rootVisible||!A.parentNode.isRoot)){return this.select(A.parentNode)}}return null},selectNext:function(){var B=this.selNode||this.lastSelNode;if(!B){return null}if(B.firstChild&&B.isExpanded()){return this.select(B.firstChild)}else{if(B.nextSibling){return this.select(B.nextSibling)}else{if(B.parentNode){var A=null;B.parentNode.bubble(function(){if(this.nextSibling){A=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return A}}}return null},onKeyDown:function(C){var B=this.selNode||this.lastSelNode;var D=this;if(!B){return }var A=C.getKey();switch(A){case C.DOWN:C.stopEvent();this.selectNext();break;case C.UP:C.stopEvent();this.selectPrevious();break;case C.RIGHT:C.preventDefault();if(B.hasChildNodes()){if(!B.isExpanded()){B.expand()}else{if(B.firstChild){this.select(B.firstChild,C)}}}break;case C.LEFT:C.preventDefault();if(B.hasChildNodes()&&B.isExpanded()){B.collapse()}else{if(B.parentNode&&(this.tree.rootVisible||B.parentNode!=this.tree.getRootNode())){this.select(B.parentNode,C)}}break}}});Ext.tree.MultiSelectionModel=function(A){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,A);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A,B,B.ctrlKey)},select:function(A,C,B){if(B!==true){this.clearSelections(true)}if(this.isSelected(A)){this.lastSelNode=A;return A}this.selNodes.push(A);this.selMap[A.id]=A;this.lastSelNode=A;A.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return A},unselect:function(B){if(this.selMap[B.id]){B.ui.onSelectedChange(false);var C=this.selNodes;var A=C.indexOf(B);if(A!=-1){this.selNodes.splice(A,1)}delete this.selMap[B.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(B){var D=this.selNodes;if(D.length>0){for(var C=0,A=D.length;CK){return E?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(A){A.sort(this.sortFn)},compareNodes:function(B,A){return(B.text.toUpperCase()>A.text.toUpperCase()?1:-1)},updateSort:function(A,B){if(B.childrenRendered){this.doSort.defer(1,this,[B])}}}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/animation-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/animation-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/animation-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +YAHOO.util.Anim=function(B,A,C,D){if(B){this.init(B,A,C,D)}};YAHOO.util.Anim.prototype={toString:function(){var A=this.getEl();var B=A.id||A.tagName;return("Anim "+B)},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(A,C,B){return this.method(this.currentFrame,C,B-C,this.totalFrames)},setAttribute:function(A,C,B){if(this.patterns.noNegatives.test(A)){C=(C>0)?C:0}YAHOO.util.Dom.setStyle(this.getEl(),A,C+B)},getAttribute:function(A){var C=this.getEl();var E=YAHOO.util.Dom.getStyle(C,A);if(E!=="auto"&&!this.patterns.offsetUnit.test(E)){return parseFloat(E)}var B=this.patterns.offsetAttribute.exec(A)||[];var F=!!(B[3]);var D=!!(B[2]);if(D||(YAHOO.util.Dom.getStyle(C,"position")=="absolute"&&F)){E=C["offset"+B[0].charAt(0).toUpperCase()+B[0].substr(1)]}else{E=0}return E},getDefaultUnit:function(A){if(this.patterns.defaultUnit.test(A)){return"px"}return""},setRuntimeAttribute:function(B){var G;var C;var D=this.attributes;this.runtimeAttributes[B]={};var F=function(H){return(typeof H!=="undefined")};if(!F(D[B]["to"])&&!F(D[B]["by"])){return false}G=(F(D[B]["from"]))?D[B]["from"]:this.getAttribute(B);if(F(D[B]["to"])){C=D[B]["to"]}else{if(F(D[B]["by"])){if(G.constructor==Array){C=[];for(var E=0,A=G.length;E0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1)}G.currentFrame+=K}}};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0&&!(K[0] instanceof Array)){K=[K]}else{var J=[];for(L=0,N=K.length;L0){this.runtimeAttributes[O]=this.runtimeAttributes[O].concat(K)}this.runtimeAttributes[O][this.runtimeAttributes[O].length]=H}else{E.setRuntimeAttribute.call(this,O)}};var A=function(F,H){var G=D.Dom.getXY(this.getEl());F=[F[0]-G[0]+H[0],F[1]-G[1]+H[1]];return F};var C=function(F){return(typeof F!=="undefined")}})();(function(){YAHOO.util.Scroll=function(E,D,F,G){if(E){YAHOO.util.Scroll.superclass.constructor.call(this,E,D,F,G)}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var B=YAHOO.util;var C=B.Scroll.superclass;var A=B.Scroll.prototype;A.toString=function(){var D=this.getEl();var E=D.id||D.tagName;return("Scroll "+E)};A.doMethod=function(D,G,E){var F=null;if(D=="scroll"){F=[this.method(this.currentFrame,G[0],E[0]-G[0],this.totalFrames),this.method(this.currentFrame,G[1],E[1]-G[1],this.totalFrames)]}else{F=C.doMethod.call(this,D,G,E)}return F};A.getAttribute=function(D){var F=null;var E=this.getEl();if(D=="scroll"){F=[E.scrollLeft,E.scrollTop]}else{F=C.getAttribute.call(this,D)}return F};A.setAttribute=function(D,G,F){var E=this.getEl();if(D=="scroll"){E.scrollLeft=G[0];E.scrollTop=G[1]}else{C.setAttribute.call(this,D,G,F)}}})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.2.0",build:"127"}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/connection-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/connection-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/connection-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +YAHOO.util.Connect={_msxml_progid:["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,setProgId:function(A){this._msxml_progid.unshift(A)},setDefaultPostHeader:function(A){this._use_default_post_header=A},setDefaultXhrHeader:function(A){this._use_default_xhr_header=A},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E}}catch(C){for(var B=0;B=200&&C<300){B=this.createResponseObject(E,F.argument);if(F.success){if(!F.scope){F.success(B)}else{F.success.apply(F.scope,[B])}}}else{switch(C){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:B=this.createExceptionObject(E.tId,F.argument,(A?A:false));if(F.failure){if(!F.scope){F.failure(B)}else{F.failure.apply(F.scope,[B])}}break;default:B=this.createResponseObject(E,F.argument);if(F.failure){if(!F.scope){F.failure(B)}else{F.failure.apply(F.scope,[B])}}}}this.releaseObject(E);B=null},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E");if(typeof A=="boolean"){C.src="javascript:false"}else{if(typeof secureURI=="string"){C.src=A}}}else{var C=document.createElement("iframe");C.id=B;C.name=B}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C)},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C0){for(var E=0;E-1),K=(B.indexOf("safari")>-1),A=(!D&&!K&&B.indexOf("gecko")>-1),F=(!D&&B.indexOf("msie")>-1);var E={HYPHEN:/(-[a-z])/i};var L=function(M){if(!E.HYPHEN.test(M)){return M}if(I[M]){return I[M]}while(E.HYPHEN.exec(M)){M=M.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase())}I[M]=M;return M};if(document.defaultView&&document.defaultView.getComputedStyle){J=function(M,P){var O=null;var N=document.defaultView.getComputedStyle(M,"");if(N){O=N[L(P)]}return M.style[P]||O}}else{if(document.documentElement.currentStyle&&F){J=function(M,O){switch(L(O)){case"opacity":var Q=100;try{Q=M.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(P){try{Q=M.filters("alpha").opacity}catch(P){}}return Q/100;break;default:var N=M.currentStyle?M.currentStyle[O]:null;return(M.style[O]||N)}}}else{J=function(M,N){return M.style[N]}}}if(F){H=function(M,N,O){switch(N){case"opacity":if(typeof M.style.filter=="string"){M.style.filter="alpha(opacity="+O*100+")";if(!M.currentStyle||!M.currentStyle.hasLayout){M.style.zoom=1}}break;default:M.style[N]=O}}}else{H=function(M,N,O){M.style[N]=O}}YAHOO.util.Dom={get:function(O){if(!O){return null}if(typeof O!="string"&&!(O instanceof Array)){return O}if(typeof O=="string"){return document.getElementById(O)}else{var P=[];for(var N=0,M=O.length;N=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom)};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left))};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B)}else{return null}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B)};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}")};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B)};YAHOO.util.Point=function(A,B){if(A instanceof Array){B=A[1];A=A[0]}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.2.0",build:"127"}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/event-min.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/event-min.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/build/yui/event-min.js 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var F=[];var D=[];var C=0;var E=[];var B=[];var A=0;var G=null;return{POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/KHTML/gi).test(navigator.userAgent),webkit:function(){var K=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/);if(K&&K[1]){return K[1]}return null}(),isIE:(!this.webkit&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach()};this._interval=setInterval(L,this.POLL_INTERVAL)}},onAvailable:function(M,K,N,L){E.push({id:M,fn:K,obj:N,override:L,checkReady:false});C=this.POLL_RETRYS;this.startInterval()},onContentReady:function(M,K,N,L){E.push({id:M,fn:K,obj:N,override:L,checkReady:true});C=this.POLL_RETRYS;this.startInterval()},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R=0){P=I[Q]}if(!L||!P){return false}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=D[N];if(M){for(O=0,R=M.length;O0)}var P=[];for(var L=0,K=E.length;L0){for(var Q=0,R=S.length;Q0){N=I.length;while(N){M=N-1;L=I[M];if(L){Q.removeListener(L[Q.EL],L[Q.TYPE],L[Q.FN],M)}N=N-1}L=null;Q.clearCache()}for(O=0,K=F.length;O0){H=C[0]}B=F.fn.call(E,H,F.obj)}else{B=F.fn.call(E,this.type,C,F.obj)}if(false===B){if(!this.silent){}return false}}}return true},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B-1){return true}else{return YAHOO.lang.isObject(A)&&A.constructor==Array}},isBoolean:function(A){return typeof A=="boolean"},isFunction:function(A){return typeof A=="function"},isNull:function(A){return A===null},isNumber:function(A){return typeof A=="number"&&isFinite(A)},isObject:function(A){return typeof A=="object"||YAHOO.lang.isFunction(A)},isString:function(A){return typeof A=="string"},isUndefined:function(A){return typeof A=="undefined"},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B)}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B]},extend:function(D,E,C){var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E}if(C){for(var A in C){D.prototype[A]=C[A]}}},augment:function(E,D){var C=E.prototype,F=D.prototype,A=arguments,B,G;if(A[2]){for(B=2;B +Checks whether or not the specified object exists in the array.The object to check forRemoves the specified object from the array. If the object is not found nothing happens.The object to removeThe date parsing and format syntax is a subset of +<a href="http://www.php.net/date">PHP's date() function</a>, and the formats that are +supported will provide results equivalent to their PHP versions. +Following is the list of all currently supported formats: +<pre>Sample date: +'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)' + +Format Output Description +------ ---------- -------------------------------------------------------------- + d 10 Day of the month, 2 digits with leading zeros + D Wed A textual representation of a day, three letters + j 10 Day of the month without leading zeros + l Wednesday A full textual representation of the day of the week + S th English ordinal day of month suffix, 2 chars (use with j) + w 3 Numeric representation of the day of the week + z 9 The julian date, or day of the year (0-365) + W 01 ISO-8601 2-digit week number of year, weeks starting on Monday (00-52) + F January A full textual representation of the month + m 01 Numeric representation of a month, with leading zeros + M Jan Month name abbreviation, three letters + n 1 Numeric representation of a month, without leading zeros + t 31 Number of days in the given month + L 0 Whether it's a leap year (1 if it is a leap year, else 0) + Y 2007 A full numeric representation of a year, 4 digits + y 07 A two digit representation of a year + a pm Lowercase Ante meridiem and Post meridiem + A PM Uppercase Ante meridiem and Post meridiem + g 3 12-hour format of an hour without leading zeros + G 15 24-hour format of an hour without leading zeros + h 03 12-hour format of an hour with leading zeros + H 15 24-hour format of an hour with leading zeros + i 05 Minutes with leading zeros + s 01 Seconds, with leading zeros + O -0600 Difference to Greenwich time (GMT) in hours + T CST Timezone setting of the machine running the code + Z -21600 Timezone offset in seconds (negative if west of UTC, positive if east)</pre> +Example usage (note that you must escape format specifiers with '\\' to render them as character literals): +<pre><code>var dt = new Date('1/10/2007 03:05:01 PM GMT-0600'); +document.write(dt.format('Y-m-d')); //2007-01-10 +document.write(dt.format('F j, Y, g:i a')); //January 10, 2007, 3:05 pm +document.write(dt.format('l, \\t\\he dS of F Y h:i:s A')); //Wednesday, the 10th of January 2007 03:05:01 PM</code></pre> +Here are some standard date/time patterns that you might find helpful. They +are not part of the source of Date.js, but to use them you can simply copy this +block of code into any script that is included after Date.js and they will also become +globally available on the Date object. Feel free to add or remove patterns as needed in your code. +<pre><code>Date.patterns = { + ISO8601Long:"Y-m-d H:i:s", + ISO8601Short:"Y-m-d", + ShortDate: "n/j/Y", + LongDate: "l, F d, Y", + FullDateTime: "l, F d, Y g:i:s A", + MonthDay: "F d", + ShortTime: "g:i A", + LongTime: "g:i:s A", + SortableDateTime: "Y-m-d\\TH:i:s", + UniversalSortableDateTime: "Y-m-d H:i:sO", + YearMonth: "F, Y" +};</code></pre> +Example usage: +<pre><code>var dt = new Date(); +document.write(dt.format(Date.patterns.ShortDate));</code></pre>&lt;static&gt; An array of textual month names. +Override these values for international dates, for example... +Date.monthNames = ['JanInYourLang', 'FebInYourLang', ...];&lt;static&gt; An array of textual day names. +Override these values for international dates, for example... +Date.dayNames = ['SundayInYourLang', 'MondayInYourLang', ...];&lt;static&gt; Date interval constant&lt;static&gt; Date interval constant&lt;static&gt; Date interval constant&lt;static&gt; Date interval constant&lt;static&gt; Date interval constant&lt;static&gt; Date interval constant&lt;static&gt; Date interval constantFormats a date given the supplied format stringThe format string&lt;static&gt; Parses the passed string using the specified format. Note that this function expects dates in normal calendar +format, meaning that months are 1-based (1 = January) and not zero-based like in JavaScript dates. Any part of +the date format that is not specified will default to the current date value for that part. Time parts can also +be specified, but default to 0. Keep in mind that the input date string must precisely match the specified format +string or the parse operation will fail. +Example Usage: +<pre><code>//dt = Fri May 25 2007 (current date) +var dt = new Date(); + +//dt = Thu May 25 2006 (today's month/day in 2006) +dt = Date.parseDate("2006", "Y"); + +//dt = Sun Jan 15 2006 (all date parts specified) +dt = Date.parseDate("2006-01-15", "Y-m-d"); + +//dt = Sun Jan 15 2006 15:20:01 GMT-0600 (CST) +dt = Date.parseDate("2006-01-15 3:20:01 PM", "Y-m-d h:i:s A" );</code></pre>The unparsed date as a stringThe format the date is inGet the timezone abbreviation of the current date (equivalent to the format specifier 'T').Get the offset from GMT of the current date (equivalent to the format specifier 'O').Get the numeric day number of the year, adjusted for leap year.Get the string representation of the numeric week number of the year +(equivalent to the format specifier 'W').Whether or not the current date is in a leap year.Get the first day of the current month, adjusted for leap year. The returned value +is the numeric day index within the week (0-6) which can be used in conjunction with +the <a ext:cls="Date" ext:member="monthNames" href="output/Date.html#monthNames">monthNames</a> array to retrieve the textual day name. +Example: +<pre><code>var dt = new Date('1/10/2007'); +document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'</code></pre>Get the last day of the current month, adjusted for leap year. The returned value +is the numeric day index within the week (0-6) which can be used in conjunction with +the <a ext:cls="Date" ext:member="monthNames" href="output/Date.html#monthNames">monthNames</a> array to retrieve the textual day name. +Example: +<pre><code>var dt = new Date('1/10/2007'); +document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'</code></pre>Get the first date of this date's monthGet the last date of this date's monthGet the number of days in the current month, adjusted for leap year.Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').Creates and returns a new Date instance with the exact same date value as the called instance. +Dates are copied and passed by reference, so if a copied date variable is modified later, the original +variable will also be changed. When the intention is to create a new variable that will not +modify the original instance, you should create a clone. +Example of correctly cloning a date: +<pre><code>//wrong way: +var orig = new Date('10/1/2006'); +var copy = orig; +copy.setDate(5); +document.write(orig); //returns 'Thu Oct 05 2006'! + +//correct way: +var orig = new Date('10/1/2006'); +var copy = orig.clone(); +copy.setDate(5); +document.write(orig); //returns 'Thu Oct 01 2006'</code></pre>Clears any time information from this datetrue to create a clone of this date, clear the time and return itProvides a convenient method of performing basic date arithmetic. This method +does not modify the Date instance being called - it creates and returns +a new Date instance containing the resulting date value. +Examples: +<pre><code>//Basic usage: +var dt = new Date('10/29/2006').add(Date.DAY, 5); +document.write(dt); //returns 'Fri Oct 06 2006 00:00:00' + +//Negative values will subtract correctly: +var dt2 = new Date('10/1/2006').add(Date.DAY, -5); +document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00' + +//You can even chain several calls together in one line! +var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30); +document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'</code></pre>A valid date interval enum valueThe amount to add to the current dateReturns the number of milliseconds between this date and date(optional) Defaults to nowExt core utilities and functions.<br><br><i>This class is a singleton and cannot be created directly.</i>True if the browser is in strict modeTrue if the page is running over SSLTrue when the document is fully initialized and ready for actionTrue to automatically uncache orphaned Ext.Elements periodically (defaults to true)True to automatically purge event listeners after uncaching an element (defaults to false). +Note: this only happens if enableGarbageCollector is true.URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent +the IE insecure content warning (defaults to javascript:false).URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. (Defaults to +"http://extjs.com/s.gif" and you should change this to a URL on your server).A reusable empty functionBy default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash, + you may want to set this to true.Copies all the properties of config to obj if they don't already exist.The receiver of the propertiesThe source of the propertiesApplies event listeners to elements by selectors when the document is ready. +The event name is specified with an @ suffix. +<pre><code>Ext.addBehaviors({ + // add a listener for click on all anchors in element with id foo + '#foo a@click' : function(e, t){ + // do something + }, + + // add the same listener to multiple selectors (separated by comma BEFORE the @) + '#foo a, #bar span.some-class@mouseover' : function(){ + // do something + } +});</code></pre>The list of behaviors to applyGenerates unique ids. If the element already has an id, it is unchanged(optional) The element to generate an id for(optional) Id prefix (defaults "ext-gen")Extends one class with another class and optionally overrides members with the passed literal. This class +also adds the function "override()" to the class that can be used to override +members on an instance.The class inheriting the functionalityThe class being extended(optional) A literal with membersAdds a list of functions to the prototype of an existing class, overwriting any existing methods with the same name. +Usage:<pre><code>Ext.override(MyClass, { + newMethod1: function(){ + // etc. + }, + newMethod2: function(foo){ + // etc. + } +});</code></pre>The class to overrideThe list of functions to add to origClass. This should be specified as an object literal +containing one or more methods.Creates namespaces to be used for scoping variables and classes so that they are not global. Usage: +<pre><code>Ext.namespace('Company', 'Company.data'); +Company.Widget = function() { ... } +Company.data.CustomStore = function(config) { ... }</code></pre>Takes an object and converts it to an encoded URL. e.g. Ext.urlEncode({foo: 1, bar: 2}); would return "foo=1&bar=2". Optionally, property values can be arrays, instead of keys and the resulting string that's returned will contain a name/value pair for each array value.Takes an encoded URL and and converts it to an object. e.g. Ext.urlDecode("foo=1&bar=2"); would return {foo: 1, bar: 2} or Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", true); would return {foo: 1, bar: [2, 3, 4]}.(optional) Items of the same name will overwrite previous values instead of creating an an array (Defaults to false).Iterates an array calling the passed function with each item, stopping if your function returns false. If the +passed array is not really an array, your function is called once with it. +The supplied function is called with (Object item, Number index, Array allItems).Escapes the passed string for use in a regular expressionReturn the dom node for the passed string (id), dom node, or Ext.ElementReturns the current HTML document object as an <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a>.Returns the current document body as an <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a>.Shorthand for <a ext:cls="Ext.ComponentMgr" ext:member="get" href="output/Ext.ComponentMgr.html#get">Ext.ComponentMgr.get</a>Utility method for validating that a value is numeric, returning the specified default value if it is not.Should be a number, but any type will be handled appropriatelyThe value to return if the original value is non-numericAttempts to destroy any objects passed to it by removing all event listeners, removing them from the +DOM (if applicable) and calling their destroy functions (if available). This method is primarily +intended for arguments of type <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> and <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a>, but any subclass of +<a ext:cls="Ext.util.Observable" href="output/Ext.util.Observable.html">Ext.util.Observable</a> can be passed in. Any number of elements and/or components can be +passed into this function in a single call as separate arguments.An <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> or <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> to destroyarg2etc...Returns the type of object that is passed in. If the object passed in is null or undefined it +return false otherwise it returns one of the following values:<ul> +<li><b>string</b>: If the object passed is a string</li> +<li><b>number</b>: If the object passed is a number</li> +<li><b>boolean</b>: If the object passed is a boolean value</li> +<li><b>function</b>: If the object passed is a function reference</li> +<li><b>object</b>: If the object passed is an object</li> +<li><b>array</b>: If the object passed is an array</li> +<li><b>regexp</b>: If the object passed is a regular expression</li> +<li><b>element</b>: If the object passed is a DOM Element</li> +<li><b>nodelist</b>: If the object passed is a DOM NodeList</li> +<li><b>textnode</b>: If the object passed is a DOM text node and contains something other than whitespace</li> +<li><b>whitespace</b>: If the object passed is a DOM text node and contains only whitespace</li>Returns true if the passed value is null, undefined or an empty string (optional).The value to test(optional) Pass true if an empty string is not considered emptySelects elements based on the passed CSS selector to enable working on them as 1.The CSS selector or an array of elements(optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object)(optional) The root element of the query or id of the rootSelects an array of DOM nodes by CSS/XPath selector. Shorthand of <a ext:cls="Ext.DomQuery" ext:member="select" href="output/Ext.DomQuery.html#select">Ext.DomQuery.select</a>The selector/xpath query(optional) The start of the query (defaults to document).Static method to retrieve Element objects. Uses simple caching to consistently return the same object. +Automatically fixes if an object was recreated with the same id via AJAX or DOM. +Shorthand of <a ext:cls="Ext.Element" ext:member="get" href="output/Ext.Element.html#get">Ext.Element.get</a>The id of the node, a DOM Node or an existing Element.&lt;static&gt; Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - +the dom node can be overwritten by other code. +Shorthand of <a ext:cls="Ext.Element" ext:member="fly" href="output/Ext.Element.html#fly">Ext.Element.fly</a>The dom node or id(optional) Allows for creation of named reusable flyweights to +prevent conflicts (e.g. internally Ext uses "_internal")Fires when the document is ready (before onload and before images are loaded). Shorthand of <a ext:cls="Ext.EventManager" ext:member="onDocumentReady" href="output/Ext.EventManager.html#onDocumentReady">Ext.EventManager.onDocumentReady</a>.The method the event invokesAn object that becomes the scope of the handlerIf true, the obj passed in becomes +the execution scope of the listener +Copies all the properties of config to obj.The receiver of the propertiesThe source of the propertiesA different object that will also be applied for default valuesShorthand for <a ext:cls="Ext.util.JSON" ext:member="encode" href="output/Ext.util.JSON.html#encode">Ext.util.JSON.encode</a>Shorthand for <a ext:cls="Ext.util.JSON" ext:member="decode" href="output/Ext.util.JSON.html#decode">Ext.util.JSON.decode</a><p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it +can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI +updates across any components that support the Action interface (primarily <a ext:cls="Ext.Toolbar" href="output/Ext.Toolbar.html">Ext.Toolbar</a>, <a ext:cls="Ext.Button" href="output/Ext.Button.html">Ext.Button</a> +and <a ext:cls="Ext.menu.Menu" href="output/Ext.menu.Menu.html">Ext.menu.Menu</a> components).</p> +<p>Aside from supporting the config object interface, any component that needs to use Actions must also support +the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string), +setDisabled(boolean), setVisible(boolean) and setHandler(function).</p> +Example usage:<br> +<pre><code>// Define the shared action. Each component below will have the same +// display text and icon, and will display the same message on click. +var action = new Ext.Action({ + text: 'Do something', + handler: function(){ + Ext.Msg.alert('Click', 'You did something.'); + }, + iconCls: 'do-something' +}); + +var panel = new Ext.Panel({ + title: 'Actions', + width:500, + height:300, + tbar: [ + // Add the action directly to a toolbar as a menu button + action, { + text: 'Action Menu', + // Add the action to a menu as a text item + menu: [action] + } + ], + items: [ + // Add the action to the panel body as a standard button + new Ext.Button(action) + ], + renderTo: Ext.getBody() +}); + +// Change the text for all components using the action +action.setText('Something else');</code></pre>The configuration optionsReturns true if the components using this action are currently disabled, else returns false. Read-only.Returns true if the components using this action are currently hidden, else returns false. Read-only.Sets the text to be displayed by all components using this action.The text to displayGets the text currently displayed by all components using this action.Sets the icon CSS class for all components using this action. The class should supply +a background image that will be used as the icon image.The CSS class supplying the icon imageGets the icon CSS class currently used by all components using this action.Sets the disabled state of all components using this action. Shortcut method +for <a ext:cls="Ext.Action" ext:member="enable" href="output/Ext.Action.html#enable">enable</a> and <a ext:cls="Ext.Action" ext:member="disable" href="output/Ext.Action.html#disable">disable</a>.True to disable the component, false to enable itEnables all components using this action.Disables all components using this action.Sets the hidden state of all components using this action. Shortcut method +for <a ext:cls="Ext.Action" ext:member="hide" href="output/Ext.Action.html#hide">hide</a> and <a ext:cls="Ext.Action" ext:member="show" href="output/Ext.Action.html#show">show</a>.True to hide the component, false to show itShows all components using this action.Hides all components using this action.Sets the function that will be called by each component using this action when its primary event is triggered.The function that will be invoked by the action's components. The function +will be called with no arguments.The scope in which the function will executeExecutes the specified function once for each component currently tied to this action. The function passed +in should accept a single argument that will be an object that supports the basic Action config/method interface.The function to execute for each componentThe scope in which the function will executeGlobal Ajax request class. Provides a simple way to make Ajax requests with maximum flexibility. Example usage: +<pre><code>// Basic request +Ext.Ajax.request({ + url: 'foo.php', + success: someFn, + failure: otherFn, + headers: { + 'my-header': 'foo' + }, + params: { foo: 'bar' } +}); + +// Simple ajax form submission +Ext.Ajax.request({ + form: 'some-form', + params: 'foo=bar' +}); + +// Default headers to pass in every request +Ext.Ajax.defaultHeaders = { + 'Powered-By': 'Ext' +}; + +// Global Ajax events can be handled on every request! +Ext.Ajax.on('beforerequest', this.showSpinner, this);</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i> +True to add a unique cache-buster param to GET requests. (defaults to true) +The default URL to be used for requests to the server. (defaults to undefined) +An object containing properties which are used as +extra parameters to each request made by this object. (defaults to undefined) +An object containing request headers which are added to each request made by this object. (defaults to undefined) +The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET) +The timeout in milliseconds to be used for requests. (defaults to 30000) +Whether a new request should abort any pending requests. (defaults to false)Serialize the passed form into a url encoded stringBase class for any visual <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> that uses a box container. BoxComponent provides automatic box +model adjustments for sizing and positioning and will work correctly withnin the Component rendering model. All +container classes should subclass BoxComponent so that they will work consistently when nested within other Ext +layout containers.The configuration options.Sets the width and height of the component. This method fires the resize event. This method can accept +either width and height as separate numeric arguments, or you can pass a size object like {width:10, height:20}.The new width to set, or a size object in the format {width, height}The new height to set (not required if a size object is passed as the first arg)Sets the width of the component. This method fires the resize event.The new width to setSets the height of the component. This method fires the resize event.The new height to setGets the current size of the component's underlying element.Gets the current XY position of the component's underlying element.(optional) If true the element's left and top are returned instead of page XY (defaults to false)Gets the current box measurements of the component's underlying element.(optional) If true the element's left and top are returned instead of page XY (defaults to false)Sets the current box measurements of the component's underlying element.An object in the format {x, y, width, height}Sets the left and top of the component. To set the page XY position instead, use <a ext:cls="Ext.BoxComponent" ext:member="setPagePosition" href="output/Ext.BoxComponent.html#setPagePosition">setPagePosition</a>. +This method fires the move event.The new leftThe new topSets the page XY position of the component. To set the left and top instead, use <a ext:cls="Ext.BoxComponent" ext:member="setPosition" href="output/Ext.BoxComponent.html#setPosition">setPosition</a>. +This method fires the move event.The new x positionThe new y positionForce the component's size to recalculate based on the underlying element's current height and width.Simple Button classCreate a new buttonThe config objectRead-only. True if this button is hiddenRead-only. True if this button is disabledRead-only. True if this button is pressed (only if enableToggle = true)Assigns this button's click handlerThe function to call when the button is clicked(optional) Scope for the function passed inSets this button's textThe button textGets the text for this buttonIf a state it passed, it becomes the pressed state otherwise the current state is toggled.(optional) Force a particular stateFocus the buttonShow this button's menu (if it has one)Hide this button's menu (if it has one)Returns true if the button has a menu and it is visibleSimple color palette class for choosing colors. The palette can be rendered to any container.<br /> +Here's an example of typical usage: +<pre><code>var cp = new Ext.ColorPalette({value:'993300'}); // initial selected color +cp.render('my-div'); + +cp.on('select', function(palette, selColor){ + // do something with selColor +});</code></pre>Create a new ColorPaletteThe config object<p>An array of 6-digit color hex code strings (without the # symbol). This array can contain any number +of colors, and each hex code should be unique. The width of the palette is controlled via CSS by adjusting +the width property of the 'x-color-palette' class (or assigning a custom class), so you can balance the number +of colors with the width setting until the box is symmetrical.</p> +<p>You can override individual colors if needed:</p> +<pre><code>var cp = new Ext.ColorPalette(); +cp.colors[0] = "FF0000"; // change the first box to red</code></pre> + +Or you can provide a custom array of your own for complete control: +<pre><code>var cp = new Ext.ColorPalette(); +cp.colors = ["000000", "993300", "333300"];</code></pre>Selects the specified color in the palette (fires the select event)A valid 6-digit color hex code (# will be stripped if included)<p>Base class for all Ext components. All subclasses of Component can automatically participate in the standard +Ext component lifecycle of creation, rendering and destruction. They also have automatic support for basic hide/show +and enable/disable behavior. Component allows any subclass to be lazy-rendered into any <a ext:cls="Ext.Container" href="output/Ext.Container.html">Ext.Container</a> and +to be automatically registered with the <a ext:cls="Ext.ComponentMgr" href="output/Ext.ComponentMgr.html">Ext.ComponentMgr</a> so that it can be referenced at any time via +<a ext:cls="Ext" ext:member="getCmp" href="output/Ext.html#getCmp">Ext.getCmp</a>. All visual widgets that require rendering into a layout should subclass Component (or +<a ext:cls="Ext.BoxComponent" href="output/Ext.BoxComponent.html">Ext.BoxComponent</a> if managed box model handling is required).</p> +<p>Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the +xtype like <a ext:cls="Ext.Component" ext:member="getXType" href="output/Ext.Component.html#getXType">getXType</a> and <a ext:cls="Ext.Component" ext:member="isXType" href="output/Ext.Component.html#isXType">isXType</a>. This is the list of all valid xtypes:</p> +<pre>xtype Class +------------- ------------------ +box Ext.BoxComponent +button Ext.Button +colorpalette Ext.ColorPalette +component Ext.Component +container Ext.Container +cycle Ext.CycleButton +dataview Ext.DataView +datepicker Ext.DatePicker +editor Ext.Editor +editorgrid Ext.grid.EditorGridPanel +grid Ext.grid.GridPanel +paging Ext.PagingToolbar +panel Ext.Panel +progress Ext.ProgressBar +splitbutton Ext.SplitButton +tabpanel Ext.TabPanel +treepanel Ext.tree.TreePanel +viewport Ext.ViewPort +window Ext.Window + +Toolbar components +--------------------------------------- +toolbar Ext.Toolbar +tbitem Ext.Toolbar.Item +tbseparator Ext.Toolbar.Separator +tbspacer Ext.Toolbar.Spacer +tbfill Ext.Toolbar.Fill +tbtext Ext.Toolbar.TextItem +tbbutton Ext.Toolbar.Button +tbsplit Ext.Toolbar.SplitButton + +Form components +--------------------------------------- +checkbox Ext.form.Checkbox +combo Ext.form.ComboBox +datefield Ext.form.DateField +field Ext.form.Field +fieldset Ext.form.FieldSet +form Ext.FormPanel +hidden Ext.form.Hidden +htmleditor Ext.form.HtmlEditor +numberfield Ext.form.NumberField +radio Ext.form.Radio +textarea Ext.form.TextArea +textfield Ext.form.TextField +timefield Ext.form.TimeField +trigger Ext.form.TriggerField</pre>The configuration options. If an element is passed, it is set as the internal +element and its id used as the component id. If a string is passed, it is assumed to be the id of an existing element +and is used as the component id. Otherwise, it is assumed to be a standard config object and is applied to the component.The component's owner <a ext:cls="Ext.Container" href="output/Ext.Container.html">Ext.Container</a> (defaults to undefined, and is set automatically when +the component is added to a container). Read-only. +True if this component is hidden. Read-only.True if this component is disabled. Read-only.True if this component has been rendered. Read-only.If this is a lazy rendering component, render it to its container element.(optional) The element this component should be rendered into. If it is being +applied to existing markup, this should be left off.(optional) The element ID or DOM node index within the container <b>before</b> +which this component will be inserted (defaults to appending to the end of the container)Apply this component to existing markup that is valid. With this function, no call to render() is required.Adds a CSS class to the component's underlying element.The CSS class name to addRemoves a CSS class from the component's underlying element.The CSS class name to removeDestroys this component by purging any event listeners, removing the component's element from the DOM, +removing the component from its <a ext:cls="Ext.Container" href="output/Ext.Container.html">Ext.Container</a> (if applicable) and unregistering it from +<a ext:cls="Ext.ComponentMgr" href="output/Ext.ComponentMgr.html">Ext.ComponentMgr</a>. Destruction is generally handled automatically by the framework and this method +should usually not need to be called directly.Returns the underlying <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a>.Returns the id of this component.Try to focus this component.(optional) If applicable, true to also select the text in this componentDisable this component.Enable this component.Convenience function for setting disabled/enabled by boolean.Show this component.Hide this component.Convenience function to hide or show this component by boolean.True to show, false to hideReturns true if this component is visible.Clone the current component using the original config values passed into this instance by default.A new config containing any properties to override in the cloned version. +An id property can be passed on this object, otherwise one will be generated to avoid duplicates.Gets the xtype for this component as registered with <a ext:cls="Ext.ComponentMgr" href="output/Ext.ComponentMgr.html">Ext.ComponentMgr</a>. For a list of all +available xtypes, see the <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> header. Example usage: +<pre><code>var t = new Ext.form.TextField(); +alert(t.getXType()); // alerts 'textfield'</code></pre>Tests whether or not this component is of a specific xtype. This can test whether this component is descended +from the xtype (default) or whether it is directly of the xtype specified (shallow = true). For a list of all +available xtypes, see the <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> header. Example usage: +<pre><code>var t = new Ext.form.TextField(); +var isText = t.isXType('textfield'); // true +var isBoxSubclass = t.isXType('box'); // true, descended from BoxComponent +var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance</code></pre>The xtype to check for this component(optional) False to check whether this component is descended from the xtype (this is +the default), or true to check whether this component is directly of the specified xtype.Returns this component's xtype hierarchy as a slash-delimited string. For a list of all +available xtypes, see the <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> header. Example usage: +<pre><code> +var t = new Ext.form.TextField(); +alert(t.getXTypes()); // alerts 'component/box/field/textfield'</pre></code><p>Provides a common registry of all components (specifically subclasses of <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a>) on a page so +that they can be easily accessed by component id (see <a ext:cls="Ext.getCmp" href="output/Ext.getCmp.html">Ext.getCmp</a>).</p> +<p>Every component class also gets registered in ComponentMgr by its 'xtype' property, which is its Ext-specific +type name (e.g., Ext.form.TextField's xtype is 'textfield'). This allows you to check the xtype of specific +object instances (see <a ext:cls="Ext.Component" ext:member="getXType" href="output/Ext.Component.html#getXType">Ext.Component.getXType</a> and <a ext:cls="Ext.Component" ext:member="isXType" href="output/Ext.Component.html#isXType">Ext.Component.isXType</a>). For a list of all +available xtypes, see <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a>.</p><br><br><i>This class is a singleton and cannot be created directly.</i>The MixedCollection used internally for the component cache. An example usage may be subscribing to +events on the MixedCollection to monitor addition or removal. Read-only.Registers a component.The componentUnregisters a component.The componentReturns a component by idThe component idRegisters a function that will be called when a specified component is added to ComponentMgrThe component idThe callback functionThe scope of the callbackStandard composite class. Creates a Ext.Element for every element in the collection. +<br><br> +<b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element +actions will be performed on all the elements in this collection.</b> +<br><br> +All methods return <i>this</i> and can be chained. + <pre><code>var els = Ext.select("#some-el div.some-class", true); + // or select directly from an existing element + var el = Ext.get('some-el'); + el.select('div.some-class', true); + + els.setWidth(100); // all elements become 100 width + els.hide(true); // all elements fade out and hide + // or + els.setWidth(100).hide(true);</code></pre>Clears this composite and adds the elements returned by the passed selector.A string CSS selector, an array of elements or an elementFilters this composite to only elements that match the passed selector.A string CSS selectorAdds elements to this composite.A string CSS selector, an array of elements or an elementCalls the passed function passing (el, this, index) for each element in this composite.The function to call(optional) The <i>this</i> object (defaults to the element)Returns the Element object at the specified indexReturns the first ElementReturns the last ElementReturns the number of elements in this compositeReturns true if this composite contains the passed elementReturns true if this composite contains the passed elementRemoves the specified element(s).The id of an element, the Element itself, the index of the element in this composite +or an array of any of those.(optional) True to also remove the element from the documentReplaces the specified element with the passed element.The id of an element, the Element itself, the index of the element in this composite +to replace.The id of an element or the Element itself.(Optional) True to remove and replace the element in the document too.Removes all elements.Flyweight composite class. Reuses the same Ext.Element for element operations. + <pre><code>var els = Ext.select("#some-el div.some-class"); + // or select directly from an existing element + var el = Ext.get('some-el'); + el.select('div.some-class'); + + els.setWidth(100); // all elements become 100 width + els.hide(true); // all elements fade out and hide + // or + els.setWidth(100).hide(true);</code></pre><br><br> +<b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element +actions will be performed on all the elements in this collection.</b>Returns a flyweight Element of the dom element object at the specified indexCalls the passed function passing (el, this, index) for each element in this composite. <b>The element +passed is the flyweight (shared) Ext.Element instance, so if you require a +a reference to the dom node, use el.dom.</b>The function to call(optional) The <i>this</i> object (defaults to the element)Base class for any <a ext:cls="Ext.BoxComponent" href="output/Ext.BoxComponent.html">Ext.BoxComponent</a> that can contain other components. Containers handle the basic +behavior of containing items, namely adding, inserting and removing them. The specific layout logic required +to visually render contained items is delegated to any one of the different <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">layout</a> classes available. +This class is intended to be extended and should generally not need to be created directly via the new keyword.The collection of components in this container as a <a ext:cls="Ext.util.MixedCollection" href="output/Ext.util.MixedCollection.html">Ext.util.MixedCollection</a>Adds a component to this container. Fires the beforeadd event before adding, then fires the add event +after the component has been added.The component to addInserts a component into this container at a specified index. Fires the beforeadd event before inserting, +then fires the add event after the component has been inserted.The index at which the component will be inserted into the container's items collectionThe component to addRemoves a component from this container. Fires the beforeremove event before removing, then fires +the remove event after the component has been removed.The component reference or id to remove(optional) True to automatically invoke the component's <a ext:cls="Ext.Component" ext:member="destroy" href="output/Ext.Component.html#destroy">Ext.Component.destroy</a> functionGets a direct child component by idForce this container's layout to be recalculated. Generally this is handled automatically by the container, +and should be used with care as it can be intensive with complex layouts since all nested containers' +doLayout methods are also called recursively.Returns the layout currently in use by the container. If the container does not currently have a layout +set, a default <a ext:cls="Ext.layout.ContainerLayout" href="output/Ext.layout.ContainerLayout.html">Ext.layout.ContainerLayout</a> will be created and set as the container's layout.Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (<i>this</i>) of +function call will be the scope provided or the current component. The arguments to the function +will be the args provided or the current component. If the function returns false at any point, +the bubble is stopped.The function to call(optional) The scope of the function (defaults to current node)(optional) The args to call the function with (default to passing the current component)Cascades down the component/container heirarchy from this component (called first), calling the specified function with +each component. The scope (<i>this</i>) of +function call will be the scope provided or the current component. The arguments to the function +will be the args provided or the current component. If the function returns false at any point, +the cascade is stopped on that branch.The function to call(optional) The scope of the function (defaults to current component)(optional) The args to call the function with (defaults to passing the current component)Find a component under this container at any level by idFind a component under this container at any level by xtype or classThe xtype string for a component, or the class of the component directlyFind a component under this container at any level by propertyFind a component under this container at any level by a custom function. If the passed function returns +true, the component will be included in the results. The passed function is called with the arguments (component, this container).A specialized SplitButton that contains a menu of <a ext:cls="Ext.menu.CheckItem" href="output/Ext.menu.CheckItem.html">Ext.menu.CheckItem</a> elements. The button automatically +cycles through each menu item on click, raising the button's <a ext:cls="Ext.CycleButton" ext:member="change" href="output/Ext.CycleButton.html#change">change</a> event (or calling the button's +<a ext:cls="Ext.CycleButton" ext:member="changeHandler" href="output/Ext.CycleButton.html#changeHandler">changeHandler</a> function, if supplied) for the active menu item. Clicking on the arrow section of the +button displays the dropdown menu just like a normal SplitButton. Example usage: +<pre><code>var btn = new Ext.CycleButton({ + showText: true, + prependText: 'View as ', + items: [{ + text:'text only', + iconCls:'view-text', + checked:true + },{ + text:'HTML', + iconCls:'view-html' + }], + changeHandler:function(btn, item){ + Ext.Msg.alert('Change View', item.text); + } +});</code></pre>Create a new split buttonThe config objectSets the button's active menu item.The item to activateTrue to prevent the button's change event from firing (defaults to false)Gets the currently active menu item.This is normally called internally on button click, but can be called externally to advance the button's +active item programmatically to the next one in the menu. If the current item is the last one in the menu +the active item will be set to the first item in the menu.A mechanism for displaying data using custom layout templates and formatting. A DataView is bound to an <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> +so that as the data in the store changes the view is automatically updated to reflect the changes. The view also +provides built-in behavior for many common events that can occur for its contained items including click, doubleclick, +mouseover, mouseout, etc. as well as a built-in selection model. <b>In order to use these features, an itemSelector config must be provided +for the DataView to determine what nodes it will be working with. </b> +<p>The example below binds a DataView to a <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> and renders it into an <a ext:cls="Ext.Panel" href="output/Ext.Panel.html">Ext.Panel</a>.</p> +<pre><code>var store = new Ext.data.JsonStore({ + url: 'get-images.php', + root: 'images', + fields: [ + 'name', 'url', + {name:'size', type: 'float'}, + {name:'lastmod', type:'date', dateFormat:'timestamp'} + ] +}); +store.load(); + +var tpl = new Ext.XTemplate( + '&lt;tpl for="."&gt;', + '&lt;div class="thumb-wrap" id="{name}"&gt;', + '&lt;div class="thumb"&gt;&lt;img src="{url}" title="{name}"&gt;&lt;/div&gt;', + '&lt;span class="x-editable"&gt;{shortName}&lt;/span&gt;&lt;/div&gt;', + '&lt;/tpl&gt;', + '&lt;div class="x-clear"&gt;&lt;/div&gt;' +); + +var panel = new Ext.Panel({ + id:'images-view', + frame:true, + width:535, + autoHeight:true, + collapsible:true, + layout:'fit', + title:'Simple DataView', + + items: new Ext.DataView({ + store: store, + tpl: tpl, + autoHeight:true, + multiSelect: true, + overClass:'x-view-over', + itemSelector:'div.thumb-wrap', + emptyText: 'No images to display' + }) +}); +panel.render(document.body);</code></pre>Create a new DataViewThe config objectRefreshes the view by reloading the data from the store and re-rendering the template.Function that can be overridden to provide custom formatting for the data that is sent to the template for each node.The raw data (array of colData for a data model bound view or +a JSON object for an Updater bound view).Refreshes an individual node's data from the store.The item's data index in the storeChanges the data store bound to this view and refreshes it.The store to bind to this viewReturns the template node the passed child belongs to, or null if it doesn't belong to one.Gets the number of selected nodes.Gets the currently selected nodes.Gets the indexes of the selected nodes.Gets an array of the selected recordsGets an array of the records from an array of nodesThe nodes to evaluateGets a record from a nodeThe node to evaluateClears all selections.(optional) True to skip firing of the selectionchange eventReturns true if the passed node is selected, else false.The node or node index to checkDeselects a node.The node to deselectSelects a set of nodes.An HTMLElement template node, index of a template node, +id of a template node or an array of any of those to select(optional) true to keep existing selections(optional) true to skip firing of the selectionchange ventSelects a range of nodes. All nodes between start and end are selected.The index of the first node in the rangeThe index of the last node in the range(optional) True to retain existing selectionsGets a template node.An HTMLElement template node, index of a template node or the id of a template nodeGets a range nodes.The index of the first node in the rangeThe index of the last node in the rangeFinds the index of the passed node.An HTMLElement template node, index of a template node or the id of a template nodeSimple date picker class.Create a new DatePickerThe config objectSets the value of the date fieldThe date to setGets the current selected value of the date fieldUtility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.<br> +This is an example, where an unordered list with 5 children items is appended to an existing element with id 'my-div':<br> + <pre><code>var list = dh.append('my-div', { + tag: 'ul', cls: 'my-list', children: [ + {tag: 'li', id: 'item0', html: 'List Item 0'}, + {tag: 'li', id: 'item1', html: 'List Item 1'}, + {tag: 'li', id: 'item2', html: 'List Item 2'}, + {tag: 'li', id: 'item3', html: 'List Item 3'}, + {tag: 'li', id: 'item4', html: 'List Item 4'} + ] +});</code></pre> +For more information and examples, see <a href="http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">the original blog post</a>.<br><br><i>This class is a singleton and cannot be created directly.</i>True to force the use of DOM instead of html fragmentsReturns the markup for the passed Element(s) config.The DOM object spec (and children)Applies a style specification to an element.The element to apply styles toA style specification string eg "width:100px", or object in the form {width:"100px"}, or +a function which returns such a specification.Inserts an HTML fragment into the DOM.Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.The context elementThe HTML fragmenetCreates new DOM element(s) and inserts them before el.The context elementThe DOM object spec (and children) or raw HTML blob(optional) true to return a Ext.ElementCreates new DOM element(s) and inserts them after el.The context elementThe DOM object spec (and children)(optional) true to return a Ext.ElementCreates new DOM element(s) and inserts them as the first child of el.The context elementThe DOM object spec (and children) or raw HTML blob(optional) true to return a Ext.ElementCreates new DOM element(s) and appends them to el.The context elementThe DOM object spec (and children) or raw HTML blob(optional) true to return a Ext.ElementCreates new DOM element(s) and overwrites the contents of el with them.The context elementThe DOM object spec (and children) or raw HTML blob(optional) true to return a Ext.ElementCreates a new Ext.Template from the DOM object spec.The DOM object spec (and children)* +Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). +<p> +DomQuery supports most of the <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#selectors">CSS3 selectors spec</a>, along with some custom selectors and basic XPath.</p> + +<p> +All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure. +</p> +<h4>Element Selectors:</h4> +<ul class="list"> + <li> <b>*</b> any element</li> + <li> <b>E</b> an element with the tag E</li> + <li> <b>E F</b> All descendent elements of E that have the tag F</li> + <li> <b>E > F</b> or <b>E/F</b> all direct children elements of E that have the tag F</li> + <li> <b>E + F</b> all elements with the tag F that are immediately preceded by an element with the tag E</li> + <li> <b>E ~ F</b> all elements with the tag F that are preceded by a sibling element with the tag E</li> +</ul> +<h4>Attribute Selectors:</h4> +<p>The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.</p> +<ul class="list"> + <li> <b>E[foo]</b> has an attribute "foo"</li> + <li> <b>E[foo=bar]</b> has an attribute "foo" that equals "bar"</li> + <li> <b>E[foo^=bar]</b> has an attribute "foo" that starts with "bar"</li> + <li> <b>E[foo$=bar]</b> has an attribute "foo" that ends with "bar"</li> + <li> <b>E[foo*=bar]</b> has an attribute "foo" that contains the substring "bar"</li> + <li> <b>E[foo%=2]</b> has an attribute "foo" that is evenly divisible by 2</li> + <li> <b>E[foo!=bar]</b> has an attribute "foo" that does not equal "bar"</li> +</ul> +<h4>Pseudo Classes:</h4> +<ul class="list"> + <li> <b>E:first-child</b> E is the first child of its parent</li> + <li> <b>E:last-child</b> E is the last child of its parent</li> + <li> <b>E:nth-child(<i>n</i>)</b> E is the <i>n</i>th child of its parent (1 based as per the spec)</li> + <li> <b>E:nth-child(odd)</b> E is an odd child of its parent</li> + <li> <b>E:nth-child(even)</b> E is an even child of its parent</li> + <li> <b>E:only-child</b> E is the only child of its parent</li> + <li> <b>E:checked</b> E is an element that is has a checked attribute that is true (e.g. a radio or checkbox) </li> + <li> <b>E:first</b> the first E in the resultset</li> + <li> <b>E:last</b> the last E in the resultset</li> + <li> <b>E:nth(<i>n</i>)</b> the <i>n</i>th E in the resultset (1 based)</li> + <li> <b>E:odd</b> shortcut for :nth-child(odd)</li> + <li> <b>E:even</b> shortcut for :nth-child(even)</li> + <li> <b>E:contains(foo)</b> E's innerHTML contains the substring "foo"</li> + <li> <b>E:nodeValue(foo)</b> E contains a textNode with a nodeValue that equals "foo"</li> + <li> <b>E:not(S)</b> an E element that does not match simple selector S</li> + <li> <b>E:has(S)</b> an E element that has a descendent that matches simple selector S</li> + <li> <b>E:next(S)</b> an E element whose next sibling matches simple selector S</li> + <li> <b>E:prev(S)</b> an E element whose previous sibling matches simple selector S</li> +</ul> +<h4>CSS Value Selectors:</h4> +<ul class="list"> + <li> <b>E{display=none}</b> css value "display" that equals "none"</li> + <li> <b>E{display^=none}</b> css value "display" that starts with "none"</li> + <li> <b>E{display$=none}</b> css value "display" that ends with "none"</li> + <li> <b>E{display*=none}</b> css value "display" that contains the substring "none"</li> + <li> <b>E{display%=2}</b> css value "display" that is evenly divisible by 2</li> + <li> <b>E{display!=none}</b> css value "display" that does not equal "none"</li> +</ul><br><br><i>This class is a singleton and cannot be created directly.</i>Collection of matching regular expressions and code snippets.Collection of operator comparison functions. The default operators are =, !=, ^=, $=, *=, %=, |= and ~=. +New operators can be added as long as the match the format <i>c</i>= where <i>c</i> is any character other than space, &gt; &lt;.Collection of "pseudo class" processors. Each processor is passed the current nodeset (array) +and the argument (if any) supplied in the selector.Compiles a selector/xpath query into a reusable function. The returned function +takes one parameter "root" (optional), which is the context node from where the query should start.The selector/xpath query(optional) Either "select" (the default) or "simple" for a simple selector matchSelects a group of elements.The selector/xpath query (can be a comma separated list of selectors)(optional) The start of the query (defaults to document).Selects a single element.The selector/xpath query(optional) The start of the query (defaults to document).Selects the value of a node, optionally replacing null with the defaultValue.The selector/xpath query(optional) The start of the query (defaults to document).Selects the value of a node, parsing integers and floats.The selector/xpath query(optional) The start of the query (defaults to document).Returns true if the passed element(s) match the passed simple selector (e.g. div.some-class or span:first-child)An element id, element or array of elementsThe simple selector to testFilters an array of elements to only include matches of a simple selector (e.g. div.some-class or span:first-child)An array of elements to filterThe simple selector to testIf true, it returns the elements that DON'T match +the selector instead of the ones that matchA base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.Create a new EditorThe Field object (or descendant)The config objectStarts the editing process and shows the editor.The element to edit(optional) A value to initialize the editor with. If a value is not provided, it defaults +to the innerHTML of el.Sets the height and width of this editor.The new widthThe new heightRealigns the editor to the bound field based on the current alignment config value.Ends the editing process, persists the changed value to the underlying field, and hides the editor.Override the default behavior and keep the editor visible after edit (defaults to false)Cancels the editing process and hides the editor without persisting any changes. The field value will be +reverted to the original starting value.Override the default behavior and keep the editor visible after +cancel (defaults to false)Sets the data value of the editorAny valid value supported by the underlying fieldGets the data value of the editorRepresents an Element in the DOM.<br><br> +Usage:<br> +<pre><code>var el = Ext.get("my-div"); + +// or with getEl +var el = getEl("my-div"); + +// or with a DOM element +var el = Ext.get(myDivElement);</code></pre> +Using Ext.get() or getEl() instead of calling the constructor directly ensures you get the same object +each call instead of constructing a new one.<br><br> +<b>Animations</b><br /> +Many of the functions for manipulating an element have an optional "animate" parameter. The animate parameter +should either be a boolean (true) or an object literal with animation options. Note that the supported Element animation +options are a subset of the <a ext:cls="Ext.Fx" href="output/Ext.Fx.html">Ext.Fx</a> animation options specific to Fx effects. The Element animation options are: +<pre>Option Default Description +--------- -------- --------------------------------------------- +duration .35 The duration of the animation in seconds +easing easeOut The easing method +callback none A function to execute when the anim completes +scope this The scope (this) of the callback function</pre> +Also, the Anim object being used for the animation will be set on your options object as "anim", which allows you to stop or +manipulate the animation. Here's an example: +<pre><code>var el = Ext.get("my-div"); + +// no animation +el.setWidth(100); + +// default animation +el.setWidth(100, true); + +// animation with some options set +el.setWidth(100, { + duration: 1, + callback: this.foo, + scope: this +}); + +// using the "anim" property to get the Anim object +var opt = { + duration: 1, + callback: this.foo, + scope: this +}; +el.setWidth(100, opt); +... +if(opt.anim.isAnimated()){ + opt.anim.stop(); +}</code></pre> +<b> Composite (Collections of) Elements</b><br /> +For working with collections of Elements, see <a ext:cls="Ext.CompositeElement" href="output/Ext.CompositeElement.html">Ext.CompositeElement</a>Create a new Element directly.(optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class).The DOM elementThe DOM element IDThe element's default display mode (defaults to "")The default unit to append to CSS values where a unit isn't provided (defaults to px).&lt;static&gt; Visibility mode constant - Use visibility to hide element&lt;static&gt; Visibility mode constant - Use display to hide elementSets the element's visibility mode. When setVisible() is called it +will use this to determine whether to set the visibility or the display property.or Element.DISPLAYConvenience method for setVisibilityMode(Element.DISPLAY)(optional) What to set display to when visibleLooks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)The simple selector to test(optional) The max depth to + search as a number or element (defaults to 10 || document.body)(optional) True to return a Ext.Element object instead of DOM nodeLooks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)The simple selector to test(optional) The max depth to + search as a number or element (defaults to 10 || document.body)(optional) True to return a Ext.Element object instead of DOM nodeWalks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). +This is a shortcut for findParentNode() that always returns an Ext.Element.The simple selector to test(optional) The max depth to + search as a number or element (defaults to 10 || document.body)Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)The simple selector to testPerform animation on this element.The animation control args(optional) How long the animation lasts in seconds (defaults to .35)(optional) Function to call when animation completes(optional) Easing method to use (defaults to 'easeOut')(optional) 'run' is the default. Can also be 'color', 'motion', or 'scroll'Removes worthless text nodes(optional) By default the element +keeps track if it has been cleaned already so +you can call this over and over. However, if you update the element and +need to force a reclean, you can pass true.Scrolls this element into view within the passed container.(optional) The container element to scroll (defaults to document.body)(optional) False to disable horizontal scroll (defaults to true)Measures the element's content height and updates height to match. Note: this function uses setTimeout so +the new height may not be available immediately.(optional) Animate the transition (defaults to false)(optional) Length of the animation in seconds (defaults to .35)(optional) Function to call when animation completes(optional) Easing method to use (defaults to easeOut)Returns true if this element is an ancestor of the passed elementThe element to checkChecks whether the element is currently visible using both visibility and display properties.(optional) True to walk the dom and see if parent elements are hidden (defaults to false)Creates a <a ext:cls="Ext.CompositeElement" href="output/Ext.CompositeElement.html">Ext.CompositeElement</a> for child nodes based on the passed CSS selector (the selector should not contain an id).The CSS selector(optional) True to create a unique Ext.Element for each child (defaults to false, which creates a single shared flyweight object)Selects child nodes based on the passed CSS selector (the selector should not contain an id).The CSS selectorSelects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).The CSS selector(optional) True to return the DOM node instead of Ext.Element (defaults to false)Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).The CSS selector(optional) True to return the DOM node instead of Ext.Element (defaults to false)Initializes a <a ext:cls="Ext.dd.DD" href="output/Ext.dd.DD.html">Ext.dd.DD</a> drag drop object for this element.The group the DD object is member ofThe DD config objectAn object containing methods to override/implement on the DD objectInitializes a <a ext:cls="Ext.dd.DDProxy" href="output/Ext.dd.DDProxy.html">Ext.dd.DDProxy</a> object for this element.The group the DDProxy object is member ofThe DDProxy config objectAn object containing methods to override/implement on the DDProxy objectInitializes a <a ext:cls="Ext.dd.DDTarget" href="output/Ext.dd.DDTarget.html">Ext.dd.DDTarget</a> object for this element.The group the DDTarget object is member ofThe DDTarget config objectAn object containing methods to override/implement on the DDTarget objectSets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use +the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.Whether the element is visible(optional) True for the default animation, or a standard Element animation config objectReturns true if display is not "none"Toggles the element's visibility or display, depending on visibility mode.(optional) True for the default animation, or a standard Element animation config objectSets the CSS display property. Uses originalDisplay if the specified value is a boolean true.Boolean value to display the element using its default display, or a string to set the display directlyTries to focus the element. Any exceptions are caught and ignored.Tries to blur the element. Any exceptions are caught and ignored.Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.The CSS class to add, or an array of classesAdds one or more CSS classes to this element and removes the same class(es) from all siblings.The CSS class to add, or an array of classesRemoves one or more CSS classes from the element.The CSS class to remove, or an array of classesToggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).The CSS class to toggleChecks if the specified CSS class exists on this element's DOM node.The CSS class to check forReplaces a CSS class on the element with another. If the old name does not exist, the new name will simply be added.The CSS class to replaceThe replacement CSS classReturns an object with properties matching the styles requested. +For example, el.getStyles('color', 'font-size', 'width') might return +{'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}.A style nameA style nameNormalizes currentStyle and computedStyle.The style property whose value is returned.Wrapper for setting style properties, also takes single object parameter of multiple styles.The style property to be set, or an object of multiple styles.(optional) The value to apply to the given property, or null if an object was passed.More flexible version of <a ext:cls="Ext.Element" ext:member="setStyle" href="output/Ext.Element.html#setStyle">setStyle</a> for setting style properties.A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or +a function which returns such a specification.Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates.The element to get the offsets from.Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).X position of the element(optional) True for the default animation, or a standard Element animation config objectSets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).Y position of the element(optional) True for the default animation, or a standard Element animation config objectSets the element's left position directly using CSS style (instead of <a ext:cls="Ext.Element" ext:member="setX" href="output/Ext.Element.html#setX">setX</a>).The left CSS property valueSets the element's top position directly using CSS style (instead of <a ext:cls="Ext.Element" ext:member="setY" href="output/Ext.Element.html#setY">setY</a>).The top CSS property valueSets the element's CSS right style.The right CSS property valueSets the element's CSS bottom style.The bottom CSS property valueSets the position of the element in page coordinates, regardless of how the element is positioned. +The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).Contains X & Y [x, y] values for new position (coordinates are page-based)(optional) True for the default animation, or a standard Element animation config objectSets the position of the element in page coordinates, regardless of how the element is positioned. +The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).X value for new position (coordinates are page-based)Y value for new position (coordinates are page-based)(optional) True for the default animation, or a standard Element animation config objectSets the position of the element in page coordinates, regardless of how the element is positioned. +The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).X value for new position (coordinates are page-based)Y value for new position (coordinates are page-based)(optional) True for the default animation, or a standard Element animation config objectReturns the region of the given element. +The element must be part of the DOM tree to have a region (display:none or elements not appended return false).Returns the offset height of the element(optional) true to get the height minus borders and paddingReturns the offset width of the element(optional) true to get the width minus borders and paddingReturns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders +when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements +if a height has not been set using CSS.Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders +when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements +if a width has not been set using CSS.Returns the size of the element.(optional) true to get the width/size minus borders and paddingReturns the width and height of the viewport.Returns the value of the "value" attributetrue to parse the value as a numberSet the width of the elementThe new width(optional) true for the default animation or a standard Element animation config objectSet the height of the elementThe new height(optional) true for the default animation or a standard Element animation config objectSet the size of the element. If animation is true, both width an height will be animated concurrently.The new widthThe new height(optional) true for the default animation or a standard Element animation config objectSets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently.X value for new position (coordinates are page-based)Y value for new position (coordinates are page-based)The new widthThe new height(optional) true for the default animation or a standard Element animation config objectSets the element's position and size the the specified region. If animation is true then width, height, x and y will be animated concurrently.The region to fill(optional) true for the default animation or a standard Element animation config objectAppends an event handler to this element. The shorthand version <a ext:cls="Ext.Element" ext:member="on" href="output/Ext.Element.html#on">on</a> is equivalent.The type of event to handleThe handler function the event invokes(optional) The scope (this element) of the handler function(optional) An object containing handler configuration properties. +This may contain any of the following properties:<ul> +<li>scope {Object} : The scope in which to execute the handler function. The handler function's "this" context.</li> +<li>delegate {String} : A simple selector to filter the target or look for a descendant of the target</li> +<li>stopEvent {Boolean} : True to stop the event. That is stop propagation, and prevent the default action.</li> +<li>preventDefault {Boolean} : True to prevent the default action</li> +<li>stopPropagation {Boolean} : True to prevent event propagation</li> +<li>normalized {Boolean} : False to pass a browser event to the handler function instead of an Ext.EventObject</li> +<li>delay {Number} : The number of milliseconds to delay the invocation of the handler after te event fires.</li> +<li>single {Boolean} : True to add a handler to handle just the next firing of the event, and then remove itself.</li> +<li>buffer {Number} : Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed +by the specified number of milliseconds. If the event fires again within that time, the original +handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li> +</ul><br> +<p> +<b>Combining Options</b><br> +In the following examples, the shorthand form <a ext:cls="Ext.Element" ext:member="on" href="output/Ext.Element.html#on">on</a> is used rather than the more verbose +addListener. The two are equivalent. Using the options argument, it is possible to combine different +types of listeners:<br> +<br> +A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<div style="margin: 5px 20px 20px;"> +Code:<pre><code>el.on('click', this.onClick, this, { + single: true, + delay: 100, + stopEvent : true, + forumId: 4 +});</code></pre> +<p> +<b>Attaching multiple handlers in 1 call</b><br> +The method also allows for a single argument to be passed which is a config object containing properties +which specify multiple handlers. +<p> +Code:<pre><code>el.on({ + 'click' : { + fn: this.onClick + scope: this, + delay: 100 + }, + 'mouseover' : { + fn: this.onMouseOver + scope: this + }, + 'mouseout' : { + fn: this.onMouseOut + scope: this + } +});</code></pre> +<p> +Or a shorthand syntax:<br> +Code:<pre><code>el.on({ + 'click' : this.onClick, + 'mouseover' : this.onMouseOver, + 'mouseout' : this.onMouseOut + scope: this +});</code></pre>Removes an event handler from this element. The shorthand version <a ext:cls="Ext.Element" ext:member="un" href="output/Ext.Element.html#un">un</a> is equivalent. Example: +<pre><code>el.removeListener('click', this.handlerFn); +// or +el.un('click', this.handlerFn);</code></pre>the type of event to removethe method the event invokesRemoves all previous added listeners from this elementCreate an event handler on this element such that when the event fires and is handled by this element, +it will be relayed to another object (i.e., fired again as if it originated from that object instead).The type of event to relayAny object that extends <a ext:cls="Ext.util.Observable" href="output/Ext.util.Observable.html">Ext.util.Observable</a> that will provide the context +for firing the relayed eventSet the opacity of the elementThe new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc(optional) true for the default animation or a standard Element animation config objectGets the left X coordinateTrue to get the local css position instead of page coordinateGets the right X coordinate of the element (element X position + element width)True to get the local css position instead of page coordinateGets the top Y coordinateTrue to get the local css position instead of page coordinateGets the bottom Y coordinate of the element (element Y position + element height)True to get the local css position instead of page coordinateInitializes positioning on this element. If a desired position is not passed, it will make the +the element positioned relative IF it is not already positioned.(optional) Positioning to use "relative", "absolute" or "fixed"(optional) The zIndex to apply(optional) Set the page X position(optional) Set the page Y positionClear positioning back to the default when the document was loaded(optional) The value to use for the left,right,top,bottom, defaults to '' (empty string). You could use 'auto'.Gets an object with all CSS positioning properties. Useful along with setPostioning to get +snapshot before performing an update and then restoring the element.Gets the width of the border(s) for the specified side(s)Can be t, l, r, b or any combination of those to add multiple values. For example, +passing lr would get the border (l)eft width + the border (r)ight width.Gets the width of the padding(s) for the specified side(s)Can be t, l, r, b or any combination of those to add multiple values. For example, +passing lr would get the padding (l)eft + the padding (r)ight.Set positioning with an object returned by getPositioning().Quick set left and top adding default unitsThe left CSS property valueThe top CSS property valueMove this element relative to its current position.Possible values are: "l","left" - "r","right" - "t","top","up" - "b","bottom","down".How far to move the element in pixels(optional) true for the default animation or a standard Element animation config objectStore the current overflow setting and clip overflow on the element - use <a ext:cls="Ext.Element" ext:member="unclip" href="output/Ext.Element.html#unclip">unclip</a> to removeReturn clipping (overflow) to original clipping before clip() was calledGets the x,y coordinates specified by the anchor position on the element.(optional) The specified anchor position (defaults to "c"). See <a ext:cls="Ext.Element" ext:member="alignTo" href="output/Ext.Element.html#alignTo">alignTo</a> for details on supported anchor positions.(optional) An object containing the size to use for calculating anchor position +{width: (target width), height: (target height)} (defaults to the element's current size)(optional) True to get the local (element top/left-relative) anchor position instead of page coordinatesGets the x,y coordinates to align this element with another element. See <a ext:cls="Ext.Element" ext:member="alignTo" href="output/Ext.Element.html#alignTo">alignTo</a> for more info on the +supported position values.The element to align to.The position to align to.(optional) Offset the positioning by [x, y]Aligns this element with another element relative to the specified anchor points. If the other element is the +document it aligns it to the viewport. +The position parameter is optional, and can be specified in any one of the following formats: +<ul> +<li><b>Blank</b>: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").</li> +<li><b>One anchor (deprecated)</b>: The passed anchor position is used as the target element's anchor point. +The element being aligned will position its top-left corner (tl) to that point. <i>This method has been +deprecated in favor of the newer two anchor syntax below</i>.</li> +<li><b>Two anchors</b>: If two values from the table below are passed separated by a dash, the first value is used as the +element's anchor point, and the second value is used as the target's anchor point.</li> +</ul> +In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of +the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to +the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than +that specified in order to enforce the viewport constraints. +Following are all of the supported anchor positions: +<pre>Value Description +----- ----------------------------- +tl The top left corner (default) +t The center of the top edge +tr The top right corner +l The center of the left edge +c In the center of the element +r The center of the right edge +bl The bottom left corner +b The center of the bottom edge +br The bottom right corner</pre> +Example Usage: +<pre><code>// align el to other-el using the default positioning ("tl-bl", non-constrained) +el.alignTo("other-el"); + +// align the top left corner of el with the top right corner of other-el (constrained to viewport) +el.alignTo("other-el", "tr?"); + +// align the bottom right corner of el with the center left edge of other-el +el.alignTo("other-el", "br-l?"); + +// align the center of el with the bottom left corner of other-el and +// adjust the x position by -6 pixels (and the y position by 0) +el.alignTo("other-el", "c-bl", [-6, 0]);</code></pre>The element to align to.The position to align to.(optional) Offset the positioning by [x, y](optional) true for the default animation or a standard Element animation config objectAnchors an element to another element and realigns it when the window is resized.The element to align to.The position to align to.(optional) Offset the positioning by [x, y](optional) True for the default animation or a standard Element animation config object(optional) True to monitor body scroll and reposition. If this parameter +is a number, it is used as the buffer delay (defaults to 50ms).The function to call after the animation finishesClears any opacity settings from this element. Required in some cases for IE.Hide this element - Uses display mode to determine whether to use "display" or "visibility". See <a ext:cls="Ext.Element" ext:member="setVisible" href="output/Ext.Element.html#setVisible">setVisible</a>.(optional) true for the default animation or a standard Element animation config objectShow this element - Uses display mode to determine whether to use "display" or "visibility". See <a ext:cls="Ext.Element" ext:member="setVisible" href="output/Ext.Element.html#setVisible">setVisible</a>.(optional) true for the default animation or a standard Element animation config objectUpdate the innerHTML of this element, optionally searching for and processing scriptsThe new HTML(optional) true to look for and process scriptsFor async script loading you can be noticed when the update completesDirect access to the Updater <a ext:cls="Ext.Updater" ext:member="update" href="output/Ext.Updater.html#update">Ext.Updater.update</a> method (takes the same parameters).The url for this request or a function to call to get the url(optional) The parameters to pass as either a url encoded string "param1=1&amp;param2=2" or an object {param1: 1, param2: 2}(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)(optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url.Gets this element's UpdaterDisables text selection for this element (normalized across browsers)Calculates the x, y to center this element on the screenCenters the Element in either the viewport, or another Element.(optional) The element in which to center the element.Tests various css rules/browsers to determine if this element uses a border boxReturn a box {x, y, width, height} that can be used to set another elements +size/location to match this element.(optional) If true a box for the content of the element is returned.(optional) If true the element's left and top are returned instead of page x/y.Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth() + for more information about the sides.Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently.The box to fill {x, y, width, height}(optional) Whether to adjust for box-model issues automatically(optional) true for the default animation or a standard Element animation config objectForces the browser to repaint this elementReturns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed, +then it returns the calculated width of the sides (see getPadding)(optional) Any combination of l, r, t, b to get the sum of those sidesCreates a proxy element of this elementThe class name of the proxy element or a DomHelper config object(optional) The element or element id to render the proxy to (defaults to document.body)(optional) True to align and size the proxy to this element now (defaults to false)Puts a mask over this element to disable user interaction. Requires core.css. +This method can only be applied to elements which accept child nodes.(optional) A message to display in the mask(optional) A css class to apply to the msg elementRemoves a previously applied mask.Returns true if this element is maskedCreates an iframe shim for this element to keep selects and other windowed objects from +showing through.Removes this element from the DOM and deletes it from the cacheSets up event handlers to call the passed functions when the mouse is over this element. Automatically +filters child element mouse events.(optional)Sets up event handlers to add and remove a css class when the mouse is over this element(optional) If set to true, it prevents flickering by filtering +mouseout events for children elementsSets up event handlers to add and remove a css class when this element has the focusSets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect)Stops the specified event from bubbling and optionally prevents the default action(optional) true to prevent the default action tooGets the next sibling, skipping text nodes(optional) Find the next sibling that matches the passed simple selector(optional) True to return a raw dom node instead of an Ext.ElementGets the previous sibling, skipping text nodes(optional) Find the previous sibling that matches the passed simple selector(optional) True to return a raw dom node instead of an Ext.ElementGets the first child, skipping text nodes(optional) Find the next sibling that matches the passed simple selector(optional) True to return a raw dom node instead of an Ext.ElementGets the last child, skipping text nodes(optional) Find the previous sibling that matches the passed simple selector(optional) True to return a raw dom node instead of an Ext.ElementAppends the passed element(s) to this elementCreates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be +automatically generated with the specified attributes.(optional) a child element of this element(optional) true to return the dom node instead of creating an ElementAppends this element to the passed elementThe new parent elementInserts this element before the passed element in the DOMThe element to insert beforeInserts this element after the passed element in the DOMThe element to insert afterInserts (or creates) an element (or DomHelper config) as the first child of the this elementThe id or element to insert or a DomHelper config to create and insertInserts (or creates) the passed element (or DomHelper config) as a sibling of this elementThe id, element to insert or a DomHelper config to create and insert *or* an array of any of those.(optional) 'before' or 'after' defaults to before(optional) True to return the raw DOM element instead of Ext.ElementCreates and wraps this element with another element(optional) DomHelper element config object for the wrapper element or null for an empty div(optional) True to return the raw DOM element instead of Ext.ElementReplaces the passed element with this elementThe element to replaceReplaces this element with the passed elementThe new element or a DomHelper config of an element to createInserts an html fragment into this elementWhere to insert the html in relation to the this element - beforeBegin, afterBegin, beforeEnd, afterEnd.The HTML fragmentTrue to return an Ext.ElementSets the passed attributes as attributes of this element (a style attribute can be a string, object or function)The object with the attributes(optional) false to override the default setAttribute to use expandos.Convenience method for constructing a KeyMapEither a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options: +{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}The function to call(optional) The scope of the functionCreates a KeyMap for this elementThe KeyMap config. See <a ext:cls="Ext.KeyMap" href="output/Ext.KeyMap.html">Ext.KeyMap</a> for more detailsReturns true if this element is scrollable.Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll().Either "left" for scrollLeft values or "top" for scrollTop values.The new scroll value(optional) true for the default animation or a standard Element animation config objectScrolls this element the specified direction. Does bounds checking to make sure the scroll is +within this element's scrollable range.Possible values are: "l","left" - "r","right" - "t","top","up" - "b","bottom","down".How far to scroll the element in pixels(optional) true for the default animation or a standard Element animation config objectTranslates the passed page coordinates into left/top css values for this elementThe page x or an array containing [x, y]The page yReturns the current scroll position of the element.Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values +are convert to standard 6 digit hex color.The css attributeThe default value to use when a valid color isn't found(optional) defaults to #. Use an empty string when working with +color anims.Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a +gradient background, rounded corners and a 4-way shadow. Example usage: +<pre><code> +// Basic box wrap +Ext.get("foo").boxWrap(); + +// You can also add a custom class and use CSS inheritance rules to customize the box look. +// 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example +// for how to create a custom box wrap style. +Ext.get("foo").boxWrap().addClass("x-box-blue");</pre></code>(optional) A base CSS class to apply to the containing wrapper element (defaults to 'x-box'). +Note that there are a number of CSS rules that are dependent on this name to make the overall effect work, +so if you supply an alternate base class, make sure you also supply all of the necessary rules.Returns the value of a namespaced attribute from the element's underlying DOM node.The namespace in which to look for the attributeThe attribute name&lt;static&gt; Static method to retrieve Element objects. Uses simple caching to consistently return the same object. +Automatically fixes if an object was recreated with the same id via AJAX or DOM.The id of the node, a DOM Node or an existing Element.&lt;static&gt; Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - +the dom node can be overwritten by other code.The dom node or id(optional) Allows for creation of named reusable flyweights to +prevent conflicts (e.g. internally Ext uses "_internal")Appends an event handler (shorthand for <a ext:cls="Ext.Element" ext:member="addListener" href="output/Ext.Element.html#addListener">addListener</a>).The type of event to handleThe handler function the event invokes(optional) The scope (this element) of the handler function(optional) An object containing standard <a ext:cls="Ext.Element" ext:member="addListener" href="output/Ext.Element.html#addListener">addListener</a> optionsRemoves an event handler from this element (shorthand for <a ext:cls="Ext.Element" ext:member="removeListener" href="output/Ext.Element.html#removeListener">removeListener</a>).the type of event to removethe method the event invokesRegisters event handlers that want to receive a normalized EventObject instead of the standard browser event and provides +several useful events directly. +See <a ext:cls="Ext.EventObject" href="output/Ext.EventObject.html">Ext.EventObject</a> for more details on normalized event objects.<br><br><i>This class is a singleton and cannot be created directly.</i>Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)The frequency, in milliseconds, to check for text resize events (defaults to 50)Appends an event handler to an element. The shorthand version <a ext:cls="Ext.EventManager" ext:member="on" href="output/Ext.EventManager.html#on">on</a> is equivalent. Typically you will +use <a ext:cls="Ext.Element" ext:member="addListener" href="output/Ext.Element.html#addListener">Ext.Element.addListener</a> directly on an Element in favor of calling this version.The html element or id to assign the event handler toThe type of event to listen forThe handler function the event invokes(optional) The scope in which to execute the handler +function (the handler function's "this" context)(optional) An object containing handler configuration properties. +This may contain any of the following properties:<ul> +<li>scope {Object} : The scope in which to execute the handler function. The handler function's "this" context.</li> +<li>delegate {String} : A simple selector to filter the target or look for a descendant of the target</li> +<li>stopEvent {Boolean} : True to stop the event. That is stop propagation, and prevent the default action.</li> +<li>preventDefault {Boolean} : True to prevent the default action</li> +<li>stopPropagation {Boolean} : True to prevent event propagation</li> +<li>normalized {Boolean} : False to pass a browser event to the handler function instead of an Ext.EventObject</li> +<li>delay {Number} : The number of milliseconds to delay the invocation of the handler after te event fires.</li> +<li>single {Boolean} : True to add a handler to handle just the next firing of the event, and then remove itself.</li> +<li>buffer {Number} : Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed +by the specified number of milliseconds. If the event fires again within that time, the original +handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li> +</ul><br> +<p>See <a ext:cls="Ext.Element" ext:member="addListener" href="output/Ext.Element.html#addListener">Ext.Element.addListener</a> for examples of how to use these options.</p>Removes an event handler from an element. The shorthand version <a ext:cls="Ext.EventManager" ext:member="un" href="output/Ext.EventManager.html#un">un</a> is equivalent. Typically +you will use <a ext:cls="Ext.Element" ext:member="removeListener" href="output/Ext.Element.html#removeListener">Ext.Element.removeListener</a> directly on an Element in favor of calling this version.The id or html element from which to remove the eventThe type of eventThe handler function to removeFires when the document is ready (before onload and before images are loaded). Can be +accessed shorthanded as Ext.onReady().The method the event invokes(optional) An object that becomes the scope of the handler(optional) An object containing standard <a ext:cls="Ext.EventManager" ext:member="addListener" href="output/Ext.EventManager.html#addListener">addListener</a> optionsFires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers.The method the event invokesAn object that becomes the scope of the handlerFires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size.The method the event invokesAn object that becomes the scope of the handlerRemoves the passed window resize listener.The method the event invokesThe scope of handlerAppends an event handler to an element. Shorthand for <a ext:cls="Ext.EventManager" ext:member="addListener" href="output/Ext.EventManager.html#addListener">addListener</a>.The html element or id to assign the event handler toThe type of event to listen forThe handler function the event invokes(optional) The scope in which to execute the handler +function (the handler function's "this" context)(optional) An object containing standard <a ext:cls="Ext.EventManager" ext:member="addListener" href="output/Ext.EventManager.html#addListener">addListener</a> optionsRemoves an event handler from an element. Shorthand for <a ext:cls="Ext.EventManager" ext:member="removeListener" href="output/Ext.EventManager.html#removeListener">removeListener</a>.The id or html element from which to remove the eventThe type of eventThe handler function to removeEventObject exposes the Yahoo! UI Event functionality directly on the object +passed to your event handler. It exists mostly for convenience. It also fixes the annoying null checks automatically to cleanup your code +Example: +<pre><code>function handleClick(e){ // e is not a standard event object, it is a Ext.EventObject + e.preventDefault(); + var target = e.getTarget(); + ... + } + var myDiv = Ext.get("myDiv"); + myDiv.on("click", handleClick); + //or + Ext.EventManager.on("myDiv", 'click', handleClick); + Ext.EventManager.addListener("myDiv", 'click', handleClick);</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i>The normal browser eventThe button pressed in a mouse eventTrue if the shift key was down during the eventTrue if the control key was down during the eventTrue if the alt key was down during the eventKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantKey constantStop the event (preventDefault and stopPropagation)Prevents the browsers default handling of the event.Cancels bubbling of the event.Gets the key code for the event.Returns a normalized keyCode for the event.Gets the x coordinate of the event.Gets the y coordinate of the event.Gets the time of the event.Gets the page coordinates of the event.Gets the target for the event.(optional) A simple selector to filter the target or look for an ancestor of the target(optional) The max depth to + search as a number or element (defaults to 10 || document.body)(optional) True to return a Ext.Element object instead of DOM nodeGets the related target.Normalizes mouse wheel delta across browsersReturns true if the control, meta, shift or alt key was pressed during this event.Returns true if the target of this event equals el or is a child of el(optional) true to test if the related target is within el instead of the target<p>A class to provide basic animation and visual effects support. <b>Note:</b> This class is automatically applied +to the <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> interface when included, so all effects calls should be performed via Element. +Conversely, since the effects are not actually defined in Element, Ext.Fx <b>must</b> be included in order for the +Element effects to work.</p><br/> +<p>It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that +they return the Element object itself as the method return value, it is not always possible to mix the two in a single +method chain. The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced. +Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately. For this reason, +while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the +expected results and should be done with care.</p><br/> +<p>Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element +that will serve as either the start or end point of the animation. Following are all of the supported anchor positions:</p> +<pre>Value Description +----- ----------------------------- +tl The top left corner +t The center of the top edge +tr The top right corner +l The center of the left edge +r The center of the right edge +bl The bottom left corner +b The center of the bottom edge +br The bottom right corner</pre> +<b>Although some Fx methods accept specific custom config parameters, the ones shown in the Config Options section +below are common options that can be passed to any Fx method.</b>Slides the element into view. An anchor point can be optionally passed to set the point of +origin for the slide effect. This function automatically handles wrapping the element with +a fixed-size container if needed. See the Fx class overview for valid anchor point options. +Usage: +<pre><code>// default: slide the element in from the top +el.slideIn(); + +// custom: slide the element in from the right with a 2-second duration +el.slideIn('r', { duration: 2 }); + +// common config options shown with default values +el.slideIn('t', { + easing: 'easeOut', + duration: .5 +});</code></pre>(optional) One of the valid Fx anchor positions (defaults to top: 't')(optional) Object literal with any of the Fx config optionsSlides the element out of view. An anchor point can be optionally passed to set the end point +for the slide effect. When the effect is completed, the element will be hidden (visibility = +'hidden') but block elements will still take up space in the document. The element must be removed +from the DOM using the 'remove' config option if desired. This function automatically handles +wrapping the element with a fixed-size container if needed. See the Fx class overview for valid anchor point options. +Usage: +<pre><code>// default: slide the element out to the top +el.slideOut(); + +// custom: slide the element out to the right with a 2-second duration +el.slideOut('r', { duration: 2 }); + +// common config options shown with default values +el.slideOut('t', { + easing: 'easeOut', + duration: .5, + remove: false, + useDisplay: false +});</code></pre>(optional) One of the valid Fx anchor positions (defaults to top: 't')(optional) Object literal with any of the Fx config optionsFades the element out while slowly expanding it in all directions. When the effect is completed, the +element will be hidden (visibility = 'hidden') but block elements will still take up space in the document. +The element must be removed from the DOM using the 'remove' config option if desired. +Usage: +<pre><code>// default +el.puff(); + +// common config options shown with default values +el.puff({ + easing: 'easeOut', + duration: .5, + remove: false, + useDisplay: false +});</code></pre>(optional) Object literal with any of the Fx config optionsBlinks the element as if it was clicked and then collapses on its center (similar to switching off a television). +When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still +take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired. +Usage: +<pre><code>// default +el.switchOff(); + +// all config options shown with default values +el.switchOff({ + easing: 'easeIn', + duration: .3, + remove: false, + useDisplay: false +});</code></pre>(optional) Object literal with any of the Fx config optionsHighlights the Element by setting a color (applies to the background-color by default, but can be +changed using the "attr" config option) and then fading back to the original color. If no original +color is available, you should provide the "endColor" config option which will be cleared after the animation. +Usage: +<pre><code>// default: highlight background to yellow +el.highlight(); + +// custom: highlight foreground text to blue for 2 seconds +el.highlight("0000ff", { attr: 'color', duration: 2 }); + +// common config options shown with default values +el.highlight("ffff9c", { + attr: "background-color", //can be any valid CSS property (attribute) that supports a color value + endColor: (current color) or "ffffff", + easing: 'easeIn', + duration: 1 +});</code></pre>(optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c')(optional) Object literal with any of the Fx config optionsShows a ripple of exploding, attenuating borders to draw attention to an Element. +Usage: +<pre><code>// default: a single light blue ripple +el.frame(); + +// custom: 3 red ripples lasting 3 seconds total +el.frame("ff0000", 3, { duration: 3 }); + +// common config options shown with default values +el.frame("C3DAF9", 1, { + duration: 1 //duration of entire animation (not each individual ripple) + // Note: Easing is not configurable and will be ignored if included +});</code></pre>(optional) The color of the border. Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9').(optional) The number of ripples to display (defaults to 1)(optional) Object literal with any of the Fx config optionsCreates a pause before any subsequent queued effects begin. If there are +no effects queued after the pause it will have no effect. +Usage: +<pre><code>el.pause(1);</code></pre>The length of time to pause (in seconds)Fade an element in (from transparent to opaque). The ending opacity can be specified +using the "endOpacity" config option. +Usage: +<pre><code>// default: fade in from opacity 0 to 100% +el.fadeIn(); + +// custom: fade in from opacity 0 to 75% over 2 seconds +el.fadeIn({ endOpacity: .75, duration: 2}); + +// common config options shown with default values +el.fadeIn({ + endOpacity: 1, //can be any value between 0 and 1 (e.g. .5) + easing: 'easeOut', + duration: .5 +});</code></pre>(optional) Object literal with any of the Fx config optionsFade an element out (from opaque to transparent). The ending opacity can be specified +using the "endOpacity" config option. +Usage: +<pre><code>// default: fade out from the element's current opacity to 0 +el.fadeOut(); + +// custom: fade out from the element's current opacity to 25% over 2 seconds +el.fadeOut({ endOpacity: .25, duration: 2}); + +// common config options shown with default values +el.fadeOut({ + endOpacity: 0, //can be any value between 0 and 1 (e.g. .5) + easing: 'easeOut', + duration: .5 + remove: false, + useDisplay: false +});</code></pre>(optional) Object literal with any of the Fx config optionsAnimates the transition of an element's dimensions from a starting height/width +to an ending height/width. +Usage: +<pre><code>// change height and width to 100x100 pixels +el.scale(100, 100); + +// common config options shown with default values. The height and width will default to +// the element's existing values if passed as null. +el.scale( + [element's width], + [element's height], { + easing: 'easeOut', + duration: .35 +});</code></pre>The new width (pass undefined to keep the original width)The new height (pass undefined to keep the original height)(optional) Object literal with any of the Fx config optionsAnimates the transition of any combination of an element's dimensions, xy position and/or opacity. +Any of these properties not specified in the config object will not be changed. This effect +requires that at least one new dimension, position or opacity setting must be passed in on +the config object in order for the function to have any effect. +Usage: +<pre><code>// slide the element horizontally to x position 200 while changing the height and opacity +el.shift({ x: 200, height: 50, opacity: .8 }); + +// common config options shown with default values. +el.shift({ + width: [element's width], + height: [element's height], + x: [element's x position], + y: [element's y position], + opacity: [element's opacity], + easing: 'easeOut', + duration: .35 +});</code></pre>Object literal with any of the Fx config optionsSlides the element while fading it out of view. An anchor point can be optionally passed to set the +ending point of the effect. +Usage: +<pre><code>// default: slide the element downward while fading out +el.ghost(); + +// custom: slide the element out to the right with a 2-second duration +el.ghost('r', { duration: 2 }); + +// common config options shown with default values +el.ghost('b', { + easing: 'easeOut', + duration: .5 + remove: false, + useDisplay: false +});</code></pre>(optional) One of the valid Fx anchor positions (defaults to bottom: 'b')(optional) Object literal with any of the Fx config optionsEnsures that all effects queued after syncFx is called on the element are +run concurrently. This is the opposite of <a ext:cls="Ext.Fx" ext:member="sequenceFx" href="output/Ext.Fx.html#sequenceFx">sequenceFx</a>.Ensures that all effects queued after sequenceFx is called on the element are +run in sequence. This is the opposite of <a ext:cls="Ext.Fx" ext:member="syncFx" href="output/Ext.Fx.html#syncFx">syncFx</a>.Returns true if the element has any effects actively running or queued, else returns false.Stops any running effects and clears the element's internal effects queue if it contains +any additional effects that haven't started yet.Returns true if the element is currently blocking so that no other effect can be queued +until this effect is finished, else returns false if blocking is not set. This is commonly +used to ensure that an effect initiated by a user action runs to completion prior to the +same effect being restarted (e.g., firing only one effect even if the user clicks several times).Handles mapping keys to actions for an element. One key map can be used for multiple actions. +The constructor accepts the same config object as defined by <a ext:cls="Ext.KeyMap" ext:member="addBinding" href="output/Ext.KeyMap.html#addBinding">addBinding</a>. +If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key +combination it will call the function with this signature (if the match is a multi-key +combination the callback will still be called only once): (String key, Ext.EventObject e) +A KeyMap can also handle a string representation of keys.<br /> +Usage: + <pre><code>// map one key by key code +var map = new Ext.KeyMap("my-element", { + key: 13, // or Ext.EventObject.ENTER + fn: myHandler, + scope: myObject +}); + +// map multiple keys to one action by string +var map = new Ext.KeyMap("my-element", { + key: "a\r\n\t", + fn: myHandler, + scope: myObject +}); + +// map multiple keys to multiple actions by strings and array of codes +var map = new Ext.KeyMap("my-element", [ + { + key: [10,13], + fn: function(){ alert("Return was pressed"); } + }, { + key: "abc", + fn: function(){ alert('a, b or c was pressed'); } + }, { + key: "\t", + ctrl:true, + shift:true, + fn: function(){ alert('Control + shift + tab was pressed.'); } + } +]);</code></pre> +<b>Note: A KeyMap starts enabled</b>The element to bind toThe config (see <a ext:cls="Ext.KeyMap" ext:member="addBinding" href="output/Ext.KeyMap.html#addBinding">addBinding</a>)(optional) The event to bind to (defaults to "keydown")True to stop the event from bubbling and prevent the default browser action if the +key was handled by the KeyMap (defaults to false)Add a new binding to this KeyMap. The following config object properties are supported: +<pre>Property Type Description +---------- --------------- ---------------------------------------------------------------------- +key String/Array A single keycode or an array of keycodes to handle +shift Boolean True to handle key only when shift is pressed (defaults to false) +ctrl Boolean True to handle key only when ctrl is pressed (defaults to false) +alt Boolean True to handle key only when alt is pressed (defaults to false) +fn Function The function to call when KeyMap finds the expected key combination +scope Object The scope of the callback function</pre> +Usage: +<pre><code>// Create a KeyMap +var map = new Ext.KeyMap(document, { + key: Ext.EventObject.ENTER, + fn: handleKey, + scope: this +}); + +//Add a new binding to the existing KeyMap later +map.addBinding({ + key: 'abc', + shift: true, + fn: handleKey, + scope: this +});</code></pre>A single KeyMap config or an array of configsShorthand for adding a single key listenerEither the numeric key code, array of key codes or an object with the +following options: +{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}The function to call(optional) The scope of the functionReturns true if this KeyMap is enabledEnables this KeyMapDisable this KeyMap<p>Provides a convenient wrapper for normalized keyboard navigation. KeyNav allows you to bind +navigation keys to function calls that will get called when the keys are pressed, providing an easy +way to implement custom navigation schemes for any UI component.</p> +<p>The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc, +pageUp, pageDown, del, home, end. Usage:</p> + <pre><code>var nav = new Ext.KeyNav("my-element", { + "left" : function(e){ + this.moveLeft(e.ctrlKey); + }, + "right" : function(e){ + this.moveRight(e.ctrlKey); + }, + "enter" : function(e){ + this.save(); + }, + scope : this +});</code></pre>The element to bind toThe configEnable this KeyNavDisable this KeyNavAn extended <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> object that supports a shadow and shim, constrain to viewport and +automatic maintaining of shadow/shim positions.An object with config options.(optional) Uses an existing DOM element. If the element is not found it creates it.Sets the z-index of this layer and adjusts any shadow and shim z-indexes. The layer z-index is automatically +incremented by two more than the value passed in so that it always shows above any shadow or shim (the shadow +element, if any, will be assigned z-index + 1, and the shim element, if any, will be assigned the unmodified z-index).The new z-index to setA simple utility class for generically masking elements while loading data. If the element being masked has +an underlying <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>, the masking will be automatically synchronized with the store's loading +process and the mask element will be cached for reuse. For all other elements, this mask will replace the +element's Updater load indicator and will be destroyed after the initial load.Create a new LoadMaskThe element or DOM node, or its idThe config objectRead-only. True if the mask is currently disabled so that it will not be displayed (defaults to false)Disables the mask to prevent it from being displayedEnables the mask so that it can be displayed<p>Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.<p/> +<p>Note that the MessageBox is asynchronous. Unlike a regular JavaScript <code>alert</code> (which will halt +browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code +that should only run <em>after</em> some user feedback from the MessageBox, you must use a callback function +(see the <code>function</code> parameter for <a ext:cls="Ext.MessageBox" ext:member="show" href="output/Ext.MessageBox.html#show">show</a> for more details).</p> +<p>Example usage:</p> +<pre><code>// Basic alert: +Ext.Msg.alert('Status', 'Changes saved successfully.'); + +// Prompt for user data and process the result using a callback: +Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){ + if (btn == 'ok'){ + // process text value and close... + } +}); + +// Show a dialog using config options: +Ext.Msg.show({ + title:'Save Changes?', + msg: 'Your are closing a tab that has unsaved changes. Would you like to save your changes?', + buttons: Ext.Msg.YESNOCANCEL, + fn: processResult, + animEl: 'elId', + icon: Ext.MessageBox.QUESTION +});</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i>Button config that displays a single OK buttonButton config that displays Yes and No buttonsButton config that displays OK and Cancel buttonsButton config that displays Yes, No and Cancel buttonsThe CSS class that provides the INFO icon imageThe CSS class that provides the WARNING icon imageThe CSS class that provides the QUESTION icon imageThe CSS class that provides the ERROR icon imageThe default height in pixels of the message box's multiline textarea if displayed (defaults to 75)The maximum width in pixels of the message box (defaults to 600)The minimum width in pixels of the message box (defaults to 100)The minimum width in pixels of the message box if it is a progress-style dialog. This is useful +for setting a different minimum width than text-only dialogs may need (defaults to 250)An object containing the default button text strings that can be overriden for localized language support. +Supported properties are: ok, cancel, yes and no. Generally you should include a locale-specific +resource file for handling language support across the framework. +Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //frenchReturns a reference to the underlying <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> elementUpdates the message box body text(optional) Replaces the message box element's innerHTML with the specified string (defaults to +the XHTML-compliant non-breaking space character '&amp;#160;')Updates a progress-style message box's text and progress bar. Only relevant on message boxes +initiated via <a ext:cls="Ext.MessageBox" ext:member="progress" href="output/Ext.MessageBox.html#progress">Ext.MessageBox.progress</a> or by calling <a ext:cls="Ext.MessageBox" ext:member="show" href="output/Ext.MessageBox.html#show">Ext.MessageBox.show</a> with progress: true.Any number between 0 and 1 (e.g., .5, defaults to 0)The progress text to display inside the progress bar (defaults to '')The message box's body text is replaced with the specified string (defaults to undefined +so that any existing body text will not get overwritten by default unless a new value is passed in)Returns true if the message box is currently displayedHides the message box if it is displayedDisplays a new message box, or reinitializes an existing message box, based on the config options +passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally, +although those calls are basic shortcuts and do not support all of the config options allowed here. +The following config object properties are supported: +<pre>Property Type Description +---------------- --------------- ----------------------------------------------------------------------------- +animEl String/Element An id or Element from which the message box should animate as it opens and + closes (defaults to undefined) +buttons Object/Boolean A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo', + cancel:'Bar'}), or false to not show any buttons (defaults to false) +closable Boolean False to hide the top-right close button (defaults to true). Note that + progress and wait dialogs will ignore this property and always hide the + close button as they can only be closed programmatically. +cls String A custom CSS class to apply to the message box element +defaultTextHeight Number The default height in pixels of the message box's multiline textarea if + displayed (defaults to 75) +fn Function A callback function to execute after closing the dialog. The arguments to the + function will be btn (the name of the button that was clicked, if applicable, + e.g. "ok"), and text (the value of the active text field, if applicable). + Progress and wait dialogs will ignore this option since they do not respond to + user actions and can only be closed programmatically, so any required function + should be called by the same code after it closes the dialog. +icon String A CSS class that provides a background image to be used as an icon for + the dialog (e.g., Ext.MessageBox.WARNING or 'custom-class', defaults to '') +maxWidth Number The maximum width in pixels of the message box (defaults to 600) +minWidth Number The minimum width in pixels of the message box (defaults to 100) +modal Boolean False to allow user interaction with the page while the message box is + displayed (defaults to true) +msg String A string that will replace the existing message box body text (defaults + to the XHTML-compliant non-breaking space character '&#160;') +multiline Boolean True to prompt the user to enter multi-line text (defaults to false) +progress Boolean True to display a progress bar (defaults to false) +progressText String The text to display inside the progress bar if progress = true (defaults to '') +prompt Boolean True to prompt the user to enter single-line text (defaults to false) +proxyDrag Boolean True to display a lightweight proxy while dragging (defaults to false) +title String The title text +value String The string value to set into the active textbox element if displayed +wait Boolean True to display a progress bar (defaults to false) +waitConfig Object A <a ext:cls="Ext.ProgressBar" ext:member="waitConfig" href="output/Ext.ProgressBar.html#waitConfig">Ext.ProgressBar.waitConfig</a> object (applies only if wait = true) +width Number The width of the dialog in pixels</pre> +Example usage: +<pre><code>Ext.Msg.show({ + title: 'Address', + msg: 'Please enter your address:', + width: 300, + buttons: Ext.MessageBox.OKCANCEL, + multiline: true, + fn: saveAddress, + animEl: 'addAddressBtn', + icon: Ext.MessagBox.INFO +});</code></pre>Configuration optionsAdds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default +styling, and the class passed in is expected to supply the background image url. Pass in empty string ('') +to clear any existing icon. The following built-in icon classes are supported, but you can also pass +in a custom class name: +<pre>Ext.MessageBox.INFO +Ext.MessageBox.WARNING +Ext.MessageBox.QUESTION +Ext.MessageBox.ERROR</pre>A CSS classname specifying the icon's background image url, or empty string to clear the iconDisplays a message box with a progress bar. This message box has no buttons and is not closeable by +the user. You are responsible for updating the progress bar as needed via <a ext:cls="Ext.MessageBox" ext:member="updateProgress" href="output/Ext.MessageBox.html#updateProgress">Ext.MessageBox.updateProgress</a> +and closing the message box when the process is complete.The title bar textThe message box body textThe text to display inside the progress bar (defaults to '')Displays a message box with an infinitely auto-updating progress bar. This can be used to block user +interaction while waiting for a long-running process to complete that does not have defined intervals. +You are responsible for closing the message box when the process is complete.The message box body text(optional) The title bar text(optional) A <a ext:cls="Ext.ProgressBar" ext:member="waitConfig" href="output/Ext.ProgressBar.html#waitConfig">Ext.ProgressBar.waitConfig</a> objectDisplays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt). +If a callback function is passed it will be called after the user clicks the button, and the +id of the button that was clicked will be passed as the only parameter to the callback +(could also be the top-right close button).The title bar textThe message box body text(optional) The callback function invoked after the message box is closed(optional) The scope of the callback functionDisplays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). +If a callback function is passed it will be called after the user clicks either button, +and the id of the button that was clicked will be passed as the only parameter to the callback +(could also be the top-right close button).The title bar textThe message box body text(optional) The callback function invoked after the message box is closed(optional) The scope of the callback functionDisplays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). +The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user +clicks either button, and the id of the button that was clicked (could also be the top-right +close button) and the text that was entered will be passed as the two parameters to the callback.The title bar textThe message box body text(optional) The callback function invoked after the message box is closed(optional) The scope of the callback function(optional) True to create a multiline textbox using the defaultTextHeight +property, or the height in pixels to create the textbox (defaults to false / single-line)A specialized toolbar that is bound to a <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> and provides automatic paging controls.Create a new PagingToolbarThe config objectCustomizable piece of the default paging text (defaults to "Page")Customizable piece of the default paging text (defaults to "of %0")Customizable piece of the default paging text (defaults to "First Page")Customizable piece of the default paging text (defaults to "Previous Page")Customizable piece of the default paging text (defaults to "Next Page")Customizable piece of the default paging text (defaults to "Last Page")Customizable piece of the default paging text (defaults to "Refresh")Object mapping of parameter names for load calls (defaults to {start: 'start', limit: 'limit'})Unbinds the paging toolbar from the specified <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>The data store to unbindBinds the paging toolbar to the specified <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>The data store to bindPanel is a container that has specific functionality and structural components that make it the perfect building +block for application-oriented user interfaces. The Panel contains bottom and top toolbars, along with separate +header, footer and body sections. It also provides built-in expandable and collapsible behavior, along with a +variety of prebuilt tool buttons that can be wired up to provide other customized behavior. Panels can be easily +dropped into any Container or layout, and the layout and rendering pipeline is completely managed by the framework.The config objectThe Panel's header {@link Ext.Element Element}. Read-only. +The Panel's body {@link Ext.Element Element} which may be used either to contain HTML content, +or to house a Layout. Read-only. +The Panel's footer {@link Ext.Element Element}. Read-only.Sets the CSS class that provides the icon image for this panel. This method will replace any existing +icon class if one has already been set.The new CSS class nameReturns the toolbar from the top (tbar) section of the panel.Returns the toolbar from the bottom (bbar) section of the panel.Adds a button to this panel. Note that this method must be called prior to rendering. The preferred +approach is to add buttons via the <a ext:cls="Ext.Panel" ext:member="buttons" href="output/Ext.Panel.html#buttons">buttons</a> config.A valid <a ext:cls="Ext.Button" href="output/Ext.Button.html">Ext.Button</a> config. A string will become the text for a default +button config, an object will be treated as a button config object.The function to be called on button <a ext:cls="Ext.Button" ext:member="click" href="output/Ext.Button.html#click">Ext.Button.click</a>The scope to use for the button handler functionCollapses the panel body so that it becomes hidden. Fires the <a ext:cls="Ext.Panel" ext:member="beforecollapse" href="output/Ext.Panel.html#beforecollapse">beforecollapse</a> event which will +cancel the collapse action if it returns false.True to animate the transition, else false (defaults to the value of the +<a ext:cls="Ext.Panel" ext:member="animCollapse" href="output/Ext.Panel.html#animCollapse">animCollapse</a> panel config)Expands the panel body so that it becomes visible. Fires the <a ext:cls="Ext.Panel" ext:member="beforeexpand" href="output/Ext.Panel.html#beforeexpand">beforeexpand</a> event which will +cancel the expand action if it returns false.True to animate the transition, else false (defaults to the value of the +<a ext:cls="Ext.Panel" ext:member="animCollapse" href="output/Ext.Panel.html#animCollapse">animCollapse</a> panel config)Shortcut for performing an <a ext:cls="Ext.Panel" ext:member="expand" href="output/Ext.Panel.html#expand">expand</a> or <a ext:cls="Ext.Panel" ext:member="collapse" href="output/Ext.Panel.html#collapse">collapse</a> based on the current state of the panel.True to animate the transition, else false (defaults to the value of the +<a ext:cls="Ext.Panel" ext:member="animCollapse" href="output/Ext.Panel.html#animCollapse">animCollapse</a> panel config)Returns the width in pixels of the framing elements of this panel (not including the body width). To +retrieve the body width see <a ext:cls="Ext.Panel" ext:member="getInnerWidth" href="output/Ext.Panel.html#getInnerWidth">getInnerWidth</a>.Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and +header and footer elements, but not including the body height). To retrieve the body height see <a ext:cls="Ext.Panel" ext:member="getInnerHeight" href="output/Ext.Panel.html#getInnerHeight">getInnerHeight</a>.Returns the width in pixels of the body element (not including the width of any framing elements). +For the frame width see <a ext:cls="Ext.Panel" ext:member="getFrameWidth" href="output/Ext.Panel.html#getFrameWidth">getFrameWidth</a>.Returns the height in pixels of the body element (not including the height of any framing elements). +For the frame height see <a ext:cls="Ext.Panel" ext:member="getFrameHeight" href="output/Ext.Panel.html#getFrameHeight">getFrameHeight</a>.Sets the title text for the panel and optioanlly the icon class.The title text to seticonCls A CSS class that provides the icon image for this panelGet the <a ext:cls="Ext.Updater" href="output/Ext.Updater.html">Ext.Updater</a> for this panel. Enables you to perform Ajax updates of this panel's body.Loads this content panel immediately with content returned from an XHR call.A config object containing any of the following options: +<pre><code>panel.load({ + url: "your-url.php", + params: {param1: "foo", param2: "bar"}, // or a URL encoded string + callback: yourFunction, + scope: yourObject, // optional scope for the callback + discardUrl: false, + nocache: false, + text: "Loading...", + timeout: 30, + scripts: false +});</code></pre> +The only required property is url. The optional properties nocache, text and scripts +are shorthand for disableCaching, indicatorText and loadScripts and are used to set their +associated property on this panel Updater instance.<p>An updateable progress bar component. The progress bar supports two different modes: manual and automatic.</p> +<p>In manual mode, you are responsible for showing, updating (via <a ext:cls="Ext.ProgressBar" ext:member="updateProgress" href="output/Ext.ProgressBar.html#updateProgress">updateProgress</a>) and clearing the +progress bar as needed from your own code. This method is most appropriate when you want to show progress +throughout an operation that has predictable points of interest at which you can update the control.</p> +<p>In automatic mode, you simply call <a ext:cls="Ext.ProgressBar" ext:member="wait" href="output/Ext.ProgressBar.html#wait">wait</a> and let the progress bar run indefinitely, only clearing it +once the operation is complete. You can optionally have the progress bar wait for a specific amount of time +and then clear itself. Automatic mode is most appropriate for timed operations or asymchronous operations in +which you have no need for indicating intermediate progress.</p>Updates the progress bar value, and optionally its text. If the text argument is not specified, +any existing text value will be unchanged. To blank out existing text, pass ''. Note that even +if the progress bar value exceeds 1, it will never automatically reset -- you are responsible for +determining when the progress is complete and calling <a ext:cls="Ext.ProgressBar" ext:member="reset" href="output/Ext.ProgressBar.html#reset">reset</a> to clear and/or hide the control.(optional) A floating point value between 0 and 1 (e.g., .5, defaults to 0)(optional) The string to display in the progress text element (defaults to '')Initiates an auto-updating progress bar. A duration can be specified, in which case the progress +bar will automatically reset after a fixed amount of time and optionally call a callback function +if specified. If no duration is passed in, then the progress bar will run indefinitely and must +be manually cleared by calling <a ext:cls="Ext.ProgressBar" ext:member="reset" href="output/Ext.ProgressBar.html#reset">reset</a>. The wait method accepts a config object with +the following properties: +<pre>Property Type Description +---------- ------------ ---------------------------------------------------------------------- +duration Number The length of time in milliseconds that the progress bar should + run before resetting itself (defaults to undefined, in which case it + will run indefinitely until reset is called) +interval Number The length of time in milliseconds between each progress update + (defaults to 1000 ms) +increment Number The number of progress update segments to display within the progress + bar (defaults to 10). If the bar reaches the end and is still + updating, it will automatically wrap back to the beginning. +fn Function A callback function to execute after the progress bar finishes auto- + updating. The function will be called with no arguments. This function + will be ignored if duration is not specified since in that case the + progress bar can only be stopped programmatically, so any required function + should be called by the same code after it resets the progress bar. +scope Object The scope that is passed to the callback function (only applies when + duration and fn are both passed).</pre> +Example usage: +<pre><code>var p = new Ext.ProgressBar({ + renderTo: 'my-el' +}); + +//Wait for 5 seconds, then update the status el (progress bar will auto-reset) +p.wait({ + interval: 100, //bar will move fast! + duration: 5000, + increment: 15, + scope: this, + fn: function(){ + Ext.fly('status').update('Done!'); + } +}); + +//Or update indefinitely until some async action completes, then reset manually +p.wait(); +myAction.on('complete', function(){ + p.reset(); + Ext.fly('status').update('Done!'); +});</code></pre>(optional) Configuration optionsReturns true if the progress bar is currently in a <a ext:cls="Ext.ProgressBar" ext:member="wait" href="output/Ext.ProgressBar.html#wait">wait</a> operationUpdates the progress bar text. If specified, textEl will be updated, otherwise the progress +bar itself will display the updated text.(optional) The string to display in the progress text element (defaults to '')Sets the size of the progress bar.The new width in pixelsThe new height in pixelsResets the progress bar value to 0 and text to empty string. If hide = true, the progress +bar will also be hidden (using the <a ext:cls="Ext.ProgressBar" ext:member="hideMode" href="output/Ext.ProgressBar.html#hideMode">hideMode</a> property internally).(optional) True to hide the progress bar (defaults to false)A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global +<a ext:cls="Ext.QuickTips" href="output/Ext.QuickTips.html">Ext.QuickTips</a> instance.Create a new TipThe configuration optionsConfigures a new quick tip instance and assigns it to a target element. The following config options +are supported: +<pre>Property Type Description +---------- --------------------- ------------------------------------------------------------------------ +target Element/String/Array An Element, id or array of ids that this quick tip should be tied to</pre>The config objectRemoves this quick tip from its element and destroys it.The element from which the quick tip is to be removed.The global QuickTips instance that reads quick tip configs from existing markup and manages quick tips.<br><br><i>This class is a singleton and cannot be created directly.</i>Initialize the global QuickTips instance and prepare any quick tips.Enable quick tips globally.Disable quick tips globally.Returns true if quick tips are enabled, else false.<p>Applies drag handles to an element to make it resizable. The drag handles are inserted into the element +and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap +the textarea in a div and set "resizeChild" to true (or to the id of the element), <b>or</b> set wrap:true in your config and +the element will be wrapped for you automatically.</p> +<p>Here is the list of valid resize handles:</p> +<pre>Value Description ------ ------------------- 'n' north 's' south 'e' east 'w' west 'nw' northwest 'sw' southwest 'se' southeast 'ne' northeast 'all' all</pre> +<p>Here's an example showing the creation of a typical Resizable:</p> +<pre><code>var resizer = new Ext.Resizable("element-id", { handles: 'all', minWidth: 200, minHeight: 100, maxWidth: 500, maxHeight: 400, pinned: true }); resizer.on("resize", myHandler);</code></pre> +<p>To hide a particular handle, set its display to none in CSS, or through script:<br> +resizer.east.setDisplayed(false);</p>Create a new resizable componentThe id or element to resizeconfiguration options +Perform a manual resizeSimple class that can provide a shadow effect for any element. Note that the element MUST be absolutely positioned, +and the shadow does not provide any shimming. This should be used only in simple cases -- for more advanced +functionality that can also provide the same shadow effect, see the <a ext:cls="Ext.Layer" href="output/Ext.Layer.html">Ext.Layer</a> class.Create a new ShadowThe config objectDisplays the shadow under the target elementThe id or element under which the shadow should displayReturns true if the shadow is visible, else falseDirect alignment when values are already available. Show must be called at least once before +calling this method to ensure it is initialized.The target element left positionThe target element top positionThe target element widthThe target element heightHides this shadowAdjust the z-index of this shadowThe new z-indexCreates draggable splitter bar functionality from two elements (element to be dragged and element to be resized). +<br><br> +Usage: +<pre><code>var split = new Ext.SplitBar("elementToDrag", "elementToSize", + Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT); +split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container")); +split.minSize = 100; +split.maxSize = 600; +split.animate = true; +split.on('moved', splitterMoved);</code></pre>Create a new SplitBarThe element to be dragged and act as the SplitBar.The element to be resized based on where the SplitBar element is dragged(optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL)(optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or + Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial + position of the SplitBar).The minimum size of the resizing element. (Defaults to 0)The maximum size of the resizing element. (Defaults to 2000)Whether to animate the transition to the new sizeWhether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.Get the adapter this SplitBar usesSet the adapter this SplitBar usesA SplitBar adapter objectGets the minimum size for the resizing elementSets the minimum size for the resizing elementThe minimum sizeGets the maximum size for the resizing elementSets the maximum size for the resizing elementThe maximum sizeSets the initialize size for the resizing elementThe initial sizeDestroy this splitbar.True to remove the elementAdapter that moves the splitter element to align with the resized sizing element. +Used with an absolute positioned SplitBar.&lt;static&gt; Orientation constant - Create a vertical SplitBar&lt;static&gt; Orientation constant - Create a horizontal SplitBar&lt;static&gt; Placement constant - The resizing element is to the left of the splitter element&lt;static&gt; Placement constant - The resizing element is to the right of the splitter element&lt;static&gt; Placement constant - The resizing element is positioned above the splitter element&lt;static&gt; Placement constant - The resizing element is positioned under splitter elementDefault Adapter. It assumes the splitter and resizing element are not positioned +elements and only gets/sets the width of the element. Generally used for table based layouts.Called before drag operations to get the current size of the resizing element.The SplitBar using this adapterCalled after drag operations to set the size of the resizing element.The SplitBar using this adapterThe new size to setA function to be invoked when resizing is completeA split button that provides a built-in dropdown arrow that can fire an event separately from the default +click event of the button. Typically this would be used to display a dropdown menu that provides additional +options to the primary button action, but any custom handler can provide the arrowclick implementation.Create a new menu buttonThe config objectSets this button's arrow click handlerThe function to call when the arrow is clicked(optional) Scope for the function passed aboveThe default global group of stores.<br><br><i>This class is a singleton and cannot be created directly.</i>Gets a registered Store by idThe id of the Store or a Store<p>A basic tab container. Tab panels can be used exactly like a standard <a ext:cls="Ext.Panel" href="output/Ext.Panel.html">Ext.Panel</a> for layout +purposes, but also have special support for containing child Panels that get automatically converted into tabs.</p> +<p>There is no actual tab class &mdash; each tab is simply an <a ext:cls="Ext.Panel" href="output/Ext.Panel.html">Ext.Panel</a>. However, when rendered in a +TabPanel, each child Panel can fire additional events that only exist for tabs and are not available to other +Panels. These are:</p> +<ul> +<li><b>activate</b>: Fires when this Panel becomes the active tab. +<div class="mdetail-params"> +<strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong> +<ul><li><code>tab</code> : Panel<div class="sub-desc">The tab that was activated</div></li></ul> +</div></li> +<li><b>deactivate</b>: Fires when this Panel that was the active tab becomes deactivated. +<div class="mdetail-params"> +<strong style="font-weight: normal;">Listeners will be called with the following arguments:</strong> +<ul><li><code>tab</code> : Panel<div class="sub-desc">The tab that was deactivated</div></li></ul> +</div></li> +</ul> +<p>There are several methods available for creating TabPanels. The output of the following examples should be +exactly the same. The tabs can be created and rendered completely in code, as in this example:</p> +<pre><code> +var tabs = new Ext.TabPanel({ + renderTo: Ext.getBody(), + activeTab: 0, + items: [{ + title: 'Tab 1', + html: 'A simple tab' + },{ + title: 'Tab 2', + html: 'Another one' + }] +});</pre></code> +<p>TabPanels can also be rendered from markup in a couple of ways. See the <a ext:cls="Ext.TabPanel" ext:member="autoTabs" href="output/Ext.TabPanel.html#autoTabs">autoTabs</a> example for +rendering entirely from markup that is already structured correctly as a TabPanel (a container div with +one or more nested tab divs with class 'x-tab'). You can also render from markup that is not strictly +structured by simply specifying by id which elements should be the container and the tabs. Using this method, +tab content can be pulled from different elements within the page by id regardless of page structure. Note +that the tab divs in this example contain the class 'x-hide-display' so that they can be rendered deferred +without displaying outside the tabs. You could alternately set <a ext:cls="Ext.TabPanel" ext:member="deferredRender" href="output/Ext.TabPanel.html#deferredRender">deferredRender</a> to false to render all +content tabs on page load. For example: +<pre><code> +var tabs = new Ext.TabPanel({ + renderTo: 'my-tabs', + activeTab: 0, + items:[ + {contentEl:'tab1', title:'Tab 1'}, + {contentEl:'tab2', title:'Tab 2'} + ] +}); + +// Note that the tabs do not have to be nested within the container (although they can be) +&lt;div id="my-tabs">&lt;/div> +&lt;div id="tab1" class="x-hide-display">A simple tab&lt;/div> +&lt;div id="tab2" class="x-hide-display">Another one&lt;/div></pre></code>The configuration optionsTrue to scan the markup in this tab panel for autoTabs using the autoTabSelectorTrue to remove existing tabsGets the DOM element for a specified tab.The tabSuspends any internal calculations or scrolling while doing a bulk operation. See <a ext:cls="Ext.TabPanel" ext:member="endUpdate" href="output/Ext.TabPanel.html#endUpdate">endUpdate</a>Resumes calculations and scrolling at the end of a bulk operation. See <a ext:cls="Ext.TabPanel" ext:member="beginUpdate" href="output/Ext.TabPanel.html#beginUpdate">beginUpdate</a>Hides the tab strip item for the passed tabThe tab index, id or itemUnhides the tab strip item for the passed tabThe tab index, id or itemSets the specified tab as the active tab. This method fires the <a ext:cls="Ext.TabPanel" ext:member="beforetabchange" href="output/Ext.TabPanel.html#beforetabchange">beforetabchange</a> event which +can return false to cancel the tab change.The id or tab Panel to activateGets the currently active tab.Gets the specified tab by id.The tab idScrolls to a particular tab if tab scrolling is enabledThe item to scroll toTrue to enable animationsSets the specified tab as the active tab. This method fires the <a ext:cls="Ext.TabPanel" ext:member="beforetabchange" href="output/Ext.TabPanel.html#beforetabchange">beforetabchange</a> event which +can return false to cancel the tab change.The id or tab Panel to activateA static <a ext:cls="Ext.util.TaskRunner" href="output/Ext.util.TaskRunner.html">Ext.util.TaskRunner</a> instance that can be used to start and stop arbitrary tasks. See +<a ext:cls="Ext.util.TaskRunner" href="output/Ext.util.TaskRunner.html">Ext.util.TaskRunner</a> for supported methods and task config properties. +<pre><code>// Start a simple clock task that updates a div once per second +var task = { + run: function(){ + Ext.fly('clock').update(new Date().format('g:i:s A')); + }, + interval: 1000 //1 second +} +Ext.TaskMgr.start(task);</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i>Represents an HTML fragment template. Templates can be precompiled for greater performance. +For a list of available format functions, see <a ext:cls="Ext.util.Format" href="output/Ext.util.Format.html">Ext.util.Format</a>.<br /> +Usage: +<pre><code>var t = new Ext.Template( + '&lt;div name="{id}"&gt;', + '&lt;span class="{cls}"&gt;{name:trim} {value:ellipsis(10)}&lt;/span&gt;', + '&lt;/div&gt;' +); +t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});</code></pre> +For more information see this blog post with examples: <a href="http://www.jackslocum.com/blog/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">DomHelper - Create Elements using DOM, HTML fragments and Templates</a>.The HTML fragment or an array of fragments to join("") or multiple arguments to join("")True to disable format functions (defaults to false)The regular expression used to match template variablesReturns an HTML fragment of this template with the specified values applied.The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})Sets the HTML used as the template and optionally compiles it.(optional) True to compile the template (defaults to undefined)Compiles the template into an internal function, eliminating the RegEx overhead.Applies the supplied values to the template and inserts the new node(s) as the first child of el.The context elementThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})(optional) true to return a Ext.Element (defaults to undefined)Applies the supplied values to the template and inserts the new node(s) before el.The context elementThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})(optional) true to return a Ext.Element (defaults to undefined)Applies the supplied values to the template and inserts the new node(s) after el.The context elementThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})(optional) true to return a Ext.Element (defaults to undefined)Applies the supplied values to the template and appends the new node(s) to el.The context elementThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})(optional) true to return a Ext.Element (defaults to undefined)Applies the supplied values to the template and overwrites the content of el with the new node(s).The context elementThe template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})(optional) true to return a Ext.Element (defaults to undefined)Alias for <a ext:cls="Ext.Template" ext:member="applyTemplate" href="output/Ext.Template.html#applyTemplate">applyTemplate</a>&lt;static&gt; Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.A DOM element or its idA configuration objectThis is the base class for <a ext:cls="Ext.QuickTip" href="output/Ext.QuickTip.html">Ext.QuickTip</a> and <a ext:cls="Ext.Tooltip" href="output/Ext.Tooltip.html">Ext.Tooltip</a> that provides the basic layout and +positioning that all tip-based classes require. This class can be used directly for simple, statically-positioned +tips that are displayed programmatically, or it can be extended to provide custom tip implementations.Create a new TipThe configuration optionsShows this tip at the specified XY position. Example usage: +<pre><code>// Show the tip at x:50 and y:100 +tip.showAt([50,100]);</code></pre>An array containing the x and y coordinatesShows this tip at a position relative to another element using a standard <a ext:cls="Ext.Element" ext:member="alignTo" href="output/Ext.Element.html#alignTo">Ext.Element.alignTo</a> +anchor position value. Example usage: +<pre><code>// Show the tip at the default position ('tl-br?') +tip.showBy('my-el'); + +// Show the tip's top-left corner anchored to the element's top-right corner +tip.showBy('my-el', 'tl-tr');</code></pre>An HTMLElement, Ext.Element or string id of the target element to align to(optional) A valid <a ext:cls="Ext.Element" ext:member="alignTo" href="output/Ext.Element.html#alignTo">Ext.Element.alignTo</a> anchor position (defaults to 'tl-br?')A standard tooltip implementation for providing additional information when hovering over a target element.Create a new TooltipThe configuration optionsHides this tooltip if visible.Shows this tooltip at the current event target XY position.Basic Toolbar class.Creates a new ToolbarA config object or an array of buttons to addAdds element(s) to the toolbar -- this function takes a variable number of +arguments of mixed type and adds them to the toolbar.The following types of arguments are all valid:<br /> +<ul> +<li><a ext:cls="Ext.Toolbar.Button" href="output/Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> config: A valid button config object (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addButton" href="output/Ext.Toolbar.html#addButton">addButton</a>)</li> +<li>HtmlElement: Any standard HTML element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addElement" href="output/Ext.Toolbar.html#addElement">addElement</a>)</li> +<li>Field: Any form field (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addField" href="output/Ext.Toolbar.html#addField">addField</a>)</li> +<li>Item: Any subclass of <a ext:cls="Ext.Toolbar.Item" href="output/Ext.Toolbar.Item.html">Ext.Toolbar.Item</a> (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addItem" href="output/Ext.Toolbar.html#addItem">addItem</a>)</li> +<li>String: Any generic string (gets wrapped in a <a ext:cls="Ext.Toolbar.TextItem" href="output/Ext.Toolbar.TextItem.html">Ext.Toolbar.TextItem</a>, equivalent to <a ext:cls="Ext.Toolbar" ext:member="addText" href="output/Ext.Toolbar.html#addText">addText</a>). +Note that there are a few special strings that are treated differently as explained next.</li> +<li>'separator' or '-': Creates a separator element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addSeparator" href="output/Ext.Toolbar.html#addSeparator">addSeparator</a>)</li> +<li>' ': Creates a spacer element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addSpacer" href="output/Ext.Toolbar.html#addSpacer">addSpacer</a>)</li> +<li>'->': Creates a fill element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addFill" href="output/Ext.Toolbar.html#addFill">addFill</a>)</li> +</ul>Adds a separatorAdds a spacer elementAdds a fill element that forces subsequent additions to the right side of the toolbarAdds any standard HTML element to the toolbarThe element or id of the element to addAdds any Toolbar.Item or subclassAdds a button (or buttons). See <a ext:cls="Ext.Toolbar.Button" href="output/Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> for more info on the config.A button config or array of configsAdds text to the toolbarThe text to addInserts any <a ext:cls="Ext.Toolbar.Item" href="output/Ext.Toolbar.Item.html">Ext.Toolbar.Item</a>/<a ext:cls="Ext.Toolbar.Button" href="output/Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> at the specified index.The index where the item is to be insertedbe Array)} item The button, or button config object to be inserted.Adds a new element to the toolbar from the passed <a ext:cls="Ext.DomHelper" href="output/Ext.DomHelper.html">Ext.DomHelper</a> configAdds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have +been rendered yet. For a field that has already been rendered, use <a ext:cls="Ext.Toolbar" ext:member="addElement" href="output/Ext.Toolbar.html#addElement">addElement</a>.A button that renders into a toolbar.Creates a new ButtonA standard <a ext:cls="Ext.Button" href="output/Ext.Button.html">Ext.Button</a> config objectA simple element that adds a greedy (100% width) horizontal space to a toolbar.Creates a new SpacerThe base class that other classes should extend in order to get some basic common toolbar item functionality.Creates a new ItemGet this item's HTML ElementRemoves and destroys this item.Shows this item.Hides this item.Convenience function for boolean show/hide.true to show/false to hideTry to focus this itemDisables this item.Enables this item.A simple toolbar separator classCreates a new SeparatorA simple element that adds extra horizontal space to a toolbar.Creates a new SpacerA menu button that renders into a toolbar.Creates a new SplitButtonA standard <a ext:cls="Ext.SplitButton" href="output/Ext.SplitButton.html">Ext.SplitButton</a> config objectA simple class that renders text directly into a toolbar.Creates a new TextItemProvides AJAX-style update for Element object.<br><br> +Usage:<br> +<pre><code>// Get it from a Ext.Element object +var el = Ext.get("foo"); +var mgr = el.getUpdater(); +mgr.update("http://myserver.com/index.php", "param1=1&amp;param2=2"); +... +mgr.formUpdate("myFormId", "http://myserver.com/index.php"); +<br> +// or directly (returns the same Updater instance) +var mgr = new Ext.Updater("myElementId"); +mgr.startAutoRefresh(60, "http://myserver.com/index.php"); +mgr.on("update", myFcnNeedsToKnow); +<br> + // short handed call directly from the element object + Ext.get("foo").load({ + url: "bar.php", + scripts:true, + params: "for=bar", + text: "Loading Foo..." + });</code></pre>Create new Updater directly.The element to update(optional) By default the constructor checks to see if the passed element already has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class).The Element objectCached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true.Blank page URL to use with SSL file uploads (Defaults to Ext.Updater.defaults.sslBlankUrl or "about:blank").Whether to append unique parameter on get request to disable caching (Defaults to Ext.Updater.defaults.disableCaching or false).Text for loading indicator (Defaults to Ext.Updater.defaults.indicatorText or '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;').Whether to show indicatorText when loading (Defaults to Ext.Updater.defaults.showLoadIndicator or true).Timeout for requests or form posts in seconds (Defaults to Ext.Updater.defaults.timeout or 30 seconds).True to process scripts in the output (Defaults to Ext.Updater.defaults.loadScripts (false)).Transaction object of current executing transactionDelegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind argumentsDelegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind argumentsDelegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind argumentsThe renderer for this Updater. Defaults to <a ext:cls="Ext.Updater.BasicRenderer" href="output/Ext.Updater.BasicRenderer.html">Ext.Updater.BasicRenderer</a>.Get the Element this Updater is bound toPerforms an <b>asynchronous</b> request, updating this element with the response. +If params are specified it uses POST, otherwise it uses GET.<br> +<p> +<b>NB:</b> Due to the asynchronous nature of remote server requests, the returned data will +not be available to the line immediately following the load() call. To process the returned +data, use the callback option, or an {@link #event-update update} event handler.The url for this request or a function to call to get the url or a config object containing any of the following options: +<pre><code>um.update({ + url: "your-url.php", + params: {param1: "foo", param2: "bar"}, // or a URL encoded string + callback: yourFunction, + scope: yourObject, //(optional scope) + discardUrl: false, + nocache: false, + text: "Loading...", + timeout: 30, + scripts: false +});</code></pre> +The only required property is url. The optional properties nocache, text and scripts +are shorthand for disableCaching, indicatorText and loadScripts and are used to set their associated property on this Updater instance.(optional) The parameters to pass as either a url encoded string "param1=1&amp;param2=2" or an object {param1: 1, param2: 2}(optional) Callback when transaction is complete - called with signature (oElement, bSuccess, oResponse)(optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url.Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipart/form-data", it assumes it's a file upload. +Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.The form Id or form element(optional) The url to pass the form to. If omitted the action attribute on the form will be used.(optional) Whether to try to reset the form after the update(optional) Callback when transaction is complete - called with signature (oElement, bSuccess, oResponse)Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)Set this element to auto refresh.How often to update (in seconds).(optional) The url for this request or a function to call to get the url (Defaults to the last used url)(optional) The parameters to pass as either a url encoded string "&param1=1&param2=2" or as an object {param1: 1, param2: 2}(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)(optional) Whether to execute the refresh now, or wait the intervalStop auto refresh on this element.Called to update the element to "Loading" state. Override to perform custom action.Set the content renderer for this Updater. See <a ext:cls="Ext.Updater.BasicRenderer" ext:member="render" href="output/Ext.Updater.BasicRenderer.html#render">Ext.Updater.BasicRenderer.render</a> for more details.The object implementing the render() methodSet the defaultUrl used for updatesThe url or a function to call to get the urlAborts the executing transactionReturns true if an update is in progress<b>Deprecated.</b> &lt;static&gt; Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}). +Usage: +<pre><code>Ext.Updater.updateElement("my-div", "stuff.php");</code></pre>The element to updateThe url(optional) Url encoded param string or an object of name/value pairs(optional) A config object with any of the Updater properties you want to set - for example: {disableCaching:true, indicatorText: "Loading data..."}Default Content renderer. Updates the elements innerHTML with the responseText.This is called when the transaction is completed and it's time to update the element - The BasicRenderer +updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing), +create an object with a "render(el, response)" method and pass it to setRenderer on the Updater.The element being renderedThe XMLHttpRequest objectThe calling update managerA callback that will need to be called if loadScripts is true on the UpdaterThe defaults collection enables customizing the default properties of UpdaterTimeout for requests or form posts in seconds (Defaults 30 seconds).True to process scripts by default (Defaults to false).Blank page URL to use with SSL file uploads (Defaults to "javascript:false").Whether to append unique parameter on get request to disable caching (Defaults to false).Whether to show indicatorText when loading (Defaults to true).Text for loading indicator (Defaults to '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;').A specialized container representing the viewable application area (the browser viewport). It automatically +sizes itself to the size of the browser viewport and manages window resizing. The Viewport does not provide +scrolling, so layout elements within the Viewport should provide for scrolling if needed.Create a new ViewportThe config objectA specialized panel intended for use as an application window. Windows are floated and draggable by default, and +also provide specific behavior like the ability to maximize and restore (with an event for minimizing, since the +minimize behavior is application-specific). Windows can also be linked to a <a ext:cls="Ext.WindowGroup" href="output/Ext.WindowGroup.html">Ext.WindowGroup</a> or managed +by the <a ext:cls="Ext.WindowManager" href="output/Ext.WindowManager.html">Ext.WindowManager</a> to provide grouping, activation, to front/back and other application-specific behavior.The config objectFocuses the window. If a defaultButton is set, it will receive focus, otherwise the +window itself will receive focus.Sets the target element from which the window should animate while opening.The target element or idShows the window, rendering it first if necessary, or activates it and brings it to front if hidden.(optional) The target element or id from which the window should +animate while opening (defaults to null with no animation)(optional) A callback function to call after the window is displayed(optional) The scope in which to execute the callbackHides the window, setting it to invisible and applying negative offsets.(optional) The target element or id to which the window should +animate while hiding (defaults to null with no animation)(optional) A callback function to call after the window is hidden(optional) The scope in which to execute the callbackPlaceholder method for minimizing the window. By default, this method simply fires the minimize event +since the behavior of minimizing a window is application-specific. To implement custom minimize behavior, +either the minimize event can be handled or this method can be overridden.Closes the window, removes it from the DOM and destroys the window object. The beforeclose event is fired +before the close happens and will cancel the close action if it returns false.Fits the window within its current container and automatically replaces the 'maximize' tool button with +the 'restore' tool button.Restores a maximized window back to its original size and position prior to being maximized and also replaces +the 'restore' tool button with the 'maximize' tool button.A shortcut method for toggling between <a ext:cls="Ext.Window" ext:member="maximize" href="output/Ext.Window.html#maximize">maximize</a> and <a ext:cls="Ext.Window" ext:member="restore" href="output/Ext.Window.html#restore">restore</a> based on the current maximized +state of the window.Aligns the window to the specified elementThe element to align to.The position to align to (see <a ext:cls="Ext.Element" ext:member="alignTo" href="output/Ext.Element.html#alignTo">Ext.Element.alignTo</a> for more details).(optional) Offset the positioning by [x, y]Anchors this window to another element and realigns it when the window is resized or scrolled.The element to align to.The position to align to (see <a ext:cls="Ext.Element" ext:member="alignTo" href="output/Ext.Element.html#alignTo">Ext.Element.alignTo</a> for more details)(optional) Offset the positioning by [x, y](optional) true to monitor body scroll and reposition. If this parameter +is a number, it is used as the buffer delay (defaults to 50ms).Brings this window to the front of any other visible windowsMakes this the active window by showing its shadow, or deactivates it by hiding its shadow. This method also +fires the activate or deactivate event depending on which action occurred.True to activate the window, false to deactivate it (defaults to false)Sends this window to the back of (lower z-index than) any other visible windowsCenters this window in the viewportAn object that represents a grouop of <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> instances and provides z-order management +and window activation behavior.The starting z-index for windows (defaults to 9000)Gets a registered window by id.The id of the window or a <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> instanceBrings the specified window to the front of any other active windows.The id of the window or a <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> instanceSends the specified window to the back of other active windows.The id of the window or a <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> instanceHides all windows in the group.Gets the currently-active window in the group.Returns zero or more windows in the group using the custom search function passed to this method. +The function should accept a single <a ext:cls="Ext.Window" href="output/Ext.Window.html">Ext.Window</a> reference as its only argument and should +return true if the window matches the search criteria, otherwise it should return false.The search function(optional) The scope in which to execute the function (defaults to the window +that gets passed to the function if not specified)Executes the specified function once for every window in the group, passing each +window as the only parameter. Returning false from the function will stop the iteration.The function to execute for each item(optional) The scope in which to execute the functionThe default global window group that is available automatically. To have more than one group of windows +with separate z-order stacks, create additional instances of <a ext:cls="Ext.WindowGroup" href="output/Ext.WindowGroup.html">Ext.WindowGroup</a> as needed.<br><br><i>This class is a singleton and cannot be created directly.</i>A template class that supports advanced functionality like autofilling arrays, conditional processing with +basic comparison operators, sub-templates, basic math function support, special built-in template variables, +inline code execution and more.The HTML fragment or an array of fragments to join("") or multiple arguments to join("")Alias of <a ext:cls="Ext.XTemplate" ext:member="applyTemplate" href="output/Ext.XTemplate.html#applyTemplate">applyTemplate</a>.Returns an HTML fragment of this template with the specified values applied.The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})Compile the template to a function for optimized performance. Recommended if the template will be used frequently.&lt;static&gt; Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.A DOM element or its idData reader class to create an Array of Ext.data.Record objects from an Array. +Each element of that Array represents a row of data fields. The +fields are pulled into a Record object using as a subscript, the <em>mapping</em> property +of the field definition if it exists, or the field's ordinal position in the definition.<br> +<p> +Example code:. +<pre><code>var Employee = Ext.data.Record.create([ + {name: 'name', mapping: 1}, // "mapping" only needed if an "id" field is present which + {name: 'occupation', mapping: 2} // precludes using the ordinal position as the index. +]); +var myReader = new Ext.data.ArrayReader({ + id: 0 // The subscript within row Array that provides an ID for the Record (optional) +}, Employee);</code></pre> +<p> +This would consume an Array like this: +<pre><code>[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]</code></pre>Create a new ArrayReaderMetadata configuration options.Either an Array of field definition objects +as specified to <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>, +or an <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> object +created using <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>.Create a data block containing Ext.data.Records from an XML document.An Array of row objects which represents the dataset.The class encapsulates a connection to the page's originating domain, allowing requests to be made +either to a configured URL, or to a URL specified at request time.<br><br> +<p> +Requests made by this class are asynchronous, and will return immediately. No data from +the server will be available to the statement immediately following the <a ext:cls="Ext.data.Connection" ext:member="request" href="output/Ext.data.Connection.html#request">request</a> call. +To process returned data, use a callback in the request options object, or an event listener.</p><br> +<p> +Note: If you are doing a file upload, you will not get a normal response object sent back to +your callback or event handler. Since the upload is handled via in IFRAME, there is no XMLHttpRequest. +The response object is created using the innerHTML of the IFRAME's document as the responseText +property and, if present, the IFRAME's XML document as the responseXML property.</p><br> +This means that a valid XML or HTML document must be returned. If JSON data is required, it is suggested +that it be placed either inside a &lt;textarea> in an HTML document and retrieved from the responseText +using a regex, or inside a CDATA section in an XML document and retrieved from the responseXML using +standard DOM methods.a configuration object.Sends an HTTP request to a remote server.An object which may contain the following properties:<ul> +<li><b>url</b> {String} (Optional) The URL to which to send the request. Defaults to configured URL</li> +<li><b>params</b> {Object/String/Function} (Optional) An object containing properties which are used as parameters to the +request, a url encoded string or a function to call to get either.</li> +<li><b>method</b> {String} (Optional) The HTTP method to use for the request. Defaults to the configured method, or +if no method was configured, "GET" if no parameters are being sent, and "POST" if parameters are being sent.</li> +<li><b>callback</b> {Function} (Optional) The function to be called upon receipt of the HTTP response. +The callback is called regardless of success or failure and is passed the following parameters:<ul> +<li>options {Object} The parameter to the request call.</li> +<li>success {Boolean} True if the request succeeded.</li> +<li>response {Object} The XMLHttpRequest object containing the response data.</li> +</ul></li> +<li><b>success</b> {Function} (Optional) The function to be called upon success of the request. +The callback is passed the following parameters:<ul> +<li>response {Object} The XMLHttpRequest object containing the response data.</li> +<li>options {Object} The parameter to the request call.</li> +</ul></li> +<li><b>failure</b> {Function} (Optional) The function to be called upon failure of the request. +The callback is passed the following parameters:<ul> +<li>response {Object} The XMLHttpRequest object containing the response data.</li> +<li>options {Object} The parameter to the request call.</li> +</ul></li> +<li><b>scope</b> {Object} (Optional) The scope in which to execute the callbacks: The "this" object +for the callback function. Defaults to the browser window.</li> +<li><b>form</b> {Object/String} (Optional) A form object or id to pull parameters from.</li> +<li><b>isUpload</b> {Boolean} (Optional) True if the form object is a file upload (will usually be automatically detected).</li> +<li><b>headers</b> {Object} (Optional) Request headers to set for the request.</li> +<li><b>xmlData</b> {Object} (Optional) XML document to use for the post. Note: This will be used instead of +params for the post data. Any params will be appended to the URL.</li> +<li><b>disableCaching</b> {Boolean} (Optional) True to add a unique cache-buster param to GET requests.</li> +</ul>Determine whether this object has a request outstanding.(Optional) defaults to the last transactionAborts any outstanding request.(Optional) defaults to the last transactionThis class is an abstract base class for implementations which provide retrieval of +unformatted data objects.<br> +<p> +DataProxy implementations are usually used in conjunction with an implementation of Ext.data.DataReader +(of the appropriate type which knows how to parse the data object) to provide a block of +<a ext:cls="Ext.data.Records" href="output/Ext.data.Records.html">Ext.data.Records</a> to an <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>.<br> +<p> +Custom implementations must implement the load method as described in +<a ext:cls="Ext.data.HttpProxy" ext:member="load" href="output/Ext.data.HttpProxy.html#load">Ext.data.HttpProxy.load</a>.Abstract base class for reading structured data from a data source and converting +it into an object containing <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> objects and metadata for use +by an <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>. This class is intended to be extended and should not +be created directly. For existing implementations, see <a ext:cls="Ext.data.ArrayReader" href="output/Ext.data.ArrayReader.html">Ext.data.ArrayReader</a>, +<a ext:cls="Ext.data.JsonReader" href="output/Ext.data.JsonReader.html">Ext.data.JsonReader</a> and <a ext:cls="Ext.data.XmlReader" href="output/Ext.data.XmlReader.html">Ext.data.XmlReader</a>.Create a new DataReaderMetadata configuration options (implementation-specific)Either an Array of field definition objects as specified +in <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>, or an <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> object created +using <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>.A specialized store implementation that provides for grouping records by one of the available fields.Creates a new GroupingStore.A config object containing the objects needed for the Store to access data, +and read the data into Records.Clears any existing grouping and refreshes the data using the default sort.Groups the data by the specified field.The field name by which to sort the store's data(optional) True to force the group to be refreshed even if the field passed +in is the same as the current grouping field, false to skip grouping on the same field (defaults to false)An implementation of <a ext:cls="Ext.data.DataProxy" href="output/Ext.data.DataProxy.html">Ext.data.DataProxy</a> that reads a data object from an <a ext:cls="Ext.data.Connection" href="output/Ext.data.Connection.html">Ext.data.Connection</a> object +configured to reference a certain URL.<br><br> +<p> +<em>Note that this class cannot be used to retrieve data from a domain other than the domain +from which the running page was served.<br><br> +<p> +For cross-domain access to remote data, use an <a ext:cls="Ext.data.ScriptTagProxy" href="output/Ext.data.ScriptTagProxy.html">Ext.data.ScriptTagProxy</a>.</em><br><br> +<p> +Be aware that to enable the browser to parse an XML document, the server must set +the Content-Type header in the HTTP response to "text/xml".Connection config options to add to each request (e.g. {url: 'foo.php'} or +an <a ext:cls="Ext.data.Connection" href="output/Ext.data.Connection.html">Ext.data.Connection</a> object. If a Connection config is passed, the singleton <a ext:cls="Ext.Ajax" href="output/Ext.Ajax.html">Ext.Ajax</a> object +will be used to make the request.Return the <a ext:cls="Ext.data.Connection" href="output/Ext.data.Connection.html">Ext.data.Connection</a> object being used by this Proxy.Load data from the configured <a ext:cls="Ext.data.Connection" href="output/Ext.data.Connection.html">Ext.data.Connection</a>, read the data object into +a block of Ext.data.Records using the passed <a ext:cls="Ext.data.DataReader" href="output/Ext.data.DataReader.html">Ext.data.DataReader</a> implementation, and +process that block using the passed callback.An object containing properties which are to be used as HTTP parameters +for the request to the remote server.The Reader object which converts the data +object into a block of Ext.data.Records.The function into which to pass the block of Ext.data.Records. +The function must be passed <ul> +<li>The Record block object</li> +<li>The "arg" argument from the load function</li> +<li>A boolean success indicator</li> +</ul>The scope in which to call the callbackAn optional argument which is passed to the callback as its second parameter.Data reader class to create an Array of Ext.data.Record objects from a JSON response +based on mappings in a provided Ext.data.Record constructor.<br> +<p> +Example code: +<pre><code>var Employee = Ext.data.Record.create([ + {name: 'name', mapping: 'name'}, // "mapping" property not needed if it's the same as "name" + {name: 'occupation'} // This field will use "occupation" as the mapping. +]); +var myReader = new Ext.data.JsonReader({ + totalProperty: "results", // The property which contains the total dataset size (optional) + root: "rows", // The property which contains an Array of row objects + id: "id" // The property within each row object that provides an ID for the record (optional) +}, Employee);</code></pre> +<p> +This would consume a JSON file like this: +<pre><code>{ 'results': 2, 'rows': [ + { 'id': 1, 'name': 'Bill', occupation: 'Gardener' }, + { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' } ] +}</code></pre>Create a new JsonReaderMetadata configuration optionsEither an Array of field definition objects, +or an <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> object created using <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>.After any data loads, the raw JSON data is available for further custom processing. If no data is +loaded or there is a load exception this property will be undefined.This method is only used by a DataProxy which has retrieved data from a remote server.The XHR object which contains the JSON data in its responseText.Create a data block containing Ext.data.Records from an XML document.An object which contains an Array of row objects in the property specified +in the config as 'root, and optionally a property, specified in the config as 'totalProperty' +which contains the total size of the dataset.Small helper class to make creating Stores for JSON data easier. <br/> +<pre><code>var store = new Ext.data.JsonStore({ + url: 'get-images.php', + root: 'images', + fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}] +});</code></pre> +<b>Note: Although they are not listed, this class inherits all of the config options of Store, +JsonReader and HttpProxy (unless inline data is provided).</b>An implementation of Ext.data.DataProxy that simply passes the data specified in its constructor +to the Reader when its load method is called.The data object which the Reader uses to construct a block of Ext.data.Records.Load data from the requested source (in this case an in-memory +data object passed to the constructor), read the data object into +a block of Ext.data.Records using the passed Ext.data.DataReader implementation, and +process that block using the passed callback.This parameter is not used by the MemoryProxy class.The Reader object which converts the data +object into a block of Ext.data.Records.The function into which to pass the block of Ext.data.records. +The function must be passed <ul> +<li>The Record block object</li> +<li>The "arg" argument from the load function</li> +<li>A boolean success indicator</li> +</ul>The scope in which to call the callbackAn optional argument which is passed to the callback as its second parameter.The attributes/config for the nodeThe attributes supplied for the node. You can use this property to access any custom attributes you supplied.The node id.All child nodes of this node.The parent node for this node.The first direct child node of this node, or null if this node has no child nodes.The last direct child node of this node, or null if this node has no child nodes.The node immediately preceding this node in the tree, or null if there is no sibling node.The node immediately following this node in the tree, or null if there is no sibling node.Returns true if this node is a leafReturns true if this node is the last child of its parentReturns true if this node is the first child of its parentInsert node(s) as the last child node of this node.The node or Array of nodes to appendRemoves a child node from this node.The node to removeInserts the first node before the second node in this nodes childNodes collection.The node to insertThe node to insert before (if null the node is appended)Removes this node from it's parentReturns the child node at the specified index.Replaces one child node in this node with another.The replacement nodeThe node to replaceReturns the index of a child nodeReturns the tree this node is in.Returns depth of this node (the root node has a depth of 0)Returns the path for this node. The path can be used to expand or select this node programmatically.(optional) The attr to use for the path (defaults to the node's id)Bubbles up the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of +function call will be the scope provided or the current node. The arguments to the function +will be the args provided or the current node. If the function returns false at any point, +the bubble is stopped.The function to call(optional) The scope of the function (defaults to current node)(optional) The args to call the function with (default to passing the current node)Cascades down the tree from this node, calling the specified function with each node. The scope (<i>this</i>) of +function call will be the scope provided or the current node. The arguments to the function +will be the args provided or the current node. If the function returns false at any point, +the cascade is stopped on that branch.The function to call(optional) The scope of the function (defaults to current node)(optional) The args to call the function with (default to passing the current node)Interates the child nodes of this node, calling the specified function with each node. The scope (<i>this</i>) of +function call will be the scope provided or the current node. The arguments to the function +will be the args provided or the current node. If the function returns false at any point, +the iteration stops.The function to call(optional) The scope of the function (defaults to current node)(optional) The args to call the function with (default to passing the current node)Finds the first child that has the attribute with the specified value.The attribute nameThe value to search forFinds the first child by a custom function. The child matches if the function passed +returns true.(optional)Sorts this nodes children using the supplied sort function(optional)Returns true if this node is an ancestor (at any point) of the passed node.Returns true if the passed node is an ancestor (at any point) of this node.Instances of this class encapsulate both record <em>definition</em> information, and record +<em>value</em> information for use in <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> objects, or any code which needs +to access Records cached in an <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> object.<br> +<p> +Constructors for this class are generated by passing an Array of field definition objects to <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">create</a>. +Instances are usually only created by <a ext:cls="Ext.data.Reader" href="output/Ext.data.Reader.html">Ext.data.Reader</a> implementations when processing unformatted data +objects.<br> +<p> +Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below.This constructor should not be used to create Record objects. Instead, use the constructor generated by +<a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">create</a>. The parameters are the same.An associative Array of data values keyed by the field name.(Optional) The id of the record. This id should be unique, and is used by the +<a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> object which owns the Record to index its collection of Records. If +not specified an integer id is generated.The data for this record an object hash. +The unique ID of the record as specified at construction time. +Readonly flag - true if this record has been modified.This object contains a key and value storing the original values of all modified fields or is null if no fields have been modified.&lt;static&gt; Generate a constructor for a specific record layout.An Array of field definition objects which specify field names, and optionally, +data types, and a mapping for an <a ext:cls="Ext.data.Reader" href="output/Ext.data.Reader.html">Ext.data.Reader</a> to extract the field's value from a data object. +Each field definition object may contain the following properties: <ul> +<li><b>name</b> : String<p style="margin-left:1em">The name by which the field is referenced within the Record. This is referenced by, +for example the <em>dataIndex</em> property in column definition objects passed to <a ext:cls="Ext.grid.ColumnModel" href="output/Ext.grid.ColumnModel.html">Ext.grid.ColumnModel</a></p></li> +<li><b>mapping</b> : String<p style="margin-left:1em">(Optional) A path specification for use by the <a ext:cls="Ext.data.Reader" href="output/Ext.data.Reader.html">Ext.data.Reader</a> implementation +that is creating the Record to access the data value from the data object. If an <a ext:cls="Ext.data.JsonReader" href="output/Ext.data.JsonReader.html">Ext.data.JsonReader</a> +is being used, then this is a string containing the javascript expression to reference the data relative to +the record item's root. If an <a ext:cls="Ext.data.XmlReader" href="output/Ext.data.XmlReader.html">Ext.data.XmlReader</a> is being used, this is an <a ext:cls="Ext.DomQuery" href="output/Ext.DomQuery.html">Ext.DomQuery</a> path +to the data item relative to the record element. If the mapping expression is the same as the field name, +this may be omitted.</p></li> +<li><b>type</b> : String<p style="margin-left:1em">(Optional) The data type for conversion to displayable value. Possible values are +<ul><li>auto (Default, implies no conversion)</li> +<li>string</li> +<li>int</li> +<li>float</li> +<li>boolean</li> +<li>date</li></ul></p></li> +<li><b>sortType</b> : Mixed<p style="margin-left:1em">(Optional) A member of <a ext:cls="Ext.data.SortTypes" href="output/Ext.data.SortTypes.html">Ext.data.SortTypes</a>.</p></li> +<li><b>sortDir</b> : String<p style="margin-left:1em">(Optional) Initial direction to sort. "ASC" or "DESC"</p></li> +<li><b>convert</b> : Function<p style="margin-left:1em">(Optional) A function which converts the value provided +by the Reader into an object that will be stored in the Record. It is passed the +following parameters:<ul> +<li><b>v</b> : Mixed<p style="margin-left:1em">The data value as read by the Reader.</p></li> +</ul></p></li> +<li><b>dateFormat</b> : String<p style="margin-left:1em">(Optional) A format String for the Date.parseDate function.</p></li> +</ul> +<br>usage:<br><pre><code>var TopicRecord = Ext.data.Record.create( + {name: 'title', mapping: 'topic_title'}, + {name: 'author', mapping: 'username'}, + {name: 'totalPosts', mapping: 'topic_replies', type: 'int'}, + {name: 'lastPost', mapping: 'post_time', type: 'date'}, + {name: 'lastPoster', mapping: 'user2'}, + {name: 'excerpt', mapping: 'post_text'} +); + +var myNewRecord = new TopicRecord({ + title: 'Do my job please', + author: 'noobie', + totalPosts: 1, + lastPost: new Date(), + lastPoster: 'Animal', + excerpt: 'No way dude!' +}); +myStore.add(myNewRecord);</code></pre>Set the named field to the specified value.The name of the field to set.The value to set the field to.Get the value of the named field.The name of the field to get the value of.Begin an edit. While in edit mode, no events are relayed to the containing store.Cancels all changes made in the current edit operation.End an edit. If any data was modified, the containing store is notified.Usually called by the <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> which owns the Record. +Rejects all changes made to the Record since either creation, or the last commit operation. +Modified fields are reverted to their original values. +<p> +Developers should subscribe to the <a ext:cls="Ext.data.Store" ext:member="update" href="output/Ext.data.Store.html#update">Ext.data.Store.update</a> event to have their code notified +of reject operations.(optional) True to skip notification of the owning store of the change (defaults to false)Usually called by the <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> which owns the Record. +Commits all changes made to the Record since either creation, or the last commit operation. +<p> +Developers should subscribe to the <a ext:cls="Ext.data.Store" ext:member="update" href="output/Ext.data.Store.html#update">Ext.data.Store.update</a> event to have their code notified +of commit operations.(optional) True to skip notification of the owning store of the change (defaults to false)Gets a hash of only the fields that have been modified since this record was created or commited.Creates a copy of this record.(optional) A new record id if you don't want to use this record's idAn implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain +other than the originating domain of the running page.<br><br> +<p> +<em>Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain +of the running page, you must use this class, rather than DataProxy.</em><br><br> +<p> +The content passed back from a server resource requested by a ScriptTagProxy is executable JavaScript +source code that is used as the source inside a &lt;script> tag.<br><br> +<p> +In order for the browser to process the returned data, the server must wrap the data object +with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy. +Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy +depending on whether the callback name was passed: +<p> +<pre><code> +boolean scriptTag = false; +String cb = request.getParameter("callback"); +if (cb != null) { + scriptTag = true; + response.setContentType("text/javascript"); +} else { + response.setContentType("application/x-json"); +} +Writer out = response.getWriter(); +if (scriptTag) { + out.write(cb + "("); +} +out.print(dataBlock.toJsonString()); +if (scriptTag) { + out.write(");"); +}</pre></code>A configuration object.Load data from the configured URL, read the data object into +a block of Ext.data.Records using the passed Ext.data.DataReader implementation, and +process that block using the passed callback.An object containing properties which are to be used as HTTP parameters +for the request to the remote server.The Reader object which converts the data +object into a block of Ext.data.Records.The function into which to pass the block of Ext.data.Records. +The function must be passed <ul> +<li>The Record block object</li> +<li>The "arg" argument from the load function</li> +<li>A boolean success indicator</li> +</ul>The scope in which to call the callbackAn optional argument which is passed to the callback as its second parameter.Abort the current server request.Small helper class to make creating Stores from Array data easier.<br><br><i>This class is a singleton and cannot be created directly.</i>The regular expression used to strip tagsDefault sort that does nothingThe value being convertedStrips all HTML tags to sort on text onlyThe value being convertedStrips all HTML tags to sort on text only - Case insensitiveThe value being convertedCase insensitive stringThe value being convertedDate sortingThe value being convertedFloat sortingThe value being convertedInteger sortingThe value being convertedThe Store class encapsulates a client side cache of <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> objects which provide input data +for widgets such as the Ext.grid.Grid, or the Ext.form.ComboBox.<br> +<p> +A Store object uses an implementation of <a ext:cls="Ext.data.DataProxy" href="output/Ext.data.DataProxy.html">Ext.data.DataProxy</a> to access a data object unless you call +loadData() directly and pass in your data. The Store object +has no knowledge of the format of the data returned by the Proxy.<br> +<p> +A Store object uses its configured implementation of <a ext:cls="Ext.data.DataReader" href="output/Ext.data.DataReader.html">Ext.data.DataReader</a> to create <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> +instances from the data object. These records are cached and made available through accessor functions.Creates a new Store.A config object containing the objects needed for the Store to access data, +and read the data into Records.Add Records to the Store and fires the add event.An Array of Ext.data.Record objects to add to the cache.(Local sort only) Inserts the passed the record in the Store at the index where it +should go based on the current sort informationRemove a Record from the Store and fires the remove event.Th Ext.data.Record object to remove from the cache.Remove all Records from the Store and fires the clear event.Inserts Records to the Store at the given index and fires the add event.The start index at which to insert the passed Records.An Array of Ext.data.Record objects to add to the cache.Get the index within the cache of the passed Record.The Ext.data.Record object to to find.Get the index within the cache of the Record with the passed id.The id of the Record to find.Get the Record with the specified id.The id of the Record to find.Get the Record at the specified index.The index of the Record to find.Returns a range of Records between specified indices.(optional) The starting index (defaults to 0)(optional) The ending index (defaults to the last Record in the Store)Loads the Record cache from the configured Proxy using the configured Reader. +<p> +If using remote paging, then the first load call must specify the <em>start</em> +and <em>limit</em> properties in the options.params property to establish the initial +position within the dataset, and the number of Records to cache on each read from the Proxy. +<p> +<strong>It is important to note that for remote data sources, loading is asynchronous, +and this call will return before the new data has been loaded. Perform any post-processing +in a callback function, or in a "load" event handler.</strong> +<p>An object containing properties which control loading options:<ul> +<li>params {Object} An object containing properties to pass as HTTP parameters to a remote data source.</li> +<li>callback {Function} A function to be called after the Records have been loaded. The callback is +passed the following arguments:<ul> +<li>r : Ext.data.Record[]</li> +<li>options: Options object from the load call</li> +<li>success: Boolean success indicator</li></ul></li> +<li>scope {Object} Scope with which to call the callback (defaults to the Store object)</li> +<li>add {Boolean} indicator to append loaded records rather than replace the current cache.</li> +</ul>Reloads the Record cache from the configured Proxy using the configured Reader and +the options from the last load operation performed.(optional) An object containing properties which may override the options +used in the last load operation. See <a ext:cls="Ext.data.Store" ext:member="load" href="output/Ext.data.Store.html#load">load</a> for details (defaults to null, in which case +the most recently used options are reused).Loads data from a passed data block. A Reader which understands the format of the data +must have been configured in the constructor.The data block from which to read the Records. The format of the data expected +is dependent on the type of Reader that is configured and should correspond to that Reader's readRecords parameter.(Optional) True to append the new Records rather than replace the existing cache.Gets the number of cached records. +<p> +<em>If using paging, this may not be the total size of the dataset. If the data object +used by the Reader contains the dataset size, then the getTotalCount() function returns +the data set size</em>Gets the total number of records in the dataset as returned by the server. +<p> +<em>If using paging, for this to be accurate, the data object used by the Reader must contain +the dataset size</em>Returns the sort state of the Store as an object with two properties: +<pre><code>field {String} The name of the field by which the Records are sorted + direction {String} The sort order, "ASC" or "DESC"</code></pre>Sets the default sort column and order to be used by the next load operation.The name of the field to sort by.(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")Sort the Records. +If remote sorting is used, the sort is performed on the server, and the cache is +reloaded. If local sorting is used, the cache is sorted internally.The name of the field to sort by.(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")Calls the specified function for each of the Records in the cache.The function to call. The Record is passed as the first parameter. +Returning <em>false</em> aborts and exits the iteration.(optional) The scope in which to call the function (defaults to the Record).Gets all records modified since the last commit. Modified records are persisted across load operations +(e.g., during paging).Sums the value of <i>property</i> for each record between start and end and returns the result.A field on your recordsThe record index to start at (defaults to 0)The last record index to include (defaults to length - 1)Filter the records by a specified property.A field on your recordsEither a string that the field +should start with or a RegExp to test against the field(optional) True to match any part not just the beginning(optional) True for case sensitive comparisonFilter by a function. The specified function will be called with each +record in this data source. If the function returns true the record is included, +otherwise it is filtered.The function to be called, it will receive 2 args (record, id)(optional) The scope of the function (defaults to this)Query the records by a specified property.A field on your recordsEither a string that the field +should start with or a RegExp to test against the field(optional) True to match any part not just the beginning(optional) True for case sensitive comparisonQuery by a function. The specified function will be called with each +record in this data source. If the function returns true the record is included +in the results.The function to be called, it will receive 2 args (record, id)(optional) The scope of the function (defaults to this)Finds the index of the first matching record in this store by a specific property/value. +Returns a new collection that has been filtered.A property on your objectsEither string that the property values +should start with or a RegExp to test against the property.(optional) The index to start searching at(optional) True to match any part of the string, not just the beginning(optional) True for case sensitive comparisonFind the index of the first matching record in this store by a function. +If the function returns <i>true<i> it is considered a match.The function to be called, it will receive the args o (the object), k (the key)(optional) The scope of the function (defaults to this)(optional) The index to start searching atCollects unique values for a particular dataIndex from this store.The property to collect(optional) Pass true to allow null, undefined or empty string values(optional) Pass true to collect from all records, even ones which are filteredRevert to a view of the Record cache with no filtering applied.If true the filter is cleared silently without notifying listenersReturns true if this store is currently filteredCommit all Records with outstanding changes. To handle updates for changes, subscribe to the +Store's "update" event, and perform updating when the third parameter is Ext.data.Record.COMMIT.Cancel outstanding changes on all changed records.Represents a tree data structure and bubbles all the events for its nodes. The nodes +in the tree have most standard DOM functionality.(optional) The root nodeThe root node for this treeReturns the root node for this tree.Sets the root node for this tree.Gets a node in this tree by its id.Data reader class to create an Array of <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> objects from an XML document +based on mappings in a provided Ext.data.Record constructor.<br><br> +<p> +<em>Note that in order for the browser to parse a returned XML document, the Content-Type +header in the HTTP response must be set to "text/xml".</em> +<p> +Example code: +<pre><code>var Employee = Ext.data.Record.create([ + {name: 'name', mapping: 'name'}, // "mapping" property not needed if it's the same as "name" + {name: 'occupation'} // This field will use "occupation" as the mapping. +]); +var myReader = new Ext.data.XmlReader({ + totalRecords: "results", // The element which contains the total dataset size (optional) + record: "row", // The repeated element which contains row information + id: "id" // The element within the row that provides an ID for the record (optional) +}, Employee);</code></pre> +<p> +This would consume an XML file like this: +<pre><code>&lt;?xml?> +&lt;dataset> + &lt;results>2&lt;/results> + &lt;row> + &lt;id>1&lt;/id> + &lt;name>Bill&lt;/name> + &lt;occupation>Gardener&lt;/occupation> + &lt;/row> + &lt;row> + &lt;id>2&lt;/id> + &lt;name>Ben&lt;/name> + &lt;occupation>Horticulturalist&lt;/occupation> + &lt;/row> +&lt;/dataset></code></pre>Create a new XmlReader.Metadata configuration optionsThe definition of the data record type to produce. This can be either a valid +Record subclass created with <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>, or an array of objects with which to call +Ext.data.Record.create. See the <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> class for more details.After any data loads/reads, the raw XML Document is available for further custom processing.This method is only used by a DataProxy which has retrieved data from a remote server.The XHR object which contains the parsed XML document. The response is expected +to contain a method called 'responseXML' that returns an XML document object.Create a data block containing Ext.data.Records from an XML document.A parsed XML document.A DragDrop implementation where the linked element follows the +mouse cursor during a drag.the id of the linked elementthe group of related DragDrop itemsan object containing configurable attributes +Valid properties for DD: +scrollWhen set to true, the utility automatically tries to scroll the browser +window wehn a drag and drop element is dragged near the viewport boundary. +Defaults to true.Sets the pointer offset to the distance between the linked element's top +left corner and the location the element was clickedthe X coordinate of the clickthe Y coordinate of the clickSets the pointer offset. You can call this directly to force the +offset to be in a particular location (e.g., pass in 0,0 to set it +to the center of the object)the distance from the leftthe distance from the topSets the drag element to the location of the mousedown or click event, +maintaining the cursor location relative to the location on the element +that was clicked. Override this if you want to place the element in a +location other than where the cursor is.the X coordinate of the mousedown or drag eventthe Y coordinate of the mousedown or drag eventSets the element to the location of the mousedown or click event, +maintaining the cursor location relative to the location on the element +that was clicked. Override this if you want to place the element in a +location other than where the cursor is.the element to movethe X coordinate of the mousedown or drag eventthe Y coordinate of the mousedown or drag eventSaves the most recent position so that we can reset the constraints and +tick marks on-demand. We need to know this so that we can calculate the +number of pixels the element is offset from its original position.current x position (optional, this just makes it so we +don't have to look it up again)current y position (optional, this just makes it so we +don't have to look it up again)A DragDrop implementation that inserts an empty, bordered div into +the document that follows the cursor during drag operations. At the time of +the click, the frame div is resized to the dimensions of the linked html +element, and moved to the exact location of the linked element. +References to the "frame" element refer to the single proxy element that +was created to be dragged in place of all DDProxy elements on the +page.the id of the linked html elementthe group of related DragDrop objectsan object containing configurable attributes +Valid properties for DDProxy in addition to those in DragDrop: +resizeFrame, centerFrame, dragElId&lt;static&gt; The default drag frame div idBy default we resize the drag frame to be the same size as the element +we want to drag (this is to get the frame effect). We can turn it off +if we want a different behavior.By default the frame is positioned exactly where the drag element is, so +we use the cursor offset provided by Ext.dd.DD. Another option that works only if +you do not have constraints on the obj is to have the drag frame centered +around the cursor. Set centerFrame to true for this effect.Creates the proxy element if it does not yet existInitialization for the drag frame element. Must be called in the +constructor of all subclassesA DragDrop implementation that does not move, but can be a drop +target. You would get the same result by simply omitting implementation +for the event callbacks, but this way we reduce the processing cost of the +event listener and the callbacks.the id of the element that is a drop targetthe group of related DragDrop objectsan object containing configurable attributes +Valid properties for DDTarget in addition to those in +DragDrop: +noneDefines the interface and base operation of items that that can be +dragged or can be drop targets. It was designed to be extended, overriding +the event handlers for startDrag, onDrag, onDragOver and onDragOut. +Up to three html elements can be associated with a DragDrop instance: +<ul> +<li>linked element: the element that is passed into the constructor. +This is the element which defines the boundaries for interaction with +other DragDrop objects.</li> +<li>handle element(s): The drag operation only occurs if the element that +was clicked matches a handle element. By default this is the linked +element, but there are times that you will want only a portion of the +linked element to initiate the drag operation, and the setHandleElId() +method provides a way to define this.</li> +<li>drag element: this represents the element that would be moved along +with the cursor during a drag operation. By default, this is the linked +element itself as in <a ext:cls="Ext.dd.DD" href="output/Ext.dd.DD.html">Ext.dd.DD</a>. setDragElId() lets you define +a separate element that would be moved, as in <a ext:cls="Ext.dd.DDProxy" href="output/Ext.dd.DDProxy.html">Ext.dd.DDProxy</a>. +</li> +</ul> +This class should not be instantiated until the onload event to ensure that +the associated elements are available. +The following would define a DragDrop obj that would interact with any +other DragDrop obj in the "group1" group: +<pre>dd = new Ext.dd.DragDrop("div1", "group1");</pre> +Since none of the event handlers have been implemented, nothing would +actually happen if you were to run the code above. Normally you would +override this class or one of the default implementations, but you can +also override the methods you want on an instance of the class... +<pre>dd.onDragDrop = function(e, id) { +&nbsp;&nbsp;alert("dd was dropped on " + id); +}</pre>of the element that is linked to this instancethe group of related DragDrop objectsan object containing configurable attributes +Valid properties for DragDrop: +padding, isTarget, maintainOffset, primaryButtonOnlyThe id of the element associated with this object. This is what we +refer to as the "linked element" because the size and position of +this element is used to determine when the drag and drop objects have +interacted.Configuration attributes passed into the constructorAn associative array of HTML tags that will be ignored if clicked.An associative array of ids for elements that will be ignored if clickedAn indexted array of css class names for elements that will be ignored +if clicked.The group defines a logical collection of DragDrop objects that are +related. Instances only get events when interacting with other +DragDrop object in the same group. This lets us define multiple +groups using a single DragDrop subclass if we want.By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.Maintain offsets when we resetconstraints. Set to true when you want +the position of the element relative to its parent to stay the same +when the page changesArray of pixel locations the element will snap to if we specified a +horizontal graduation/interval. This array is generated automatically +when you define a tick interval.Array of pixel locations the element will snap to if we specified a +vertical graduation/interval. This array is generated automatically +when you define a tick interval.By default the drag and drop instance will only respond to the primary +button click (left button for a right-handed mouse). Set to true to +allow drag and drop to start with any mouse click that is propogated +by the browserThe availabe property is false until the linked dom element is accessible.By default, drags can only be initiated if the mousedown occurs in the +region the linked element is. This is done in part to work around a +bug in some browsers that mis-report the mousedown if the previous +mouseup happened outside of the window. This property is set to true +if outer handles are defined.Lock this instanceUnlock this instaceAbstract method called after a drag/drop object is clicked +and the drag or mousedown time thresholds have beeen met.click locationclick locationAbstract method called during the onMouseMove event while dragging an +object.the mousemove eventAbstract method called when this element fist begins hovering over +another DragDrop objthe mousemove eventIn POINT mode, the element +id this is hovering over. In INTERSECT mode, an array of one or more +dragdrop items being hovered over.Abstract method called when this element is hovering over another +DragDrop objthe mousemove eventIn POINT mode, the element +id this is hovering over. In INTERSECT mode, an array of dd items +being hovered over.Abstract method called when we are no longer hovering over an elementthe mousemove eventIn POINT mode, the element +id this was hovering over. In INTERSECT mode, an array of dd items +that the mouse is no longer over.Abstract method called when this item is dropped on another DragDrop +objthe mouseup eventIn POINT mode, the element +id this was dropped on. In INTERSECT mode, an array of dd items this +was dropped on.Abstract method called when this item is dropped on an area with no +drop targetthe mouseup eventFired when we are done dragging the objectthe mouseup eventEvent handler that fires when a drag/drop obj gets a mousedownthe mousedown eventEvent handler that fires when a drag/drop obj gets a mouseupthe mouseup eventOverride the onAvailable method to do what is needed after the initial +position was determined.Returns a reference to the linked elementReturns a reference to the actual element to drag. By default this is +the same as the html element, but it can be assigned to another +element. An example of this can be found in Ext.dd.DDProxySets up the DragDrop object. Must be called in the constructor of any +Ext.dd.DragDrop subclassid of the linked elementthe group of related itemsconfiguration attributesInitializes Targeting functionality only... the object does not +get a mousedown handler.id of the linked elementthe group of related itemsconfiguration attributesApplies the configuration parameters that were passed into the constructor. +This is supposed to happen at each level through the inheritance chain. So +a DDProxy implentation will execute apply config on DDProxy, DD, and +DragDrop in order to get all of the parameters that are available in +each object.Configures the padding for the target zone in px. Effectively expands +(or reduces) the virtual object size for targeting calculations. +Supports css-style shorthand; if only one parameter is passed, all sides +will have that padding, and if only two are passed, the top and bottom +will have the first param, the left and right the second.Top padRight padBot padLeft padStores the initial placement of the linked element.the X offset, default 0the Y offset, default 0Add this instance to a group of related drag/drop objects. All +instances belong to at least one group, and can belong to as many +groups as needed.the name of the groupRemove's this instance from the supplied interaction groupThe group to dropAllows you to specify that an element other than the linked element +will be moved with the cursor during a dragthe id of the element that will be used to initiate the dragAllows you to specify a child of the linked element that should be +used to initiate the drag operation. An example of this would be if +you have a content div with text and links. Clicking anywhere in the +content area would normally start the drag operation. Use this method +to specify that an element inside of the content div is the element +that starts the drag operation.the id of the element that will be used to +initiate the drag.Allows you to set an element outside of the linked element as a drag +handleid of the element that will be used to initiate the dragRemove all drag and drop hooks for this elementReturns true if this instance is locked, or the drag drop mgr is locked +(meaning that all drag/drop is disabled on the page.)Allows you to specify a tag name that should not start a drag operation +when clicked. This is designed to facilitate embedding links within a +drag handle that do something other than start the drag.the type of element to excludeLets you to specify an element id for a child of a drag handle +that should not initiate a dragthe element id of the element you wish to ignoreLets you specify a css class of elements that will not initiate a dragthe class of the elements you wish to ignoreUnsets an excluded tag name set by addInvalidHandleTypethe type of element to unexcludeUnsets an invalid handle idthe id of the element to re-enableUnsets an invalid css classthe class of the element(s) you wish to +re-enableChecks the tag exclusion list to see if this click should be ignoredthe HTMLElement to evaluateBy default, the element can be dragged any place on the screen. Use +this method to limit the horizontal travel of the element. Pass in +0,0 for the parameters if you want to lock the drag to the y axis.the number of pixels the element can move to the leftthe number of pixels the element can move to the +rightoptional parameter for specifying that the +element +should move iTickSize pixels at a time.Clears any constraints applied to this instance. Also clears ticks +since they can't exist independent of a constraint at this time.Clears any tick interval defined for this instanceBy default, the element can be dragged any place on the screen. Set +this to limit the vertical travel of the element. Pass in 0,0 for the +parameters if you want to lock the drag to the x axis.the number of pixels the element can move upthe number of pixels the element can move downoptional parameter for specifying that the +element should move iTickSize pixels at a time.resetConstraints must be called if you manually reposition a dd element.toString methodDragDropMgr is a singleton that tracks the element interaction for +all DragDrop items in the window. Generally, you will not call +this class directly, but it does have helper methods that could +be useful in your DragDrop implementations.<br><br><i>This class is a singleton and cannot be created directly.</i>&lt;static&gt; Flag to determine if we should prevent the default behavior of the +events we define. By default this is true, but this can be set to +false if you need the default behavior (not recommended)&lt;static&gt; Flag to determine if we should stop the propagation of the events +we generate. This is true by default but you may want to set it to +false if the html element contains other features that require the +mouse click.&lt;static&gt; In point mode, drag and drop interaction is defined by the +location of the cursor during the drag/drop&lt;static&gt; In intersect mode, drag and drop interactio nis defined by the +overlap of two or more drag and drop objects.&lt;static&gt; The current drag and drop mode. Default: POINT&lt;static&gt; Set useCache to false if you want to force object the lookup of each +drag and drop linked element constantly during a drag.&lt;static&gt; The number of pixels that the mouse needs to move after the +mousedown before the drag is initiated. Default=3;&lt;static&gt; The number of milliseconds after the mousedown event to initiate the +drag if we don't get a mouseup event. Default=1000The elementThe element idA reference to the style property&lt;static&gt; Lock all drag and drop functionality&lt;static&gt; Unlock all drag and drop functionality&lt;static&gt; Is drag and drop locked?&lt;static&gt; Each DragDrop instance must be registered with the DragDropMgr. +This is executed in DragDrop.init()the DragDrop object to registerthe name of the group this element belongs to&lt;static&gt; Each DragDrop handle element must be registered. This is done +automatically when executing DragDrop.setHandleElId()the DragDrop id this element is a handle forthe id of the element that is the drag +handle&lt;static&gt; Utility function to determine if a given element has been +registered as a drag drop item.the element id to check&lt;static&gt; Returns the drag and drop instances that are in all groups the +passed in instance belongs to.the obj to get related data forif true, only return targetable objs&lt;static&gt; Returns true if the specified dd target is a legal target for +the specifice drag objdrag objtarget&lt;static&gt; My goal is to be able to transparently determine if an object is +typeof DragDrop, and the exact subclass of DragDrop. typeof +returns "object", oDD.constructor.toString() always returns +"DragDrop" and not the name of the subclass. So for now it just +evaluates a well-known variable in DragDrop.object to evaluate&lt;static&gt; Utility function to determine if a given element has been +registered as a drag drop handle for the given Drag Drop object.the element id to check&lt;static&gt; Returns the DragDrop instance for a given idthe id of the DragDrop object&lt;static&gt; Fired when either the drag pixel threshol or the mousedown hold +time threshold has been met.the X position of the original mousedownthe Y position of the original mousedown&lt;static&gt; Utility to stop event propagation and event default, if these +features are turned on.the event as returned by this.getEvent()&lt;static&gt; Helper function for getting the best match from the list of drag +and drop objects returned by the drag and drop events when we are +in INTERSECT mode. It returns either the first object that the +cursor is over, or the object that has the greatest overlap with +the dragged element.The array of drag and drop objects +targeted&lt;static&gt; Refreshes the cache of the top-left and bottom-right points of the +drag and drop objects in the specified group(s). This is in the +format that is stored in the drag and drop instance, so typical +usage is: +<code> +Ext.dd.DragDropMgr.refreshCache(ddinstance.groups); +</code> +Alternatively: +<code> +Ext.dd.DragDropMgr.refreshCache({group1:true, group2:true}); +</code> +@TODO this really should be an indexed array. Alternatively this +method could accept both.an associative array of groups to refresh&lt;static&gt; This checks to make sure an element exists and is in the DOM. The +main purpose is to handle cases where innerHTML is used to remove +drag and drop objects from the DOM. IE provides an 'unspecified +error' when trying to access the offsetParent of such an elementthe element to check&lt;static&gt; Returns a Region object containing the drag and drop element's position +and size, including the padding configured for itthe drag and drop object to get the +location for<b>Deprecated.</b> &lt;static&gt; Returns the actual DOM elementthe id of the elment to get<b>Deprecated.</b> &lt;static&gt; Returns the style property for the DOM element (i.e., +document.getElById(id).style)the id of the elment to get<b>Deprecated.</b> &lt;static&gt; Returns the X position of an html elementelement for which to get the position<b>Deprecated.</b> &lt;static&gt; Returns the Y position of an html elementelement for which to get the position&lt;static&gt; Swap two nodes. In IE, we use the native method, for others we +emulate the IE behaviorfirst node to swapother node to swap<b>Deprecated.</b> &lt;static&gt; Returns the specified element style propertythe elementthe style property&lt;static&gt; Gets the scrollTop&lt;static&gt; Gets the scrollLeft&lt;static&gt; Sets the x/y position of an element to the location of the +target element.The element to moveThe position reference element&lt;static&gt; Numeric array sort function&lt;static&gt; Recursively searches the immediate parent and all child nodes for +the handle element in order to determine wheter or not it was +clicked.html element to inspectA simple class that provides the basic implementation needed to make any element draggable.The container elementAn empty function by default, but provided so that you can perform a custom action once the initial +drag event has begun. The drag cannot be canceled from this function.Returns the data object associated with this drag sourceAn empty function by default, but provided so that you can perform a custom action +when the dragged item enters the drop target by providing an implementation.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action +before the dragged item enters the drop target and optionally cancel the onDragEnter.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action +while the dragged item is over the drop target by providing an implementation.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action +while the dragged item is over the drop target and optionally cancel the onDragOver.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action +after the dragged item is dragged out of the target without dropping.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action before the dragged +item is dragged out of the target without dropping, and optionally cancel the onDragOut.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action +after a valid drag drop has occurred by providing an implementation.The drop targetThe event objectThe id of the dropped elementAn empty function by default, but provided so that you can perform a custom action before the dragged +item is dropped onto the target and optionally cancel the onDragDrop.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action +after an invalid drop has occurred by providing an implementation.The event objectThe id of the dropped elementAn empty function by default, but provided so that you can perform a custom action after an invalid +drop has occurred.The drop targetThe event objectThe id of the dragged elementAn empty function by default, but provided so that you can perform a custom action before the initial +drag event begins and optionally cancel it.An object containing arbitrary data to be shared with drop targetsThe event objectReturns the drag source's underlying <a ext:cls="Ext.dd.StatusProxy" href="output/Ext.dd.StatusProxy.html">Ext.dd.StatusProxy</a>Hides the drag source's <a ext:cls="Ext.dd.StatusProxy" href="output/Ext.dd.StatusProxy.html">Ext.dd.StatusProxy</a>This class provides a container DD instance that proxies for multiple child node sources.<br /> +By default, this class requires that draggable child nodes are registered with <a ext:cls="Ext.dd.Registry" href="output/Ext.dd.Registry.html">Ext.dd.Registry</a>.The container element +Called when a mousedown occurs in this container. Looks in <a ext:cls="Ext.dd.Registry" href="output/Ext.dd.Registry.html">Ext.dd.Registry</a> +for a valid target to drag based on the mouse down. Override this method +to provide your own lookup logic (e.g. finding a child by class name). Make sure your returned +object has a "ddel" attribute (with an HTML Element) for other functions to work.The mouse down eventCalled once drag threshold has been reached to initialize the proxy element. By default, it clones the +this.dragData.ddelThe x position of the click on the dragged objectThe y position of the click on the dragged objectCalled after a repair of an invalid drop. By default, highlights this.dragData.ddelCalled before a repair of an invalid drop to get the XY to animate to. By default returns +the XY of this.dragData.ddelThe mouse up eventA simple class that provides the basic implementation needed to make any element a drop target that can have +draggable items dropped onto it. The drop has no effect until an implementation of notifyDrop is provided.The container elementThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop target that the source is now over the +target. This default implementation adds the CSS class specified by overClass (if any) to the drop element +and returns the dropAllowed config value. This method should be overridden if drop validation is required.The drag source that was dragged over this drop targetThe eventAn object containing arbitrary data supplied by the drag sourceThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls continuously while it is being dragged over the target. +This method will be called on every mouse movement while the drag source is over the drop target. +This default implementation simply returns the dropAllowed config value.The drag source that was dragged over this drop targetThe eventAn object containing arbitrary data supplied by the drag sourceThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop target that the source has been dragged +out of the target without dropping. This default implementation simply removes the CSS class specified by +overClass (if any) from the drop element.The drag source that was dragged over this drop targetThe eventAn object containing arbitrary data supplied by the drag sourceThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop target that the dragged item has +been dropped on it. This method has no default implementation and returns false, so you must provide an +implementation that does something to process the drop event and returns true so that the drag source's +repair action does not run.The drag source that was dragged over this drop targetThe eventAn object containing arbitrary data supplied by the drag sourceThis class provides a container DD instance that proxies for multiple child node targets.<br /> +By default, this class requires that child nodes accepting drop are registered with <a ext:cls="Ext.dd.Registry" href="output/Ext.dd.Registry.html">Ext.dd.Registry</a>.The container elementReturns a custom data object associated with the DOM node that is the target of the event. By default +this looks up the event target in the <a ext:cls="Ext.dd.Registry" href="output/Ext.dd.Registry.html">Ext.dd.Registry</a>, although you can override this method to +provide your own custom lookup.The eventCalled internally when the DropZone determines that a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> has entered a drop node +that it has registered. This method has no default implementation and should be overridden to provide +node-specific processing if necessary.The custom data associated with the drop node (this is the same value returned from +<a ext:cls="Ext.dd.DropZone" ext:member="getTargetFromEvent" href="output/Ext.dd.DropZone.html#getTargetFromEvent">getTargetFromEvent</a> for this node)The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceCalled internally while the DropZone determines that a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> is over a drop node +that it has registered. The default implementation returns this.dropNotAllowed, so it should be +overridden to provide the proper feedback.The custom data associated with the drop node (this is the same value returned from +<a ext:cls="Ext.dd.DropZone" ext:member="getTargetFromEvent" href="output/Ext.dd.DropZone.html#getTargetFromEvent">getTargetFromEvent</a> for this node)The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceCalled internally when the DropZone determines that a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> has been dragged out of +the drop node without dropping. This method has no default implementation and should be overridden to provide +node-specific processing if necessary.The custom data associated with the drop node (this is the same value returned from +<a ext:cls="Ext.dd.DropZone" ext:member="getTargetFromEvent" href="output/Ext.dd.DropZone.html#getTargetFromEvent">getTargetFromEvent</a> for this node)The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceCalled internally when the DropZone determines that a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> has been dropped onto +the drop node. The default implementation returns false, so it should be overridden to provide the +appropriate processing of the drop event and return true so that the drag source's repair action does not run.The custom data associated with the drop node (this is the same value returned from +<a ext:cls="Ext.dd.DropZone" ext:member="getTargetFromEvent" href="output/Ext.dd.DropZone.html#getTargetFromEvent">getTargetFromEvent</a> for this node)The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceCalled internally while the DropZone determines that a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> is being dragged over it, +but not over any of its registered drop nodes. The default implementation returns this.dropNotAllowed, so +it should be overridden to provide the proper feedback if necessary.The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceCalled internally when the DropZone determines that a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> has been dropped on it, +but not on any of its registered drop nodes. The default implementation returns false, so it should be +overridden to provide the appropriate processing of the drop event if you need the drop zone itself to +be able to accept drops. It should return true when valid so that the drag source's repair action does not run.The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop zone that the source is now over +the zone. The default implementation returns this.dropNotAllowed and expects that only registered drop +nodes can process drag drop operations, so if you need the drop zone itself to be able to process drops +you should override this method and provide a custom implementation.The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls continuously while it is being dragged over the drop zone. +This method will be called on every mouse movement while the drag source is over the drop zone. +It will call <a ext:cls="Ext.dd.DropZone" ext:member="onNodeOver" href="output/Ext.dd.DropZone.html#onNodeOver">onNodeOver</a> while the drag source is over a registered node, and will also automatically +delegate to the appropriate node-specific methods as necessary when the drag source enters and exits +registered nodes (<a ext:cls="Ext.dd.DropZone" ext:member="onNodeEnter" href="output/Ext.dd.DropZone.html#onNodeEnter">onNodeEnter</a>, <a ext:cls="Ext.dd.DropZone" ext:member="onNodeOut" href="output/Ext.dd.DropZone.html#onNodeOut">onNodeOut</a>). If the drag source is not currently over a +registered node, it will call <a ext:cls="Ext.dd.DropZone" ext:member="onContainerOver" href="output/Ext.dd.DropZone.html#onContainerOver">onContainerOver</a>.The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop zone that the source has been dragged +out of the zone without dropping. If the drag source is currently over a registered node, the notification +will be delegated to <a ext:cls="Ext.dd.DropZone" ext:member="onNodeOut" href="output/Ext.dd.DropZone.html#onNodeOut">onNodeOut</a> for node-specific handling, otherwise it will be ignored.The drag source that was dragged over this drop targetThe eventAn object containing arbitrary data supplied by the drag zoneThe function a <a ext:cls="Ext.dd.DragSource" href="output/Ext.dd.DragSource.html">Ext.dd.DragSource</a> calls once to notify this drop zone that the dragged item has +been dropped on it. The drag zone will look up the target node based on the event passed in, and if there +is a node registered for that event, it will delegate to <a ext:cls="Ext.dd.DropZone" ext:member="onNodeDrop" href="output/Ext.dd.DropZone.html#onNodeDrop">onNodeDrop</a> for node-specific handling, +otherwise it will call <a ext:cls="Ext.dd.DropZone" ext:member="onContainerDrop" href="output/Ext.dd.DropZone.html#onContainerDrop">onContainerDrop</a>.The drag source that was dragged over this drop zoneThe eventAn object containing arbitrary data supplied by the drag sourceProvides easy access to all drag drop components that are registered on a page. Items can be retrieved either +directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.<br><br><i>This class is a singleton and cannot be created directly.</i>Resgister a drag drop elementThe id or DOM node to register(optional) An custom data object that will be passed between the elements that are involved +in drag drop operations. You can populate this object with any arbitrary properties that your own code +knows how to interpret, plus there are some specific properties known to the Registry that should be +populated in the data object (if applicable): +<pre>Value Description<br /> +--------- ------------------------------------------<br /> +handles Array of DOM nodes that trigger dragging<br /> + for the element being registered<br /> +isHandle True if the element passed in triggers<br /> + dragging itself, else false</pre>Unregister a drag drop elementThe id or DOM node to unregisterReturns the handle registered for a DOM Node by idThe DOM node or id to look upReturns the handle that is registered for the DOM node that is the target of the eventThe eventReturns a custom data object that is registered for a DOM node by idThe DOM node or id to look upReturns a custom data object that is registered for the DOM node that is the target of the eventThe eventProvides automatic scrolling of overflow regions in the page during drag operations.<br><br> +<b>Note: This class uses "Point Mode" and is untested in "Intersect Mode".</b><br><br><i>This class is a singleton and cannot be created directly.</i>The number of pixels from the top or bottom edge of a container the pointer needs to be to +trigger scrolling (defaults to 25)The number of pixels from the right or left edge of a container the pointer needs to be to +trigger scrolling (defaults to 25)The number of pixels to scroll in each scroll increment (defaults to 50)The frequency of scrolls in milliseconds (defaults to 500)True to animate the scroll (defaults to true)The animation duration in seconds - +MUST BE less than Ext.dd.ScrollManager.frequency! (defaults to .4)Registers new overflow element(s) to auto scrollThe id of or the element to be scrolled or an array of eitherUnregisters overflow element(s) so they are no longer scrolledThe id of or the element to be removed or an array of eitherManually trigger a cache refresh.A specialized drag proxy that supports a drop status icon, <a ext:cls="Ext.Layer" href="output/Ext.Layer.html">Ext.Layer</a> styles and auto-repair. This is the +default drag proxy used by all Ext.dd components.Updates the proxy's visual element to indicate the status of whether or not drop is allowed +over the current target element.The css class for the new drop status indicator imageResets the status indicator to the default dropNotAllowed valueTrue to also remove all content from the ghost, false to preserve itUpdates the contents of the ghost elementThe html that will replace the current innerHTML of the ghost elementReturns the underlying proxy <a ext:cls="Ext.Layer" href="output/Ext.Layer.html">Ext.Layer</a>Returns the ghost elementHides the proxyTrue to reset the status and clear the ghost contents, false to preserve themStops the repair animation if it's currently runningDisplays this proxyForce the Layer to sync its shadow and shim positions to the elementCauses the proxy to return to its position of origin via an animation. Should be called after an +invalid drop operation by the item being dragged.The XY position of the element ([x, y])The function to call after the repair is completeThe scope in which to execute the callbackThe subclasses of this class provide actions to perform upon <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a>s. +<br><br> +Instances of this class are only created by an <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a> when +the Form needs to perform an action such as submit or load. +<br><br> +The instance of Action which performed the action is passed to the success +and failure callbacks of the Form's action methods ({@link Ext.form.BasicForm#submit submit}, +{@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}), +and to the <a ext:cls="Ext.form.BasicForm" ext:member="actioncomplete" href="output/Ext.form.BasicForm.html#actioncomplete">Ext.form.BasicForm.actioncomplete</a> and +<a ext:cls="Ext.form.BasicForm" ext:member="actionfailed" href="output/Ext.form.BasicForm.html#actionfailed">Ext.form.BasicForm.actionfailed</a> event handlers.&lt;static&gt; Failure type returned when client side validation of the Form fails +thus aborting a submit action.&lt;static&gt; Failure type returned when server side validation of the Form fails +indicating that field-specific error messages have been returned in the +response's <tt style="font-weight:bold">errors</tt> property.&lt;static&gt; Failure type returned when a communication error happens when attempting +to send a request to the remote server.&lt;static&gt; Failure type returned when no field values are returned in the response's +<tt style="font-weight:bold">data</tt> property. +The type of action this Action instance performs. +Currently only "submit" and "load" are supported.The type of failure detected. See <a ext:cls="Ext.form.Action" ext:member="CLIENT_INVALID" href="output/Ext.form.Action.html#CLIENT_INVALID">CLIENT_INVALID</a>, <a ext:cls="Ext.form.Action" ext:member="SERVER_INVALID" href="output/Ext.form.Action.html#SERVER_INVALID">SERVER_INVALID</a>, +<a ext:cls="Ext.form.Action" ext:member="CONNECT_FAILURE" href="output/Ext.form.Action.html#CONNECT_FAILURE">CONNECT_FAILURE</a>, <a ext:cls="Ext.form.Action" ext:member="LOAD_FAILURE" href="output/Ext.form.Action.html#LOAD_FAILURE">LOAD_FAILURE</a> +The XMLHttpRequest object used to perform the action. +The decoded response object containing a boolean <tt style="font-weight:bold">success</tt> property and +other, action-specific properties.A class which handles loading of data from a server into the Fields of +an <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a>. +<br><br> +Instances of this class are only created by a {@link Ext.form.BasicForm Form} when +submitting. +<br><br> +A response packet <b>must</b> contain a boolean <tt style="font-weight:bold">success</tt> property, and +an <tt style="font-weight:bold">data</tt> property. The <tt style="font-weight:bold">data</tt> property contains the +values of Fields to load. The individual value object for each Field +is passed to the Field's {@link Ext.form.Field#setValue setValue} method. +<br><br> +By default, response packets are assumed to be JSON, so a typical response +packet may look like this: +<br><br><pre><code>{ + success: true, + data: { + clientName: "Fred. Olsen Lines", + portOfLoading: "FXT", + portOfDischarge: "OSL" + } +}</code></pre> +<br><br> +Other data may be placed into the response for processing the the {@link Ext.form.BasicForm Form}'s callback +or event handler methods.A class which handles submission of data from {@link Ext.form.BasicForm Form}s +and processes the returned response. +<br><br> +Instances of this class are only created by a {@link Ext.form.BasicForm Form} when +submitting. +<br><br> +A response packet must contain a boolean <tt style="font-weight:bold">success</tt> property, and, optionally +an <tt style="font-weight:bold">errors</tt> property. The <tt style="font-weight:bold">errors</tt> property contains error +messages for invalid fields. +<br><br> +By default, response packets are assumed to be JSON, so a typical response +packet may look like this: +<br><br><pre><code>{ + success: false, + errors: { + clientCode: "Client not found", + portOfLoading: "This field must not be null" + } +}</code></pre> +<br><br> +Other data may be placed into the response for processing the the <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a>'s callback +or event handler methods.Supplies the functionality to do "actions" on forms and initialize Ext.form.Field types on existing markup. +<br><br> +By default, Ext Forms are submitted through Ajax, using <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a>. +To enable normal browser submission of an Ext Form, override the Form's onSubmit, +and submit methods:<br><br><pre><code>var myForm = new Ext.form.BasicForm("form-el-id", { + onSubmit: Ext.emptyFn, + submit: function() { + this.getEl().dom.submit(); + } + });</code></pre><br>The form element or its idConfiguration optionsGet the HTML form ElementReturns true if client-side validation on the form is successful.Returns true if any fields in this form have changed since their original load.Performs a predefined action (<a ext:cls="Ext.form.Action.Submit" href="output/Ext.form.Action.Submit.html">Ext.form.Action.Submit</a> or +<a ext:cls="Ext.form.Action.Load" href="output/Ext.form.Action.Load.html">Ext.form.Action.Load</a>) or a custom extension of <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> +to perform application-specific processing.The name of the predefined action type, +or instance of <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> to perform.(optional) The options to pass to the <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a>. +All of the config options listed below are supported by both the submit +and load actions unless otherwise noted (custom actions could also accept +other config options): +<pre>Property Type Description +---------------- --------------- ---------------------------------------------------------------------------------- +url String The url for the action (defaults to the form's url) +method String The form method to use (defaults to the form's method, or POST if not defined) +params String/Object The params to pass (defaults to the form's baseParams, or none if not defined) +success Function The callback that will be invoked after a successful response. Note that this + is HTTP success (the transaction was sent and received correctly), but the resulting + response data can still contain data errors. +failure Function The callback that will be invoked after a failed transaction attempt. Note that + this is HTTP faillure, which means a non-successful HTTP code was returned from + the server. +clientValidation Boolean Applies to submit only. Pass true to call form.isValid() prior to posting to + validate the form on the client (defaults to false)</pre>Shortcut to do a submit action.The options to pass to the action (see <a ext:cls="Ext.form.BasicForm" ext:member="doAction" href="output/Ext.form.BasicForm.html#doAction">doAction</a> for details)Shortcut to do a load action.The options to pass to the action (see <a ext:cls="Ext.form.BasicForm" ext:member="doAction" href="output/Ext.form.BasicForm.html#doAction">doAction</a> for details)Persists the values in this form into the passed Ext.data.Record object in a beginEdit/endEdit block.The record to editLoads an Ext.data.Record into this form.The record to loadFind a Ext.form.Field in this form by id, dataIndex, name or hiddenName.The value to search forMark fields in this form invalid in bulk.Either an array in the form [{id:'fieldId', msg:'The message'},...] or an object hash of {id: msg, id2: msg2}Set values for fields in this form in bulk.Either an array in the form:<br><br><code><pre>[{id:'clientName', value:'Fred. Olsen Lines'}, + {id:'portOfLoading', value:'FXT'}, + {id:'portOfDischarge', value:'OSL'} ]</pre></code><br><br> +or an object hash of the form:<br><br><code><pre>{ + clientName: 'Fred. Olsen Lines', + portOfLoading: 'FXT', + portOfDischarge: 'OSL' +}</pre></code><br>Returns the fields in this form as an object with key/value pairs. If multiple fields exist with the same name +they are returned as an array.Clears all invalid messages in this form.Resets this form.Add Ext.form components to this form.(optional)(optional)Removes a field from the items collection (does NOT remove its markup).Looks at the fields in this form, checks them for an id attribute, +and calls applyTo on the existing dom element with that id.Calls <a ext:cls="Ext" ext:member="apply" href="output/Ext.html#apply">Ext.apply</a> for all fields in this form with the passed object.Calls <a ext:cls="Ext" ext:member="applyIf" href="output/Ext.html#applyIf">Ext.applyIf</a> for all field in this form with the passed object.Single checkbox field. Can be used as a direct replacement for traditional checkbox fields.Creates a new CheckboxConfiguration optionsReturns the checked state of the checkbox.Sets the checked state of the checkbox.True, 'true', '1', or 'on' to check the checkbox, any other value will uncheck it.A combobox control with support for autocomplete, remote-loading, paging and many other features.Create a new ComboBox.Configuration optionsThe {@link Ext.DataView DataView} used to display the ComboBox's options.Allow or prevent the user from directly editing the field text. If false is passed, +the user will only be able to select from the items defined in the dropdown list. This method +is the runtime equivalent of setting the 'editable' config option at config time.True to allow the user to directly edit the field textReturns the currently selected field value or empty string if no value is set.Clears any text/value currently set in the fieldSets the specified value into the field. If the value finds a match, the corresponding record text +will be displayed in the field. If the value does not match the data value of an existing item, +and the valueNotFoundText config option is defined, it will be displayed as the default field text. +Otherwise the field will be blank (although the value will still be set).The value to matchReturns true if the dropdown list is expanded, else false.Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire. +The store must be loaded and the list expanded for this function to work, otherwise use setValue.The data value of the item to selectFalse to prevent the dropdown list from autoscrolling to display the +selected item if it is not currently in view (defaults to true)Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire. +The store must be loaded and the list expanded for this function to work, otherwise use setValue.The zero-based index of the list item to selectFalse to prevent the dropdown list from autoscrolling to display the +selected item if it is not currently in view (defaults to true)Execute a query to filter the dropdown list. Fires the beforequery event prior to performing the +query allowing the query action to be canceled if needed.The SQL query to executeTrue to force the query to execute even if there are currently fewer characters +in the field than the minimum specified by the minChars config option. It also clears any filter previously +saved in the current store (defaults to false)Hides the dropdown list if it is currently expanded. Fires the 'collapse' event on completion.Expands the dropdown list if it is currently hidden. Fires the 'expand' event on completion.@hideProvides a date input field with a <a ext:cls="Ext.DatePicker" href="output/Ext.DatePicker.html">Ext.DatePicker</a> dropdown and automatic date validation.Create a new DateFieldReturns the current date value of the date field.Sets the value of the date field. You can pass a date object or any string that can be parsed into a valid +date, using DateField.format as the date format, according to the same rules as <a ext:cls="Date" ext:member="parseDate" href="output/Date.html#parseDate">Date.parseDate</a> +(the default format used is "m/d/y"). +<br />Usage: +<pre><code>//All of these calls set the same date value (May 4, 2006) + +//Pass a date object: +var dt = new Date('5/4/06'); +dateField.setValue(dt); + +//Pass a date string (default format): +dateField.setValue('5/4/06'); + +//Pass a date string (custom format): +dateField.format = 'Y-m-d'; +dateField.setValue('2006-5-4');</code></pre>The date or valid date string +@hideBase class for form fields that provides default event handling, sizing, value handling and other functionality.Creates a new FieldConfiguration optionsReturns the name attribute of the field if availableReturns true if this field has been changed since it was originally loaded and is not disabled.Resets the current field value to the originally loaded value and clears any validation messagesReturns whether or not the field value is currently validTrue to disable marking the field invalidValidates the field valueMark this field as invalidThe validation messageClear any invalid styles/messages for this fieldReturns the raw data value which may or may not be a valid, defined value. To return a normalized value see <a ext:cls="Ext.form.Field" ext:member="getValue" href="output/Ext.form.Field.html#getValue">getValue</a>.Returns the normalized data value (undefined or emptyText will be returned as ''). To return the raw value see <a ext:cls="Ext.form.Field" ext:member="getRawValue" href="output/Ext.form.Field.html#getRawValue">getRawValue</a>.Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see <a ext:cls="Ext.form.Field" ext:member="setValue" href="output/Ext.form.Field.html#setValue">setValue</a>.The value to setSets a data value into the field and validates it. To set the value directly without validation see <a ext:cls="Ext.form.Field" ext:member="setRawValue" href="output/Ext.form.Field.html#setRawValue">setRawValue</a>.The value to setStandard container used for grouping form fields.Configuration optionsStandard form container. +<p><b>Although they are not listed, this class also accepts all the config options required to configure its internal <a ext:cls="Ext.form.BasicForm" href="output/Ext.form.BasicForm.html">Ext.form.BasicForm</a></b></p> +<br><br> +By default, Ext Forms are submitted through Ajax, using <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a>. +To enable normal browser submission of the Ext Form contained in this FormPanel, +override the Form's onSubmit, and submit methods:<br><br><pre><code>var myForm = new Ext.form.FormPanel({ + onSubmit: Ext.emptyFn, + submit: function() { + this.getEl().dom.submit(); + } + });</code></pre><br>Configuration optionsStarts monitoring of the valid state of this form. Usually this is done by passing the config +option "monitorValid"Stops monitoring of the valid state of this formA basic hidden field for storing hidden values in forms that need to be passed in the form submit.Create a new Hidden field.Configuration optionsProvides a lightweight HTML Editor component. +<br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT +supported by this editor.</b><br/><br/> +An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within +any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.Object collection of toolbar tooltips for the buttons in the editor. The key +is the command id associated with that button and the value is a valid QuickTips object. +For example: +<pre><code>{ + bold : { + title: 'Bold (Ctrl+B)', + text: 'Make the selected text bold.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italic (Ctrl+I)', + text: 'Make the selected text italic.', + cls: 'x-html-editor-tip' + }, + ...</code></pre>Protected method that will not generally be called directly. It +is called when the editor creates its toolbar. Override this method if you need to +add custom toolbar buttons.Protected method that will not generally be called directly. It +is called when the editor initializes the iframe with HTML contents. Override this method if you +want to change the initialization markup of the iframe (e.g. to add stylesheets).Toggles the editor between standard and source edit mode.(optional) True for source edit, false for standardOverridden and disabled. The editor element does not support standard valid/invalid marking. @hideOverridden and disabled. The editor element does not support standard valid/invalid marking. @hideProtected method that will not generally be called directly. If you need/want +custom HTML cleanup, this is the method you should override.The HTML to be cleaned +return {String} The cleaned HTMLProtected method that will not generally be called directly. Syncs the contents +of the editor iframe with the textarea.Protected method that will not generally be called directly. Pushes the value of the textarea +into the iframe editor.Protected method that will not generally be called directly. It triggers +a toolbar update by reading the markup state of the current selection in the editor.Executes a Midas editor command on the editor document and performs necessary focus and +toolbar updates. <b>This should only be called after the editor is initialized.</b>The Midas command(optional) The value to pass to the command (defaults to null)Executes a Midas editor command directly on the editor document. +For visual commands, you should use <a ext:cls="Ext.form.HtmlEditor" ext:member="relayCmd" href="output/Ext.form.HtmlEditor.html#relayCmd">relayCmd</a> instead. +<b>This should only be called after the editor is initialized.</b>The Midas command(optional) The value to pass to the command (defaults to null)Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated +to insert text.Returns the editor's toolbar. <b>This is only available after the editor has been rendered.</b>Numeric text field that provides automatic keystroke filtering and numeric validation.Creates a new NumberFieldConfiguration optionsSingle radio field. Same as Checkbox, but provided as a convenience for automatically setting the input type. +Radio grouping is handled automatically by the browser if you give each radio in a group the same name.Creates a new RadioConfiguration optionsIf this radio is part of a group, it will return the selected valueMultiline text field. Can be used as a direct replacement for traditional textarea fields, plus adds +support for auto-sizing.Creates a new TextAreaConfiguration optionsAutomatically grows the field to accomodate the height of the text up to the maximum field height allowed. +This only takes effect if grow = true, and fires the autosize event if the height changes.Basic text field. Can be used as a direct replacement for traditional text inputs, or as the base +class for more sophisticated input controls (like <a ext:cls="Ext.form.TextArea" href="output/Ext.form.TextArea.html">Ext.form.TextArea</a> and <a ext:cls="Ext.form.ComboBox" href="output/Ext.form.ComboBox.html">Ext.form.ComboBox</a>).Creates a new TextFieldConfiguration optionsResets the current field value to the originally-loaded value and clears any validation messages. +Also adds emptyText and emptyClass if the original value was blank.Validates a value according to the field's validation rules and marks the field as invalid +if the validation failsThe value to validateSelects text in this field(optional) The index where the selection should start (defaults to 0)(optional) The index where the selection should end (defaults to the text length)Automatically grows the field to accomodate the width of the text up to the maximum field width allowed. +This only takes effect if grow = true, and fires the autosize event.Provides a time input field with a time dropdown and automatic time validation.Create a new TimeField +@hideProvides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default). +The trigger has no default action, so you must assign a function to implement the trigger click handler by +overriding <a ext:cls="Ext.form.TriggerField" ext:member="onTriggerClick" href="output/Ext.form.TriggerField.html#onTriggerClick">onTriggerClick</a>. You can create a TriggerField directly, as it renders exactly like a combobox +for which you can provide a custom implementation. For example: +<pre><code>var trigger = new Ext.form.TriggerField(); +trigger.onTriggerClick = myTriggerFn; +trigger.applyTo('my-field');</code></pre> +However, in general you will most likely want to use TriggerField as the base class for a reusable component. +<a ext:cls="Ext.form.DateField" href="output/Ext.form.DateField.html">Ext.form.DateField</a> and <a ext:cls="Ext.form.ComboBox" href="output/Ext.form.ComboBox.html">Ext.form.ComboBox</a> are perfect examples of this.Create a new TriggerField.Configuration options (valid {@Ext.form.TextField} config options will also be applied +to the base TextField)@hideThe function that should handle the trigger's click event. This method does nothing by default until overridden +by an implementing function.Overridable validation definitions. The validations provided are basic and intended to be easily customizable and extended.<br><br><i>This class is a singleton and cannot be created directly.</i>The error text to display when the email validation function returns falseThe keystroke filter mask to be applied on email inputThe error text to display when the url validation function returns falseThe error text to display when the alpha validation function returns falseThe keystroke filter mask to be applied on alpha inputThe error text to display when the alphanumeric validation function returns falseThe keystroke filter mask to be applied on alphanumeric inputThe function used to validate email addressesThe email addressThe function used to validate URLsThe URLThe function used to validate alpha valuesThe valueThe function used to validate alphanumeric valuesThe valueAbstract base class for grid SelectionModels. It provides the interface that should be +implemented by descendant classes. This class should not be directly instantiated.Locks the selections.Unlocks the selections.Returns true if the selections are locked.This class provides the basic implementation for cell selection in a grid.The object containing the configuration of this model.Returns the currently selected cell,.Clears all selections.to prevent the gridview from being notified about the change.Returns true if there is a selection.Selects a cell.A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows.The configuration optionsThis is the default implementation of a ColumnModel used by the Grid. This class is initialized +with an Array of column config objects. +<br><br> +An individual column's config object defines the header string, the <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> +field the column draws its data from, an otional rendering function to provide customized +data formatting, and the ability to apply a CSS class to all cells in a column through its +<a ext:cls="Ext.grid.ColumnModel" ext:member="id" href="output/Ext.grid.ColumnModel.html#id">id</a> config option.<br> +<br>Usage:<br> + <pre><code>var colModel = new Ext.grid.ColumnModel([ + {header: "Ticker", width: 60, sortable: true}, + {header: "Company Name", width: 150, sortable: true}, + {header: "Market Cap.", width: 100, sortable: true}, + {header: "$ Sales", width: 100, sortable: true, renderer: money}, + {header: "Employees", width: 100, sortable: true, resizable: false} + ]);</code></pre> +<p> +The config options listed for this class are options which may appear in each +individual column definition.An Array of column config objects. See this class's +config objects for details.The config passed into the constructorThe width of columns which have no width specified (defaults to 100)Default sortable of columns which have no sortable specified (defaults to false) +Returns the id of the column at the specified index.The column indexReconfigures this column modelArray of Column configsReturns the column for a specified id.The column idReturns the index for a specified column id.The column idReturns the number of columns.Returns the column configs that return true by the passed function that is called with (columnConfig, index)(optional)Returns true if the specified column is sortable.The column indexReturns the rendering (formatting) function defined for the column.The column index.Sets the rendering (formatting) function for a column.The column indexThe function to use to process the cell's raw data +to return HTML markup for the grid view. The render function is called with +the following parameters:<ul> +<li>Data value.</li> +<li>Cell metadata. An object in which you may set the following attributes:<ul> +<li>css A CSS class name to add to the cell's TD element.</li> +<li>attr An HTML attribute definition string to apply to the data container element <i>within</i> the table cell +(e.g. 'style="color:red;"').</li></ul> +<li>The <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> from which the data was extracted.</li> +<li>Row index</li> +<li>Column index</li> +<li>The <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> object from which the Record was extracted</li></ul>Returns the width for the specified column.The column indexSets the width for a column.The column indexThe new widthReturns the total width of all columns.True to include hidden column widthsReturns the header for the specified column.The column indexSets the header for a column.The column indexThe new headerReturns the tooltip for the specified column.The column indexSets the tooltip for a column.The column indexThe new tooltipReturns the dataIndex for the specified column.The column indexSets the dataIndex for a column.The column indexThe new dataIndexReturns true if the cell is editable.The column indexThe row indexReturns the editor defined for the cell/column.The column indexThe row indexSets if a column is editable.The column indexTrue if the column is editableReturns true if the column is hidden.The column indexReturns true if the column width cannot be changedReturns true if the column can be resizedSets if a column is hidden.The column indexTrue if the column is hiddenSets the editor for a column.The column indexThe editor objectClass for creating and editable grid.Starts editing the specified for the specified row/columnStops any active editingThis class represents the primary interface of a component based grid control. +<br><br>Usage: +<pre><code>var grid = new Ext.grid.GridPanel({ + store: new Ext.data.Store({ + reader: reader, + data: xg.dummyData + }), + columns: [ + {id:'company', header: "Company", width: 200, sortable: true, dataIndex: 'company'}, + {header: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, + {header: "Change", width: 120, sortable: true, dataIndex: 'change'}, + {header: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'}, + {header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} + ], + viewConfig: { + forceFit: true + }, + sm: new Ext.grid.RowSelectionModel({singleSelect:true}), + width:600, + height:300, + frame:true, + title:'Framed with Checkbox Selection and Horizontal Scrolling', + iconCls:'icon-grid' +});</code></pre> +<b>Note:</b> Although this class inherits many configuration options from base classes, some of them +(such as autoScroll, layout, items, etc) won't function as they do with the base Panel class.The config object +Configures the text in the drag proxy (defaults to "{0} selected row(s)"). +{0} is replaced with the number of selected rows.Reconfigures the grid to use a different Store and Column Model. +The View will be bound to the new objects and refreshed.The new <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> objectThe new <a ext:cls="Ext.grid.ColumnModel" href="output/Ext.grid.ColumnModel.html">Ext.grid.ColumnModel</a> objectReturns the grid's underlying element.Returns the grid's SelectionModel.Returns the grid's data store.Returns the grid's ColumnModel.Returns the grid's GridView object.Called to get grid's drag proxy text, by default returns this.ddText.<p>This class encapsulates the user interface of an <a ext:cls="Ext.grid.GridPanel" href="output/Ext.grid.GridPanel.html">Ext.grid.GridPanel</a>. +Methods of this class may be used to access user interface elements to enable +special display effects. Do not change the DOM structure of the user interface.</p> +<p>This class does not provide ways to manipulate the underlying data. The data +model of a Grid is held in an <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>.</p> +The amount of space to reserve for the scrollbar (defaults to 19 pixels)The CSS classes applied to a header when it is sorted. (defaults to ["sort-asc", "sort-desc"])The text displayed in the "Sort Ascending" menu itemThe text displayed in the "Sort Descending" menu itemThe text displayed in the "Columns" menu itemOverride this function to apply custom CSS classes to rows during rendering. You can also supply custom +parameters to the row template for the current row to customize how it is rendered using the <b>rowParams</b> +parameter. This function should return the CSS class name (or empty string '' for none) that will be added +to the row's wrapping div. To apply multiple class names, simply return them space-delimited within the string +(e.g., 'my-class another-class').The <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> corresponding to the current rowThe row indexA config object that is passed to the row template during rendering that allows +customization of various aspects of a body row, if applicable. Note that this object will only be applied if +<a ext:cls="Ext.grid.GridView" ext:member="enableRowBody" href="output/Ext.grid.GridView.html#enableRowBody">enableRowBody</a> = true, otherwise it will be ignored. The object may contain any of these properties:<ul> +<li><code>body</code> : String <div class="sub-desc">An HTML fragment to be rendered as the cell's body content (defaults to '').</div></li> +<li><code>bodyStyle</code> : String <div class="sub-desc">A CSS style string that will be applied to the row's TR style attribute (defaults to '').</div></li> +<li><code>cols</code> : Number <div class="sub-desc">The column count to apply to the body row's TD colspan attribute (defaults to the current +column count of the grid).</div></li> +</ul>The <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a> this grid is bound toReturn the &lt;TR> HtmlElement which represents a Grid row for the specified index.The row indexReturns the grid's &lt;TD> HtmlElement at the specified coordinates.The row index in which to find the cell.The column index of the cell.Return the &lt;TD> HtmlElement which represents the Grid's header cell for the specified column index.The column indexScrolls the grid to the topFocuses the specified row..The row indexFocuses the specified cell.The row indexThe column indexRefreshs the grid UI(optional) True to also refresh the headersAdds the ability for single level grouping to the grid. +<pre><code>var grid = new Ext.grid.GridPanel({ + // A groupingStore is required for a GroupingView + store: new Ext.data.GroupingStore({ + reader: reader, + data: xg.dummyData, + sortInfo:{field: 'company', direction: "ASC"}, + groupField:'industry' + }), + + columns: [ + {id:'company',header: "Company", width: 60, sortable: true, dataIndex: 'company'}, + {header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, + {header: "Change", width: 20, sortable: true, dataIndex: 'change', renderer: Ext.util.Format.usMoney}, + {header: "Industry", width: 20, sortable: true, dataIndex: 'industry'}, + {header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} + ], + + view: new Ext.grid.GroupingView({ + forceFit:true, + // custom grouping text template to display the number of items per group + groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})' + }), + + frame:true, + width: 700, + height: 450, + collapsible: true, + animCollapse: false, + title: 'Grouping Example', + iconCls: 'icon-grid', + renderTo: document.body +});</code></pre>Toggles the specified group if no value is passed, otherwise sets the expanded state of the group to the value passed.The groupId assigned to the group (see getGroupId)(optional)Toggles all groups if no value is passed, otherwise sets the expanded state of all groups to the value passed.(optional)Dynamically tries to determine the groupId of a specific valueA custom column model for the <a ext:cls="Ext.grid.PropertyGrid" href="output/Ext.grid.PropertyGrid.html">Ext.grid.PropertyGrid</a>. Generally it should not need to be used directly.The grid this store will be bound toThe source data config objectA specialized grid implementation intended to mimic the traditional property grid as typically seen in +development IDEs. Each row in the grid represents a property of some object, and the data is stored +as a set of name/value pairs in <a ext:cls="Ext.grid.PropertyRecord" href="output/Ext.grid.PropertyRecord.html">Ext.grid.PropertyRecord</a>s. Example usage: +<pre><code> +var grid = new Ext.grid.PropertyGrid({ + title: 'Properties Grid', + autoHeight: true, + width: 300, + renderTo: 'grid-ct', + source: { + "(name)": "My Object", + "Created": new Date(Date.parse('10/15/2006')), + "Available": false, + "Version": .01, + "Description": "A test object" + } +});</pre></code>The grid config objectSets the source data object containing the property data. The data object can contain one or more name/value +pairs representing all of the properties of an object to display in the grid, and this data will automatically +be loaded into the grid's <a ext:cls="Ext.grid.PropertyGrid" ext:member="store" href="output/Ext.grid.PropertyGrid.html#store">store</a>. If the grid already contains data, this method will replace any +existing data. See also the <a ext:cls="Ext.grid.PropertyGrid" ext:member="source" href="output/Ext.grid.PropertyGrid.html#source">source</a> config value. Example usage: +<pre><code>grid.setSource({ + "(name)": "My Object", + "Created": new Date(Date.parse('10/15/2006')), + "Available": false, + "Version": .01, + "Description": "A test object" +});</code></pre>The data objectGets the source data object containing the property data. See <a ext:cls="Ext.grid.PropertyGrid" ext:member="setSource" href="output/Ext.grid.PropertyGrid.html#setSource">setSource</a> for details regarding the +format of the data object.A specific <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> type that represents a name/value pair and is made to work with the +<a ext:cls="Ext.grid.PropertyGrid" href="output/Ext.grid.PropertyGrid.html">Ext.grid.PropertyGrid</a>. Typically, PropertyRecords do not need to be created directly as they can be +created implicitly by simply using the appropriate data configs either via the <a ext:cls="Ext.grid.PropertyGrid" ext:member="source" href="output/Ext.grid.PropertyGrid.html#source">Ext.grid.PropertyGrid.source</a> +config property or by calling <a ext:cls="Ext.grid.PropertyGrid" ext:member="setSource" href="output/Ext.grid.PropertyGrid.html#setSource">Ext.grid.PropertyGrid.setSource</a>. However, if the need arises, these records +can also be created explicitly as shwon below. Example usage: +<pre><code>var rec = new Ext.grid.PropertyRecord({ + name: 'Birthday', + value: new Date(Date.parse('05/26/1972')) +}); +// Add record to an already populated grid +grid.store.addSorted(rec);</code></pre>A data object in the format: {name: [name], value: [value]}. The specified value's type +will be read automatically by the grid to determine the type of editor to use when displaying it.A custom wrapper for the <a ext:cls="Ext.grid.PropertyGrid" href="output/Ext.grid.PropertyGrid.html">Ext.grid.PropertyGrid</a>'s <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>. This class handles the mapping +between the custom data source objects supported by the grid and the <a ext:cls="Ext.grid.PropertyRecord" href="output/Ext.grid.PropertyRecord.html">Ext.grid.PropertyRecord</a> format +required for compatibility with the underlying store. Generally this class should not need to be used directly -- +the grid's data should be accessed from the underlying store via the <a ext:cls="Ext.grid.PropertyStore" ext:member="store" href="output/Ext.grid.PropertyStore.html#store">store</a> property.The grid this store will be bound toThe source data config objectThis is a utility class that can be passed into a <a ext:cls="Ext.grid.ColumnModel" href="output/Ext.grid.ColumnModel.html">Ext.grid.ColumnModel</a> as a column config that provides +an automatic row numbering column. +<br>Usage:<br> + <pre><code>// This is a typical column config with the first column providing row numbers + var colModel = new Ext.grid.ColumnModel([ + new Ext.grid.RowNumberer(), + {header: "Name", width: 80, sortable: true}, + {header: "Code", width: 50, sortable: true}, + {header: "Description", width: 200, sortable: true} + ]);</code></pre>The configuration optionsThe default SelectionModel used by <a ext:cls="Ext.grid.Grid" href="output/Ext.grid.Grid.html">Ext.grid.Grid</a>. + It supports multiple selections and keyboard selection/navigation. <br><br>Select records.The records to select(optional) True to keep existing selectionsGets the number of selected rows.Selects the first row in the grid.Select the last row.(optional) True to keep existing selectionsSelects the row immediately following the last selected row.(optional) True to keep existing selectionsSelects the row that precedes the last selected row.(optional) True to keep existing selectionsReturns true if there is a next record to selectReturns true if there is a previous record to selectReturns the selected recordsReturns the first selected record.Calls the passed function with each selection. If the function returns false, iteration is +stopped and this function returns false. Otherwise it returns true.(optional)Clears all selections.Selects all rows.Returns True if there is a selection.Returns True if the specified row is selected.The record or index of the record to checkReturns True if the specified record id is selected.The id of record to checkSelects multiple rows.Array of the indexes of the row to select(optional) True to keep existing selectionsSelects a range of rows. All rows in between startRow and endRow are also selected.The index of the first row in the rangeThe index of the last row in the range(optional) True to retain existing selectionsDeselects a range of rows. All rows in between startRow and endRow are also deselected.The index of the first row in the rangeThe index of the last row in the rangeSelects a row.The index of the row to select(optional) True to keep existing selectionsDeselects a row.The index of the row to deselect<p>Inherits the anchoring of <a ext:cls="Ext.layout.AnchorLayout" href="output/Ext.layout.AnchorLayout.html">Ext.layout.AnchorLayout</a> and adds the ability for x/y positioning using the +standard x and y component config options.</p>@hide<p>This is a layout that contains multiple panels in an expandable accordion style such that only one +panel can be open at any given time. Each panel has built-in support for expanding and collapsing. +This class is intended to be extended or created via the layout:'accordion' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> +config, and should generally not need to be created directly via the new keyword.</p> +<p>Note that when creating a layout via config, the layout-specific config properties must be passed in via +the <a ext:cls="Ext.Container" ext:member="layoutConfig" href="output/Ext.Container.html#layoutConfig">Ext.Container.layoutConfig</a> object which will then be applied internally to the layout. +Example usage:</p> +<pre><code>var accordion = new Ext.Panel({ + title: 'Accordion Layout', + layout:'accordion', + defaults: { + // applied to each contained panel + bodyStyle: 'padding:15px' + }, + layoutConfig: { + // layout-specific configs go here + titleCollapse: false, + animate: true, + activeOnTop: true + } + items: [{ + title: 'Panel 1', + html: '&lt;p&gt;Panel content!&lt;/p&gt;' + },{ + title: 'Panel 2', + html: '&lt;p&gt;Panel content!&lt;/p&gt;' + },{ + title: 'Panel 3', + html: '&lt;p&gt;Panel content!&lt;/p&gt;' + }] +});</code></pre><p>This is a layout that enables anchoring of contained elements relative to the container's dimensions. If +the container is resized, all anchored items are automatically rerendered according to their anchor rules. +This class is intended to be extended or created via the layout:'anchor' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> config, +and should generally not need to be created directly via the new keyword.</p> +<p>AnchorLayout does not have any direct config options (other than inherited ones). However, the container +using the AnchorLayout can supply an anchoring-specific config property of <b>anchorSize</b>. By default, +AnchorLayout will calculate anchor measurements based on the size of the container itself. However, if +anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating anchor +measurements based on it instead, allowing the container to be sized independently of the anchoring logic if necessary.</p> +<p>The items added to an AnchorLayout can also supply an anchoring-specific config property of <b>anchor</b> which +is a string containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%'). +This value is what tells the layout how the item should be anchored to the container. The following types of +anchor values are supported: +<ul> +<li><b>Percentage</b>: Any value between 1 and 100, expressed as a percentage. The first anchor is the percentage +width that the item should take up within the container, and the second is the percentage height. Example: '100% 50%' +would render an item the complete width of the container and 1/2 its height. If only one anchor value is supplied +it is assumed to be the width value and the height will default to auto.</li> +<li><b>Offsets</b>: Any positive or negative integer value. The first anchor is the offset from the right edge of +the container, and the second is the offset from the bottom edge. Example: '-50 -100' would render an item the +complete width of the container minus 50 pixels and the complete height minus 100 pixels. If only one anchor value +is supplied it is assumed to be the right offset value and the bottom offset will default to 0.</li> +<li><b>Sides</b>: Valid values are 'right' (or 'r') and 'bottom' (or 'b'). Either the container must have a fixed +size or an anchorSize config value defined at render time in order for these to have any effect.</li> +</ul> +<p>Anchor values can also be mixed as needed. For example, '-50 75%' would render the width offset from the +container right edge by 50 pixels and 75% of the container's height.</p>@hide<p>This is a multi-pane, application-oriented UI layout style that supports multiple nested panels, automatic +split bars between regions and built-in expanding and collapsing of regions. +This class is intended to be extended or created via the layout:'border' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> config, +and should generally not need to be created directly via the new keyword.</p> +<p>BorderLayout does not have any direct config options (other than inherited ones). All configs available +for customizing the BorderLayout are at the <a ext:cls="Ext.layout.BorderLayout.Region" href="output/Ext.layout.BorderLayout.Region.html">Ext.layout.BorderLayout.Region</a> and +<a ext:cls="Ext.layout.BorderLayout.SplitRegion" href="output/Ext.layout.BorderLayout.SplitRegion.html">Ext.layout.BorderLayout.SplitRegion</a> levels. Example usage:</p> +<pre><code>var border = new Ext.Panel({ + title: 'Border Layout', + layout:'border', + items: [{ + title: 'South Panel', + region: 'south', + height: 100, + minSize: 75, + maxSize: 250, + margins: '0 5 5 5' + },{ + title: 'West Panel', + region:'west', + margins: '5 0 0 5', + cmargins: '5 5 0 5', + width: 200, + minSize: 100, + maxSize: 300 + },{ + title: 'Main Content', + region:'center', + margins: '5 5 0 0' + }] +});</code></pre>@hideThis is a region of a BorderLayout that acts as a subcontainer within the layout. Each region has its own +layout that is independent of other regions and the containing BorderLayout, and can be any of the valid +Ext layout types. Region size is managed automatically and cannot be changed by the user -- for resizable +regions, see <a ext:cls="Ext.layout.BorderLayout.SplitRegion" href="output/Ext.layout.BorderLayout.SplitRegion.html">Ext.layout.BorderLayout.SplitRegion</a>.Create a new Region.Any valid Ext layout classThe configuration optionsThe region position. Valid values are: north, south, east, west and center. Every +BorderLayout must have a center region for the primary content -- all other regions are optional.True if this region is collapsed. Read-only. +This region's layout position (north, south, east, west or center). Read-only.True if this region is currently visible, else false.Returns the current margins for this region. If the region is collapsed, the cmargins (collapsed +margins) value will be returned, otherwise the margins value will be returned.Returns the current size of this region. If the region is collapsed, the size of the collapsedEl will +be returned, otherwise the size of the region's panel will be returned.Sets the specified panel as the container element for this region.The new panelReturns the minimum allowable width for this region.Returns the minimum allowable height for this region.This is a specialized type of BorderLayout region that has a built-in <a ext:cls="Ext.SplitBar" href="output/Ext.SplitBar.html">Ext.SplitBar</a> for user resizing of regions.Create a new SplitRegion.Any valid Ext layout classThe configuration optionsThe region position. Valid values are: north, south, east, west and center. Every +BorderLayout must have a center region for the primary content -- all other regions are optional.Returns a reference to the split bar in use by this region.<p>This layout contains multiple panels, each fit to the container, where only a single panel can be +visible at any given time. This layout style is most commonly used for wizards, tab implementations, etc. +This class is intended to be extended or created via the layout:'card' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> config, +and should generally not need to be created directly via the new keyword.</p> +<p>The CardLayout's focal method is <a ext:cls="Ext.layout.CardLayout" ext:member="setActiveItem" href="output/Ext.layout.CardLayout.html#setActiveItem">setActiveItem</a>. Since only one panel is displayed at a time, +the only way to move from one panel to the next is by calling setActiveItem, passing the id or index of +the next panel to display. The layout itself does not provide a mechanism for handling this navigation, +so that functionality must be provided by the developer.</p> +<p>In the following example, a simplistic wizard setup is demonstrated. A button bar is added +to the footer of the containing panel to provide navigation buttons. The buttons will be handled by a +common navigation routine -- for this example, the implementation of that routine has been ommitted since +it can be any type of custom logic. Note that other uses of a CardLayout (like a tab control) would require a +completely different implementation. For serious implementations, a better approach would be to extend +CardLayout to provide the custom functionality needed. Example usage:</p> +<pre><code>var navHandler = function(direction){ + // This routine could contain business logic required to manage the navigation steps. + // It would call setActiveItem as needed, manage navigation button state, handle any + // branching logic that might be required, handle alternate actions like cancellation + // or finalization, etc. A complete wizard implementation could get pretty + // sophisticated depending on the complexity required, and should probably be + // done as a subclass of CardLayout in a real-world implementation. +}; + +var card = new Ext.Panel({ + title: 'Example Wizard', + layout:'card', + activeItem: 0, // make sure the active item is set on the container config! + bodyStyle: 'padding:15px', + defaults: { + // applied to each contained panel + border:false + }, + // just an example of one possible navigation scheme, using buttons + bbar: [ + { + id: 'move-prev', + text: 'Back', + handler: navHandler.createDelegate(this, [-1]), + disabled: true + }, + '->', // greedy spacer so that the buttons are aligned to each side + { + id: 'move-next', + text: 'Next', + handler: navHandler.createDelegate(this, [1]) + } + ], + // the panels (or "cards") within the layout + items: [{ + id: 'card-0', + html: '&lt;h1&gt;Welcome to the Wizard!&lt;/h1&gt;&lt;p&gt;Step 1 of 3&lt;/p&gt;' + },{ + id: 'card-1', + html: '&lt;p&gt;Step 2 of 3&lt;/p&gt;' + },{ + id: 'card-2', + html: '&lt;h1&gt;Congratulations!&lt;/h1&gt;&lt;p&gt;Step 3 of 3 - Complete&lt;/p&gt;' + }] +});</code></pre>Sets the active (visible) item in the layout.The string component id or numeric index of the item to activate<p>This is the layout style of choice for creating structural layouts in a multi-column format where the width of +each column can be specified as a percentage or fixed width, but the height is allowed to vary based on the content. +This class is intended to be extended or created via the layout:'column' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> config, +and should generally not need to be created directly via the new keyword.</p> +<p>ColumnLayout does not have any direct config options (other than inherited ones), but it does support a +specific config property of <b>columnWidth</b> that can be included in the config of any panel added to it. The +layout will use the width (if pixels) or columnWidth (if percent) of each panel during layout to determine how to size each panel. +If width or columnWidth is not specified for a given panel, its width will default to the panel's width (or auto).</p> +<p>The width property is evaluated as pixels must be a number greater than or equal to 1. The columnWidth property +is evaluated as percentage width and must be a decimal value greater than 0 and less than 1 (e.g., .25).</p> +<p>The basic rules for specifying column widths are pretty simple. The logic makes two passes through the +set of contained panels. During the first layout pass, all panels that either have a fixed width or none +specified (auto) are skipped, but their widths are subtracted from the overall container width. During the second +pass, all panels with columnWidths are assigned pixel widths in proportion to their percentages based on +the total <b>remaining</b> container width. In other words, percentage width panels are designed to fill the space +left over by all the fixed-width or auto-width panels. Because of this, while you can specify any number of columns +with different percentages, the columnWidths must always add up to 1 (or 100%) when added together, otherwise your +layout may not render as expected. Example usage:</p> +<pre><code>// All columns are percentages -- they must add up to 1 +var p = new Ext.Panel({ + title: 'Column Layout - Percentage Only', + layout:'column', + items: [{ + title: 'Column 1', + columnWidth: .25 + },{ + title: 'Column 2', + columnWidth: .6 + },{ + title: 'Column 3', + columnWidth: .15 + }] +}); + +// Mix of width and columnWidth -- all columnWidth values values must add +// up to 1. The first column will take up exactly 120px, and the last two +// columns will fill the remaining container width. +var p = new Ext.Panel({ + title: 'Column Layout - Mixed', + layout:'column', + items: [{ + title: 'Column 1', + width: 120 + },{ + title: 'Column 2', + columnWidth: .8 + },{ + title: 'Column 3', + columnWidth: .2 + }] +});</code></pre>@hideEvery layout is composed of one or more <a ext:cls="Ext.Container" href="output/Ext.Container.html">Ext.Container</a> elements internally, and ContainerLayout provides +the basic foundation for all other layout classes in Ext. It is a non-visual class that simply provides the +base logic required for a Container to function as a layout. This class is intended to be extended and should +generally not need to be created directly via the new keyword. +A reference to the <a ext:cls="Ext.Component" href="output/Ext.Component.html">Ext.Component</a> that is active. For example, +if(myPanel.layout.activeItem.id == 'item-1') { ... }. activeItem only applies to layout styles that can +display items one at a time (like <a ext:cls="Ext.layout.Accordion" href="output/Ext.layout.Accordion.html">Ext.layout.Accordion</a>, <a ext:cls="Ext.layout.CardLayout" href="output/Ext.layout.CardLayout.html">Ext.layout.CardLayout</a> +and <a ext:cls="Ext.layout.FitLayout" href="output/Ext.layout.FitLayout.html">Ext.layout.FitLayout</a>). Read-only. Related to <a ext:cls="Ext.Container" ext:member="activeItem" href="output/Ext.Container.html#activeItem">Ext.Container.activeItem</a>.<p>This is a base class for layouts that contain a single item that automatically expands to fill the layout's +container. This class is intended to be extended or created via the layout:'fit' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> +config, and should generally not need to be created directly via the new keyword.</p> +<p>FitLayout does not have any direct config options (other than inherited ones). To fit a panel to a container +using FitLayout, simply set layout:'fit' on the container and add a single panel to it. If the container has +multiple panels, only the first one will be displayed. Example usage:</p> +<pre><code>var p = new Ext.Panel({ + title: 'Fit Layout', + layout:'fit', + items: { + title: 'Inner Panel', + html: '&lt;p&gt;This is the inner panel content&lt;/p&gt;', + border: false + } +});</code></pre><p>This is a layout specifically designed for creating forms. +This class can be extended or created via the layout:'form' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> config, +and should generally not need to be created directly via the new keyword. However, when used in an application, +it will usually be preferrable to use a <a ext:cls="Ext.FormPanel" href="output/Ext.FormPanel.html">Ext.FormPanel</a> (which automatically uses FormLayout as its layout +class) since it also provides built-in functionality for loading, validating and submitting the form.</p> +<p>Note that when creating a layout via config, the layout-specific config properties must be passed in via +the <a ext:cls="Ext.Container" ext:member="layoutConfig" href="output/Ext.Container.html#layoutConfig">Ext.Container.layoutConfig</a> object which will then be applied internally to the layout. The container +using the FormLayout can also supply the following form-specific config properties which will be applied by the layout: +<ul> +<li><b>hideLabels</b>: (Boolean) True to hide field labels by default (defaults to false)</li> +<li><b>itemCls</b>: (String) A CSS class to add to the div wrapper that contains each field label +and field element (the default class is 'x-form-item' and itemCls will be added to that)</li> +<li><b>labelAlign</b>: (String) The default label alignment. The default value is empty string '' +for left alignment, but specifying 'top' will align the labels above the fields.</li> +<li><b>labelPad</b>: (Number) The default padding in pixels for field labels (defaults to 5). labelPad only +applies if labelWidth is also specified, otherwise it will be ignored.</li> +<li><b>labelWidth</b>: (Number) The default width in pixels of field labels (defaults to 100)</li> +</ul></p> +<p>Any type of components can be added to a FormLayout, but items that inherit from <a ext:cls="Ext.form.Field" href="output/Ext.form.Field.html">Ext.form.Field</a> +can also supply the following field-specific config properties: +<ul> +<li><b>clearCls</b>: (String) The CSS class to apply to the special clearing div rendered directly after each +form field wrapper (defaults to 'x-form-clear-left')</li> +<li><b>fieldLabel</b>: (String) The text to display as the label for this field (defaults to '')</li> +<li><b>hideLabel</b>: (Boolean) True to hide the label and separator for this field (defaults to false).</li> +<li><b>itemCls</b>: (String) A CSS class to add to the div wrapper that contains this field label +and field element (the default class is 'x-form-item' and itemCls will be added to that). If supplied, +itemCls at the field level will override the default itemCls supplied at the container level.</li> +<li><b>labelSeparator</b>: (String) The separator to display after the text of the label for this field +(defaults to a colon ':' or the layout's value for <a ext:cls="Ext.layout.FormLayout" ext:member="labelSeparator" href="output/Ext.layout.FormLayout.html#labelSeparator">labelSeparator</a>). To hide the separator use empty string ''.</li> +<li><b>labelStyle</b>: (String) A CSS style specification string to add to the field label for this field +(defaults to '' or the layout's value for <a ext:cls="Ext.layout.FormLayout" ext:member="labelStyle" href="output/Ext.layout.FormLayout.html#labelStyle">labelStyle</a>).</li> +</ul> +Example usage:</p> +<pre><code>// Required if showing validation messages +Ext.QuickTips.init(); + +// While you can create a basic Panel with layout:'form', practically +// you should usually use a FormPanel to also get its form functionality +// since it already creates a FormLayout internally. +var form = new Ext.FormPanel({ + labelWidth: 75, + title: 'Form Layout', + bodyStyle:'padding:15px', + width: 350, + labelPad: 10, + defaultType: 'textfield', + defaults: { + // applied to each contained item + width: 230, + msgTarget: 'side' + }, + layoutConfig: { + // layout-specific configs go here + labelSeparator: '' + }, + items: [{ + fieldLabel: 'First Name', + name: 'first', + allowBlank: false + },{ + fieldLabel: 'Last Name', + name: 'last' + },{ + fieldLabel: 'Company', + name: 'company' + },{ + fieldLabel: 'Email', + name: 'email', + vtype:'email' + } + ], + buttons: [{ + text: 'Save' + },{ + text: 'Cancel' + }] +});</code></pre>@hide<p>This layout allows you to easily render content into an HTML table. The total number of columns can be +specified, and rowspan and colspan can be used to create complex layouts within the table. +This class is intended to be extended or created via the layout:'table' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> config, +and should generally not need to be created directly via the new keyword.</p> +<p>Note that when creating a layout via config, the layout-specific config properties must be passed in via +the <a ext:cls="Ext.Container" ext:member="layoutConfig" href="output/Ext.Container.html#layoutConfig">Ext.Container.layoutConfig</a> object which will then be applied internally to the layout. In the +case of TableLayout, the only valid layout config property is <a ext:cls="Ext.layout.TableLayout" ext:member="columns" href="output/Ext.layout.TableLayout.html#columns">columns</a>. However, the items added to a +TableLayout can supply table-specific config properties of <b>rowspan</b> and <b>colspan</b>, as explained below.</p> +<p>The basic concept of building up a TableLayout is conceptually very similar to building up a standard +HTML table. You simply add each panel (or "cell") that you want to include along with any span attributes +specified as the special config properties of rowspan and colspan which work exactly like their HTML counterparts. +Rather than explicitly creating and nesting rows and columns as you would in HTML, you simply specify the +total column count in the layoutConfig and start adding panels in their natural order from left to right, +top to bottom. The layout will automatically figure out, based on the column count, rowspans and colspans, +how to position each panel within the table. Just like with HTML tables, your rowspans and colspans must add +up correctly in your overall layout or you'll end up with missing and/or extra cells! Example usage:</p> +<pre><code>// This code will generate a layout table that is 3 columns by 2 rows +// with some spanning included. The basic layout will be: +// +--------+-----------------+ +// | A | B | +// | |--------+--------| +// | | C | D | +// +--------+--------+--------+ +var table = new Ext.Panel({ + title: 'Table Layout', + layout:'table', + defaults: { + // applied to each contained panel + bodyStyle:'padding:20px' + }, + layoutConfig: { + // The total column count must be specified here + columns: 3 + }, + items: [{ + html: '&lt;p&gt;Cell A content&lt;/p&gt;', + rowspan: 2 + },{ + html: '&lt;p&gt;Cell B content&lt;/p&gt;', + colspan: 2 + },{ + html: '&lt;p&gt;Cell C content&lt;/p&gt;' + },{ + html: '&lt;p&gt;Cell D content&lt;/p&gt;' + }] +});</code></pre>@hideA base utility class that adapts a non-menu component so that it can be wrapped by a menu item and added to a menu. +It provides basic rendering, activation management and enable/disable logic required to work in menus.Creates a new AdapterThe component being adapted to render into a menuConfiguration optionsThe base class for all items that render into menus. BaseItem provides default rendering, activated state +management and base configuration options shared by all menu components.Creates a new BaseItemConfiguration optionsSets the function that will handle click events for this item (equivalent to passing in the <a ext:cls="Ext.menu.BaseItem" ext:member="handler" href="output/Ext.menu.BaseItem.html#handler">handler</a> +config property). If an existing handler is already registered, it will be unregistered for you.The function that should be called on clickThe scope that should be passed to the handlerAdds a menu item that contains a checkbox by default, but can also be part of a radio group.Creates a new CheckItemConfiguration optionsA function that handles the checkchange event. The function is undefined by default, but if an implementation +is provided, it will be called automatically when the checkchange event fires.The checked value that was setSet the checked state of this itemThe new checked value(optional) True to prevent the checkchange event from firing (defaults to false)A menu item that wraps the <a ext:cls="Ext.ColorPalette" href="output/Ext.ColorPalette.html">Ext.ColorPalette</a> component.Creates a new ColorItemConfiguration optionsThe Ext.ColorPalette objectA menu containing a <a ext:cls="Ext.menu.ColorItem" href="output/Ext.menu.ColorItem.html">Ext.menu.ColorItem</a> component (which provides a basic color picker).Creates a new ColorMenuConfiguration optionsThe <a ext:cls="Ext.ColorPalette" href="output/Ext.ColorPalette.html">Ext.ColorPalette</a> instance for this ColorMenuA menu item that wraps the <a ext:cls="Ext.DatPicker" href="output/Ext.DatPicker.html">Ext.DatPicker</a> component.Creates a new DateItemConfiguration optionsThe Ext.DatePicker objectA menu containing a <a ext:cls="Ext.menu.DateItem" href="output/Ext.menu.DateItem.html">Ext.menu.DateItem</a> component (which provides a date picker).Creates a new DateMenuConfiguration optionsThe <a ext:cls="Ext.DatePicker" href="output/Ext.DatePicker.html">Ext.DatePicker</a> instance for this DateMenuA base class for all menu items that require menu-related functionality (like sub-menus) and are not static +display items. Item extends the base functionality of <a ext:cls="Ext.menu.BaseItem" href="output/Ext.menu.BaseItem.html">Ext.menu.BaseItem</a> by adding menu-specific +activation and click handling.Creates a new ItemConfiguration optionsSets the text to display in this menu itemThe text to displaySets the CSS class to apply to the item's icon elementThe CSS class to applyA menu object. This is the container to which you add all other menu items. Menu can also serve a as a base class +when you want a specialzed menu based off of another component (like <a ext:cls="Ext.menu.DateMenu" href="output/Ext.menu.DateMenu.html">Ext.menu.DateMenu</a> for example).Creates a new MenuConfiguration optionsRead-only. Returns true if the menu is currently displayed, else false.Displays this menu relative to another elementThe element to align to(optional) The <a ext:cls="Ext.Element" ext:member="alignTo" href="output/Ext.Element.html#alignTo">Ext.Element.alignTo</a> anchor position to use in aligning to +the element (defaults to this.defaultAlign)(optional) This menu's parent menu, if applicable (defaults to undefined)Displays this menu at a specific xy positionContains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based)(optional) This menu's parent menu, if applicable (defaults to undefined)Hides this menu and optionally all parent menus(optional) True to hide all parent menus recursively, if any (defaults to false)Addds one or more items of any type supported by the Menu class, or that can be converted into menu items. +Any of the following are valid: +<ul> +<li>Any menu item object based on <a ext:cls="Ext.menu.Item" href="output/Ext.menu.Item.html">Ext.menu.Item</a></li> +<li>An HTMLElement object which will be converted to a menu item</li> +<li>A menu item config object that will be created as a new menu item</li> +<li>A string, which can either be '-' or 'separator' to add a menu separator, otherwise +it will be converted into a <a ext:cls="Ext.menu.TextItem" href="output/Ext.menu.TextItem.html">Ext.menu.TextItem</a> and added</li> +</ul> +Usage: +<pre><code>// Create the menu +var menu = new Ext.menu.Menu(); + +// Create a menu item to add by reference +var menuItem = new Ext.menu.Item({ text: 'New Item!' }); + +// Add a bunch of items at once using different methods. +// Only the last item added will be returned. +var item = menu.add( + menuItem, // add existing item by ref + 'Dynamic Item', // new TextItem + '-', // new separator + { text: 'Config Item' } // new item by config +);</code></pre>One or more menu items, menu item configs or other objects that can be converted to menu itemsReturns this menu's underlying <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> objectAdds a separator bar to the menuAdds an <a ext:cls="Ext.Element" href="output/Ext.Element.html">Ext.Element</a> object to the menuThe element or DOM node to add, or its idAdds an existing object based on <a ext:cls="Ext.menu.Item" href="output/Ext.menu.Item.html">Ext.menu.Item</a> to the menuThe menu item to addCreates a new <a ext:cls="Ext.menu.Item" href="output/Ext.menu.Item.html">Ext.menu.Item</a> based an the supplied config object and adds it to the menuA MenuItem config objectCreates a new <a ext:cls="Ext.menu.TextItem" href="output/Ext.menu.TextItem.html">Ext.menu.TextItem</a> with the supplied text and adds it to the menuThe text to display in the menu itemInserts an existing object based on <a ext:cls="Ext.menu.Item" href="output/Ext.menu.Item.html">Ext.menu.Item</a> to the menu at a specified indexThe index in the menu's list of current items where the new item should be insertedThe menu item to addRemoves an <a ext:cls="Ext.menu.Item" href="output/Ext.menu.Item.html">Ext.menu.Item</a> from the menu and destroys the objectThe menu item to removeRemoves and destroys all items in the menuProvides a common registry of all menu items on a page so that they can be easily accessed by id.<br><br><i>This class is a singleton and cannot be created directly.</i>Hides all menus that are currently visibleReturns a <a ext:cls="Ext.menu.Menu" href="output/Ext.menu.Menu.html">Ext.menu.Menu</a> objectThe string menu id, an existing menu object reference, or a Menu config that will +be used to generate and return a new Menu instance.Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will +add one of these by using "-" in you call to add() or in your items config rather than creating one directly.Configuration optionsAdds a static text string to a menu, usually used as either a heading or group separator.Creates a new TextItemThe text to displayThe default Provider implementation which saves state via cookies. +<br />Usage: + <pre><code>var cp = new Ext.state.CookieProvider({ + path: "/cgi-bin/", + expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days + domain: "extjs.com" + }); + Ext.state.Manager.setProvider(cp);</code></pre>Create a new CookieProviderThe configuration objectThis is the global state manager. By default all components that are "state aware" check this class +for state information if you don't pass them a custom state provider. In order for this class +to be useful, it must be initialized with a provider when your application initializes. + <pre><code>// in your initialization function +init : function(){ + Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); + ... + // supposed you have a <a ext:cls="Ext.BorderLayout" href="output/Ext.BorderLayout.html">Ext.BorderLayout</a> + var layout = new Ext.BorderLayout(...); + layout.restoreState(); + // or a {Ext.BasicDialog} + var dialog = new Ext.BasicDialog(...); + dialog.restoreState();</code></pre><br><br><i>This class is a singleton and cannot be created directly.</i>Configures the default state provider for your applicationThe state provider to setReturns the current value for a keyThe key nameThe default value to return if the key lookup does not matchSets the value for a keyThe key nameThe state dataClears a value from the stateThe key nameGets the currently configured state providerAbstract base class for state provider implementations. This class provides methods +for encoding and decoding <b>typed</b> variables including dates and defines the +Provider interface.Returns the current value for a keyThe key nameA default value to return if the key's value is not foundClears a value from the stateThe key nameSets the value for a keyThe key nameThe value to setDecodes a string previously encoded with <a ext:cls="Ext.state.Provider" ext:member="encodeValue" href="output/Ext.state.Provider.html#encodeValue">encodeValue</a>.The value to decodeEncodes a value including type information. Decode with <a ext:cls="Ext.state.Provider" ext:member="decodeValue" href="output/Ext.state.Provider.html#decodeValue">decodeValue</a>.The value to encodeThe attributes/config for the node or just a string with the text for the node +The loader used by this node (defaults to using the tree's defined loader)Returns true if this node is currently loadingReturns true if this node has been loadedTrigger a reload for this nodeThe default single selection for a TreePanel.Select a node.The node to selectDeselect a node.The node to unselectClear all selectionsGet the selected nodeReturns true if the node is selectedThe node to checkSelects the node above the selected node in the tree, intelligently walking the nodesSelects the node above the selected node in the tree, intelligently walking the nodesMulti selection for a TreePanel.Select a node.The node to select(optional) An event associated with the selectionTrue to retain existing selectionsDeselect a node.The node to unselectClear all selectionsReturns true if the node is selectedThe node to checkReturns an array of the selected nodesThis class provides the default UI implementation for <b>root</b> Ext TreeNodes. +The RootTreeNode UI implementation allows customizing the appearance of the root tree node.<br> +<p> +If you are customizing the Tree's user interface, you +may need to extend this class, but you should never need to instantiate this class.<br>The <a ext:cls="Ext.tree.TreePanel" href="output/Ext.tree.TreePanel.html">Ext.tree.TreePanel</a> for which to enable draggingThe TreePanel for this drag zoneThe <a ext:cls="Ext.tree.TreePanel" href="output/Ext.tree.TreePanel.html">Ext.tree.TreePanel</a> for which to enable droppingThe TreePanel for this drop zoneArbitrary data that can be associated with this tree and will be included in the event object that gets +passed to any nodedragover event handler (defaults to {})Provides editor functionality for inline tree node editing. Any valid <a ext:cls="Ext.form.Field" href="output/Ext.form.Field.html">Ext.form.Field</a> can be used +as the editor field.Either a prebuilt <a ext:cls="Ext.form.Field" href="output/Ext.form.Field.html">Ext.form.Field</a> instance or a Field config objectNote this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodesFilter the data by a specific attribute.Either string that the attribute value +should start with or a RegExp to test against the attribute(optional) The attribute passed in your node's attributes collection. Defaults to "text".(optional) The node to start the filter at.Filter by a function. The passed function will be called with each +node in the tree (or from the startNode). If the function returns true, the node is kept +otherwise it is filtered. If a node is filtered, its children are also filtered.The filter function(optional) The scope of the function (defaults to the current node)Clears the current filter. Note: with the "remove" option +set a filter cannot be cleared.A TreeLoader provides for lazy loading of an <a ext:cls="Ext.tree.TreeNode" href="output/Ext.tree.TreeNode.html">Ext.tree.TreeNode</a>'s child +nodes from a specified URL. The response must be a JavaScript Array definition +whose elements are node definition objects. eg: +<pre><code>[{ + id: 1, + text: 'A leaf Node', + leaf: true + },{ + id: 2, + text: 'A folder Node', + children: [{ + id: 3, + text: 'A child Node', + leaf: true + }] + }]</code></pre> +<br><br> +A server request is sent, and child nodes are loaded only when a node is expanded. +The loading node's id is passed to the server under the parameter name "node" to +enable the server to produce the correct child nodes. +<br><br> +To pass extra parameters, an event handler may be attached to the "beforeload" +event, and the parameters specified in the TreeLoader's baseParams property: +<pre><code>myTreeLoader.on("beforeload", function(treeLoader, node) { + this.baseParams.category = node.attributes.category; + }, this);</code></pre>< +This would pass an HTTP parameter called "category" to the server containing +the value of the Node's "category" attribute.Creates a new Treeloader.A config object containing config properties.Load an <a ext:cls="Ext.tree.TreeNode" href="output/Ext.tree.TreeNode.html">Ext.tree.TreeNode</a> from the URL specified in the constructor. +This is called automatically when a node is expanded, but may be used to reload +a node (or append new children if the <a ext:cls="Ext.tree.TreeLoader" ext:member="clearOnLoad" href="output/Ext.tree.TreeLoader.html#clearOnLoad">clearOnLoad</a> option is false.)Override this function for custom TreeNode node implementationThe attributes/config for the node or just a string with the text for the nodeRead-only. The text for this node. To change it use setText().True if this node is disabled.Read-only. The UI for this nodeReturns true if this node is expandedReturns the UI object for this node.Sets the text for this nodeTriggers selection of this nodeTriggers deselection of this nodeReturns true if this node is selectedExpand this node.(optional) True to expand all children as well(optional) false to cancel the default animation(optional) A callback to be called when +expanding this node completes (does not wait for deep expand to complete). +Called with 1 parameter, this node.Collapse this node.(optional) True to collapse all children as well(optional) false to cancel the default animationToggles expanded/collapsed state of the nodeEnsures all parent nodes are expandedExpand all child nodes(optional) true if the child nodes should also expand their child nodesCollapse all child nodes(optional) true if the child nodes should also collapse their child nodesDisables this nodeEnables this nodeThis class provides the default UI implementation for Ext TreeNodes. +The TreeNode UI implementation is separate from the +tree implementation, and allows customizing of the appearance of +tree nodes.<br> +<p> +If you are customizing the Tree's user interface, you +may need to extend this class, but you should never need to instantiate this class.<br> +<p> +This class provides access to the user interface components of an Ext TreeNode, through +<a ext:cls="Ext.tree.TreeNode" ext:member="getUI" href="output/Ext.tree.TreeNode.html#getUI">Ext.tree.TreeNode.getUI</a>Adds one or more CSS classes to the node's UI element. +Duplicate classes are automatically filtered out.The CSS class to add, or an array of classesRemoves one or more CSS classes from the node's UI element.The CSS class to remove, or an array of classesHides this node.Shows this node.Sets the checked status of the tree node to the passed value, or, if no value was passed, +toggles the checked status. If the node was rendered with no checkbox, this has no effect.The new checked status.Returns the &lt;a> element that provides focus for the node's UI.Returns the text node.Returns the icon &lt;img> element.Returns the checked status of the node. If the node was rendered with no +checkbox, it returns false.The root node for this treeThe dropZone used by this tree if drop is enabledThe dragZone used by this tree if drag is enabledReturns this root node for this treeSets the root node for this tree during initialization.Gets a node in this tree by its idRetrieve an array of checked nodes, or an array of a specific attribute of checked nodes (e.g. "id")(optional) Defaults to null (return the actual nodes)(optional) The node to start from, defaults to the rootReturns the container element for this TreePanel.Returns the default <a ext:cls="Ext.tree.TreeLoader" href="output/Ext.tree.TreeLoader.html">Ext.tree.TreeLoader</a> for this TreePanel.Expand all nodesCollapse all nodesReturns the selection model used by this TreePanel.Expands a specified path in this TreePanel. A path can be retrieved from a node with <a ext:cls="Ext.data.Node" ext:member="getPath" href="output/Ext.data.Node.html#getPath">Ext.data.Node.getPath</a>(optional) The attribute used in the path (see <a ext:cls="Ext.data.Node" ext:member="getPath" href="output/Ext.data.Node.html#getPath">Ext.data.Node.getPath</a> for more info)(optional) The callback to call when the expand is complete. The callback will be called with +(bSuccess, oLastNode) where bSuccess is if the expand was successful and oLastNode is the last node that was expanded.Selects the node in this tree at the specified path. A path can be retrieved from a node with <a ext:cls="Ext.data.Node" ext:member="getPath" href="output/Ext.data.Node.html#getPath">Ext.data.Node.getPath</a>(optional) The attribute used in the path (see <a ext:cls="Ext.data.Node" ext:member="getPath" href="output/Ext.data.Node.html#getPath">Ext.data.Node.getPath</a> for more info)(optional) The callback to call when the selection is complete. The callback will be called with +(bSuccess, oSelNode) where bSuccess is if the selection was successful and oSelNode is the selected node.Returns the underlying Element for this treeProvides sorting of nodes in a TreePanelUtility class for manipulating CSS rules<br><br><i>This class is a singleton and cannot be created directly.</i>Create a stylesheet from a text blob of CSS rules.The text containing the css rulesAn id to add to the stylesheet for later removalRemoves a style or link tag by idThe id of the tagDynamically swaps an existing stylesheet reference for a new oneThe id of an existing link tag to removeThe href of the new stylesheet to includeRefresh the rule cache if you have dynamically added stylesheetsGets all css rules for the documenttrue to refresh the internal cacheGets an an individual CSS rule by selector(s)The CSS selector or an array of selectors to try. The first selector that is found is returned.true to refresh the internal cache if you have recently updated any rules or added styles dynamicallyUpdates a rule propertyIf it's an array it tries each selector until it finds one. Stops immediately once one is found.The css propertyThe new value for the propertyA wrapper class which can be applied to any element. Fires a "click" event while the + mouse is pressed. The interval between firings may be specified in the config but + defaults to 20 milliseconds. + + Optionally, a CSS class may be applied to the element during the time it is pressed.The element to listen onProvides a convenient method of performing setTimeout where a new +timeout cancels the old timeout. An example would be performing validation on a keypress. +You can use this class to buffer +the keypress events for a certain number of milliseconds, and perform only if they stop +for that amount of time.The parameters to this constructor serve as defaults and are not required.(optional) The default function to timeout(optional) The default scope of that timeout(optional) The default Array of argumentsCancels any pending timeout and queues a new oneThe milliseconds to delay(optional) Overrides function passed to constructor(optional) Overrides scope passed to constructor(optional) Overrides args passed to constructorCancel the last queued timeoutReusable data formatting functions<br><br><i>This class is a singleton and cannot be created directly.</i>Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified lengthThe string to truncateThe maximum length to allow before truncatingChecks a reference and converts it to empty string if it is undefinedReference to checkChecks a reference and converts it to the default value if it's emptyReference to checkThe value to insert of it's undefined (defaults to "")Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.The string to encodeConvert certain characters (&, <, >, and ') from their HTML character equivalents.The string to decodeTrims any whitespace from either side of a stringThe text to trimReturns a substring from within an original stringThe original textThe start index of the substringThe length of the substringConverts a string to all lower case lettersThe text to convertConverts a string to all upper case lettersThe text to convertConverts the first character only of a string to upper caseThe text to convertFormat a number as US currencyThe numeric value to formatParse a value into a formatted date using the specified format pattern.The value to format(optional) Any valid date format string (defaults to 'm/d/Y')Returns a date rendering function that can be reused to apply a date format multiple times efficientlyAny valid date format stringStrips all HTML tagsThe text from which to strip tagsStrips all script tagsThe text from which to strip script tagsSimple format for a file size (xxx bytes, xxx KB, xxx MB)The numeric value to formatModified version of Douglas Crockford"s json.js that doesn"t +mess with the Object prototype +http://www.json.org/js.html<br><br><i>This class is a singleton and cannot be created directly.</i>Encodes an Object, Array or other valueThe variable to encodeDecodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError.The JSON stringA Collection class that maintains both numeric indexes and keys and exposes events.True if the addAll function should add function references to the +collection (defaults to false)A function that can accept an item of the type(s) stored in this MixedCollection +and return the key value for that item. This is used when available to look up the key on items that +were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is +equivalent to providing an implementation for the <a ext:cls="Ext.util.MixedCollection" ext:member="getKey" href="output/Ext.util.MixedCollection.html#getKey">getKey</a> method.Adds an item to the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete.The key to associate with the itemThe item to add.MixedCollection has a generic way to fetch keys if you implement getKey. +<pre><code>// normal way +var mc = new Ext.util.MixedCollection(); +mc.add(someEl.dom.id, someEl); +mc.add(otherEl.dom.id, otherEl); +//and so on + +// using getKey +var mc = new Ext.util.MixedCollection(); +mc.getKey = function(el){ + return el.dom.id; +}; +mc.add(someEl); +mc.add(otherEl); + +// or via the constructor +var mc = new Ext.util.MixedCollection(false, function(el){ + return el.dom.id; +}); +mc.add(someEl); +mc.add(otherEl);</code></pre>The item for which to find the key.Replaces an item in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="replace" href="output/Ext.util.MixedCollection.html#replace">replace</a> event when complete.The key associated with the item to replace, or the item to replace.o (optional) If the first parameter passed was a key, the item to associate with that key.Adds all elements of an Array or an Object to the collection.An Object containing properties which will be added to the collection, or +an Array of values, each of which are added to the collection.Executes the specified function once for every item in the collection, passing each +item as the first and only parameter. Returning false from the function will stop the iteration.The function to execute for each item.(optional) The scope in which to execute the function.Executes the specified function once for every key in the collection, passing each +key, and its associated item as the first two parameters.The function to execute for each item.(optional) The scope in which to execute the function.Returns the first item in the collection which elicits a true return value from the +passed selection function.The selection function to execute for each item.(optional) The scope in which to execute the function.Inserts an item at the specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete.The index to insert the item at.The key to associate with the new item, or the item itself.(optional) If the second parameter was a key, the new item.Removed an item from the collection.The item to remove.Remove an item from a specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="remove" href="output/Ext.util.MixedCollection.html#remove">remove</a> event when complete.The index within the collection of the item to remove.Removed an item associated with the passed key fom the collection.The key of the item to remove.Returns the number of items in the collection.Returns index within the collection of the passed Object.The item to find the index of.Returns index within the collection of the passed key.The key to find the index of.Returns the item associated with the passed key OR index. Key has priority over index. This is the equivalent +of calling <a ext:cls="Ext.util.MixedCollection" ext:member="key" href="output/Ext.util.MixedCollection.html#key">key</a> first, then if nothing matched calling <a ext:cls="Ext.util.MixedCollection" ext:member="itemAt" href="output/Ext.util.MixedCollection.html#itemAt">itemAt</a>.The key or index of the item.Returns the item at the specified index.The index of the item.Returns the item associated with the passed key.The key of the item.Returns true if the collection contains the passed Object as an item.The Object to look for in the collection.Returns true if the collection contains the passed Object as a key.The key to look for in the collection.Removes all items from the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="clear" href="output/Ext.util.MixedCollection.html#clear">clear</a> event when complete.Returns the first item in the collection.Returns the last item in the collection.Sorts this collection with the passed comparison function(optional) "ASC" or "DESC"(optional) comparison functionSorts this collection by keys(optional) "ASC" or "DESC"(optional) a comparison function (defaults to case insensitive string)Returns a range of items in this collection(optional) defaults to 0(optional) default to the last itemFilter the <i>objects</i> in this collection by a specific property. +Returns a new collection that has been filtered.A property on your objectsEither string that the property values +should start with or a RegExp to test against the property(optional) True to match any part of the string, not just the beginning(optional) True for case sensitive comparisonFilter by a function. * Returns a new collection that has been filtered. +The passed function will be called with each +object in the collection. If the function returns true, the value is included +otherwise it is filtered.The function to be called, it will receive the args o (the object), k (the key)(optional) The scope of the function (defaults to this)Finds the index of the first matching object in this collection by a specific property/value. +Returns a new collection that has been filtered.A property on your objectsEither string that the property values +should start with or a RegExp to test against the property.(optional) The index to start searching at(optional) True to match any part of the string, not just the beginning(optional) True for case sensitive comparisonFind the index of the first matching object in this collection by a function. +If the function returns <i>true<i> it is considered a match.The function to be called, it will receive the args o (the object), k (the key)(optional) The scope of the function (defaults to this)(optional) The index to start searching atCreates a duplicate of this collectionReturns the item associated with the passed key or index.The key or index of the item.Abstract base class that provides a common interface for publishing events. Subclasses are expected to +to have a property "events" with all the events defined.<br> +For example: +<pre><code>Employee = function(name){ + this.name = name; + this.addEvents({ + "fired" : true, + "quit" : true + }); + } + Ext.extend(Employee, Ext.util.Observable);</code></pre>Fires the specified event with the passed parameters (minus the event name).Variable number of parameters are passed to handlersAppends an event handler to this componentThe type of event to listen forThe method the event invokes(optional) The scope in which to execute the handler +function. The handler function's "this" context.(optional) An object containing handler configuration +properties. This may contain any of the following properties:<ul> +<li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li> +<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li> +<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li> +<li>buffer {Number} Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed +by the specified number of milliseconds. If the event fires again within that time, the original +handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li> +</ul><br> +<p> +<b>Combining Options</b><br> +Using the options argument, it is possible to combine different types of listeners:<br> +<br> +A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId) +<pre><code>el.on('click', this.onClick, this, { + single: true, + delay: 100, + forumId: 4 +});</code></pre> +<p> +<b>Attaching multiple handlers in 1 call</b><br> +The method also allows for a single argument to be passed which is a config object containing properties +which specify multiple handlers. +<p> +<pre><code>foo.on({ + 'click' : { + fn: this.onClick + scope: this, + delay: 100 + }, + 'mouseover' : { + fn: this.onMouseOver + scope: this + }, + 'mouseout' : { + fn: this.onMouseOut + scope: this + } +});</code></pre> +<p> +Or a shorthand syntax:<br> +<pre><code>foo.on({ + 'click' : this.onClick, + 'mouseover' : this.onMouseOver, + 'mouseout' : this.onMouseOut + scope: this +});</code></pre>Removes a listenerThe type of event to listen forThe handler to remove(optional) The scope (this object) for the handlerRemoves all listeners for this objectUsed to define events on this ObservableThe object with the events definedChecks to see if this object has any listeners for a specified eventThe name of the event to check forSuspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)Appends an event handler to this element (shorthand for addListener)The type of event to listen forThe method the event invokes(optional) The scope in which to execute the handler +function. The handler function's "this" context.(optional)Removes a listener (shorthand for removeListener)The type of event to listen forThe handler to remove(optional) The scope (this object) for the handler&lt;static&gt; Starts capture on the specified Observable. All events will be passed +to the supplied function with the event name + standard signature of the event +<b>before</b> the event is fired. If the supplied function returns false, +the event will not fire.The Observable to captureThe function to call(optional) The scope (this object) for the fn&lt;static&gt; Removes <b>all</b> added captures from the Observable.The Observable to releaseProvides the ability to execute one or more arbitrary tasks in a multithreaded manner. Generally, you can use +the singleton <a ext:cls="Ext.TaskMgr" href="output/Ext.TaskMgr.html">Ext.TaskMgr</a> instead, but if needed, you can create separate instances of TaskRunner. Any +number of separate tasks can be started at any time and will run independently of each other. Example usage: +<pre><code>// Start a simple clock task that updates a div once per second +var task = { + run: function(){ + Ext.fly('clock').update(new Date().format('g:i:s A')); + }, + interval: 1000 //1 second +} +var runner = new Ext.util.TaskRunner(); +runner.start(task);</code></pre>(optional) The minimum precision in milliseconds supported by this TaskRunner instance +(defaults to 10)Starts a new task.A config object that supports the following properties:<ul> +<li><code>run</code> : Function<div class="sub-desc">The function to execute each time the task is run. The +function will be called at each interval and passed the <code>args</code> argument if specified. If a +particular scope is required, be sure to specify it using the <code>scope</scope> argument.</div></li> +<li><code>interval</code> : Number<div class="sub-desc">The frequency in milliseconds with which the task +should be executed.</div></li> +<li><code>args</code> : Array<div class="sub-desc">(optional) An array of arguments to be passed to the function +specified by <code>run</code>.</div></li> +<li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the +<code>run</code> function.</div></li> +<li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to execute +the task before stopping automatically (defaults to indefinite).</div></li> +<li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to execute the task before +stopping automatically (defaults to indefinite).</div></li> +</ul>Stops an existing running task.The task to stopStops all tasks that are currently running.Provides precise pixel measurements for blocks of text so that you can determine exactly how high and +wide, in pixels, a given block of text will be.<br><br><i>This class is a singleton and cannot be created directly.</i>Measures the size of the specified textThe element, dom node or id from which to copy existing CSS styles +that can affect the size of the rendered textThe text to measure(optional) If the text will be multiline, you have to set a fixed width +in order to accurately measure the text heightReturn a unique TextMetrics instance that can be bound directly to an element and reused. This reduces +the overhead of multiple calls to initialize the style properties on each measurement.The element, dom node or id that the instance will be bound to(optional) If the text will be multiline, you have to set a fixed width +in order to accurately measure the text heightReturns the size of the specified text based on the internal element's style and width propertiesThe text to measureBinds this TextMetrics instance to an element from which to copy existing CSS styles +that can affect the size of the rendered textThe element, dom node or idSets a fixed width on the internal measurement element. If the text will be multiline, you have +to set a fixed width in order to accurately measure the text height.The width to set on the elementReturns the measured width of the specified textThe text to measureReturns the measured height of the specified text. For multiline text, be sure to call +<a ext:cls="Ext.util.TextMetrics" ext:member="setFixedWidth" href="output/Ext.util.TextMetrics.html#setFixedWidth">setFixedWidth</a> if necessary.The text to measureThese functions are available on every Function object (any JavaScript function).Creates a callback that passes arguments[0], arguments[1], arguments[2], ... +Call directly on any function. Example: <code>myFunction.createCallback(myarg, myarg2)</code> +Will create a function that is bound to those 2 args.Creates a delegate (callback) that sets the scope to obj. +Call directly on any function. Example: <code>this.myFunction.createDelegate(this)</code> +Will create a function that is automatically scoped to this.(optional) The object for which the scope is set(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)(optional) if True args are appended to call args instead of overriding, +if a number the args are inserted at the specified positionCalls this function after the number of millseconds specified.The number of milliseconds for the setTimeout call (if 0 the function is executed immediately)(optional) The object for which the scope is set(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)(optional) if True args are appended to call args instead of overriding, +if a number the args are inserted at the specified positionCreate 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 functionThe function to sequence(optional) The scope of the passed fcn (Defaults to scope of original function or window)Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called. +The resulting function returns the results of the original function. +The passed fcn is called with the parameters of the original function. +@addonThe function to call before the original(optional) The scope of the passed fcn (Defaults to scope of original function or window)Checks whether or not the current number is within a desired range. If the number is already within the +range it is returned, otherwise the min or max value is returned depending on which side of the range is +exceeded. Note that this method returns the constrained value but does not change the current number.The minimum number in the rangeThe maximum number in the rangeThese functions are available as static methods on the JavaScript String object.&lt;static&gt; Escapes the passed string for ' and \The string to escape&lt;static&gt; Pads the left side of a string with a specified character. This is especially useful +for normalizing number and date strings. Example usage: +<pre><code>var s = String.leftPad('123', 5, '0'); +// s now contains the string: '00123'</code></pre>The original stringThe total length of the output string(optional) The character with which to pad the original string (defaults to empty string " ")&lt;static&gt; Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each +token must be unique, and must increment in the format {0}, {1}, etc. Example usage: +<pre><code>var cls = 'my-class', text = 'Some text'; +var s = String.format('<div class="{0}">{1}</div>', cls, text); +// s now contains the string: '<div class="my-class">Some text</div>'</code></pre>The tokenized string to be formattedThe value to replace token {0}Etc...Utility function that allows you to easily switch a string between two alternating values. The passed value +is compared to the current string, and if they are equal, the other value that was passed in is returned. If +they are already different, the first value passed in is returned. Note that this method returns the new value +but does not change the current string. +<pre><code>// alternate sort directions +sort = sort.toggle('ASC', 'DESC'); + +// instead of conditional logic: +sort = (sort == 'ASC' ? 'DESC' : 'ASC');</code></pre>The value to compare to the current stringThe new value to use if the string already equals the first value passed inTrims whitespace from either end of a string, leaving spaces within the string intact. Example: +<pre><code>var s = ' foo bar '; +alert('-' + s + '-'); //alerts "- foo bar -" +alert('-' + s.trim() + '-'); //alerts "-foo bar-"</code></pre> \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/index.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/index.html 4 Dec 2007 02:48:37 -0000 1.1 @@ -0,0 +1,44 @@ + + + Ext 2.0 - API Documentation + + + + + + + + + +
        +
        +
        Loading...
        +
        + + + + + + + + + + +
        + +
        + + + \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/tree.json =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/tree.json,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/tree.json 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1 @@ +{"id":"apidocs","iconCls":"icon-docs","text":"API Documentation","singleClickExpand":true,"children":[{"id":"pkg-Ext","text":"Ext","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"id":"pkg-data","text":"data","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.data.ArrayReader.html","text":"ArrayReader","id":"Ext.data.ArrayReader","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.Connection.html","text":"Connection","id":"Ext.data.Connection","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.DataProxy.html","text":"DataProxy","id":"Ext.data.DataProxy","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.DataReader.html","text":"DataReader","id":"Ext.data.DataReader","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.GroupingStore.html","text":"GroupingStore","id":"Ext.data.GroupingStore","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.HttpProxy.html","text":"HttpProxy","id":"Ext.data.HttpProxy","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.JsonReader.html","text":"JsonReader","id":"Ext.data.JsonReader","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.JsonStore.html","text":"JsonStore","id":"Ext.data.JsonStore","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.MemoryProxy.html","text":"MemoryProxy","id":"Ext.data.MemoryProxy","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.Node.html","text":"Node","id":"Ext.data.Node","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.Record.html","text":"Record","id":"Ext.data.Record","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.ScriptTagProxy.html","text":"ScriptTagProxy","id":"Ext.data.ScriptTagProxy","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.SimpleStore.html","text":"SimpleStore","id":"Ext.data.SimpleStore","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.SortTypes.html","text":"SortTypes","id":"Ext.data.SortTypes","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.data.Store.html","text":"Store","id":"Ext.data.Store","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.Tree.html","text":"Tree","id":"Ext.data.Tree","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.data.XmlReader.html","text":"XmlReader","id":"Ext.data.XmlReader","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-dd","text":"dd","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.dd.DD.html","text":"DD","id":"Ext.dd.DD","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DDProxy.html","text":"DDProxy","id":"Ext.dd.DDProxy","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DDTarget.html","text":"DDTarget","id":"Ext.dd.DDTarget","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DragDrop.html","text":"DragDrop","id":"Ext.dd.DragDrop","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DragDropMgr.html","text":"DragDropMgr","id":"Ext.dd.DragDropMgr","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DragSource.html","text":"DragSource","id":"Ext.dd.DragSource","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DragZone.html","text":"DragZone","id":"Ext.dd.DragZone","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DropTarget.html","text":"DropTarget","id":"Ext.dd.DropTarget","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.DropZone.html","text":"DropZone","id":"Ext.dd.DropZone","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.dd.Registry.html","text":"Registry","id":"Ext.dd.Registry","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.dd.ScrollManager.html","text":"ScrollManager","id":"Ext.dd.ScrollManager","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.dd.StatusProxy.html","text":"StatusProxy","id":"Ext.dd.StatusProxy","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-form","text":"form","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.form.Action.html","text":"Action","id":"Ext.form.Action","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.form.Action.Load.html","text":"Action.Load","id":"Ext.form.Action.Load","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.form.Action.Submit.html","text":"Action.Submit","id":"Ext.form.Action.Submit","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.form.BasicForm.html","text":"BasicForm","id":"Ext.form.BasicForm","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.form.Checkbox.html","text":"Checkbox","id":"Ext.form.Checkbox","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.ComboBox.html","text":"ComboBox","id":"Ext.form.ComboBox","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.DateField.html","text":"DateField","id":"Ext.form.DateField","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.Field.html","text":"Field","id":"Ext.form.Field","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.FieldSet.html","text":"FieldSet","id":"Ext.form.FieldSet","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.FormPanel.html","text":"FormPanel","id":"Ext.form.FormPanel","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.Hidden.html","text":"Hidden","id":"Ext.form.Hidden","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.HtmlEditor.html","text":"HtmlEditor","id":"Ext.form.HtmlEditor","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.NumberField.html","text":"NumberField","id":"Ext.form.NumberField","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.Radio.html","text":"Radio","id":"Ext.form.Radio","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.TextArea.html","text":"TextArea","id":"Ext.form.TextArea","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.TextField.html","text":"TextField","id":"Ext.form.TextField","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.TimeField.html","text":"TimeField","id":"Ext.form.TimeField","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.TriggerField.html","text":"TriggerField","id":"Ext.form.TriggerField","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.form.VTypes.html","text":"VTypes","id":"Ext.form.VTypes","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-grid","text":"grid","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.grid.AbstractSelectionModel.html","text":"AbstractSelectionModel","id":"Ext.grid.AbstractSelectionModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.CellSelectionModel.html","text":"CellSelectionModel","id":"Ext.grid.CellSelectionModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.CheckboxSelectionModel.html","text":"CheckboxSelectionModel","id":"Ext.grid.CheckboxSelectionModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.ColumnModel.html","text":"ColumnModel","id":"Ext.grid.ColumnModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.EditorGridPanel.html","text":"EditorGridPanel","id":"Ext.grid.EditorGridPanel","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.grid.GridPanel.html","text":"GridPanel","id":"Ext.grid.GridPanel","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.grid.GridView.html","text":"GridView","id":"Ext.grid.GridView","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.GroupingView.html","text":"GroupingView","id":"Ext.grid.GroupingView","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.PropertyColumnModel.html","text":"PropertyColumnModel","id":"Ext.grid.PropertyColumnModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.PropertyGrid.html","text":"PropertyGrid","id":"Ext.grid.PropertyGrid","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.grid.PropertyRecord.html","text":"PropertyRecord","id":"Ext.grid.PropertyRecord","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.PropertyStore.html","text":"PropertyStore","id":"Ext.grid.PropertyStore","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.RowNumberer.html","text":"RowNumberer","id":"Ext.grid.RowNumberer","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.grid.RowSelectionModel.html","text":"RowSelectionModel","id":"Ext.grid.RowSelectionModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-layout","text":"layout","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.layout.AbsoluteLayout.html","text":"AbsoluteLayout","id":"Ext.layout.AbsoluteLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.Accordion.html","text":"Accordion","id":"Ext.layout.Accordion","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.AnchorLayout.html","text":"AnchorLayout","id":"Ext.layout.AnchorLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.BorderLayout.html","text":"BorderLayout","id":"Ext.layout.BorderLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.BorderLayout.Region.html","text":"BorderLayout.Region","id":"Ext.layout.BorderLayout.Region","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.BorderLayout.SplitRegion.html","text":"BorderLayout.SplitRegion","id":"Ext.layout.BorderLayout.SplitRegion","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.CardLayout.html","text":"CardLayout","id":"Ext.layout.CardLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.ColumnLayout.html","text":"ColumnLayout","id":"Ext.layout.ColumnLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.ContainerLayout.html","text":"ContainerLayout","id":"Ext.layout.ContainerLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.FitLayout.html","text":"FitLayout","id":"Ext.layout.FitLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.FormLayout.html","text":"FormLayout","id":"Ext.layout.FormLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.layout.TableLayout.html","text":"TableLayout","id":"Ext.layout.TableLayout","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-menu","text":"menu","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.menu.Adapter.html","text":"Adapter","id":"Ext.menu.Adapter","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.menu.BaseItem.html","text":"BaseItem","id":"Ext.menu.BaseItem","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.menu.CheckItem.html","text":"CheckItem","id":"Ext.menu.CheckItem","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.menu.ColorItem.html","text":"ColorItem","id":"Ext.menu.ColorItem","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.menu.ColorMenu.html","text":"ColorMenu","id":"Ext.menu.ColorMenu","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.menu.DateItem.html","text":"DateItem","id":"Ext.menu.DateItem","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.menu.DateMenu.html","text":"DateMenu","id":"Ext.menu.DateMenu","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.menu.Item.html","text":"Item","id":"Ext.menu.Item","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.menu.Menu.html","text":"Menu","id":"Ext.menu.Menu","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.menu.MenuMgr.html","text":"MenuMgr","id":"Ext.menu.MenuMgr","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.menu.Separator.html","text":"Separator","id":"Ext.menu.Separator","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.menu.TextItem.html","text":"TextItem","id":"Ext.menu.TextItem","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-state","text":"state","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.state.CookieProvider.html","text":"CookieProvider","id":"Ext.state.CookieProvider","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.state.Manager.html","text":"Manager","id":"Ext.state.Manager","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.state.Provider.html","text":"Provider","id":"Ext.state.Provider","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-tree","text":"tree","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.tree.AsyncTreeNode.html","text":"AsyncTreeNode","id":"Ext.tree.AsyncTreeNode","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.DefaultSelectionModel.html","text":"DefaultSelectionModel","id":"Ext.tree.DefaultSelectionModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.MultiSelectionModel.html","text":"MultiSelectionModel","id":"Ext.tree.MultiSelectionModel","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.RootTreeNodeUI.html","text":"RootTreeNodeUI","id":"Ext.tree.RootTreeNodeUI","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeDragZone.html","text":"TreeDragZone","id":"Ext.tree.TreeDragZone","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeDropZone.html","text":"TreeDropZone","id":"Ext.tree.TreeDropZone","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeEditor.html","text":"TreeEditor","id":"Ext.tree.TreeEditor","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeFilter.html","text":"TreeFilter","id":"Ext.tree.TreeFilter","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeLoader.html","text":"TreeLoader","id":"Ext.tree.TreeLoader","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeNode.html","text":"TreeNode","id":"Ext.tree.TreeNode","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeNodeUI.html","text":"TreeNodeUI","id":"Ext.tree.TreeNodeUI","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreePanel.html","text":"TreePanel","id":"Ext.tree.TreePanel","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.tree.TreeSorter.html","text":"TreeSorter","id":"Ext.tree.TreeSorter","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":0},{"id":"pkg-util","text":"util","iconCls":"icon-pkg","cls":"package","singleClickExpand":true,"children":[{"href":"output\/Ext.util.CSS.html","text":"CSS","id":"Ext.util.CSS","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.util.ClickRepeater.html","text":"ClickRepeater","id":"Ext.util.ClickRepeater","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.util.DelayedTask.html","text":"DelayedTask","id":"Ext.util.DelayedTask","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.util.Format.html","text":"Format","id":"Ext.util.Format","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.util.JSON.html","text":"JSON","id":"Ext.util.JSON","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.util.MixedCollection.html","text":"MixedCollection","id":"Ext.util.MixedCollection","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.util.Observable.html","text":"Observable","id":"Ext.util.Observable","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.util.TaskRunner.html","text":"TaskRunner","id":"Ext.util.TaskRunner","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.util.TextMetrics.html","text":"TextMetrics","id":"Ext.util.TextMetrics","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true}],"pcount":0},{"href":"output\/Ext.Action.html","text":"Action","id":"Ext.Action","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Ajax.html","text":"Ajax","id":"Ext.Ajax","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.BoxComponent.html","text":"BoxComponent","id":"Ext.BoxComponent","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Button.html","text":"Button","id":"Ext.Button","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.ColorPalette.html","text":"ColorPalette","id":"Ext.ColorPalette","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Component.html","text":"Component","id":"Ext.Component","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.ComponentMgr.html","text":"ComponentMgr","id":"Ext.ComponentMgr","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.CompositeElement.html","text":"CompositeElement","id":"Ext.CompositeElement","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.CompositeElementLite.html","text":"CompositeElementLite","id":"Ext.CompositeElementLite","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Container.html","text":"Container","id":"Ext.Container","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.CycleButton.html","text":"CycleButton","id":"Ext.CycleButton","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.DataView.html","text":"DataView","id":"Ext.DataView","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.DatePicker.html","text":"DatePicker","id":"Ext.DatePicker","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.DomHelper.html","text":"DomHelper","id":"Ext.DomHelper","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.DomQuery.html","text":"DomQuery","id":"Ext.DomQuery","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.Editor.html","text":"Editor","id":"Ext.Editor","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Element.html","text":"Element","id":"Ext.Element","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.EventManager.html","text":"EventManager","id":"Ext.EventManager","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.EventObject.html","text":"EventObject","id":"Ext.EventObject","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.Fx.html","text":"Fx","id":"Ext.Fx","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.KeyMap.html","text":"KeyMap","id":"Ext.KeyMap","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.KeyNav.html","text":"KeyNav","id":"Ext.KeyNav","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Layer.html","text":"Layer","id":"Ext.Layer","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.LoadMask.html","text":"LoadMask","id":"Ext.LoadMask","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.MessageBox.html","text":"MessageBox","id":"Ext.MessageBox","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.PagingToolbar.html","text":"PagingToolbar","id":"Ext.PagingToolbar","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Panel.html","text":"Panel","id":"Ext.Panel","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.ProgressBar.html","text":"ProgressBar","id":"Ext.ProgressBar","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.QuickTip.html","text":"QuickTip","id":"Ext.QuickTip","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.QuickTips.html","text":"QuickTips","id":"Ext.QuickTips","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.Resizable.html","text":"Resizable","id":"Ext.Resizable","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Shadow.html","text":"Shadow","id":"Ext.Shadow","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.SplitBar.html","text":"SplitBar","id":"Ext.SplitBar","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.SplitBar.AbsoluteLayoutAdapter.html","text":"SplitBar.AbsoluteLayoutAdapter","id":"Ext.SplitBar.AbsoluteLayoutAdapter","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.SplitBar.BasicLayoutAdapter.html","text":"SplitBar.BasicLayoutAdapter","id":"Ext.SplitBar.BasicLayoutAdapter","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.SplitButton.html","text":"SplitButton","id":"Ext.SplitButton","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.StoreMgr.html","text":"StoreMgr","id":"Ext.StoreMgr","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.TabPanel.html","text":"TabPanel","id":"Ext.TabPanel","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.TaskMgr.html","text":"TaskMgr","id":"Ext.TaskMgr","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.Template.html","text":"Template","id":"Ext.Template","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Tip.html","text":"Tip","id":"Ext.Tip","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.ToolTip.html","text":"ToolTip","id":"Ext.ToolTip","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.html","text":"Toolbar","id":"Ext.Toolbar","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.Button.html","text":"Toolbar.Button","id":"Ext.Toolbar.Button","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.Fill.html","text":"Toolbar.Fill","id":"Ext.Toolbar.Fill","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.Item.html","text":"Toolbar.Item","id":"Ext.Toolbar.Item","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.Separator.html","text":"Toolbar.Separator","id":"Ext.Toolbar.Separator","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.Spacer.html","text":"Toolbar.Spacer","id":"Ext.Toolbar.Spacer","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.SplitButton.html","text":"Toolbar.SplitButton","id":"Ext.Toolbar.SplitButton","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Toolbar.TextItem.html","text":"Toolbar.TextItem","id":"Ext.Toolbar.TextItem","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Updater.html","text":"Updater","id":"Ext.Updater","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Updater.BasicRenderer.html","text":"Updater.BasicRenderer","id":"Ext.Updater.BasicRenderer","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Updater.defaults.html","text":"Updater.defaults","id":"Ext.Updater.defaults","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.Viewport.html","text":"Viewport","id":"Ext.Viewport","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.Window.html","text":"Window","id":"Ext.Window","isClass":true,"iconCls":"icon-cmp","cls":"cls","leaf":true},{"href":"output\/Ext.WindowGroup.html","text":"WindowGroup","id":"Ext.WindowGroup","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.WindowMgr.html","text":"WindowMgr","id":"Ext.WindowMgr","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Ext.XTemplate.html","text":"XTemplate","id":"Ext.XTemplate","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":9},{"href":"output\/Array.html","text":"Array","id":"Array","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Date.html","text":"Date","id":"Date","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Ext.html","text":"Ext","id":"Ext","isClass":true,"iconCls":"icon-static","cls":"cls","leaf":true},{"href":"output\/Function.html","text":"Function","id":"Function","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/Number.html","text":"Number","id":"Number","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true},{"href":"output\/String.html","text":"String","id":"String","isClass":true,"iconCls":"icon-cls","cls":"cls","leaf":true}],"pcount":1} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/welcome.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/welcome.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/welcome.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,45 @@ +
        +
        + +
        +
        +
        + +
        +
        + +
        +
        +
        +

        Icon Legend

        +
          +
        • Package
        • +
        • Class
        • +
        • Singleton
        • +
        • Component
        • +
        • Method
        • +
        • Property
        • +
        • Config Option
        • +
        • Event
        • +
        +
        +
        +
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Array.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Array.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Array.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,72 @@ +
        + +

        Class Array

        + + + + + +
        Package:Global
        Defined In:Ext.js
        Class:Array
        Extends:Object
        +
        +
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Date.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Date.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Date.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,708 @@ +
        + +

        Class Date

        + + + + + +
        Package:Global
        Defined In:Date.js
        Class:Date
        Extends:Object
        +
        + The date parsing and format syntax is a subset of +PHP's date() function, and the formats that are +supported will provide results equivalent to their PHP versions. +The following is a list of all currently supported formats: +
        Format  Description                                                               Example returned values
        +------  -----------------------------------------------------------------------   -----------------------
        +  d     Day of the month, 2 digits with leading zeros                             01 to 31
        +  D     A short textual representation of the day of the week                     Mon to Sun
        +  j     Day of the month without leading zeros                                    1 to 31
        +  l     A full textual representation of the day of the week                      Sunday to Saturday
        +  N     ISO-8601 numeric representation of the day of the week                    1 (for Monday) through 7 (for Sunday)
        +  S     English ordinal suffix for the day of the month, 2 characters             st, nd, rd or th. Works well with j
        +  w     Numeric representation of the day of the week                             0 (for Sunday) to 6 (for Saturday)
        +  z     The day of the year (starting from 0)                                     0 to 364 (365 in leap years)
        +  W     ISO-8601 week number of year, weeks starting on Monday                    01 to 53
        +  F     A full textual representation of a month, such as January or March        January to December
        +  m     Numeric representation of a month, with leading zeros                     01 to 12
        +  M     A short textual representation of a month                                 Jan to Dec
        +  n     Numeric representation of a month, without leading zeros                  1 to 12
        +  t     Number of days in the given month                                         28 to 31
        +  L     Whether it's a leap year                                                  1 if it is a leap year, 0 otherwise.
        +  o     ISO-8601 year number (identical to (Y), but if the ISO week number (W)    Examples: 1998 or 2004
        +        belongs to the previous or next year, that year is used instead)
        +  Y     A full numeric representation of a year, 4 digits                         Examples: 1999 or 2003
        +  y     A two digit representation of a year                                      Examples: 99 or 03
        +  a     Lowercase Ante meridiem and Post meridiem                                 am or pm
        +  A     Uppercase Ante meridiem and Post meridiem                                 AM or PM
        +  g     12-hour format of an hour without leading zeros                           1 to 12
        +  G     24-hour format of an hour without leading zeros                           0 to 23
        +  h     12-hour format of an hour with leading zeros                              01 to 12
        +  H     24-hour format of an hour with leading zeros                              00 to 23
        +  i     Minutes, with leading zeros                                               00 to 59
        +  s     Seconds, with leading zeros                                               00 to 59
        +  u     Milliseconds, with leading zeros                                          001 to 999
        +  O     Difference to Greenwich time (GMT) in hours and minutes                   Example: +1030
        +  P     Difference to Greenwich time (GMT) with colon between hours and minutes   Example: -08:00
        +  T     Timezone abbreviation of the machine running the code                     Examples: EST, MDT, PDT ...
        +  Z     Timezone offset in seconds (negative if west of UTC, positive if east)    -43200 to 50400
        +  c     ISO 8601 date                                                             2007-04-17T15:19:21+08:00
        +  U     Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)                1193432466 or -2138434463
        +Example usage (note that you must escape format specifiers with '\\' to render them as character literals): +
        // Sample date:
        +// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
        +
        +var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
        +document.write(dt.format('Y-m-d'));                         // 2007-01-10
        +document.write(dt.format('F j, Y, g:i a'));                 // January 10, 2007, 3:05 pm
        +document.write(dt.format('l, \\t\\he jS of F Y h:i:s A'));  // Wednesday, the 10th of January 2007 03:05:01 PM
        +Here are some standard date/time patterns that you might find helpful. They +are not part of the source of Date.js, but to use them you can simply copy this +block of code into any script that is included after Date.js and they will also become +globally available on the Date object. Feel free to add or remove patterns as needed in your code. +
        Date.patterns = {
        +    ISO8601Long:"Y-m-d H:i:s",
        +    ISO8601Short:"Y-m-d",
        +    ShortDate: "n/j/Y",
        +    LongDate: "l, F d, Y",
        +    FullDateTime: "l, F d, Y g:i:s A",
        +    MonthDay: "F d",
        +    ShortTime: "g:i A",
        +    LongTime: "g:i:s A",
        +    SortableDateTime: "Y-m-d\\TH:i:s",
        +    UniversalSortableDateTime: "Y-m-d H:i:sO",
        +    YearMonth: "F, Y"
        +};
        +Example usage: +
        var dt = new Date();
        +document.write(dt.format(Date.patterns.ShortDate));
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + Date.DAY : String
        + <static> Date interval constant
        +
        Date
          + + Date.HOUR : String
        + <static> Date interval constant
        +
        Date
          + + Date.MILLI : String
        + <static> Date interval constant
        +
        Date
          + + Date.MINUTE : String
        + <static> Date interval constant
        +
        Date
          + + Date.MONTH : String
        + <static> Date interval constant
        +
        Date
          + + Date.SECOND : String
        + <static> Date interval constant
        +
        Date
          + + Date.YEAR : String
        + <static> Date interval constant
        +
        Date
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Action.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Action.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Action.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,432 @@ +
        + +

        Class Ext.Action

        + + + + + +
        Package:Ext
        Defined In:Action.js
        Class:Action
        Extends:Object
        +
        +

        An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it +can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI +updates across any components that support the Action interface (primarily Ext.Toolbar, Ext.Button +and Ext.menu.Menu components).

        +

        Aside from supporting the config object interface, any component that needs to use Actions must also support +the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string), +setDisabled(boolean), setVisible(boolean) and setHandler(function).

        +Example usage:
        +
        // Define the shared action.  Each component below will have the same
        +// display text and icon, and will display the same message on click.
        +var action = new Ext.Action({
        +    text: 'Do something',
        +    handler: function(){
        +        Ext.Msg.alert('Click', 'You did something.');
        +    },
        +    iconCls: 'do-something'
        +});
        +
        +var panel = new Ext.Panel({
        +    title: 'Actions',
        +    width:500,
        +    height:300,
        +    tbar: [
        +        // Add the action directly to a toolbar as a menu button
        +        action, {
        +            text: 'Action Menu',
        +            // Add the action to a menu as a text item
        +            menu: [action]
        +        }
        +    ],
        +    items: [
        +        // Add the action to the panel body as a standard button
        +        new Ext.Button(action)
        +    ],
        +    renderTo: Ext.getBody()
        +});
        +
        +// Change the text for all components using the action
        +action.setText('Something else');
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + disabled : Boolean
        + True to disable all components using this action, false to enable them (defaults to false).
        +
        Action
          + + hidden : Boolean
        + True to hide all components using this action, false to show them (defaults to false).
        +
        Action
          + + scope : Object
        + The scope in which the handler function will execute.
        +
        Action
          + + text : String
        + The text to set for all components using this action (defaults to '').
        +
        Action
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + isDisabled : Object
        + Returns true if the components using this action are currently disabled, else returns false. Read-only.
        +
        Action
          + + isHidden : Object
        + Returns true if the components using this action are currently hidden, else returns false. Read-only.
        +
        Action
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Ajax.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Ajax.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Ajax.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,610 @@ +
        + + +

        Class Ext.Ajax

        + + + + + +
        Package:Ext
        Defined In:Connection.js
        Class:Ajax
        Extends:Connection
        +
        + Global Ajax request class. Provides a simple way to make Ajax requests with maximum flexibility. Example usage: +
        // Basic request
        +Ext.Ajax.request({
        +   url: 'foo.php',
        +   success: someFn,
        +   failure: otherFn,
        +   headers: {
        +       'my-header': 'foo'
        +   },
        +   params: { foo: 'bar' }
        +});
        +
        +// Simple ajax form submission
        +Ext.Ajax.request({
        +    form: 'some-form',
        +    params: 'foo=bar'
        +});
        +
        +// Default headers to pass in every request
        +Ext.Ajax.defaultHeaders = {
        +    'Powered-By': 'Ext'
        +};
        +
        +// Global Ajax events can be handled on every request!
        +Ext.Ajax.on('beforerequest', this.showSpinner, this);


        This class is a singleton and cannot be created directly.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + autoAbort : Boolean
        + +Whether a new request should abort any pending requests. (defaults to false)
        +
        Ajax
          + + defaultHeaders : Object
        + +An object containing request headers which are added to each request made by this object. (defaults to undefined)
        +
        Ajax
          + + disableCaching : Boolean
        + +True to add a unique cache-buster param to GET requests. (defaults to true)
        +
        Ajax
          + + timeout : Number
        + +The timeout in milliseconds to be used for requests. (defaults to 30000)
        +
        Ajax
          + + url : String
        + +The default URL to be used for requests to the server. (defaults to undefined)
        +
        Ajax
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.BoxComponent.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.BoxComponent.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.BoxComponent.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1502 @@ +
        + +
        +
        Observable
        +  Component
        +    BoxComponent
        +

        Class Ext.BoxComponent

        + + + + + + +
        Package:Ext
        Defined In:BoxComponent.js
        Class:BoxComponent
        Subclasses:Container, DataView, ProgressBar, Toolbar, Field
        Extends:Component
        +
        + Base class for any visual Ext.Component that uses a box container. BoxComponent provides automatic box +model adjustments for sizing and positioning and will work correctly withnin the Component rendering model. All +container classes should subclass BoxComponent so that they will work consistently when nested within other Ext +layout containers.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Button.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Button.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Button.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1709 @@ +
        + +
        +
        Observable
        +  Component
        +    Button
        +

        Class Ext.Button

        + + + + + + +
        Package:Ext
        Defined In:Button.js
        Class:Button
        Subclasses:SplitButton, Toolbar.Button
        Extends:Component
        +
        + Simple Button class
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + clickEvent : String
        + The type of event to map to the button's event handler (defaults to 'click')
        +
        Button
          + + cls : String
        + A CSS class string to apply to the button's main element.
        +
        Button
          + + disabled : Boolean
        + True to start disabled (defaults to false)
        +
        Button
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableToggle : Boolean
        + True to enable pressed/not pressed toggling (defaults to false)
        +
        Button
          + + handleMouseEvents : Boolean
        + False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
        +
        Button
          + + handler : Function
        + A function called when the button is clicked (can be used instead of click event)
        +
        Button
          + + hidden : Boolean
        + True to start hidden (defaults to false)
        +
        Button
          + + iconCls : String
        + A css class which sets a background image to be used as the icon for this button
        +
        Button
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + menuAlign : String
        + The position to align the menu to (see Ext.Element.alignTo for more details, defaults to 'tl-bl?').
        +
        Button
          + + minWidth : Number
        + The minimum width for this button (used to give a set of buttons a common width)
        +
        Button
          + + pressed : Boolean
        + True to start pressed (only if enableToggle = true)
        +
        Button
          + + scope : Object
        + The scope of the handler
        +
        Button
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + tabIndex : Number
        + Set a DOM tabIndex for this button (defaults to undefined)
        +
        Button
          + + text : String
        + The button text
        +
        Button
          + + toggleGroup : String
        + The group this toggle button is a member of (only 1 per group can be pressed, only applies if enableToggle = true)
        +
        Button
          + + tooltip : String/Object
        + The tooltip for the button - can be a string or QuickTips config object
        +
        Button
          + + tooltipType : String
        + The type of tooltip to use. Either "qtip" (default) for QuickTips or "title" for title attribute.
        +
        Button
          + + type : String
        + submit, reset or button - defaults to 'button'
        +
        Button
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + Read-only. True if this button is disabled
        +
        Button
          + + hidden : Boolean
        + Read-only. True if this button is hidden
        +
        Button
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + pressed : Boolean
        + Read-only. True if this button is pressed (only if enableToggle = true)
        +
        Button
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ColorPalette.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ColorPalette.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ColorPalette.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1300 @@ +
        + +
        +
        Observable
        +  Component
        +    ColorPalette
        +

        Class Ext.ColorPalette

        + + + + + +
        Package:Ext
        Defined In:ColorPalette.js
        Class:ColorPalette
        Extends:Component
        +
        + Simple color palette class for choosing colors. The palette can be rendered to any container.
        +Here's an example of typical usage: +
        var cp = new Ext.ColorPalette({value:'993300'});  // initial selected color
        +cp.render('my-div');
        +
        +cp.on('select', function(palette, selColor){
        +    // do something with selColor
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + allowReselect : Boolean
        + If set to true then reselecting a color that is already selected fires the selection event
        +
        ColorPalette
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + The CSS class to apply to the containing element (defaults to "x-color-palette")
        +
        ColorPalette
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Component.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Component.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Component.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1262 @@ +
        + +
        +
        Observable
        +  Component
        +

        Class Ext.Component

        + + + + + + +
        Package:Ext
        Defined In:Component.js
        Class:Component
        Subclasses:BoxComponent, Button, ColorPalette, DatePicker, Editor, BaseItem
        Extends:Observable
        +
        +

        Base class for all Ext components. All subclasses of Component can automatically participate in the standard +Ext component lifecycle of creation, rendering and destruction. They also have automatic support for basic hide/show +and enable/disable behavior. Component allows any subclass to be lazy-rendered into any Ext.Container and +to be automatically registered with the Ext.ComponentMgr so that it can be referenced at any time via +Ext.getCmp. All visual widgets that require rendering into a layout should subclass Component (or +Ext.BoxComponent if managed box model handling is required).

        +

        Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the +xtype like getXType and isXType. This is the list of all valid xtypes:

        +
        xtype            Class
        +-------------    ------------------
        +box              Ext.BoxComponent
        +button           Ext.Button
        +colorpalette     Ext.ColorPalette
        +component        Ext.Component
        +container        Ext.Container
        +cycle            Ext.CycleButton
        +dataview         Ext.DataView
        +datepicker       Ext.DatePicker
        +editor           Ext.Editor
        +editorgrid       Ext.grid.EditorGridPanel
        +grid             Ext.grid.GridPanel
        +paging           Ext.PagingToolbar
        +panel            Ext.Panel
        +progress         Ext.ProgressBar
        +splitbutton      Ext.SplitButton
        +tabpanel         Ext.TabPanel
        +treepanel        Ext.tree.TreePanel
        +viewport         Ext.ViewPort
        +window           Ext.Window
        +
        +Toolbar components
        +---------------------------------------
        +toolbar          Ext.Toolbar
        +tbbutton         Ext.Toolbar.Button
        +tbfill           Ext.Toolbar.Fill
        +tbitem           Ext.Toolbar.Item
        +tbseparator      Ext.Toolbar.Separator
        +tbspacer         Ext.Toolbar.Spacer
        +tbsplit          Ext.Toolbar.SplitButton
        +tbtext           Ext.Toolbar.TextItem
        +
        +Form components
        +---------------------------------------
        +form             Ext.FormPanel
        +checkbox         Ext.form.Checkbox
        +combo            Ext.form.ComboBox
        +datefield        Ext.form.DateField
        +field            Ext.form.Field
        +fieldset         Ext.form.FieldSet
        +hidden           Ext.form.Hidden
        +htmleditor       Ext.form.HtmlEditor
        +numberfield      Ext.form.NumberField
        +radio            Ext.form.Radio
        +textarea         Ext.form.TextArea
        +textfield        Ext.form.TextField
        +timefield        Ext.form.TimeField
        +trigger          Ext.form.TriggerField
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ComponentMgr.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ComponentMgr.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ComponentMgr.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,170 @@ +
        + +

        Class Ext.ComponentMgr

        + + + + + +
        Package:Ext
        Defined In:ComponentMgr.js
        Class:ComponentMgr
        Extends:Object
        +
        +

        Provides a registry of all Components (specifically subclasses of +Ext.Component) on a page so that they can be easily accessed by +component id (see Ext.getCmp).

        +

        This object also provides a registry of available Component classes +indexed by a mnemonic code known as the Component's Ext.Component.xtype. +The xtype provides a way to avoid instantiating child Components +when creating a full, nested config object for a complete Ext page.

        +

        +A child Component may be specified simply as a config object +as long as the correct xtype is specified so that if and when the Component +needs rendering, the correct type can be looked up for lazy instantiation.

        +

        For a list of all available xtypes, see Ext.Component.



        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CompositeElement.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CompositeElement.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CompositeElement.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,309 @@ +
        + +

        Class Ext.CompositeElement

        + + + + + + +
        Package:Ext
        Defined In:CompositeElement.js
        Class:CompositeElement
        Subclasses:CompositeElementLite
        Extends:Object
        +
        + Standard composite class. Creates a Ext.Element for every element in the collection. +

        +NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element +actions will be performed on all the elements in this collection. +

        +All methods return this and can be chained. +
        var els = Ext.select("#some-el div.some-class", true);
        + // or select directly from an existing element
        + var el = Ext.get('some-el');
        + el.select('div.some-class', true);
        +
        + els.setWidth(100); // all elements become 100 width
        + els.hide(true); // all elements fade out and hide
        + // or
        + els.setWidth(100).hide(true);
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CompositeElementLite.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CompositeElementLite.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CompositeElementLite.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,311 @@ +
        + +
        +
        CompositeElement
        +  CompositeElementLite
        +

        Class Ext.CompositeElementLite

        + + + + + +
        Package:Ext
        Defined In:CompositeElement.js
        Class:CompositeElementLite
        Extends:CompositeElement
        +
        + Flyweight composite class. Reuses the same Ext.Element for element operations. +
        var els = Ext.select("#some-el div.some-class");
        + // or select directly from an existing element
        + var el = Ext.get('some-el');
        + el.select('div.some-class');
        +
        + els.setWidth(100); // all elements become 100 width
        + els.hide(true); // all elements fade out and hide
        + // or
        + els.setWidth(100).hide(true);


        +NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element +actions will be performed on all the elements in this collection.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Container.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Container.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Container.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1971 @@ +
        + + +

        Class Ext.Container

        + + + + + + +
        Package:Ext
        Defined In:Container.js
        Class:Container
        Subclasses:Panel, Viewport
        Extends:BoxComponent
        +
        + Base class for any Ext.BoxComponent that can contain other components. Containers handle the basic +behavior of containing items, namely adding, inserting and removing them. The specific layout logic required +to visually render contained items is delegated to any one of the different layout classes available. +This class is intended to be extended and should generally not need to be created directly via the new keyword.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CycleButton.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CycleButton.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.CycleButton.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1913 @@ +
        + +
        +
        Observable
        +  Component
        +    Button
        +      SplitButton
        +        CycleButton
        +

        Class Ext.CycleButton

        + + + + + +
        Package:Ext
        Defined In:CycleButton.js
        Class:CycleButton
        Extends:SplitButton
        +
        + A specialized SplitButton that contains a menu of Ext.menu.CheckItem elements. The button automatically +cycles through each menu item on click, raising the button's change event (or calling the button's +changeHandler function, if supplied) for the active menu item. Clicking on the arrow section of the +button displays the dropdown menu just like a normal SplitButton. Example usage: +
        var btn = new Ext.CycleButton({
        +    showText: true,
        +    prependText: 'View as ',
        +    items: [{
        +        text:'text only',
        +        iconCls:'view-text',
        +        checked:true
        +    },{
        +        text:'HTML',
        +        iconCls:'view-html'
        +    }],
        +    changeHandler:function(btn, item){
        +        Ext.Msg.alert('Change View', item.text);
        +    }
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + arrowHandler : Function
        + A function called when the arrow button is clicked (can be used instead of click event)
        +
        SplitButton
          + + arrowTooltip : String
        + The title attribute of the arrow
        +
        SplitButton
          + + clickEvent : String
        + The type of event to map to the button's event handler (defaults to 'click')
        +
        Button
          + + disabled : Boolean
        + True to start disabled (defaults to false)
        +
        Button
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableToggle : Boolean
        + True to enable pressed/not pressed toggling (defaults to false)
        +
        Button
          + + handleMouseEvents : Boolean
        + False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
        +
        Button
          + + handler : Function
        + A function called when the button is clicked (can be used instead of click event)
        +
        Button
          + + hidden : Boolean
        + True to start hidden (defaults to false)
        +
        Button
          + + iconCls : String
        + A css class which sets a background image to be used as the icon for this button
        +
        Button
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + menuAlign : String
        + The position to align the menu to (see Ext.Element.alignTo for more details, defaults to 'tl-bl?').
        +
        Button
          + + minWidth : Number
        + The minimum width for this button (used to give a set of buttons a common width)
        +
        Button
          + + pressed : Boolean
        + True to start pressed (only if enableToggle = true)
        +
        Button
          + + scope : Object
        + The scope of the handler
        +
        Button
          + + showText : Boolean
        + True to display the active item's text as the button text (defaults to false)
        +
        CycleButton
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + tabIndex : Number
        + Set a DOM tabIndex for this button (defaults to undefined)
        +
        Button
          + + text : String
        + The button text
        +
        Button
          + + toggleGroup : String
        + The group this toggle button is a member of (only 1 per group can be pressed, only applies if enableToggle = true)
        +
        Button
          + + tooltip : String/Object
        + The tooltip for the button - can be a string or QuickTips config object
        +
        Button
          + + tooltipType : String
        + The type of tooltip to use. Either "qtip" (default) for QuickTips or "title" for title attribute.
        +
        Button
          + + type : String
        + submit, reset or button - defaults to 'button'
        +
        Button
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + pressed : Boolean
        + Read-only. True if this button is pressed (only if enableToggle = true)
        +
        Button
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DataView.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DataView.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DataView.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2147 @@ +
        + + +

        Class Ext.DataView

        + + + + + +
        Package:Ext
        Defined In:DataView.js
        Class:DataView
        Extends:BoxComponent
        +
        + A mechanism for displaying data using custom layout templates and formatting. DataView uses an Ext.XTemplate +as its internal templating mechanisma, and is bound to an Ext.data.Store +so that as the data in the store changes the view is automatically updated to reflect the changes. The view also +provides built-in behavior for many common events that can occur for its contained items including click, doubleclick, +mouseover, mouseout, etc. as well as a built-in selection model. In order to use these features, an itemSelector +config must be provided for the DataView to determine what nodes it will be working with. +

        The example below binds a DataView to a Ext.data.Store and renders it into an Ext.Panel.

        +
        var store = new Ext.data.JsonStore({
        +    url: 'get-images.php',
        +    root: 'images',
        +    fields: [
        +        'name', 'url',
        +        {name:'size', type: 'float'},
        +        {name:'lastmod', type:'date', dateFormat:'timestamp'}
        +    ]
        +});
        +store.load();
        +
        +var tpl = new Ext.XTemplate(
        +    '<tpl for=".">',
        +        '<div class="thumb-wrap" id="{name}">',
        +        '<div class="thumb"><img src="{url}" title="{name}"></div>',
        +        '<span class="x-editable">{shortName}</span></div>',
        +    '</tpl>',
        +    '<div class="x-clear"></div>'
        +);
        +
        +var panel = new Ext.Panel({
        +    id:'images-view',
        +    frame:true,
        +    width:535,
        +    autoHeight:true,
        +    collapsible:true,
        +    layout:'fit',
        +    title:'Simple DataView',
        +
        +    items: new Ext.DataView({
        +        store: store,
        +        tpl: tpl,
        +        autoHeight:true,
        +        multiSelect: true,
        +        overClass:'x-view-over',
        +        itemSelector:'div.thumb-wrap',
        +        emptyText: 'No images to display'
        +    })
        +});
        +panel.render(document.body);
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + emptyText : String
        + The text to display in the view when there is no data to display (defaults to '').
        +
        DataView
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + overClass : String
        + A CSS class to apply to each item in the view on mouseover (defaults to undefined).
        +
        DataView
          + + selectedClass : String
        + A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
        +
        DataView
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + store : Ext.data.Store
        + The Ext.data.Store to bind this DataView to.
        +
        DataView
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DatePicker.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DatePicker.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DatePicker.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1443 @@ +
        + +
        +
        Observable
        +  Component
        +    DatePicker
        +

        Class Ext.DatePicker

        + + + + + +
        Package:Ext
        Defined In:DatePicker.js
        Class:DatePicker
        Extends:Component
        +
        + Simple date picker class.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + cancelText : String
        + The text to display on the cancel button
        +
        DatePicker
          + + constrainToViewport : Boolean
        + True to constrain the date picker to the viewport (defaults to true)
        +
        DatePicker
          + + dayNames : Array
        + An array of textual day names which can be overriden for localization support (defaults to Date.dayNames)
        +
        DatePicker
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + disabledDatesRE : RegExp
        + JavaScript regular expression used to disable a pattern of dates (defaults to null)
        +
        DatePicker
          + + disabledDatesText : String
        + The tooltip text to display when the date falls on a disabled date (defaults to "")
        +
        DatePicker
          + + disabledDays : Array
        + An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
        +
        DatePicker
          + + disabledDaysText : String
        + The tooltip to display when the date falls on a disabled day (defaults to "")
        +
        DatePicker
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + maxDate : Date
        + Maximum allowable date (JavaScript date object, defaults to null)
        +
        DatePicker
          + + maxText : String
        + The error text to display if the maxDate validation fails (defaults to "This date is after the maximum date")
        +
        DatePicker
          + + minDate : Date
        + Minimum allowable date (JavaScript date object, defaults to null)
        +
        DatePicker
          + + minText : String
        + The error text to display if the minDate validation fails (defaults to "This date is before the minimum date")
        +
        DatePicker
          + + monthNames : Array
        + An array of textual month names which can be overriden for localization support (defaults to Date.monthNames)
        +
        DatePicker
          + + monthYearText : String
        + The header month selector tooltip (defaults to 'Choose a month (Control+Up/Down to move years)')
        +
        DatePicker
          + + nextText : String
        + The next month navigation button tooltip (defaults to 'Next Month (Control+Right)')
        +
        DatePicker
          + + okText : String
        + The text to display on the ok button
        +
        DatePicker
          + + prevText : String
        + The previous month navigation button tooltip (defaults to 'Previous Month (Control+Left)')
        +
        DatePicker
          + + startDay : Number
        + Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)
        +
        DatePicker
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + todayText : String
        + The text to display on the button that selects the current date (defaults to "Today")
        +
        DatePicker
          + + todayTip : String
        + The tooltip to display for the button that selects the current date (defaults to "{current date} (Spacebar)")
        +
        DatePicker
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DomHelper.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DomHelper.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DomHelper.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,239 @@ +
        + +

        Class Ext.DomHelper

        + + + + + +
        Package:Ext
        Defined In:DomHelper.js
        Class:DomHelper
        Extends:Object
        +
        + Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
        +This is an example, where an unordered list with 5 children items is appended to an existing element with id 'my-div':
        +
        var list = dh.append('my-div', {
        +    tag: 'ul', cls: 'my-list', children: [
        +        {tag: 'li', id: 'item0', html: 'List Item 0'}, 
        +        {tag: 'li', id: 'item1', html: 'List Item 1'}, 
        +        {tag: 'li', id: 'item2', html: 'List Item 2'}, 
        +        {tag: 'li', id: 'item3', html: 'List Item 3'}, 
        +        {tag: 'li', id: 'item4', html: 'List Item 4'}
        +    ]
        +});
        +For more information and examples, see the original blog post.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + useDom : Boolean
        + True to force the use of DOM instead of html fragments
        +
        DomHelper
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DomQuery.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DomQuery.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.DomQuery.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,275 @@ +
        + +

        Class Ext.DomQuery

        + + + + + +
        Package:Ext
        Defined In:DomQuery.js
        Class:DomQuery
        Extends:Object
        +
        + * +Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). +

        +DomQuery supports most of the CSS3 selectors spec, along with some custom selectors and basic XPath.

        + +

        +All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure. +

        +

        Element Selectors:

        +
          +
        • * any element
        • +
        • E an element with the tag E
        • +
        • E F All descendent elements of E that have the tag F
        • +
        • E > F or E/F all direct children elements of E that have the tag F
        • +
        • E + F all elements with the tag F that are immediately preceded by an element with the tag E
        • +
        • E ~ F all elements with the tag F that are preceded by a sibling element with the tag E
        • +
        +

        Attribute Selectors:

        +

        The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.

        +
          +
        • E[foo] has an attribute "foo"
        • +
        • E[foo=bar] has an attribute "foo" that equals "bar"
        • +
        • E[foo^=bar] has an attribute "foo" that starts with "bar"
        • +
        • E[foo$=bar] has an attribute "foo" that ends with "bar"
        • +
        • E[foo*=bar] has an attribute "foo" that contains the substring "bar"
        • +
        • E[foo%=2] has an attribute "foo" that is evenly divisible by 2
        • +
        • E[foo!=bar] has an attribute "foo" that does not equal "bar"
        • +
        +

        Pseudo Classes:

        +
          +
        • E:first-child E is the first child of its parent
        • +
        • E:last-child E is the last child of its parent
        • +
        • E:nth-child(n) E is the nth child of its parent (1 based as per the spec)
        • +
        • E:nth-child(odd) E is an odd child of its parent
        • +
        • E:nth-child(even) E is an even child of its parent
        • +
        • E:only-child E is the only child of its parent
        • +
        • E:checked E is an element that is has a checked attribute that is true (e.g. a radio or checkbox)
        • +
        • E:first the first E in the resultset
        • +
        • E:last the last E in the resultset
        • +
        • E:nth(n) the nth E in the resultset (1 based)
        • +
        • E:odd shortcut for :nth-child(odd)
        • +
        • E:even shortcut for :nth-child(even)
        • +
        • E:contains(foo) E's innerHTML contains the substring "foo"
        • +
        • E:nodeValue(foo) E contains a textNode with a nodeValue that equals "foo"
        • +
        • E:not(S) an E element that does not match simple selector S
        • +
        • E:has(S) an E element that has a descendent that matches simple selector S
        • +
        • E:next(S) an E element whose next sibling matches simple selector S
        • +
        • E:prev(S) an E element whose previous sibling matches simple selector S
        • +
        +

        CSS Value Selectors:

        +
          +
        • E{display=none} css value "display" that equals "none"
        • +
        • E{display^=none} css value "display" that starts with "none"
        • +
        • E{display$=none} css value "display" that ends with "none"
        • +
        • E{display*=none} css value "display" that contains the substring "none"
        • +
        • E{display%=2} css value "display" that is evenly divisible by 2
        • +
        • E{display!=none} css value "display" that does not equal "none"
        • +


        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + matchers : Object
        + Collection of matching regular expressions and code snippets.
        +
        DomQuery
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Editor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Editor.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Editor.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1554 @@ +
        + +
        +
        Observable
        +  Component
        +    Editor
        +

        Class Ext.Editor

        + + + + + + +
        Package:Ext
        Defined In:Editor.js
        Class:Editor
        Subclasses:TreeEditor
        Extends:Component
        +
        + A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + alignment : String
        + The position to align to (see Ext.Element.alignTo for more details, defaults to "c-c?").
        +
        Editor
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + cancelOnEsc : Boolean
        + True to cancel the edit when the escape key is pressed (defaults to false)
        +
        Editor
          + + completeOnEnter : Boolean
        + True to complete the edit when the enter key is pressed (defaults to false)
        +
        Editor
          + + constrain : Boolean
        + True to constrain the editor to the viewport
        +
        Editor
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + hideEl : Boolean
        + False to keep the bound element visible while the editor is displayed (defaults to true)
        +
        Editor
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + shadow : Boolean/String
        + "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to "frame")
        +
        Editor
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + swallowKeys : Boolean
        + Handle the keydown/keypress events so they don't propagate (defaults to true)
        +
        Editor
          + + updateEl : Boolean
        + True to update the innerHTML of the bound element when the update completes (defaults to false)
        +
        Editor
          + + value : Mixed
        + The data value of the underlying field (defaults to "")
        +
        Editor
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Element.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Element.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Element.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3161 @@ +
        + +

        Class Ext.Element

        + + + + + + +
        Package:Ext
        Defined In:Element.js
        Class:Element
        Subclasses:Layer
        Extends:Object
        +
        + Represents an Element in the DOM.

        +Usage:
        +
        var el = Ext.get("my-div");
        +
        +// or with getEl
        +var el = getEl("my-div");
        +
        +// or with a DOM element
        +var el = Ext.get(myDivElement);
        +Using Ext.get() or getEl() instead of calling the constructor directly ensures you get the same object +each call instead of constructing a new one.

        +Animations
        +Many of the functions for manipulating an element have an optional "animate" parameter. The animate parameter +should either be a boolean (true) or an object literal with animation options. Note that the supported Element animation +options are a subset of the Ext.Fx animation options specific to Fx effects. The Element animation options are: +
        Option    Default   Description
        +--------- --------  ---------------------------------------------
        +duration  .35       The duration of the animation in seconds
        +easing    easeOut   The easing method
        +callback  none      A function to execute when the anim completes
        +scope     this      The scope (this) of the callback function
        +Also, the Anim object being used for the animation will be set on your options object as "anim", which allows you to stop or +manipulate the animation. Here's an example: +
        var el = Ext.get("my-div");
        +
        +// no animation
        +el.setWidth(100);
        +
        +// default animation
        +el.setWidth(100, true);
        +
        +// animation with some options set
        +el.setWidth(100, {
        +    duration: 1,
        +    callback: this.foo,
        +    scope: this
        +});
        +
        +// using the "anim" property to get the Anim object
        +var opt = {
        +    duration: 1,
        +    callback: this.foo,
        +    scope: this
        +};
        +el.setWidth(100, opt);
        +...
        +if(opt.anim.isAnimated()){
        +    opt.anim.stop();
        +}
        + Composite (Collections of) Elements
        +For working with collections of Elements, see Ext.CompositeElement
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + Element.DISPLAY : Number
        + <static> Visibility mode constant - Use display to hide element
        +
        Element
          + + Element.VISIBILITY : Number
        + <static> Visibility mode constant - Use visibility to hide element
        +
        Element
          + + defaultUnit : String
        + The default unit to append to CSS values where a unit isn't provided (defaults to px).
        +
        Element
          + + dom : HTMLElement
        + The DOM element
        +
        Element
          + + id : String
        + The DOM element ID
        +
        Element
          + + originalDisplay : String
        + The element's default display mode (defaults to "")
        +
        Element
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.EventManager.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.EventManager.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.EventManager.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,240 @@ +
        + +

        Class Ext.EventManager

        + + + + + +
        Package:Ext
        Defined In:EventManager.js
        Class:EventManager
        Extends:Object
        +
        + Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides +several useful events directly. +See Ext.EventObject for more details on normalized event objects.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + ieDeferSrc : Object
        + Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL)
        +
        EventManager
          + + textResizeInterval : Object
        + The frequency, in milliseconds, to check for text resize events (defaults to 50)
        +
        EventManager
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.EventObject.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.EventObject.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.EventObject.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,538 @@ +
        + +

        Class Ext.EventObject

        + + + + + +
        Package:Ext
        Defined In:EventManager.js
        Class:EventObject
        Extends:Object
        +
        + EventObject exposes the Yahoo! UI Event functionality directly on the object +passed to your event handler. It exists mostly for convenience. It also fixes the annoying null checks automatically to cleanup your code +Example: +
        function handleClick(e){ // e is not a standard event object, it is a Ext.EventObject
        +    e.preventDefault();
        +    var target = e.getTarget();
        +    ...
        + }
        + var myDiv = Ext.get("myDiv");
        + myDiv.on("click", handleClick);
        + //or
        + Ext.EventManager.on("myDiv", 'click', handleClick);
        + Ext.EventManager.addListener("myDiv", 'click', handleClick);


        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + BACKSPACE : Number
        + Key constant
        +
        EventObject
          + + CONTROL : Number
        + Key constant
        +
        EventObject
          + + DELETE : Number
        + Key constant
        +
        EventObject
          + + DOWN : Number
        + Key constant
        +
        EventObject
          + + END : Number
        + Key constant
        +
        EventObject
          + + ENTER : Number
        + Key constant
        +
        EventObject
          + + ESC : Number
        + Key constant
        +
        EventObject
          + + F5 : Number
        + Key constant
        +
        EventObject
          + + HOME : Number
        + Key constant
        +
        EventObject
          + + LEFT : Number
        + Key constant
        +
        EventObject
          + + PAGEDOWN : Number
        + Key constant
        +
        EventObject
          + + PAGEUP : Number
        + Key constant
        +
        EventObject
          + + RETURN : Number
        + Key constant
        +
        EventObject
          + + RIGHT : Number
        + Key constant
        +
        EventObject
          + + SHIFT : Number
        + Key constant
        +
        EventObject
          + + SPACE : Number
        + Key constant
        +
        EventObject
          + + TAB : Number
        + Key constant
        +
        EventObject
          + + UP : Number
        + Key constant
        +
        EventObject
          + + altKey : Object
        + True if the alt key was down during the event
        +
        EventObject
          + + browserEvent : Object
        + The normal browser event
        +
        EventObject
          + + button : Object
        + The button pressed in a mouse event
        +
        EventObject
          + + ctrlKey : Object
        + True if the control key was down during the event
        +
        EventObject
          + + shiftKey : Object
        + True if the shift key was down during the event
        +
        EventObject
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Fx.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Fx.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Fx.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,705 @@ +
        + +

        Class Ext.Fx

        + + + + + +
        Package:Ext
        Defined In:Fx.js
        Class:Fx
        Extends:Object
        +
        +

        A class to provide basic animation and visual effects support. Note: This class is automatically applied +to the Ext.Element interface when included, so all effects calls should be performed via Element. +Conversely, since the effects are not actually defined in Element, Ext.Fx must be included in order for the +Element effects to work.


        +

        It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that +they return the Element object itself as the method return value, it is not always possible to mix the two in a single +method chain. The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced. +Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately. For this reason, +while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the +expected results and should be done with care.


        +

        Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element +that will serve as either the start or end point of the animation. Following are all of the supported anchor positions:

        +
        Value  Description
        +-----  -----------------------------
        +tl     The top left corner
        +t      The center of the top edge
        +tr     The top right corner
        +l      The center of the left edge
        +r      The center of the right edge
        +bl     The bottom left corner
        +b      The center of the bottom edge
        +br     The bottom right corner
        +Although some Fx methods accept specific custom config parameters, the ones shown in the Config Options section +below are common options that can be passed to any Fx method.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + afterCls : String
        + A css class to apply after the effect
        +
        Fx
          + + block : Boolean
        + Whether the effect should block other effects from queueing while it runs
        +
        Fx
          + + duration : Number
        + The length of time (in seconds) that the effect should last
        +
        Fx
          + + easing : String
        + A valid Easing value for the effect
        +
        Fx
          + + remove : Boolean
        + Whether the Element should be removed from the DOM and destroyed after the effect finishes
        +
        Fx
          + + scope : Object
        + The scope of the effect function
        +
        Fx
          + + stopFx : Boolean
        + Whether subsequent effects should be stopped and removed after the current effect finishes
        +
        Fx
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.KeyMap.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.KeyMap.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.KeyMap.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,235 @@ +
        + +

        Class Ext.KeyMap

        + + + + + +
        Package:Ext
        Defined In:KeyMap.js
        Class:KeyMap
        Extends:Object
        +
        + Handles mapping keys to actions for an element. One key map can be used for multiple actions. +The constructor accepts the same config object as defined by addBinding. +If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key +combination it will call the function with this signature (if the match is a multi-key +combination the callback will still be called only once): (String key, Ext.EventObject e) +A KeyMap can also handle a string representation of keys.
        +Usage: +
        // map one key by key code
        +var map = new Ext.KeyMap("my-element", {
        +    key: 13, // or Ext.EventObject.ENTER
        +    fn: myHandler,
        +    scope: myObject
        +});
        +
        +// map multiple keys to one action by string
        +var map = new Ext.KeyMap("my-element", {
        +    key: "a\r\n\t",
        +    fn: myHandler,
        +    scope: myObject
        +});
        +
        +// map multiple keys to multiple actions by strings and array of codes
        +var map = new Ext.KeyMap("my-element", [
        +    {
        +        key: [10,13],
        +        fn: function(){ alert("Return was pressed"); }
        +    }, {
        +        key: "abc",
        +        fn: function(){ alert('a, b or c was pressed'); }
        +    }, {
        +        key: "\t",
        +        ctrl:true,
        +        shift:true,
        +        fn: function(){ alert('Control + shift + tab was pressed.'); }
        +    }
        +]);
        +Note: A KeyMap starts enabled
        + +
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.KeyNav.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.KeyNav.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.KeyNav.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,150 @@ +
        + +

        Class Ext.KeyNav

        + + + + + +
        Package:Ext
        Defined In:KeyNav.js
        Class:KeyNav
        Extends:Object
        +
        +

        Provides a convenient wrapper for normalized keyboard navigation. KeyNav allows you to bind +navigation keys to function calls that will get called when the keys are pressed, providing an easy +way to implement custom navigation schemes for any UI component.

        +

        The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc, +pageUp, pageDown, del, home, end. Usage:

        +
        var nav = new Ext.KeyNav("my-element", {
        +    "left" : function(e){
        +        this.moveLeft(e.ctrlKey);
        +    },
        +    "right" : function(e){
        +        this.moveRight(e.ctrlKey);
        +    },
        +    "enter" : function(e){
        +        this.save();
        +    },
        +    scope : this
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + disabled : Boolean
        + True to disable this KeyNav instance (defaults to false)
        +
        KeyNav
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Layer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Layer.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Layer.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3151 @@ +
        + +
        +
        Element
        +  Layer
        +

        Class Ext.Layer

        + + + + + +
        Package:Ext
        Defined In:Layer.js
        Class:Layer
        Extends:Element
        +
        + An extended Ext.Element object that supports a shadow and shim, constrain to viewport and +automatic maintaining of shadow/shim positions.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + cls : String
        + CSS class to add to the element
        +
        Layer
          + + constrain : Boolean
        + False to disable constrain to viewport (defaults to true)
        +
        Layer
          + + dh : Object
        + DomHelper object config to create element with (defaults to {tag: "div", cls: "x-layer"}).
        +
        Layer
          + + shadowOffset : Number
        + Number of pixels to offset the shadow (defaults to 3)
        +
        Layer
          + + shim : Boolean
        + False to disable the iframe shim in browsers which need one (defaults to true)
        +
        Layer
          + + zindex : Number
        + Starting z-index (defaults to 11000)
        +
        Layer
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + defaultUnit : String
        + The default unit to append to CSS values where a unit isn't provided (defaults to px).
        +
        Element
          + + dom : HTMLElement
        + The DOM element
        +
        Element
          + + id : String
        + The DOM element ID
        +
        Element
          + + originalDisplay : String
        + The element's default display mode (defaults to "")
        +
        Element
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.LoadMask.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.LoadMask.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.LoadMask.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,149 @@ +
        + +

        Class Ext.LoadMask

        + + + + + +
        Package:Ext
        Defined In:LoadMask.js
        Class:LoadMask
        Extends:Object
        +
        + A simple utility class for generically masking elements while loading data. If the element being masked has +an underlying Ext.data.Store, the masking will be automatically synchronized with the store's loading +process and the mask element will be cached for reuse. For all other elements, this mask will replace the +element's Updater load indicator and will be destroyed after the initial load.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + msg : String
        + The text to display in a centered loading message box (defaults to 'Loading...')
        +
        LoadMask
          + + msgCls : String
        + The CSS class to apply to the loading message element (defaults to "x-mask-loading")
        +
        LoadMask
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + Read-only. True if the mask is currently disabled so that it will not be displayed (defaults to false)
        +
        LoadMask
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.MessageBox.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.MessageBox.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.MessageBox.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,521 @@ +
        + +

        Class Ext.MessageBox

        + + + + + +
        Package:Ext
        Defined In:MessageBox.js
        Class:MessageBox
        Extends:Object
        +
        +

        Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.

        +

        Note that the MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt +browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code +that should only run after some user feedback from the MessageBox, you must use a callback function +(see the function parameter for show for more details).

        +

        Example usage:

        +
        // Basic alert:
        +Ext.Msg.alert('Status', 'Changes saved successfully.');
        +
        +// Prompt for user data and process the result using a callback:
        +Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
        +    if (btn == 'ok'){
        +        // process text value and close...
        +    }
        +});
        +
        +// Show a dialog using config options:
        +Ext.Msg.show({
        +   title:'Save Changes?',
        +   msg: 'Your are closing a tab that has unsaved changes. Would you like to save your changes?',
        +   buttons: Ext.Msg.YESNOCANCEL,
        +   fn: processResult,
        +   animEl: 'elId',
        +   icon: Ext.MessageBox.QUESTION
        +});


        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + CANCEL : Object
        + Button config that displays a single Cancel button
        +
        MessageBox
          + + ERROR : String
        + The CSS class that provides the ERROR icon image
        +
        MessageBox
          + + INFO : String
        + The CSS class that provides the INFO icon image
        +
        MessageBox
          + + OK : Object
        + Button config that displays a single OK button
        +
        MessageBox
          + + OKCANCEL : Object
        + Button config that displays OK and Cancel buttons
        +
        MessageBox
          + + QUESTION : String
        + The CSS class that provides the QUESTION icon image
        +
        MessageBox
          + + WARNING : String
        + The CSS class that provides the WARNING icon image
        +
        MessageBox
          + + YESNO : Object
        + Button config that displays Yes and No buttons
        +
        MessageBox
          + + YESNOCANCEL : Object
        + Button config that displays Yes, No and Cancel buttons
        +
        MessageBox
          + + defaultTextHeight : Number
        + The default height in pixels of the message box's multiline textarea if displayed (defaults to 75)
        +
        MessageBox
          + + maxWidth : Number
        + The maximum width in pixels of the message box (defaults to 600)
        +
        MessageBox
          + + minWidth : Number
        + The minimum width in pixels of the message box (defaults to 100)
        +
        MessageBox
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.PagingToolbar.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.PagingToolbar.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.PagingToolbar.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1896 @@ +
        + +
        +
        Observable
        +  Component
        +    BoxComponent
        +      Toolbar
        +        PagingToolbar
        +

        Class Ext.PagingToolbar

        + + + + + +
        Package:Ext
        Defined In:PagingToolbar.js
        Class:PagingToolbar
        Extends:Toolbar
        +
        + A specialized toolbar that is bound to a Ext.data.Store and provides automatic paging controls.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + displayInfo : Boolean
        + True to display the displayMsg (defaults to false)
        +
        PagingToolbar
          + + emptyMsg : String
        + The message to display when no records are found (defaults to "No data to display")
        +
        PagingToolbar
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + pageSize : Number
        + The number of records to display per page (defaults to 20)
        +
        PagingToolbar
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + store : Ext.data.Store
        + The Ext.data.Store the paging toolbar should use as its data source (required).
        +
        PagingToolbar
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + afterPageText : String
        + Customizable piece of the default paging text (defaults to "of %0")
        +
        PagingToolbar
          + + beforePageText : String
        + Customizable piece of the default paging text (defaults to "Page")
        +
        PagingToolbar
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + firstText : String
        + Customizable piece of the default paging text (defaults to "First Page")
        +
        PagingToolbar
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + lastText : String
        + Customizable piece of the default paging text (defaults to "Last Page")
        +
        PagingToolbar
          + + nextText : String
        + Customizable piece of the default paging text (defaults to "Next Page")
        +
        PagingToolbar
          + + paramNames : Object
        + Object mapping of parameter names for load calls (defaults to {start: 'start', limit: 'limit'})
        +
        PagingToolbar
          + + prevText : String
        + Customizable piece of the default paging text (defaults to "Previous Page")
        +
        PagingToolbar
          + + refreshText : String
        + Customizable piece of the default paging text (defaults to "Refresh")
        +
        PagingToolbar
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Panel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Panel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Panel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2923 @@ +
        + + +

        Class Ext.Panel

        + + + + + + +
        Package:Ext
        Defined In:Panel.js
        Class:Panel
        Subclasses:TabPanel, Tip, Window, FieldSet, FormPanel, GridPanel, TreePanel
        Extends:Container
        +
        + Panel is a container that has specific functionality and structural components that make it the perfect building +block for application-oriented user interfaces. The Panel contains bottom and top toolbars, along with separate +header, footer and body sections. It also provides built-in expandable and collapsible behavior, along with a +variety of prebuilt tool buttons that can be wired up to provide other customized behavior. Panels can be easily +dropped into any Container or layout, and the layout and rendering pipeline is completely managed by the framework.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ProgressBar.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ProgressBar.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ProgressBar.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1688 @@ +
        + +
        +
        Observable
        +  Component
        +    BoxComponent
        +      ProgressBar
        +

        Class Ext.ProgressBar

        + + + + + +
        Package:Ext
        Defined In:ProgressBar.js
        Class:ProgressBar
        Extends:BoxComponent
        +
        +

        An updateable progress bar component. The progress bar supports two different modes: manual and automatic.

        +

        In manual mode, you are responsible for showing, updating (via updateProgress) and clearing the +progress bar as needed from your own code. This method is most appropriate when you want to show progress +throughout an operation that has predictable points of interest at which you can update the control.

        +

        In automatic mode, you simply call wait and let the progress bar run indefinitely, only clearing it +once the operation is complete. You can optionally have the progress bar wait for a specific amount of time +and then clear itself. Automatic mode is most appropriate for timed operations or asymchronous operations in +which you have no need for indicating intermediate progress.

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress')
        +
        ProgressBar
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + id : String
        + The progress bar element's id (defaults to an auto-generated id)
        +
        ProgressBar
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + text : String
        + The progress bar text (defaults to '')
        +
        ProgressBar
          + + textEl : Mixed
        + The element to render the progress text to (defaults to the progress bar's internal text element)
        +
        ProgressBar
          + + value : Float
        + A floating point value between 0 and 1 (e.g., .5, defaults to 0)
        +
        ProgressBar
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.QuickTip.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.QuickTip.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.QuickTip.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3144 @@ +
        + + +

        Class Ext.QuickTip

        + + + + + +
        Package:Ext
        Defined In:QuickTip.js
        Class:QuickTip
        Extends:ToolTip
        +
        + A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global +Ext.QuickTips instance. See the QuickTips class header for additional usage details and examples.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + closable : Boolean
        + True to render a close tool button into the tooltip header (defaults to false).
        +
        Tip
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + interceptTitles : Boolean
        + True to automatically use the element's DOM title value if available (defaults to false).
        +
        QuickTip
          + + maxWidth : Number
        + The maximum width of the tip in pixels (defaults to 300).
        +
        Tip
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minWidth : Number
        + The minimum width of the tip in pixels (defaults to 40).
        +
        Tip
          + + mouseOffset : Array
        + An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]).
        +
        ToolTip
          + + showDelay : Number
        + Delay in milliseconds before the tooltip displays after the mouse enters the target element (defaults to 500)
        +
        ToolTip
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + target : Mixed
        + The target HTMLElement, Ext.Element or id to associate with this quicktip (defaults to the document).
        +
        QuickTip
          + + trackMouse : Boolean
        + True to have the tooltip follow the mouse as it moves over the target element (defaults to false).
        +
        ToolTip
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.QuickTips.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.QuickTips.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.QuickTips.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,253 @@ +
        + +

        Class Ext.QuickTips

        + + + + + +
        Package:Ext
        Defined In:QuickTips.js
        Class:QuickTips
        Extends:Object
        +
        +

        Provides attractive and customizable tooltips for any element. The QuickTips +singleton is used to configure and manage tooltips globally for multiple elements +in a generic manner. To create individual tooltips with maximum customizability, +you should consider either Ext.Tip or Ext.ToolTip.

        +

        Quicktips can be configured via tag attributes directly in markup, or by +registering quick tips programmatically via the register method.

        +

        The singleton's instance of Ext.QuickTip is available via +getQuickTip, and supports all the methods, and all the all the +configuration properties of Ext.QuickTip. These settings will apply to all +tooltips shown by the singleton.

        +

        Below is the summary of the configuration properties which can be used. +For detailed descriptions see getQuickTip

        +

        QuickTips singleton configs (all are optional)

        +
        • dismissDelay
        • +
        • hideDelay
        • +
        • maxWidth
        • +
        • minWidth
        • +
        • showDelay
        • +
        • trackMouse
        +

        Target element configs (optional unless otherwise noted)

        +
        • autoHide
        • +
        • cls
        • +
        • dismissDelay (overrides singleton value)
        • +
        • target (required)
        • +
        • text (required)
        • +
        • title
        • +
        • width
        +

        Here is an example showing how some of these config options could be used:

        +
        // Init the singleton.  Any tag-based quick tips will start working.
        +Ext.QuickTips.init();
        +
        +// Apply a set of config properties to the singleton
        +Ext.apply(Ext.QuickTips.getQuickTip(), {
        +    maxWidth: 200,
        +    minWidth: 100,
        +    showDelay: 50,
        +    trackMouse: true
        +});
        +
        +// Manually register a quick tip for a specific element
        +q.register({
        +    target: 'my-div',
        +    title: 'My Tooltip',
        +    text: 'This tooltip was added in code',
        +    width: 100,
        +    dismissDelay: 20
        +});
        +

        To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with +the ext: namespace. The HTML element itself is automatically set as the quick tip target. Here is the summary +of supported attributes (optional unless otherwise noted):

        +
        • hide: Specifying "user" is equivalent to setting autoHide = false. Any other value will be the +same as autoHide = true.
        • +
        • qclass: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).
        • +
        • qtip (required): The quick tip text (equivalent to the 'text' target element config).
        • +
        • qtitle: The quick tip title (equivalent to the 'title' target element config).
        • +
        • qwidth: The quick tip width (equivalent to the 'width' target element config).
        +

        Here is an example of configuring an HTML element to display a tooltip from markup:

        +
        // Add a quick tip to an HTML button
        +<input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100"
        +     ext:qtip="This is a quick tip from markup!"></input>


        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Resizable.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Resizable.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Resizable.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,658 @@ +
        + +
        +
        Observable
        +  Resizable
        +

        Class Ext.Resizable

        + + + + + +
        Package:Ext
        Defined In:Resizable.js
        Class:Resizable
        Extends:Observable
        +
        +

        Applies drag handles to an element to make it resizable. The drag handles are inserted into the element +and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap +the textarea in a div and set "resizeChild" to true (or to the id of the element), or set wrap:true in your config and +the element will be wrapped for you automatically.

        +

        Here is the list of valid resize handles:

        +
        Value   Description
        +------  -------------------
        + 'n'     north
        + 's'     south
        + 'e'     east
        + 'w'     west
        + 'nw'    northwest
        + 'sw'    southwest
        + 'se'    southeast
        + 'ne'    northeast
        + 'all'   all
        +

        Here's an example showing the creation of a typical Resizable:

        +
        var resizer = new Ext.Resizable("element-id", {
        +    handles: 'all',
        +    minWidth: 200,
        +    minHeight: 100,
        +    maxWidth: 500,
        +    maxHeight: 400,
        +    pinned: true
        +});
        +resizer.on("resize", myHandler);
        +

        To hide a particular handle, set its display to none in CSS, or through script:
        +resizer.east.setDisplayed(false);

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + animate : Boolean
        + True to animate the resize (not compatible with dynamic sizing, defaults to false)
        +
        Resizable
          + + disableTrackOver : Boolean
        + True to disable mouse tracking. This is only applied at config time. (defaults to false)
        +
        Resizable
          + + draggable : Boolean
        + Convenience to initialize drag drop (defaults to false)
        +
        Resizable
          + + duration : Number
        + Animation duration if animate = true (defaults to .35)
        +
        Resizable
          + + dynamic : Boolean
        + True to resize the element while dragging instead of using a proxy (defaults to false)
        +
        Resizable
          + + easing : String
        + Animation easing if animate = true (defaults to 'easingOutStrong')
        +
        Resizable
          + + enabled : Boolean
        + False to disable resizing (defaults to true)
        +
        Resizable
          + + handles : String
        + String consisting of the resize handles to display (defaults to undefined)
        +
        Resizable
          + + height : Number
        + The height of the element in pixels (defaults to null)
        +
        Resizable
          + + heightIncrement : Number
        + The increment to snap the height resize in pixels (dynamic must be true, defaults to 0)
        +
        Resizable
          + + maxHeight : Number
        + The maximum height for the element (defaults to 10000)
        +
        Resizable
          + + maxWidth : Number
        + The maximum width for the element (defaults to 10000)
        +
        Resizable
          + + minHeight : Number
        + The minimum height for the element (defaults to 5)
        +
        Resizable
          + + minWidth : Number
        + The minimum width for the element (defaults to 5)
        +
        Resizable
          + + minX : Number
        + The minimum allowed page X for the element (only used for west resizing, defaults to 0)
        +
        Resizable
          + + minY : Number
        + The minimum allowed page Y for the element (only used for north resizing, defaults to 0)
        +
        Resizable
          + + preserveRatio : Boolean
        + True to preserve the original ratio between height and width during resize (defaults to false)
        +
        Resizable
          + + resizeChild : Boolean/String/Element
        + True to resize the first child, or id/element to resize (defaults to false)
        +
        Resizable
          + + resizeRegion : Ext.lib.Region
        + Constrain the resize to a particular region
        +
        Resizable
          + + transparent : Boolean
        + True for transparent handles. This is only applied at config time. (defaults to false)
        +
        Resizable
          + + width : Number
        + The width of the element in pixels (defaults to null)
        +
        Resizable
          + + widthIncrement : Number
        + The increment to snap the width resize in pixels (dynamic must be true, defaults to 0)
        +
        Resizable
          + + wrap : Boolean
        + True to wrap an element with a div if needed (required for textareas and images, defaults to false)
        +
        Resizable
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Shadow.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Shadow.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Shadow.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,186 @@ +
        + +

        Class Ext.Shadow

        + + + + + +
        Package:Ext
        Defined In:Shadow.js
        Class:Shadow
        Extends:Object
        +
        + Simple class that can provide a shadow effect for any element. Note that the element MUST be absolutely positioned, +and the shadow does not provide any shimming. This should be used only in simple cases -- for more advanced +functionality that can also provide the same shadow effect, see the Ext.Layer class.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + offset : String
        + The number of pixels to offset the shadow from the element (defaults to 4)
        +
        Shadow
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.AbsoluteLayoutAdapter.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.AbsoluteLayoutAdapter.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.AbsoluteLayoutAdapter.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,136 @@ +
        + +
        +
        SplitBar.BasicLayoutAdapter
        +  SplitBar.AbsoluteLayoutAdapter
        +

        Class Ext.SplitBar.AbsoluteLayoutAdapter

        + + + + + +
        Package:Ext
        Defined In:SplitBar.js
        Class:SplitBar.AbsoluteLayoutAdapter
        Extends:SplitBar.BasicLayoutAdapter
        +
        + Adapter that moves the splitter element to align with the resized sizing element. +Used with an absolute positioned SplitBar.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + SplitBar.AbsoluteLayoutAdapter.BOTTOM : Number
        + <static> Placement constant - The resizing element is positioned under splitter element
        +
        SplitBar.AbsoluteLayoutAdapter
          + + SplitBar.AbsoluteLayoutAdapter.HORIZONTAL : Number
        + <static> Orientation constant - Create a horizontal SplitBar
        +
        SplitBar.AbsoluteLayoutAdapter
          + + SplitBar.AbsoluteLayoutAdapter.LEFT : Number
        + <static> Placement constant - The resizing element is to the left of the splitter element
        +
        SplitBar.AbsoluteLayoutAdapter
          + + SplitBar.AbsoluteLayoutAdapter.RIGHT : Number
        + <static> Placement constant - The resizing element is to the right of the splitter element
        +
        SplitBar.AbsoluteLayoutAdapter
          + + SplitBar.AbsoluteLayoutAdapter.TOP : Number
        + <static> Placement constant - The resizing element is positioned above the splitter element
        +
        SplitBar.AbsoluteLayoutAdapter
          + + SplitBar.AbsoluteLayoutAdapter.VERTICAL : Number
        + <static> Orientation constant - Create a vertical SplitBar
        +
        SplitBar.AbsoluteLayoutAdapter
        + +

        Public Methods

        + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.BasicLayoutAdapter.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.BasicLayoutAdapter.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.BasicLayoutAdapter.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,74 @@ +
        + +

        Class Ext.SplitBar.BasicLayoutAdapter

        + + + + + + +
        Package:Ext
        Defined In:SplitBar.js
        Class:SplitBar.BasicLayoutAdapter
        Subclasses:SplitBar.AbsoluteLayoutAdapter
        Extends:Object
        +
        + Default Adapter. It assumes the splitter and resizing element are not positioned +elements and only gets/sets the width of the element. Generally used for table based layouts.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitBar.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,591 @@ +
        + +
        +
        Observable
        +  SplitBar
        +

        Class Ext.SplitBar

        + + + + + +
        Package:Ext
        Defined In:SplitBar.js
        Class:SplitBar
        Extends:Observable
        +
        + Creates draggable splitter bar functionality from two elements (element to be dragged and element to be resized). +

        +Usage: +
        var split = new Ext.SplitBar("elementToDrag", "elementToSize",
        +                   Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
        +split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
        +split.minSize = 100;
        +split.maxSize = 600;
        +split.animate = true;
        +split.on('moved', splitterMoved);
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + animate : Boolean
        + Whether to animate the transition to the new size
        +
        SplitBar
          + + maxSize : Number
        + The maximum size of the resizing element. (Defaults to 2000)
        +
        SplitBar
          + + minSize : Number
        + The minimum size of the resizing element. (Defaults to 0)
        +
        SplitBar
          + + useShim : Boolean
        + Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes.
        +
        SplitBar
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitButton.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitButton.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.SplitButton.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1770 @@ +
        + +
        +
        Observable
        +  Component
        +    Button
        +      SplitButton
        +

        Class Ext.SplitButton

        + + + + + + +
        Package:Ext
        Defined In:SplitButton.js
        Class:SplitButton
        Subclasses:CycleButton, Toolbar.SplitButton
        Extends:Button
        +
        + A split button that provides a built-in dropdown arrow that can fire an event separately from the default +click event of the button. Typically this would be used to display a dropdown menu that provides additional +options to the primary button action, but any custom handler can provide the arrowclick implementation.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + arrowHandler : Function
        + A function called when the arrow button is clicked (can be used instead of click event)
        +
        SplitButton
          + + arrowTooltip : String
        + The title attribute of the arrow
        +
        SplitButton
          + + clickEvent : String
        + The type of event to map to the button's event handler (defaults to 'click')
        +
        Button
          + + disabled : Boolean
        + True to start disabled (defaults to false)
        +
        Button
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableToggle : Boolean
        + True to enable pressed/not pressed toggling (defaults to false)
        +
        Button
          + + handleMouseEvents : Boolean
        + False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
        +
        Button
          + + handler : Function
        + A function called when the button is clicked (can be used instead of click event)
        +
        Button
          + + hidden : Boolean
        + True to start hidden (defaults to false)
        +
        Button
          + + iconCls : String
        + A css class which sets a background image to be used as the icon for this button
        +
        Button
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + menuAlign : String
        + The position to align the menu to (see Ext.Element.alignTo for more details, defaults to 'tl-bl?').
        +
        Button
          + + minWidth : Number
        + The minimum width for this button (used to give a set of buttons a common width)
        +
        Button
          + + pressed : Boolean
        + True to start pressed (only if enableToggle = true)
        +
        Button
          + + scope : Object
        + The scope of the handler
        +
        Button
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + tabIndex : Number
        + Set a DOM tabIndex for this button (defaults to undefined)
        +
        Button
          + + text : String
        + The button text
        +
        Button
          + + toggleGroup : String
        + The group this toggle button is a member of (only 1 per group can be pressed, only applies if enableToggle = true)
        +
        Button
          + + tooltip : String/Object
        + The tooltip for the button - can be a string or QuickTips config object
        +
        Button
          + + tooltipType : String
        + The type of tooltip to use. Either "qtip" (default) for QuickTips or "title" for title attribute.
        +
        Button
          + + type : String
        + submit, reset or button - defaults to 'button'
        +
        Button
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + pressed : Boolean
        + Read-only. True if this button is pressed (only if enableToggle = true)
        +
        Button
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.StoreMgr.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.StoreMgr.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.StoreMgr.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1064 @@ +
        + + +

        Class Ext.StoreMgr

        + + + + + +
        Package:Ext
        Defined In:StoreMgr.js
        Class:StoreMgr
        Extends:MixedCollection
        +
        + The default global group of stores.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.TabPanel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.TabPanel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.TabPanel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3394 @@ +
        + + +

        Class Ext.TabPanel

        + + + + + +
        Package:Ext
        Defined In:TabPanel.js
        Class:TabPanel
        Extends:Panel
        +
        +

        A basic tab container. Tab panels can be used exactly like a standard Ext.Panel for layout +purposes, but also have special support for containing child Panels that get automatically converted into tabs.

        +

        There is no actual tab class — each tab is simply an Ext.Panel. However, when rendered in a +TabPanel, each child Panel can fire additional events that only exist for tabs and are not available to other +Panels. These are:

        +
          +
        • activate: Fires when this Panel becomes the active tab. +
          +Listeners will be called with the following arguments: +
          • tab : Panel
            The tab that was activated
          +
        • +
        • deactivate: Fires when this Panel that was the active tab becomes deactivated. +
          +Listeners will be called with the following arguments: +
          • tab : Panel
            The tab that was deactivated
          +
        • +
        +

        There are several methods available for creating TabPanels. The output of the following examples should be +exactly the same. The tabs can be created and rendered completely in code, as in this example:

        +
        
        +var tabs = new Ext.TabPanel({
        +    renderTo: Ext.getBody(),
        +    activeTab: 0,
        +    items: [{
        +        title: 'Tab 1',
        +        html: 'A simple tab'
        +    },{
        +        title: 'Tab 2',
        +        html: 'Another one'
        +    }]
        +});
        +

        TabPanels can also be rendered from markup in a couple of ways. See the autoTabs example for +rendering entirely from markup that is already structured correctly as a TabPanel (a container div with +one or more nested tab divs with class 'x-tab'). You can also render from markup that is not strictly +structured by simply specifying by id which elements should be the container and the tabs. Using this method, +tab content can be pulled from different elements within the page by id regardless of page structure. Note +that the tab divs in this example contain the class 'x-hide-display' so that they can be rendered deferred +without displaying outside the tabs. You could alternately set deferredRender to false to render all +content tabs on page load. For example: +

        
        +var tabs = new Ext.TabPanel({
        +    renderTo: 'my-tabs',
        +    activeTab: 0,
        +    items:[
        +        {contentEl:'tab1', title:'Tab 1'},
        +        {contentEl:'tab2', title:'Tab 2'}
        +    ]
        +});
        +
        +// Note that the tabs do not have to be nested within the container (although they can be)
        +<div id="my-tabs"></div>
        +<div id="tab1" class="x-hide-display">A simple tab</div>
        +<div id="tab2" class="x-hide-display">Another one</div>
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeTab : String/Number
        + A string id or the numeric index of the tab that should be initially activated on render (defaults to none).
        +
        TabPanel
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class applied to the panel (defaults to 'x-tab-panel').
        +
        TabPanel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + layoutOnTabChange : Boolean
        + Set to true to do a layout of tab items as tabs are changed.
        +
        TabPanel
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minTabWidth : Number
        + The minimum width in pixels for each tab when resizeTabs = true (defaults to 30).
        +
        TabPanel
          + + monitorResize : Boolean
        + True to automatically monitor window resize events and rerender the layout on browser resize (defaults to true).
        +
        TabPanel
          + + plain : Boolean
        + True to render the tab strip without a background container image (defaults to false).
        +
        TabPanel
          + + scrollRepeatInterval : Number
        + Number of milliseconds between each scroll while a tab scroll button is continuously pressed (defaults to 400).
        +
        TabPanel
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + tabWidth : Number
        + The initial width in pixels of each new tab (defaults to 120).
        +
        TabPanel
          + + wheelIncrement : Number
        + For scrolling tabs, the number of pixels to increment on mouse wheel scrolling (defaults to 20).
        +
        TabPanel
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.TaskMgr.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.TaskMgr.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.TaskMgr.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,35 @@ +
        + +

        Class Ext.TaskMgr

        + + + + + +
        Package:Ext
        Defined In:TaskMgr.js
        Class:TaskMgr
        Extends:Object
        +
        + A static Ext.util.TaskRunner instance that can be used to start and stop arbitrary tasks. See +Ext.util.TaskRunner for supported methods and task config properties. +
        // Start a simple clock task that updates a div once per second
        +var task = {
        +    run: function(){
        +        Ext.fly('clock').update(new Date().format('g:i:s A'));
        +    },
        +    interval: 1000 //1 second
        +}
        +Ext.TaskMgr.start(task);


        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Template.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Template.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,286 @@ +
        + +

        Class Ext.Template

        + + + + + + +
        Package:Ext
        Defined In:Template.js
        Class:Template
        Subclasses:XTemplate
        Extends:Object
        +
        + Represents an HTML fragment template. Templates can be precompiled for greater performance. +For a list of available format functions, see Ext.util.Format.
        +Usage: +
        var t = new Ext.Template(
        +    '<div name="{id}">',
        +        '<span class="{cls}">{name:trim} {value:ellipsis(10)}</span>',
        +    '</div>'
        +);
        +t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});
        +For more information see this blog post with examples: DomHelper - Create Elements using DOM, HTML fragments and Templates.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disableFormats : Boolean
        + True to disable format functions (defaults to false)
        +
        Template
          + + re : RegExp
        + The regular expression used to match template variables
        +
        Template
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Tip.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Tip.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Tip.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3013 @@ +
        + + +

        Class Ext.Tip

        + + + + + + +
        Package:Ext
        Defined In:Tip.js
        Class:Tip
        Subclasses:ToolTip
        Extends:Panel
        +
        + This is the base class for Ext.QuickTip and Ext.Tooltip that provides the basic layout and +positioning that all tip-based classes require. This class can be used directly for simple, statically-positioned +tips that are displayed programmatically, or it can be extended to provide custom tip implementations.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + closable : Boolean
        + True to render a close tool button into the tooltip header (defaults to false).
        +
        Tip
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + maxWidth : Number
        + The maximum width of the tip in pixels (defaults to 300).
        +
        Tip
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minWidth : Number
        + The minimum width of the tip in pixels (defaults to 40).
        +
        Tip
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ToolTip.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ToolTip.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.ToolTip.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3084 @@ +
        + + +

        Class Ext.ToolTip

        + + + + + + +
        Package:Ext
        Defined In:ToolTip.js
        Class:ToolTip
        Subclasses:QuickTip
        Extends:Tip
        +
        + A standard tooltip implementation for providing additional information when hovering over a target element.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + closable : Boolean
        + True to render a close tool button into the tooltip header (defaults to false).
        +
        Tip
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + maxWidth : Number
        + The maximum width of the tip in pixels (defaults to 300).
        +
        Tip
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minWidth : Number
        + The minimum width of the tip in pixels (defaults to 40).
        +
        Tip
          + + mouseOffset : Array
        + An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]).
        +
        ToolTip
          + + showDelay : Number
        + Delay in milliseconds before the tooltip displays after the mouse enters the target element (defaults to 500)
        +
        ToolTip
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + target : Mixed
        + The target HTMLElement, Ext.Element or id to associate with this tooltip.
        +
        ToolTip
          + + trackMouse : Boolean
        + True to have the tooltip follow the mouse as it moves over the target element (defaults to false).
        +
        ToolTip
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Button.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Button.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Button.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1713 @@ +
        + +
        +
        Observable
        +  Component
        +    Button
        +      Toolbar.Button
        +

        Class Ext.Toolbar.Button

        + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar.Button
        Extends:Button
        +
        + A button that renders into a toolbar.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + clickEvent : String
        + The type of event to map to the button's event handler (defaults to 'click')
        +
        Button
          + + disabled : Boolean
        + True to start disabled (defaults to false)
        +
        Button
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableToggle : Boolean
        + True to enable pressed/not pressed toggling (defaults to false)
        +
        Button
          + + handleMouseEvents : Boolean
        + False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
        +
        Button
          + + handler : Function
        + A function called when the button is clicked (can be used instead of click event)
        +
        Button
          + + hidden : Boolean
        + True to start hidden (defaults to false)
        +
        Button
          + + iconCls : String
        + A css class which sets a background image to be used as the icon for this button
        +
        Button
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + menuAlign : String
        + The position to align the menu to (see Ext.Element.alignTo for more details, defaults to 'tl-bl?').
        +
        Button
          + + minWidth : Number
        + The minimum width for this button (used to give a set of buttons a common width)
        +
        Button
          + + pressed : Boolean
        + True to start pressed (only if enableToggle = true)
        +
        Button
          + + scope : Object
        + The scope of the handler
        +
        Button
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + tabIndex : Number
        + Set a DOM tabIndex for this button (defaults to undefined)
        +
        Button
          + + text : String
        + The button text
        +
        Button
          + + toggleGroup : String
        + The group this toggle button is a member of (only 1 per group can be pressed, only applies if enableToggle = true)
        +
        Button
          + + tooltip : String/Object
        + The tooltip for the button - can be a string or QuickTips config object
        +
        Button
          + + tooltipType : String
        + The type of tooltip to use. Either "qtip" (default) for QuickTips or "title" for title attribute.
        +
        Button
          + + type : String
        + submit, reset or button - defaults to 'button'
        +
        Button
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + pressed : Boolean
        + Read-only. True if this button is pressed (only if enableToggle = true)
        +
        Button
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Fill.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Fill.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Fill.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,216 @@ +
        + +
        +
        Toolbar.Item
        +  Toolbar.Spacer
        +    Toolbar.Fill
        +

        Class Ext.Toolbar.Fill

        + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar.Fill
        Extends:Toolbar.Spacer
        +
        + A simple element that adds a greedy (100% width) horizontal space to a toolbar.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Item.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Item.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Item.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,213 @@ +
        + +

        Class Ext.Toolbar.Item

        + + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar.Item
        Subclasses:Toolbar.Separator, Toolbar.Spacer, Toolbar.TextItem
        Extends:Object
        +
        + The base class that other classes should extend in order to get some basic common toolbar item functionality.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Separator.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Separator.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Separator.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,215 @@ +
        + +
        +
        Toolbar.Item
        +  Toolbar.Separator
        +

        Class Ext.Toolbar.Separator

        + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar.Separator
        Extends:Toolbar.Item
        +
        + A simple toolbar separator class
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Spacer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Spacer.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.Spacer.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,216 @@ +
        + +
        +
        Toolbar.Item
        +  Toolbar.Spacer
        +

        Class Ext.Toolbar.Spacer

        + + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar.Spacer
        Subclasses:Toolbar.Fill
        Extends:Toolbar.Item
        +
        + A simple element that adds extra horizontal space to a toolbar.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.SplitButton.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.SplitButton.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.SplitButton.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1768 @@ +
        + +
        +
        Observable
        +  Component
        +    Button
        +      SplitButton
        +        Toolbar.SplitButton
        +

        Class Ext.Toolbar.SplitButton

        + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar.SplitButton
        Extends:SplitButton
        +
        + A menu button that renders into a toolbar.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + arrowHandler : Function
        + A function called when the arrow button is clicked (can be used instead of click event)
        +
        SplitButton
          + + arrowTooltip : String
        + The title attribute of the arrow
        +
        SplitButton
          + + clickEvent : String
        + The type of event to map to the button's event handler (defaults to 'click')
        +
        Button
          + + disabled : Boolean
        + True to start disabled (defaults to false)
        +
        Button
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableToggle : Boolean
        + True to enable pressed/not pressed toggling (defaults to false)
        +
        Button
          + + handleMouseEvents : Boolean
        + False to disable visual cues on mouseover, mouseout and mousedown (defaults to true)
        +
        Button
          + + handler : Function
        + A function called when the button is clicked (can be used instead of click event)
        +
        Button
          + + hidden : Boolean
        + True to start hidden (defaults to false)
        +
        Button
          + + iconCls : String
        + A css class which sets a background image to be used as the icon for this button
        +
        Button
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + menuAlign : String
        + The position to align the menu to (see Ext.Element.alignTo for more details, defaults to 'tl-bl?').
        +
        Button
          + + minWidth : Number
        + The minimum width for this button (used to give a set of buttons a common width)
        +
        Button
          + + pressed : Boolean
        + True to start pressed (only if enableToggle = true)
        +
        Button
          + + scope : Object
        + The scope of the handler
        +
        Button
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + tabIndex : Number
        + Set a DOM tabIndex for this button (defaults to undefined)
        +
        Button
          + + text : String
        + The button text
        +
        Button
          + + toggleGroup : String
        + The group this toggle button is a member of (only 1 per group can be pressed, only applies if enableToggle = true)
        +
        Button
          + + tooltip : String/Object
        + The tooltip for the button - can be a string or QuickTips config object
        +
        Button
          + + tooltipType : String
        + The type of tooltip to use. Either "qtip" (default) for QuickTips or "title" for title attribute.
        +
        Button
          + + type : String
        + submit, reset or button - defaults to 'button'
        +
        Button
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + pressed : Boolean
        + Read-only. True if this button is pressed (only if enableToggle = true)
        +
        Button
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.TextItem.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.TextItem.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.TextItem.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,215 @@ +
        + +
        +
        Toolbar.Item
        +  Toolbar.TextItem
        +

        Class Ext.Toolbar.TextItem

        + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar.TextItem
        Extends:Toolbar.Item
        +
        + A simple class that renders text directly into a toolbar.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Toolbar.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1736 @@ +
        + + +

        Class Ext.Toolbar

        + + + + + + +
        Package:Ext
        Defined In:Toolbar.js
        Class:Toolbar
        Subclasses:PagingToolbar
        Extends:BoxComponent
        +
        + Basic Toolbar class.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.BasicRenderer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.BasicRenderer.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.BasicRenderer.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,55 @@ +
        + +

        Class Ext.Updater.BasicRenderer

        + + + + + +
        Package:Ext
        Defined In:UpdateManager.js
        Class:Updater.BasicRenderer
        Extends:Object
        +
        + Default Content renderer. Updates the elements innerHTML with the responseText.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.defaults.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.defaults.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.defaults.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,86 @@ +
        + +

        Class Ext.Updater.defaults

        + + + + + +
        Package:Ext
        Defined In:UpdateManager.js
        Class:Updater.defaults
        Extends:Object
        +
        + The defaults collection enables customizing the default properties of Updater
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disableCaching : Boolean
        + Whether to append unique parameter on get request to disable caching (Defaults to false).
        +
        Updater.defaults
          + + indicatorText : String
        + Text for loading indicator (Defaults to '<div class="loading-indicator">Loading...</div>').
        +
        Updater.defaults
          + + loadScripts : Boolean
        + True to process scripts by default (Defaults to false).
        +
        Updater.defaults
          + + showLoadIndicator : Boolean
        + Whether to show indicatorText when loading (Defaults to true).
        +
        Updater.defaults
          + + sslBlankUrl : String
        + Blank page URL to use with SSL file uploads (Defaults to "javascript:false").
        +
        Updater.defaults
          + + timeout : Number
        + Timeout for requests or form posts in seconds (Defaults 30 seconds).
        +
        Updater.defaults
        + +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Updater.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,833 @@ +
        + +
        +
        Observable
        +  Updater
        +

        Class Ext.Updater

        + + + + + +
        Package:Ext
        Defined In:UpdateManager.js
        Class:Updater
        Extends:Observable
        +
        + Provides AJAX-style update for Element object.

        +Usage:
        +
        // Get it from a Ext.Element object
        +var el = Ext.get("foo");
        +var mgr = el.getUpdater();
        +mgr.update({
        +url: "http://myserver.com/index.php", 
        +params: {
        +param1: "foo",
        +param2: "bar"
        +}
        +});
        +...
        +mgr.formUpdate("myFormId", "http://myserver.com/index.php");
        +
        +// or directly (returns the same Updater instance) +var mgr = new Ext.Updater("myElementId"); +mgr.startAutoRefresh(60, "http://myserver.com/index.php"); +mgr.on("update", myFcnNeedsToKnow); +
        + // short handed call directly from the element object + Ext.get("foo").load({ + url: "bar.php", + scripts: true, + params: "param1=foo&param2=bar", + text: "Loading Foo..." + });
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + defaultUrl : String
        + Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true.
        +
        Updater
          + + el : Ext.Element
        + The Element object
        +
        Updater
          + + loadScripts : Boolean
        + True to process scripts in the output (Defaults to Ext.Updater.defaults.loadScripts (false)).
        +
        Updater
          + + refreshDelegate : Function
        + Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments
        +
        Updater
          + + renderer : Object
        + The renderer for this Updater. Defaults to Ext.Updater.BasicRenderer.
        +
        Updater
          + + showLoadIndicator : String
        + Whether to show indicatorText when loading (Defaults to Ext.Updater.defaults.showLoadIndicator or true).
        +
        Updater
          + + sslBlankUrl : String
        + Blank page URL to use with SSL file uploads (Defaults to Ext.Updater.defaults.sslBlankUrl or "about:blank").
        +
        Updater
          + + timeout : Number
        + Timeout for requests or form posts in seconds (Defaults to Ext.Updater.defaults.timeout or 30 seconds).
        +
        Updater
          + + transaction : Object
        + Transaction object of current executing transaction
        +
        Updater
          + + updateDelegate : Function
        + Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments
        +
        Updater
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Viewport.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Viewport.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Viewport.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1950 @@ +
        + + +

        Class Ext.Viewport

        + + + + + +
        Package:Ext
        Defined In:Viewport.js
        Class:Viewport
        Extends:Container
        +
        + A specialized container representing the viewable application area (the browser viewport). +

        The Viewport renders itself to the document body, and automatically sizes itself to the size of +the browser viewport and manages window resizing. There may only be one Viewport created +in a page. Inner layouts are available by virtue of the fact that all Panels +added to the Viewport, either through its items, or through the items, or the add +method of any of its child Panels may themselves have a layout.

        +

        The Viewport does not provide scrolling, so child Panels within the Viewport should provide +for scrolling if needed using the autoScroll config.

        +Example showing a classic application border layout :
        new Ext.Viewport({
        +    layout: 'border',
        +    defaults: {
        +        activeItem: 0,
        +    },
        +    items: [{
        +        region: 'north',
        +        html: '

        Page Title

        '
        , + autoHeight: true, + border: false, + margins: '0 0 5 0' + }, { + region: 'west', + collapsible: true, + title: 'Navigation', + xtype: 'treepanel', + width: 200, + autoScroll: true, + split: true, + loader: new Ext.tree.TreeLoader(), + root: new Ext.tree.AsyncTreeNode({ + expanded: true, + children: [{ + text: 'Menu Option 1', + leaf: true + }, { + text: 'Menu Option 2', + leaf: true + }, { + text: 'Menu Option 3', + leaf: true + }] + }), + rootVisible: false, + listeners: { + click: function(n) { + Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"'); + } + } + }, { + region: 'center', + xtype: 'tabpanel', + items: { + title: 'Default Tab', + html: 'The first tab\'s content. Others may be added dynamically' + } + }, { + region: 'south', + title: 'Information', + collapsible: true, + html: 'Information goes here', + split: true, + height: 100, + minHeight: 100 + }] +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Window.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Window.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.Window.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3362 @@ +
        + + +

        Class Ext.Window

        + + + + + +
        Package:Ext
        Defined In:Window.js
        Class:Window
        Extends:Panel
        +
        + A specialized panel intended for use as an application window. Windows are floated and draggable by default, and +also provide specific behavior like the ability to maximize and restore (with an event for minimizing, since the +minimize behavior is application-specific). Windows can also be linked to a Ext.WindowGroup or managed +by the Ext.WindowManager to provide grouping, activation, to front/back and other application-specific behavior.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + animateTarget : String/Element
        + Id or element from which the window should animate while opening (defaults to null with no animation).
        +
        Window
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-window').
        +
        Window
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultButton : String/Number/Button
        + The id / index of a button or a button instance to focus when this window received the focus.
        +
        Window
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + manager : Ext.WindowGroup
        + A reference to the WindowGroup that should manage this window (defaults to Ext.WindowMgr).
        +
        Window
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minHeight : Number
        + The minimum height in pixels allowed for this window (defaults to 100). Only applies when resizable = true.
        +
        Window
          + + minWidth : Number
        + The minimum width in pixels allowed for this window (defaults to 200). Only applies when resizable = true.
        +
        Window
          + + resizable : Boolean
        + True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true).
        +
        Window
          + + resizeHandles : String
        + A valid Ext.Resizable handles config string (defaults to 'all'). Only applies when resizable = true.
        +
        Window
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.WindowGroup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.WindowGroup.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.WindowGroup.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,215 @@ +
        + +

        Class Ext.WindowGroup

        + + + + + + +
        Package:Ext
        Defined In:WindowManager.js
        Class:WindowGroup
        Subclasses:WindowMgr
        Extends:Object
        +
        + An object that represents a group of Ext.Window instances and provides z-order management +and window activation behavior.
        + +
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + zseed : Number
        + The starting z-index for windows (defaults to 9000)
        +
        WindowGroup
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.WindowMgr.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.WindowMgr.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.WindowMgr.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,197 @@ +
        + +
        +
        WindowGroup
        +  WindowMgr
        +

        Class Ext.WindowMgr

        + + + + + +
        Package:Ext
        Defined In:WindowManager.js
        Class:WindowMgr
        Extends:WindowGroup
        +
        + The default global window group that is available automatically. To have more than one group of windows +with separate z-order stacks, create additional instances of Ext.WindowGroup as needed.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + zseed : Number
        + The starting z-index for windows (defaults to 9000)
        +
        WindowGroup
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.XTemplate.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.XTemplate.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.XTemplate.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,374 @@ +
        + +
        +
        Template
        +  XTemplate
        +

        Class Ext.XTemplate

        + + + + + +
        Package:Ext
        Defined In:XTemplate.js
        Class:XTemplate
        Extends:Template
        +
        +

        A template class that supports advanced functionality like autofilling arrays, conditional processing with +basic comparison operators, sub-templates, basic math function support, special built-in template variables, +inline code execution and more. XTemplate also provides the templating mechanism built into Ext.DataView.

        +

        XTemplate supports many special tags and built-in operators that aren't defined as part of the API, but are +supported in the templates that can be created. The following examples demonstrate all of the supported features. +This is the data object used for reference in each code example:

        +
        var data = {
        +    name: 'Jack Slocum',
        +    title: 'Lead Developer',
        +    company: 'Ext JS, LLC',
        +    email: 'jack@extjs.com',
        +    address: '4 Red Bulls Drive',
        +    city: 'Cleveland',
        +    state: 'Ohio',
        +    zip: '44102',
        +    drinks: ['Red Bull', 'Coffee', 'Water'],
        +    kids: [{
        +        name: 'Sara Grace',
        +        age:3
        +    },{
        +        name: 'Zachary',
        +        age:2
        +    },{
        +        name: 'John James',
        +        age:0
        +    }]
        +};
        +

        Auto filling of arrays and scope switching
        Using the tpl tag and the for operator, +you can switch to the scope of the object specified by for and access its members to populate the teamplte. +If the variable in for is an array, it will auto-fill, repeating the template block inside the tpl +tag for each item in the array:

        +
        var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Title: {title}</p>',
        +    '<p>Company: {company}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<p>{name}</p>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +

        Access to parent object from within sub-template scope
        When processing a sub-template, for example while +looping through a child array, you can access the parent object's members via the parent object:

        +
        var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="age > 1">',
        +            '<p>{name}</p>',
        +            '<p>Dad: {parent.name}</p>',
        +        '</tpl>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +

        Array item index and basic math support
        While processing an array, the special variable {#} +will provide the current array index + 1 (starts at 1, not 0). Templates also support the basic math operators ++ - * and / that can be applied directly on numeric data values:

        +
        var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="age > 1">',
        +            '<p>{#}: {name}</p>',  // <-- Auto-number each item
        +            '<p>In 5 Years: {age+5}</p>',  // <-- Basic math
        +            '<p>Dad: {parent.name}</p>',
        +        '</tpl>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +

        Auto-rendering of flat arrays
        Flat arrays that contain values (and not objects) can be auto-rendered +using the special {.} variable inside a loop. This variable will represent the value of +the array at the current index:

        +
        var tpl = new Ext.XTemplate(
        +    '<p>{name}\'s favorite beverages:</p>',
        +    '<tpl for="drinks">',
        +       '<div> - {.}</div>',
        +    '</tpl>'
        +);
        +tpl.overwrite(panel.body, data);
        +

        Basic conditional logic
        Using the tpl tag and the if +operator you can provide conditional checks for deciding whether or not to render specific parts of the template. +Note that there is no else operator — if needed, you should use two opposite if statements. +Properly-encoded attributes are required as seen in the following example:

        +
        var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="age &gt; 1">',  // <-- Note that the > is encoded
        +            '<p>{name}</p>',
        +        '</tpl>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +

        Ability to execute arbitrary inline code
        In an XTemplate, anything between {[ ... ]} is considered +code to be executed in the scope of the template. There are some special variables available in that code: +

          +
        • values: The values in the current scope. If you are using scope changing sub-templates, you +can change what values is.
        • +
        • parent: The scope (values) of the ancestor template.
        • +
        • xindex: If you are in a looping template, the index of the loop you are in (1-based).
        • +
        • xcount: If you are in a looping template, the total length of the array you are looping.
        • +
        • fm: An alias for Ext.util.Format.
        • +
        +This example demonstrates basic row striping using an inline code block and the xindex variable:

        +
        var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Company: {[company.toUpperCase() + ', ' + title]}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +       '<div class="{[xindex % 2 === 0 ? "even" : "odd"]}">,
        +        '{name}',
        +        '</div>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +

        Template member functions
        One or more member functions can be defined directly on the config +object passed into the XTemplate constructor for more complex processing:

        +
        var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="this.isGirl(name)">',
        +            '<p>Girl: {name} - {age}</p>',
        +        '</tpl>',
        +        '<tpl if="this.isGirl(name) == false">',
        +            '<p>Boy: {name} - {age}</p>',
        +        '</tpl>',
        +        '<tpl if="this.isBaby(age)">',
        +            '<p>{name} is a baby!</p>',
        +        '</tpl>',
        +    '</tpl></p>', {
        +     isGirl: function(name){
        +         return name == 'Sara Grace';
        +     },
        +     isBaby: function(age){
        +        return age < 1;
        +     }
        +});
        +tpl.overwrite(panel.body, data);
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.ArrayReader.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.ArrayReader.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.ArrayReader.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,126 @@ +
        + +
        +
        DataReader
        +  ArrayReader
        +

        Class Ext.data.ArrayReader

        + + + + + +
        Package:Ext.data
        Defined In:ArrayReader.js
        Class:ArrayReader
        Extends:DataReader
        +
        + Data reader class to create an Array of Ext.data.Record objects from an Array. +Each element of that Array represents a row of data fields. The +fields are pulled into a Record object using as a subscript, the mapping property +of the field definition if it exists, or the field's ordinal position in the definition.
        +

        +Example code:. +

        var Employee = Ext.data.Record.create([
        +    {name: 'name', mapping: 1},         // "mapping" only needed if an "id" field is present which
        +    {name: 'occupation', mapping: 2}    // precludes using the ordinal position as the index.
        +]);
        +var myReader = new Ext.data.ArrayReader({
        +    id: 0                     // The subscript within row Array that provides an ID for the Record (optional)
        +}, Employee);
        +

        +This would consume an Array like this: +

        [ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
          + + id : String
        + (optional) The subscript within row Array that provides an ID for the Record
        +
        ArrayReader
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + meta : Mixed
        + This DataReader's configured metadata as passed to the constructor.
        +
        DataReader
        + +

        Public Methods

        + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Connection.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Connection.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Connection.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,586 @@ +
        + +
        +
        Observable
        +  Connection
        +

        Class Ext.data.Connection

        + + + + + + +
        Package:Ext.data
        Defined In:Connection.js
        Class:Connection
        Subclasses:Ajax
        Extends:Observable
        +
        + The class encapsulates a connection to the page's originating domain, allowing requests to be made +either to a configured URL, or to a URL specified at request time.

        +

        +Requests made by this class are asynchronous, and will return immediately. No data from +the server will be available to the statement immediately following the request call. +To process returned data, use a callback in the request options object, or an event listener.


        +

        +Note: If you are doing a file upload, you will not get a normal response object sent back to +your callback or event handler. Since the upload is handled via in IFRAME, there is no XMLHttpRequest. +The response object is created using the innerHTML of the IFRAME's document as the responseText +property and, if present, the IFRAME's XML document as the responseXML property.


        +This means that a valid XML or HTML document must be returned. If JSON data is required, it is suggested +that it be placed either inside a <textarea> in an HTML document and retrieved from the responseText +using a regex, or inside a CDATA section in an XML document and retrieved from the responseXML using +standard DOM methods.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoAbort : Boolean
        + (Optional) Whether this request should abort any pending requests. (defaults to false)
        +
        Connection
          + + disableCaching : Boolean
        + (Optional) True to add a unique cache-buster param to GET requests. (defaults to true)
        +
        Connection
          + + timeout : Number
        + (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
        +
        Connection
          + + url : String
        + (Optional) The default URL to be used for requests to the server. (defaults to undefined)
        +
        Connection
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.DataProxy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.DataProxy.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.DataProxy.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,367 @@ +
        + +
        +
        Observable
        +  DataProxy
        +

        Class Ext.data.DataProxy

        + + + + + + +
        Package:Ext.data
        Defined In:DataProxy.js
        Class:DataProxy
        Subclasses:HttpProxy, MemoryProxy, ScriptTagProxy
        Extends:Observable
        +
        + This class is an abstract base class for implementations which provide retrieval of +unformatted data objects.
        +

        +DataProxy implementations are usually used in conjunction with an implementation of Ext.data.DataReader +(of the appropriate type which knows how to parse the data object) to provide a block of +Ext.data.Records to an Ext.data.Store.
        +

        +Custom implementations must implement the load method as described in +Ext.data.HttpProxy.load.

        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.DataReader.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.DataReader.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.DataReader.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,74 @@ +
        + +

        Class Ext.data.DataReader

        + + + + + + +
        Package:Ext.data
        Defined In:DataReader.js
        Class:DataReader
        Subclasses:ArrayReader, JsonReader, XmlReader
        Extends:Object
        +
        + Abstract base class for reading structured data from a data source and converting +it into an object containing Ext.data.Record objects and metadata for use +by an Ext.data.Store. This class is intended to be extended and should not +be created directly. For existing implementations, see Ext.data.ArrayReader, +Ext.data.JsonReader and Ext.data.XmlReader.
        + +
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + meta : Mixed
        + This DataReader's configured metadata as passed to the constructor.
        +
        DataReader
        + +

        Public Methods

        + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.GroupingStore.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.GroupingStore.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.GroupingStore.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1392 @@ +
        + +
        +
        Observable
        +  Store
        +    GroupingStore
        +

        Class Ext.data.GroupingStore

        + + + + + +
        Package:Ext.data
        Defined In:GroupingStore.js
        Class:GroupingStore
        Extends:Store
        +
        + A specialized store implementation that provides for grouping records by one of the available fields.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoLoad : Boolean/Object
        + If passed, this store's load method is automatically called after creation with the autoLoad object
        +
        Store
          + + baseParams : Object
        + An object containing properties which are to be sent as parameters on any HTTP request
        +
        Store
          + + data : Array
        + Inline data to be loaded when the store is initialized.
        +
        Store
          + + groupField : String
        + The field name by which to sort the store's data (defaults to '').
        +
        GroupingStore
          + + proxy : Ext.data.DataProxy
        + The Proxy object which provides access to a data object.
        +
        Store
          + + sortInfo : Object
        + A config object in the format: {field: "fieldName", direction: "ASC|DESC"}
        +
        Store
          + + storeId : String
        + If passed, the id to use to register with the StoreMgr
        +
        Store
          + + url : String
        + If passed, an HttpProxy is created for the passed URL
        +
        Store
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + baseParams : Object
        + An object containing properties which are used as parameters on any HTTP request.
        +
        Store
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.HttpProxy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.HttpProxy.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.HttpProxy.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,458 @@ +
        + +
        +
        Observable
        +  DataProxy
        +    HttpProxy
        +

        Class Ext.data.HttpProxy

        + + + + + +
        Package:Ext.data
        Defined In:HttpProxy.js
        Class:HttpProxy
        Extends:DataProxy
        +
        + An implementation of Ext.data.DataProxy that reads a data object from a Connection object +configured to reference a certain URL.
        +

        +Note that this class cannot be used to retrieve data from a domain other than the domain +from which the running page was served.
        +

        +For cross-domain access to remote data, use a ScriptTagProxy.
        +

        +Be aware that to enable the browser to parse an XML document, the server must set +the Content-Type header in the HTTP response to "text/xml".

        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.JsonReader.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.JsonReader.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.JsonReader.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,226 @@ +
        + +
        +
        DataReader
        +  JsonReader
        +

        Class Ext.data.JsonReader

        + + + + + +
        Package:Ext.data
        Defined In:JsonReader.js
        Class:JsonReader
        Extends:DataReader
        +
        + Data reader class to create an Array of Ext.data.Record objects from a JSON response +based on mappings in a provided Ext.data.Record constructor.
        +

        +Example code: +

        var Employee = Ext.data.Record.create([
        +    {name: 'name', mapping: 'name'},     // "mapping" property not needed if it's the same as "name"
        +    {name: 'occupation'}                 // This field will use "occupation" as the mapping.
        +]);
        +var myReader = new Ext.data.JsonReader({
        +    totalProperty: "results",    // The property which contains the total dataset size (optional)
        +    root: "rows",                // The property which contains an Array of row objects
        +    id: "id"                     // The property within each row object that provides an ID for the record (optional)
        +}, Employee);
        +

        +This would consume a JSON file like this: +

        { 'results': 2, 'rows': [
        +    { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },
        +    { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' } ]
        +}
        +

        It is possible to change a JsonReader's metadata at any time by including a +MetaData property in the data object. If this is detected in the +object, a Store object using this Reader will fire its +metachange event.

        +

        The MetaData property may contain any of the configuration +options for this class. Additionally, it may contain a fields +property which the JsonReader will use that as an argument to Ext.data.Record.create +to configure the layout of the Records which it will produce.

        +Using the MetaData property, and the Store's metachange event, +it is possible to have a Store-driven control initialize itself. The metachange +event handler may interrogate the MetaData property (which +may contain any user-defined properties needed) and the MetaData.fields +property to perform any configuration required.

        +

        To use this facility to send the same data as the above example without +having to code the creation of the Record constructor, you would create the +JsonReader like this:

        var myReader = new Ext.data.JsonReader();
        +

        The first data packet from the server would configure the reader by +containing a metaData property as well as the data:

        {
        +  'metaData': {
        +    totalProperty: 'results',
        +    root: 'rows',
        +    id: 'id',
        +    fields: [
        +      {name: 'name'},
        +      {name: 'occupation'} ]
        +   },
        +  'results': 2, 'rows': [
        +    { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },
        +    { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' } ]
        +}
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + id : String
        + Name of the property within a row object that contains a record identifier value.
        +
        JsonReader
          + + root : String
        + name of the property which contains the Array of row objects.
        +
        JsonReader
          + + successProperty : String
        + Name of the property from which to retrieve the success attribute used by forms.
        +
        JsonReader
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + meta : Mixed
        + This JsonReader's metadata as passed to the constructor, or as passed in +the last data packet's MetaData property.
        +
        JsonReader
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.JsonStore.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.JsonStore.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.JsonStore.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1344 @@ +
        + +
        +
        Observable
        +  Store
        +    JsonStore
        +

        Class Ext.data.JsonStore

        + + + + + +
        Package:Ext.data
        Defined In:JsonStore.js
        Class:JsonStore
        Extends:Store
        +
        + Small helper class to make creating Stores for JSON data easier.
        +
        var store = new Ext.data.JsonStore({
        +    url: 'get-images.php',
        +    root: 'images',
        +    fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
        +});
        +This would consume a returned object of the form: +
        {
        +    images: [
        +        {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
        +        {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
        +    ]
        +}
        +An object literal of this form could also be used as the data config option. +Note: Although they are not listed, this class inherits all of the config options of Store, +JsonReader.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoLoad : Boolean/Object
        + If passed, this store's load method is automatically called after creation with the autoLoad object
        +
        Store
          + + baseParams : Object
        + An object containing properties which are to be sent as parameters on any HTTP request
        +
        Store
          + + data : Object
        + A data object readable this object's JsonReader. Either this option, or the url option must be specified.
        +
        JsonStore
          + + proxy : Ext.data.DataProxy
        + The Proxy object which provides access to a data object.
        +
        Store
          + + sortInfo : Object
        + A config object in the format: {field: "fieldName", direction: "ASC|DESC"}
        +
        Store
          + + storeId : String
        + If passed, the id to use to register with the StoreMgr
        +
        Store
          + + url : String
        + The URL from which to load data through an HttpProxy. Either this option, or the data option must be specified.
        +
        JsonStore
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + baseParams : Object
        + An object containing properties which are used as parameters on any HTTP request.
        +
        Store
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.MemoryProxy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.MemoryProxy.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.MemoryProxy.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,410 @@ +
        + +
        +
        Observable
        +  DataProxy
        +    MemoryProxy
        +

        Class Ext.data.MemoryProxy

        + + + + + +
        Package:Ext.data
        Defined In:MemoryProxy.js
        Class:MemoryProxy
        Extends:DataProxy
        +
        + An implementation of Ext.data.DataProxy that simply passes the data specified in its constructor +to the Reader when its load method is called.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Node.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Node.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Node.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,989 @@ +
        + +
        +
        Observable
        +  Node
        +

        Class Ext.data.Node

        + + + + + + +
        Package:Ext.data
        Defined In:Tree.js
        Class:Node
        Subclasses:TreeNode
        Extends:Observable
        +
        +
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + id : String
        + The id for this node. If one is not specified, one is generated.
        +
        Node
          + + leaf : Boolean
        + true if this node is a leaf and does not have children
        +
        Node
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + attributes : Object
        + The attributes supplied for the node. You can use this property to access any custom attributes you supplied.
        +
        Node
          + + childNodes : Array
        + All child nodes of this node.
        +
        Node
          + + firstChild : Node
        + The first direct child node of this node, or null if this node has no child nodes.
        +
        Node
          + + id : String
        + The node id.
        +
        Node
          + + lastChild : Node
        + The last direct child node of this node, or null if this node has no child nodes.
        +
        Node
          + + nextSibling : Node
        + The node immediately following this node in the tree, or null if there is no sibling node.
        +
        Node
          + + parentNode : Node
        + The parent node for this node.
        +
        Node
          + + previousSibling : Node
        + The node immediately preceding this node in the tree, or null if there is no sibling node.
        +
        Node
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Record.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Record.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Record.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,368 @@ +
        + +

        Class Ext.data.Record

        + + + + + +
        Package:Ext.data
        Defined In:Record.js
        Class:Record
        Extends:Object
        +
        + Instances of this class encapsulate both record definition information, and record +value information for use in Ext.data.Store objects, or any code which needs +to access Records cached in an Ext.data.Store object.
        +

        +Constructors for this class are generated by passing an Array of field definition objects to create. +Instances are usually only created by Ext.data.Reader implementations when processing unformatted data +objects.
        +

        +Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below.

        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + data : Object
        + The data for this record an object hash.
        +
        Record
          + + dirty : Boolean
        + +Readonly flag - true if this record has been modified.
        +
        Record
          + + id : Object
        + +The unique ID of the record as specified at construction time.
        +
        Record
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.ScriptTagProxy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.ScriptTagProxy.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.ScriptTagProxy.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,497 @@ +
        + +
        +
        Observable
        +  DataProxy
        +    ScriptTagProxy
        +

        Class Ext.data.ScriptTagProxy

        + + + + + +
        Package:Ext.data
        Defined In:ScriptTagProxy.js
        Class:ScriptTagProxy
        Extends:DataProxy
        +
        + An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain +other than the originating domain of the running page.
        +

        +Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain +of the running page, you must use this class, rather than HttpProxy.
        +

        +The content passed back from a server resource requested by a ScriptTagProxy is executable JavaScript +source code that is used as the source inside a <script> tag.
        +

        +In order for the browser to process the returned data, the server must wrap the data object +with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy. +Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy +depending on whether the callback name was passed: +

        +

        boolean scriptTag = false;
        +String cb = request.getParameter("callback");
        +if (cb != null) {
        +    scriptTag = true;
        +    response.setContentType("text/javascript");
        +} else {
        +    response.setContentType("application/x-json");
        +}
        +Writer out = response.getWriter();
        +if (scriptTag) {
        +    out.write(cb + "(");
        +}
        +out.print(dataBlock.toJsonString());
        +if (scriptTag) {
        +    out.write(");");
        +}
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + nocache : Boolean
        + (Optional) Defaults to true. Disable cacheing by adding a unique parameter name to the request.
        +
        ScriptTagProxy
          + + timeout : Number
        + (Optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.
        +
        ScriptTagProxy
          + + url : String
        + The URL from which to request the data object.
        +
        ScriptTagProxy
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.SimpleStore.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.SimpleStore.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.SimpleStore.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1335 @@ +
        + +
        +
        Observable
        +  Store
        +    SimpleStore
        +

        Class Ext.data.SimpleStore

        + + + + + +
        Package:Ext.data
        Defined In:SimpleStore.js
        Class:SimpleStore
        Extends:Store
        +
        + Small helper class to make creating Stores from Array data easier.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoLoad : Boolean/Object
        + If passed, this store's load method is automatically called after creation with the autoLoad object
        +
        Store
          + + baseParams : Object
        + An object containing properties which are to be sent as parameters on any HTTP request
        +
        Store
          + + data : Array
        + The multi-dimensional array of data
        +
        SimpleStore
          + + fields : Array
        + An array of field definition objects, or field name strings.
        +
        SimpleStore
          + + id : Number
        + The array index of the record id. Leave blank to auto generate ids.
        +
        SimpleStore
          + + proxy : Ext.data.DataProxy
        + The Proxy object which provides access to a data object.
        +
        Store
          + + sortInfo : Object
        + A config object in the format: {field: "fieldName", direction: "ASC|DESC"}
        +
        Store
          + + storeId : String
        + If passed, the id to use to register with the StoreMgr
        +
        Store
          + + url : String
        + If passed, an HttpProxy is created for the passed URL
        +
        Store
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + baseParams : Object
        + An object containing properties which are used as parameters on any HTTP request.
        +
        Store
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.SortTypes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.SortTypes.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.SortTypes.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,187 @@ +
        + +

        Class Ext.data.SortTypes

        + + + + + +
        Package:Ext.data
        Defined In:SortTypes.js
        Class:SortTypes
        Extends:Object
        +
        +

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + stripTagsRE : RegExp
        + The regular expression used to strip tags
        +
        SortTypes
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Store.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Store.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Store.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1326 @@ +
        + +
        +
        Observable
        +  Store
        +

        Class Ext.data.Store

        + + + + + + +
        Package:Ext.data
        Defined In:Store.js
        Class:Store
        Subclasses:GroupingStore, JsonStore, SimpleStore
        Extends:Observable
        +
        + The Store class encapsulates a client side cache of Record +objects which provide input data for Components such as the GridPanel, +the ComboBox, or the DataView

        +

        A Store object uses its configured implementation of DataProxy +to access a data object unless you call loadData directly and pass in your data.

        +

        A Store object has no knowledge of the format of the data returned by the Proxy.

        +

        A Store object uses its configured implementation of DataReader +to create Record instances from the data object. These Records +are cached and made available through accessor functions.

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoLoad : Boolean/Object
        + If passed, this store's load method is automatically called after creation with the autoLoad object
        +
        Store
          + + baseParams : Object
        + An object containing properties which are to be sent as parameters on any HTTP request
        +
        Store
          + + data : Array
        + Inline data to be loaded when the store is initialized.
        +
        Store
          + + proxy : Ext.data.DataProxy
        + The Proxy object which provides access to a data object.
        +
        Store
          + + sortInfo : Object
        + A config object in the format: {field: "fieldName", direction: "ASC|DESC"}
        +
        Store
          + + storeId : String
        + If passed, the id to use to register with the StoreMgr
        +
        Store
          + + url : String
        + If passed, an HttpProxy is created for the passed URL
        +
        Store
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + baseParams : Object
        + An object containing properties which are used as parameters on any HTTP request.
        +
        Store
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Tree.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Tree.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.Tree.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,543 @@ +
        + +
        +
        Observable
        +  Tree
        +

        Class Ext.data.Tree

        + + + + + +
        Package:Ext.data
        Defined In:Tree.js
        Class:Tree
        Extends:Observable
        +
        + Represents a tree data structure and bubbles all the events for its nodes. The nodes +in the tree have most standard DOM functionality.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + pathSeparator : String
        + The token used to separate paths in node ids (defaults to '/').
        +
        Tree
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + root : Node
        + The root node for this tree
        +
        Tree
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.XmlReader.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.XmlReader.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.data.XmlReader.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,200 @@ +
        + +
        +
        DataReader
        +  XmlReader
        +

        Class Ext.data.XmlReader

        + + + + + +
        Package:Ext.data
        Defined In:XmlReader.js
        Class:XmlReader
        Extends:DataReader
        +
        + Data reader class to create an Array of Ext.data.Record objects from an XML document +based on mappings in a provided Ext.data.Record constructor.

        +

        +Note that in order for the browser to parse a returned XML document, the Content-Type +header in the HTTP response must be set to "text/xml". +

        +Example code: +

        var Employee = Ext.data.Record.create([
        +   {name: 'name', mapping: 'name'},     // "mapping" property not needed if it's the same as "name"
        +   {name: 'occupation'}                 // This field will use "occupation" as the mapping.
        +]);
        +var myReader = new Ext.data.XmlReader({
        +   totalRecords: "results", // The element which contains the total dataset size (optional)
        +   record: "row",           // The repeated element which contains row information
        +   id: "id"                 // The element within the row that provides an ID for the record (optional)
        +}, Employee);
        +

        +This would consume an XML file like this: +

        <?xml?>
        +<dataset>
        + <results>2</results>
        + <row>
        +   <id>1</id>
        +   <name>Bill</name>
        +   <occupation>Gardener</occupation>
        + </row>
        + <row>
        +   <id>2</id>
        +   <name>Ben</name>
        +   <occupation>Horticulturalist</occupation>
        + </row>
        +</dataset>
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + id : String
        + The DomQuery path relative from the record element to the element that contains a record identifier value.
        +
        XmlReader
          + + record : String
        + The DomQuery path to the repeated element which contains record information.
        +
        XmlReader
          + + success : String
        + The DomQuery path to the success attribute used by forms.
        +
        XmlReader
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + meta : Mixed
        + This DataReader's configured metadata as passed to the constructor.
        +
        DataReader
          + + xmlData : XMLDocument
        + After any data loads/reads, the raw XML Document is available for further custom processing.
        +
        XmlReader
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DD.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DD.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DD.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1247 @@ +
        + +
        +
        DragDrop
        +  DD
        +

        Class Ext.dd.DD

        + + + + + + +
        Package:Ext.dd
        Defined In:DDCore.js
        Class:DD
        Subclasses:DDProxy
        Extends:DragDrop
        +
        + A DragDrop implementation where the linked element follows the +mouse cursor during a drag.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DDProxy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DDProxy.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DDProxy.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1335 @@ +
        + +
        +
        DragDrop
        +  DD
        +    DDProxy
        +

        Class Ext.dd.DDProxy

        + + + + + + +
        Package:Ext.dd
        Defined In:DDCore.js
        Class:DDProxy
        Subclasses:DragSource
        Extends:DD
        +
        + A DragDrop implementation that inserts an empty, bordered div into +the document that follows the cursor during drag operations. At the time of +the click, the frame div is resized to the dimensions of the linked html +element, and moved to the exact location of the linked element. +References to the "frame" element refer to the single proxy element that +was created to be dragged in place of all DDProxy elements on the +page.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + DDProxy.dragElId : String
        + <static> The default drag frame div id
        +
        DDProxy
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DDTarget.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DDTarget.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DDTarget.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1117 @@ +
        + +
        +
        DragDrop
        +  DDTarget
        +

        Class Ext.dd.DDTarget

        + + + + + + +
        Package:Ext.dd
        Defined In:DDCore.js
        Class:DDTarget
        Subclasses:DropTarget
        Extends:DragDrop
        +
        + A DragDrop implementation that does not move, but can be a drop +target. You would get the same result by simply omitting implementation +for the event callbacks, but this way we reduce the processing cost of the +event listener and the callbacks.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragDrop.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragDrop.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragDrop.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1140 @@ +
        + +

        Class Ext.dd.DragDrop

        + + + + + + +
        Package:Ext.dd
        Defined In:DDCore.js
        Class:DragDrop
        Subclasses:DD, DDTarget
        Extends:Object
        +
        + Defines the interface and base operation of items that that can be +dragged or can be drop targets. It was designed to be extended, overriding +the event handlers for startDrag, onDrag, onDragOver and onDragOut. +Up to three html elements can be associated with a DragDrop instance: +
          +
        • linked element: the element that is passed into the constructor. +This is the element which defines the boundaries for interaction with +other DragDrop objects.
        • +
        • handle element(s): The drag operation only occurs if the element that +was clicked matches a handle element. By default this is the linked +element, but there are times that you will want only a portion of the +linked element to initiate the drag operation, and the setHandleElId() +method provides a way to define this.
        • +
        • drag element: this represents the element that would be moved along +with the cursor during a drag operation. By default, this is the linked +element itself as in Ext.dd.DD. setDragElId() lets you define +a separate element that would be moved, as in Ext.dd.DDProxy. +
        • +
        +This class should not be instantiated until the onload event to ensure that +the associated elements are available. +The following would define a DragDrop obj that would interact with any +other DragDrop obj in the "group1" group: +
        dd = new Ext.dd.DragDrop("div1", "group1");
        +Since none of the event handlers have been implemented, nothing would +actually happen if you were to run the code above. Normally you would +override this class or one of the default implementations, but you can +also override the methods you want on an instance of the class... +
        dd.onDragDrop = function(e, id) {
        +  alert("dd was dropped on " + id);
        +}
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragDropMgr.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragDropMgr.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragDropMgr.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,791 @@ +
        + +

        Class Ext.dd.DragDropMgr

        + + + + + +
        Package:Ext.dd
        Defined In:DDCore.js
        Class:DragDropMgr
        Extends:Object
        +
        + DragDropMgr is a singleton that tracks the element interaction for +all DragDrop items in the window. Generally, you will not call +this class directly, but it does have helper methods that could +be useful in your DragDrop implementations.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + POINT : int
        + <static> In point mode, drag and drop interaction is defined by the +location of the cursor during the drag/drop
        +
        DragDropMgr
          + + css : Object
        + A reference to the style property
        +
        DragDropMgr
          + + el : Object
        + The element
        +
        DragDropMgr
          + + id : Object
        + The element id
        +
        DragDropMgr
          + + mode : int
        + <static> The current drag and drop mode. Default: POINT
        +
        DragDropMgr
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragSource.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragSource.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragSource.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1674 @@ +
        + +
        +
        DragDrop
        +  DD
        +    DDProxy
        +      DragSource
        +

        Class Ext.dd.DragSource

        + + + + + + +
        Package:Ext.dd
        Defined In:DragSource.js
        Class:DragSource
        Subclasses:DragZone
        Extends:DDProxy
        +
        + A simple class that provides the basic implementation needed to make any element draggable.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + dropAllowed : String
        + The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
        +
        DragSource
          + + dropNotAllowed : String
        + The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
        +
        DragSource
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragZone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragZone.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DragZone.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1767 @@ +
        + +
        +
        DragDrop
        +  DD
        +    DDProxy
        +      DragSource
        +        DragZone
        +

        Class Ext.dd.DragZone

        + + + + + + +
        Package:Ext.dd
        Defined In:DragZone.js
        Class:DragZone
        Subclasses:TreeDragZone
        Extends:DragSource
        +
        + This class provides a container DD instance that proxies for multiple child node sources.
        +By default, this class requires that draggable child nodes are registered with Ext.dd.Registry.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + containerScroll : Boolean
        + True to register this container with the Scrollmanager for auto scrolling during drag operations.
        +
        DragZone
          + + dropAllowed : String
        + The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
        +
        DragSource
          + + dropNotAllowed : String
        + The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
        +
        DragSource
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DropTarget.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DropTarget.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DropTarget.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1254 @@ +
        + +
        +
        DragDrop
        +  DDTarget
        +    DropTarget
        +

        Class Ext.dd.DropTarget

        + + + + + + +
        Package:Ext.dd
        Defined In:DropTarget.js
        Class:DropTarget
        Subclasses:DropZone
        Extends:DDTarget
        +
        + A simple class that provides the basic implementation needed to make any element a drop target that can have +draggable items dropped onto it. The drop has no effect until an implementation of notifyDrop is provided.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + dropAllowed : String
        + The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
        +
        DropTarget
          + + dropNotAllowed : String
        + The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
        +
        DropTarget
          + + overClass : String
        + The CSS class applied to the drop target element while the drag source is over it (defaults to "").
        +
        DropTarget
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DropZone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DropZone.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.DropZone.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1425 @@ +
        + +
        +
        DragDrop
        +  DDTarget
        +    DropTarget
        +      DropZone
        +

        Class Ext.dd.DropZone

        + + + + + + +
        Package:Ext.dd
        Defined In:DropZone.js
        Class:DropZone
        Subclasses:TreeDropZone
        Extends:DropTarget
        +
        + This class provides a container DD instance that proxies for multiple child node targets.
        +By default, this class requires that child nodes accepting drop are registered with Ext.dd.Registry.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + dropAllowed : String
        + The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
        +
        DropTarget
          + + dropNotAllowed : String
        + The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
        +
        DropTarget
          + + overClass : String
        + The CSS class applied to the drop target element while the drag source is over it (defaults to "").
        +
        DropTarget
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.Registry.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.Registry.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.Registry.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,162 @@ +
        + +

        Class Ext.dd.Registry

        + + + + + +
        Package:Ext.dd
        Defined In:Registry.js
        Class:Registry
        Extends:Object
        +
        + Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either +directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.ScrollManager.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.ScrollManager.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.ScrollManager.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,164 @@ +
        + +

        Class Ext.dd.ScrollManager

        + + + + + +
        Package:Ext.dd
        Defined In:ScrollManager.js
        Class:ScrollManager
        Extends:Object
        +
        + Provides automatic scrolling of overflow regions in the page during drag operations.

        +Note: This class uses "Point Mode" and is untested in "Intersect Mode".

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + animDuration : Number
        + The animation duration in seconds - +MUST BE less than Ext.dd.ScrollManager.frequency! (defaults to .4)
        +
        ScrollManager
          + + animate : Boolean
        + True to animate the scroll (defaults to true)
        +
        ScrollManager
          + + frequency : Number
        + The frequency of scrolls in milliseconds (defaults to 500)
        +
        ScrollManager
          + + increment : Number
        + The number of pixels to scroll in each scroll increment (defaults to 50)
        +
        ScrollManager
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.StatusProxy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.StatusProxy.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.dd.StatusProxy.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,284 @@ +
        + +

        Class Ext.dd.StatusProxy

        + + + + + +
        Package:Ext.dd
        Defined In:StatusProxy.js
        Class:StatusProxy
        Extends:Object
        +
        + A specialized drag proxy that supports a drop status icon, Ext.Layer styles and auto-repair. This is the +default drag proxy used by all Ext.dd components.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + dropAllowed : String
        + The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
        +
        StatusProxy
          + + dropNotAllowed : String
        + The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").
        +
        StatusProxy
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.Load.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.Load.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.Load.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,196 @@ +
        + +
        +
        Action
        +  Action.Load
        +

        Class Ext.form.Action.Load

        + + + + + +
        Package:Ext.form
        Defined In:Action.js
        Class:Action.Load
        Extends:Action
        +
        + A class which handles loading of data from a server into the Fields of +an Ext.form.BasicForm. +

        +Instances of this class are only created by a Form when +submitting. +

        +A response packet must contain a boolean success property, and +a data property. The data property contains the +values of Fields to load. The individual value object for each Field +is passed to the Field's setValue method. +

        +By default, response packets are assumed to be JSON, so a typical response +packet may look like this: +

        {
        +    success: true,
        +    data: {
        +        clientName: "Fred. Olsen Lines",
        +        portOfLoading: "FXT",
        +        portOfDischarge: "OSL"
        +    }
        +}
        +

        +Other data may be placed into the response for processing the the Form's callback +or event handler methods. The object decoded from this JSON is available in the result property.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + scope : Object
        + The scope in which to call the callback functions (The this reference for the callback functions).
        +
        Action
          + + url : String
        + The URL that the Action is to invoke.
        +
        Action
          + + waitMsg : String
        + The message to be displayed by a call to Ext.MessageBox.wait during the time the action is being processed.
        +
        Action
          + + waitTitle : String
        + The title to be displayed by a call to Ext.MessageBox.wait during the time the action is being processed.
        +
        Action
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + response : Object
        + +The XMLHttpRequest object used to perform the action.
        +
        Action
          + + result : Object
        + +The decoded response object containing a boolean success property and +other, action-specific properties.
        +
        Action
          + + type : String
        + +The type of action this Action instance performs. +Currently only "submit" and "load" are supported.
        +
        Action
        + +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.Submit.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.Submit.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.Submit.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,206 @@ +
        + +
        +
        Action
        +  Action.Submit
        +

        Class Ext.form.Action.Submit

        + + + + + +
        Package:Ext.form
        Defined In:Action.js
        Class:Action.Submit
        Extends:Action
        +
        + A class which handles submission of data from Forms +and processes the returned response. +

        +Instances of this class are only created by a Form when +submitting. +

        +A response packet must contain a boolean success property, and, optionally +an errors property. The errors property contains error +messages for invalid fields. +

        +By default, response packets are assumed to be JSON, so a typical response +packet may look like this: +

        {
        +    success: false,
        +    errors: {
        +        clientCode: "Client not found",
        +        portOfLoading: "This field must not be null"
        +    }
        +}
        +

        +Other data may be placed into the response for processing the the Ext.form.BasicForm's callback +or event handler methods. The object decoded from this JSON is available in the result property.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + scope : Object
        + The scope in which to call the callback functions (The this reference for the callback functions).
        +
        Action
          + + url : String
        + The URL that the Action is to invoke.
        +
        Action
          + + waitMsg : String
        + The message to be displayed by a call to Ext.MessageBox.wait during the time the action is being processed.
        +
        Action
          + + waitTitle : String
        + The title to be displayed by a call to Ext.MessageBox.wait during the time the action is being processed.
        +
        Action
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + response : Object
        + +The XMLHttpRequest object used to perform the action.
        +
        Action
          + + result : Object
        + +The decoded response object containing a boolean success property and +other, action-specific properties.
        +
        Action
          + + type : String
        + +The type of action this Action instance performs. +Currently only "submit" and "load" are supported.
        +
        Action
        + +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Action.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,231 @@ +
        + +

        Class Ext.form.Action

        + + + + + + +
        Package:Ext.form
        Defined In:Action.js
        Class:Action
        Subclasses:Action.Load, Action.Submit
        Extends:Object
        +
        + The subclasses of this class provide actions to perform upon Forms. +

        +Instances of this class are only created by a Form when +the Form needs to perform an action such as submit or load. The Configuration options +listed for this class are set through the Form's action methods: submit, +load and doAction. +

        +The instance of Action which performed the action is passed to the success +and failure callbacks of the Form's action methods (submit, +load and doAction), +and to the actioncomplete and +actionfailed event handlers.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + scope : Object
        + The scope in which to call the callback functions (The this reference for the callback functions).
        +
        Action
          + + url : String
        + The URL that the Action is to invoke.
        +
        Action
          + + waitMsg : String
        + The message to be displayed by a call to Ext.MessageBox.wait during the time the action is being processed.
        +
        Action
          + + waitTitle : String
        + The title to be displayed by a call to Ext.MessageBox.wait during the time the action is being processed.
        +
        Action
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + Action.CLIENT_INVALID : String
        + <static> Failure type returned when client side validation of the Form fails +thus aborting a submit action.
        +
        Action
          + + Action.LOAD_FAILURE : String
        + <static> Failure type returned when no field values are returned in the response's +data property.
        +
        Action
          + + response : Object
        + +The XMLHttpRequest object used to perform the action.
        +
        Action
          + + result : Object
        + +The decoded response object containing a boolean success property and +other, action-specific properties.
        +
        Action
          + + type : String
        + +The type of action this Action instance performs. +Currently only "submit" and "load" are supported.
        +
        Action
        + +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.BasicForm.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.BasicForm.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.BasicForm.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,911 @@ +
        + +
        +
        Observable
        +  BasicForm
        +

        Class Ext.form.BasicForm

        + + + + + +
        Package:Ext.form
        Defined In:BasicForm.js
        Class:BasicForm
        Extends:Observable
        +
        + Supplies the functionality to do "actions" on forms and initialize Ext.form.Field types on existing markup. +

        +By default, Ext Forms are submitted through Ajax, using Ext.form.Action. +To enable normal browser submission of an Ext Form, override the Form's onSubmit, +and submit methods:

        var myForm = new Ext.form.BasicForm("form-el-id", {
        +        onSubmit: Ext.emptyFn,
        +        submit: function() {
        +            this.getEl().dom.submit();
        +        }
        +    });

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + baseParams : Object
        + Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}.
        +
        BasicForm
          + + fileUpload : Boolean
        + Set to true if this form is a file upload.
        +
        BasicForm
          + + method : String
        + The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
        +
        BasicForm
          + + timeout : Number
        + Timeout for form actions in seconds (default is 30 seconds).
        +
        BasicForm
          + + trackResetOnLoad : Boolean
        + If set to true, form.reset() resets to the last loaded or setValues() data instead of when the form was first created.
        +
        BasicForm
          + + url : String
        + The URL to use for form actions if one isn't supplied in the action options.
        +
        BasicForm
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Checkbox.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Checkbox.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Checkbox.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2047 @@ +
        + + +

        Class Ext.form.Checkbox

        + + + + + + +
        Package:Ext.form
        Defined In:Checkbox.js
        Class:Checkbox
        Subclasses:Radio
        Extends:Field
        +
        + Single checkbox field. Can be used as a direct replacement for traditional checkbox fields.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + boxLabel : String
        + The text that appears beside the checkbox
        +
        Checkbox
          + + checked : Boolean
        + True if the the checkbox should render already checked (defaults to false)
        +
        Checkbox
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + fieldClass : String
        + The default CSS class for the checkbox (defaults to "x-form-field")
        +
        Checkbox
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the checkbox receives focus (defaults to undefined)
        +
        Checkbox
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + inputValue : String
        + The value that should go into the generated input element's value attribute
        +
        Checkbox
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.ComboBox.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.ComboBox.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.ComboBox.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2908 @@ +
        + + +

        Class Ext.form.ComboBox

        + + + + + + +
        Package:Ext.form
        Defined In:Combo.js
        Class:ComboBox
        Subclasses:TimeField
        Extends:TriggerField
        +
        + A combobox control with support for autocomplete, remote-loading, paging and many other features.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allQuery : String
        + The text query to send to the server to return all records for the list with no filtering (defaults to '')
        +
        ComboBox
          + + allowBlank : Boolean
        + False to validate that the value length > 0 (defaults to true)
        +
        TextField
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + blankText : String
        + Error text to display if the allow blank validation fails (defaults to "This field is required")
        +
        TextField
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disableKeyFilter : Boolean
        + True to disable input keystroke filtering (defaults to false)
        +
        TextField
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + editable : Boolean
        + False to prevent the user from typing text directly into the field, just like a traditional select (defaults to true)
        +
        ComboBox
          + + emptyText : String
        + The default text to display in an empty field (defaults to null).
        +
        TextField
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + handleHeight : Number
        + The height in pixels of the dropdown list resize handle if resizable = true (defaults to 8)
        +
        ComboBox
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + hideTrigger : Boolean
        + True to hide the trigger element and display only the base text field (defaults to false)
        +
        TriggerField
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + lazyInit : Boolean
        + True to not initialize the list for this combo until the field is focused. (defaults to true)
        +
        ComboBox
          + + listAlign : String
        + A valid anchor position value. See Ext.Element.alignTo for details on supported anchor positions (defaults to 'tl-bl')
        +
        ComboBox
          + + listClass : String
        + CSS class to apply to the dropdown list element (defaults to '')
        +
        ComboBox
          + + listWidth : Number
        + The width in pixels of the dropdown list (defaults to the width of the ComboBox field)
        +
        ComboBox
          + + maskRe : RegExp
        + An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
        +
        TextField
          + + maxHeight : Number
        + The maximum height in pixels of the dropdown list before scrollbars are shown (defaults to 300)
        +
        ComboBox
          + + maxLength : Number
        + Maximum input field length allowed (defaults to Number.MAX_VALUE)
        +
        TextField
          + + minLength : Number
        + Minimum input field length required (defaults to 0)
        +
        TextField
          + + minListWidth : Number
        + The minimum width of the dropdown list in pixels (defaults to 70, will be ignored if listWidth has a higher value)
        +
        ComboBox
          + + mode : String
        + Set to 'local' if the ComboBox loads local data (defaults to 'remote' which loads from the server)
        +
        ComboBox
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + queryParam : String
        + Name of the query as it will be passed on the querystring (defaults to 'query')
        +
        ComboBox
          + + regexText : String
        + The error text to display if regex is used and the test fails during validation (defaults to "")
        +
        TextField
          + + resizable : Boolean
        + True to add a resize handle to the bottom of the dropdown list (defaults to false)
        +
        ComboBox
          + + selectedClass : String
        + CSS class to apply to the selected item in the dropdown list (defaults to 'x-combo-selected')
        +
        ComboBox
          + + shadow : Boolean/String
        + True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right
        +
        ComboBox
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + store : Ext.data.Store
        + The data store to which this combo is bound (defaults to undefined)
        +
        ComboBox
          + + transform : Mixed
        + The id, DOM node or element of an existing select to convert to a ComboBox
        +
        ComboBox
          + + typeAheadDelay : Number
        + The length of time in milliseconds to wait until the typeahead text is displayed if typeAhead = true (defaults to 250)
        +
        ComboBox
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + vtype : String
        + A validation type name as defined in Ext.form.VTypes (defaults to null)
        +
        TextField
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
          + + view : Ext.DataView
        + The DataView used to display the ComboBox's options.
        +
        ComboBox
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.DateField.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.DateField.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.DateField.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2432 @@ +
        + + +

        Class Ext.form.DateField

        + + + + + +
        Package:Ext.form
        Defined In:DateField.js
        Class:DateField
        Extends:TriggerField
        +
        + Provides a date input field with a Ext.DatePicker dropdown and automatic date validation.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowBlank : Boolean
        + False to validate that the value length > 0 (defaults to true)
        +
        TextField
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + blankText : String
        + Error text to display if the allow blank validation fails (defaults to "This field is required")
        +
        TextField
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disableKeyFilter : Boolean
        + True to disable input keystroke filtering (defaults to false)
        +
        TextField
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + disabledDatesText : String
        + The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled')
        +
        DateField
          + + disabledDays : Array
        + An array of days to disable, 0 based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
        +
        DateField
          + + disabledDaysText : String
        + The tooltip to display when the date falls on a disabled day (defaults to 'Disabled')
        +
        DateField
          + + emptyText : String
        + The default text to display in an empty field (defaults to null).
        +
        TextField
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + hideTrigger : Boolean
        + True to hide the trigger element and display only the base text field (defaults to false)
        +
        TriggerField
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + maskRe : RegExp
        + An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
        +
        TextField
          + + maxLength : Number
        + Maximum input field length allowed (defaults to Number.MAX_VALUE)
        +
        TextField
          + + maxValue : Date/String
        + The maximum allowed date. Can be either a Javascript date object or a string date in a valid format (defaults to null).
        +
        DateField
          + + minLength : Number
        + Minimum input field length required (defaults to 0)
        +
        TextField
          + + minValue : Date/String
        + The minimum allowed date. Can be either a Javascript date object or a string date in a valid format (defaults to null).
        +
        DateField
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + regexText : String
        + The error text to display if regex is used and the test fails during validation (defaults to "")
        +
        TextField
          + + selectOnFocus : Boolean
        + True to automatically select any existing field text when the field receives input focus (defaults to false)
        +
        TextField
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + vtype : String
        + A validation type name as defined in Ext.form.VTypes (defaults to null)
        +
        TextField
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Field.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Field.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Field.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2040 @@ +
        + + +

        Class Ext.form.Field

        + + + + + + +
        Package:Ext.form
        Defined In:Field.js
        Class:Field
        Subclasses:Checkbox, Hidden, HtmlEditor, TextField
        Extends:BoxComponent
        +
        + Base class for form fields that provides default event handling, sizing, value handling and other functionality.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + cls : String
        + A CSS class to apply to the field's underlying element.
        +
        Field
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.FieldSet.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.FieldSet.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.FieldSet.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2955 @@ +
        + + +

        Class Ext.form.FieldSet

        + + + + + +
        Package:Ext.form
        Defined In:FieldSet.js
        Class:FieldSet
        Extends:Panel
        +
        + Standard container used for grouping form fields.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class applied to the fieldset (defaults to 'x-fieldset').
        +
        FieldSet
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + checkboxName : String
        + The name to assign to the fieldset's checkbox if checkboxToggle = true (defaults to '[checkbox id]-checkbox').
        +
        FieldSet
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + A css class to apply to the x-form-item of fields. This property cascades to child containers.
        +
        FieldSet
          + + labelWidth : Number
        + The width of labels. This property cascades to child containers.
        +
        FieldSet
          + + layout : String
        + The Ext.Container.layout to use inside the fieldset (defaults to 'form').
        +
        FieldSet
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.FormPanel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.FormPanel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.FormPanel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3033 @@ +
        + + +

        Class Ext.form.FormPanel

        + + + + + +
        Package:Ext.form
        Defined In:Form.js
        Class:FormPanel
        Extends:Panel
        +
        + Standard form container. +

        Although they are not listed, this class also accepts all the config options required to configure its internal Ext.form.BasicForm

        +

        +FormPanel uses a Ext.layout.FormLayout internally, and that is required for fields and labels to work correctly +within the FormPanel's layout. To nest additional layout styles within a FormPanel, you should nest additional Panels +or other containers that can provide additional layout functionality. You should not override FormPanel's layout. +

        +By default, Ext Forms are submitted through Ajax, using Ext.form.Action. +To enable normal browser submission of the Ext Form contained in this FormPanel, +override the Form's onSubmit, and submit methods:

        var myForm = new Ext.form.FormPanel({
        +        onSubmit: Ext.emptyFn,
        +        submit: function() {
        +            this.getForm().getEl().dom.submit();
        +        }
        +    });

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + Valid values are "left," "center" and "right" (defaults to "center")
        +
        FormPanel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + A css class to apply to the x-form-item of fields. This property cascades to child containers.
        +
        FormPanel
          + + labelAlign : String
        + Valid values are "left," "top" and "right" (defaults to "left"). This property cascades to child containers if not set.
        +
        FormPanel
          + + labelWidth : Number
        + The width of labels. This property cascades to child containers.
        +
        FormPanel
          + + minButtonWidth : Number
        + Minimum width of all buttons in pixels (defaults to 75)
        +
        FormPanel
          + + monitorPoll : Number
        + The milliseconds to poll valid state, ignored if monitorValid is not true (defaults to 200)
        +
        FormPanel
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Hidden.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Hidden.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Hidden.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2043 @@ +
        + + +

        Class Ext.form.Hidden

        + + + + + +
        Package:Ext.form
        Defined In:Hidden.js
        Class:Hidden
        Extends:Field
        +
        + A basic hidden field for storing hidden values in forms that need to be passed in the form submit.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.HtmlEditor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.HtmlEditor.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.HtmlEditor.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2329 @@ +
        + +
        +
        Observable
        +  Component
        +    BoxComponent
        +      Field
        +        HtmlEditor
        +

        Class Ext.form.HtmlEditor

        + + + + + +
        Package:Ext.form
        Defined In:HtmlEditor.js
        Class:HtmlEditor
        Extends:Field
        +
        + Provides a lightweight HTML Editor component. +

        Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT +supported by this editor.

        +An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within +any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + createLinkText : String
        + The default text for the create link prompt
        +
        HtmlEditor
          + + defaultLinkValue : String
        + The default value for the create link prompt (defaults to http:/ /)
        +
        HtmlEditor
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableAlignments : Boolean
        + Enable the left, center, right alignment buttons (defaults to true)
        +
        HtmlEditor
          + + enableColors : Boolean
        + Enable the fore/highlight color buttons (defaults to true)
        +
        HtmlEditor
          + + enableFont : Boolean
        + Enable font selection. Not available in Safari. (defaults to true)
        +
        HtmlEditor
          + + enableFontSize : Boolean
        + Enable the increase/decrease font size buttons (defaults to true)
        +
        HtmlEditor
          + + enableFormat : Boolean
        + Enable the bold, italic and underline buttons (defaults to true)
        +
        HtmlEditor
          + + enableLinks : Boolean
        + Enable the create link button. Not available in Safari. (defaults to true)
        +
        HtmlEditor
          + + enableLists : Boolean
        + Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true)
        +
        HtmlEditor
          + + enableSourceEdit : Boolean
        + Enable the switch to source edit button. Not available in Safari. (defaults to true)
        +
        HtmlEditor
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + fontFamilies : Array
        + An array of available font families
        +
        HtmlEditor
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.NumberField.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.NumberField.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.NumberField.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2415 @@ +
        + + +

        Class Ext.form.NumberField

        + + + + + +
        Package:Ext.form
        Defined In:NumberField.js
        Class:NumberField
        Extends:TextField
        +
        + Numeric text field that provides automatic keystroke filtering and numeric validation.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowBlank : Boolean
        + False to validate that the value length > 0 (defaults to true)
        +
        TextField
          + + allowDecimals : Boolean
        + False to disallow decimal values (defaults to true)
        +
        NumberField
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + allowNegative : Boolean
        + False to prevent entering a negative sign (defaults to true)
        +
        NumberField
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseChars : String
        + The base set of characters to evaluate as valid numbers (defaults to '0123456789').
        +
        NumberField
          + + blankText : String
        + Error text to display if the allow blank validation fails (defaults to "This field is required")
        +
        TextField
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + decimalPrecision : Number
        + The maximum precision to display after the decimal separator (defaults to 2)
        +
        NumberField
          + + decimalSeparator : String
        + Character(s) to allow as the decimal separator (defaults to '.')
        +
        NumberField
          + + disableKeyFilter : Boolean
        + True to disable input keystroke filtering (defaults to false)
        +
        TextField
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + emptyText : String
        + The default text to display in an empty field (defaults to null).
        +
        TextField
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field x-form-num-field")
        +
        NumberField
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + grow : Boolean
        + True if this field should automatically grow and shrink to its content
        +
        TextField
          + + growMax : Number
        + The maximum width to allow when grow = true (defaults to 800)
        +
        TextField
          + + growMin : Number
        + The minimum width to allow when grow = true (defaults to 30)
        +
        TextField
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + maskRe : RegExp
        + An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
        +
        TextField
          + + maxLength : Number
        + Maximum input field length allowed (defaults to Number.MAX_VALUE)
        +
        TextField
          + + maxValue : Number
        + The maximum allowed value (defaults to Number.MAX_VALUE)
        +
        NumberField
          + + minLength : Number
        + Minimum input field length required (defaults to 0)
        +
        TextField
          + + minValue : Number
        + The minimum allowed value (defaults to Number.NEGATIVE_INFINITY)
        +
        NumberField
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + regexText : String
        + The error text to display if regex is used and the test fails during validation (defaults to "")
        +
        TextField
          + + selectOnFocus : Boolean
        + True to automatically select any existing field text when the field receives input focus (defaults to false)
        +
        TextField
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + vtype : String
        + A validation type name as defined in Ext.form.VTypes (defaults to null)
        +
        TextField
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Radio.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Radio.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.Radio.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2068 @@ +
        + + +

        Class Ext.form.Radio

        + + + + + +
        Package:Ext.form
        Defined In:Radio.js
        Class:Radio
        Extends:Checkbox
        +
        + Single radio field. Same as Checkbox, but provided as a convenience for automatically setting the input type. +Radio grouping is handled automatically by the browser if you give each radio in a group the same name.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + boxLabel : String
        + The text that appears beside the checkbox
        +
        Checkbox
          + + checked : Boolean
        + True if the the checkbox should render already checked (defaults to false)
        +
        Checkbox
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + inputValue : String
        + The value that should go into the generated input element's value attribute
        +
        Checkbox
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TextArea.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TextArea.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TextArea.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2329 @@ +
        + + +

        Class Ext.form.TextArea

        + + + + + +
        Package:Ext.form
        Defined In:TextArea.js
        Class:TextArea
        Extends:TextField
        +
        + Multiline text field. Can be used as a direct replacement for traditional textarea fields, plus adds +support for auto-sizing.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowBlank : Boolean
        + False to validate that the value length > 0 (defaults to true)
        +
        TextField
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + blankText : String
        + Error text to display if the allow blank validation fails (defaults to "This field is required")
        +
        TextField
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disableKeyFilter : Boolean
        + True to disable input keystroke filtering (defaults to false)
        +
        TextField
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + emptyText : String
        + The default text to display in an empty field (defaults to null).
        +
        TextField
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + grow : Boolean
        + True if this field should automatically grow and shrink to its content
        +
        TextField
          + + growMax : Number
        + The maximum height to allow when grow = true (defaults to 1000)
        +
        TextArea
          + + growMin : Number
        + The minimum height to allow when grow = true (defaults to 60)
        +
        TextArea
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + maskRe : RegExp
        + An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
        +
        TextField
          + + maxLength : Number
        + Maximum input field length allowed (defaults to Number.MAX_VALUE)
        +
        TextField
          + + minLength : Number
        + Minimum input field length required (defaults to 0)
        +
        TextField
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + regexText : String
        + The error text to display if regex is used and the test fails during validation (defaults to "")
        +
        TextField
          + + selectOnFocus : Boolean
        + True to automatically select any existing field text when the field receives input focus (defaults to false)
        +
        TextField
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + vtype : String
        + A validation type name as defined in Ext.form.VTypes (defaults to null)
        +
        TextField
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TextField.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TextField.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TextField.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2319 @@ +
        + + +

        Class Ext.form.TextField

        + + + + + + +
        Package:Ext.form
        Defined In:TextField.js
        Class:TextField
        Subclasses:NumberField, TextArea, TriggerField
        Extends:Field
        +
        + Basic text field. Can be used as a direct replacement for traditional text inputs, or as the base +class for more sophisticated input controls (like Ext.form.TextArea and Ext.form.ComboBox).
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowBlank : Boolean
        + False to validate that the value length > 0 (defaults to true)
        +
        TextField
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + blankText : String
        + Error text to display if the allow blank validation fails (defaults to "This field is required")
        +
        TextField
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disableKeyFilter : Boolean
        + True to disable input keystroke filtering (defaults to false)
        +
        TextField
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + emptyText : String
        + The default text to display in an empty field (defaults to null).
        +
        TextField
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + grow : Boolean
        + True if this field should automatically grow and shrink to its content
        +
        TextField
          + + growMax : Number
        + The maximum width to allow when grow = true (defaults to 800)
        +
        TextField
          + + growMin : Number
        + The minimum width to allow when grow = true (defaults to 30)
        +
        TextField
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + maskRe : RegExp
        + An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
        +
        TextField
          + + maxLength : Number
        + Maximum input field length allowed (defaults to Number.MAX_VALUE)
        +
        TextField
          + + minLength : Number
        + Minimum input field length required (defaults to 0)
        +
        TextField
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + regexText : String
        + The error text to display if regex is used and the test fails during validation (defaults to "")
        +
        TextField
          + + selectOnFocus : Boolean
        + True to automatically select any existing field text when the field receives input focus (defaults to false)
        +
        TextField
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + vtype : String
        + A validation type name as defined in Ext.form.VTypes (defaults to null)
        +
        TextField
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TimeField.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TimeField.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TimeField.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2973 @@ +
        + + +

        Class Ext.form.TimeField

        + + + + + +
        Package:Ext.form
        Defined In:TimeField.js
        Class:TimeField
        Extends:ComboBox
        +
        + Provides a time input field with a time dropdown and automatic time validation.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allQuery : String
        + The text query to send to the server to return all records for the list with no filtering (defaults to '')
        +
        ComboBox
          + + allowBlank : Boolean
        + False to validate that the value length > 0 (defaults to true)
        +
        TextField
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + blankText : String
        + Error text to display if the allow blank validation fails (defaults to "This field is required")
        +
        TextField
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disableKeyFilter : Boolean
        + True to disable input keystroke filtering (defaults to false)
        +
        TextField
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + editable : Boolean
        + False to prevent the user from typing text directly into the field, just like a traditional select (defaults to true)
        +
        ComboBox
          + + emptyText : String
        + The default text to display in an empty field (defaults to null).
        +
        TextField
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + handleHeight : Number
        + The height in pixels of the dropdown list resize handle if resizable = true (defaults to 8)
        +
        ComboBox
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + hideTrigger : Boolean
        + True to hide the trigger element and display only the base text field (defaults to false)
        +
        TriggerField
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + increment : Number
        + The number of minutes between each time value in the list (defaults to 15).
        +
        TimeField
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + lazyInit : Boolean
        + True to not initialize the list for this combo until the field is focused. (defaults to true)
        +
        ComboBox
          + + listAlign : String
        + A valid anchor position value. See Ext.Element.alignTo for details on supported anchor positions (defaults to 'tl-bl')
        +
        ComboBox
          + + listClass : String
        + CSS class to apply to the dropdown list element (defaults to '')
        +
        ComboBox
          + + listWidth : Number
        + The width in pixels of the dropdown list (defaults to the width of the ComboBox field)
        +
        ComboBox
          + + maskRe : RegExp
        + An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
        +
        TextField
          + + maxHeight : Number
        + The maximum height in pixels of the dropdown list before scrollbars are shown (defaults to 300)
        +
        ComboBox
          + + maxLength : Number
        + Maximum input field length allowed (defaults to Number.MAX_VALUE)
        +
        TextField
          + + maxValue : Date/String
        + The maximum allowed time. Can be either a Javascript date object or a string date in a valid format (defaults to null).
        +
        TimeField
          + + minLength : Number
        + Minimum input field length required (defaults to 0)
        +
        TextField
          + + minListWidth : Number
        + The minimum width of the dropdown list in pixels (defaults to 70, will be ignored if listWidth has a higher value)
        +
        ComboBox
          + + minValue : Date/String
        + The minimum allowed time. Can be either a Javascript date object or a string date in a valid format (defaults to null).
        +
        TimeField
          + + mode : String
        + Set to 'local' if the ComboBox loads local data (defaults to 'remote' which loads from the server)
        +
        ComboBox
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + queryParam : String
        + Name of the query as it will be passed on the querystring (defaults to 'query')
        +
        ComboBox
          + + regexText : String
        + The error text to display if regex is used and the test fails during validation (defaults to "")
        +
        TextField
          + + resizable : Boolean
        + True to add a resize handle to the bottom of the dropdown list (defaults to false)
        +
        ComboBox
          + + selectOnFocus : Boolean
        + True to automatically select any existing field text when the field receives input focus (defaults to false)
        +
        TextField
          + + selectedClass : String
        + CSS class to apply to the selected item in the dropdown list (defaults to 'x-combo-selected')
        +
        ComboBox
          + + shadow : Boolean/String
        + True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right
        +
        ComboBox
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + store : Ext.data.Store
        + The data store to which this combo is bound (defaults to undefined)
        +
        ComboBox
          + + transform : Mixed
        + The id, DOM node or element of an existing select to convert to a ComboBox
        +
        ComboBox
          + + triggerClass : String
        + A CSS class to apply to the trigger
        +
        TriggerField
          + + typeAheadDelay : Number
        + The length of time in milliseconds to wait until the typeahead text is displayed if typeAhead = true (defaults to 250)
        +
        ComboBox
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + vtype : String
        + A validation type name as defined in Ext.form.VTypes (defaults to null)
        +
        TextField
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
          + + view : Ext.DataView
        + The DataView used to display the ComboBox's options.
        +
        ComboBox
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TriggerField.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TriggerField.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.TriggerField.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,2317 @@ +
        + + +

        Class Ext.form.TriggerField

        + + + + + + +
        Package:Ext.form
        Defined In:TriggerField.js
        Class:TriggerField
        Subclasses:ComboBox, DateField
        Extends:TextField
        +
        + Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default). +The trigger has no default action, so you must assign a function to implement the trigger click handler by +overriding onTriggerClick. You can create a TriggerField directly, as it renders exactly like a combobox +for which you can provide a custom implementation. For example: +
        var trigger = new Ext.form.TriggerField();
        +trigger.onTriggerClick = myTriggerFn;
        +trigger.applyToMarkup('my-field');
        +However, in general you will most likely want to use TriggerField as the base class for a reusable component. +Ext.form.DateField and Ext.form.ComboBox are perfect examples of this.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowBlank : Boolean
        + False to validate that the value length > 0 (defaults to true)
        +
        TextField
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + blankText : String
        + Error text to display if the allow blank validation fails (defaults to "This field is required")
        +
        TextField
          + + clearCls : String
        + The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
        +
        Field
          + + disableKeyFilter : Boolean
        + True to disable input keystroke filtering (defaults to false)
        +
        TextField
          + + disabled : Boolean
        + True to disable the field (defaults to false).
        +
        Field
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + emptyText : String
        + The default text to display in an empty field (defaults to null).
        +
        TextField
          + + fieldClass : String
        + The default CSS class for the field (defaults to "x-form-field")
        +
        Field
          + + fieldLabel : String
        + The label text to display next to this field (defaults to '')
        +
        Field
          + + focusClass : String
        + The CSS class to use when the field receives focus (defaults to "x-form-focus")
        +
        Field
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideLabel : Boolean
        + True to completely hide the label element (defaults to false)
        +
        Field
          + + hideTrigger : Boolean
        + True to hide the trigger element and display only the base text field (defaults to false)
        +
        TriggerField
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + inputType : String
        + The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
        +
        Field
          + + invalidClass : String
        + The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
        +
        Field
          + + itemCls : String
        + An additional CSS class to apply to this field (defaults to the container's itemCls value if set, or '')
        +
        Field
          + + maskRe : RegExp
        + An input mask regular expression that will be used to filter keystrokes that don't match (defaults to null)
        +
        TextField
          + + maxLength : Number
        + Maximum input field length allowed (defaults to Number.MAX_VALUE)
        +
        TextField
          + + minLength : Number
        + Minimum input field length required (defaults to 0)
        +
        TextField
          + + msgFx : String
        + Experimental The effect used when displaying a validation message under the field (defaults to 'normal').
        +
        Field
          + + name : String
        + The field's HTML name attribute.
        +
        Field
          + + regexText : String
        + The error text to display if regex is used and the test fails during validation (defaults to "")
        +
        TextField
          + + selectOnFocus : Boolean
        + True to automatically select any existing field text when the field receives input focus (defaults to false)
        +
        TextField
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + triggerClass : String
        + A CSS class to apply to the trigger
        +
        TriggerField
          + + validateOnBlur : Boolean
        + Whether the field should validate when it loses focus (defaults to true).
        +
        Field
          + + validationDelay : Number
        + The length of time in milliseconds after user input begins until validation is initiated (defaults to 250)
        +
        Field
          + + validationEvent : String/Boolean
        + The event that should initiate field validation. Set to false to disable automatic validation (defaults to "keyup").
        +
        Field
          + + value : Mixed
        + A value to initialize this field with.
        +
        Field
          + + vtype : String
        + A validation type name as defined in Ext.form.VTypes (defaults to null)
        +
        TextField
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.VTypes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.VTypes.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.form.VTypes.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,181 @@ +
        + +

        Class Ext.form.VTypes

        + + + + + +
        Package:Ext.form
        Defined In:VTypes.js
        Class:VTypes
        Extends:Object
        +
        + Overridable validation definitions. The validations provided are basic and intended to be easily customizable and extended.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + alphaMask : RegExp
        + The keystroke filter mask to be applied on alpha input
        +
        VTypes
          + + alphaText : String
        + The error text to display when the alpha validation function returns false
        +
        VTypes
          + + alphanumMask : RegExp
        + The keystroke filter mask to be applied on alphanumeric input
        +
        VTypes
          + + alphanumText : String
        + The error text to display when the alphanumeric validation function returns false
        +
        VTypes
          + + emailMask : RegExp
        + The keystroke filter mask to be applied on email input
        +
        VTypes
          + + emailText : String
        + The error text to display when the email validation function returns false
        +
        VTypes
          + + urlText : String
        + The error text to display when the url validation function returns false
        +
        VTypes
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.AbstractSelectionModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.AbstractSelectionModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.AbstractSelectionModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,386 @@ +
        + +
        +
        Observable
        +  AbstractSelectionModel
        +

        Class Ext.grid.AbstractSelectionModel

        + + + + + + +
        Package:Ext.grid
        Defined In:AbstractSelectionModel.js
        Class:AbstractSelectionModel
        Subclasses:CellSelectionModel, RowSelectionModel
        Extends:Observable
        +
        + Abstract base class for grid SelectionModels. It provides the interface that should be +implemented by descendant classes. This class should not be directly instantiated.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.CellSelectionModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.CellSelectionModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.CellSelectionModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,538 @@ +
        + +
        +
        Observable
        +  AbstractSelectionModel
        +    CellSelectionModel
        +

        Class Ext.grid.CellSelectionModel

        + + + + + +
        Package:Ext.grid
        Defined In:CellSelectionModel.js
        Class:CellSelectionModel
        Extends:AbstractSelectionModel
        +
        + This class provides the basic implementation for single cell selection in a grid. The object stored +as the selection and returned by getSelectedCell contains the following properties: +
          +
        • record : Ext.data.record

          The Record +which provides the data for the row containing the selection

        • +
        • cell : Ext.data.record

          An object containing the +following properties: +

            +
          • rowIndex : Number

            The index of the selected row

          • +
          • cellIndex : Number

            The index of the selected cell
            +Note that due to possible column reordering, the cellIndex should not be used as an index into +the Record's data. Instead, the name of the selected field should be determined +in order to retrieve the data value from the record by name:

            var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
            +    var data = record.get(fieldName);

          • +

        • +
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.CheckboxSelectionModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.CheckboxSelectionModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.CheckboxSelectionModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,917 @@ +
        + +
        +
        Observable
        +  AbstractSelectionModel
        +    RowSelectionModel
        +      CheckboxSelectionModel
        +

        Class Ext.grid.CheckboxSelectionModel

        + + + + + +
        Package:Ext.grid
        Defined In:CheckboxSelectionModel.js
        Class:CheckboxSelectionModel
        Extends:RowSelectionModel
        +
        + A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + singleSelect : Boolean
        + True to allow selection of only one row at a time (defaults to false)
        +
        RowSelectionModel
          + + sortable : Boolean
        + True if the checkbox column is sortable (defaults to false).
        +
        CheckboxSelectionModel
          + + width : Number
        + The default width in pixels of the checkbox column (defaults to 20).
        +
        CheckboxSelectionModel
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.ColumnModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.ColumnModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.ColumnModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1120 @@ +
        + +
        +
        Observable
        +  ColumnModel
        +

        Class Ext.grid.ColumnModel

        + + + + + + +
        Package:Ext.grid
        Defined In:ColumnModel.js
        Class:ColumnModel
        Subclasses:PropertyColumnModel
        Extends:Observable
        +
        + This is the default implementation of a ColumnModel used by the Grid. This class is initialized +with an Array of column config objects. +

        +An individual column's config object defines the header string, the Ext.data.Record +field the column draws its data from, an otional rendering function to provide customized +data formatting, and the ability to apply a CSS class to all cells in a column through its +id config option.
        +
        Usage:
        +
        var colModel = new Ext.grid.ColumnModel([
        +	{header: "Ticker", width: 60, sortable: true},
        +	{header: "Company Name", width: 150, sortable: true},
        +	{header: "Market Cap.", width: 100, sortable: true},
        +	{header: "$ Sales", width: 100, sortable: true, renderer: money},
        +	{header: "Employees", width: 100, sortable: true, resizable: false}
        + ]);
        +

        +The config options listed for this class are options which may appear in each +individual column definition.

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + align : String
        + (optional) Set the CSS text-align property of the column. Defaults to undefined.
        +
        ColumnModel
          + + editor : Ext.form.Field
        + (optional) The Ext.form.Field to use when editing values in this column if editing is supported by the grid.
        +
        ColumnModel
          + + fixed : Boolean
        + (optional) True if the column width cannot be changed. Defaults to false.
        +
        ColumnModel
          + + header : String
        + The header text to display in the Grid view.
        +
        ColumnModel
          + + hidden : Boolean
        + (optional) True to hide the column. Defaults to false.
        +
        ColumnModel
          + + hideable : Boolean
        + (optional) Specify as false to prevent the user from hiding this column. Defaults to true.
        +
        ColumnModel
          + + resizable : Boolean
        + (optional) False to disable column resizing. Defaults to true.
        +
        ColumnModel
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + defaultSortable : Boolean
        + Default sortable of columns which have no sortable specified (defaults to false)
        +
        ColumnModel
          + + defaultWidth : Number
        + The width of columns which have no width specified (defaults to 100)
        +
        ColumnModel
          + + setConfig : Object
        + The config passed into the constructor
        +
        ColumnModel
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.EditorGridPanel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.EditorGridPanel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.EditorGridPanel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3836 @@ +
        + + +

        Class Ext.grid.EditorGridPanel

        + + + + + + +
        Package:Ext.grid
        Defined In:EditorGrid.js
        Class:EditorGridPanel
        Subclasses:PropertyGrid
        Extends:GridPanel
        +
        + Class for creating and editable grid.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoExpandColumn : String
        + The id of a column in this grid that should expand to fill unused space. This id can not be 0.
        +
        GridPanel
          + + autoExpandMax : Number
        + The maximum width the autoExpandColumn can have (if enabled). Defaults to 1000.
        +
        GridPanel
          + + autoExpandMin : Number
        + The minimum width the autoExpandColumn can have (if enabled). defaults to 50.
        +
        GridPanel
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + clicksToEdit : Number
        + The number of clicks on a cell required to display the cell's editor (defaults to 2)
        +
        EditorGridPanel
          + + cm : Object
        + Shorthand for colModel.
        +
        GridPanel
          + + colModel : Object
        + The Ext.grid.ColumnModel to use when rendering the grid (required).
        +
        GridPanel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + columns : Array
        + An array of columns to auto create a ColumnModel
        +
        GridPanel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disableSelection : Boolean
        + True to disable selections in the grid (defaults to false). - ignored a SelectionModel is specified
        +
        GridPanel
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableColumnHide : Boolean
        + True to enable hiding of columns with the header context menu.
        +
        GridPanel
          + + enableColumnMove : Boolean
        + True to enable drag and drop reorder of columns.
        +
        GridPanel
          + + enableColumnResize : Boolean
        + False to turn off column resizing for the whole grid (defaults to true).
        +
        GridPanel
          + + enableDragDrop : Boolean
        + True to enable drag and drop of rows.
        +
        GridPanel
          + + enableHdMenu : Boolean
        + True to enable the drop down button for menu in the headers.
        +
        GridPanel
          + + enableRowHeightSync : Boolean
        + True to manually sync row heights across locked and not locked rows.
        +
        GridPanel
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + loadMask : Object
        + An Ext.LoadMask config or true to mask the grid while loading (defaults to false).
        +
        GridPanel
          + + maxHeight : Number
        + Sets the maximum height of the grid - ignored if autoHeight is not on.
        +
        GridPanel
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minColumnWidth : Number
        + The minimum width a column can be resized to. Defaults to 25.
        +
        GridPanel
          + + monitorWindowResize : Boolean
        + True to autoSize the grid when the window resizes. Defaults to true.
        +
        GridPanel
          + + sm : Object
        + Shorthand for selModel.
        +
        GridPanel
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + store : Ext.data.Store
        + The Ext.data.Store the grid should use as its data source (required).
        +
        GridPanel
          + + stripeRows : Boolean
        + True to stripe the rows. Default is false.
        +
        GridPanel
          + + view : Object
        + The Ext.grid.GridView used by the grid. This can be set before a call to render().
        +
        GridPanel
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GridPanel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GridPanel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GridPanel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3738 @@ +
        + + +

        Class Ext.grid.GridPanel

        + + + + + + +
        Package:Ext.grid
        Defined In:GridPanel.js
        Class:GridPanel
        Subclasses:EditorGridPanel
        Extends:Panel
        +
        + This class represents the primary interface of a component based grid control. +

        Usage: +
        var grid = new Ext.grid.GridPanel({
        +    store: new Ext.data.Store({
        +        reader: reader,
        +        data: xg.dummyData
        +    }),
        +    columns: [
        +        {id:'company', header: "Company", width: 200, sortable: true, dataIndex: 'company'},
        +        {header: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
        +        {header: "Change", width: 120, sortable: true, dataIndex: 'change'},
        +        {header: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
        +        {header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
        +    ],
        +    viewConfig: {
        +        forceFit: true
        +    },
        +    sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
        +    width:600,
        +    height:300,
        +    frame:true,
        +    title:'Framed with Checkbox Selection and Horizontal Scrolling',
        +    iconCls:'icon-grid'
        +});
        +Note: Although this class inherits many configuration options from base classes, some of them +(such as autoScroll, layout, items, etc) won't function as they do with the base Panel class.
        +
        +To access the data in a Grid, it is necessary to use the data model encapsulated +by the Store. See the cellclick event.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoExpandColumn : String
        + The id of a column in this grid that should expand to fill unused space. This id can not be 0.
        +
        GridPanel
          + + autoExpandMax : Number
        + The maximum width the autoExpandColumn can have (if enabled). Defaults to 1000.
        +
        GridPanel
          + + autoExpandMin : Number
        + The minimum width the autoExpandColumn can have (if enabled). defaults to 50.
        +
        GridPanel
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + cm : Object
        + Shorthand for colModel.
        +
        GridPanel
          + + colModel : Object
        + The Ext.grid.ColumnModel to use when rendering the grid (required).
        +
        GridPanel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + columns : Array
        + An array of columns to auto create a ColumnModel
        +
        GridPanel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disableSelection : Boolean
        + True to disable selections in the grid (defaults to false). - ignored a SelectionModel is specified
        +
        GridPanel
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableColumnHide : Boolean
        + True to enable hiding of columns with the header context menu.
        +
        GridPanel
          + + enableColumnMove : Boolean
        + True to enable drag and drop reorder of columns.
        +
        GridPanel
          + + enableColumnResize : Boolean
        + False to turn off column resizing for the whole grid (defaults to true).
        +
        GridPanel
          + + enableDragDrop : Boolean
        + True to enable drag and drop of rows.
        +
        GridPanel
          + + enableHdMenu : Boolean
        + True to enable the drop down button for menu in the headers.
        +
        GridPanel
          + + enableRowHeightSync : Boolean
        + True to manually sync row heights across locked and not locked rows.
        +
        GridPanel
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + loadMask : Object
        + An Ext.LoadMask config or true to mask the grid while loading (defaults to false).
        +
        GridPanel
          + + maxHeight : Number
        + Sets the maximum height of the grid - ignored if autoHeight is not on.
        +
        GridPanel
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minColumnWidth : Number
        + The minimum width a column can be resized to. Defaults to 25.
        +
        GridPanel
          + + monitorWindowResize : Boolean
        + True to autoSize the grid when the window resizes. Defaults to true.
        +
        GridPanel
          + + sm : Object
        + Shorthand for selModel.
        +
        GridPanel
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + store : Ext.data.Store
        + The Ext.data.Store the grid should use as its data source (required).
        +
        GridPanel
          + + stripeRows : Boolean
        + True to stripe the rows. Default is false.
        +
        GridPanel
          + + trackMouseOver : Boolean
        + True to highlight rows when the mouse is over. Default is true.
        +
        GridPanel
          + + view : Object
        + The Ext.grid.GridView used by the grid. This can be set before a call to render().
        +
        GridPanel
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GridView.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GridView.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GridView.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,710 @@ +
        + +
        +
        Observable
        +  GridView
        +

        Class Ext.grid.GridView

        + + + + + + +
        Package:Ext.grid
        Defined In:GridView.js
        Class:GridView
        Subclasses:GroupingView
        Extends:Observable
        +
        +

        This class encapsulates the user interface of an Ext.grid.GridPanel. +Methods of this class may be used to access user interface elements to enable +special display effects. Do not change the DOM structure of the user interface.

        +

        This class does not provide ways to manipulate the underlying data. The data +model of a Grid is held in an Ext.data.Store.

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoFill : Boolean
        + True to auto expand the columns to fit the grid when the grid is created.
        +
        GridView
          + + emptyText : String
        + Default text to display in the grid body when no rows are available (defaults to '').
        +
        GridView
          + + forceFit : Boolean
        + True to auto expand/contract the size of the columns to fit the grid width and prevent horizontal scrolling.
        +
        GridView
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + columnsText : String
        + The text displayed in the "Columns" menu item
        +
        GridView
          + + scrollOffset : Number
        + +The amount of space to reserve for the scrollbar (defaults to 19 pixels)
        +
        GridView
          + + sortAscText : String
        + The text displayed in the "Sort Ascending" menu item
        +
        GridView
          + + sortClasses : Array
        + The CSS classes applied to a header when it is sorted. (defaults to ["sort-asc", "sort-desc"])
        +
        GridView
          + + sortDescText : String
        + The text displayed in the "Sort Descending" menu item
        +
        GridView
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GroupingView.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GroupingView.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.GroupingView.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,937 @@ +
        + +
        +
        Observable
        +  GridView
        +    GroupingView
        +

        Class Ext.grid.GroupingView

        + + + + + +
        Package:Ext.grid
        Defined In:GroupingView.js
        Class:GroupingView
        Extends:GridView
        +
        + Adds the ability for single level grouping to the grid. +
        var grid = new Ext.grid.GridPanel({
        +    // A groupingStore is required for a GroupingView
        +    store: new Ext.data.GroupingStore({
        +        reader: reader,
        +        data: xg.dummyData,
        +        sortInfo:{field: 'company', direction: "ASC"},
        +        groupField:'industry'
        +    }),
        +
        +    columns: [
        +        {id:'company',header: "Company", width: 60, sortable: true, dataIndex: 'company'},
        +        {header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
        +        {header: "Change", width: 20, sortable: true, dataIndex: 'change', renderer: Ext.util.Format.usMoney},
        +        {header: "Industry", width: 20, sortable: true, dataIndex: 'industry'},
        +        {header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
        +    ],
        +
        +    view: new Ext.grid.GroupingView({
        +        forceFit:true,
        +        // custom grouping text template to display the number of items per group
        +        groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
        +    }),
        +
        +    frame:true,
        +    width: 700,
        +    height: 450,
        +    collapsible: true,
        +    animCollapse: false,
        +    title: 'Grouping Example',
        +    iconCls: 'icon-grid',
        +    renderTo: document.body
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoFill : Boolean
        + True to auto expand the columns to fit the grid when the grid is created.
        +
        GridView
          + + emptyGroupText : String
        + The text to display when there is an empty group value
        +
        GroupingView
          + + emptyText : String
        + Default text to display in the grid body when no rows are available (defaults to '').
        +
        GridView
          + + enableGrouping : Boolean
        + False to disable grouping functionality (defaults to true)
        +
        GroupingView
          + + enableGroupingMenu : Boolean
        + True to enable the grouping control in the column menu
        +
        GroupingView
          + + enableNoGroups : Boolean
        + True to allow the user to turn off grouping
        +
        GroupingView
          + + forceFit : Boolean
        + True to auto expand/contract the size of the columns to fit the grid width and prevent horizontal scrolling.
        +
        GridView
          + + groupByText : String
        + Text displayed in the grid header menu for grouping by a column (defaults to 'Group By This Field').
        +
        GroupingView
          + + groupTextTpl : String
        + The template used to render the group text
        +
        GroupingView
          + + hideGroupedColumn : Boolean
        + True to hide the column that is currently grouped
        +
        GroupingView
          + + ignoreAdd : Boolean
        + True to skip refreshing the view when new rows are added (defaults to false)
        +
        GroupingView
          + + showGroupName : Boolean
        + True to display the name for each set of grouped rows (defaults to false)
        +
        GroupingView
          + + showGroupsText : String
        + Text displayed in the grid header for enabling/disabling grouping (defaults to 'Show in Groups').
        +
        GroupingView
          + + startCollapsed : Boolean
        + True to start all groups collapsed
        +
        GroupingView
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + columnsText : String
        + The text displayed in the "Columns" menu item
        +
        GridView
          + + scrollOffset : Number
        + +The amount of space to reserve for the scrollbar (defaults to 19 pixels)
        +
        GridView
          + + sortAscText : String
        + The text displayed in the "Sort Ascending" menu item
        +
        GridView
          + + sortClasses : Array
        + The CSS classes applied to a header when it is sorted. (defaults to ["sort-asc", "sort-desc"])
        +
        GridView
          + + sortDescText : String
        + The text displayed in the "Sort Descending" menu item
        +
        GridView
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyColumnModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyColumnModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyColumnModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1102 @@ +
        + +
        +
        Observable
        +  ColumnModel
        +    PropertyColumnModel
        +

        Class Ext.grid.PropertyColumnModel

        + + + + + +
        Package:Ext.grid
        Defined In:PropertyGrid.js
        Class:PropertyColumnModel
        Extends:ColumnModel
        +
        + A custom column model for the Ext.grid.PropertyGrid. Generally it should not need to be used directly.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + align : String
        + (optional) Set the CSS text-align property of the column. Defaults to undefined.
        +
        ColumnModel
          + + editor : Ext.form.Field
        + (optional) The Ext.form.Field to use when editing values in this column if editing is supported by the grid.
        +
        ColumnModel
          + + fixed : Boolean
        + (optional) True if the column width cannot be changed. Defaults to false.
        +
        ColumnModel
          + + header : String
        + The header text to display in the Grid view.
        +
        ColumnModel
          + + hidden : Boolean
        + (optional) True to hide the column. Defaults to false.
        +
        ColumnModel
          + + hideable : Boolean
        + (optional) Specify as false to prevent the user from hiding this column. Defaults to true.
        +
        ColumnModel
          + + resizable : Boolean
        + (optional) False to disable column resizing. Defaults to true.
        +
        ColumnModel
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + defaultSortable : Boolean
        + Default sortable of columns which have no sortable specified (defaults to false)
        +
        ColumnModel
          + + defaultWidth : Number
        + The width of columns which have no width specified (defaults to 100)
        +
        ColumnModel
          + + setConfig : Object
        + The config passed into the constructor
        +
        ColumnModel
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyGrid.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyGrid.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyGrid.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3979 @@ +
        + + +

        Class Ext.grid.PropertyGrid

        + + + + + +
        Package:Ext.grid
        Defined In:PropertyGrid.js
        Class:PropertyGrid
        Extends:EditorGridPanel
        +
        + A specialized grid implementation intended to mimic the traditional property grid as typically seen in +development IDEs. Each row in the grid represents a property of some object, and the data is stored +as a set of name/value pairs in Ext.grid.PropertyRecords. Example usage: +
        
        +var grid = new Ext.grid.PropertyGrid({
        +    title: 'Properties Grid',
        +    autoHeight: true,
        +    width: 300,
        +    renderTo: 'grid-ct',
        +    source: {
        +        "(name)": "My Object",
        +        "Created": new Date(Date.parse('10/15/2006')),
        +        "Available": false,
        +        "Version": .01,
        +        "Description": "A test object"
        +    }
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + autoExpandColumn : String
        + The id of a column in this grid that should expand to fill unused space. This id can not be 0.
        +
        GridPanel
          + + autoExpandMax : Number
        + The maximum width the autoExpandColumn can have (if enabled). Defaults to 1000.
        +
        GridPanel
          + + autoExpandMin : Number
        + The minimum width the autoExpandColumn can have (if enabled). defaults to 50.
        +
        GridPanel
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + clicksToEdit : Number
        + The number of clicks on a cell required to display the cell's editor (defaults to 2)
        +
        EditorGridPanel
          + + cm : Object
        + Shorthand for colModel.
        +
        GridPanel
          + + colModel : Object
        + The Ext.grid.ColumnModel to use when rendering the grid (required).
        +
        GridPanel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + columns : Array
        + An array of columns to auto create a ColumnModel
        +
        GridPanel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disableSelection : Boolean
        + True to disable selections in the grid (defaults to false). - ignored a SelectionModel is specified
        +
        GridPanel
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + enableColumnHide : Boolean
        + True to enable hiding of columns with the header context menu.
        +
        GridPanel
          + + enableColumnMove : Boolean
        + True to enable drag and drop reorder of columns.
        +
        GridPanel
          + + enableColumnResize : Boolean
        + False to turn off column resizing for the whole grid (defaults to true).
        +
        GridPanel
          + + enableDragDrop : Boolean
        + True to enable drag and drop of rows.
        +
        GridPanel
          + + enableHdMenu : Boolean
        + True to enable the drop down button for menu in the headers.
        +
        GridPanel
          + + enableRowHeightSync : Boolean
        + True to manually sync row heights across locked and not locked rows.
        +
        GridPanel
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + loadMask : Object
        + An Ext.LoadMask config or true to mask the grid while loading (defaults to false).
        +
        GridPanel
          + + maxHeight : Number
        + Sets the maximum height of the grid - ignored if autoHeight is not on.
        +
        GridPanel
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + minColumnWidth : Number
        + The minimum width a column can be resized to. Defaults to 25.
        +
        GridPanel
          + + monitorWindowResize : Boolean
        + True to autoSize the grid when the window resizes. Defaults to true.
        +
        GridPanel
          + + sm : Object
        + Shorthand for selModel.
        +
        GridPanel
          + + source : Object
        + A data object to use as the data source of the grid (see setSource for details).
        +
        PropertyGrid
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + store : Ext.data.Store
        + The Ext.data.Store the grid should use as its data source (required).
        +
        GridPanel
          + + stripeRows : Boolean
        + True to stripe the rows. Default is false.
        +
        GridPanel
          + + trackMouseOver : Boolean
        + True to highlight rows when the mouse is over. Default is true.
        +
        GridPanel
          + + view : Object
        + The Ext.grid.GridView used by the grid. This can be set before a call to render().
        +
        GridPanel
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyRecord.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyRecord.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyRecord.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,63 @@ +
        + +

        Class Ext.grid.PropertyRecord

        + + + + + +
        Package:Ext.grid
        Defined In:PropertyGrid.js
        Class:PropertyRecord
        Extends:Object
        +
        + A specific Ext.data.Record type that represents a name/value pair and is made to work with the +Ext.grid.PropertyGrid. Typically, PropertyRecords do not need to be created directly as they can be +created implicitly by simply using the appropriate data configs either via the Ext.grid.PropertyGrid.source +config property or by calling Ext.grid.PropertyGrid.setSource. However, if the need arises, these records +can also be created explicitly as shwon below. Example usage: +
        var rec = new Ext.grid.PropertyRecord({
        +    name: 'Birthday',
        +    value: new Date(Date.parse('05/26/1972'))
        +});
        +// Add record to an already populated grid
        +grid.store.addSorted(rec);
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyStore.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyStore.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.PropertyStore.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,327 @@ +
        + +
        +
        Observable
        +  PropertyStore
        +

        Class Ext.grid.PropertyStore

        + + + + + +
        Package:Ext.grid
        Defined In:PropertyGrid.js
        Class:PropertyStore
        Extends:Observable
        +
        + A custom wrapper for the Ext.grid.PropertyGrid's Ext.data.Store. This class handles the mapping +between the custom data source objects supported by the grid and the Ext.grid.PropertyRecord format +required for compatibility with the underlying store. Generally this class should not need to be used directly -- +the grid's data should be accessed from the underlying store via the store property.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.RowNumberer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.RowNumberer.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.RowNumberer.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,97 @@ +
        + +

        Class Ext.grid.RowNumberer

        + + + + + +
        Package:Ext.grid
        Defined In:RowNumberer.js
        Class:RowNumberer
        Extends:Object
        +
        + This is a utility class that can be passed into a Ext.grid.ColumnModel as a column config that provides +an automatic row numbering column. +
        Usage:
        +
        // This is a typical column config with the first column providing row numbers
        + var colModel = new Ext.grid.ColumnModel([
        +    new Ext.grid.RowNumberer(),
        +    {header: "Name", width: 80, sortable: true},
        +    {header: "Code", width: 50, sortable: true},
        +    {header: "Description", width: 200, sortable: true}
        + ]);
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + header : String
        + Any valid text or HTML fragment to display in the header cell for the row number column (defaults to '').
        +
        RowNumberer
          + + sortable : Boolean
        + True if the row number column is sortable (defaults to false).
        +
        RowNumberer
          + + width : Number
        + The default width in pixels of the row number column (defaults to 23).
        +
        RowNumberer
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.RowSelectionModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.RowSelectionModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.grid.RowSelectionModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,890 @@ +
        + +
        +
        Observable
        +  AbstractSelectionModel
        +    RowSelectionModel
        +

        Class Ext.grid.RowSelectionModel

        + + + + + + +
        Package:Ext.grid
        Defined In:RowSelectionModel.js
        Class:RowSelectionModel
        Subclasses:CheckboxSelectionModel
        Extends:AbstractSelectionModel
        +
        + The default SelectionModel used by Ext.grid.Grid. +It supports multiple selections and keyboard selection/navigation. The objects stored +as selections and returned by getSelected, and getSelections are +the Records which provide the data for the selected rows.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + singleSelect : Boolean
        + True to allow selection of only one row at a time (defaults to false)
        +
        RowSelectionModel
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,818 @@ +
        + +

        Class Ext

        + + + + + +
        Package:Global
        Defined In:Ext.js
        Class:Ext
        Extends:Object
        +
        + Ext core utilities and functions.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + emptyFn : Function
        + A reusable empty function
        +
        Ext
          + + enableGarbageCollector : Boolean
        + True to automatically uncache orphaned Ext.Elements periodically (defaults to true)
        +
        Ext
          + + isAir : Boolean
        +
        +
        Ext
          + + isBorderBox : Boolean
        +
        +
        Ext
          + + isGecko : Boolean
        +
        +
        Ext
          + + isIE : Boolean
        +
        +
        Ext
          + + isIE6 : Boolean
        +
        +
        Ext
          + + isIE7 : Boolean
        +
        +
        Ext
          + + isLinux : Boolean
        +
        +
        Ext
          + + isMac : Boolean
        +
        +
        Ext
          + + isOpera : Boolean
        +
        +
        Ext
          + + isReady : Boolean
        + True when the document is fully initialized and ready for action
        +
        Ext
          + + isSafari : Boolean
        +
        +
        Ext
          + + isSecure : Boolean
        + True if the page is running over SSL
        +
        Ext
          + + isStrict : Boolean
        + True if the browser is in strict mode
        +
        Ext
          + + isWindows : Boolean
        +
        +
        Ext
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.AbsoluteLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.AbsoluteLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.AbsoluteLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,61 @@ +
        + +
        +
        ContainerLayout
        +  AnchorLayout
        +    AbsoluteLayout
        +

        Class Ext.layout.AbsoluteLayout

        + + + + + +
        Package:Ext.layout
        Defined In:AbsoluteLayout.js
        Class:AbsoluteLayout
        Extends:AnchorLayout
        +
        +

        Inherits the anchoring of Ext.layout.AnchorLayout and adds the ability for x/y positioning using the +standard x and y component config options.

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.Accordion.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.Accordion.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.Accordion.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,204 @@ +
        + +
        +
        ContainerLayout
        +  FitLayout
        +    Accordion
        +

        Class Ext.layout.Accordion

        + + + + + +
        Package:Ext.layout
        Defined In:AccordionLayout.js
        Class:Accordion
        Extends:FitLayout
        +
        +

        This is a layout that contains multiple panels in an expandable accordion style such that only one +panel can be open at any given time. Each panel has built-in support for expanding and collapsing. +This class is intended to be extended or created via the layout:'accordion' Ext.Container.layout +config, and should generally not need to be created directly via the new keyword.

        +

        Note that when creating a layout via config, the layout-specific config properties must be passed in via +the Ext.Container.layoutConfig object which will then be applied internally to the layout. +Example usage:

        +
        var accordion = new Ext.Panel({
        +    title: 'Accordion Layout',
        +    layout:'accordion',
        +    defaults: {
        +        // applied to each contained panel
        +        bodyStyle: 'padding:15px'
        +    },
        +    layoutConfig: {
        +        // layout-specific configs go here
        +        titleCollapse: false,
        +        animate: true,
        +        activeOnTop: true
        +    }
        +    items: [{
        +        title: 'Panel 1',
        +        html: '<p>Panel content!</p>'
        +    },{
        +        title: 'Panel 2',
        +        html: '<p>Panel content!</p>'
        +    },{
        +        title: 'Panel 3',
        +        html: '<p>Panel content!</p>'
        +    }]
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + autoWidth : Boolean
        + True to set each contained item's width to 'auto', false to use the item's current width (defaults to true).
        +
        Accordion
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
          + + sequence : Boolean
        + Experimental. If animate is set to true, this will result in each animation running in sequence.
        +
        Accordion
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.AnchorLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.AnchorLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.AnchorLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,86 @@ +
        + +
        +
        ContainerLayout
        +  AnchorLayout
        +

        Class Ext.layout.AnchorLayout

        + + + + + + +
        Package:Ext.layout
        Defined In:AnchorLayout.js
        Class:AnchorLayout
        Subclasses:AbsoluteLayout, FormLayout
        Extends:ContainerLayout
        +
        +

        This is a layout that enables anchoring of contained elements relative to the container's dimensions. If +the container is resized, all anchored items are automatically rerendered according to their anchor rules. +This class is intended to be extended or created via the layout:'anchor' Ext.Container.layout config, +and should generally not need to be created directly via the new keyword.

        +

        AnchorLayout does not have any direct config options (other than inherited ones). However, the container +using the AnchorLayout can supply an anchoring-specific config property of anchorSize. By default, +AnchorLayout will calculate anchor measurements based on the size of the container itself. However, if +anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating anchor +measurements based on it instead, allowing the container to be sized independently of the anchoring logic if necessary.

        +

        The items added to an AnchorLayout can also supply an anchoring-specific config property of anchor which +is a string containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%'). +This value is what tells the layout how the item should be anchored to the container. The following types of +anchor values are supported: +

          +
        • Percentage: Any value between 1 and 100, expressed as a percentage. The first anchor is the percentage +width that the item should take up within the container, and the second is the percentage height. Example: '100% 50%' +would render an item the complete width of the container and 1/2 its height. If only one anchor value is supplied +it is assumed to be the width value and the height will default to auto.
        • +
        • Offsets: Any positive or negative integer value. The first anchor is the offset from the right edge of +the container, and the second is the offset from the bottom edge. Example: '-50 -100' would render an item the +complete width of the container minus 50 pixels and the complete height minus 100 pixels. If only one anchor value +is supplied it is assumed to be the right offset value and the bottom offset will default to 0.
        • +
        • Sides: Valid values are 'right' (or 'r') and 'bottom' (or 'b'). Either the container must have a fixed +size or an anchorSize config value defined at render time in order for these to have any effect.
        • +
        +

        Anchor values can also be mixed as needed. For example, '-50 75%' would render the width offset from the +container right edge by 50 pixels and 75% of the container's height.

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.Region.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.Region.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.Region.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,329 @@ +
        + +

        Class Ext.layout.BorderLayout.Region

        + + + + + + +
        Package:Ext.layout
        Defined In:BorderLayout.js
        Class:BorderLayout.Region
        Subclasses:BorderLayout.SplitRegion
        Extends:Object
        +
        + This is a region of a BorderLayout that acts as a subcontainer within the layout. Each region has its own +layout that is independent of other regions and the containing BorderLayout, and can be any of the valid +Ext layout types. Region size is managed automatically and cannot be changed by the user -- for resizable +regions, see Ext.layout.BorderLayout.SplitRegion.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + minHeight : Number
        + The minimum allowable height in pixels for this region (defaults to 50)
        +
        BorderLayout.Region
          + + minWidth : Number
        + The minimum allowable width in pixels for this region (defaults to 50)
        +
        BorderLayout.Region
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + isCollapsed : Boolean
        + True if this region is collapsed. Read-only.
        +
        BorderLayout.Region
          + + position : String
        + +This region's layout position (north, south, east, west or center). Read-only.
        +
        BorderLayout.Region
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.SplitRegion.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.SplitRegion.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.SplitRegion.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,384 @@ +
        + +
        +
        BorderLayout.Region
        +  BorderLayout.SplitRegion
        +

        Class Ext.layout.BorderLayout.SplitRegion

        + + + + + +
        Package:Ext.layout
        Defined In:BorderLayout.js
        Class:BorderLayout.SplitRegion
        Extends:BorderLayout.Region
        +
        + This is a specialized type of BorderLayout region that has a built-in Ext.SplitBar for user resizing of regions.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + minHeight : Number
        + The minimum allowable height in pixels for this region (defaults to 50)
        +
        BorderLayout.Region
          + + minWidth : Number
        + The minimum allowable width in pixels for this region (defaults to 50)
        +
        BorderLayout.Region
        + +

        Public Properties

        + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + isCollapsed : Boolean
        + True if this region is collapsed. Read-only.
        +
        BorderLayout.Region
          + + position : String
        + +This region's layout position (north, south, east, west or center). Read-only.
        +
        BorderLayout.Region
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.BorderLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,89 @@ +
        + +
        +
        ContainerLayout
        +  BorderLayout
        +

        Class Ext.layout.BorderLayout

        + + + + + +
        Package:Ext.layout
        Defined In:BorderLayout.js
        Class:BorderLayout
        Extends:ContainerLayout
        +
        +

        This is a multi-pane, application-oriented UI layout style that supports multiple nested panels, automatic +split bars between regions and built-in expanding and collapsing of regions. +This class is intended to be extended or created via the layout:'border' Ext.Container.layout config, +and should generally not need to be created directly via the new keyword.

        +

        BorderLayout does not have any direct config options (other than inherited ones). All configs available +for customizing the BorderLayout are at the Ext.layout.BorderLayout.Region and +Ext.layout.BorderLayout.SplitRegion levels. Example usage:

        +
        var border = new Ext.Panel({
        +    title: 'Border Layout',
        +    layout:'border',
        +    items: [{
        +        title: 'South Panel',
        +        region: 'south',
        +        height: 100,
        +        minSize: 75,
        +        maxSize: 250,
        +        margins: '0 5 5 5'
        +    },{
        +        title: 'West Panel',
        +        region:'west',
        +        margins: '5 0 0 5',
        +        cmargins: '5 5 0 5',
        +        width: 200,
        +        minSize: 100,
        +        maxSize: 300
        +    },{
        +        title: 'Main Content',
        +        region:'center',
        +        margins: '5 5 0 0'
        +    }]
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.CardLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.CardLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.CardLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,180 @@ +
        + +
        +
        ContainerLayout
        +  FitLayout
        +    CardLayout
        +

        Class Ext.layout.CardLayout

        + + + + + +
        Package:Ext.layout
        Defined In:CardLayout.js
        Class:CardLayout
        Extends:FitLayout
        +
        +

        This layout contains multiple panels, each fit to the container, where only a single panel can be +visible at any given time. This layout style is most commonly used for wizards, tab implementations, etc. +This class is intended to be extended or created via the layout:'card' Ext.Container.layout config, +and should generally not need to be created directly via the new keyword.

        +

        The CardLayout's focal method is setActiveItem. Since only one panel is displayed at a time, +the only way to move from one panel to the next is by calling setActiveItem, passing the id or index of +the next panel to display. The layout itself does not provide a mechanism for handling this navigation, +so that functionality must be provided by the developer.

        +

        In the following example, a simplistic wizard setup is demonstrated. A button bar is added +to the footer of the containing panel to provide navigation buttons. The buttons will be handled by a +common navigation routine -- for this example, the implementation of that routine has been ommitted since +it can be any type of custom logic. Note that other uses of a CardLayout (like a tab control) would require a +completely different implementation. For serious implementations, a better approach would be to extend +CardLayout to provide the custom functionality needed. Example usage:

        +
        var navHandler = function(direction){
        +    // This routine could contain business logic required to manage the navigation steps.
        +    // It would call setActiveItem as needed, manage navigation button state, handle any
        +    // branching logic that might be required, handle alternate actions like cancellation
        +    // or finalization, etc.  A complete wizard implementation could get pretty
        +    // sophisticated depending on the complexity required, and should probably be
        +    // done as a subclass of CardLayout in a real-world implementation.
        +};
        +
        +var card = new Ext.Panel({
        +    title: 'Example Wizard',
        +    layout:'card',
        +    activeItem: 0, // make sure the active item is set on the container config!
        +    bodyStyle: 'padding:15px',
        +    defaults: {
        +        // applied to each contained panel
        +        border:false
        +    },
        +    // just an example of one possible navigation scheme, using buttons
        +    bbar: [
        +        {
        +            id: 'move-prev',
        +            text: 'Back',
        +            handler: navHandler.createDelegate(this, [-1]),
        +            disabled: true
        +        },
        +        '->', // greedy spacer so that the buttons are aligned to each side
        +        {
        +            id: 'move-next',
        +            text: 'Next',
        +            handler: navHandler.createDelegate(this, [1])
        +        }
        +    ],
        +    // the panels (or "cards") within the layout
        +    items: [{
        +        id: 'card-0',
        +        html: '<h1>Welcome to the Wizard!</h1><p>Step 1 of 3</p>'
        +    },{
        +        id: 'card-1',
        +        html: '<p>Step 2 of 3</p>'
        +    },{
        +        id: 'card-2',
        +        html: '<h1>Congratulations!</h1><p>Step 3 of 3 - Complete</p>'
        +    }]
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.ColumnLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.ColumnLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.ColumnLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,110 @@ +
        + +
        +
        ContainerLayout
        +  ColumnLayout
        +

        Class Ext.layout.ColumnLayout

        + + + + + +
        Package:Ext.layout
        Defined In:ColumnLayout.js
        Class:ColumnLayout
        Extends:ContainerLayout
        +
        +

        This is the layout style of choice for creating structural layouts in a multi-column format where the width of +each column can be specified as a percentage or fixed width, but the height is allowed to vary based on the content. +This class is intended to be extended or created via the layout:'column' Ext.Container.layout config, +and should generally not need to be created directly via the new keyword.

        +

        ColumnLayout does not have any direct config options (other than inherited ones), but it does support a +specific config property of columnWidth that can be included in the config of any panel added to it. The +layout will use the width (if pixels) or columnWidth (if percent) of each panel during layout to determine how to size each panel. +If width or columnWidth is not specified for a given panel, its width will default to the panel's width (or auto).

        +

        The width property is always evaluated as pixels, and must be a number greater than or equal to 1. +The columnWidth property is always evaluated as a percentage, and must be a decimal value greater than 0 and +less than 1 (e.g., .25).

        +

        The basic rules for specifying column widths are pretty simple. The logic makes two passes through the +set of contained panels. During the first layout pass, all panels that either have a fixed width or none +specified (auto) are skipped, but their widths are subtracted from the overall container width. During the second +pass, all panels with columnWidths are assigned pixel widths in proportion to their percentages based on +the total remaining container width. In other words, percentage width panels are designed to fill the space +left over by all the fixed-width or auto-width panels. Because of this, while you can specify any number of columns +with different percentages, the columnWidths must always add up to 1 (or 100%) when added together, otherwise your +layout may not render as expected. Example usage:

        +
        // All columns are percentages -- they must add up to 1
        +var p = new Ext.Panel({
        +    title: 'Column Layout - Percentage Only',
        +    layout:'column',
        +    items: [{
        +        title: 'Column 1',
        +        columnWidth: .25 
        +    },{
        +        title: 'Column 2',
        +        columnWidth: .6
        +    },{
        +        title: 'Column 3',
        +        columnWidth: .15
        +    }]
        +});
        +
        +// Mix of width and columnWidth -- all columnWidth values values must add
        +// up to 1. The first column will take up exactly 120px, and the last two
        +// columns will fill the remaining container width.
        +var p = new Ext.Panel({
        +    title: 'Column Layout - Mixed',
        +    layout:'column',
        +    items: [{
        +        title: 'Column 1',
        +        width: 120
        +    },{
        +        title: 'Column 2',
        +        columnWidth: .8
        +    },{
        +        title: 'Column 3',
        +        columnWidth: .2
        +    }]
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.ContainerLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.ContainerLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.ContainerLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,84 @@ +
        + +

        Class Ext.layout.ContainerLayout

        + + + + + + +
        Package:Ext.layout
        Defined In:ContainerLayout.js
        Class:ContainerLayout
        Subclasses:AnchorLayout, BorderLayout, ColumnLayout, FitLayout, TableLayout
        Extends:Object
        +
        + Every layout is composed of one or more Ext.Container elements internally, and ContainerLayout provides +the basic foundation for all other layout classes in Ext. It is a non-visual class that simply provides the +base logic required for a Container to function as a layout. This class is intended to be extended and should +generally not need to be created directly via the new keyword.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.FitLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.FitLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.FitLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,98 @@ +
        + +
        +
        ContainerLayout
        +  FitLayout
        +

        Class Ext.layout.FitLayout

        + + + + + + +
        Package:Ext.layout
        Defined In:FitLayout.js
        Class:FitLayout
        Subclasses:Accordion, CardLayout
        Extends:ContainerLayout
        +
        +

        This is a base class for layouts that contain a single item that automatically expands to fill the layout's +container. This class is intended to be extended or created via the layout:'fit' Ext.Container.layout +config, and should generally not need to be created directly via the new keyword.

        +

        FitLayout does not have any direct config options (other than inherited ones). To fit a panel to a container +using FitLayout, simply set layout:'fit' on the container and add a single panel to it. If the container has +multiple panels, only the first one will be displayed. Example usage:

        +
        var p = new Ext.Panel({
        +    title: 'Fit Layout',
        +    layout:'fit',
        +    items: {
        +        title: 'Inner Panel',
        +        html: '<p>This is the inner panel content</p>',
        +        border: false
        +    }
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
        + +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.FormLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.FormLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.FormLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,167 @@ +
        + +
        +
        ContainerLayout
        +  AnchorLayout
        +    FormLayout
        +

        Class Ext.layout.FormLayout

        + + + + + +
        Package:Ext.layout
        Defined In:FormLayout.js
        Class:FormLayout
        Extends:AnchorLayout
        +
        +

        This is a layout specifically designed for creating forms. +This class can be extended or created via the layout:'form' Ext.Container.layout config, +and should generally not need to be created directly via the new keyword. However, when used in an application, +it will usually be preferrable to use a Ext.form.FormPanel (which automatically uses FormLayout as its layout +class) since it also provides built-in functionality for loading, validating and submitting the form.

        +

        Note that when creating a layout via config, the layout-specific config properties must be passed in via +the Ext.Container.layoutConfig object which will then be applied internally to the layout. The container +using the FormLayout can also supply the following form-specific config properties which will be applied by the layout: +

          +
        • hideLabels: (Boolean) True to hide field labels by default (defaults to false)
        • +
        • itemCls: (String) A CSS class to add to the div wrapper that contains each field label +and field element (the default class is 'x-form-item' and itemCls will be added to that)
        • +
        • labelAlign: (String) The default label alignment. The default value is empty string '' +for left alignment, but specifying 'top' will align the labels above the fields.
        • +
        • labelPad: (Number) The default padding in pixels for field labels (defaults to 5). labelPad only +applies if labelWidth is also specified, otherwise it will be ignored.
        • +
        • labelWidth: (Number) The default width in pixels of field labels (defaults to 100)
        • +

        +

        Any type of components can be added to a FormLayout, but items that inherit from Ext.form.Field +can also supply the following field-specific config properties: +

          +
        • clearCls: (String) The CSS class to apply to the special clearing div rendered directly after each +form field wrapper (defaults to 'x-form-clear-left')
        • +
        • fieldLabel: (String) The text to display as the label for this field (defaults to '')
        • +
        • hideLabel: (Boolean) True to hide the label and separator for this field (defaults to false).
        • +
        • itemCls: (String) A CSS class to add to the div wrapper that contains this field label +and field element (the default class is 'x-form-item' and itemCls will be added to that). If supplied, +itemCls at the field level will override the default itemCls supplied at the container level.
        • +
        • labelSeparator: (String) The separator to display after the text of the label for this field +(defaults to a colon ':' or the layout's value for labelSeparator). To hide the separator use empty string ''.
        • +
        • labelStyle: (String) A CSS style specification string to add to the field label for this field +(defaults to '' or the layout's value for labelStyle).
        • +
        +Example usage:

        +
        // Required if showing validation messages
        +Ext.QuickTips.init();
        +
        +// While you can create a basic Panel with layout:'form', practically
        +// you should usually use a FormPanel to also get its form functionality
        +// since it already creates a FormLayout internally.
        +var form = new Ext.form.FormPanel({
        +    labelWidth: 75,
        +    title: 'Form Layout',
        +    bodyStyle:'padding:15px',
        +    width: 350,
        +    labelPad: 10,
        +    defaultType: 'textfield',
        +    defaults: {
        +        // applied to each contained item
        +        width: 230,
        +        msgTarget: 'side'
        +    },
        +    layoutConfig: {
        +        // layout-specific configs go here
        +        labelSeparator: ''
        +    },
        +    items: [{
        +            fieldLabel: 'First Name',
        +            name: 'first',
        +            allowBlank: false
        +        },{
        +            fieldLabel: 'Last Name',
        +            name: 'last'
        +        },{
        +            fieldLabel: 'Company',
        +            name: 'company'
        +        },{
        +            fieldLabel: 'Email',
        +            name: 'email',
        +            vtype:'email'
        +        }
        +    ],
        +    buttons: [{
        +        text: 'Save'
        +    },{
        +        text: 'Cancel'
        +    }]
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + elementStyle : String
        + A CSS style specification string to add to each field element in this layout (defaults to '').
        +
        FormLayout
          + + labelStyle : String
        + A CSS style specification string to add to each field label in this layout (defaults to '').
        +
        FormLayout
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.TableLayout.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.TableLayout.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.layout.TableLayout.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,116 @@ +
        + +
        +
        ContainerLayout
        +  TableLayout
        +

        Class Ext.layout.TableLayout

        + + + + + +
        Package:Ext.layout
        Defined In:TableLayout.js
        Class:TableLayout
        Extends:ContainerLayout
        +
        +

        This layout allows you to easily render content into an HTML table. The total number of columns can be +specified, and rowspan and colspan can be used to create complex layouts within the table. +This class is intended to be extended or created via the layout:'table' Ext.Container.layout config, +and should generally not need to be created directly via the new keyword.

        +

        Note that when creating a layout via config, the layout-specific config properties must be passed in via +the Ext.Container.layoutConfig object which will then be applied internally to the layout. In the +case of TableLayout, the only valid layout config property is columns. However, the items added to a +TableLayout can supply table-specific config properties of rowspan and colspan, as explained below.

        +

        The basic concept of building up a TableLayout is conceptually very similar to building up a standard +HTML table. You simply add each panel (or "cell") that you want to include along with any span attributes +specified as the special config properties of rowspan and colspan which work exactly like their HTML counterparts. +Rather than explicitly creating and nesting rows and columns as you would in HTML, you simply specify the +total column count in the layoutConfig and start adding panels in their natural order from left to right, +top to bottom. The layout will automatically figure out, based on the column count, rowspans and colspans, +how to position each panel within the table. Just like with HTML tables, your rowspans and colspans must add +up correctly in your overall layout or you'll end up with missing and/or extra cells! Example usage:

        +
        // This code will generate a layout table that is 3 columns by 2 rows
        +// with some spanning included.  The basic layout will be:
        +// +--------+-----------------+
        +// |   A    |   B             |
        +// |        |--------+--------|
        +// |        |   C    |   D    |
        +// +--------+--------+--------+
        +var table = new Ext.Panel({
        +    title: 'Table Layout',
        +    layout:'table',
        +    defaults: {
        +        // applied to each contained panel
        +        bodyStyle:'padding:20px'
        +    },
        +    layoutConfig: {
        +        // The total column count must be specified here
        +        columns: 3
        +    },
        +    items: [{
        +        html: '<p>Cell A content</p>',
        +        rowspan: 2
        +    },{
        +        html: '<p>Cell B content</p>',
        +        colspan: 2
        +    },{
        +        html: '<p>Cell C content</p>'
        +    },{
        +        html: '<p>Cell D content</p>'
        +    }]
        +});
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + renderHidden : Boolean
        + True to hide each contained item on render (defaults to false).
        +
        ContainerLayout
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Adapter.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Adapter.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Adapter.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1331 @@ +
        + +
        +
        Observable
        +  Component
        +    BaseItem
        +      Adapter
        +

        Class Ext.menu.Adapter

        + + + + + + +
        Package:Ext.menu
        Defined In:Adapter.js
        Class:Adapter
        Subclasses:ColorItem, DateItem
        Extends:BaseItem
        +
        + A base utility class that adapts a non-menu component so that it can be wrapped by a menu item and added to a menu. +It provides basic rendering, activation management and enable/disable logic required to work in menus.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to false)
        +
        BaseItem
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to true)
        +
        BaseItem
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.BaseItem.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.BaseItem.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.BaseItem.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1330 @@ +
        + +
        +
        Observable
        +  Component
        +    BaseItem
        +

        Class Ext.menu.BaseItem

        + + + + + + +
        Package:Ext.menu
        Defined In:BaseItem.js
        Class:BaseItem
        Subclasses:Adapter, Item, Separator, TextItem
        Extends:Component
        +
        + The base class for all items that render into menus. BaseItem provides default rendering, activated state +management and base configuration options shared by all menu components.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to false)
        +
        BaseItem
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to true)
        +
        BaseItem
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.CheckItem.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.CheckItem.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.CheckItem.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1546 @@ +
        + +
        +
        Observable
        +  Component
        +    BaseItem
        +      Item
        +        CheckItem
        +

        Class Ext.menu.CheckItem

        + + + + + +
        Package:Ext.menu
        Defined In:CheckItem.js
        Class:CheckItem
        Extends:Item
        +
        + Adds a menu item that contains a checkbox by default, but can also be part of a radio group.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to false)
        +
        BaseItem
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + groupClass : String
        + The default CSS class to use for radio group check items (defaults to "x-menu-group-item")
        +
        CheckItem
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to true)
        +
        BaseItem
          + + href : String
        + The href attribute to use for the underlying anchor link (defaults to '#').
        +
        Item
          + + hrefTarget : String
        + The target attribute to use for the underlying anchor link (defaults to '').
        +
        Item
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + The default CSS class to use for check items (defaults to "x-menu-item x-menu-check-item")
        +
        CheckItem
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + showDelay : Number
        + Length of time in milliseconds to wait before showing this item (defaults to 200)
        +
        Item
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + text : String
        + The text to display in this item (defaults to '').
        +
        Item
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.ColorItem.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.ColorItem.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.ColorItem.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1339 @@ +
        + +
        +
        Observable
        +  Component
        +    BaseItem
        +      Adapter
        +        ColorItem
        +

        Class Ext.menu.ColorItem

        + + + + + +
        Package:Ext.menu
        Defined In:ColorItem.js
        Class:ColorItem
        Extends:Adapter
        +
        + A menu item that wraps the Ext.ColorPalette component.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to false)
        +
        BaseItem
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to true)
        +
        BaseItem
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + palette : Ext.ColorPalette
        + The Ext.ColorPalette object
        +
        ColorItem
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.ColorMenu.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.ColorMenu.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.ColorMenu.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,867 @@ +
        + +
        +
        Observable
        +  Menu
        +    ColorMenu
        +

        Class Ext.menu.ColorMenu

        + + + + + +
        Package:Ext.menu
        Defined In:ColorMenu.js
        Class:ColorMenu
        Extends:Menu
        +
        + A menu containing a Ext.menu.ColorItem component (which provides a basic color picker).
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowOtherMenus : Boolean
        + True to allow multiple menus to be displayed at the same time (defaults to false)
        +
        Menu
          + + items : Mixed
        + An array of items to be added to this menu. See add for a list of valid item types.
        +
        Menu
          + + minWidth : Number
        + The minimum width of the menu in pixels (defaults to 120)
        +
        Menu
          + + subMenuAlign : String
        + The Ext.Element.alignTo anchor position value to use for submenus of this menu (defaults to "tl-tr?")
        +
        Menu
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + palette : ColorPalette
        + The Ext.ColorPalette instance for this ColorMenu
        +
        ColorMenu
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.DateItem.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.DateItem.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.DateItem.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1339 @@ +
        + + +

        Class Ext.menu.DateItem

        + + + + + +
        Package:Ext.menu
        Defined In:DateItem.js
        Class:DateItem
        Extends:Adapter
        +
        + A menu item that wraps the Ext.DatPicker component.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to false)
        +
        BaseItem
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to true)
        +
        BaseItem
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + picker : Ext.DatePicker
        + The Ext.DatePicker object
        +
        DateItem
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.DateMenu.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.DateMenu.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.DateMenu.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,867 @@ +
        + +
        +
        Observable
        +  Menu
        +    DateMenu
        +

        Class Ext.menu.DateMenu

        + + + + + +
        Package:Ext.menu
        Defined In:DateMenu.js
        Class:DateMenu
        Extends:Menu
        +
        + A menu containing a Ext.menu.DateItem component (which provides a date picker).
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowOtherMenus : Boolean
        + True to allow multiple menus to be displayed at the same time (defaults to false)
        +
        Menu
          + + items : Mixed
        + An array of items to be added to this menu. See add for a list of valid item types.
        +
        Menu
          + + minWidth : Number
        + The minimum width of the menu in pixels (defaults to 120)
        +
        Menu
          + + subMenuAlign : String
        + The Ext.Element.alignTo anchor position value to use for submenus of this menu (defaults to "tl-tr?")
        +
        Menu
        + +

        Public Properties

        + + + + + + + + + + +
        PropertyDefined By
          + + picker : DatePicker
        + The Ext.DatePicker instance for this DateMenu
        +
        DateMenu
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Item.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Item.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Item.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1441 @@ +
        + + +

        Class Ext.menu.Item

        + + + + + + +
        Package:Ext.menu
        Defined In:Item.js
        Class:Item
        Subclasses:CheckItem
        Extends:BaseItem
        +
        + A base class for all menu items that require menu-related functionality (like sub-menus) and are not static +display items. Item extends the base functionality of Ext.menu.BaseItem by adding menu-specific +activation and click handling.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to true)
        +
        Item
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to true)
        +
        BaseItem
          + + href : String
        + The href attribute to use for the underlying anchor link (defaults to '#').
        +
        Item
          + + hrefTarget : String
        + The target attribute to use for the underlying anchor link (defaults to '').
        +
        Item
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + The default CSS class to use for menu items (defaults to 'x-menu-item')
        +
        Item
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + showDelay : Number
        + Length of time in milliseconds to wait before showing this item (defaults to 200)
        +
        Item
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + text : String
        + The text to display in this item (defaults to '').
        +
        Item
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Menu.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Menu.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Menu.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,837 @@ +
        + +
        +
        Observable
        +  Menu
        +

        Class Ext.menu.Menu

        + + + + + + +
        Package:Ext.menu
        Defined In:Menu.js
        Class:Menu
        Subclasses:ColorMenu, DateMenu
        Extends:Observable
        +
        + A menu object. This is the container to which you add all other menu items. Menu can also serve a as a base class +when you want a specialzed menu based off of another component (like Ext.menu.DateMenu for example).
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowOtherMenus : Boolean
        + True to allow multiple menus to be displayed at the same time (defaults to false)
        +
        Menu
          + + items : Mixed
        + An array of items to be added to this menu. See add for a list of valid item types.
        +
        Menu
          + + minWidth : Number
        + The minimum width of the menu in pixels (defaults to 120)
        +
        Menu
          + + subMenuAlign : String
        + The Ext.Element.alignTo anchor position value to use for submenus of this menu (defaults to "tl-tr?")
        +
        Menu
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.MenuMgr.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.MenuMgr.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.MenuMgr.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,73 @@ +
        + +

        Class Ext.menu.MenuMgr

        + + + + + +
        Package:Ext.menu
        Defined In:MenuMgr.js
        Class:MenuMgr
        Extends:Object
        +
        + Provides a common registry of all menu items on a page so that they can be easily accessed by id.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Separator.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Separator.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.Separator.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1339 @@ +
        + +
        +
        Observable
        +  Component
        +    BaseItem
        +      Separator
        +

        Class Ext.menu.Separator

        + + + + + +
        Package:Ext.menu
        Defined In:Separator.js
        Class:Separator
        Extends:BaseItem
        +
        + Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will +add one of these by using "-" in you call to add() or in your items config rather than creating one directly.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to false)
        +
        BaseItem
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to false)
        +
        Separator
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + The default CSS class to use for separators (defaults to "x-menu-sep")
        +
        Separator
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.TextItem.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.TextItem.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.menu.TextItem.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1347 @@ +
        + +
        +
        Observable
        +  Component
        +    BaseItem
        +      TextItem
        +

        Class Ext.menu.TextItem

        + + + + + +
        Package:Ext.menu
        Defined In:TextItem.js
        Class:TextItem
        Extends:BaseItem
        +
        + Adds a static text string to a menu, usually used as either a heading or group separator.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + activeClass : String
        + The CSS class to use when the item becomes activated (defaults to "x-menu-item-active")
        +
        BaseItem
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + canActivate : Boolean
        + True if this item can be visually activated (defaults to false)
        +
        BaseItem
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + handler : Function
        + A function that will handle the click event of this menu item (defaults to undefined)
        +
        BaseItem
          + + hideDelay : Number
        + Length of time in milliseconds to wait before hiding after a click (defaults to 100)
        +
        BaseItem
          + + hideOnClick : Boolean
        + True to hide the containing menu after this item is clicked (defaults to false)
        +
        TextItem
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + itemCls : String
        + The default CSS class to use for text items (defaults to "x-menu-text")
        +
        TextItem
          + + scope : Object
        + The scope in which the handler function will be called.
        +
        BaseItem
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + text : String
        + The text to display for this item (defaults to '')
        +
        TextItem
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.CookieProvider.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.CookieProvider.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.CookieProvider.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,232 @@ +
        + +
        +
        Provider
        +  CookieProvider
        +

        Class Ext.state.CookieProvider

        + + + + + +
        Package:Ext.state
        Defined In:CookieProvider.js
        Class:CookieProvider
        Extends:Provider
        +
        + The default Provider implementation which saves state via cookies. +
        Usage: +
        var cp = new Ext.state.CookieProvider({
        +       path: "/cgi-bin/",
        +       expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days
        +       domain: "extjs.com"
        +   });
        +   Ext.state.Manager.setProvider(cp);
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + expires : Date
        + The cookie expiration date (defaults to 7 days from now)
        +
        CookieProvider
          + + path : String
        + The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site)
        +
        CookieProvider
          + + secure : Boolean
        + True if the site is using SSL (defaults to false)
        +
        CookieProvider
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.Manager.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.Manager.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.Manager.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,144 @@ +
        + +

        Class Ext.state.Manager

        + + + + + +
        Package:Ext.state
        Defined In:StateManager.js
        Class:Manager
        Extends:Object
        +
        + This is the global state manager. By default all components that are "state aware" check this class +for state information if you don't pass them a custom state provider. In order for this class +to be useful, it must be initialized with a provider when your application initializes. +
        // in your initialization function
        +init : function(){
        +   Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
        +   ...
        +   // supposed you have a "Ext.BorderLayout" href="output/Ext.BorderLayout.html">Ext.BorderLayout
        +   var layout = new Ext.BorderLayout(...);
        +   layout.restoreState();
        +   // or a {Ext.BasicDialog}
        +   var dialog = new Ext.BasicDialog(...);
        +   dialog.restoreState();


        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.Provider.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.Provider.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.state.Provider.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,157 @@ +
        + +

        Class Ext.state.Provider

        + + + + + + +
        Package:Ext.state
        Defined In:Provider.js
        Class:Provider
        Subclasses:CookieProvider
        Extends:Object
        +
        + Abstract base class for state provider implementations. This class provides methods +for encoding and decoding typed variables including dates and defines the +Provider interface.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.AsyncTreeNode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.AsyncTreeNode.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.AsyncTreeNode.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1781 @@ +
        + +
        +
        Observable
        +  Node
        +    TreeNode
        +      AsyncTreeNode
        +

        Class Ext.tree.AsyncTreeNode

        + + + + + +
        Package:Ext.tree
        Defined In:AsyncTreeNode.js
        Class:AsyncTreeNode
        Extends:TreeNode
        +
        +
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowChildren : Boolean
        + False to not allow this node to have child nodes (defaults to true)
        +
        TreeNode
          + + allowDrag : Boolean
        + False to make this node undraggable if draggable = true (defaults to true)
        +
        TreeNode
          + + allowDrop : Boolean
        + False if this node cannot have child nodes dropped on it (defaults to true)
        +
        TreeNode
          + + cls : String
        + A css class to be added to the node
        +
        TreeNode
          + + disabled : Boolean
        + true to start the node disabled
        +
        TreeNode
          + + draggable : Boolean
        + True to make this node draggable (defaults to false)
        +
        TreeNode
          + + expandable : Boolean
        + If set to true, the node will always show a plus/minus icon, even when empty
        +
        TreeNode
          + + expanded : Boolean
        + true to start the node expanded
        +
        TreeNode
          + + href : String
        + URL of the link used for the node (defaults to #)
        +
        TreeNode
          + + hrefTarget : String
        + target frame for the link
        +
        TreeNode
          + + iconCls : String
        + A css class to be added to the nodes icon element for applying css background images
        +
        TreeNode
          + + id : String
        + The id for this node. If one is not specified, one is generated.
        +
        Node
          + + isTarget : Boolean
        + False to not allow this node to act as a drop target (defaults to true)
        +
        TreeNode
          + + leaf : Boolean
        + true if this node is a leaf and does not have children
        +
        Node
          + + loader : TreeLoader
        + A TreeLoader to be used by this node (defaults to the loader defined on the tree)
        +
        AsyncTreeNode
          + + qtip : String
        + An Ext QuickTip for the node
        +
        TreeNode
          + + qtipCfg : String
        + An Ext QuickTip config for the node (used instead of qtip)
        +
        TreeNode
          + + singleClickExpand : Boolean
        + True for single click expand on this node
        +
        TreeNode
          + + text : String
        + The text for this node
        +
        TreeNode
          + + uiProvider : Function
        + A UI class to use for this node (defaults to Ext.tree.TreeNodeUI)
        +
        TreeNode
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + attributes : Object
        + The attributes supplied for the node. You can use this property to access any custom attributes you supplied.
        +
        Node
          + + childNodes : Array
        + All child nodes of this node.
        +
        Node
          + + disabled : Boolean
        + True if this node is disabled.
        +
        TreeNode
          + + firstChild : Node
        + The first direct child node of this node, or null if this node has no child nodes.
        +
        Node
          + + id : String
        + The node id.
        +
        Node
          + + lastChild : Node
        + The last direct child node of this node, or null if this node has no child nodes.
        +
        Node
          + + loader : TreeLoader
        + +The loader used by this node (defaults to using the tree's defined loader)
        +
        AsyncTreeNode
          + + nextSibling : Node
        + The node immediately following this node in the tree, or null if there is no sibling node.
        +
        Node
          + + parentNode : Node
        + The parent node for this node.
        +
        Node
          + + previousSibling : Node
        + The node immediately preceding this node in the tree, or null if there is no sibling node.
        +
        Node
          + + text : String
        + Read-only. The text for this node. To change it use setText().
        +
        TreeNode
          + + ui : TreeNodeUI
        + Read-only. The UI for this node
        +
        TreeNode
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.DefaultSelectionModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.DefaultSelectionModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.DefaultSelectionModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,482 @@ +
        + +
        +
        Observable
        +  DefaultSelectionModel
        +

        Class Ext.tree.DefaultSelectionModel

        + + + + + +
        Package:Ext.tree
        Defined In:TreeSelectionModel.js
        Class:DefaultSelectionModel
        Extends:Observable
        +
        + The default single selection for a TreePanel.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.MultiSelectionModel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.MultiSelectionModel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.MultiSelectionModel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,426 @@ +
        + +
        +
        Observable
        +  MultiSelectionModel
        +

        Class Ext.tree.MultiSelectionModel

        + + + + + +
        Package:Ext.tree
        Defined In:TreeSelectionModel.js
        Class:MultiSelectionModel
        Extends:Observable
        +
        + Multi selection for a TreePanel.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.RootTreeNodeUI.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.RootTreeNodeUI.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.RootTreeNodeUI.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,30 @@ +
        + +

        Class Ext.tree.RootTreeNodeUI

        + + + + + +
        Package:Ext.tree
        Defined In:TreeNodeUI.js
        Class:RootTreeNodeUI
        Extends:Object
        +
        + This class provides the default UI implementation for root Ext TreeNodes. +The RootTreeNode UI implementation allows customizing the appearance of the root tree node.
        +

        +If you are customizing the Tree's user interface, you +may need to extend this class, but you should never need to instantiate this class.

        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        +
        This class has no public methods.
        +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeDragZone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeDragZone.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeDragZone.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1769 @@ +
        + +
        +
        DragDrop
        +  DD
        +    DDProxy
        +      DragSource
        +        DragZone
        +          TreeDragZone
        +

        Class Ext.tree.TreeDragZone

        + + + + + +
        Package:Ext.tree
        Defined In:TreeDragZone.js
        Class:TreeDragZone
        Extends:DragZone
        +
        +
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + containerScroll : Boolean
        + True to register this container with the Scrollmanager for auto scrolling during drag operations.
        +
        DragZone
          + + dropAllowed : String
        + The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
        +
        DragSource
          + + dropNotAllowed : String
        + The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
        +
        DragSource
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
          + + tree : Ext.tree.TreePanel
        + The TreePanel for this drag zone
        +
        TreeDragZone
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeDropZone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeDropZone.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeDropZone.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1485 @@ +
        + +
        +
        DragDrop
        +  DDTarget
        +    DropTarget
        +      DropZone
        +        TreeDropZone
        +

        Class Ext.tree.TreeDropZone

        + + + + + +
        Package:Ext.tree
        Defined In:TreeDropZone.js
        Class:TreeDropZone
        Extends:DropZone
        +
        +
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowContainerDrop : String
        + True if drops on the tree container (outside of a specific tree node) are allowed (defaults to false)
        +
        TreeDropZone
          + + appendOnly : String
        + True if the tree should only allow append drops (use for trees which are sorted, defaults to false)
        +
        TreeDropZone
          + + dropAllowed : String
        + The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok").
        +
        DropTarget
          + + dropNotAllowed : String
        + The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop").
        +
        DropTarget
          + + overClass : String
        + The CSS class applied to the drop target element while the drag source is over it (defaults to "").
        +
        DropTarget
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + available : boolean
        + The availabe property is false until the linked dom element is accessible.
        +
        DragDrop
          + + config : object
        + Configuration attributes passed into the constructor
        +
        DragDrop
          + + invalidHandleClasses : string[]
        + An indexted array of css class names for elements that will be ignored +if clicked.
        +
        DragDrop
          + + invalidHandleIds : string:
        + An associative array of ids for elements that will be ignored if clicked
        +
        DragDrop
          + + invalidHandleTypes : string:
        + An associative array of HTML tags that will be ignored if clicked.
        +
        DragDrop
          + + isTarget : boolean
        + By default, all insances can be a drop target. This can be disabled by +setting isTarget to false.
        +
        DragDrop
          + + padding : int[]
        + The padding configured for this drag and drop object for calculating +the drop zone intersection with this object.
        +
        DragDrop
          + + tree : Ext.tree.TreePanel
        + The TreePanel for this drop zone
        +
        TreeDropZone
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeEditor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeEditor.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeEditor.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1585 @@ +
        + +
        +
        Observable
        +  Component
        +    Editor
        +      TreeEditor
        +

        Class Ext.tree.TreeEditor

        + + + + + +
        Package:Ext.tree
        Defined In:TreeEditor.js
        Class:TreeEditor
        Extends:Editor
        +
        + Provides editor functionality for inline tree node editing. Any valid Ext.form.Field can be used +as the editor field.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + alignment : String
        + The position to align to (see Ext.Element.alignTo for more details, defaults to "l-l").
        +
        TreeEditor
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + cancelOnEsc : Boolean
        + True to cancel the edit when the escape key is pressed (defaults to false)
        +
        Editor
          + + cls : String
        + CSS class to apply to the editor (defaults to "x-small-editor x-tree-editor")
        +
        TreeEditor
          + + completeOnEnter : Boolean
        + True to complete the edit when the enter key is pressed (defaults to false)
        +
        Editor
          + + constrain : Boolean
        + True to constrain the editor to the viewport
        +
        Editor
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + hideEl : Boolean
        + True to hide the bound element while the editor is displayed (defaults to false)
        +
        TreeEditor
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + shadow : Boolean/String
        + "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to "frame")
        +
        Editor
          + + shim : Boolean
        + True to shim the editor if selects/iframes could be displayed beneath it (defaults to false)
        +
        TreeEditor
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + swallowKeys : Boolean
        + Handle the keydown/keypress events so they don't propagate (defaults to true)
        +
        Editor
          + + updateEl : Boolean
        + True to update the innerHTML of the bound element when the update completes (defaults to false)
        +
        Editor
          + + value : Mixed
        + The data value of the underlying field (defaults to "")
        +
        Editor
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeFilter.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeFilter.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeFilter.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,98 @@ +
        + +

        Class Ext.tree.TreeFilter

        + + + + + +
        Package:Ext.tree
        Defined In:TreeFilter.js
        Class:TreeFilter
        Extends:Object
        +
        + Note this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodes
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeLoader.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeLoader.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeLoader.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,529 @@ +
        + +
        +
        Observable
        +  TreeLoader
        +

        Class Ext.tree.TreeLoader

        + + + + + +
        Package:Ext.tree
        Defined In:TreeLoader.js
        Class:TreeLoader
        Extends:Observable
        +
        + A TreeLoader provides for lazy loading of an Ext.tree.TreeNode's child +nodes from a specified URL. The response must be a JavaScript Array definition +whose elements are node definition objects. eg: +
        [{
        +        id: 1,
        +        text: 'A leaf Node',
        +        leaf: true
        +    },{
        +        id: 2,
        +        text: 'A folder Node',
        +        children: [{
        +            id: 3,
        +            text: 'A child Node',
        +            leaf: true
        +        }]
        +   }]
        +

        +A server request is sent, and child nodes are loaded only when a node is expanded. +The loading node's id is passed to the server under the parameter name "node" to +enable the server to produce the correct child nodes. +

        +To pass extra parameters, an event handler may be attached to the "beforeload" +event, and the parameters specified in the TreeLoader's baseParams property: +
        myTreeLoader.on("beforeload", function(treeLoader, node) {
        +        this.baseParams.category = node.attributes.category;
        +    }, this);
        < +This would pass an HTTP parameter called "category" to the server containing +the value of the Node's "category" attribute.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + baseParams : Object
        + (optional) An object containing properties which specify HTTP parameters to be passed to each request for child nodes.
        +
        TreeLoader
          + + clearOnLoad : Boolean
        + (optional) Default to true. Remove previously existing child nodes before loading.
        +
        TreeLoader
          + + preloadChildren : Boolean
        + If set to true, the loader recursively loads "children" attributes when doing the first load on nodes.
        +
        TreeLoader
          + + requestMethod : String
        + The HTTP request method for loading data (defaults to 'POST').
        +
        TreeLoader
          + + url : String
        + Equivalent to dataUrl.
        +
        TreeLoader
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeNode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeNode.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeNode.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1670 @@ +
        + +
        +
        Observable
        +  Node
        +    TreeNode
        +

        Class Ext.tree.TreeNode

        + + + + + + +
        Package:Ext.tree
        Defined In:TreeNode.js
        Class:TreeNode
        Subclasses:AsyncTreeNode
        Extends:Node
        +
        +
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowChildren : Boolean
        + False to not allow this node to have child nodes (defaults to true)
        +
        TreeNode
          + + allowDrag : Boolean
        + False to make this node undraggable if draggable = true (defaults to true)
        +
        TreeNode
          + + allowDrop : Boolean
        + False if this node cannot have child nodes dropped on it (defaults to true)
        +
        TreeNode
          + + cls : String
        + A css class to be added to the node
        +
        TreeNode
          + + disabled : Boolean
        + true to start the node disabled
        +
        TreeNode
          + + draggable : Boolean
        + True to make this node draggable (defaults to false)
        +
        TreeNode
          + + expandable : Boolean
        + If set to true, the node will always show a plus/minus icon, even when empty
        +
        TreeNode
          + + expanded : Boolean
        + true to start the node expanded
        +
        TreeNode
          + + href : String
        + URL of the link used for the node (defaults to #)
        +
        TreeNode
          + + hrefTarget : String
        + target frame for the link
        +
        TreeNode
          + + iconCls : String
        + A css class to be added to the nodes icon element for applying css background images
        +
        TreeNode
          + + id : String
        + The id for this node. If one is not specified, one is generated.
        +
        Node
          + + isTarget : Boolean
        + False to not allow this node to act as a drop target (defaults to true)
        +
        TreeNode
          + + leaf : Boolean
        + true if this node is a leaf and does not have children
        +
        Node
          + + qtip : String
        + An Ext QuickTip for the node
        +
        TreeNode
          + + qtipCfg : String
        + An Ext QuickTip config for the node (used instead of qtip)
        +
        TreeNode
          + + singleClickExpand : Boolean
        + True for single click expand on this node
        +
        TreeNode
          + + text : String
        + The text for this node
        +
        TreeNode
          + + uiProvider : Function
        + A UI class to use for this node (defaults to Ext.tree.TreeNodeUI)
        +
        TreeNode
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + attributes : Object
        + The attributes supplied for the node. You can use this property to access any custom attributes you supplied.
        +
        Node
          + + childNodes : Array
        + All child nodes of this node.
        +
        Node
          + + disabled : Boolean
        + True if this node is disabled.
        +
        TreeNode
          + + firstChild : Node
        + The first direct child node of this node, or null if this node has no child nodes.
        +
        Node
          + + id : String
        + The node id.
        +
        Node
          + + lastChild : Node
        + The last direct child node of this node, or null if this node has no child nodes.
        +
        Node
          + + nextSibling : Node
        + The node immediately following this node in the tree, or null if there is no sibling node.
        +
        Node
          + + parentNode : Node
        + The parent node for this node.
        +
        Node
          + + previousSibling : Node
        + The node immediately preceding this node in the tree, or null if there is no sibling node.
        +
        Node
          + + text : String
        + Read-only. The text for this node. To change it use setText().
        +
        TreeNode
          + + ui : TreeNodeUI
        + Read-only. The UI for this node
        +
        TreeNode
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeNodeUI.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeNodeUI.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeNodeUI.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,227 @@ +
        + +

        Class Ext.tree.TreeNodeUI

        + + + + + +
        Package:Ext.tree
        Defined In:TreeNodeUI.js
        Class:TreeNodeUI
        Extends:Object
        +
        + This class provides the default UI implementation for Ext TreeNodes. +The TreeNode UI implementation is separate from the +tree implementation, and allows customizing of the appearance of +tree nodes.
        +

        +If you are customizing the Tree's user interface, you +may need to extend this class, but you should never need to instantiate this class.
        +

        +This class provides access to the user interface components of an Ext TreeNode, through +Ext.tree.TreeNode.getUI

        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreePanel.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreePanel.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreePanel.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,3792 @@ +
        + + +

        Class Ext.tree.TreePanel

        + + + + + +
        Package:Ext.tree
        Defined In:TreePanel.js
        Class:TreePanel
        Extends:Panel
        +
        +

        The TreePanel provides tree-structured UI representation of tree-structured data.

        +

        TreeNodes added to the TreePanel may each contain metadata +used by your application in their attributes property.

        +

        A TreePanel must have a root node before it is rendered. This may either be +specified using the root config option, or using the setRootNode method.

        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + allowDomMove : Boolean
        + Whether the component can move the Dom node when rendering (defaults to true).
        +
        Component
          + + animate : Boolean
        + true to enable animated expand/collapse (defaults to the value of Ext.enableFx)
        +
        TreePanel
          + + autoHeight : Boolean
        + True to use height:'auto', false to use fixed height (defaults to false).
        +
        BoxComponent
          + + autoWidth : Boolean
        + True to use width:'auto', false to use fixed width (defaults to false).
        +
        BoxComponent
          + + baseCls : String
        + The base CSS class to apply to this panel's element (defaults to 'x-panel').
        +
        Panel
          + + buttonAlign : String
        + The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right').
        +
        Panel
          + + buttons : Array
        + An array of Ext.Button configs used to add buttons to the footer of this panel.
        +
        Panel
          + + collapsed : Boolean
        + True to render the panel collapsed, false to render it expanded (defaults to false).
        +
        Panel
          + + collapsedCls : String
        + A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed').
        +
        Panel
          + + containerScroll : Boolean
        + true to register this container with ScrollManager
        +
        TreePanel
          + + contentEl : String
        + The id of an existing HTML node to use as the panel's body content (defaults to '').
        +
        Panel
          + + ddAppendOnly : String
        + True if the tree should only allow append drops (use for trees which are sorted)
        +
        TreePanel
          + + ddGroup : String
        + The DD group this TreePanel belongs to
        +
        TreePanel
          + + ddScroll : Boolean
        + true to enable body scrolling
        +
        TreePanel
          + + defaultType : String
        + The default type of container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel').
        +
        Container
          + + disabledClass : String
        + CSS class added to the component when it is disabled (defaults to "x-item-disabled").
        +
        Component
          + + dragConfig : Object
        + Custom config to pass to the Ext.tree.TreeDragZone instance
        +
        TreePanel
          + + dropConfig : Object
        + Custom config to pass to the Ext.tree.TreeDropZone instance
        +
        TreePanel
          + + enableDD : Boolean
        + true to enable drag and drop
        +
        TreePanel
          + + enableDrag : Boolean
        + true to enable just drag
        +
        TreePanel
          + + enableDrop : Boolean
        + true to enable just drop
        +
        TreePanel
          + + frame : Boolean
        + True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false).
        +
        Panel
          + + headerAsText : Boolean
        + True to display the panel title in the header, false to hide it (defaults to true).
        +
        Panel
          + + height : Number
        + The height of this component in pixels (defaults to auto).
        +
        BoxComponent
          + + hideCollapseTool : Boolean
        + True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false).
        +
        Panel
          + + hlColor : String
        + The color of the node highlight (defaults to C3DAF9)
        +
        TreePanel
          + + hlDrop : Boolean
        + false to disable node highlight on drop (defaults to the value of Ext.enableFx)
        +
        TreePanel
          + + html : String/Object
        + An HTML fragment, or a DomHelper specification to use as the panel's body content (defaults to '').
        +
        Panel
          + + iconCls : String
        + A CSS class that will provide a background image to be used as the panel header icon (defaults to '').
        +
        Panel
          + + id : String
        + The unique id of this component (defaults to an auto-assigned id).
        +
        Component
          + + lines : Boolean
        + false to disable tree lines (defaults to true)
        +
        TreePanel
          + + loader : Ext.tree.TreeLoader
        + A Ext.tree.TreeLoader for use with this TreePanel
        +
        TreePanel
          + + minButtonWidth : Number
        + Minimum width in pixels of all buttons in this panel (defaults to 75)
        +
        Panel
          + + pathSeparator : String
        + The token used to separate sub-paths in path strings (defaults to '/')
        +
        TreePanel
          + + root : Ext.tree.TreeNode
        + The root node for the tree.
        +
        TreePanel
          + + rootVisible : Boolean
        + false to hide the root node (defaults to true)
        +
        TreePanel
          + + selModel : Boolean
        + A tree selection model to use with this TreePanel (defaults to a Ext.tree.DefaultSelectionModel)
        +
        TreePanel
          + + singleExpand : Boolean
        + true if only 1 node per branch may be expanded
        +
        TreePanel
          + + stateId : String
        + The unique id for this component to use for state management purposes (defaults to the component id).
        +
        Component
          + + width : Number
        + The width of this component in pixels (defaults to auto).
        +
        BoxComponent
        + +

        Public Properties

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        PropertyDefined By
          + + buttons : Array
        + This Panel's Array of buttons as created from the buttons +config property. Read only.
        +
        Panel
          + + disabled : Boolean
        + True if this component is disabled. Read-only.
        +
        Component
          + + dragZone : Ext.tree.TreeDragZone
        + The dragZone used by this tree if drag is enabled
        +
        TreePanel
          + + dropZone : Ext.tree.TreeDropZone
        + The dropZone used by this tree if drop is enabled
        +
        TreePanel
          + + footer : Ext.Element
        + +The Panel's footer Element. Read-only. +

        This Element is used to house the Panel's buttons.

        +
        Panel
          + + header : Ext.Element
        + The Panel's header Element. Read-only. +

        This Element is used to house the title and tools

        +
        Panel
          + + hidden : Boolean
        + +True if this component is hidden. Read-only.
        +
        Component
          + + initialConfig : Object
        + This Component's initial configuration specification. Read-only.
        +
        Component
          + + items : MixedCollection
        + The collection of components in this container as a Ext.util.MixedCollection
        +
        Container
          + + rendered : Boolean
        + True if this component has been rendered. Read-only.
        +
        Component
          + + root : Ext.tree.TreeNode
        + The root node of this tree.
        +
        TreePanel
        + +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeSorter.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeSorter.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.tree.TreeSorter.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,115 @@ +
        + +

        Class Ext.tree.TreeSorter

        + + + + + +
        Package:Ext.tree
        Defined In:TreeSorter.js
        Class:TreeSorter
        Extends:Object
        +
        + Provides sorting of nodes in a TreePanel
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + caseSensitive : Boolean
        + true for case sensitive sort (defaults to false)
        +
        TreeSorter
          + + dir : String
        + The direction to sort (asc or desc) (defaults to asc)
        +
        TreeSorter
          + + folderSort : Boolean
        + True to sort leaf nodes under non leaf nodes
        +
        TreeSorter
          + + leafAttr : String
        + The attribute used to determine leaf nodes in folder sort (defaults to "leaf")
        +
        TreeSorter
          + + property : String
        + The named attribute on the node to sort by (defaults to text)
        +
        TreeSorter
          + + sortType : Function
        + A custom "casting" function used to convert node values before sorting
        +
        TreeSorter
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.CSS.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.CSS.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.CSS.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,174 @@ +
        + +

        Class Ext.util.CSS

        + + + + + +
        Package:Ext.util
        Defined In:CSS.js
        Class:CSS
        Extends:Object
        +
        + Utility class for manipulating CSS rules

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.ClickRepeater.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.ClickRepeater.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.ClickRepeater.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,445 @@ +
        + +
        +
        Observable
        +  ClickRepeater
        +

        Class Ext.util.ClickRepeater

        + + + + + +
        Package:Ext.util
        Defined In:ClickRepeater.js
        Class:ClickRepeater
        Extends:Observable
        +
        + A wrapper class which can be applied to any element. Fires a "click" event while the + mouse is pressed. The interval between firings may be specified in the config but + defaults to 20 milliseconds. + + Optionally, a CSS class may be applied to the element during the time it is pressed.
        + +
        + +

        Config Options

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Config OptionsDefined By
          + + accelerate : Boolean
        + True if autorepeating should start slowly and accelerate. "interval" and "delay" are ignored.
        +
        ClickRepeater
          + + delay : Number
        + The initial delay before the repeating event begins firing. Similar to an autorepeat key delay.
        +
        ClickRepeater
          + + el : Mixed
        + The element to act as a button.
        +
        ClickRepeater
          + + interval : Number
        + The interval between firings of the "click" event. Default 20 ms.
        +
        ClickRepeater
          + + pressClass : String
        + A CSS class name to be applied to the element while pressed.
        +
        ClickRepeater
          + + preventDefault : Boolean
        + True to prevent the default click event
        +
        ClickRepeater
          + + stopDefault : Boolean
        + True to stop the default click event
        +
        ClickRepeater
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.DelayedTask.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.DelayedTask.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.DelayedTask.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,96 @@ +
        + +

        Class Ext.util.DelayedTask

        + + + + + +
        Package:Ext.util
        Defined In:DelayedTask.js
        Class:DelayedTask
        Extends:Object
        +
        + Provides a convenient method of performing setTimeout where a new +timeout cancels the old timeout. An example would be performing validation on a keypress. +You can use this class to buffer +the keypress events for a certain number of milliseconds, and perform only if they stop +for that amount of time.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.Format.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.Format.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.Format.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,352 @@ +
        + +

        Class Ext.util.Format

        + + + + + +
        Package:Ext.util
        Defined In:Format.js
        Class:Format
        Extends:Object
        +
        + Reusable data formatting functions

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.JSON.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.JSON.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.JSON.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,74 @@ +
        + +

        Class Ext.util.JSON

        + + + + + +
        Package:Ext.util
        Defined In:JSON.js
        Class:JSON
        Extends:Object
        +
        + Modified version of Douglas Crockford"s json.js that doesn"t +mess with the Object prototype +http://www.json.org/js.html

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.MixedCollection.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.MixedCollection.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.MixedCollection.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,1068 @@ +
        + +
        +
        Observable
        +  MixedCollection
        +

        Class Ext.util.MixedCollection

        + + + + + + +
        Package:Ext.util
        Defined In:MixedCollection.js
        Class:MixedCollection
        Subclasses:StoreMgr
        Extends:Observable
        +
        + A Collection class that maintains both numeric indexes and keys and exposes events.
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        EventDefined By
        + +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.Observable.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.Observable.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.Observable.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,356 @@ +
        + +

        Class Ext.util.Observable

        + + + + + + +
        Package:Ext.util
        Defined In:Observable.js
        Class:Observable
        Subclasses:Component, Resizable, SplitBar, Updater, Connection, DataProxy, Node, Store, Tree, BasicForm, AbstractSelectionModel, ColumnModel, GridView, PropertyStore, Menu, DefaultSelectionModel, MultiSelectionModel, TreeLoader, ClickRepeater, MixedCollection
        Extends:Object
        +
        + Abstract base class that provides a common interface for publishing events. Subclasses are expected to +to have a property "events" with all the events defined.
        +For example: +
        Employee = function(name){
        +    this.name = name;
        +    this.addEvents({
        +        "fired" : true,
        +        "quit" : true
        +    });
        + }
        + Ext.extend(Employee, Ext.util.Observable);
        + +
        + +

        Config Options

        + + + + + + + + + + +
        Config OptionsDefined By
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.TaskRunner.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.TaskRunner.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.TaskRunner.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,138 @@ +
        + +

        Class Ext.util.TaskRunner

        + + + + + +
        Package:Ext.util
        Defined In:TaskMgr.js
        Class:TaskRunner
        Extends:Object
        +
        + Provides the ability to execute one or more arbitrary tasks in a multithreaded manner. Generally, you can use +the singleton Ext.TaskMgr instead, but if needed, you can create separate instances of TaskRunner. Any +number of separate tasks can be started at any time and will run independently of each other. Example usage: +
        // Start a simple clock task that updates a div once per second
        +var task = {
        +    run: function(){
        +        Ext.fly('clock').update(new Date().format('g:i:s A'));
        +    },
        +    interval: 1000 //1 second
        +}
        +var runner = new Ext.util.TaskRunner();
        +runner.start(task);
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.TextMetrics.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.TextMetrics.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Ext.util.TextMetrics.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,184 @@ +
        + +

        Class Ext.util.TextMetrics

        + + + + + +
        Package:Ext.util
        Defined In:TextMetrics.js
        Class:TextMetrics
        Extends:Object
        +
        + Provides precise pixel measurements for blocks of text so that you can determine exactly how high and +wide, in pixels, a given block of text will be.

        This class is a singleton and cannot be created directly.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Function.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Function.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Function.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,146 @@ +
        + +

        Class Function

        + + + + + +
        Package:Global
        Defined In:Ext.js
        Class:Function
        Extends:Object
        +
        + These functions are available on every Function object (any JavaScript function).
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Number.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Number.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/Number.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,55 @@ +
        + +

        Class Number

        + + + + + +
        Package:Global
        Defined In:Ext.js
        Class:Number
        Extends:Object
        +
        +
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/String.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/String.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/output/String.html 4 Dec 2007 02:48:38 -0000 1.1 @@ -0,0 +1,153 @@ +
        + +

        Class String

        + + + + + +
        Package:Global
        Defined In:Ext.js
        Class:String
        Extends:Object
        +
        + These functions are available as static methods on the JavaScript String object.
        + +
        + +

        Public Properties

        +
        This class has no public properties.
        +

        Public Methods

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        MethodDefined By
        + +

        Public Events

        +
        This class has no public events.
        +
        \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/TabCloseMenu.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/TabCloseMenu.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/TabCloseMenu.js 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,42 @@ +// Very simple plugin for adding a close context menu to tabs +Ext.ux.TabCloseMenu = function(){ + var tabs, menu, ctxItem; + this.init = function(tp){ + tabs = tp; + tabs.on('contextmenu', onContextMenu); + } + + function onContextMenu(ts, item, e){ + if(!menu){ // create context menu on first right click + menu = new Ext.menu.Menu([{ + id: tabs.id + '-close', + text: 'Close Tab', + handler : function(){ + tabs.remove(ctxItem); + } + },{ + id: tabs.id + '-close-others', + text: 'Close Other Tabs', + handler : function(){ + tabs.items.each(function(item){ + if(item.closable && item != ctxItem){ + tabs.remove(item); + } + }); + } + }]); + } + ctxItem = item; + var items = menu.items; + items.get(tabs.id + '-close').setDisabled(!item.closable); + var disableOthers = true; + tabs.items.each(function(){ + if(this != item && this.closable){ + disableOthers = false; + return false; + } + }); + items.get(tabs.id + '-close-others').setDisabled(disableOthers); + menu.showAt(e.getPoint()); + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/accordian.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/accordian.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/block-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/block-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/block-bottom.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/block-bottom.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/block-top.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/block-top.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/class.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/class.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/cmp.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/cmp.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/collapse-all.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/collapse-all.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/collapse-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/collapse-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/collapser.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/collapser.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/collapser.css 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,34 @@ +.pkg h3 { + padding-left:34px; + font:normal 11px verdana,helvetica,tahoma,sans-serif; + height:18px; + cursor:pointer; +} +h3.collapser-expanded{ + background: #fff url(pkg-open.gif) no-repeat 0px -1px; +} +h3.collapser-collapsed { + background: #fff url(pkg-closed.gif) no-repeat 0px -1px; +} +.pkg-body{ + margin-left:16px; + font:normal 11px verdana,helvetica,tahoma,sans-serif; +} +#classes a{ + font:normal 11px verdana,helvetica,tahoma,sans-serif; + display:block; + text-decoration:none; + height:18px; + color:black; + background: #fff url(class.gif) no-repeat 16px -1px; + padding-left:34px; + -moz-outline:none; + outline:none; + white-space: nowrap; +} +#classes a:hover{ + text-decoration: underline; +} +#classes a.ex{ + background: #fff url(example.gif) no-repeat 16px -1px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/config.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/config.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.css 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,346 @@ +body { + font: normal 12px verdana,arial,tahoma; +} +html, body { + margin:0; + padding:0; + border:0 none; + overflow:hidden; + height:100%; + width:100%; +} +#class .loading-indicator{ + font-size:12px; + height:18px; +} + + +#docs .top-toolbar{ + border:0 none; + border-top:1px solid #d0d0d0; + background:transparent; +} +#docs .top-toolbar button { + +} +.x-panel-noborder { + border: 0 none; +} +#header{ + border:0 none; + background:#1E4176 url(hd-bg.gif) repeat-x 0 0; + padding-top:3px; + padding-left:3px; +} +.docs-header .x-panel-body { + background:transparent; +} + +#header { + +} + +#header .api-title { + font:normal 16px tahoma, arial, sans-serif; + color:white; + margin:5px; +} + +.loading-indicator { + font-size:11px; + background-image:url('../../resources/images/default/grid/loading.gif'); + background-repeat: no-repeat; + background-position:top left; + padding-left:20px; + height:18px; + text-align:left; +} + +#doc-body .loading-indicator { + font:bold 13px Tahoma, Verdana, Arial, Helvetica, sans-serif; + position:absolute; + top:35%; + left:43%; + color:#444; + background-image:url(../../resources/images/default/shared/large-loading.gif); + background-repeat: no-repeat; + background-position:left 5px; + padding:10px 10px 10px 38px; + text-align:left; +} +a#welcome-link{ + background:#fff url(docs.gif) no-repeat 0px 0px; + padding-left:18px; +} +a#help-forums{ + background:#fff url(forum.gif) no-repeat 16px 0px; + padding-left:34px; + display:block +} +#loading-mask{ + position:absolute; + left:0; + top:0; + width:100%; + height:100%; + z-index:20000; + background-color:white; +} +#loading{ + position:absolute; + left:45%; + top:40%; + padding:2px; + z-index:20001; + height:auto; +} +#loading img { + margin-bottom:5px; +} +#loading .loading-indicator{ + background:white; + color:#555; + font:bold 13px tahoma,arial,helvetica; + padding:10px; + margin:0; + text-align:center; + height:auto; +} +#api-tree a span { + font-family:verdana,arial,tahoma,sans-serif; + font-size:11px; +} +#api-tree .cls a:hover span { + text-decoration:underline; +} +#api-tree .x-panel-body { + background-color:white; + position:relative; + padding:3px; +} +#api-tree .cls{ + border:1px solid #fff; +} + +#api-tree .x-tree-selected { + border:1px dotted #a3bae9; + background:#DFE8F6; +} +#api-tree .x-tree-node .x-tree-selected a span{ + background:transparent; + color:#1E4176; + font-weight:bold; +} + +a { + color: #1E4176; +} +a:link { + color: #1E4176; + text-decoration: none; +} + +a:visited { + color: #555; + text-decoration: none; +} + +a:hover { + text-decoration: underline; + color: #15428b; +} + +#welcome { + position:relative; + top:0; + left: 0; + zoom:1; +} +.col{ + margin:0 250px 0 10px; + zoom:1; + padding: 10px 0; +} + +.col-last { + width: 220px; + position:absolute; + right:10px; + top:10px; +} + +.block{ + margin-bottom:10px; +} +.block-title{ + color: #1E4176; + font:normal 18px tahoma,verdana,sans-serif; + letter-spacing:-1px; + padding: 4px; + padding-left: 8px; +} +.block-body{ + padding:8px; + padding-top:2px; +} +.block-body b{ + color:#333333; + font-size:11px; +} +.block-body em { + display:block; + margin-top:5px; + font-size:11px; + color:gray; + text-align:right; +} +.list{ + list-style: square; + padding-left:20px; + margin-top:5px; +} + +.res-block { + padding-top:5px; + background:transparent url(block-top.gif) no-repeat; + width:210px; + margin-bottom:15px; +} +.res-block-inner { + padding:6px 11px; + background:transparent url(block-bottom.gif) no-repeat left bottom; +} + +.res-block h3 { + font: bold 12px tahoma,arial,sans-serif; + color:#555; + margin-bottom:8px; +} + +.res-block ul { + list-style-type: disc; + margin-left:15px; + font: normal 12px tahoma,arial,sans-serif; + color:#555; +} + +.res-block ul li { + margin:0 0 5px 3px; +} + +.hide-inherited .inherited { + display:none; +} + +#doc-body .x-tab-panel-body { + background:#fff url(../../resources/images/default/form/text-bg.gif) repeat-x 0 0; +} +#doc-body .x-panel-body, #doc-body .body-wrap { + background:transparent !important; +} +.icon-cls { + background-image: url(class.gif) !important; +} +.icon-event { + background-image: url(event.gif) !important; +} +.icon-config { + background-image: url(config.gif) !important; +} +.icon-prop { + background-image: url(prop.gif) !important; +} +.icon-method { + background-image: url(method.gif) !important; +} +.icon-cmp { + background-image: url(cmp.gif) !important; +} +.icon-pkg { + background-image: url(pkg.gif) !important; +} +.icon-fav { + background-image: url(fav.gif) !important; +} +.icon-static { + background-image: url(static.gif) !important; +} +.icon-docs { + background-image: url(docs.gif) !important; +} +.icon-expand-all { + background-image: url(expand-all.gif) !important; +} +.icon-collapse-all { + background-image: url(collapse-all.gif) !important; +} +.icon-expand-members { + background-image: url(expand-members.gif) !important; +} +.icon-hide-inherited { + background-image: url(hide-inherited.gif) !important; +} + +#legend li { + line-height:16px; +} +.item-icon { + vertical-align:top; + width:16px; + height:16px; + margin-right:6px; +} +.ext-ie .item-icon { + vertical-align:middle; +} +h3.home-title { + margin:5px 0; + font:bold 13px tahoma,arial,sans-serif; + color:#444; +} + +.search-item { + margin:5px 5px 9px; + padding:0 5px 10px 0; +} + +.search-item .member { + font:bold 12px tahoma,arial,sans-serif; + color:#444; + margin:5px; + overflow:hidden; + white-space:nowrap; + zoom:1; +} + +.search-item .cls { + font:normal 12px tahoma,arial,sans-serif; + color:#444; + margin:5px; + overflow:hidden; + text-align:left; + white-space:nowrap; + zoom:1; +} +.search-item p { + font:normal 11px tahoma,arial,sans-serif; + clear:both; + margin: 0 5px 5px 28px; + color:#444; + zoom:1; +} +#search .loading-indicator { + position:static !important; +} +#search h3 { + font:normal 12px tahoma,arial,sans-serif; + color:#444; + margin:10px; +} +.inner-link .item-icon, .bookmark .item-icon{ + margin-right:3px; +} +.inner-link, .bookmark { + margin-left:10px; +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/docs.js 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,629 @@ +Ext.BLANK_IMAGE_URL = 'resources/s.gif'; + +Docs = {}; + +ApiPanel = function() { + ApiPanel.superclass.constructor.call(this, { + id:'api-tree', + region:'west', + split:true, + width: 280, + minSize: 175, + maxSize: 500, + collapsible: true, + margins:'0 0 5 5', + cmargins:'0 0 0 0', + rootVisible:false, + lines:false, + autoScroll:true, + animCollapse:false, + animate: false, + collapseMode:'mini', + loader: new Ext.tree.TreeLoader({ + preloadChildren: true, + clearOnLoad: false + }), + root: new Ext.tree.AsyncTreeNode({ + text:'Ext JS', + id:'root', + expanded:true, + children:[Docs.classData] + }), + collapseFirst:false + }); + // no longer needed! + //new Ext.tree.TreeSorter(this, {folderSort:true,leafAttr:'isClass'}); + + this.getSelectionModel().on('beforeselect', function(sm, node){ + return node.isLeaf(); + }); +}; + +Ext.extend(ApiPanel, Ext.tree.TreePanel, { + selectClass : function(cls){ + if(cls){ + var parts = cls.split('.'); + var last = parts.length-1; + for(var i = 0; i < last; i++){ // things get nasty - static classes can have . + var p = parts[i]; + var fc = p.charAt(0); + var staticCls = fc.toUpperCase() == fc; + if(p == 'Ext' || !staticCls){ + parts[i] = 'pkg-'+p; + }else if(staticCls){ + --last; + parts.splice(i, 1); + } + } + parts[last] = cls; + + this.selectPath('/root/apidocs/'+parts.join('/')); + } + } +}); + + +DocPanel = Ext.extend(Ext.Panel, { + closable: true, + autoScroll:true, + + initComponent : function(){ + var ps = this.cclass.split('.'); + this.title = ps[ps.length-1]; + + DocPanel.superclass.initComponent.call(this); + }, + + scrollToMember : function(member){ + var el = Ext.fly(this.cclass + '-' + member); + if(el){ + var top = (el.getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop; + this.body.scrollTo('top', top-25, {duration:.75, callback: this.hlMember.createDelegate(this, [member])}); + } + }, + + scrollToSection : function(id){ + var el = Ext.getDom(id); + if(el){ + var top = (Ext.fly(el).getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop; + this.body.scrollTo('top', top-25, {duration:.5, callback: function(){ + Ext.fly(el).next('h2').pause(.2).highlight('#8DB2E3', {attr:'color'}); + }}); + } + }, + + hlMember : function(member){ + var el = Ext.fly(this.cclass + '-' + member); + if(el){ + el.up('tr').highlight('#cadaf9'); + } + } +}); + + +MainPanel = function(){ + + this.searchStore = new Ext.data.Store({ + proxy: new Ext.data.ScriptTagProxy({ + url: 'http://extjs.com/playpen/api.php' + }), + reader: new Ext.data.JsonReader({ + root: 'data' + }, + ['cls', 'member', 'type', 'doc'] + ), + baseParams: {}, + listeners: { + 'beforeload' : function(){ + this.baseParams.qt = Ext.getCmp('search-type').getValue(); + } + } + }); + + MainPanel.superclass.constructor.call(this, { + id:'doc-body', + region:'center', + margins:'0 5 5 0', + resizeTabs: true, + minTabWidth: 135, + tabWidth: 135, + plugins: new Ext.ux.TabCloseMenu(), + enableTabScroll: true, + activeTab: 0, + + items: { + id:'welcome-panel', + title: 'API Home', + autoLoad: {url: 'welcome.html', callback: this.initSearch, scope: this}, + iconCls:'icon-docs', + autoScroll: true, + tbar: [ + 'Search: ', ' ', + new Ext.ux.SelectBox({ + listClass:'x-combo-list-small', + width:90, + value:'Starts with', + id:'search-type', + store: new Ext.data.SimpleStore({ + fields: ['text'], + expandData: true, + data : ['Starts with', 'Ends with', 'Any match'] + }), + displayField: 'text' + }), ' ', + new Ext.app.SearchField({ + width:240, + store: this.searchStore, + paramName: 'q' + }) + ] + } + }); +}; + +Ext.extend(MainPanel, Ext.TabPanel, { + + initEvents : function(){ + MainPanel.superclass.initEvents.call(this); + this.body.on('click', this.onClick, this); + }, + + onClick: function(e, target){ + if(target = e.getTarget('a:not(.exi)', 3)){ + var cls = Ext.fly(target).getAttributeNS('ext', 'cls'); + e.stopEvent(); + if(cls){ + var member = Ext.fly(target).getAttributeNS('ext', 'member'); + this.loadClass(target.href, cls, member); + }else if(target.className == 'inner-link'){ + this.getActiveTab().scrollToSection(target.href.split('#')[1]); + }else{ + window.open(target.href); + } + }else if(target = e.getTarget('.micon', 2)){ + e.stopEvent(); + var tr = Ext.fly(target.parentNode); + if(tr.hasClass('expandable')){ + tr.toggleClass('expanded'); + } + } + }, + + loadClass : function(href, cls, member){ + var id = 'docs-' + cls; + var tab = this.getComponent(id); + if(tab){ + this.setActiveTab(tab); + if(member){ + tab.scrollToMember(member); + } + }else{ + var autoLoad = {url: href}; + if(member){ + autoLoad.callback = function(){ + Ext.getCmp(id).scrollToMember(member); + } + } + var p = this.add(new DocPanel({ + id: id, + cclass : cls, + autoLoad: autoLoad, + iconCls: Docs.icons[cls] + })); + this.setActiveTab(p); + } + }, + + initSearch : function(){ + // Custom rendering Template for the View + var resultTpl = new Ext.XTemplate( + '', + '
        ', + '', + '{member}', + ' ', + '{cls}', + '

        {doc}

        ', + '
        ' + ); + + var p = new Ext.DataView({ + applyTo: 'search', + tpl: resultTpl, + loadingText:'Searching...', + store: this.searchStore, + itemSelector: 'div.search-item', + emptyText: '

        Use the search field above to search the Ext API for classes, properties, config options, methods and events.

        ' + }); + }, + + doSearch : function(e){ + var k = e.getKey(); + if(!e.isSpecialKey()){ + var text = e.target.value; + if(!text){ + this.searchStore.baseParams.q = ''; + this.searchStore.removeAll(); + }else{ + this.searchStore.baseParams.q = text; + this.searchStore.reload(); + } + } + } +}); + + +Ext.onReady(function(){ + + Ext.QuickTips.init(); + + var api = new ApiPanel(); + var mainPanel = new MainPanel(); + + api.on('click', function(node, e){ + if(node.isLeaf()){ + e.stopEvent(); + mainPanel.loadClass(node.attributes.href, node.id); + } + }); + + mainPanel.on('tabchange', function(tp, tab){ + api.selectClass(tab.cclass); + }); + + var hd = new Ext.Panel({ + border: false, + layout:'anchor', + region:'north', + cls: 'docs-header', + height:60, + items: [{ + xtype:'box', + el:'header', + border:false, + anchor: 'none -25' + }, + new Ext.Toolbar({ + cls:'top-toolbar', + items:[ ' ', + new Ext.form.TextField({ + width: 200, + emptyText:'Find a Class', + listeners:{ + render: function(f){ + f.el.on('keydown', filterTree, f, {buffer: 350}); + } + } + }), ' ', ' ', + { + iconCls: 'icon-expand-all', + tooltip: 'Expand All', + handler: function(){ api.root.expand(true); } + }, '-', { + iconCls: 'icon-collapse-all', + tooltip: 'Collapse All', + handler: function(){ api.root.collapse(true); } + }, '->', { + tooltip:'Hide Inherited Members', + iconCls: 'icon-hide-inherited', + enableToggle: true, + toggleHandler : function(b, pressed){ + mainPanel[pressed ? 'addClass' : 'removeClass']('hide-inherited'); + } + }, '-', { + tooltip:'Expand All Members', + iconCls: 'icon-expand-members', + enableToggle: true, + toggleHandler : function(b, pressed){ + mainPanel[pressed ? 'addClass' : 'removeClass']('full-details'); + } + }] + })] + }) + + var viewport = new Ext.Viewport({ + layout:'border', + items:[ hd, api, mainPanel ] + }); + + api.expandPath('/root/apidocs'); + + // allow for link in + var page = window.location.href.split('?')[1]; + if(page){ + var ps = Ext.urlDecode(page); + var cls = ps['class']; + mainPanel.loadClass('output/' + cls + '.html', cls, ps.member); + } + + viewport.doLayout(); + + setTimeout(function(){ + Ext.get('loading').remove(); + Ext.get('loading-mask').fadeOut({remove:true}); + }, 250); + + var filter = new Ext.tree.TreeFilter(api, { + clearBlank: true, + autoClear: true + }); + var hiddenPkgs = []; + function filterTree(e){ + var text = e.target.value; + Ext.each(hiddenPkgs, function(n){ + n.ui.show(); + }); + if(!text){ + filter.clear(); + return; + } + api.expandAll(); + + var re = new RegExp('^' + Ext.escapeRe(text), 'i'); + filter.filterBy(function(n){ + return !n.attributes.isClass || re.test(n.text); + }); + + // hide empty packages that weren't filtered + hiddenPkgs = []; + api.root.cascade(function(n){ + if(!n.attributes.isClass && n.ui.ctNode.offsetHeight < 3){ + n.ui.hide(); + hiddenPkgs.push(n); + } + }); + } + +}); + + +Ext.app.SearchField = Ext.extend(Ext.form.TwinTriggerField, { + initComponent : function(){ + if(!this.store.baseParams){ + this.store.baseParams = {}; + } + Ext.app.SearchField.superclass.initComponent.call(this); + this.on('specialkey', function(f, e){ + if(e.getKey() == e.ENTER){ + this.onTrigger2Click(); + } + }, this); + }, + + validationEvent:false, + validateOnBlur:false, + trigger1Class:'x-form-clear-trigger', + trigger2Class:'x-form-search-trigger', + hideTrigger1:true, + width:180, + hasSearch : false, + paramName : 'query', + + onTrigger1Click : function(){ + if(this.hasSearch){ + this.store.baseParams[this.paramName] = ''; + this.store.removeAll(); + this.el.dom.value = ''; + this.triggers[0].hide(); + this.hasSearch = false; + this.focus(); + } + }, + + onTrigger2Click : function(){ + var v = this.getRawValue(); + if(v.length < 1){ + this.onTrigger1Click(); + return; + } + if(v.length < 2){ + Ext.Msg.alert('Invalid Search', 'You must enter a minimum of 2 characters to search the API'); + return; + } + this.store.baseParams[this.paramName] = v; + var o = {start: 0}; + this.store.reload({params:o}); + this.hasSearch = true; + this.triggers[0].show(); + this.focus(); + } +}); + + +/** + * Makes a ComboBox more closely mimic an HTML SELECT. Supports clicking and dragging + * through the list, with item selection occurring when the mouse button is released. + * When used will automatically set {@link #editable} to false and call {@link Ext.Element#unselectable} + * on inner elements. Re-enabling editable after calling this will NOT work. + * + * @author Corey Gilmore + * http://extjs.com/forum/showthread.php?t=6392 + * + * @history 2007-07-08 jvs + * Slight mods for Ext 2.0 + */ +Ext.ux.SelectBox = function(config){ + this.searchResetDelay = 1000; + config = config || {}; + config = Ext.apply(config || {}, { + editable: false, + forceSelection: true, + rowHeight: false, + lastSearchTerm: false, + triggerAction: 'all', + mode: 'local' + }); + + Ext.ux.SelectBox.superclass.constructor.apply(this, arguments); + + this.lastSelectedIndex = this.selectedIndex || 0; +}; + +Ext.extend(Ext.ux.SelectBox, Ext.form.ComboBox, { + lazyInit: false, + initEvents : function(){ + Ext.ux.SelectBox.superclass.initEvents.apply(this, arguments); + // you need to use keypress to capture upper/lower case and shift+key, but it doesn't work in IE + this.el.on('keydown', this.keySearch, this, true); + this.cshTask = new Ext.util.DelayedTask(this.clearSearchHistory, this); + }, + + keySearch : function(e, target, options) { + var raw = e.getKey(); + var key = String.fromCharCode(raw); + var startIndex = 0; + + if( !this.store.getCount() ) { + return; + } + + switch(raw) { + case Ext.EventObject.HOME: + e.stopEvent(); + this.selectFirst(); + return; + + case Ext.EventObject.END: + e.stopEvent(); + this.selectLast(); + return; + + case Ext.EventObject.PAGEDOWN: + this.selectNextPage(); + e.stopEvent(); + return; + + case Ext.EventObject.PAGEUP: + this.selectPrevPage(); + e.stopEvent(); + return; + } + + // skip special keys other than the shift key + if( (e.hasModifier() && !e.shiftKey) || e.isNavKeyPress() || e.isSpecialKey() ) { + return; + } + if( this.lastSearchTerm == key ) { + startIndex = this.lastSelectedIndex; + } + this.search(this.displayField, key, startIndex); + this.cshTask.delay(this.searchResetDelay); + }, + + onRender : function(ct, position) { + this.store.on('load', this.calcRowsPerPage, this); + Ext.ux.SelectBox.superclass.onRender.apply(this, arguments); + if( this.mode == 'local' ) { + this.calcRowsPerPage(); + } + }, + + onSelect : function(record, index, skipCollapse){ + if(this.fireEvent('beforeselect', this, record, index) !== false){ + this.setValue(record.data[this.valueField || this.displayField]); + if( !skipCollapse ) { + this.collapse(); + } + this.lastSelectedIndex = index + 1; + this.fireEvent('select', this, record, index); + } + }, + + render : function(ct) { + Ext.ux.SelectBox.superclass.render.apply(this, arguments); + if( Ext.isSafari ) { + this.el.swallowEvent('mousedown', true); + } + this.el.unselectable(); + this.innerList.unselectable(); + this.trigger.unselectable(); + this.innerList.on('mouseup', function(e, target, options) { + if( target.id && target.id == this.innerList.id ) { + return; + } + this.onViewClick(); + }, this); + + this.innerList.on('mouseover', function(e, target, options) { + if( target.id && target.id == this.innerList.id ) { + return; + } + this.lastSelectedIndex = this.view.getSelectedIndexes()[0] + 1; + this.cshTask.delay(this.searchResetDelay); + }, this); + + this.trigger.un('click', this.onTriggerClick, this); + this.trigger.on('mousedown', function(e, target, options) { + e.preventDefault(); + this.onTriggerClick(); + }, this); + + this.on('collapse', function(e, target, options) { + Ext.getDoc().un('mouseup', this.collapseIf, this); + }, this, true); + + this.on('expand', function(e, target, options) { + Ext.getDoc().on('mouseup', this.collapseIf, this); + }, this, true); + }, + + clearSearchHistory : function() { + this.lastSelectedIndex = 0; + this.lastSearchTerm = false; + }, + + selectFirst : function() { + this.focusAndSelect(this.store.data.first()); + }, + + selectLast : function() { + this.focusAndSelect(this.store.data.last()); + }, + + selectPrevPage : function() { + if( !this.rowHeight ) { + return; + } + var index = Math.max(this.selectedIndex-this.rowsPerPage, 0); + this.focusAndSelect(this.store.getAt(index)); + }, + + selectNextPage : function() { + if( !this.rowHeight ) { + return; + } + var index = Math.min(this.selectedIndex+this.rowsPerPage, this.store.getCount() - 1); + this.focusAndSelect(this.store.getAt(index)); + }, + + search : function(field, value, startIndex) { + field = field || this.displayField; + this.lastSearchTerm = value; + var index = this.store.find.apply(this.store, arguments); + if( index !== -1 ) { + this.focusAndSelect(index); + } + }, + + focusAndSelect : function(record) { + var index = typeof record === 'number' ? record : this.store.indexOf(record); + this.select(index, this.isExpanded()); + this.onSelect(this.store.getAt(record), index, this.isExpanded()); + }, + + calcRowsPerPage : function() { + if( this.store.getCount() ) { + this.rowHeight = Ext.fly(this.view.getNode(0)).getHeight(); + this.rowsPerPage = this.maxHeight / this.rowHeight; + } else { + this.rowHeight = false; + } + } + +}); + +Ext.Ajax.on('requestcomplete', function(ajax, xhr, o){ + if(typeof urchinTracker == 'function' && o && o.url){ + urchinTracker(o.url); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/elbow-end.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/elbow-end.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/event.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/event.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/example.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/example.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-all.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-all.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-bg-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-bg-over.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-members.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/expand-members.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/extanim32.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/extanim32.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/extanim64.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/extanim64.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/extjs.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/extjs.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/fav.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/fav.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/folder.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/folder.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/folder_open.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/folder_open.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/form.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/form.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/forum.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/forum.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/hd-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/hd-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/hide-inherited.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/hide-inherited.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/icon-grid.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/icon-grid.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/inherited.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/inherited.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/member-collapsed.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/member-collapsed.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/member-expanded.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/member-expanded.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/member-hover.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/member-hover.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/method.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/method.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/minus.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/minus.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/pkg-closed.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/pkg-closed.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/pkg-open.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/pkg-open.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/pkg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/pkg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/plus.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/plus.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/print.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/print.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/print.css 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,206 @@ +body { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + color: #000000; + background-color:#FFFFFF; + margin: 0px; + padding: 10px; +} +.body-wrap{ + width:95%; +} +.list {list-style:inside square;margin-bottom:10px;} +.list li{padding:2px;} +body, td, th { + font-size: 13px; +} +code { + font-family: "Lucida Console", "Courier New", Courier, monospace; + font-size: 12px; +} +pre { + font-family: "Lucida Console", "Courier New", Courier, monospace; + font-size: 12px; +} +th { + text-align: left; + font-weight: bold; + vertical-align: bottom; + color:black; + padding:3px; + font-weight:bold; + border:1px solid #cccccc; + border-collapse: collapse; +} +.top-tools{ + display:none; +} +table { + background-color: white; +} +a { + color: #083772; +} +a:link { + color: #083772; + text-decoration: none; +} + +a:visited { + color: #1e4e8f; + text-decoration: none; +} + +a:hover { + text-decoration: underline; + color: #0000CC; +} + +a:active { + text-decoration: none; + color: #1e4e8f; +} + +/* Headings */ +h1, h2, h3, h4, h5, h6 { + font-family: "Trebuchet MS", "Bitstream Vera Sans", verdana, lucida, arial, helvetica, sans-serif; + font-weight: bold; + margin-top: 3px; + margin-bottom: 3px; + letter-spacing: 1px; + width: 90%; +} + +h1 { + font-size: 18px; +} + +h2 { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; + font-size: 18px; + padding-top: 20px; + padding-bottom: 5px; +} + +h3 { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; + font-size: 16px; +} + +h4 { + font-size: 12px; + color: #666666; +} + +h5 { + font-size: 11px; +} + +.label { + font-weight: bold; + padding-right: 15px; +} +.description{ + margin: 10px 0px; +} +.member-table{ + width:100%; + margin-bottom:10px; +} +.member-table td{ + padding:2px; + vertical-align:top; + padding-right:15px; +} +body .alt{ + background:#f1f1f1; +} +.member-table td.micon{ + width:20px; + padding:0px; + border-left:1px solid #bbbbbb; +} +.member-table td.msource{ + border-right:1px solid #bbbbbb; + width:100px; +} +.mlink{ + font-weight:bold; +} +.member-table td.inherited{ + background-image: url(inherited.gif); + background-position:2px 2px; + background-repeat: no-repeat; +} +.member-table td.mdesc{ + padding-top:0px; +} +.member-table td.micon,.member-table td.mdesc,.member-table td.msource{ + border-bottom:1px solid #bbbbbb; +} +.optional{ + color:#555555; +} + +pre { + background: #F8F8F8; + border: 1px solid #e8e8e8; + border-left-width: 8px; + padding: 0.8em; + margin: 1em ; + margin-right: 0; +} +pre { + font-size: 12px !important; + line-height:14px !important; + padding:5px; + margin-left:0; +} +.detail-wrap{ + border:1px solid #bbbbbb; + border-bottom:0px none; +} +.mdetail-head{ + margin-top:10px; +} +.mdetail{ + padding:7px; + border-bottom:1px solid #bbbbbb; +} +.mdetail h3{ + margin: 5px 0px; + font-size:14px; + color:#083772; +} +.mdetail-desc{ + margin:8px; +} +.mdetail-def{ + font-style: italic; + font-size: 12px; + margin-top:10px; + margin-left:8px; + display:block; +} +.sub-desc{ + margin:5px; + margin-left:16px; +} +.mdetail-params{ + margin-top:10px; +} +.mdetail-params strong{ + font-weight:bold; + display: block; + margin-bottom:3px; +} +.mdetail-params ul{ + list-style: inside; + list-style-type: disc; + margin-left:12px; +} +.mdetail-params li{ + list-style: inside; + list-style-type: disc; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/print.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/print.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/prop.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/prop.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/reset.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/reset.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/reset.css 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,7 @@ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 0.11.0 +*/ +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/s.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/s.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/static.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/static.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/style.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/style.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/style.css 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,360 @@ +.body-wrap { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + color: #222; + background-color:#FFFFFF; + margin: 0px; + padding: 10px; + position:relative; +} +.body-wrap { + width:95%; +} + +.body-wrap ul.list { + margin-left:20px; + margin-bottom:10px; +} +.body-wrap ul.list li { + list-style:inside square; + padding:2px; +} +.body-wrap .description p { + margin:8px 3px !important; +} +.body-wrap .description h4{ + color:#083772; + border-bottom:1px dashed #ccc; + margin:8px 0; + padding-bottom:3px; +} +.body-wrap, .body-wrap td, .body-wrap th { + font-size: 13px; +} +.body-wrap code { + font-family: "Lucida Console", "Courier New", Courier, monospace; + font-size: 12px; +} +.body-wrap pre { + font-family: "Lucida Console", "Courier New", Courier, monospace; + font-size: 12px; +} +.body-wrap th { + text-align: left; + vertical-align:middle; + border-right:1px solid #d0d0d0; + border-top:1px solid #eee; + border-left:1px solid #eee; + background: #f9f9f9 url(../../resources/images/default/grid/grid3-hrow.gif) repeat-x 0 top; + padding:3px; +} +.body-wrap .msource-header { + border-right: 0 none; +} +.body-wrap .top-tools{ + font-size:11px; + text-align:right; +} +.body-wrap table { + background-color: white; +} +.body-wrap a { + color: #083772; +} +.body-wrap a:link { + color: #083772; + text-decoration: none; +} + +.body-wrap a:visited { + color: #1e4e8f; + text-decoration: none; +} + +.body-wrap a:hover { + text-decoration: underline; + color: #0000CC; +} + +.body-wrap a:active { + text-decoration: none; + color: #1e4e8f; +} + +/* Headings */ +.body-wrap h1, .body-wrap h2, .body-wrap h3, .body-wrap h4, .body-wrap h5, .body-wrap h6 { + font-family: "Trebuchet MS", "Bitstream Vera Sans", verdana, lucida, arial, helvetica, sans-serif; + font-weight: bold; + margin:3px 300px 3px 0; + letter-spacing: 1px; + width: 90%; +} + +.body-wrap h1 { + font-size: 18px; +} + +.body-wrap h2 { + font-weight: bold; + font-size: 15px; + padding-top: 20px; + padding-bottom: 5px; +} + +.body-wrap h3 { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; + font-size: 16px; +} + +.body-wrap h4 { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; + font-size: 14px; +} + +.body-wrap h5 { + font-size: 11px; +} + +.body-wrap .label { + font-weight: bold; + padding:3px 15px 3px 0; + color:#333; +} + +.body-wrap .hd-info { + color:#333; + padding:3px; +} +.body-wrap .hd-info a { + +} +.body-wrap .description{ + margin: 10px 0px; +} +.body-wrap .member-table{ + width:100%; + margin-bottom:10px; +} +.body-wrap .member-table td{ + padding:4px; + vertical-align:top; + padding-right:15px; +} +.body-wrap .member-table td.sig { + padding-left:7px; +} +.body-wrap .alt{ + /*background:#f1f1f1;*/ +} +.body-wrap .member-table td.micon{ + width:16px; + padding:0px; + background: #f9f9f9 url(expand-bg.gif) repeat-y top right; + border-right:1px solid #d0d0d0; +} +.body-wrap .member-table td.micon a { + display:block; + height:1px; + width:1px; + overflow:hidden; + cursor:default; +} +.body-wrap .member-table .expandable td.micon a { + display:block; + width:98%; + height:30px; + text-decoration:none !important; + -moz-outline:none; + outline:none; +} + +.body-wrap .member-table td.msource{ + width:100px; +} +.mlink{ + font-weight:bold; +} + +.member-table { + border:1px solid #d0d0d0; +} +.member-table tr.inherited td.msource{ + background-image: url(inherited.gif); + background-position:2px 4px; + background-repeat: no-repeat; + padding-left:18px; +} +.member-table .mdesc{ + padding:5px 0; + color:#444; +} +.member-table td.micon,.member-table td.sig,.member-table td.msource{ + border-top:1px solid #d0d0d0; +} +.body-wrap .optional{ + color:#444 !important; +} + +.body-wrap pre { + background: #F8F8F8; + border: 1px dotted #ccc; + margin: 1em ; + margin-right: 0; + font-size: 12px; + line-height:14px; + padding:7px; + margin-left:0; +} +.detail-wrap{ + +} +.mdetail-head{ + margin-top:10px; +} +.mdetail{ + padding:7px; + border-top:1px dotted #ccc; +} +.mdetail h3{ + margin: 5px 0px; + font-size:14px; + color:#083772; +} +.mdetail-desc{ + margin:8px; +} +.mdetail-def{ + font-style: italic; + font-size: 12px; + margin-top:10px; + margin-left:8px; + display:block; +} +.sub-desc{ + margin:5px; + margin-left:16px; +} +.mdetail-params{ + margin-top:10px; +} +.mdetail-params strong{ + display: block; + margin-bottom:3px; + font-size:11px; + font-weight:bold; + color:#555; +} + +.mdetail-params ul{ + list-style: inside; + list-style-type: circle; + margin:12px; +} +.mdetail-params li{ + list-style: inside; + list-style-type: circle; +} +pre code{ + font-size:12px !important; + color:#000; + line-height:16px !important; +} +pre code b{ + font-weight: normal; + color: #800080; +} +pre code em{ + font-weight: normal; + color: #008080; + background-color:#eee; +} +pre code i,pre code i b,pre code i em{ + font-weight: normal; + font-style: normal; + color: #999; +} + +.body-wrap .inheritance { + margin-top:20px; + float:right; + width:210px; +} +.body-wrap .inheritance pre { + text-align:left; + border: 0 none; + margin: 0; + font-size: 11px; + line-height:18px !important; + background:transparent url(block-bottom.gif) no-repeat left bottom; + padding:0 8px 5px!important; +} + +.body-wrap .inheritance pre img { + vertical-align:middle; + margin-right:3px; +} + +.expandable .micon a { + background: transparent url(member-collapsed.gif) no-repeat 5px 6px; + cursor:pointer; +} + +.expandable td.micon:hover a { + background: transparent url(member-hover.gif) no-repeat 5px 6px; + cursor:pointer; +} +.body-wrap .member-table .expanded td.micon{ + background: #f9f9f9 url(expand-bg-over.gif) repeat-y top right; +} +.body-wrap .member-table .expanded td.micon a { + background: transparent url(member-expanded.gif) no-repeat 5px 6px; + cursor:pointer; +} + +.mdesc .long { + display:none; +} +.mdesc .long .mdetail-params { + font-size:12px; + padding-left:12px; +} +.expanded .mdesc .short { + display:none; +} + +.expanded .mdesc .long { + display: block; +} + +.full-details .expandable .micon a { + height:1px !important; + width:1px !important; + overflow:hidden; + cursor:default; +} + +.full-details .mdesc .short { + display:none !important; +} + +.full-details .mdesc .long { + display: block !important; +} + +.full-details .body-wrap .member-table .expanded td.micon{ + background: #f9f9f9 url(expand-bg.gif) repeat-y top right; +} + +div.hr { + height:1px; + background:#ccc; + margin: 5px 0; + overflow:hidden; + line-height:1px; +} + + +.expanded .mdesc .long { + line-height:18px; +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/tabs.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/tabs.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/tree-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/tree-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/wel-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/wel-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/welcome-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/welcome-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/welcome.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/welcome.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/docs/resources/welcome.css 4 Dec 2007 02:48:40 -0000 1.1 @@ -0,0 +1,25 @@ +body{ + background:url(welcome-bg.gif) top left; + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + color: #000000; + margin: 0px; + font-size:13px; + padding-bottom:15px; +} +a { + color: #083772; +} +a:link { + color: #083772; + text-decoration: none; +} + +a:visited { + color: #1e4e8f; + text-decoration: none; +} + +a:hover { + text-decoration: underline; + color: #0000CC; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/license.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/license.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/license.txt 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,50 @@ +Ext JS - JavaScript Library +Copyright (c) 2006-2007, Ext JS, LLC +All rights reserved. +licensing@extjs.com + +http://extjs.com/license + + +License of CSS and Graphics ("Assets") +------------------------------------------------------------------------------------------ +The Assets distributed with Ext are licensed for use ONLY +with their associated Ext JavaScript component ("Component"). Use of the Assets in +any way that does not also include the Component is prohibited without explicit +permission from Ext JS, LLC. Deriving images and CSS from the Assets in an effort +to bypass this license is also prohibited. + + +Open Source License +------------------------------------------------------------------------------------------ +Ext is also licensed under the terms of the Open Source LGPL 3.0 license. You may use +our open source license if you: + * Want to use Ext in an open source project that precludes using non-open source software + * Plan to use Ext in a personal, educational or non-profit manner + * Are using Ext in a commercial application that is not a software development library +or toolkit, you will meet LGPL requirements and you do not wish to support the project + +http://www.gnu.org/licenses/lgpl.html + + +Commercial License +------------------------------------------------------------------------------------------ +If you are using this library for commercial purposes, we encourage you to purchase +a commercial license. Please visit http://extjs.com/license for more details. + + +OEM / Reseller License +------------------------------------------------------------------------------------------ +If you plan to distribute Ext in a product that will be packaged or sold as a software +development library, toolkit or plug-in-based framework ("LIBRARY"), we require that you +work with us to establish a specific license that is appropriate. Use of the open source +license in a LIBRARY is not permitted without explicit permission from Ext JS, LLC. + +For more details, please visit: http://extjs.com/license. + +-- + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/resources.jsb =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/resources.jsb,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/resources.jsb 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,688 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/README.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/README.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/README.txt 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,3 @@ +2006-11-21 jvs: +ext-all.css contains all of the other css files combined and stripped of comments (except themes). + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/borders.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/borders.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/borders.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,61 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-panel-noborder .x-panel-body-noborder { + border-width:0; +} + +.x-panel-noborder .x-panel-header-noborder { + border-width:0; + border-bottom:1px solid #99bbe8; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-width:0; + border-bottom:1px solid #99bbe8; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-width:0; + border-top:1px solid #99bbe8; +} + +.x-window-noborder .x-window-mc { + border-width:0; +} + +.x-window-plain .x-window-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-header-noborder { + border-top-width:0; + border-left-width:0; + border-right-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-footer-noborder { + border-bottom-width:0; + border-left-width:0; + border-right-width:0; +} + + +.x-tab-panel-bbar-noborder .x-toolbar { + border-width:0; + border-top:1px solid #99bbe8; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-width:0; + border-bottom:1px solid #99bbe8; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/box.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/box.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/box.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,111 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* + Creates rounded, raised boxes like on the Ext website - the markup isn't pretty: +
        +
        +
        +

        YOUR TITLE HERE (optional)

        +
        YOUR CONTENT HERE
        +
        +
        +
        + */ + +.x-box-tl { + background: transparent url(../images/default/box/corners.gif) no-repeat 0 0; + zoom:1; +} + +.x-box-tc { + height: 8px; + background: transparent url(../images/default/box/tb.gif) repeat-x 0 0; + overflow: hidden; +} + +.x-box-tr { + background: transparent url(../images/default/box/corners.gif) no-repeat right -8px; +} + +.x-box-ml { + background: transparent url(../images/default/box/l.gif) repeat-y 0; + padding-left: 4px; + overflow: hidden; + zoom:1; +} + +.x-box-mc { + background: #eee url(../images/default/box/tb.gif) repeat-x 0 -16px; + padding: 4px 10px; + font-family: "Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif; + color: #393939; + font-size: 12px; +} + +.x-box-mc h3 { + font-size: 14px; + font-weight: bold; + margin: 0 0 4px 0; + zoom:1; +} + +.x-box-mr { + background: transparent url(../images/default/box/r.gif) repeat-y right; + padding-right: 4px; + overflow: hidden; +} + +.x-box-bl { + background: transparent url(../images/default/box/corners.gif) no-repeat 0 -16px; + zoom:1; +} + +.x-box-bc { + background: transparent url(../images/default/box/tb.gif) repeat-x 0 -8px; + height: 8px; + overflow: hidden; +} + +.x-box-br { + background: transparent url(../images/default/box/corners.gif) no-repeat right -24px; +} + +.x-box-tl, .x-box-bl { + padding-left: 8px; + overflow: hidden; +} + +.x-box-tr, .x-box-br { + padding-right: 8px; + overflow: hidden; +} + +.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr { + background-image: url(../images/default/box/corners-blue.gif); +} + +.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc { + background-image: url(../images/default/box/tb-blue.gif); +} + +.x-box-blue .x-box-mc { + background-color: #c3daf9; +} + +.x-box-blue .x-box-mc h3 { + color: #17385b; +} + +.x-box-blue .x-box-ml { + background-image: url(../images/default/box/l-blue.gif); +} + +.x-box-blue .x-box-mr { + background-image: url(../images/default/box/r-blue.gif); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/button.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/button.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/button.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,159 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; + cursor:pointer; + white-space: nowrap; +} +.x-btn button{ + border:0 none; + background:transparent; + font:normal 11px tahoma,verdana,helvetica; + padding-left:3px; + padding-right:3px; + cursor:pointer; + margin:0; + overflow:visible; + width:auto; + -moz-outline:0 none; + outline:0 none; +} +* html .ext-ie .x-btn button { + width:1px; +} +.ext-gecko .x-btn button { + padding-left:0; + padding-right:0; +} +.ext-ie .x-btn button { + padding-top:2px; +} +/* + Predefined css class for buttons with only icon. Add this class (x-btn-icon) and a class with a background-image + to your button for a button with just an icon. + e.g. + .my-class .x-btn-text { background-image: url(foo.gif); } + */ + +.x-btn-icon .x-btn-center .x-btn-text{ + background-position: center; + background-repeat: no-repeat; + height: 16px; + width: 16px; + cursor:pointer; + white-space: nowrap; + padding:0; +} +.x-btn-icon .x-btn-center{ + padding:1px; +} +.x-btn em { + font-style:normal; + font-weight:normal; +} +/* + Button class for icon and text. Add this class (x-btn-text-icon) and a class with a background-image + to your button for both text and icon. +*/ + +.x-btn-text-icon .x-btn-center .x-btn-text{ + background-position: 0 2px; + background-repeat: no-repeat; + padding-left:18px; + padding-top:3px; + padding-bottom:2px; + padding-right:0; +} + +.x-btn-left, .x-btn-right{ + font-size:1px; + line-height:1px; +} +.x-btn-left{ + width:3px; + height:21px; + background:url(../images/default/button/btn-sprite.gif) no-repeat 0 0; +} +.x-btn-right{ + width:3px; + height:21px; + background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -21px; +} +.x-btn-left i, .x-btn-right i{ + display:block; + width:3px; + overflow:hidden; + font-size:1px; + line-height:1px; +} +.x-btn-center{ + background:url(../images/default/button/btn-sprite.gif) repeat-x 0 -42px; + vertical-align: middle; + text-align:center; + padding:0 5px; + cursor:pointer; + white-space:nowrap; +} +.x-btn-over .x-btn-left{ + background-position:0 -63px; +} +.x-btn-over .x-btn-right{ + background-position:0 -84px; +} +.x-btn-over .x-btn-center{ + background-position:0 -105px; +} +.x-btn-click .x-btn-center, .x-btn-menu-active .x-btn-center{ + background-position:0 -126px; +} +.x-btn-disabled *{ + color:gray !important; + cursor:default !important; +} +.x-btn-menu-text-wrap .x-btn-center { + padding:0 3px; +} +.ext-gecko .x-btn-menu-text-wrap .x-btn-center { + padding:0 1px; +} +.x-btn-menu-arrow-wrap .x-btn-center { + padding:0; +} +.x-btn-menu-arrow-wrap .x-btn-center button { + width:12px !important; + height:21px; + padding:0 !important; + display:block; + background:transparent url(../images/default/button/btn-arrow.gif) no-repeat left 3px; +} +.x-btn-with-menu .x-btn-center { + padding-right:2px !important; +} +.x-btn-with-menu .x-btn-center em { + display:block; + background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 0; + padding-right:10px; +} + +.x-btn-text-icon .x-btn-with-menu .x-btn-center em { + display:block; + background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 3px; + padding-right:10px; +} + +/* Toggle button styles */ +.x-btn-pressed .x-btn-left{ + background: url(../images/default/button/btn-sprite.gif) no-repeat 0 -63px; +} +.x-btn-pressed .x-btn-right{ + background: url(../images/default/button/btn-sprite.gif) no-repeat 0 -84px; +} +.x-btn-pressed .x-btn-center{ + background: url(../images/default/button/btn-sprite.gif) repeat-x 0 -126px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/combo.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/combo.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/combo.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,55 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-combo-list { + border:1px solid #98c0f4; + background:#ddecfe; + zoom:1; + overflow:hidden; +} +.x-combo-list-inner { + overflow:auto; + background:white; + position:relative; /* for calculating scroll offsets */ + zoom:1; + overflow-x:hidden; +} +.x-combo-list-hd { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; + background-image: url(../images/default/layout/panel-title-light-bg.gif); + border-bottom:1px solid #98c0f4; + padding:3px; +} +.x-resizable-pinned .x-combo-list-inner { + border-bottom:1px solid #98c0f4; +} +.x-combo-list-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; + padding:2px; + border:1px solid #fff; + white-space: nowrap; + overflow:hidden; + text-overflow: ellipsis; +} +.x-combo-list .x-combo-selected{ + border:1px dotted #a3bae9 !important; + background:#DFE8F6; + cursor:pointer; +} +.x-combo-noedit{ + cursor:pointer; +} +.x-combo-list .x-toolbar { + border-top:1px solid #98c0f4; + border-bottom:0 none; +} + +.x-combo-list-small .x-combo-list-item { + font:normal 11px tahoma, arial, helvetica, sans-serif; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/core.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/core.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/core.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,314 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.ext-el-mask { + z-index: 20000; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + background-color: #CCC; + width: 100%; + height: 100%; + zoom: 1; +} +.ext-el-mask-msg { + z-index: 20001; + position: absolute; + top: 0; + left: 0; + border:1px solid #6593cf; + background: #c3daf9 url(../images/default/box/tb-blue.gif) repeat-x 0 -16px; + padding:2px; +} +.ext-el-mask-msg div { + padding:5px 10px 5px 10px; + background: #eee; + border:1px solid #a3bad9; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; + cursor:wait; +} + +.ext-shim { + position:absolute; + visibility:hidden; + left:0; + top:0; + overflow:hidden; +} +.ext-ie .ext-shim { + filter: alpha(opacity=0); +} +.ext-ie6 .ext-shim { + margin-left: 5px; + margin-top: 3px; +} + +.x-mask-loading div { + padding:5px 10px 5px 25px; + background: #fbfbfb url( '../images/default/grid/loading.gif' ) no-repeat 5px 5px; + line-height: 16px; +} +/* class for hiding elements without using display:none */ +.x-hidden, .x-hide-offsets { + position:absolute; + left:-10000px; + top:-10000px; + visibility:hidden; +} +.x-hide-display { + display:none !important; +} + +.x-hide-visibility { + visibility:hidden !important; +} + +.x-masked { + overflow: hidden !important; +} + +.x-masked select, .x-masked object, .x-masked embed { + visibility: hidden; +} + +.x-layer { + visibility: hidden; +} + +.x-unselectable, .x-unselectable * { + -moz-user-select: none; + -khtml-user-select: none; +} + +.x-repaint { + zoom: 1; + background-color: transparent; + -moz-outline: none; +} + +.x-item-disabled { + color: gray; + cursor: default; + opacity: .6; + -moz-opacity: .6; + filter: alpha(opacity=60); +} + +.x-item-disabled * { + color: gray !important; + cursor: default !important; +} + +.x-splitbar-proxy { + position: absolute; + visibility: hidden; + z-index: 20001; + background: #aaa; + zoom: 1; + line-height: 1px; + font-size: 1px; + overflow: hidden; +} + +.x-splitbar-h, .x-splitbar-proxy-h { + cursor: e-resize; + cursor: col-resize; +} + +.x-splitbar-v, .x-splitbar-proxy-v { + cursor: s-resize; + cursor: row-resize; +} + +.x-color-palette { + width: 150px; + height: 92px; + cursor: pointer; +} + +.x-color-palette a { + border: 1px solid #fff; + float: left; + padding: 2px; + text-decoration: none; + -moz-outline: 0 none; + outline: 0 none; + cursor: pointer; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border: 1px solid #8BB8F3; + background: #deecfd; +} + +.x-color-palette em { + display: block; + border: 1px solid #ACA899; +} + +.x-color-palette em span { + cursor: pointer; + display: block; + height: 10px; + line-height: 10px; + width: 10px; +} + +.x-ie-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; + background:#777; + zoom:1; +} + +.x-shadow { + display: none; + position: absolute; + overflow: hidden; + left:0; + top:0; +} + +.x-shadow * { + overflow: hidden; +} + +.x-shadow * { + padding: 0; + border: 0; + margin: 0; + clear: none; + zoom: 1; +} + +/* top bottom */ +.x-shadow .xstc, .x-shadow .xsbc { + height: 6px; + float: left; +} + +/* corners */ +.x-shadow .xstl, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbr { + width: 6px; + height: 6px; + float: left; +} + +/* sides */ +.x-shadow .xsc { + width: 100%; +} + +.x-shadow .xsml, .x-shadow .xsmr { + width: 6px; + float: left; + height: 100%; +} + +.x-shadow .xsmc { + float: left; + height: 100%; + background: transparent url( ../images/default/shadow-c.png ); +} + +.x-shadow .xst, .x-shadow .xsb { + height: 6px; + overflow: hidden; + width: 100%; +} + +.x-shadow .xsml { + background: transparent url( ../images/default/shadow-lr.png ) repeat-y 0 0; +} + +.x-shadow .xsmr { + background: transparent url( ../images/default/shadow-lr.png ) repeat-y -6px 0; +} + +.x-shadow .xstl { + background: transparent url( ../images/default/shadow.png ) no-repeat 0 0; +} + +.x-shadow .xstc { + background: transparent url( ../images/default/shadow.png ) repeat-x 0 -30px; +} + +.x-shadow .xstr { + background: transparent url( ../images/default/shadow.png ) repeat-x 0 -18px; +} + +.x-shadow .xsbl { + background: transparent url( ../images/default/shadow.png ) no-repeat 0 -12px; +} + +.x-shadow .xsbc { + background: transparent url( ../images/default/shadow.png ) repeat-x 0 -36px; +} + +.x-shadow .xsbr { + background: transparent url( ../images/default/shadow.png ) repeat-x 0 -6px; +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); + background-repeat: no-repeat; + background-position: left; + padding-left: 20px; + line-height: 16px; + margin: 3px; +} + +.x-text-resize { + position: absolute; + left: -1000px; + top: -1000px; + visibility: hidden; + zoom: 1; +} + +.x-drag-overlay { + width: 100%; + height: 100%; + display: none; + position: absolute; + left: 0; + top: 0; + background-image:url(../images/default/s.gif); + z-index: 20000; +} + +.x-clear { + clear:both; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} + + +.x-spotlight { + z-index: 8999; + position: absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity: .50; + filter: alpha(opacity=50); + background-color: #CCC; + width:0; + height:0; + zoom: 1; +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/date-picker.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/date-picker.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/date-picker.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,246 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-date-picker { + border: 1px solid #1b376c; + border-top:0 none; + background:#fff; + position:relative; +} +.x-date-picker a { + -moz-outline:0 none; + outline:0 none; +} +.x-date-inner, .x-date-inner td, .x-date-inner th{ + border-collapse:separate; +} +.x-date-middle,.x-date-left,.x-date-right { + background: url(../images/default/shared/hd-sprite.gif) repeat-x 0 -83px; + color:#FFF; + font:bold 11px "sans serif", tahoma, verdana, helvetica; + overflow:hidden; +} + +.x-date-middle .x-btn-left,.x-date-middle .x-btn-center,.x-date-middle .x-btn-right{ + background:transparent !important; + vertical-align:middle; +} +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} +.x-date-middle .x-btn-with-menu .x-btn-center em { + background:transparent url(../images/default/toolbar/btn-arrow-light.gif) no-repeat right 0; +} +.x-date-right, .x-date-left { + width:18px; +} +.x-date-right{ + text-align:right; +} +.x-date-middle { + padding-top:2px;padding-bottom:2px; +} +.x-date-right a, .x-date-left a{ + display:block; + width:16px; + height:16px; + background-position: center; + background-repeat: no-repeat; + cursor:pointer; + -moz-opacity: 0.6; + opacity:.6; + filter: alpha(opacity=60); +} +.x-date-right a:hover, .x-date-left a:hover{ + -moz-opacity: 1; + opacity:1; + filter: alpha(opacity=100); +} +.x-date-right a { + background-image: url(../images/default/shared/right-btn.gif); + margin-right:2px; + text-decoration:none !important; +} +.x-date-left a{ + background-image: url(../images/default/shared/left-btn.gif); + margin-left:2px; + text-decoration:none !important; +} +table.x-date-inner { + width:100%; + table-layout:fixed; +} +.x-date-inner th { + width:25px; +} +.x-date-inner th { + background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; + text-align:right !important; + border-bottom: 1px solid #a3bad9; + font:normal 10px arial, helvetica,tahoma,sans-serif; + color:#233d6d; + cursor:default; + padding:0; + border-collapse:separate; +} +.x-date-inner th span { + display:block; + padding:2px; + padding-right:7px; +} +.x-date-inner td { + border: 1px solid #fff; + text-align:right; + padding:0; +} +.x-date-inner a { + padding:2px 5px; + display:block; + font:normal 11px arial, helvetica,tahoma,sans-serif; + text-decoration:none; + color:black; + text-align:right; + zoom:1; +} +.x-date-inner .x-date-active{ + cursor:pointer; + color:black; +} +.x-date-inner .x-date-selected a{ + background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; + border:1px solid #8db2e3; + padding:1px 4px; +} +.x-date-inner .x-date-today a{ + border: 1px solid darkred; + padding:1px 4px; +} +.x-date-inner .x-date-selected span{ + font-weight:bold; +} +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a { + color:#aaaaaa; + text-decoration:none !important; +} +.x-date-bottom { + padding:4px; + border-top: 1px solid #a3bad9; + background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; +} + +.x-date-inner a:hover, .x-date-inner .x-date-disabled a:hover{ + text-decoration:none !important; + color:black; + background: #ddecfe; +} + +.x-date-inner .x-date-disabled a { + cursor:default; + background:#eeeeee; + color:#bbbbbb; +} +.x-date-mmenu{ + background:#eeeeee !important; +} +.x-date-mmenu .x-menu-item { + font-size:10px; + padding:1px 24px 1px 4px; + white-space: nowrap; + color:#000; +} +.x-date-mmenu .x-menu-item .x-menu-item-icon { + width:10px;height:10px;margin-right:5px; + background-position:center -4px !important; +} + +.x-date-mp { + position:absolute; + left:0; + top:0; + background:white; + display:none; +} +.x-date-mp td { + padding:2px; + font:normal 11px arial, helvetica,tahoma,sans-serif; +} +td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn { + border: 0 none; + text-align:center; + vertical-align: middle; + width:25%; +} +.x-date-mp-ok { + margin-right:3px; +} +.x-date-mp-btns button { + text-decoration:none; + text-align:center; + text-decoration:none !important; + background:#083772; + color:white; + border:1px solid; + border-color: #3366cc #000055 #000055 #3366cc; + padding:1px 3px 1px; + font:normal 11px arial, helvetica,tahoma,sans-serif; + cursor:pointer; +} +.x-date-mp-btns { + background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; +} +.x-date-mp-btns td { + border-top: 1px solid #c5d2df; + text-align:center; +} +td.x-date-mp-month a,td.x-date-mp-year a { + display:block; + padding:2px 4px; + text-decoration:none; + text-align:center; + color:#15428b; +} + +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { + color:#15428b; + text-decoration:none; + cursor:pointer; + background: #ddecfe; +} + +td.x-date-mp-sel a { + padding:1px 3px; + background: #dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top; + border:1px solid #8db2e3; +} +.x-date-mp-ybtn a { + overflow:hidden; + width:15px; + height:15px; + cursor:pointer; + background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat; + display:block; + margin:0 auto; +} +.x-date-mp-ybtn a.x-date-mp-next { + background-position:0 -120px; +} +.x-date-mp-ybtn a.x-date-mp-next:hover { + background-position:-15px -120px; +} +.x-date-mp-ybtn a.x-date-mp-prev { + background-position:0 -105px; +} +.x-date-mp-ybtn a.x-date-mp-prev:hover { + background-position:-15px -105px; +} +.x-date-mp-ybtn { + text-align:center; +} +td.x-date-mp-sep { + border-right:1px solid #c5d2df; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/dd.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/dd.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/dd.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,75 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-dd-drag-proxy{ + position:absolute; + left:0;top:0; + visibility:hidden; + z-index:15000; +} +.x-dd-drag-ghost{ + color: black; + font: normal 11px arial, helvetica, sans-serif; + -moz-opacity: 0.85; + opacity:.85; + filter: alpha(opacity=85); + border-top:1px solid #dddddd; + border-left:1px solid #dddddd; + border-right:1px solid #bbbbbb; + border-bottom:1px solid #bbbbbb; + padding:3px; + padding-left:20px; + background-color:white; + white-space:nowrap; +} +.x-dd-drag-repair .x-dd-drag-ghost{ + -moz-opacity: 0.4; + opacity:.4; + filter: alpha(opacity=40); + border:0 none; + padding:0; + background-color:transparent; +} +.x-dd-drag-repair .x-dd-drop-icon{ + visibility:hidden; +} +.x-dd-drop-icon{ + position:absolute; + top:3px; + left:3px; + display:block; + width:16px; + height:16px; + background-color:transparent; + background-position: center; + background-repeat: no-repeat; + z-index:1; +} +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + + +.x-view-selector { + position:absolute; + left:0; + top:0; + width:0; + background:#c3daf9; + border:1px dotted #3399bb; + opacity: .5; + -moz-opacity: .5; + filter:alpha(opacity=50); + zoom:1; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/debug.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/debug.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/debug.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,37 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +#x-debug-browser .x-tree .x-tree-node a span { + color:#222297; + font-size:11px; + padding-top:2px; + font-family:"monotype","courier new",sans-serif; + line-height:18px; +} +#x-debug-browser .x-tree a i { + color:#FF4545; + font-style:normal; +} +#x-debug-browser .x-tree a em { + color:#999; +} +#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ + background:#c3daf9; +} +#x-debug-browser .x-tool-toggle { + background-position:0 -75px; +} +#x-debug-browser .x-tool-toggle-over { + background-position:-15px -75px; +} +#x-debug-browser.x-panel-collapsed .x-tool-toggle { + background-position:0 -60px; +} +#x-debug-browser.x-panel-collapsed .x-tool-toggle-over { + background-position:-15px -60px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/dialog.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/dialog.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/dialog.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,61 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-window-dlg .x-window-body { + border:0 none !important; + padding:5px 10px; + overflow:hidden !important; +} +.x-window-dlg .x-window-mc { + border:0 none !important; +} +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} +.x-window-dlg .ext-mb-input { + margin-top:4px; + width:95%; +} +.x-window-dlg .ext-mb-textarea { + margin-top:4px; + font:normal 12px tahoma,arial,helvetica,sans-serif; +} +.x-window-dlg .x-progress-wrap { + margin-top:4px; +} +.ext-ie .x-window-dlg .x-progress-wrap { + margin-top:6px; +} +.x-window-dlg .x-msg-box-wait { + background: transparent url(../images/default/grid/loading.gif) no-repeat left; + display:block; + width:300px; + padding-left:18px; + line-height:18px; +} +.x-window-dlg .ext-mb-icon { + float:left; + width:47px; + height:32px; +} +.ext-ie .x-window-dlg .ext-mb-icon { + width:44px; /* 3px IE margin issue */ +} +.x-window-dlg .ext-mb-info { + background:transparent url(../images/default/window/icon-info.gif) no-repeat top left; +} +.x-window-dlg .ext-mb-warning { + background:transparent url(../images/default/window/icon-warning.gif) no-repeat top left; +} +.x-window-dlg .ext-mb-question { + background:transparent url(../images/default/window/icon-question.gif) no-repeat top left; +} +.x-window-dlg .ext-mb-error { + background:transparent url(../images/default/window/icon-error.gif) no-repeat top left; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/editor.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/editor.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/editor.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,66 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-html-editor-wrap { + border:1px solid #a9bfd3; + background:white; +} +.x-html-editor-tb .x-btn-text { + background:transparent url(../images/default/editor/tb-sprite.gif) no-repeat; +} +.x-html-editor-tb .x-edit-bold .x-btn-text { + background-position:0 0; +} +.x-html-editor-tb .x-edit-italic .x-btn-text { + background-position:-16px 0; +} +.x-html-editor-tb .x-edit-underline .x-btn-text { + background-position:-32px 0; +} +.x-html-editor-tb .x-edit-forecolor .x-btn-text { + background-position:-160px 0; +} +.x-html-editor-tb .x-edit-backcolor .x-btn-text { + background-position:-176px 0; +} +.x-html-editor-tb .x-edit-justifyleft .x-btn-text { + background-position:-112px 0; +} +.x-html-editor-tb .x-edit-justifycenter .x-btn-text { + background-position:-128px 0; +} +.x-html-editor-tb .x-edit-justifyright .x-btn-text { + background-position:-144px 0; +} +.x-html-editor-tb .x-edit-insertorderedlist .x-btn-text { + background-position:-80px 0; +} +.x-html-editor-tb .x-edit-insertunorderedlist .x-btn-text { + background-position:-96px 0; +} +.x-html-editor-tb .x-edit-increasefontsize .x-btn-text { + background-position:-48px 0; +} +.x-html-editor-tb .x-edit-decreasefontsize .x-btn-text { + background-position:-64px 0; +} +.x-html-editor-tb .x-edit-sourceedit .x-btn-text { + background-position:-192px 0; +} +.x-html-editor-tb .x-edit-createlink .x-btn-text { + background-position:-208px 0; +} + +.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { + padding:5px; + padding-bottom:1px; +} + +.x-html-editor-tb .x-toolbar { + position:static !important; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/ext-all.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/ext-all.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/ext-all.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,854 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;} +img,body,html{border:0;} +address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;} +ol,ul{list-style:none;} +caption,th{text-align:left;} +h1,h2,h3,h4,h5,h6{font-size:100%;} +q:before,q:after{content:'';} + +.ext-el-mask{z-index:20000;position:absolute;top:0;left:0;-moz-opacity:0.5;opacity:.50;filter:alpha(opacity=50);background-color:#CCC;width:100%;height:100%;zoom:1;} +.ext-el-mask-msg{z-index:20001;position:absolute;top:0;left:0;border:1px solid #6593cf;background:#c3daf9 url(../images/default/box/tb-blue.gif) repeat-x 0 -16px;padding:2px;} +.ext-el-mask-msg div{padding:5px 10px 5px 10px;background:#eee;border:1px solid #a3bad9;color:#222;font:normal 11px tahoma,arial,helvetica,sans-serif;cursor:wait;} +.ext-shim{position:absolute;visibility:hidden;left:0;top:0;overflow:hidden;} +.ext-ie .ext-shim{filter:alpha(opacity=0);} +.ext-ie6 .ext-shim{margin-left:5px;margin-top:3px;} +.x-mask-loading div{padding:5px 10px 5px 25px;background:#fbfbfb url( '../images/default/grid/loading.gif' ) no-repeat 5px 5px;line-height:16px;} +.x-hidden,.x-hide-offsets{position:absolute;left:-10000px;top:-10000px;visibility:hidden;} +.x-hide-display{display:none!important;} +.x-hide-visibility{visibility:hidden!important;} +.x-masked{overflow:hidden!important;} +.x-masked select,.x-masked object,.x-masked embed{visibility:hidden;} +.x-layer{visibility:hidden;} +.x-unselectable,.x-unselectable *{-moz-user-select:none;-khtml-user-select:none;} +.x-repaint{zoom:1;background-color:transparent;-moz-outline:none;} +.x-item-disabled{color:gray;cursor:default;opacity:.6;-moz-opacity:.6;filter:alpha(opacity=60);} +.x-item-disabled *{color:gray!important;cursor:default!important;} +.x-splitbar-proxy{position:absolute;visibility:hidden;z-index:20001;background:#aaa;zoom:1;line-height:1px;font-size:1px;overflow:hidden;} +.x-splitbar-h,.x-splitbar-proxy-h{cursor:e-resize;cursor:col-resize;} +.x-splitbar-v,.x-splitbar-proxy-v{cursor:s-resize;cursor:row-resize;} +.x-color-palette{width:150px;height:92px;cursor:pointer;} +.x-color-palette a{border:1px solid #fff;float:left;padding:2px;text-decoration:none;-moz-outline:0 none;outline:0 none;cursor:pointer;} +.x-color-palette a:hover,.x-color-palette a.x-color-palette-sel{border:1px solid #8BB8F3;background:#deecfd;} +.x-color-palette em{display:block;border:1px solid #ACA899;} +.x-color-palette em span{cursor:pointer;display:block;height:10px;line-height:10px;width:10px;} +.x-ie-shadow{display:none;position:absolute;overflow:hidden;left:0;top:0;background:#777;zoom:1;} +.x-shadow{display:none;position:absolute;overflow:hidden;left:0;top:0;} +.x-shadow *{overflow:hidden;} +.x-shadow *{padding:0;border:0;margin:0;clear:none;zoom:1;} +.x-shadow .xstc,.x-shadow .xsbc{height:6px;float:left;} +.x-shadow .xstl,.x-shadow .xstr,.x-shadow .xsbl,.x-shadow .xsbr{width:6px;height:6px;float:left;} +.x-shadow .xsc{width:100%;} +.x-shadow .xsml,.x-shadow .xsmr{width:6px;float:left;height:100%;} +.x-shadow .xsmc{float:left;height:100%;background:transparent url( ../images/default/shadow-c.png );} +.x-shadow .xst,.x-shadow .xsb{height:6px;overflow:hidden;width:100%;} +.x-shadow .xsml{background:transparent url( ../images/default/shadow-lr.png ) repeat-y 0 0;} +.x-shadow .xsmr{background:transparent url( ../images/default/shadow-lr.png ) repeat-y -6px 0;} +.x-shadow .xstl{background:transparent url( ../images/default/shadow.png ) no-repeat 0 0;} +.x-shadow .xstc{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -30px;} +.x-shadow .xstr{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -18px;} +.x-shadow .xsbl{background:transparent url( ../images/default/shadow.png ) no-repeat 0 -12px;} +.x-shadow .xsbc{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -36px;} +.x-shadow .xsbr{background:transparent url( ../images/default/shadow.png ) repeat-x 0 -6px;} +.loading-indicator{font-size:11px;background-image:url(../images/default/grid/loading.gif);background-repeat:no-repeat;background-position:left;padding-left:20px;line-height:16px;margin:3px;} +.x-text-resize{position:absolute;left:-1000px;top:-1000px;visibility:hidden;zoom:1;} +.x-drag-overlay{width:100%;height:100%;display:none;position:absolute;left:0;top:0;background-image:url(../images/default/s.gif);z-index:20000;} +.x-clear{clear:both;height:0;overflow:hidden;line-height:0;font-size:0;} +.x-spotlight{z-index:8999;position:absolute;top:0;left:0;-moz-opacity:0.5;opacity:.50;filter:alpha(opacity=50);background-color:#CCC;width:0;height:0;zoom:1;} + +.x-tab-panel{overflow:hidden;} +.x-tab-panel-header,.x-tab-panel-footer{background:#deecfd;border:1px solid #8db2e3;overflow:hidden;zoom:1;} +.x-tab-panel-header{border:1px solid #8db2e3;padding-bottom:2px;} +.x-tab-panel-footer{border:1px solid #8db2e3;padding-top:2px;} +.x-tab-strip-wrap{width:100%;overflow:hidden;position:relative;zoom:1;} +ul.x-tab-strip{display:block;width:5000px;zoom:1;} +ul.x-tab-strip-top{padding-top:1px;background:url(../images/default/tabs/tab-strip-bg.gif) #cedff5 repeat-x bottom;border-bottom:1px solid #8db2e3;} +ul.x-tab-strip-bottom{padding-bottom:1px;background:url(../images/default/tabs/tab-strip-btm-bg.gif) #cedff5 repeat-x top;border-top:1px solid #8db2e3;border-bottom:0 none;} +.x-tab-panel-header-plain .x-tab-strip-top{background:transparent!important;padding-top:0!important;} +.x-tab-panel-header-plain{background:transparent!important;border-width:0!important;padding-bottom:0!important;} +.x-tab-panel-header-plain .x-tab-strip-spacer{border:1px solid #8db2e3;border-top:0 none;height:2px;background:#deecfd;font-size:1px;line-height:1px;} +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer{height:3px;} +ul.x-tab-strip li{float:left;margin-left:2px;} +ul.x-tab-strip li.x-tab-edge{float:left;margin:0!important;padding:0!important;border:0 none!important;font-size:1px!important;line-height:1px!important;overflow:hidden;zoom:1;background:transparent!important;width:1px;} +.x-tab-strip a,.x-tab-strip span,.x-tab-strip em{display:block;} +.x-tab-strip a{text-decoration:none!important;-moz-outline:none;outline:none;cursor:pointer;} +.x-tab-strip-inner{overflow:hidden;text-overflow:ellipsis;} +.x-tab-strip span.x-tab-strip-text{font:normal 11px tahoma,arial,helvetica;color:#416aa3;white-space:nowrap;cursor:pointer;padding:4px 0;} +.x-tab-strip .x-tab-with-icon .x-tab-right{padding-left:6px;} +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text{padding-left:20px;background-position:0 3px;background-repeat:no-repeat;} +.x-tab-strip-over span.x-tab-strip-text{color:#15428b;} +.x-tab-strip-active{cursor:default;} +.x-tab-strip-active span.x-tab-strip-text{cursor:default;color:#15428b;font-weight:bold;} +.x-tab-strip-disabled .x-tabs-text{cursor:default;color:#aaa;} +.x-tab-panel-body{overflow:hidden;} +.x-tab-panel-bwrap{overflow:hidden;} +.ext-ie .x-tab-strip .x-tab-right{position:relative;} +.x-tab-strip-top .x-tab-strip-active .x-tab-right{margin-bottom:-1px;} +.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text{padding-bottom:5px;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{margin-top:-1px;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text{padding-top:5px;} +.x-tab-strip-top .x-tab-right{background:transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat 0 -51px;padding-left:10px;} +.x-tab-strip-top .x-tab-left{background:transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat right -351px;padding-right:10px;} +.x-tab-strip-top .x-tab-strip-inner{background:transparent url(../images/default/tabs/tabs-sprite.gif) repeat-x 0 -201px;} +.x-tab-strip-top .x-tab-strip-over .x-tab-right{background-position:0 -101px;} +.x-tab-strip-top .x-tab-strip-over .x-tab-left{background-position:right -401px;} +.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner{background-position:0 -251px;} +.x-tab-strip-top .x-tab-strip-active .x-tab-right{background-position:0 0;} +.x-tab-strip-top .x-tab-strip-active .x-tab-left{background-position:right -301px;} +.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner{background-position:0 -151px;} +.x-tab-strip-bottom .x-tab-right{background:url(../images/default/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom right;} +.x-tab-strip-bottom .x-tab-left{background:url(../images/default/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom left;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{background:url(../images/default/tabs/tab-btm-right-bg.gif) no-repeat bottom left;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left{background:url(../images/default/tabs/tab-btm-left-bg.gif) no-repeat bottom right;} +.x-tab-strip-bottom .x-tab-left{padding:0 10px;} +.x-tab-strip-bottom .x-tab-right{padding:0;} +.x-tab-strip .x-tab-strip-close{display:none;} +.x-tab-strip-closable{position:relative;} +.x-tab-strip-closable .x-tab-left{padding-right:19px;} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close{background-image:url(../images/default/tabs/tab-close.gif);opacity:.6;-moz-opacity:.6;background-repeat:no-repeat;display:block;width:11px;height:11px;position:absolute;top:3px;right:3px;cursor:pointer;z-index:2;} +.x-tab-strip .x-tab-strip-active a.x-tab-strip-close{opacity:.8;-moz-opacity:.8;} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{background-image:url(../images/default/tabs/tab-close.gif);opacity:1;-moz-opacity:1;} +.x-tab-panel-body{border:1px solid #8db2e3;background:#fff;} +.x-tab-panel-body-top{border-top:0 none;} +.x-tab-panel-body-bottom{border-bottom:0 none;} +.x-tab-scroller-left{background:transparent url(../images/default/tabs/scroll-left.gif) no-repeat -18px 0;border-bottom:1px solid #8db2e3;width:18px;position:absolute;left:0;top:0;z-index:10;cursor:pointer;} +.x-tab-scroller-left-over{background-position:0 0;} +.x-tab-scroller-left-disabled{background-position:-18px 0;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);cursor:default;} +.x-tab-scroller-right{background:transparent url(../images/default/tabs/scroll-right.gif) no-repeat 0 0;border-bottom:1px solid #8db2e3;width:18px;position:absolute;right:0;top:0;z-index:10;cursor:pointer;} +.x-tab-scroller-right-over{background-position:-18px 0;} +.x-tab-scroller-right-disabled{background-position:0 0;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);cursor:default;} +.x-tab-scrolling .x-tab-strip-wrap{margin-left:18px;margin-right:18px;} +.x-tab-scrolling{position:relative;} +.x-tab-panel-bbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} +.x-tab-panel-tbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} + + .x-form-field{margin:0;font:normal 12px tahoma,arial,helvetica,sans-serif;} +.x-form-text,textarea.x-form-field{padding:1px 3px;background:#fff url(../images/default/form/text-bg.gif) repeat-x 0 0;border:1px solid #B5B8C8;} +.x-form-text{height:22px;line-height:18px;vertical-align:middle;} +.ext-ie .x-form-text{margin-top:-1px;margin-bottom:-1px;height:22px;line-height:18px;} +.ext-strict .x-form-text{height:18px;} +.ext-safari .x-form-text{height:20px;padding:0 3px;} +.ext-gecko .x-form-text{padding-top:2px;padding-bottom:0;} +.x-form-select-one{height:20px;line-height:18px;vertical-align:middle;background-color:#fff;border:1px solid #B5B8C8;} +.x-form-field-wrap{position:relative;zoom:1;white-space:nowrap;} +.x-editor .x-form-check-wrap{background:#fff;} +.x-form-field-wrap .x-form-trigger{width:17px;height:21px;border:0;background:transparent url(../images/default/form/trigger.gif) no-repeat 0 0;cursor:pointer;border-bottom:1px solid #B5B8C8;position:absolute;top:0;} +.ext-safari .x-form-field-wrap .x-form-trigger{height:21px;} +.x-form-field-wrap .x-form-date-trigger{background-image:url(../images/default/form/date-trigger.gif);cursor:pointer;} +.x-form-field-wrap .x-form-clear-trigger{background-image:url(../images/default/form/clear-trigger.gif);cursor:pointer;} +.x-form-field-wrap .x-form-search-trigger{background-image:url(../images/default/form/search-trigger.gif);cursor:pointer;} +.ext-safari .x-form-field-wrap .x-form-trigger{right:0;} +.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{position:static;top:auto;vertical-align:top;} +.x-form-field-wrap .x-form-trigger-over{background-position:-17px 0;} +.x-form-field-wrap .x-form-trigger-click{background-position:-34px 0;} +.x-trigger-wrap-focus .x-form-trigger{background-position:-51px 0;} +.x-trigger-wrap-focus .x-form-trigger-over{background-position:-68px 0;} +.x-trigger-wrap-focus .x-form-trigger-click{background-position:-85px 0;} +.x-trigger-wrap-focus .x-form-trigger{border-bottom:1px solid #7eadd9;} +.x-item-disabled .x-form-trigger-over{background-position:0 0!important;border-bottom:1px solid #B5B8C8;} +.x-item-disabled .x-form-trigger-click{background-position:0 0!important;border-bottom:1px solid #B5B8C8;} +.x-form-focus,textarea.x-form-focus{border:1px solid #7eadd9;} +.x-form-invalid,textarea.x-form-invalid{background:#fff url(../images/default/grid/invalid_line.gif) repeat-x bottom;border:1px solid #dd7870;} +.ext-safari .x-form-invalid{background-color:#fee;border:1px solid #ff7870;} +.x-editor{visibility:hidden;padding:0;margin:0;} +.x-form-check-wrap{line-height:18px;} +.ext-ie .x-form-check-wrap input{width:15px;height:15px;} +.x-editor .x-form-check-wrap{padding:3px;} +.x-editor .x-form-checkbox{height:13px;} +.x-form-grow-sizer{font:normal 12px tahoma,arial,helvetica,sans-serif;left:-10000px;padding:8px 3px;position:absolute;visibility:hidden;top:-10000px;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;zoom:1;} +.x-form-grow-sizer p{margin:0!important;border:0 none!important;padding:0!important;} +.x-form-item{font:normal 12px tahoma,arial,helvetica,sans-serif;display:block;margin-bottom:4px;} +.x-form-item label{display:block;float:left;width:100px;padding:3px;padding-left:0;clear:left;z-index:2;position:relative;} +.x-form-element{padding-left:105px;position:relative;} +.x-form-invalid-msg{color:#e00;padding:2px;padding-left:18px;font:normal 11px tahoma,arial,helvetica,sans-serif;background:transparent url(../images/default/shared/warning.gif) no-repeat 0 2px;line-height:16px;width:200px;} +.x-form-label-right label{text-align:right;} +.x-form-label-top .x-form-item label{width:auto;float:none;clear:none;display:inline;margin-bottom:4px;position:static;} +.x-form-label-top .x-form-element{padding-left:0;padding-top:4px;} +.x-form-label-top .x-form-item{padding-bottom:4px;} +.x-form-empty-field{color:gray;} +.x-small-editor .x-form-field{font:normal 11px arial,tahoma,helvetica,sans-serif;} +.x-small-editor .x-form-text{height:20px;line-height:16px;vertical-align:middle;} +.ext-ie .x-small-editor .x-form-text{margin-top:-1px!important;margin-bottom:-1px!important;height:20px!important;line-height:16px!important;} +.ext-strict .x-small-editor .x-form-text{height:16px!important;} +.ext-safari .x-small-editor .x-form-field{font:normal 12px arial,tahoma,helvetica,sans-serif;} +.ext-ie .x-small-editor .x-form-text{height:20px;line-height:16px;} +.ext-border-box .x-small-editor .x-form-text{height:20px;} +.x-small-editor .x-form-select-one{height:20px;line-height:16px;vertical-align:middle;} +.x-small-editor .x-form-num-field{text-align:right;} +.x-small-editor .x-form-field-wrap .x-form-trigger{height:19px;} +.x-form-clear{clear:both;height:0;overflow:hidden;line-height:0;font-size:0;} +.x-form-clear-left{clear:left;height:0;overflow:hidden;line-height:0;font-size:0;} +.x-form-cb-label{width:'auto'!important;float:none!important;clear:none!important;display:inline!important;margin-left:4px;} +.x-form-column{float:left;padding:0;margin:0;width:48%;overflow:hidden;zoom:1;} +.x-form .x-form-btns-ct .x-btn{float:right;clear:none;} +.x-form .x-form-btns-ct .x-form-btns td{border:0;padding:0;} +.x-form .x-form-btns-ct .x-form-btns-right table{float:right;clear:none;} +.x-form .x-form-btns-ct .x-form-btns-left table{float:left;clear:none;} +.x-form .x-form-btns-ct .x-form-btns-center{text-align:center;} +.x-form .x-form-btns-ct .x-form-btns-center table{margin:0 auto;} +.x-form .x-form-btns-ct table td.x-form-btn-td{padding:3px;} +.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{background-position:0 -147px;} +.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{background-position:0 -168px;} +.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{background-position:0 -189px;} +.x-form .x-form-btns-ct .x-btn-click .x-btn-center{background-position:0 -126px;} +.x-form .x-form-btns-ct .x-btn-click .x-btn-right{background-position:0 -84px;} +.x-form .x-form-btns-ct .x-btn-click .x-btn-left{background-position:0 -63px;} +.x-form-invalid-icon{width:16px;height:18px;visibility:hidden;position:absolute;left:0;top:0;display:block;background:transparent url(../images/default/form/exclamation.gif) no-repeat 0 2px;} +.x-fieldset{border:1px solid #B5B8C8;padding:10px;margin-bottom:10px;} +.x-fieldset legend{font:bold 11px tahoma,arial,helvetica,sans-serif;color:#15428b;} +.ext-ie .x-fieldset legend{margin-bottom:10px;} +.ext-ie .x-fieldset{padding-top:0;padding-bottom:5px;} +.x-fieldset legend .x-tool-toggle{margin-right:3px;margin-left:0;float:left!important;} +.x-fieldset legend input{margin-right:3px;float:left!important;height:13px;width:13px;} +fieldset.x-panel-collapsed{padding-bottom:0!important;border-width:1px 0 0 0!important;} +fieldset.x-panel-collapsed .x-fieldset-bwrap{visibility:hidden;position:absolute;left:-1000px;top:-1000px;} +.ext-ie .x-fieldset-bwrap{zoom:1;} +.ext-ie td .x-form-text{position:relative;top:-1px;} +.ext-gecko .x-window-body .x-form-item{-moz-outline:none;overflow:auto;} +.ext-gecko .x-form-item{-moz-outline:none;} +.x-hide-label label.x-form-item-label{display:none;} +.x-hide-label .x-form-element{padding-left:0!important;} + +.x-btn{font:normal 11px tahoma,verdana,helvetica;cursor:pointer;white-space:nowrap;} +.x-btn button{border:0 none;background:transparent;font:normal 11px tahoma,verdana,helvetica;padding-left:3px;padding-right:3px;cursor:pointer;margin:0;overflow:visible;width:auto;-moz-outline:0 none;outline:0 none;} +* html .ext-ie .x-btn button{width:1px;} +.ext-gecko .x-btn button{padding-left:0;padding-right:0;} +.ext-ie .x-btn button{padding-top:2px;} +.x-btn-icon .x-btn-center .x-btn-text{background-position:center;background-repeat:no-repeat;height:16px;width:16px;cursor:pointer;white-space:nowrap;padding:0;} +.x-btn-icon .x-btn-center{padding:1px;} +.x-btn em{font-style:normal;font-weight:normal;} +.x-btn-text-icon .x-btn-center .x-btn-text{background-position:0 2px;background-repeat:no-repeat;padding-left:18px;padding-top:3px;padding-bottom:2px;padding-right:0;} +.x-btn-left,.x-btn-right{font-size:1px;line-height:1px;} +.x-btn-left{width:3px;height:21px;background:url(../images/default/button/btn-sprite.gif) no-repeat 0 0;} +.x-btn-right{width:3px;height:21px;background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -21px;} +.x-btn-left i,.x-btn-right i{display:block;width:3px;overflow:hidden;font-size:1px;line-height:1px;} +.x-btn-center{background:url(../images/default/button/btn-sprite.gif) repeat-x 0 -42px;vertical-align:middle;text-align:center;padding:0 5px;cursor:pointer;white-space:nowrap;} +.x-btn-over .x-btn-left{background-position:0 -63px;} +.x-btn-over .x-btn-right{background-position:0 -84px;} +.x-btn-over .x-btn-center{background-position:0 -105px;} +.x-btn-click .x-btn-center,.x-btn-menu-active .x-btn-center{background-position:0 -126px;} +.x-btn-disabled *{color:gray!important;cursor:default!important;} +.x-btn-menu-text-wrap .x-btn-center{padding:0 3px;} +.ext-gecko .x-btn-menu-text-wrap .x-btn-center{padding:0 1px;} +.x-btn-menu-arrow-wrap .x-btn-center{padding:0;} +.x-btn-menu-arrow-wrap .x-btn-center button{width:12px!important;height:21px;padding:0!important;display:block;background:transparent url(../images/default/button/btn-arrow.gif) no-repeat left 3px;} +.x-btn-with-menu .x-btn-center{padding-right:2px!important;} +.x-btn-with-menu .x-btn-center em{display:block;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 0;padding-right:10px;} +.x-btn-text-icon .x-btn-with-menu .x-btn-center em{display:block;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat right 3px;padding-right:10px;} +.x-btn-pressed .x-btn-left{background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -63px;} +.x-btn-pressed .x-btn-right{background:url(../images/default/button/btn-sprite.gif) no-repeat 0 -84px;} +.x-btn-pressed .x-btn-center{background:url(../images/default/button/btn-sprite.gif) repeat-x 0 -126px;} + +.x-toolbar{border-color:#a9bfd3;border-style:solid;border-width:0 0 1px 0;display:block;padding:2px;background:#d0def0 url(../images/default/toolbar/bg.gif) repeat-x top left;position:relative;zoom:1;} +.x-toolbar .x-item-disabled .x-btn-icon{opacity:.35;-moz-opacity:.35;filter:alpha(opacity=35);} +.x-toolbar td{vertical-align:middle;} +.mso .x-toolbar,.x-grid-mso .x-toolbar{border:0 none;background:url(../images/default/grid/mso-hd.gif);} +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{white-space:nowrap;font:normal 11px tahoma,arial,helvetica,sans-serif;} +.x-toolbar .x-item-disabled{color:gray;cursor:default;opacity:.6;-moz-opacity:.6;filter:alpha(opacity=60);} +.x-toolbar .x-item-disabled *{color:gray;cursor:default;} +.x-toolbar .x-btn-left{background:none;} +.x-toolbar .x-btn-right{background:none;} +.x-toolbar .x-btn-center{background:none;padding:0;} +.x-toolbar .x-btn-menu-text-wrap .x-btn-center button{padding-right:2px;} +.ext-gecko .x-toolbar .x-btn-menu-text-wrap .x-btn-center button{padding-right:0;} +.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{padding:0 2px;} +.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{width:12px;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px;} +.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button{width:12px;background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px;} +.x-toolbar .x-btn-over .x-btn-menu-arrow-wrap .x-btn-center button{background-position:0 -47px;} +.x-toolbar .x-btn-over .x-btn-left{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 0;} +.x-toolbar .x-btn-over .x-btn-right{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px;} +.x-toolbar .x-btn-over .x-btn-center{background:url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px;} +.x-toolbar .x-btn-click .x-btn-left,.x-toolbar .x-btn-pressed .x-btn-left,.x-toolbar .x-btn-menu-active .x-btn-left{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px;} +.x-toolbar .x-btn-click .x-btn-right,.x-toolbar .x-btn-pressed .x-btn-right,.x-toolbar .x-btn-menu-active .x-btn-right{background:url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px;} +.x-toolbar .x-btn-click .x-btn-center,.x-toolbar .x-btn-pressed .x-btn-center,.x-toolbar .x-btn-menu-active .x-btn-center{background:url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px;} +.x-toolbar .x-btn-with-menu .x-btn-center em{padding-right:8px;} +.x-toolbar .ytb-text{padding:2px;} +.x-toolbar .ytb-sep{background-image:url(../images/default/grid/grid-blue-split.gif);background-position:center;background-repeat:no-repeat;display:block;font-size:1px;height:16px;width:4px;overflow:hidden;cursor:default;margin:0 2px 0;border:0;} +.x-toolbar .ytb-spacer{width:2px;} +.x-tbar-page-number{width:24px;height:14px;} +.x-tbar-page-first{background-image:url(../images/default/grid/page-first.gif)!important;} +.x-tbar-loading{background-image:url(../images/default/grid/done.gif)!important;} +.x-tbar-page-last{background-image:url(../images/default/grid/page-last.gif)!important;} +.x-tbar-page-next{background-image:url(../images/default/grid/page-next.gif)!important;} +.x-tbar-page-prev{background-image:url(../images/default/grid/page-prev.gif)!important;} +.x-item-disabled .x-tbar-loading{background-image:url(../images/default/grid/loading.gif)!important;} +.x-item-disabled .x-tbar-page-first{background-image:url(../images/default/grid/page-first-disabled.gif)!important;} +.x-item-disabled .x-tbar-page-last{background-image:url(../images/default/grid/page-last-disabled.gif)!important;} +.x-item-disabled .x-tbar-page-next{background-image:url(../images/default/grid/page-next-disabled.gif)!important;} +.x-item-disabled .x-tbar-page-prev{background-image:url(../images/default/grid/page-prev-disabled.gif)!important;} +.x-paging-info{position:absolute;top:5px;right:8px;color:#444;} + +.x-resizable-handle{position:absolute;z-index:100;font-size:1px;line-height:6px;overflow:hidden;background:white;filter:alpha(opacity=0);opacity:0;zoom:1;} +.x-resizable-handle-east{width:6px;cursor:e-resize;right:0;top:0;height:100%;} +.ext-ie .x-resizable-handle-east{margin-right:-1px;} +.x-resizable-handle-south{width:100%;cursor:s-resize;left:0;bottom:0;height:6px;} +.ext-ie .x-resizable-handle-south{margin-bottom:-1px;} +.x-resizable-handle-west{width:6px;cursor:w-resize;left:0;top:0;height:100%;} +.x-resizable-handle-north{width:100%;cursor:n-resize;left:0;top:0;height:6px;} +.x-resizable-handle-southeast{width:6px;cursor:se-resize;right:0;bottom:0;height:6px;z-index:101;} +.x-resizable-handle-northwest{width:6px;cursor:nw-resize;left:0;top:0;height:6px;z-index:101;} +.x-resizable-handle-northeast{width:6px;cursor:ne-resize;right:0;top:0;height:6px;z-index:101;} +.x-resizable-handle-southwest{width:6px;cursor:sw-resize;left:0;bottom:0;height:6px;z-index:101;} +.x-resizable-over .x-resizable-handle,.x-resizable-pinned .x-resizable-handle{filter:alpha(opacity=100);opacity:1;} +.x-resizable-over .x-resizable-handle-east,.x-resizable-pinned .x-resizable-handle-east{background:url(../images/default/sizer/e-handle.gif);background-position:left;} +.x-resizable-over .x-resizable-handle-west,.x-resizable-pinned .x-resizable-handle-west{background:url(../images/default/sizer/e-handle.gif);background-position:left;} +.x-resizable-over .x-resizable-handle-south,.x-resizable-pinned .x-resizable-handle-south{background:url(../images/default/sizer/s-handle.gif);background-position:top;} +.x-resizable-over .x-resizable-handle-north,.x-resizable-pinned .x-resizable-handle-north{background:url(../images/default/sizer/s-handle.gif);background-position:top;} +.x-resizable-over .x-resizable-handle-southeast,.x-resizable-pinned .x-resizable-handle-southeast{background:url(../images/default/sizer/se-handle.gif);background-position:top left;} +.x-resizable-over .x-resizable-handle-northwest,.x-resizable-pinned .x-resizable-handle-northwest{background:url(../images/default/sizer/nw-handle.gif);background-position:bottom right;} +.x-resizable-over .x-resizable-handle-northeast,.x-resizable-pinned .x-resizable-handle-northeast{background:url(../images/default/sizer/ne-handle.gif);background-position:bottom left;} +.x-resizable-over .x-resizable-handle-southwest,.x-resizable-pinned .x-resizable-handle-southwest{background:url(../images/default/sizer/sw-handle.gif);background-position:top right;} +.x-resizable-proxy{border:1px dashed #3b5a82;position:absolute;overflow:hidden;display:none;left:0;top:0;z-index:50000;} +.x-resizable-overlay{width:100%;height:100%;display:none;position:absolute;left:0;top:0;background:white;z-index:200000;-moz-opacity:0;opacity:0;filter:alpha(opacity=0);} + + .x-grid3{position:relative;overflow:hidden;background-color:#fff;} +.x-grid-panel .x-panel-body{overflow:hidden!important;} +.x-grid-panel .x-panel-mc .x-panel-body{border:1px solid #99bbe8;} +.ext-ie .x-grid3 table,.ext-safari .x-grid3 table{table-layout:fixed;} +.x-grid3-viewport{overflow:hidden;} +.x-grid3-hd-row td,.x-grid3-row td,.x-grid3-summary-row td{font:normal 11px arial,tahoma,helvetica,sans-serif;-moz-outline:none;-moz-user-focus:normal;} +.x-grid3-row td,.x-grid3-summary-row td{line-height:13px;vertical-align:top;padding-left:1px;padding-right:1px;-moz-user-select:none;} +.x-grid3-hd-row td{line-height:15px;vertical-align:middle;border-left:1px solid #eee;border-right:1px solid #d0d0d0;} +.x-grid3-hd-row .x-grid3-marker-hd{padding:3px;} +.x-grid3-row .x-grid3-marker{padding:3px;} +.x-grid3-cell-inner,.x-grid3-hd-inner{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;padding:3px 3px 3px 5px;white-space:nowrap;} +.x-grid3-hd-inner{position:relative;cursor:inherit;padding:4px 3px 4px 5px;} +.x-grid3-row-body{white-space:normal;} +.x-grid3-body-cell{-moz-outline:0 none;outline:0 none;} +.ext-ie .x-grid3-cell-inner,.ext-ie .x-grid3-hd-inner{width:100%;} +.ext-strict .x-grid3-cell-inner,.ext-strict .x-grid3-hd-inner{width:auto;} +.x-grid-row-loading{background:#fff url(../images/default/shared/loading-balls.gif) no-repeat center center;} +.x-grid-page{overflow:hidden;} +.x-grid3-row{cursor:default;border:1px solid #ededed;border-top-color:#fff;width:100%;} +.x-grid3-row-alt{background-color:#fafafa;} +.x-grid3-row-over{border:1px solid #ddd;background:#efefef url(../images/default/grid/row-over.gif) repeat-x left top;} +.x-grid3-resize-proxy{width:1px;left:0;background-color:#777;cursor:e-resize;cursor:col-resize;position:absolute;top:0;height:100px;overflow:hidden;visibility:hidden;border:0 none;z-index:7;} +.x-grid3-resize-marker{width:1px;left:0;background-color:#777;position:absolute;top:0;height:100px;overflow:hidden;visibility:hidden;border:0 none;z-index:7;} +.x-grid3-focus{position:absolute;top:0;-moz-outline:0 none;outline:0 none;-moz-user-select:normal;-khtml-user-select:normal;} +.x-grid3-header{background:#f9f9f9 url(../images/default/grid/grid3-hrow.gif) repeat-x 0 bottom;cursor:default;zoom:1;padding:1px 0 0 0;} +.x-grid3-header-pop{border-left:1px solid #d0d0d0;float:right;clear:none;} +.x-grid3-header-pop-inner{border-left:1px solid #eee;width:14px;height:19px;background:transparent url(../images/default/grid/hd-pop.gif) no-repeat center center;} +.ext-ie .x-grid3-header-pop-inner{width:15px;} +.ext-strict .x-grid3-header-pop-inner{width:14px;} +.x-grid3-header-inner{overflow:hidden;zoom:1;float:left;} +.x-grid3-header-offset{padding-left:1px;width:10000px;} +td.x-grid3-hd-over,td.sort-desc,td.sort-asc,td.x-grid3-hd-menu-open{border-left:1px solid #aaccf6;border-right:1px solid #aaccf6;} +td.x-grid3-hd-over .x-grid3-hd-inner,td.sort-desc .x-grid3-hd-inner,td.sort-asc .x-grid3-hd-inner,td.x-grid3-hd-menu-open .x-grid3-hd-inner{background:#ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom;} +.x-grid3-sort-icon{background-repeat:no-repeat;display:none;height:4px;width:13px;margin-left:3px;vertical-align:middle;} +.sort-asc .x-grid3-sort-icon{background-image:url(../images/default/grid/sort_asc.gif);display:inline;} +.sort-desc .x-grid3-sort-icon{background-image:url(../images/default/grid/sort_desc.gif);display:inline;} +.ext-strict .ext-ie .x-grid3-header-inner{position:relative;} +.ext-strict .ext-ie6 .x-grid3-hd{position:relative;} +.ext-strict .ext-ie6 .x-grid3-hd-inner{position:static;} +.x-grid3-body{zoom:1;} +.x-grid3-scroller{overflow:auto;zoom:1;position:relative;} +.x-grid3-cell-text,.x-grid3-hd-text{display:block;padding:3px 5px 3px 5px;-moz-user-select:none;-khtml-user-select:none;color:black;} +.x-grid3-split{background-image:url(../images/default/grid/grid-split.gif);background-position:center;background-repeat:no-repeat;cursor:e-resize;cursor:col-resize;display:block;font-size:1px;height:16px;overflow:hidden;position:absolute;top:2px;width:6px;z-index:3;} +.x-grid3-hd-text{color:#15428b;} +.x-dd-drag-proxy .x-grid3-hd-inner{background:#ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom;width:120px;padding:3px;border:1px solid #aaccf6;overflow:hidden;} +.col-move-top,.col-move-bottom{width:9px;height:9px;position:absolute;top:0;line-height:1px;font-size:1px;overflow:hidden;visibility:hidden;z-index:20000;} +.col-move-top{background:transparent url(../images/default/grid/col-move-top.gif) no-repeat left top;} +.col-move-bottom{background:transparent url(../images/default/grid/col-move-bottom.gif) no-repeat left top;} +.x-grid3-row-selected{background:#DFE8F6!important;border:1px dotted #a3bae9;} +.x-grid3-cell-selected{background-color:#B8CFEE!important;color:black;} +.x-grid3-cell-selected span{color:black!important;} +.x-grid3-cell-selected .x-grid3-cell-text{color:black;} +.x-grid3-locked td.x-grid3-row-marker,.x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{background:#ebeadb url(../images/default/grid/grid-hrow.gif) repeat-x 0 bottom!important;vertical-align:middle!important;color:black;padding:0;border-top:1px solid white;border-bottom:none!important;border-right:1px solid #6fa0df!important;text-align:center;} +.x-grid3-locked td.x-grid3-row-marker div,.x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{padding:0 4px;color:#15428b!important;text-align:center;} +.x-grid3-dirty-cell{background:transparent url(../images/default/grid/dirty.gif) no-repeat 0 0;} +.x-grid3-topbar,.x-grid3-bottombar{font:normal 11px arial,tahoma,helvetica,sans-serif;overflow:hidden;display:none;zoom:1;position:relative;} +.x-grid3-topbar .x-toolbar{border-right:0 none;} +.x-grid3-bottombar .x-toolbar{border-right:0 none;border-bottom:0 none;border-top:1px solid #a9bfd3;} +.x-props-grid .x-grid3-cell{padding:1px;} +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y -16px!important;padding-left:12px;color:black!important;} +.x-props-grid .x-grid3-body .x-grid3-td-name{padding:1px;padding-right:0;background:white!important;border:0 none;border-right:1px solid #eee;} +.xg-hmenu-sort-asc .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-asc.gif);} +.xg-hmenu-sort-desc .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-desc.gif);} +.xg-hmenu-lock .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-lock.gif);} +.xg-hmenu-unlock .x-menu-item-icon{background-image:url(../images/default/grid/hmenu-unlock.gif);} +.x-grid3-col-dd{border:0 none;padding:0;background:transparent;} +.x-dd-drag-ghost .x-grid3-dd-wrap{padding:1px 3px 3px 1px;} +.x-grid3-hd{-moz-user-select:none;} +.x-grid3-hd-btn{display:none;position:absolute;width:14px;background:#c3daf9 url(../images/default/grid/grid3-hd-btn.gif) no-repeat left center;right:0;top:0;z-index:2;cursor:pointer;} +.x-grid3-hd-over .x-grid3-hd-btn,.x-grid3-hd-menu-open .x-grid3-hd-btn{display:block;} +a.x-grid3-hd-btn:hover{background-position:-14px center;} +.x-grid3-body .x-grid3-td-expander{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right;} +.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner{padding:0!important;height:100%;} +.x-grid3-row-expander{width:100%;height:18px;background-position:4px 2px;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/grid/row-expand-sprite.gif);} +.x-grid3-row-collapsed .x-grid3-row-expander{background-position:4px 2px;} +.x-grid3-row-expanded .x-grid3-row-expander{background-position:-21px 2px;} +.x-grid3-row-collapsed .x-grid3-row-body{display:none!important;} +.x-grid3-row-expanded .x-grid3-row-body{display:block!important;} +.x-grid3-body .x-grid3-td-checker{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right;} +.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner,.x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner{padding:0!important;height:100%;} +.x-grid3-row-checker,.x-grid3-hd-checker{width:100%;height:18px;background-position:2px 2px;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/grid/row-check-sprite.gif);} +.x-grid3-row .x-grid3-row-checker{background-position:2px 2px;} +.x-grid3-row-selected .x-grid3-row-checker,.x-grid3-hd-checker-on .x-grid3-hd-checker{background-position:-23px 2px;} +.x-grid3-hd-checker{background-position:2px 3px;} +.x-grid3-hd-checker-on .x-grid3-hd-checker{background-position:-23px 3px;} +.x-grid3-body .x-grid3-td-numberer{background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right;} +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner{padding:3px 5px 0 0!important;text-align:right;color:#444;} +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer,.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker,.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander{background:transparent url(../images/default/grid/grid3-special-col-sel-bg.gif) repeat-y right;} +.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner{padding:1px 0 0 0!important;} +.x-grid3-check-col{width:100%;height:16px;background-position:center center;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/menu/unchecked.gif);} +.x-grid3-check-col-on{width:100%;height:16px;background-position:center center;background-repeat:no-repeat;background-color:transparent;background-image:url(../images/default/menu/checked.gif);} +.x-grid-group,.x-grid-group-body,.x-grid-group-hd{zoom:1;} +.x-grid-group-hd{border-bottom:2px solid #99bbe8;cursor:pointer;padding-top:6px;} +.x-grid-group-hd div{background:transparent url(../images/default/grid/group-expand-sprite.gif) no-repeat 3px -47px;padding:4px 4px 4px 17px;color:#3764a0;font:bold 11px tahoma,arial,helvetica,sans-serif;} +.x-grid-group-collapsed .x-grid-group-hd div{background-position:3px 3px;} +.x-grid-group-collapsed .x-grid-group-body{display:none;} +.x-group-by-icon{background-image:url(../images/default/grid/group-by.gif);} +.x-cols-icon{background-image:url(../images/default/grid/columns.gif);} +.x-show-groups-icon{background-image:url(../images/default/grid/group-by.gif);} +.ext-ie .x-grid3 .x-editor .x-form-text{position:relative;top:-1px;} +.x-grid-empty{padding:10px;color:gray;font:normal 11px tahoma,arial,helvetica,sans-serif;} + +.x-dd-drag-proxy{position:absolute;left:0;top:0;visibility:hidden;z-index:15000;} +.x-dd-drag-ghost{color:black;font:normal 11px arial,helvetica,sans-serif;-moz-opacity:0.85;opacity:.85;filter:alpha(opacity=85);border-top:1px solid #ddd;border-left:1px solid #ddd;border-right:1px solid #bbb;border-bottom:1px solid #bbb;padding:3px;padding-left:20px;background-color:white;white-space:nowrap;} +.x-dd-drag-repair .x-dd-drag-ghost{-moz-opacity:0.4;opacity:.4;filter:alpha(opacity=40);border:0 none;padding:0;background-color:transparent;} +.x-dd-drag-repair .x-dd-drop-icon{visibility:hidden;} +.x-dd-drop-icon{position:absolute;top:3px;left:3px;display:block;width:16px;height:16px;background-color:transparent;background-position:center;background-repeat:no-repeat;z-index:1;} +.x-dd-drop-nodrop .x-dd-drop-icon{background-image:url(../images/default/dd/drop-no.gif);} +.x-dd-drop-ok .x-dd-drop-icon{background-image:url(../images/default/dd/drop-yes.gif);} +.x-dd-drop-ok-add .x-dd-drop-icon{background-image:url(../images/default/dd/drop-add.gif);} +.x-view-selector{position:absolute;left:0;top:0;width:0;background:#c3daf9;border:1px dotted #39b;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);zoom:1;} + +.x-tree .x-panel-body{background-color:#fff;} +.ext-strict .ext-ie .x-tree .x-panel-bwrap{position:relative;overflow:hidden;} +.x-tree-icon,.x-tree-ec-icon,.x-tree-elbow-line,.x-tree-elbow,.x-tree-elbow-end,.x-tree-elbow-plus,.x-tree-elbow-minus,.x-tree-elbow-end-plus,.x-tree-elbow-end-minus{border:0 none;height:18px;margin:0;padding:0;vertical-align:top;width:16px;background-repeat:no-repeat;} +.x-tree-node-collapsed .x-tree-node-icon,.x-tree-node-expanded .x-tree-node-icon,.x-tree-node-leaf .x-tree-node-icon{border:0 none;height:18px;margin:0;padding:0;vertical-align:top;width:16px;background-position:center;background-repeat:no-repeat;} +.ext-ie .x-tree-node-indent img,.ext-ie .x-tree-node-icon,.ext-ie .x-tree-ec-icon{vertical-align:middle!important;} +.x-tree-node-collapsed .x-tree-node-icon{background-image:url(../images/default/tree/folder.gif);} +.x-tree-node-expanded .x-tree-node-icon{background-image:url(../images/default/tree/folder-open.gif);} +.x-tree-node-leaf .x-tree-node-icon{background-image:url(../images/default/tree/leaf.gif);} +.ext-ie input.x-tree-node-cb{width:15px;height:15px;} +input.x-tree-node-cb{margin-left:1px;} +.ext-ie input.x-tree-node-cb{margin-left:0;} +.x-tree-noicon .x-tree-node-icon{width:0;height:0;} +.x-tree-node-loading .x-tree-node-icon{background-image:url(../images/default/tree/loading.gif)!important;} +.x-tree-node-loading a span{font-style:italic;color:#444;} +.ext-ie .x-tree-node-el input{width:15px;height:15px;} +.x-tree-lines .x-tree-elbow{background-image:url(../images/default/tree/elbow.gif);} +.x-tree-lines .x-tree-elbow-plus{background-image:url(../images/default/tree/elbow-plus.gif);} +.x-tree-lines .x-tree-elbow-minus{background-image:url(../images/default/tree/elbow-minus.gif);} +.x-tree-lines .x-tree-elbow-end{background-image:url(../images/default/tree/elbow-end.gif);} +.x-tree-lines .x-tree-elbow-end-plus{background-image:url(../images/default/tree/elbow-end-plus.gif);} +.x-tree-lines .x-tree-elbow-end-minus{background-image:url(../images/default/tree/elbow-end-minus.gif);} +.x-tree-lines .x-tree-elbow-line{background-image:url(../images/default/tree/elbow-line.gif);} +.x-tree-no-lines .x-tree-elbow{background:transparent;} +.x-tree-no-lines .x-tree-elbow-plus{background-image:url(../images/default/tree/elbow-plus-nl.gif);} +.x-tree-no-lines .x-tree-elbow-minus{background-image:url(../images/default/tree/elbow-minus-nl.gif);} +.x-tree-no-lines .x-tree-elbow-end{background:transparent;} +.x-tree-no-lines .x-tree-elbow-end-plus{background-image:url(../images/default/tree/elbow-end-plus-nl.gif);} +.x-tree-no-lines .x-tree-elbow-end-minus{background-image:url(../images/default/tree/elbow-end-minus-nl.gif);} +.x-tree-no-lines .x-tree-elbow-line{background:transparent;} +.x-tree-elbow-plus,.x-tree-elbow-minus,.x-tree-elbow-end-plus,.x-tree-elbow-end-minus{cursor:pointer;} +.ext-ie ul.x-tree-node-ct{font-size:0;line-height:0;zoom:1;} +.x-tree-node{color:black;font:normal 11px arial,tahoma,helvetica,sans-serif;white-space:nowrap;} +.x-tree-node-el{line-height:18px;cursor:pointer;} +.x-tree-node a,.x-dd-drag-ghost a{text-decoration:none;color:black;-khtml-user-select:none;-moz-user-select:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0 none;} +.x-tree-node a span,.x-dd-drag-ghost a span{text-decoration:none;color:black;padding:1px 3px 1px 2px;} +.x-tree-node .x-tree-node-disabled a span{color:gray!important;} +.x-tree-node .x-tree-node-disabled .x-tree-node-icon{-moz-opacity:0.5;opacity:.5;filter:alpha(opacity=50);} +.x-tree-node .x-tree-node-inline-icon{background:transparent;} +.x-tree-node a:hover,.x-dd-drag-ghost a:hover{text-decoration:none;} +.x-tree-node div.x-tree-drag-insert-below{border-bottom:1px dotted #36c;} +.x-tree-node div.x-tree-drag-insert-above{border-top:1px dotted #36c;} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{border-bottom:0 none;} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{border-top:0 none;} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{border-bottom:2px solid #36c;} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{border-top:2px solid #36c;} +.x-tree-node .x-tree-drag-append a span{background:#ddd;border:1px dotted gray;} +.x-tree-node .x-tree-node-over{background-color:#eee;} +.x-tree-node .x-tree-selected{background-color:#d9e8fb;} +.x-dd-drag-ghost .x-tree-node-indent,.x-dd-drag-ghost .x-tree-ec-icon{display:none!important;} +.x-tree-drop-ok-append .x-dd-drop-icon{background-image:url(../images/default/tree/drop-add.gif);} +.x-tree-drop-ok-above .x-dd-drop-icon{background-image:url(../images/default/tree/drop-over.gif);} +.x-tree-drop-ok-below .x-dd-drop-icon{background-image:url(../images/default/tree/drop-under.gif);} +.x-tree-drop-ok-between .x-dd-drop-icon{background-image:url(../images/default/tree/drop-between.gif);} + +.x-date-picker{border:1px solid #1b376c;border-top:0 none;background:#fff;position:relative;} +.x-date-picker a{-moz-outline:0 none;outline:0 none;} +.x-date-inner,.x-date-inner td,.x-date-inner th{border-collapse:separate;} +.x-date-middle,.x-date-left,.x-date-right{background:url(../images/default/shared/hd-sprite.gif) repeat-x 0 -83px;color:#FFF;font:bold 11px "sans serif",tahoma,verdana,helvetica;overflow:hidden;} +.x-date-middle .x-btn-left,.x-date-middle .x-btn-center,.x-date-middle .x-btn-right{background:transparent!important;vertical-align:middle;} +.x-date-middle .x-btn .x-btn-text{color:#fff;} +.x-date-middle .x-btn-with-menu .x-btn-center em{background:transparent url(../images/default/toolbar/btn-arrow-light.gif) no-repeat right 0;} +.x-date-right,.x-date-left{width:18px;} +.x-date-right{text-align:right;} +.x-date-middle{padding-top:2px;padding-bottom:2px;} +.x-date-right a,.x-date-left a{display:block;width:16px;height:16px;background-position:center;background-repeat:no-repeat;cursor:pointer;-moz-opacity:0.6;opacity:.6;filter:alpha(opacity=60);} +.x-date-right a:hover,.x-date-left a:hover{-moz-opacity:1;opacity:1;filter:alpha(opacity=100);} +.x-date-right a{background-image:url(../images/default/shared/right-btn.gif);margin-right:2px;text-decoration:none!important;} +.x-date-left a{background-image:url(../images/default/shared/left-btn.gif);margin-left:2px;text-decoration:none!important;} +table.x-date-inner{width:100%;table-layout:fixed;} +.x-date-inner th{width:25px;} +.x-date-inner th{background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;text-align:right!important;border-bottom:1px solid #a3bad9;font:normal 10px arial,helvetica,tahoma,sans-serif;color:#233d6d;cursor:default;padding:0;border-collapse:separate;} +.x-date-inner th span{display:block;padding:2px;padding-right:7px;} +.x-date-inner td{border:1px solid #fff;text-align:right;padding:0;} +.x-date-inner a{padding:2px 5px;display:block;font:normal 11px arial,helvetica,tahoma,sans-serif;text-decoration:none;color:black;text-align:right;zoom:1;} +.x-date-inner .x-date-active{cursor:pointer;color:black;} +.x-date-inner .x-date-selected a{background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;border:1px solid #8db2e3;padding:1px 4px;} +.x-date-inner .x-date-today a{border:1px solid darkred;padding:1px 4px;} +.x-date-inner .x-date-selected span{font-weight:bold;} +.x-date-inner .x-date-prevday a,.x-date-inner .x-date-nextday a{color:#aaa;text-decoration:none!important;} +.x-date-bottom{padding:4px;border-top:1px solid #a3bad9;background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;} +.x-date-inner a:hover,.x-date-inner .x-date-disabled a:hover{text-decoration:none!important;color:black;background:#ddecfe;} +.x-date-inner .x-date-disabled a{cursor:default;background:#eee;color:#bbb;} +.x-date-mmenu{background:#eee!important;} +.x-date-mmenu .x-menu-item{font-size:10px;padding:1px 24px 1px 4px;white-space:nowrap;color:#000;} +.x-date-mmenu .x-menu-item .x-menu-item-icon{width:10px;height:10px;margin-right:5px;background-position:center -4px!important;} +.x-date-mp{position:absolute;left:0;top:0;background:white;display:none;} +.x-date-mp td{padding:2px;font:normal 11px arial,helvetica,tahoma,sans-serif;} +td.x-date-mp-month,td.x-date-mp-year,td.x-date-mp-ybtn{border:0 none;text-align:center;vertical-align:middle;width:25%;} +.x-date-mp-ok{margin-right:3px;} +.x-date-mp-btns button{text-decoration:none;text-align:center;text-decoration:none!important;background:#083772;color:white;border:1px solid;border-color:#36c #005 #005 #36c;padding:1px 3px 1px;font:normal 11px arial,helvetica,tahoma,sans-serif;cursor:pointer;} +.x-date-mp-btns{background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;} +.x-date-mp-btns td{border-top:1px solid #c5d2df;text-align:center;} +td.x-date-mp-month a,td.x-date-mp-year a{display:block;padding:2px 4px;text-decoration:none;text-align:center;color:#15428b;} +td.x-date-mp-month a:hover,td.x-date-mp-year a:hover{color:#15428b;text-decoration:none;cursor:pointer;background:#ddecfe;} +td.x-date-mp-sel a{padding:1px 3px;background:#dfecfb url(../images/default/shared/glass-bg.gif) repeat-x left top;border:1px solid #8db2e3;} +.x-date-mp-ybtn a{overflow:hidden;width:15px;height:15px;cursor:pointer;background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat;display:block;margin:0 auto;} +.x-date-mp-ybtn a.x-date-mp-next{background-position:0 -120px;} +.x-date-mp-ybtn a.x-date-mp-next:hover{background-position:-15px -120px;} +.x-date-mp-ybtn a.x-date-mp-prev{background-position:0 -105px;} +.x-date-mp-ybtn a.x-date-mp-prev:hover{background-position:-15px -105px;} +.x-date-mp-ybtn{text-align:center;} +td.x-date-mp-sep{border-right:1px solid #c5d2df;} + +.x-tip{position:absolute;top:0;left:0;visibility:hidden;z-index:20000;border:0 none;} +.x-tip .x-tip-close{background-image:url(../images/default/qtip/close.gif);height:15px;float:right;width:15px;margin:0 0 2px 2px;cursor:pointer;display:none;} +.x-tip .x-tip-tc{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -62px;padding-top:3px;overflow:hidden;zoom:1;} +.x-tip .x-tip-tl{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 0;padding-left:6px;overflow:hidden;zoom:1;} +.x-tip .x-tip-tr{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right 0;padding-right:6px;overflow:hidden;zoom:1;} +.x-tip .x-tip-bc{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -121px;height:3px;overflow:hidden;} +.x-tip .x-tip-bl{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -59px;padding-left:6px;zoom:1;} +.x-tip .x-tip-br{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -59px;padding-right:6px;zoom:1;} +.x-tip .x-tip-mc{border:0 none;font:normal 11px tahoma,arial,helvetica,sans-serif;} +.x-tip .x-tip-ml{background:#fff url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -124px;padding-left:6px;zoom:1;} +.x-tip .x-tip-mr{background:transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -124px;padding-right:6px;zoom:1;} +.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc{font-size:0;line-height:0;} +.x-tip .x-tip-header-text{font:bold 11px tahoma,arial,helvetica,sans-serif;padding:0;margin:0 0 2px 0;color:#444;} +.x-tip .x-tip-body{font:normal 11px tahoma,arial,helvetica,sans-serif;margin:0!important;line-height:14px;color:#444;padding:0;} +.x-tip .x-tip-body .loading-indicator{margin:0;} +.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text{cursor:move;} +.x-form-invalid-tip .x-tip-tc{background:url(../images/default/form/error-tip-corners.gif) repeat-x 0 -12px;padding-top:6px;} +.x-form-invalid-tip .x-tip-tl{background-image:url(../images/default/form/error-tip-corners.gif);} +.x-form-invalid-tip .x-tip-tr{background-image:url(../images/default/form/error-tip-corners.gif);} +.x-form-invalid-tip .x-tip-bc{background:url(../images/default/form/error-tip-corners.gif) repeat-x 0 -18px;height:6px;} +.x-form-invalid-tip .x-tip-bl{background:url(../images/default/form/error-tip-corners.gif) no-repeat 0 -6px;} +.x-form-invalid-tip .x-tip-br{background:url(../images/default/form/error-tip-corners.gif) no-repeat right -6px;} +.x-form-invalid-tip .x-tip-ml{background-image:url(../images/default/form/error-tip-corners.gif);} +.x-form-invalid-tip .x-tip-mr{background-image:url(../images/default/form/error-tip-corners.gif);} +.x-form-invalid-tip .x-tip-body{padding:2px;} +.x-form-invalid-tip .x-tip-body{padding-left:24px;background:transparent url(../images/default/form/exclamation.gif) no-repeat 2px 2px;} + +.x-menu{border:1px solid #718bb7;z-index:15000;zoom:1;background:#f0f0f0 url(../images/default/menu/menu.gif) repeat-y;padding:2px;} +.x-menu a{text-decoration:none!important;} +.ext-ie .x-menu{zoom:1;overflow:hidden;} +.x-menu-list{background:transparent;border:0 none;} +.x-menu li{line-height:100%;} +.x-menu li.x-menu-sep-li{font-size:1px;line-height:1px;} +.x-menu-list-item{font:normal 11px tahoma,arial,sans-serif;white-space:nowrap;-moz-user-select:none;-khtml-user-select:none;display:block;padding:1px;} +.x-menu-item-arrow{background:transparent url(../images/default/menu/menu-parent.gif) no-repeat right;} +.x-menu-sep{display:block;font-size:1px;line-height:1px;margin:2px 3px;background-color:#e0e0e0;border-bottom:1px solid #fff;} +.x-menu-focus{position:absolute;left:0;top:-5px;width:0;height:0;line-height:1px;} +.x-menu a.x-menu-item{display:block;line-height:16px;padding:3px 21px 3px 3px;white-space:nowrap;text-decoration:none;color:#222;-moz-outline:0 none;outline:0 none;cursor:pointer;} +.x-menu-item-active{background:#ebf3fd url(../images/default/menu/item-over.gif) repeat-x left bottom;border:1px solid #aaccf6;padding:0;} +.x-menu-item-active a.x-menu-item{color:#233d6d;} +.x-menu-item-icon{border:0 none;height:16px;padding:0;vertical-align:top;width:16px;margin:0 8px 0 0;background-position:center;} +.x-menu-check-item .x-menu-item-icon{background:transparent url(../images/default/menu/unchecked.gif) no-repeat center;} +.x-menu-item-checked .x-menu-item-icon{background-image:url(../images/default/menu/checked.gif);} +.x-menu-group-item .x-menu-item-icon{background:transparent;} +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{background:transparent url(../images/default/menu/group-checked.gif) no-repeat center;} +.x-menu-plain{background:#fff!important;} +.x-menu-date-item{padding:0;} +.x-menu .x-color-palette,.x-menu .x-date-picker{margin-left:26px;margin-right:4px;} +.x-menu .x-date-picker{border:1px solid #a3bad9;margin-top:2px;margin-bottom:2px;} +.x-menu-plain .x-color-palette,.x-menu-plain .x-date-picker{margin:0;border:0 none;} +.x-date-menu{padding:0!important;} +.x-cycle-menu .x-menu-item-checked{border:1px dotted #a3bae9!important;background:#DFE8F6;padding:0;} + + .x-box-tl{background:transparent url(../images/default/box/corners.gif) no-repeat 0 0;zoom:1;} +.x-box-tc{height:8px;background:transparent url(../images/default/box/tb.gif) repeat-x 0 0;overflow:hidden;} +.x-box-tr{background:transparent url(../images/default/box/corners.gif) no-repeat right -8px;} +.x-box-ml{background:transparent url(../images/default/box/l.gif) repeat-y 0;padding-left:4px;overflow:hidden;zoom:1;} +.x-box-mc{background:#eee url(../images/default/box/tb.gif) repeat-x 0 -16px;padding:4px 10px;font-family:"Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;color:#393939;font-size:12px;} +.x-box-mc h3{font-size:14px;font-weight:bold;margin:0 0 4px 0;zoom:1;} +.x-box-mr{background:transparent url(../images/default/box/r.gif) repeat-y right;padding-right:4px;overflow:hidden;} +.x-box-bl{background:transparent url(../images/default/box/corners.gif) no-repeat 0 -16px;zoom:1;} +.x-box-bc{background:transparent url(../images/default/box/tb.gif) repeat-x 0 -8px;height:8px;overflow:hidden;} +.x-box-br{background:transparent url(../images/default/box/corners.gif) no-repeat right -24px;} +.x-box-tl,.x-box-bl{padding-left:8px;overflow:hidden;} +.x-box-tr,.x-box-br{padding-right:8px;overflow:hidden;} +.x-box-blue .x-box-bl,.x-box-blue .x-box-br,.x-box-blue .x-box-tl,.x-box-blue .x-box-tr{background-image:url(../images/default/box/corners-blue.gif);} +.x-box-blue .x-box-bc,.x-box-blue .x-box-mc,.x-box-blue .x-box-tc{background-image:url(../images/default/box/tb-blue.gif);} +.x-box-blue .x-box-mc{background-color:#c3daf9;} +.x-box-blue .x-box-mc h3{color:#17385b;} +.x-box-blue .x-box-ml{background-image:url(../images/default/box/l-blue.gif);} +.x-box-blue .x-box-mr{background-image:url(../images/default/box/r-blue.gif);} + +#x-debug-browser .x-tree .x-tree-node a span{color:#222297;font-size:11px;padding-top:2px;font-family:"monotype","courier new",sans-serif;line-height:18px;} +#x-debug-browser .x-tree a i{color:#FF4545;font-style:normal;} +#x-debug-browser .x-tree a em{color:#999;} +#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{background:#c3daf9;} +#x-debug-browser .x-tool-toggle{background-position:0 -75px;} +#x-debug-browser .x-tool-toggle-over{background-position:-15px -75px;} +#x-debug-browser.x-panel-collapsed .x-tool-toggle{background-position:0 -60px;} +#x-debug-browser.x-panel-collapsed .x-tool-toggle-over{background-position:-15px -60px;} + +.x-combo-list{border:1px solid #98c0f4;background:#ddecfe;zoom:1;overflow:hidden;} +.x-combo-list-inner{overflow:auto;background:white;position:relative;zoom:1;overflow-x:hidden;} +.x-combo-list-hd{font:bold 11px tahoma,arial,helvetica,sans-serif;color:#15428b;background-image:url(../images/default/layout/panel-title-light-bg.gif);border-bottom:1px solid #98c0f4;padding:3px;} +.x-resizable-pinned .x-combo-list-inner{border-bottom:1px solid #98c0f4;} +.x-combo-list-item{font:normal 12px tahoma,arial,helvetica,sans-serif;padding:2px;border:1px solid #fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} +.x-combo-list .x-combo-selected{border:1px dotted #a3bae9!important;background:#DFE8F6;cursor:pointer;} +.x-combo-noedit{cursor:pointer;} +.x-combo-list .x-toolbar{border-top:1px solid #98c0f4;border-bottom:0 none;} +.x-combo-list-small .x-combo-list-item{font:normal 11px tahoma,arial,helvetica,sans-serif;} + +.x-panel{border-style:solid;border-color:#99bbe8;border-width:0;} +.x-panel-header{overflow:hidden;zoom:1;color:#15428b;font:bold 11px tahoma,arial,verdana,sans-serif;padding:5px 3px 4px 5px;border:1px solid #99bbe8;line-height:15px;background:transparent url(../images/default/panel/white-top-bottom.gif) repeat-x 0 -1px;} +.x-panel-body{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;background:white;} +.x-panel-bbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} +.x-panel-tbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} +.x-panel-tbar-noheader .x-toolbar,.x-panel-mc .x-panel-tbar .x-toolbar{border-top:1px solid #99bbe8;border-bottom:0 none;} +.x-panel-body-noheader,.x-panel-mc .x-panel-body{border-top:1px solid #99bbe8;} +.x-panel-header{overflow:hidden;zoom:1;} +.x-panel-tl .x-panel-header{color:#15428b;font:bold 11px tahoma,arial,verdana,sans-serif;padding:5px 0 4px 0;border:0 none;background:transparent;} +.x-panel-tl .x-panel-icon,.x-window-tl .x-panel-icon{padding-left:20px!important;background-repeat:no-repeat;background-position:0 4px;zoom:1;} +.x-panel-inline-icon{width:16px;height:16px;background-repeat:no-repeat;background-position:0 0;vertical-align:middle;margin-right:4px;margin-top:-1px;margin-bottom:-1px;} +.x-panel-tc{background:transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 0;overflow:hidden;} +.x-panel-tl{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 0;padding-left:6px;zoom:1;border-bottom:1px solid #99bbe8;} +.x-panel-tr{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat right 0;zoom:1;padding-right:6px;} +.x-panel-bc{background:transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 bottom;zoom:1;} +.x-panel-bc .x-panel-footer{zoom:1;} +.x-panel-bl{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 bottom;padding-left:6px;zoom:1;} +.x-panel-br{background:transparent url(../images/default/panel/corners-sprite.gif) no-repeat right bottom;padding-right:6px;zoom:1;} +.x-panel-mc{border:0 none;padding:0;margin:0;font:normal 11px tahoma,arial,helvetica,sans-serif;padding-top:6px;background:#dfe8f6;} +.x-panel-mc .x-panel-body{background:transparent;border:0 none;} +.x-panel-ml{background:#fff url(../images/default/panel/left-right.gif) repeat-y 0 0;padding-left:6px;zoom:1;} +.x-panel-mr{background:transparent url(../images/default/panel/left-right.gif) repeat-y right 0;padding-right:6px;zoom:1;} +.x-panel-bc .x-panel-footer{padding-bottom:6px;} +.x-panel-nofooter .x-panel-bc{height:6px;font-size:0;line-height:0;} +.x-panel-bwrap{overflow:hidden;zoom:1;} +.x-panel-body{overflow:hidden;zoom:1;} +.x-panel-collapsed .x-resizable-handle{display:none;} +.ext-gecko .x-panel-animated div{overflow:hidden!important;} +.x-plain-body{overflow:hidden;} +.x-plain-bbar .x-toolbar{overflow:hidden;padding:2px;} +.x-plain-tbar .x-toolbar{overflow:hidden;padding:2px;} +.x-plain-bwrap{overflow:hidden;zoom:1;} +.x-plain{overflow:hidden;} +.x-tool{overflow:hidden;width:15px;height:15px;float:right;cursor:pointer;background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat;margin-left:2px;} +.x-tool-toggle{background-position:0 -60px;} +.x-tool-toggle-over{background-position:-15px -60px;} +.x-panel-collapsed .x-tool-toggle{background-position:0 -75px;} +.x-panel-collapsed .x-tool-toggle-over{background-position:-15px -75px;} +.x-tool-close{background-position:0 -0;} +.x-tool-close-over{background-position:-15px 0;} +.x-tool-minimize{background-position:0 -15px;} +.x-tool-minimize-over{background-position:-15px -15px;} +.x-tool-maximize{background-position:0 -30px;} +.x-tool-maximize-over{background-position:-15px -30px;} +.x-tool-restore{background-position:0 -45px;} +.x-tool-restore-over{background-position:-15px -45px;} +.x-tool-gear{background-position:0 -90px;} +.x-tool-gear-over{background-position:-15px -90px;} +.x-tool-pin{background-position:0 -135px;} +.x-tool-pin-over{background-position:-15px -135px;} +.x-tool-unpin{background-position:0 -150px;} +.x-tool-unpin-over{background-position:-15px -150px;} +.x-tool-right{background-position:0 -165px;} +.x-tool-right-over{background-position:-15px -165px;} +.x-tool-left{background-position:0 -180px;} +.x-tool-left-over{background-position:-15px -180px;} +.x-tool-up{background-position:0 -210px;} +.x-tool-up-over{background-position:-15px -210px;} +.x-tool-down{background-position:0 -195px;} +.x-tool-down-over{background-position:-15px -195px;} +.x-tool-refresh{background-position:0 -225px;} +.x-tool-refresh-over{background-position:-15px -225px;} +.x-tool-minus{background-position:0 -255px;} +.x-tool-minus-over{background-position:-15px -255px;} +.x-tool-plus{background-position:0 -240px;} +.x-tool-plus-over{background-position:-15px -240px;} +.x-tool-search{background-position:0 -270px;} +.x-tool-search-over{background-position:-15px -270px;} +.x-tool-save{background-position:0 -285px;} +.x-tool-save-over{background-position:-15px -285px;} +.x-tool-help{background-position:0 -300px;} +.x-tool-help-over{background-position:-15px -300px;} +.x-panel-ghost{background:#cbddf3;z-index:12000;overflow:hidden;position:absolute;left:0;top:0;opacity:.65;-moz-opacity:.65;filter:alpha(opacity=65);} +.x-panel-ghost ul{margin:0;padding:0;overflow:hidden;font-size:0;line-height:0;border:1px solid #99bbe8;border-top:0 none;display:block;} +.x-panel-ghost *{cursor:move!important;} +.x-panel-dd-spacer{border:2px dashed #99bbe8;} +.x-panel-btns-ct{padding:5px;} +.x-panel-btns-ct .x-btn{float:right;clear:none;} +.x-panel-btns-ct .x-panel-btns td{border:0;padding:0;} +.x-panel-btns-ct .x-panel-btns-right table{float:right;clear:none;} +.x-panel-btns-ct .x-panel-btns-left table{float:left;clear:none;} +.x-panel-btns-ct .x-panel-btns-center{text-align:center;} +.x-panel-btns-ct .x-panel-btns-center table{margin:0 auto;} +.x-panel-btns-ct table td.x-panel-btn-td{padding:3px;} +.x-panel-btns-ct .x-btn-focus .x-btn-left{background-position:0 -147px;} +.x-panel-btns-ct .x-btn-focus .x-btn-right{background-position:0 -168px;} +.x-panel-btns-ct .x-btn-focus .x-btn-center{background-position:0 -189px;} +.x-panel-btns-ct .x-btn-over .x-btn-left{background-position:0 -63px;} +.x-panel-btns-ct .x-btn-over .x-btn-right{background-position:0 -84px;} +.x-panel-btns-ct .x-btn-over .x-btn-center{background-position:0 -105px;} +.x-panel-btns-ct .x-btn-click .x-btn-center{background-position:0 -126px;} +.x-panel-btns-ct .x-btn-click .x-btn-right{background-position:0 -84px;} +.x-panel-btns-ct .x-btn-click .x-btn-left{background-position:0 -63px;} + +.x-window{zoom:1;} +.x-window .x-resizable-handle{opacity:0;-moz-opacity:0;filter:alpha(opacity=0);} +.x-window-proxy{background:#C7DFFC;border:1px solid #99bbe8;z-index:12000;overflow:hidden;position:absolute;left:0;top:0;display:none;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);} +.x-window-header{overflow:hidden;zoom:1;} +.x-window-bwrap{z-index:1;position:relative;zoom:1;} +.x-window-tl .x-window-header{color:#15428b;font:bold 11px tahoma,arial,verdana,sans-serif;padding:5px 0 4px 0;} +.x-window-header-text{cursor:pointer;} +.x-window-tc{background:transparent url(../images/default/window/top-bottom.png) repeat-x 0 0;overflow:hidden;zoom:1;} +.x-window-tl{background:transparent url(../images/default/window/left-corners.png) no-repeat 0 0;padding-left:6px;zoom:1;z-index:1;position:relative;} +.x-window-tr{background:transparent url(../images/default/window/right-corners.png) no-repeat right 0;padding-right:6px;} +.x-window-bc{background:transparent url(../images/default/window/top-bottom.png) repeat-x 0 bottom;zoom:1;} +.x-window-bc .x-window-footer{padding-bottom:6px;zoom:1;font-size:0;line-height:0;} +.x-window-bl{background:transparent url(../images/default/window/left-corners.png) no-repeat 0 bottom;padding-left:6px;zoom:1;} +.x-window-br{background:transparent url(../images/default/window/right-corners.png) no-repeat right bottom;padding-right:6px;zoom:1;} +.x-window-mc{border:1px solid #99bbe8;padding:0;margin:0;font:normal 11px tahoma,arial,helvetica,sans-serif;background:#dfe8f6;} +.x-window-ml{background:transparent url(../images/default/window/left-right.png) repeat-y 0 0;padding-left:6px;zoom:1;} +.x-window-mr{background:transparent url(../images/default/window/left-right.png) repeat-y right 0;padding-right:6px;zoom:1;} +.x-panel-nofooter .x-window-bc{height:6px;} +.x-window-body{overflow:hidden;} +.x-window-bwrap{overflow:hidden;} +.x-window-maximized .x-window-bl,.x-window-maximized .x-window-br,.x-window-maximized .x-window-ml,.x-window-maximized .x-window-mr,.x-window-maximized .x-window-tl,.x-window-maximized .x-window-tr{padding:0;} +.x-window-maximized .x-window-footer{padding-bottom:0;} +.x-window-maximized .x-window-tc{padding-left:3px;padding-right:3px;background-color:white;} +.x-window-maximized .x-window-mc{border-left:0 none;border-right:0 none;} +.x-window-tbar .x-toolbar,.x-window-bbar .x-toolbar{border-left:0 none;border-right:0 none;} +.x-window-bbar .x-toolbar{border-top:1px solid #99bbe8;border-bottom:0 none;} +.x-window-draggable,.x-window-draggable .x-window-header-text{cursor:move;} +.x-window-maximized .x-window-draggable,.x-window-maximized .x-window-draggable .x-window-header-text{cursor:default;} +.x-window-body{background:transparent;} +.x-panel-ghost .x-window-tl{border-bottom:1px solid #99bbe8;} +.x-panel-collapsed .x-window-tl{border-bottom:1px solid #84a0c4;} +.x-window-maximized-ct{overflow:hidden;} +.x-window-maximized .x-resizable-handle{display:none;} +.x-window-sizing-ghost ul{border:0 none!important;} +.x-dlg-focus{-moz-outline:0 none;outline:0 none;width:0;height:0;overflow:hidden;position:absolute;top:0;left:0;} +.x-dlg-mask{z-index:10000;display:none;position:absolute;top:0;left:0;-moz-opacity:0.5;opacity:.50;filter:alpha(opacity=50);background-color:#CCC;} +body.ext-ie6.x-body-masked select{visibility:hidden;} +body.ext-ie6.x-body-masked .x-window select{visibility:visible;} +.x-window-plain .x-window-mc{background:#CAD9EC;border-right:1px solid #DFE8F6;border-bottom:1px solid #DFE8F6;border-top:1px solid #a3bae9;border-left:1px solid #a3bae9;} +.x-window-plain .x-window-body{border-left:1px solid #DFE8F6;border-top:1px solid #DFE8F6;border-bottom:1px solid #a3bae9;border-right:1px solid #a3bae9;background:transparent!important;} +body.x-body-masked .x-window-plain .x-window-mc{background:#C7D6E9;} + +.x-html-editor-wrap{border:1px solid #a9bfd3;background:white;} +.x-html-editor-tb .x-btn-text{background:transparent url(../images/default/editor/tb-sprite.gif) no-repeat;} +.x-html-editor-tb .x-edit-bold .x-btn-text{background-position:0 0;} +.x-html-editor-tb .x-edit-italic .x-btn-text{background-position:-16px 0;} +.x-html-editor-tb .x-edit-underline .x-btn-text{background-position:-32px 0;} +.x-html-editor-tb .x-edit-forecolor .x-btn-text{background-position:-160px 0;} +.x-html-editor-tb .x-edit-backcolor .x-btn-text{background-position:-176px 0;} +.x-html-editor-tb .x-edit-justifyleft .x-btn-text{background-position:-112px 0;} +.x-html-editor-tb .x-edit-justifycenter .x-btn-text{background-position:-128px 0;} +.x-html-editor-tb .x-edit-justifyright .x-btn-text{background-position:-144px 0;} +.x-html-editor-tb .x-edit-insertorderedlist .x-btn-text{background-position:-80px 0;} +.x-html-editor-tb .x-edit-insertunorderedlist .x-btn-text{background-position:-96px 0;} +.x-html-editor-tb .x-edit-increasefontsize .x-btn-text{background-position:-48px 0;} +.x-html-editor-tb .x-edit-decreasefontsize .x-btn-text{background-position:-64px 0;} +.x-html-editor-tb .x-edit-sourceedit .x-btn-text{background-position:-192px 0;} +.x-html-editor-tb .x-edit-createlink .x-btn-text{background-position:-208px 0;} +.x-html-editor-tip .x-tip-bd .x-tip-bd-inner{padding:5px;padding-bottom:1px;} +.x-html-editor-tb .x-toolbar{position:static!important;} + +.x-panel-noborder .x-panel-body-noborder{border-width:0;} +.x-panel-noborder .x-panel-header-noborder{border-width:0;border-bottom:1px solid #99bbe8;} +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #99bbe8;} +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #99bbe8;} +.x-window-noborder .x-window-mc{border-width:0;} +.x-window-plain .x-window-body-noborder{border-width:0;} +.x-tab-panel-noborder .x-tab-panel-body-noborder{border-width:0;} +.x-tab-panel-noborder .x-tab-panel-header-noborder{border-top-width:0;border-left-width:0;border-right-width:0;} +.x-tab-panel-noborder .x-tab-panel-footer-noborder{border-bottom-width:0;border-left-width:0;border-right-width:0;} +.x-tab-panel-bbar-noborder .x-toolbar{border-width:0;border-top:1px solid #99bbe8;} +.x-tab-panel-tbar-noborder .x-toolbar{border-width:0;border-bottom:1px solid #99bbe8;} + +.x-border-layout-ct{background:#dfe8f6;} +.x-border-panel{position:absolute;left:0;top:0;} +.x-tool-collapse-south{background-position:0 -195px;} +.x-tool-collapse-south-over{background-position:-15px -195px;} +.x-tool-collapse-north{background-position:0 -210px;} +.x-tool-collapse-north-over{background-position:-15px -210px;} +.x-tool-collapse-west{background-position:0 -180px;} +.x-tool-collapse-west-over{background-position:-15px -180px;} +.x-tool-collapse-east{background-position:0 -165px;} +.x-tool-collapse-east-over{background-position:-15px -165px;} +.x-tool-expand-south{background-position:0 -210px;} +.x-tool-expand-south-over{background-position:-15px -210px;} +.x-tool-expand-north{background-position:0 -195px;} +.x-tool-expand-north-over{background-position:-15px -195px;} +.x-tool-expand-west{background-position:0 -165px;} +.x-tool-expand-west-over{background-position:-15px -165px;} +.x-tool-expand-east{background-position:0 -180px;} +.x-tool-expand-east-over{background-position:-15px -180px;} +.x-tool-expand-north,.x-tool-expand-south{float:right;margin:3px;} +.x-tool-expand-east,.x-tool-expand-west{float:none;margin:3px auto;} +.x-accordion-hd .x-tool-toggle{background-position:0 -255px;} +.x-accordion-hd .x-tool-toggle-over{background-position:-15px -255px;} +.x-panel-collapsed .x-accordion-hd .x-tool-toggle{background-position:0 -240px;} +.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over{background-position:-15px -240px;} +.x-accordion-hd{color:#222;padding-top:4px;padding-bottom:3px;border-top:0 none;font-weight:normal;background:transparent url(../images/default/panel/light-hd.gif) repeat-x 0 -9px;} +.x-layout-collapsed{position:absolute;left:-10000px;top:-10000px;visibility:hidden;background-color:#d2e0f2;width:20px;height:20px;overflow:hidden;border:1px solid #98c0f4;z-index:20;} +.ext-border-box .x-layout-collapsed{width:22px;height:22px;} +.x-layout-collapsed-over{cursor:pointer;background-color:#d9e8fb;} +.x-layout-collapsed-west .x-layout-collapsed-tools,.x-layout-collapsed-east .x-layout-collapsed-tools{position:absolute;top:0;left:0;width:20px;height:20px;} +.x-layout-split{position:absolute;height:5px;width:5px;line-height:1px;font-size:1px;z-index:3;background-color:transparent;} +.x-layout-split-h{background-image:url(../images/default/s.gif);background-position:left;} +.x-layout-split-v{background-image:url(../images/default/s.gif);background-position:top;} +.x-column-layout-ct{overflow:hidden;zoom:1;} +.x-column{float:left;padding:0;margin:0;overflow:hidden;zoom:1;} +.x-layout-mini{position:absolute;top:0;left:0;display:block;width:5px;height:35px;cursor:pointer;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);} +.x-layout-mini-over,.x-layout-collapsed-over .x-layout-mini{opacity:1;-moz-opacity:1;filter:none;} +.x-layout-split-west .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-left.gif);} +.x-layout-split-east .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-right.gif);} +.x-layout-split-north .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-top.gif);} +.x-layout-split-south .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-bottom.gif);} +.x-layout-cmini-west .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-right.gif);} +.x-layout-cmini-east .x-layout-mini{top:48%;background-image:url(../images/default/layout/mini-left.gif);} +.x-layout-cmini-north .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-bottom.gif);} +.x-layout-cmini-south .x-layout-mini{left:48%;height:5px;width:35px;background-image:url(../images/default/layout/mini-top.gif);} +.x-layout-cmini-west,.x-layout-cmini-east{border:0 none;width:5px!important;padding:0;background:transparent;} +.x-layout-cmini-north,.x-layout-cmini-south{border:0 none;height:5px!important;padding:0;background:transparent;} +.x-viewport,.x-viewport body{margin:0;padding:0;border:0 none;overflow:hidden;height:100%;} +.x-abs-layout-item{position:absolute;left:0;top:0;} + +.x-progress-wrap{border:1px solid #6593cf;overflow:hidden;} +.x-progress-inner{height:18px;background:#e0e8f3 url(../images/default/qtip/bg.gif) repeat-x;position:relative;} +.x-progress-bar{height:18px;float:left;width:0;background:#9CBFEE url( ../images/default/progress/progress-bg.gif ) repeat-x left center;border-top:1px solid #D1E4FD;border-bottom:1px solid #7FA9E4;border-right:1px solid #7FA9E4;} +.x-progress-text{font-size:11px;font-weight:bold;color:#fff;padding:1px 5px;overflow:hidden;position:absolute;left:0;text-align:center;} +.x-progress-text-back{color:#396095;line-height:16px;} +.ext-ie .x-progress-text-back{line-height:15px;} + +.x-window-dlg .x-window-body{border:0 none!important;padding:5px 10px;overflow:hidden!important;} +.x-window-dlg .x-window-mc{border:0 none!important;} +.x-window-dlg .ext-mb-text,.x-window-dlg .x-window-header-text{font-size:12px;} +.x-window-dlg .ext-mb-input{margin-top:4px;width:95%;} +.x-window-dlg .ext-mb-textarea{margin-top:4px;font:normal 12px tahoma,arial,helvetica,sans-serif;} +.x-window-dlg .x-progress-wrap{margin-top:4px;} +.ext-ie .x-window-dlg .x-progress-wrap{margin-top:6px;} +.x-window-dlg .x-msg-box-wait{background:transparent url(../images/default/grid/loading.gif) no-repeat left;display:block;width:300px;padding-left:18px;line-height:18px;} +.x-window-dlg .ext-mb-icon{float:left;width:47px;height:32px;} +.ext-ie .x-window-dlg .ext-mb-icon{width:44px;} +.x-window-dlg .ext-mb-info{background:transparent url(../images/default/window/icon-info.gif) no-repeat top left;} +.x-window-dlg .ext-mb-warning{background:transparent url(../images/default/window/icon-warning.gif) no-repeat top left;} +.x-window-dlg .ext-mb-question{background:transparent url(../images/default/window/icon-question.gif) no-repeat top left;} +.x-window-dlg .ext-mb-error{background:transparent url(../images/default/window/icon-error.gif) no-repeat top left;} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/form.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/form.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/form.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,453 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* all fields */ +.x-form-field{ + margin: 0 0 0 0; + font:normal 12px tahoma, arial, helvetica, sans-serif; +} + +/* ---- text fields ---- */ +.x-form-text, textarea.x-form-field{ + padding: 1px 3px; + background:#fff url(../images/default/form/text-bg.gif) repeat-x 0 0; + border: 1px solid #B5B8C8; +} +.x-form-text { + height:22px; + line-height:18px; + vertical-align:middle; +} +.ext-ie .x-form-text { + margin-top:-1px; /* ie bogus margin bug */ + margin-bottom:-1px; + height:22px; /* ie quirks */ + line-height:18px; +} +.ext-strict .x-form-text { + height:18px; +} +.ext-safari .x-form-text { + height:20px; /* safari always same size */ + padding:0 3px; /* remove extra top/bottom padding */ +} +.ext-gecko .x-form-text { + padding-top:2px; /* FF won't center the text vertically */ + padding-bottom:0; +} +/* select boxes */ + +.x-form-select-one { + height:20px; + line-height:18px; + vertical-align:middle; + background-color:#fff; /* opera */ + border: 1px solid #B5B8C8; +} + +/* multi select boxes */ + +/* --- TODO --- */ + +/* checkboxes */ + +/* --- TODO --- */ + +/* radios */ + +/* --- TODO --- */ + + +/* wrapped fields and triggers */ + +.x-form-field-wrap { + position:relative; + zoom:1; + white-space: nowrap; +} + +.x-editor .x-form-check-wrap { + background:#fff; +} +.x-form-field-wrap .x-form-trigger{ + width:17px; + height:21px; + border:0; + background:transparent url(../images/default/form/trigger.gif) no-repeat 0 0; + cursor:pointer; + border-bottom: 1px solid #B5B8C8; + position:absolute; + top:0; +} +.ext-safari .x-form-field-wrap .x-form-trigger{ + height:21px; /* safari doesn't allow height adjustments to the fields, so adjust trigger */ +} + +.x-form-field-wrap .x-form-date-trigger{ + background-image: url(../images/default/form/date-trigger.gif); + cursor:pointer; +} +.x-form-field-wrap .x-form-clear-trigger{ + background-image: url(../images/default/form/clear-trigger.gif); + cursor:pointer; +} +.x-form-field-wrap .x-form-search-trigger{ + background-image: url(../images/default/form/search-trigger.gif); + cursor:pointer; +} +.ext-safari .x-form-field-wrap .x-form-trigger{ + right:0; +} +.x-form-field-wrap .x-form-twin-triggers{ + +} +.x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ + position:static; + top:auto; + vertical-align:top; +} + + +.x-form-field-wrap .x-form-trigger-over{ + background-position:-17px 0; +} +.x-form-field-wrap .x-form-trigger-click{ + background-position:-34px 0; +} + +.x-trigger-wrap-focus .x-form-trigger{ + background-position:-51px 0; +} +.x-trigger-wrap-focus .x-form-trigger-over{ + background-position:-68px 0; +} +.x-trigger-wrap-focus .x-form-trigger-click{ + background-position:-85px 0; +} +.x-trigger-wrap-focus .x-form-trigger{ + border-bottom: 1px solid #7eadd9; +} + +.x-item-disabled .x-form-trigger-over{ + background-position:0 0 !important; + border-bottom: 1px solid #B5B8C8; +} +.x-item-disabled .x-form-trigger-click{ + background-position:0 0 !important; + border-bottom: 1px solid #B5B8C8; +} + +/* field focus style */ +.x-form-focus, textarea.x-form-focus{ + border: 1px solid #7eadd9; +} + +/* invalid fields */ +.x-form-invalid, textarea.x-form-invalid{ + background:#fff url(../images/default/grid/invalid_line.gif) repeat-x bottom; + border: 1px solid #dd7870; +} +.ext-safari .x-form-invalid{ + background-color:#ffeeee; + border: 1px solid #ff7870; +} + +/* editors */ + +.x-editor { + visibility:hidden; + padding:0; + margin:0; +} +.x-form-check-wrap { + line-height:18px; +} +.ext-ie .x-form-check-wrap input { + width:15px; + height:15px; +} +.x-editor .x-form-check-wrap { + padding:3px; +} +.x-editor .x-form-checkbox { + height:13px; +} +/* If you override the default field font above, you would need to change this font as well */ +.x-form-grow-sizer { + font:normal 12px tahoma, arial, helvetica, sans-serif; + left: -10000px; + padding: 8px 3px; + position: absolute; + visibility:hidden; + top: -10000px; + white-space: pre-wrap; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + word-wrap: break-word; + zoom:1; +} +.x-form-grow-sizer p { + margin:0 !important; + border:0 none !important; + padding:0 !important; +} +/* Form Items CSS */ + +.x-form-item { + font:normal 12px tahoma, arial, helvetica, sans-serif; + display:block; + margin-bottom:4px; +} + +.x-form-item label { + display:block; + float:left; + width:100px; + padding:3px; + padding-left:0; + clear:left; + z-index:2; + position:relative; +} + +.x-form-element { + padding-left:105px; + position:relative; +} + +.x-form-invalid-msg { + color:#ee0000; + padding:2px; + padding-left:18px; + font:normal 11px tahoma, arial, helvetica, sans-serif; + background: transparent url(../images/default/shared/warning.gif) no-repeat 0 2px; + line-height:16px; + width:200px; +} + + +.x-form-label-right label { + text-align:right; +} + +.x-form-label-top .x-form-item label { + width:auto; + float:none; + clear:none; + display:inline; + margin-bottom:4px; + position:static; +} + +.x-form-label-top .x-form-element { + padding-left:0; + padding-top:4px; +} + +.x-form-label-top .x-form-item { + padding-bottom:4px; +} + +.x-form-empty-field { + color:gray; +} +/* Editor small font for grid, toolbar and tree */ +.x-small-editor .x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} +.x-small-editor .x-form-text { + height:20px; + line-height:16px; + vertical-align:middle; +} +.ext-ie .x-small-editor .x-form-text { + margin-top:-1px !important; /* ie bogus margin bug */ + margin-bottom:-1px !important; + height:20px !important; /* ie quirks */ + line-height:16px !important; +} +.ext-strict .x-small-editor .x-form-text { + height:16px !important; +} + +.ext-safari .x-small-editor .x-form-field { + /* safari text field will not size so needs bigger font */ + font:normal 12px arial, tahoma, helvetica, sans-serif; +} +.ext-ie .x-small-editor .x-form-text { + height:20px; + line-height:16px; +} +.ext-border-box .x-small-editor .x-form-text { + height:20px; +} + +.x-small-editor .x-form-select-one { + height:20px; + line-height:16px; + vertical-align:middle; +} +.x-small-editor .x-form-num-field { + text-align:right; +} +.x-small-editor .x-form-field-wrap .x-form-trigger{ + height:19px; +} + + +.x-form-clear { + clear:both; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} +.x-form-clear-left { + clear:left; + height:0; + overflow:hidden; + line-height:0; + font-size:0; +} + +.x-form-cb-label { + width:'auto' !important; + float:none !important; + clear:none !important; + display:inline !important; + margin-left:4px; +} + +.x-form-column { + float:left; + padding:0; + margin:0; + width:48%; + overflow:hidden; + zoom:1; +} + +/* buttons */ +.x-form .x-form-btns-ct .x-btn{ + float:right; + clear:none; +} +.x-form .x-form-btns-ct .x-form-btns td { + border:0; + padding:0; +} +.x-form .x-form-btns-ct .x-form-btns-right table{ + float:right; + clear:none; +} +.x-form .x-form-btns-ct .x-form-btns-left table{ + float:left; + clear:none; +} +.x-form .x-form-btns-ct .x-form-btns-center{ + text-align:center; /*ie*/ +} +.x-form .x-form-btns-ct .x-form-btns-center table{ + margin:0 auto; /*everyone else*/ +} +.x-form .x-form-btns-ct table td.x-form-btn-td{ + padding:3px; +} + +.x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} +.x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} +.x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-form .x-form-btns-ct .x-btn-click .x-btn-center{ + background-position:0 -126px; +} +.x-form .x-form-btns-ct .x-btn-click .x-btn-right{ + background-position:0 -84px; +} +.x-form .x-form-btns-ct .x-btn-click .x-btn-left{ + background-position:0 -63px; +} +.x-form-invalid-icon { + width:16px; + height:18px; + visibility:hidden; + position:absolute; + left:0; + top:0; + display:block; + background:transparent url(../images/default/form/exclamation.gif) no-repeat 0 2px; +} + +/* fieldsets */ +.x-fieldset { + border:1px solid #B5B8C8; + padding:10px; + margin-bottom:10px; +} +.x-fieldset legend { + font:bold 11px tahoma, arial, helvetica, sans-serif; + color:#15428b; +} +.ext-ie .x-fieldset legend { + margin-bottom:10px; +} +.ext-ie .x-fieldset { + padding-top: 0; + padding-bottom:5px; +} +.x-fieldset legend .x-tool-toggle { + margin-right:3px; + margin-left:0; + float:left !important; +} +.x-fieldset legend input { + margin-right:3px; + float:left !important; + height:13px; + width:13px; +} +fieldset.x-panel-collapsed { + padding-bottom:0 !important; + border-width: 1px 0 0 0 !important; +} +fieldset.x-panel-collapsed .x-fieldset-bwrap { + visibility:hidden; + position:absolute; + left:-1000px; + top:-1000px; +} +.ext-ie .x-fieldset-bwrap { + zoom:1; +} +.ext-ie td .x-form-text { + position:relative; + top:-1px; +} + +.ext-gecko .x-window-body .x-form-item { + -moz-outline: none; + overflow: auto; +} + +.ext-gecko .x-form-item { + -moz-outline: none; +} + +.x-hide-label label.x-form-item-label { + display:none; +} +.x-hide-label .x-form-element { + padding-left: 0 !important; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/grid.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/grid.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/grid.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,539 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* Grid3 styles */ +.x-grid3 { + position:relative; + overflow:hidden; + background-color:#fff; +} + +.x-grid-panel .x-panel-body { + overflow:hidden !important; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border:1px solid #99bbe8; +} + +.ext-ie .x-grid3 table,.ext-safari .x-grid3 table { + table-layout:fixed; +} +.x-grid3-viewport{ + overflow:hidden; +} +.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px arial, tahoma, helvetica, sans-serif; + -moz-outline: none; + -moz-user-focus: normal; +} +.x-grid3-row td, .x-grid3-summary-row td { + line-height:13px; + vertical-align: top; + padding-left:1px; + padding-right:1px; + -moz-user-select: none; +} +.x-grid3-hd-row td { + line-height:15px; + vertical-align:middle; + border-left:1px solid #eee; + border-right:1px solid #d0d0d0; +} + +.x-grid3-hd-row .x-grid3-marker-hd { + padding:3px; +} + +.x-grid3-row .x-grid3-marker { + padding:3px; +} + +.x-grid3-cell-inner, .x-grid3-hd-inner{ + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + padding:3px 3px 3px 5px; + white-space: nowrap; +} + +.x-grid3-hd-inner { + position:relative; + cursor:inherit; + padding:4px 3px 4px 5px; +} + +.x-grid3-row-body { + white-space:normal; +} + +.x-grid3-body-cell { + -moz-outline:0 none; + outline:0 none; +} +/* IE Quirks to clip */ +.ext-ie .x-grid3-cell-inner, .ext-ie .x-grid3-hd-inner{ + width:100%; +} +/* reverse above in strict mode */ +.ext-strict .x-grid3-cell-inner, .ext-strict .x-grid3-hd-inner{ + width:auto; +} + +.x-grid3-col { + +} + +.x-grid-row-loading { + background: #fff url(../images/default/shared/loading-balls.gif) no-repeat center center; +} +.x-grid-page { + overflow:hidden; +} +.x-grid3-row { + cursor: default; + border:1px solid #ededed; + border-top-color:#fff; + /*border-bottom: 1px solid #ededed;*/ + width:100%; +} +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border:1px solid #dddddd; + background: #efefef url(../images/default/grid/row-over.gif) repeat-x left top; +} + +.x-grid3-resize-proxy { + width:1px; + left:0; + background-color:#777; + cursor: e-resize; + cursor: col-resize; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} +.x-grid3-resize-marker { + width:1px; + left:0; + background-color:#777; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} +.x-grid3-focus { + position:absolute; + top:0; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: normal; + -khtml-user-select: normal; +} + +/* header styles */ +.x-grid3-header{ + background: #f9f9f9 url(../images/default/grid/grid3-hrow.gif) repeat-x 0 bottom; + cursor:default; + zoom:1; + padding:1px 0 0 0; +} + +.x-grid3-header-pop { + border-left:1px solid #d0d0d0; + float:right; + clear:none; +} +.x-grid3-header-pop-inner { + border-left:1px solid #eee; + width:14px; + height:19px; + background: transparent url(../images/default/grid/hd-pop.gif) no-repeat center center; +} +.ext-ie .x-grid3-header-pop-inner { + width:15px; +} +.ext-strict .x-grid3-header-pop-inner { + width:14px; +} +.x-grid3-header-inner { + overflow:hidden; + zoom:1; + float:left; +} +.x-grid3-header-offset { + padding-left:1px; + width:10000px; +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left:1px solid #aaccf6; + border-right:1px solid #aaccf6; +} +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background: #ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom; + +} +.x-grid3-sort-icon{ + background-repeat: no-repeat; + display: none; + height: 4px; + width: 13px; + margin-left:3px; + vertical-align: middle; +} +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_asc.gif); + display: inline; +} +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_desc.gif); + display: inline; +} + +/* Header position fixes for IE strict mode */ +.ext-strict .ext-ie .x-grid3-header-inner{position:relative;} +.ext-strict .ext-ie6 .x-grid3-hd{position:relative;} +.ext-strict .ext-ie6 .x-grid3-hd-inner{position:static;} + +/* Body Styles */ +.x-grid3-body { + zoom:1; +} +.x-grid3-scroller { + overflow:auto; + zoom:1; + position:relative; +} +.x-grid3-cell-text, .x-grid3-hd-text { + display: block; + padding: 3px 5px 3px 5px; + -moz-user-select: none; + -khtml-user-select: none; + color:black; +} +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); + background-position: center; + background-repeat: no-repeat; + cursor: e-resize; + cursor: col-resize; + display: block; + font-size: 1px; + height: 16px; + overflow: hidden; + position: absolute; + top: 2px; + width: 6px; + z-index: 3; +} + +.x-grid3-hd-text { + color:#15428b; +} +/* Column Reorder DD */ +.x-dd-drag-proxy .x-grid3-hd-inner{ + background: #ebf3fd url(../images/default/grid/grid3-hrow-over.gif) repeat-x left bottom; + width:120px; + padding:3px; + border:1px solid #aaccf6; + overflow:hidden; +} + +.col-move-top, .col-move-bottom{ + width:9px; + height:9px; + position:absolute; + top:0; + line-height:1px; + font-size:1px; + overflow:hidden; + visibility:hidden; + z-index:20000; +} +.col-move-top{ + background:transparent url(../images/default/grid/col-move-top.gif) no-repeat left top; +} +.col-move-bottom{ + background:transparent url(../images/default/grid/col-move-bottom.gif) no-repeat left top; +} + +/* Selection Styles */ +.x-grid3-row-selected { + background: #DFE8F6 !important; + border:1px dotted #a3bae9; +} + +.x-grid3-cell-selected{ + background-color: #B8CFEE !important; + color: black; +} +.x-grid3-cell-selected span{ + color: black !important; +} +.x-grid3-cell-selected .x-grid3-cell-text{ + color: black; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background: #ebeadb url(../images/default/grid/grid-hrow.gif) repeat-x 0 bottom !important; + vertical-align:middle !important; + color:black; + padding:0; + border-top:1px solid white; + border-bottom:none !important; + border-right:1px solid #6fa0df !important; + text-align:center; +} +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + padding:0 4px; + color:#15428b !important; + text-align:center; +} + +/* dirty cells */ +.x-grid3-dirty-cell { + background: transparent url(../images/default/grid/dirty.gif) no-repeat 0 0; +} + +/* Grid Toolbars */ +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; + overflow:hidden; + display:none; + zoom:1; + position:relative; +} +.x-grid3-topbar .x-toolbar{ + border-right:0 none; +} +.x-grid3-bottombar .x-toolbar{ + border-right:0 none; + border-bottom:0 none; + border-top:1px solid #a9bfd3; +} +/* Props Grid Styles */ +.x-props-grid .x-grid3-cell{ + padding:1px; +} +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y -16px !important; + padding-left:12px; + color:black !important; +} +.x-props-grid .x-grid3-body .x-grid3-td-name{ + padding:1px; + padding-right:0; + background:white !important; + border:0 none; + border-right:1px solid #eeeeee; +} + +/* header menu */ +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +/* dd */ +.x-grid3-col-dd { + border:0 none; + padding:0; + background:transparent; +} + +.x-dd-drag-ghost .x-grid3-dd-wrap { + padding:1px 3px 3px 1px; +} + +.x-grid3-hd { + -moz-user-select:none; +} + +.x-grid3-hd-btn { + display:none; + position:absolute; + width:14px; + background:#c3daf9 url(../images/default/grid/grid3-hd-btn.gif) no-repeat left center; + right:0; + top:0; + z-index:2; + cursor:pointer; +} + +.x-grid3-hd-over .x-grid3-hd-btn, .x-grid3-hd-menu-open .x-grid3-hd-btn { + display:block; +} + +a.x-grid3-hd-btn:hover { + background-position:-14px center; +} + +/* Expanders */ + +.x-grid3-body .x-grid3-td-expander { + background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; +} +.x-grid3-body .x-grid3-td-expander .x-grid3-cell-inner { + padding:0 !important; + height:100%; +} +.x-grid3-row-expander { + width:100%; + height:18px; + background-position:4px 2px; + background-repeat:no-repeat; + background-color:transparent; + background-image:url(../images/default/grid/row-expand-sprite.gif); +} +.x-grid3-row-collapsed .x-grid3-row-expander { + background-position:4px 2px; +} +.x-grid3-row-expanded .x-grid3-row-expander { + background-position:-21px 2px; +} +.x-grid3-row-collapsed .x-grid3-row-body { + display:none !important; +} +.x-grid3-row-expanded .x-grid3-row-body { + display:block !important; +} + +/* Checkers */ + +.x-grid3-body .x-grid3-td-checker { + background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; +} + +.x-grid3-body .x-grid3-td-checker .x-grid3-cell-inner, .x-grid3-header .x-grid3-td-checker .x-grid3-hd-inner { + padding:0 !important; + height:100%; +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + width:100%; + height:18px; + background-position:2px 2px; + background-repeat:no-repeat; + background-color:transparent; + background-image:url(../images/default/grid/row-check-sprite.gif); +} +.x-grid3-row .x-grid3-row-checker { + background-position:2px 2px; +} +.x-grid3-row-selected .x-grid3-row-checker, .x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 2px; +} +.x-grid3-hd-checker { + background-position:2px 3px; +} +.x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 3px; +} + +/* Numberer */ + +.x-grid3-body .x-grid3-td-numberer { + background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; +} +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + padding:3px 5px 0 0 !important; + text-align:right; + color:#444; +} + +/* All specials */ + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background:transparent url(../images/default/grid/grid3-special-col-sel-bg.gif) repeat-y right; +} +.x-grid3-body .x-grid3-check-col-td .x-grid3-cell-inner { + padding: 1px 0 0 0 !important; +} + +.x-grid3-check-col { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; + background-image:url(../images/default/menu/unchecked.gif); +} + + +.x-grid3-check-col-on { + width:100%; + height:16px; + background-position:center center; + background-repeat:no-repeat; + background-color:transparent; + background-image:url(../images/default/menu/checked.gif); +} + +/* Grouping classes */ +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} +.x-grid-group-hd { + border-bottom: 2px solid #99bbe8; + cursor:pointer; + padding-top:6px; +} +.x-grid-group-hd div { + background:transparent url(../images/default/grid/group-expand-sprite.gif) no-repeat 3px -47px; + padding:4px 4px 4px 17px; + color:#3764a0; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} +.x-grid-group-collapsed .x-grid-group-hd div { + background-position: 3px 3px; +} +.x-grid-group-collapsed .x-grid-group-body { + display:none; +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.ext-ie .x-grid3 .x-editor .x-form-text { /* ie bug */ + position:relative; + top:-1px; +} + +.x-grid-empty { + padding:10px; + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/layout.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/layout.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/layout.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,263 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-border-layout-ct { + background:#dfe8f6; +} +.x-border-panel { + position:absolute; + left:0; + top:0; +} + +.x-tool-collapse-south { + background-position:0 -195px; +} +.x-tool-collapse-south-over { + background-position:-15px -195px; +} + +.x-tool-collapse-north { + background-position:0 -210px; +} +.x-tool-collapse-north-over { + background-position:-15px -210px; +} + +.x-tool-collapse-west { + background-position:0 -180px; +} +.x-tool-collapse-west-over { + background-position:-15px -180px; +} + +.x-tool-collapse-east { + background-position:0 -165px; +} +.x-tool-collapse-east-over { + background-position:-15px -165px; +} + + +.x-tool-expand-south { + background-position:0 -210px; +} +.x-tool-expand-south-over { + background-position:-15px -210px; +} + +.x-tool-expand-north { + background-position:0 -195px; +} +.x-tool-expand-north-over { + background-position:-15px -195px; +} + +.x-tool-expand-west { + background-position:0 -165px; +} +.x-tool-expand-west-over { + background-position:-15px -165px; +} + +.x-tool-expand-east { + background-position:0 -180px; +} +.x-tool-expand-east-over { + background-position:-15px -180px; +} + +.x-tool-expand-north, .x-tool-expand-south { + float:right; + margin:3px; +} +.x-tool-expand-east, .x-tool-expand-west { + float:none; + margin:3px auto; +} + + + +.x-accordion-hd .x-tool-toggle { + background-position:0 -255px; +} +.x-accordion-hd .x-tool-toggle-over { + background-position:-15px -255px; +} +.x-panel-collapsed .x-accordion-hd .x-tool-toggle { + background-position:0 -240px; +} +.x-panel-collapsed .x-accordion-hd .x-tool-toggle-over { + background-position:-15px -240px; +} + +.x-accordion-hd { + color:#222; + padding-top:4px; + padding-bottom:3px; + border-top:0 none; + font-weight:normal; + background: transparent url(../images/default/panel/light-hd.gif) repeat-x 0 -9px; +} + +.x-layout-collapsed{ + position:absolute; + left:-10000px; + top:-10000px; + visibility:hidden; + background-color:#d2e0f2; + width:20px; + height:20px; + overflow:hidden; + border:1px solid #98c0f4; + z-index:20; +} +.ext-border-box .x-layout-collapsed{ + width:22px; + height:22px; +} +.x-layout-collapsed-over{ + cursor:pointer; + background-color:#d9e8fb; +} +.x-layout-collapsed-west .x-layout-collapsed-tools, .x-layout-collapsed-east .x-layout-collapsed-tools{ + position:absolute; + top:0; + left:0; + width:20px; + height:20px; +} + + +.x-layout-split{ + position:absolute; + height:5px; + width:5px; + line-height:1px; + font-size:1px; + z-index:3; + background-color:transparent; +} + +.x-layout-split-h{ + background-image:url(../images/default/s.gif); + background-position: left; +} +.x-layout-split-v{ + background-image:url(../images/default/s.gif); + background-position: top; +} + +.x-column-layout-ct { + overflow:hidden; + /*padding:3px 3px 3px 3px;*/ + zoom:1; +} + +.x-column { + float:left; + padding:0; + margin:0; + overflow:hidden; + zoom:1; + /*margin:3px;*/ +} + +/* mini mode */ + +.x-layout-mini { + position:absolute; + top:0; + left:0; + display:block; + width:5px; + height:35px; + cursor:pointer; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); +} +.x-layout-mini-over, .x-layout-collapsed-over .x-layout-mini{ + opacity:1; + -moz-opacity:1; + filter:none; +} + +.x-layout-split-west .x-layout-mini { + top:48%; + background-image:url(../images/default/layout/mini-left.gif); +} +.x-layout-split-east .x-layout-mini { + top:48%; + background-image:url(../images/default/layout/mini-right.gif); +} +.x-layout-split-north .x-layout-mini { + left:48%; + height:5px; + width:35px; + background-image:url(../images/default/layout/mini-top.gif); +} +.x-layout-split-south .x-layout-mini { + left:48%; + height:5px; + width:35px; + background-image:url(../images/default/layout/mini-bottom.gif); +} + + +.x-layout-cmini-west .x-layout-mini { + top:48%; + background-image:url(../images/default/layout/mini-right.gif); +} + +.x-layout-cmini-east .x-layout-mini { + top:48%; + background-image:url(../images/default/layout/mini-left.gif); +} + +.x-layout-cmini-north .x-layout-mini { + left:48%; + height:5px; + width:35px; + background-image:url(../images/default/layout/mini-bottom.gif); +} + +.x-layout-cmini-south .x-layout-mini { + left:48%; + height:5px; + width:35px; + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-layout-cmini-west, .x-layout-cmini-east { + border:0 none; + width:5px !important; + padding:0; + background:transparent; +} + +.x-layout-cmini-north, .x-layout-cmini-south { + border:0 none; + height:5px !important; + padding:0; + background:transparent; +} + +.x-viewport, .x-viewport body { + margin: 0; + padding: 0; + border: 0 none; + overflow: hidden; + height: 100%; +} + +.x-abs-layout-item { + position:absolute; + left:0; + top:0; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/menu.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/menu.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/menu.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,134 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-menu { + border: 1px solid #718bb7; + z-index: 15000; + zoom: 1; + background: #f0f0f0 url(../images/default/menu/menu.gif) repeat-y; + padding: 2px; +} +.x-menu a { + text-decoration: none !important; +} +.ext-ie .x-menu { + zoom:1; + overflow:hidden; +} +.x-menu-list{ + background:transparent; + border:0 none; +} +.x-menu li{ + line-height:100%; +} +.x-menu li.x-menu-sep-li{ + font-size:1px; + line-height:1px; +} +.x-menu-list-item{ + font:normal 11px tahoma,arial, sans-serif; + white-space: nowrap; + -moz-user-select: none; + -khtml-user-select: none; + display:block; + padding:1px; +} +.x-menu-item-arrow{ + background:transparent url(../images/default/menu/menu-parent.gif) no-repeat right; +} +.x-menu-sep { + display:block; + font-size:1px; + line-height:1px; + margin: 2px 3px; + background-color:#e0e0e0; + border-bottom:1px solid #fff; +} +.x-menu-focus { + position:absolute; + left:0; + top:-5px; + width:0; + height:0; + line-height:1px; +} +.x-menu a.x-menu-item { + display:block; + line-height:16px; + padding:3px 21px 3px 3px; + white-space: nowrap; + text-decoration:none; + color:#222; + -moz-outline: 0 none; + outline: 0 none; + cursor:pointer; +} +.x-menu-item-active { + background: #ebf3fd url(../images/default/menu/item-over.gif) repeat-x left bottom; + border:1px solid #aaccf6; + padding: 0; +} +.x-menu-item-active a.x-menu-item { + color: #233d6d; +} + +.x-menu-item-icon { + border: 0 none; + height: 16px; + padding: 0; + vertical-align: top; + width: 16px; + margin: 0 8px 0 0; + background-position:center; +} + +.x-menu-check-item .x-menu-item-icon{ + background: transparent url(../images/default/menu/unchecked.gif) no-repeat center; +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} +.x-menu-group-item .x-menu-item-icon{ + background: transparent; +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background: transparent url(../images/default/menu/group-checked.gif) no-repeat center; +} + +.x-menu-plain { + background:#fff !important; +} +.x-menu-date-item{ + padding:0; +} + +.x-menu .x-color-palette, .x-menu .x-date-picker{ + margin-left: 26px; + margin-right:4px; +} +.x-menu .x-date-picker{ + border:1px solid #a3bad9; + margin-top:2px; + margin-bottom:2px; +} +.x-menu-plain .x-color-palette, .x-menu-plain .x-date-picker{ + margin: 0; + border: 0 none; +} +.x-date-menu { + padding:0 !important; +} + +.x-cycle-menu .x-menu-item-checked { + border:1px dotted #a3bae9 !important; + background:#DFE8F6; + padding:0; +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/panel.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/panel.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/panel.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,411 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-panel { + border-style: solid; + border-color: #99bbe8; + border-width:0; +} + +.x-panel-header { + overflow:hidden; + zoom:1; + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; + padding:5px 3px 4px 5px; + border:1px solid #99bbe8; + line-height: 15px; + background: transparent url(../images/default/panel/white-top-bottom.gif) repeat-x 0 -1px; +} + +.x-panel-body { + border:1px solid #99bbe8; + border-top:0 none; + overflow:hidden; + background:white; +} + +.x-panel-bbar .x-toolbar { + border:1px solid #99bbe8; + border-top:0 none; + overflow:hidden; + padding:2px; +} + +.x-panel-tbar .x-toolbar { + border:1px solid #99bbe8; + border-top:0 none; + overflow:hidden; + padding:2px; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-top:1px solid #99bbe8; + border-bottom: 0 none; +} +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-top:1px solid #99bbe8; +} +.x-panel-header { + overflow:hidden; + zoom:1; +} +.x-panel-tl .x-panel-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; + padding:5px 0 4px 0; + border:0 none; + background:transparent; +} +.x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { + padding-left:20px !important; + background-repeat:no-repeat; + background-position:0 4px; + zoom:1; +} +.x-panel-inline-icon { + width:16px; + height:16px; + background-repeat:no-repeat; + background-position:0 0; + vertical-align:middle; + margin-right:4px; + margin-top:-1px; + margin-bottom:-1px; +} +.x-panel-tc { + background: transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 0; + overflow:hidden; +} +.x-panel-tl { + background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 0; + padding-left:6px; + zoom:1; + border-bottom:1px solid #99bbe8; +} +.x-panel-tr { + background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat right 0; + zoom:1; + padding-right:6px; +} +.x-panel-bc { + background: transparent url(../images/default/panel/top-bottom.gif) repeat-x 0 bottom; + zoom:1; +} +.x-panel-bc .x-panel-footer { + zoom:1; +} + +.x-panel-bl { + background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat 0 bottom; + padding-left:6px; + zoom:1; +} +.x-panel-br { + background: transparent url(../images/default/panel/corners-sprite.gif) no-repeat right bottom; + padding-right:6px; + zoom:1; +} +.x-panel-mc { + border:0 none; + padding:0; + margin:0; + font: normal 11px tahoma,arial,helvetica,sans-serif; + padding-top:6px; + background:#dfe8f6; +} +.x-panel-mc .x-panel-body { + background:transparent; + border: 0 none; +} +.x-panel-ml { + background: #fff url(../images/default/panel/left-right.gif) repeat-y 0 0; + padding-left:6px; + zoom:1; +} +.x-panel-mr { + background: transparent url(../images/default/panel/left-right.gif) repeat-y right 0; + padding-right:6px; + zoom:1; +} +.x-panel-bc .x-panel-footer { + padding-bottom:6px; +} +.x-panel-nofooter .x-panel-bc { + height:6px; + font-size:0; + line-height:0; +} + +.x-panel-bwrap { + overflow:hidden; + zoom:1; +} +.x-panel-body { + overflow:hidden; + zoom:1; +} + +.x-panel-collapsed .x-resizable-handle{ + display:none; +} + +.ext-gecko .x-panel-animated div { + overflow:hidden !important; +} + +/* Plain */ +.x-plain-body { + overflow:hidden; +} + +.x-plain-bbar .x-toolbar { + overflow:hidden; + padding:2px; +} + +.x-plain-tbar .x-toolbar { + overflow:hidden; + padding:2px; +} + +.x-plain-bwrap { + overflow:hidden; + zoom:1; +} + +.x-plain { + overflow:hidden; +} + +/* Tools */ +.x-tool { + overflow:hidden; + width:15px; + height:15px; + float:right; + cursor:pointer; + background:transparent url(../images/default/panel/tool-sprites.gif) no-repeat; + margin-left:2px; +} + +/* expand / collapse tools */ +.x-tool-toggle { + background-position:0 -60px; +} +.x-tool-toggle-over { + background-position:-15px -60px; +} +.x-panel-collapsed .x-tool-toggle { + background-position:0 -75px; +} +.x-panel-collapsed .x-tool-toggle-over { + background-position:-15px -75px; +} + +.x-tool-close { + background-position:0 -0; +} +.x-tool-close-over { + background-position:-15px 0; +} + +.x-tool-minimize { + background-position:0 -15px; +} +.x-tool-minimize-over { + background-position:-15px -15px; +} + +.x-tool-maximize { + background-position:0 -30px; +} +.x-tool-maximize-over { + background-position:-15px -30px; +} + +.x-tool-restore { + background-position:0 -45px; +} +.x-tool-restore-over { + background-position:-15px -45px; +} + +.x-tool-gear { + background-position:0 -90px; +} +.x-tool-gear-over { + background-position:-15px -90px; +} + +.x-tool-pin { + background-position:0 -135px; +} +.x-tool-pin-over { + background-position:-15px -135px; +} +.x-tool-unpin { + background-position:0 -150px; +} +.x-tool-unpin-over { + background-position:-15px -150px; +} +.x-tool-right { + background-position:0 -165px; +} +.x-tool-right-over { + background-position:-15px -165px; +} +.x-tool-left { + background-position:0 -180px; +} +.x-tool-left-over { + background-position:-15px -180px; +} +.x-tool-up { + background-position:0 -210px; +} +.x-tool-up-over { + background-position:-15px -210px; +} +.x-tool-down { + background-position:0 -195px; +} +.x-tool-down-over { + background-position:-15px -195px; +} +.x-tool-refresh { + background-position:0 -225px; +} +.x-tool-refresh-over { + background-position:-15px -225px; +} + +.x-tool-minus { + background-position:0 -255px; +} +.x-tool-minus-over { + background-position:-15px -255px; +} +.x-tool-plus { + background-position:0 -240px; +} +.x-tool-plus-over { + background-position:-15px -240px; +} + +.x-tool-search { + background-position:0 -270px; +} +.x-tool-search-over { + background-position:-15px -270px; +} +.x-tool-save { + background-position:0 -285px; +} +.x-tool-save-over { + background-position:-15px -285px; +} +.x-tool-help { + background-position:0 -300px; +} +.x-tool-help-over { + background-position:-15px -300px; +} + +/* Ghosting */ +.x-panel-ghost { + background:#cbddf3; + z-index:12000; + overflow:hidden; + position:absolute; + left:0;top:0; + opacity:.65; + -moz-opacity:.65; + filter:alpha(opacity=65); +} + +.x-panel-ghost ul { + margin:0; + padding:0; + overflow:hidden; + font-size:0; + line-height:0; + border:1px solid #99bbe8; + border-top:0 none; + display:block; +} + +.x-panel-ghost * { + cursor:move !important; +} + +.x-panel-dd-spacer { + border:2px dashed #99bbe8; +} +/* Buttons */ + +.x-panel-btns-ct { + padding:5px; +} + +.x-panel-btns-ct .x-btn{ + float:right; + clear:none; +} +.x-panel-btns-ct .x-panel-btns td { + border:0; + padding:0; +} +.x-panel-btns-ct .x-panel-btns-right table{ + float:right; + clear:none; +} +.x-panel-btns-ct .x-panel-btns-left table{ + float:left; + clear:none; +} +.x-panel-btns-ct .x-panel-btns-center{ + text-align:center; /*ie*/ +} +.x-panel-btns-ct .x-panel-btns-center table{ + margin:0 auto; /*everyone else*/ +} +.x-panel-btns-ct table td.x-panel-btn-td{ + padding:3px; +} + +.x-panel-btns-ct .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} +.x-panel-btns-ct .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} +.x-panel-btns-ct .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-panel-btns-ct .x-btn-over .x-btn-left{ + background-position:0 -63px; +} +.x-panel-btns-ct .x-btn-over .x-btn-right{ + background-position:0 -84px; +} +.x-panel-btns-ct .x-btn-over .x-btn-center{ + background-position:0 -105px; +} + +.x-panel-btns-ct .x-btn-click .x-btn-center{ + background-position:0 -126px; +} +.x-panel-btns-ct .x-btn-click .x-btn-right{ + background-position:0 -84px; +} +.x-panel-btns-ct .x-btn-click .x-btn-left{ + background-position:0 -63px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/progress.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/progress.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/progress.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,43 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-progress-wrap { + border:1px solid #6593cf; + overflow:hidden; +} +.x-progress-inner { + height:18px; + background: #e0e8f3 url(../images/default/qtip/bg.gif) repeat-x; + position:relative; +} +.x-progress-bar { + height:18px; + float:left; + width:0; + background:#9CBFEE url( ../images/default/progress/progress-bg.gif ) repeat-x left center; + border-top:1px solid #D1E4FD; + border-bottom:1px solid #7FA9E4; + border-right:1px solid #7FA9E4; +} +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; + padding:1px 5px; + overflow:hidden; + position:absolute; + left:0; + text-align:center; +} +.x-progress-text-back { + color:#396095; + line-height:16px; +} +.ext-ie .x-progress-text-back { + line-height:15px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/qtips.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/qtips.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/qtips.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,134 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-tip{ + position: absolute; + top: 0; + left:0; + visibility: hidden; + z-index: 20000; + border:0 none; +} +.x-tip .x-tip-close{ + background-image: url(../images/default/qtip/close.gif); + height: 15px; + float:right; + width: 15px; + margin:0 0 2px 2px; + cursor:pointer; + display:none; +} +.x-tip .x-tip-tc { + background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -62px; + padding-top:3px; + overflow:hidden; + zoom:1; +} +.x-tip .x-tip-tl { + background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 0; + padding-left:6px; + overflow:hidden; + zoom:1; +} +.x-tip .x-tip-tr { + background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right 0; + padding-right:6px; + overflow:hidden; + zoom:1; +} +.x-tip .x-tip-bc { + background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -121px; + height:3px; + overflow:hidden; +} +.x-tip .x-tip-bl { + background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -59px; + padding-left:6px; + zoom:1; +} +.x-tip .x-tip-br { + background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -59px; + padding-right:6px; + zoom:1; +} +.x-tip .x-tip-mc { + border:0 none; + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background: #fff url(../images/default/qtip/tip-sprite.gif) no-repeat 0 -124px; + padding-left:6px; + zoom:1; +} +.x-tip .x-tip-mr { + background: transparent url(../images/default/qtip/tip-sprite.gif) no-repeat right -124px; + padding-right:6px; + zoom:1; +} +.ext-ie .x-tip .x-tip-header,.ext-ie .x-tip .x-tip-tc { + font-size:0; + line-height:0; +} +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + padding:0; + margin:0 0 2px 0; + color:#444; +} +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + margin:0 !important; + line-height:14px; + color:#444; + padding:0; +} + +.x-tip .x-tip-body .loading-indicator { + margin:0; +} + +.x-tip-draggable .x-tip-header,.x-tip-draggable .x-tip-header-text { + cursor:move; +} + +.x-form-invalid-tip { +} + +.x-form-invalid-tip .x-tip-tc { + background: url(../images/default/form/error-tip-corners.gif) repeat-x 0 -12px; + padding-top:6px; +} +.x-form-invalid-tip .x-tip-tl { + background-image: url(../images/default/form/error-tip-corners.gif); +} +.x-form-invalid-tip .x-tip-tr { + background-image: url(../images/default/form/error-tip-corners.gif); +} +.x-form-invalid-tip .x-tip-bc { + background: url(../images/default/form/error-tip-corners.gif) repeat-x 0 -18px; + height:6px; +} +.x-form-invalid-tip .x-tip-bl { + background: url(../images/default/form/error-tip-corners.gif) no-repeat 0 -6px; +} +.x-form-invalid-tip .x-tip-br { + background: url(../images/default/form/error-tip-corners.gif) no-repeat right -6px; +} +.x-form-invalid-tip .x-tip-ml { + background-image: url(../images/default/form/error-tip-corners.gif); +} +.x-form-invalid-tip .x-tip-mr { + background-image: url(../images/default/form/error-tip-corners.gif); +} +.x-form-invalid-tip .x-tip-body { + padding:2px; +} +.x-form-invalid-tip .x-tip-body { + padding-left:24px; + background:transparent url(../images/default/form/exclamation.gif) no-repeat 2px 2px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/reset-min.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/reset-min.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/reset-min.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/reset.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/reset.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/reset.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/resizable.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/resizable.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/resizable.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,143 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-resizable-handle { + position:absolute; + z-index:100; + /* ie needs these */ + font-size:1px; + line-height:6px; + overflow:hidden; + background:white; + filter:alpha(opacity=0); + opacity:0; + zoom:1; +} +.x-resizable-handle-east{ + width:6px; + cursor:e-resize; + right:0; + top:0; + height:100%; +} +.ext-ie .x-resizable-handle-east { + margin-right:-1px; /*IE rounding error*/ +} +.x-resizable-handle-south{ + width:100%; + cursor:s-resize; + left:0; + bottom:0; + height:6px; +} +.ext-ie .x-resizable-handle-south { + margin-bottom:-1px; /*IE rounding error*/ +} +.x-resizable-handle-west{ + width:6px; + cursor:w-resize; + left:0; + top:0; + height:100%; +} +.x-resizable-handle-north{ + width:100%; + cursor:n-resize; + left:0; + top:0; + height:6px; +} +.x-resizable-handle-southeast{ + width:6px; + cursor:se-resize; + right:0; + bottom:0; + height:6px; + z-index:101; +} +.x-resizable-handle-northwest{ + width:6px; + cursor:nw-resize; + left:0; + top:0; + height:6px; + z-index:101; +} +.x-resizable-handle-northeast{ + width:6px; + cursor:ne-resize; + right:0; + top:0; + height:6px; + z-index:101; +} +.x-resizable-handle-southwest{ + width:6px; + cursor:sw-resize; + left:0; + bottom:0; + height:6px; + z-index:101; +} +.x-resizable-over .x-resizable-handle, .x-resizable-pinned .x-resizable-handle{ + filter:alpha(opacity=100); + opacity:1; +} +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east{ + background:url(../images/default/sizer/e-handle.gif); + background-position: left; +} +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west{ + background:url(../images/default/sizer/e-handle.gif); + background-position: left; +} +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south{ + background:url(../images/default/sizer/s-handle.gif); + background-position: top; +} +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background:url(../images/default/sizer/s-handle.gif); + background-position: top; +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background:url(../images/default/sizer/se-handle.gif); + background-position: top left; +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background:url(../images/default/sizer/nw-handle.gif); + background-position:bottom right; +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background:url(../images/default/sizer/ne-handle.gif); + background-position: bottom left; +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background:url(../images/default/sizer/sw-handle.gif); + background-position: top right; +} +.x-resizable-proxy{ + border: 1px dashed #3b5a82; + position:absolute; + overflow:hidden; + display:none; + left:0;top:0; + z-index:50000; +} +.x-resizable-overlay{ + width:100%; + height:100%; + display:none; + position:absolute; + left:0; + top:0; + background:white; + z-index:200000; + -moz-opacity: 0; + opacity:0; + filter: alpha(opacity=0); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/tabs.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/tabs.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/tabs.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,341 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-tab-panel { + overflow:hidden; +} +.x-tab-panel-header, .x-tab-panel-footer { + background: #deecfd; + border: 1px solid #8db2e3; + overflow:hidden; + zoom:1; +} + + +.x-tab-panel-header { + border: 1px solid #8db2e3; + padding-bottom: 2px; +} + +.x-tab-panel-footer { + border: 1px solid #8db2e3; + padding-top: 2px; +} + + +.x-tab-strip-wrap { + width:100%; + overflow:hidden; + position:relative; + zoom:1; +} +ul.x-tab-strip { + display:block; + width:5000px; + zoom:1; +} + +ul.x-tab-strip-top{ + padding-top: 1px; + background: url(../images/default/tabs/tab-strip-bg.gif) #cedff5 repeat-x bottom; + border-bottom: 1px solid #8db2e3; +} + +ul.x-tab-strip-bottom{ + padding-bottom: 1px; + background: url(../images/default/tabs/tab-strip-btm-bg.gif) #cedff5 repeat-x top; + border-top: 1px solid #8db2e3; + border-bottom: 0 none; +} + +.x-tab-panel-header-plain .x-tab-strip-top { + background:transparent !important; + padding-top:0 !important; +} +.x-tab-panel-header-plain { + background:transparent !important; + border-width:0 !important; + padding-bottom:0 !important; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer { + border:1px solid #8db2e3; + border-top: 0 none; + height:2px; + background: #deecfd; + font-size:1px; + line-height:1px; +} + +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer { + height:3px; +} + + +ul.x-tab-strip li { + float:left; + margin-left:2px; +} + + +ul.x-tab-strip li.x-tab-edge { + float:left; + margin:0 !important; + padding:0 !important; + border:0 none !important; + font-size:1px !important; + line-height:1px !important; + overflow:hidden; + zoom:1; + background:transparent !important; + width:1px; +} + +.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { + display:block; +} + +.x-tab-strip a { + text-decoration:none !important; + -moz-outline: none; + outline: none; + cursor:pointer; +} + +.x-tab-strip-inner { + overflow:hidden; + text-overflow: ellipsis; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; + white-space: nowrap; + cursor:pointer; + padding:4px 0; +} +.x-tab-strip .x-tab-with-icon .x-tab-right { + padding-left:6px; +} +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { + padding-left:20px; + background-position: 0 3px; + background-repeat: no-repeat; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active { + cursor:default; +} + +.x-tab-strip-active span.x-tab-strip-text { + cursor:default; + color:#15428b; + font-weight:bold; +} + +.x-tab-strip-disabled .x-tabs-text { + cursor:default; + color:#aaaaaa; +} + +.x-tab-panel-body { + overflow:hidden; +} +.x-tab-panel-bwrap { + overflow:hidden; +} +.ext-ie .x-tab-strip .x-tab-right { + position:relative; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-right { + margin-bottom:-1px; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { + padding-bottom:5px; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + margin-top:-1px; +} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text { + padding-top:5px; +} + + +.x-tab-strip-top .x-tab-right { + background: transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat 0 -51px; + padding-left:10px; +} + +.x-tab-strip-top .x-tab-left { + background: transparent url(../images/default/tabs/tabs-sprite.gif) no-repeat right -351px; + padding-right:10px; +} + +.x-tab-strip-top .x-tab-strip-inner { + background: transparent url(../images/default/tabs/tabs-sprite.gif) repeat-x 0 -201px; +} + +.x-tab-strip-top .x-tab-strip-over .x-tab-right { + background-position:0 -101px; +} +.x-tab-strip-top .x-tab-strip-over .x-tab-left { + background-position:right -401px; +} +.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner { + background-position:0 -251px; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-right { + background-position: 0 0; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-left { + background-position: right -301px; +} + +.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner { + background-position: 0 -151px; +} + +.x-tab-strip-bottom .x-tab-right { + background: url(../images/default/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom right; +} + +.x-tab-strip-bottom .x-tab-left { + background: url(../images/default/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom left; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background: url(../images/default/tabs/tab-btm-right-bg.gif) no-repeat bottom left; +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background: url(../images/default/tabs/tab-btm-left-bg.gif) no-repeat bottom right; +} +.x-tab-strip-bottom .x-tab-left { + padding:0 10px; +} +.x-tab-strip-bottom .x-tab-right { + padding:0; +} +.x-tab-strip .x-tab-strip-close { + display:none; +} +.x-tab-strip-closable { + position:relative; +} + +.x-tab-strip-closable .x-tab-left { + padding-right:19px; +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/default/tabs/tab-close.gif); + opacity:.6; + -moz-opacity:.6; + background-repeat:no-repeat; + display:block; + width:11px;height:11px; + position:absolute; + top:3px; + right:3px; + cursor:pointer; + z-index:2; +} + +.x-tab-strip .x-tab-strip-active a.x-tab-strip-close { + opacity:.8; + -moz-opacity:.8; +} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/default/tabs/tab-close.gif); + opacity:1; + -moz-opacity:1; +} + +.x-tab-panel-body { + border: 1px solid #8db2e3; + background:#fff; +} +.x-tab-panel-body-top { + border-top: 0 none; +} +.x-tab-panel-body-bottom { + border-bottom: 0 none; +} + +.x-tab-scroller-left { + background: transparent url(../images/default/tabs/scroll-left.gif) no-repeat -18px 0; + border-bottom: 1px solid #8db2e3; + width:18px; + position:absolute; + left:0; + top:0; + z-index:10; + cursor:pointer; +} +.x-tab-scroller-left-over { + background-position: 0 0; +} +.x-tab-scroller-left-disabled { + background-position: -18px 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} +.x-tab-scroller-right { + background: transparent url(../images/default/tabs/scroll-right.gif) no-repeat 0 0; + border-bottom: 1px solid #8db2e3; + width:18px; + position:absolute; + right:0; + top:0; + z-index:10; + cursor:pointer; +} +.x-tab-scroller-right-over { + background-position: -18px 0; +} +.x-tab-scroller-right-disabled { + background-position: 0 0; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); + cursor:default; +} + +.x-tab-scrolling .x-tab-strip-wrap { + margin-left:18px; + margin-right:18px; +} + +.x-tab-scrolling { + position:relative; +} + +.x-tab-panel-bbar .x-toolbar { + border:1px solid #99bbe8; + border-top:0 none; + overflow:hidden; + padding:2px; +} + +.x-tab-panel-tbar .x-toolbar { + border:1px solid #99bbe8; + border-top:0 none; + overflow:hidden; + padding:2px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/toolbar.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/toolbar.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/toolbar.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,163 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-toolbar{ + border-color:#a9bfd3; + border-style:solid; + border-width:0 0 1px 0; + display: block; + padding:2px; + background:#d0def0 url(../images/default/toolbar/bg.gif) repeat-x top left; + position:relative; + zoom:1; +} +.x-toolbar .x-item-disabled .x-btn-icon { + opacity: .35; + -moz-opacity: .35; + filter: alpha(opacity=35); +} +.x-toolbar td { + vertical-align:middle; +} +.mso .x-toolbar, .x-grid-mso .x-toolbar{ + border: 0 none; + background: url(../images/default/grid/mso-hd.gif); +} +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + white-space: nowrap; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} +.x-toolbar .x-item-disabled { + color:gray; + cursor:default; + opacity:.6; + -moz-opacity:.6; + filter:alpha(opacity=60); +} +.x-toolbar .x-item-disabled * { + color:gray; + cursor:default; +} +.x-toolbar .x-btn-left{ + background:none; +} +.x-toolbar .x-btn-right{ + background:none; +} +.x-toolbar .x-btn-center{ + background:none; + padding:0 0; +} +.x-toolbar .x-btn-menu-text-wrap .x-btn-center button{ + padding-right:2px; +} +.ext-gecko .x-toolbar .x-btn-menu-text-wrap .x-btn-center button{ + padding-right:0; +} +.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button{ + padding:0 2px; +} + +.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button { + width:12px; + background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px; +} +.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button { + width:12px; + background:transparent url(../images/default/toolbar/btn-arrow.gif) no-repeat 0 3px; +} +.x-toolbar .x-btn-over .x-btn-menu-arrow-wrap .x-btn-center button { + background-position: 0 -47px; +} +.x-toolbar .x-btn-over .x-btn-left{ + background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 0; +} +.x-toolbar .x-btn-over .x-btn-right{ + background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -21px; +} +.x-toolbar .x-btn-over .x-btn-center{ + background: url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -42px; +} + +.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{ + background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -63px; +} +.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{ + background: url(../images/default/toolbar/tb-btn-sprite.gif) no-repeat 0 -84px; +} + +.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{ + background: url(../images/default/toolbar/tb-btn-sprite.gif) repeat-x 0 -105px; +} + +.x-toolbar .x-btn-with-menu .x-btn-center em{ + padding-right:8px; +} + +.x-toolbar .ytb-text{ + padding:2px; +} +.x-toolbar .ytb-sep { + background-image: url(../images/default/grid/grid-blue-split.gif); + background-position: center; + background-repeat: no-repeat; + display: block; + font-size: 1px; + height: 16px; + width:4px; + overflow: hidden; + cursor:default; + margin: 0 2px 0; + border:0; +} +.x-toolbar .ytb-spacer { + width:2px; +} + +/* Paging Toolbar */ + +.x-tbar-page-number{ + width:24px; + height:14px; +} +.x-tbar-page-first{ + background-image: url(../images/default/grid/page-first.gif) !important; +} +.x-tbar-loading{ + background-image: url(../images/default/grid/done.gif) !important; +} +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/loading.gif) !important; +} +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} +.x-paging-info { + position:absolute; + top:5px; + right: 8px; + color:#444; +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/tree.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/tree.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/tree.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,212 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-tree .x-panel-body{ + background-color:#fff; +} +.ext-strict .ext-ie .x-tree .x-panel-bwrap{ + position:relative; + overflow:hidden; +} +.x-tree-icon, .x-tree-ec-icon, .x-tree-elbow-line, .x-tree-elbow, .x-tree-elbow-end, .x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-repeat: no-repeat; +} +.x-tree-node-collapsed .x-tree-node-icon, .x-tree-node-expanded .x-tree-node-icon, .x-tree-node-leaf .x-tree-node-icon{ + border: 0 none; + height: 18px; + margin: 0; + padding: 0; + vertical-align: top; + width: 16px; + background-position:center; + background-repeat: no-repeat; +} +.ext-ie .x-tree-node-indent img, .ext-ie .x-tree-node-icon, .ext-ie .x-tree-ec-icon { + vertical-align:middle !important; +} +/* some default icons for leaf/folder */ +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} +.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +/* checkboxes */ +.ext-ie input.x-tree-node-cb { + width:15px; + height:15px; +} +input.x-tree-node-cb { + margin-left:1px; +} +.ext-ie input.x-tree-node-cb { + margin-left:0; +} + +.x-tree-noicon .x-tree-node-icon{ + width:0; height:0; +} +/* loading icon */ +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} +.ext-ie .x-tree-node-el input { + width:15px; + height:15px; +} +/* Line styles */ +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus.gif); +} +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus.gif); +} +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +/* No line styles */ +.x-tree-no-lines .x-tree-elbow{ + background:transparent; +} +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} +.x-tree-no-lines .x-tree-elbow-end{ + background:transparent; +} +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus-nl.gif); +} +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus-nl.gif); +} +.x-tree-no-lines .x-tree-elbow-line{ + background:transparent; +} + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} +.x-tree-node{ + color: black; + font: normal 11px arial, tahoma, helvetica, sans-serif; + white-space: nowrap; +} + +.x-tree-node-el { + line-height:18px; + cursor:pointer; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + text-decoration:none; + color:black; + -khtml-user-select:none; + -moz-user-select:none; + -kthml-user-focus:normal; + -moz-user-focus:normal; + -moz-outline: 0 none; + outline:0 none; +} +.x-tree-node a span, .x-dd-drag-ghost a span{ + text-decoration:none; + color:black; + padding:1px 3px 1px 2px; +} +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} +.x-tree-node .x-tree-node-disabled .x-tree-node-icon{ + -moz-opacity: 0.5; + opacity:.5; + filter: alpha(opacity=50); +} +.x-tree-node .x-tree-node-inline-icon{ + background:transparent; +} +.x-tree-node a:hover, .x-dd-drag-ghost a:hover{ + text-decoration:none; +} +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom:1px dotted #3366cc; +} +.x-tree-node div.x-tree-drag-insert-above{ + border-top:1px dotted #3366cc; +} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below{ + border-bottom:0 none; +} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above{ + border-top:0 none; +} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom:2px solid #3366cc; +} +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top:2px solid #3366cc; +} +.x-tree-node .x-tree-drag-append a span{ + background:#dddddd; + border:1px dotted gray; +} +.x-tree-node .x-tree-node-over { + background-color: #eee; +} +.x-tree-node .x-tree-selected { + background-color: #d9e8fb; +} +.x-dd-drag-ghost .x-tree-node-indent, .x-dd-drag-ghost .x-tree-ec-icon{ + display:none !important; +} +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/window.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/window.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/window.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,210 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-window { + zoom:1; +} +.x-window .x-resizable-handle { + opacity:0; + -moz-opacity:0; + filter:alpha(opacity=0); +} + +.x-window-proxy { + background:#C7DFFC; + border:1px solid #99bbe8; + z-index:12000; + overflow:hidden; + position:absolute; + left:0;top:0; + display:none; + opacity:.5; + -moz-opacity:.5; + filter:alpha(opacity=50); +} + +.x-window-header { + overflow:hidden; + zoom:1; +} +.x-window-bwrap { + z-index:1; + position:relative; + zoom:1; +} +.x-window-tl .x-window-header { + color:#15428b; + font:bold 11px tahoma,arial,verdana,sans-serif; + padding:5px 0 4px 0; +} +.x-window-header-text { + cursor:pointer; +} +.x-window-tc { + background: transparent url(../images/default/window/top-bottom.png) repeat-x 0 0; + overflow:hidden; + zoom:1; +} +.x-window-tl { + background: transparent url(../images/default/window/left-corners.png) no-repeat 0 0; + padding-left:6px; + zoom:1; + z-index:1; + position:relative; +} +.x-window-tr { + background: transparent url(../images/default/window/right-corners.png) no-repeat right 0; + padding-right:6px; +} +.x-window-bc { + background: transparent url(../images/default/window/top-bottom.png) repeat-x 0 bottom; + zoom:1; +} +.x-window-bc .x-window-footer { + padding-bottom:6px; + zoom:1; + font-size:0; + line-height:0; +} +.x-window-bl { + background: transparent url(../images/default/window/left-corners.png) no-repeat 0 bottom; + padding-left:6px; + zoom:1; +} +.x-window-br { + background: transparent url(../images/default/window/right-corners.png) no-repeat right bottom; + padding-right:6px; + zoom:1; +} +.x-window-mc { + border:1px solid #99bbe8; + padding:0; + margin:0; + font: normal 11px tahoma,arial,helvetica,sans-serif; + background:#dfe8f6; +} + + +.x-window-ml { + background: transparent url(../images/default/window/left-right.png) repeat-y 0 0; + padding-left:6px; + zoom:1; +} +.x-window-mr { + background: transparent url(../images/default/window/left-right.png) repeat-y right 0; + padding-right:6px; + zoom:1; +} +.x-panel-nofooter .x-window-bc { + height:6px; +} +.x-window-body { + overflow:hidden; +} +.x-window-bwrap { + overflow:hidden; +} +.x-window-maximized .x-window-bl, .x-window-maximized .x-window-br, + .x-window-maximized .x-window-ml, .x-window-maximized .x-window-mr, + .x-window-maximized .x-window-tl, .x-window-maximized .x-window-tr { + padding:0; +} +.x-window-maximized .x-window-footer { + padding-bottom:0; +} +.x-window-maximized .x-window-tc { + padding-left:3px; + padding-right:3px; + background-color:white; +} +.x-window-maximized .x-window-mc { + border-left:0 none; + border-right:0 none; +} +.x-window-tbar .x-toolbar, .x-window-bbar .x-toolbar { + border-left:0 none; + border-right: 0 none; +} +.x-window-bbar .x-toolbar { + border-top:1px solid #99bbe8; + border-bottom:0 none; +} +.x-window-draggable, .x-window-draggable .x-window-header-text { + cursor:move; +} +.x-window-maximized .x-window-draggable, .x-window-maximized .x-window-draggable .x-window-header-text { + cursor:default; +} +.x-window-body { + background:transparent; +} +.x-panel-ghost .x-window-tl { + border-bottom:1px solid #99bbe8; +} +.x-panel-collapsed .x-window-tl { + border-bottom:1px solid #84a0c4; +} +.x-window-maximized-ct { + overflow:hidden; +} +.x-window-maximized .x-resizable-handle { + display:none; +} +.x-window-sizing-ghost ul { + border:0 none !important; +} + + +.x-dlg-focus{ + -moz-outline:0 none; + outline:0 none; + width:0; + height:0; + overflow:hidden; + position:absolute; + top:0; + left:0; +} +.x-dlg-mask{ + z-index:10000; + display:none; + position:absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity:.50; + filter: alpha(opacity=50); + background-color:#CCC; +} + +body.ext-ie6.x-body-masked select { + visibility:hidden; +} +body.ext-ie6.x-body-masked .x-window select { + visibility:visible; +} + +.x-window-plain .x-window-mc { + background: #CAD9EC; + border-right:1px solid #DFE8F6; + border-bottom:1px solid #DFE8F6; + border-top:1px solid #a3bae9; + border-left:1px solid #a3bae9; +} + +.x-window-plain .x-window-body { + border-left:1px solid #DFE8F6; + border-top:1px solid #DFE8F6; + border-bottom:1px solid #a3bae9; + border-right:1px solid #a3bae9; + background:transparent !important; +} + +body.x-body-masked .x-window-plain .x-window-mc { + background: #C7D6E9; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/xtheme-gray.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/xtheme-gray.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/css/xtheme-gray.css 4 Dec 2007 02:48:41 -0000 1.1 @@ -0,0 +1,415 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-panel { + border-style: solid; + border-color: #d0d0d0; +} +.x-panel-header { + color:#333; + border:1px solid #d0d0d0; + background-image:url(../images/gray/panel/white-top-bottom.gif); +} + +.x-panel-body { + border-color:#d0d0d0; +} + +.x-panel-bbar .x-toolbar { + border-color:#d0d0d0; +} + +.x-panel-tbar .x-toolbar { + border-color:#d0d0d0; +} + +.x-panel-tbar-noheader .x-toolbar, .x-panel-mc .x-panel-tbar .x-toolbar { + border-color:#d0d0d0; +} +.x-panel-body-noheader, .x-panel-mc .x-panel-body { + border-color:#d0d0d0; +} +.x-panel-tl .x-panel-header { + color:#333; +} +.x-panel-tc { + background-image:url(../images/gray/panel/top-bottom.gif); +} +.x-panel-tl { + background-image:url(../images/gray/panel/corners-sprite.gif); + border-color:#d0d0d0; +} +.x-panel-tr { + background-image:url(../images/gray/panel/corners-sprite.gif); +} +.x-panel-bc { + background-image:url(../images/gray/panel/top-bottom.gif); +} +.x-panel-bl { + background-image:url(../images/gray/panel/corners-sprite.gif); +} +.x-panel-br { + background-image:url(../images/gray/panel/corners-sprite.gif); +} +.x-panel-mc { + background:#f1f1f1; +} +.x-panel-mc .x-panel-body { + background:transparent; + border: 0 none; +} +.x-panel-ml { + background-image:url(../images/gray/panel/left-right.gif); +} +.x-panel-mr { + background-image:url(../images/gray/panel/left-right.gif); +} + +/* Tools */ +.x-tool { + background-image:url(../images/gray/panel/tool-sprites.gif); +} + +/* Ghosting */ +.x-panel-ghost { + background:#e0e0e0; +} + +.x-panel-ghost ul { + border-color:#b0b0b0; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border:1px solid #d0d0d0; +} + +/* Buttons */ + +.x-btn-left{ + background-image:url(../images/gray/button/btn-sprite.gif); +} +.x-btn-right{ + background-image:url(../images/gray/button/btn-sprite.gif); +} +.x-btn-center{ + background-image:url(../images/gray/button/btn-sprite.gif); +} + +/* Layout classes */ + +.x-border-layout-ct { + background:#f0f0f0; +} + +.x-accordion-hd { + background-image:url(../images/gray/panel/light-hd.gif); +} + +.x-layout-collapsed{ + background-color:#eee; + border-color:#e0e0e0; +} +.x-layout-collapsed-over{ + background-color:#fbfbfb; +} + + +/* qtips */ +.x-tip .x-tip-top { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} +.x-tip .x-tip-top-left { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} +.x-tip .x-tip-top-right { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} +.x-tip .x-tip-ft { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} +.x-tip .x-tip-ft-left { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} +.x-tip .x-tip-ft-right { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} +.x-tip .x-tip-bd-left { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} +.x-tip .x-tip-bd-right { + background-image:url(../images/gray/qtip/tip-sprite.gif); +} + +/* Toolbars */ + +.x-toolbar{ + border-color:#d0d0d0; + background:#f0f4f5 url(../images/gray/toolbar/bg.gif) repeat-x top left; +} +.x-toolbar button { + color:#444; +} +.x-toolbar .x-btn-menu-arrow-wrap .x-btn-center button { + background-image:url(../images/gray/toolbar/btn-arrow.gif); +} +.x-toolbar .x-btn-text-icon .x-btn-menu-arrow-wrap .x-btn-center button { + background-image:url(../images/gray/toolbar/btn-arrow.gif); +} +.x-toolbar .x-btn-over .x-btn-left{ + background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); +} +.x-toolbar .x-btn-over .x-btn-right{ + background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); +} +.x-toolbar .x-btn-over .x-btn-center{ + background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); +} +.x-toolbar .x-btn-over button { + color:#111; +} +.x-toolbar .x-btn-click .x-btn-left, .x-toolbar .x-btn-pressed .x-btn-left, .x-toolbar .x-btn-menu-active .x-btn-left{ + background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); +} +.x-toolbar .x-btn-click .x-btn-right, .x-toolbar .x-btn-pressed .x-btn-right, .x-toolbar .x-btn-menu-active .x-btn-right{ + background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); +} + +.x-toolbar .x-btn-click .x-btn-center, .x-toolbar .x-btn-pressed .x-btn-center, .x-toolbar .x-btn-menu-active .x-btn-center{ + background-image:url(../images/gray/toolbar/tb-btn-sprite.gif); +} +.x-toolbar .ytb-sep { + background-image: url(../images/default/grid/grid-split.gif); +} + +/* Tabs */ + +.x-tab-panel-header, .x-tab-panel-footer { + background: #EAEAEA; + border-color:#d0d0d0; +} + + +.x-tab-panel-header { + border-color:#d0d0d0; +} + +.x-tab-panel-footer { + border-color:#d0d0d0; +} + +ul.x-tab-strip-top{ + background:#dbdbdb url(../images/gray/tabs/tab-strip-bg.gif) repeat-x left top; + border-color:#d0d0d0; + padding-top: 2px; +} + +ul.x-tab-strip-bottom{ + background-image:url(../images/gray/tabs/tab-strip-btm-bg.gif); + border-color:#d0d0d0; +} + +.x-tab-strip span.x-tab-strip-text { + color:#333; +} +.x-tab-strip-over span.x-tab-strip-text { + color:#111; +} + +.x-tab-strip-active span.x-tab-strip-text { + color:#333; +} + +.x-tab-strip-disabled .x-tabs-text { + color:#aaaaaa; +} + +.x-tab-strip-top .x-tab-right { + background-image:url(../images/gray/tabs/tabs-sprite.gif); +} + +.x-tab-strip-top .x-tab-left { + background-image:url(../images/gray/tabs/tabs-sprite.gif); +} +.x-tab-strip-top .x-tab-strip-inner { + background-image:url(../images/gray/tabs/tabs-sprite.gif); +} + +.x-tab-strip-bottom .x-tab-right { + background-image:url(../images/gray/tabs/tab-btm-inactive-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-left { + background-image:url(../images/gray/tabs/tab-btm-inactive-left-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right { + background-image:url(../images/gray/tabs/tab-btm-right-bg.gif); +} + +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background-image:url(../images/gray/tabs/tab-btm-left-bg.gif); +} + +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + background-image:url(../images/gray/tabs/tab-close.gif); +} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{ + background-image:url(../images/gray/tabs/tab-close.gif); +} + +.x-tab-panel-body { + border-color:#d0d0d0; + background:#fff; +} +.x-tab-panel-bbar .x-toolbar { + border-color: #d0d0d0; +} + +.x-tab-panel-tbar .x-toolbar { + border-color: #d0d0d0; +} + +.x-tab-panel-header-plain .x-tab-strip-spacer { + border-color:#d0d0d0; + background: #eaeaea; +} + +.x-tab-scroller-left { + background-image: url(../images/gray/tabs/scroll-left.gif); + border-color:#aeaeae; +} +.x-tab-scroller-right { + background-image: url(../images/gray/tabs/scroll-right.gif); + border-color:#aeaeae; +} + +/* Window */ + +.x-window-proxy { + background:#e0e0e0; + border-color:#b0b0b0; +} + +.x-window-tl .x-window-header { + color:#555; +} +.x-window-tc { + background-image:url(../images/gray/window/top-bottom.png); +} +.x-window-tl { + background-image:url(../images/gray/window/left-corners.png); +} +.x-window-tr { + background-image:url(../images/gray/window/right-corners.png); +} +.x-window-bc { + background-image:url(../images/gray/window/top-bottom.png); +} +.x-window-bl { + background-image:url(../images/gray/window/left-corners.png); +} +.x-window-br { + background-image:url(../images/gray/window/right-corners.png); +} +.x-window-mc { + border:1px solid #d0d0d0; + background:#e8e8e8; +} + +.x-window-ml { + background-image:url(../images/gray/window/left-right.png); +} +.x-window-mr { + background-image:url(../images/gray/window/left-right.png); +} +.x-panel-ghost .x-window-tl { + border-color:#d0d0d0; +} +.x-panel-collapsed .x-window-tl { + border-color:#d0d0d0; +} + +.x-window-plain .x-window-mc { + background: #e8e8e8; + border-right:1px solid #eee; + border-bottom:1px solid #eee; + border-top:1px solid #d0d0d0; + border-left:1px solid #d0d0d0; +} + +.x-window-plain .x-window-body { + border-left:1px solid #eee; + border-top:1px solid #eee; + border-bottom:1px solid #d0d0d0; + border-right:1px solid #d0d0d0; + background:transparent !important; +} + +body.x-body-masked .x-window-mc, body.x-body-masked .x-window-plain .x-window-mc { + background-color: #e4e4e4; +} + + +/* misc */ +.x-html-editor-wrap { + border-color:#d0d0d0; +} + +/* Borders go last for specificity */ +.x-panel-noborder .x-panel-body-noborder { + border-width:0; +} + +.x-panel-noborder .x-panel-header-noborder { + border-width:0; + border-bottom:1px solid #d0d0d0; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-width:0; + border-bottom:1px solid #d0d0d0; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-width:0; + border-top:1px solid #d0d0d0; +} + +.x-window-noborder .x-window-mc { + border-width:0; +} +.x-window-plain .x-window-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-body-noborder { + border-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-header-noborder { + border-top-width:0; + border-left-width:0; + border-right-width:0; +} + +.x-tab-panel-noborder .x-tab-panel-footer-noborder { + border-bottom-width:0; + border-left-width:0; + border-right-width:0; +} + + +.x-tab-panel-bbar-noborder .x-toolbar { + border-width:0; + border-top:1px solid #d0d0d0; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-width:0; + border-bottom:1px solid #d0d0d0; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/gradient-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/gradient-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/s.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/s.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shadow-c.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shadow-c.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shadow-lr.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shadow-lr.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shadow.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shadow.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/corners-blue.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/corners-blue.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/corners.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/corners.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/l-blue.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/l-blue.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/l.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/l.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/r-blue.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/r-blue.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/r.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/r.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/tb-blue.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/tb-blue.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/tb.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/box/tb.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/button/btn-arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/button/btn-arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/button/btn-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/button/btn-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/dd/drop-add.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/dd/drop-add.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/dd/drop-no.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/dd/drop-no.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/dd/drop-yes.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/dd/drop-yes.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/editor/tb-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/editor/tb-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/clear-trigger.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/clear-trigger.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/clear-trigger.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/clear-trigger.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/clear-trigger.psd 4 Dec 2007 02:48:43 -0000 1.1 @@ -0,0 +1,150 @@ +8BPSf�8BIM7200705288BIM Tf4�8����JFIF[[��f��� + +# !"!%'$ '!!   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?����[[�m:)�ج +��<�HϷz��8�Gde:���e��4��ux����N��)Zd�\n^�s�QR)YK� +u!U7 +l�a�tk-2�{�m2%�ˈI-��ÀN����滢��H��vq�t��$��X�t[�� ��J�[V :��g�b2;q�v�ޛ��&��͉{&�Ii��̳�t�if��E���`O��)ԝNnX����� +|�in�2�h�z?��6B@����ۜgq�3Y�Z��ݾf�Ν�eq�]���ZkR�%�Q��� ��O���e*��m'�6Dc�]-o$X�\��pE�J���m�ZF�b�� ���:Ը�W�zo�)J��Ik����iz]αz�i� �o U6��KI��{�R�:� +�{���J0sj�e�y�C}���-f� +!������i�]�r�9w��M�ފ����Ij�_���=K�T�Ht�8ա��� +!��p=��D*TT��{���(A�+-�OB�iZ��5����J�� T#��ƏiZ���G�Jײ����me����_� +JF�n+�Rr��w����1������+�����sV^w�t�3.D|`�-�b��5xѼ��=:�}���&��4H��結[�H�K `7\㎕8���>u�r�St���z�����Cqo�*G)�=�b�ʹc�c�� +^��1x���ӨMp��5�,M�|���G'��9J����^@�>~���u8Ԭ٥�"���1ԸG���ԉͩ&���OSѵ+�v}V;;Y"[�q`n0/vd ����;|� Uƭ��~����o� +T�)s?_[u�r��[@�_1D� +�g��V)N�FX��+7��������� +�������W���O�d�D����?�v��Cju7�/��]}Y=@�Ga������kIl�?VU.����R}�BW��/�%_�^��#�E��%����,�딿�*���W�e?�]����dx��A���Q��t�~?��}���8BIM���8BIM8BIM��fpbp8BIMnorm�<(�������������������� +Backgroundb���ZZ8BIMnorm�<(��������������������Raster 1�~�~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~����~�~�~��~�~����~�~�~��~�~����~�~�~��~�~����~�~�~��~�~����~�~�~��~�~����~�~�~��~�~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~𸸭����������������������������������������������������������������������������������������������������������������������������������������������������������������������������Э��������Э�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ȸ�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������9[^VRKORZ^W������������,��,,��,�,��,,��,����,��,,��,�,��,,��,�������D���������D�����,��,,��,�����D���������D�����,��,,��, +���������� +��������������D����� +���������� +��������������D����,������,�,������,� +����������,������,�,������,� +���������D����D�D����D�,������,�D����D�D����D�,������,,������,�,������,�D����D�,������,�,������,�D����D +���������� +����������,������,� +���������� +����������,������,����D���������D����� +��������������D���������D����� +���������,��,,��,�,��,,��,�����D�����,��,,��,�,��,,��,�����D����������,��,,��,�������,��,,��,������"HRRRLPRRR<������������������������������������������������������������������������� +��`����`��� +��`����`�������������� +��`����`��� +��`����`������������� +��0��0���� +��0��0���� +��`����`��� +��0��0���� +��0��0���� +��`����`�����0�0��������0�0����� +��0��0�������0�0��������0�0����� +��0��0������X��������X��������0�0��������X��������X��������0�0�������X�X��������X�X��������X��������X�X��������X�X��������X���� +��X�ԀX���� +��X�ԀX�������X�X����� +��X�ԀX���� +��X�ԀX�������X�X���� +��X���ۀX��� +��X���ۀX��� +��X�ԀX���� +��X���ۀX��� +��X���ۀX��� +��X�ԀX������������������������� +��X���ۀX������������������������� +��X���ۀX�����������������������������������������������������"HRRRLPRRR<������������������������������������������������������������������������� +���������� +��������������������� +���������� +�������������������� +������ +������ +���������� +������ +������ +������������x�x��������x�x����� +���������x�x��������x�x����� +��������z��������z��������x�x��������z��������z��������x�x�������z�z��������z�z��������z��������z�z��������z�z��������z���� +��z�ޘz���� +��z�ޘz�������z�z����� +��z�ޘz���� +��z�ޘz�������z�z���� +��z���ߐz��� +��z���ߐz��� +��z�ޘz���� +��z���ߐz��� +��z���ߐz��� +��z�ޘz������������������������� +��z���ߐz������������������������� +��z���ߐz�����������������������������������������������������" >RRLHFNR<������������������������������������������������������������������������������������������������������������������������������������������������������������������аа��������аа��������������������аа��������аа���������������������������������������аа����������������������������аа�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������8Xhld^dllh`48Xhld\bhldP(0RhhbV`frfH(�~�~�����~��~��~��~��~�����~��~��~��~��~�����~��~��~��~��~���������������������~��~����������~����������~��~���������������������������~����������~�������������~�������������~����������~����b����b������� +��a����a����~�������������~�� +��a����a����~�� +��b����b����~�������������~�� +��0��0�������� +��0��0�����~�� +��a����a����~�� +��0��0�����~�� +��0��0�����~�� +��a����a����~����0�0���������ށ0�0�����~�� +��0��0�����~���ށ0�0�����~����0�0�����~�� +��0��0�����~����X����������߀X������~���ށ0�0�����~����߀X������~�����X������~���ށ0�0�����~����X�X�������� +��܁X�X������~����݀X��İ��~�� +��܁X�X������~���߁X�X�����~����݀X��İ��~�� +��X�ՁX�������� +�ہX�сX�۽��~�� +��ہX�X�ۼ���~�� +�ہX�сX�۽��~�� +�ށX�ӁX�����~�� +��ہX�X�ۼ���~�� +��Z���ہZ������� +��Y���ՁY���~�� +�ځX�сX�ڵ��~�� +��Y���ՁY���~�� +��Y���؁Y����~�� +�ځX�сX�ڵ��~���������������� +����Ǽ���Ǽ��~�� +��Y���ӁYߵ��~�� +����Ǽ���Ǽ��~�������������~�� +��Y���ӁYߵ��~������������������������~�� +���Ӽ���ּ���~�������������~����������~�� +���Ӽ���ּ���~����~�������������~�~��~�������������~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~����~��~�~��~��~𸸭������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ +�������������� +�������������������������� +������������ +������������������������������ +���������� +�븀���������� +����︩������� +�븀���������� +�﹀�﹀�������� +����︩���������x�x����������x�x�������� +�글�츀����������x�x����������x�x�������� +�글�츀����������z�����������z�����������x�x�����������z�����������z����������x�x����������z�z����������z�z�����������z������Э����z�z����������z�z�����������z������Э�� +��z�ޙz�������� +��z�ܙz����������z�z�������� +��z�ܙz�������� +��z�ޙz����������z�z�������� +��{���ޑ{������� +��{���ܑ{������� +��z�ݙz�������� +��{���ܑ{������� +��{���ߑ{������� +��z�ݙz������������������������������������ +��{���ܑ{����������������������������������� +��{���ܑ{����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ȸ������������������������������������������������������������������������������������������������������������������������������������������������������������������������ +���������������� +������������������������������ +����������������������������������������� +���������������� +���������������� +���������������� +���������������������������� +������������������аа����������аа�������� +������������������аа���������Ѱа������� +������������������������������������������аа��������������������������������аа���������������������������������������������������������������������������������������������������������� +�����거���������������������� +�����거������������챰����������������������������������������������������� +�����거�������������������������������������� +�����거������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/date-trigger.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/date-trigger.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/date-trigger.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/date-trigger.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/date-trigger.psd 4 Dec 2007 02:48:43 -0000 1.1 @@ -0,0 +1,23 @@ +8BPSf *8BIM7200705308BIM �f4������JFIF[[��f��� + +# !"!%'$ '!!   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�U֤��.l��Y��nʏ)��b����k�1�*r���a)��F7��h~'����e�{]]���v��H�t��%���vEk�z�MX������A�yi�!�����Dz�N:T:���_�uC V��)^���h���q��a&����|�I"�1"��H�:�?.H��qiߚ��7��]y�]۵�̩���QWit]�GP�2�R_j^Ьm" I=֣k i���ed�}H�f�B*��N�xZ�e�N��d�'�m&���U�E��E��`XՂ��T�$|܁޴I�t����g������*Tܔ�U�}= ��l�8O��}�|UsO�~/��g�� +����i{m>K ���e�H<��'}5P�������m}uWۯ���a�Ԧ��ꎯI���β������;�O ��s���ӎ��J��������S�e$�_�0i���4]CL�Z�a��46�i�D���r���H����ڼTC*jRi���uV�:э=7W��ɥE���-�W[���i��� +��k/̖8���~3����]x�JP�*�� +S�g+��S+���o'�S��<듩�]��]Bћ�py��n��ݳ%w�Ն +(�Si���vVǷ�tU���ۛ�ݭ}v���64IoH$��}���Q��{w��RJ����y�Y7RW���?� +���kb�!�%��D��$�I�yfvK�y��O�nkΧO��e�?���j8�e��+n���ڮ��;Y������3��$0����ʠh�d�;����^��h����a���O��i��/ +��G7~#H�mqi/�{n>�o*�������Zd�mY~l�3��{��ǹ��>��z�kg���{���m����&�Gpi�ؕT\���=M{3��+ow�#Ã���/͛Z��������BX��H���[]�y�?�$d��2���u<9<6��Ӵ����[jZ��� P��^�j1J�r�L�1U�V��'vܛ��w�)��z$�g�s�&ɝl��$L��6�dnFd�ݑ��<�Ƿ���j)�����F�O��<��F>���E��a�w|�yH�� +�4���\�D�ڊ���׹�C� ��g��Wu��V����v���}]��d�׊z��8�� n��1@�������W���O�d�D���mo.n~�m �n��� l~�f����/�ǫ���&��@�?���G3������� U-����K��j�Խ����פ�2Zq�~�%�_/�4h��H�Y��EVF�p�FA��:?��g=���1��4��Y�߅� +\ϸ�!���LD��8T� X�(����8BIMnorm�<(��������������������Raster 1 �@�~@�~@�~@�~@�~@��׵���~���~���~���~���~���������~��~����~����~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~ ��������������ٸ��ϭ��ϭ��ϭ��ϭ��ϭ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Э��������Э���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@��@��@��@��@��@�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� +������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� @HZfNZfBT2 +��w����w����w����w���w��w���w���w��w���w��w�������w�w�������w��w�w�������w�w�������w��w�w�����w�w�����w�w�������w�w�����w�w�����w�w�������w�w����������w�w����������w�w�����w�w����������w�w����������w�w�����w�w����������w�w����������w�w����������w�w����������w�w����������w�w����������w�w�����w�w�����w�w����������w�w�����w�w�����w�w����������w�w����������w�w����������w�w�����w�w����������w�w����������w�w�����w�w����������w�w����������w�w����������w�w����������w�w����������w�w����������w�w��w�w��w�w����������w�w��w�w��w�w����������w�w����������w�w����������w�w��w�w����������w�w����������w�w��w��w��w�w����������w��w��w�w����������w���w��w� @HZfNZfBT2 +�������������������������������������������������ޒ��������ޒ�����������ޒ��������ޒ��������ޒ�����ޒ��������ޒ�����ޒ�����ޒ��������ޒ���������������������������ޒ���������������������������ޒ�����������������������������������������������������������������������ޒ�����ޒ����������������ޒ�����ޒ����������������������ޒ�����������ޒ�����ޒ�����������ޒ�����������ޒ�����ޒ�����������ޒ�����������ޒ�����������ޒ�����������ޒ�����������ޒ�����������ޒ���������������������ޒ���������������������ޒ�����������ޒ�����������ޒ����������������ޒ�����������ޒ����������������������ޒ�����������������ޒ�������� @HZfNZfBT2 +�������������������������������������������������޷��������޷�����������޷��������޷��������޷�����޷��������޷�����޷�����޷��������޷���������������������������޷���������������������������޷�����������������������������������������������������������������������޷�����޷����������������޷�����޷����������������������޷�����������޷�����޷�����������޷�����������޷�����޷�����������޷�����������޷�����������޷�����������޷�����������޷�����������޷���������������������޷���������������������޷�����������޷�����������޷����������������޷�����������޷����������������������޷�����������������޷�������� 48T\nzbnzVhJ$ 48T\nz`nzVhJ$58U]o{cnzVhJ$�@�~@�~@�~@�~@�~@��׵���~���~���~���~���~���������~��~����~����~��~�������~��~���~���~��~����w��������w���~��~����w���~����w���~��~���w������w��~����w���~���w��~���w��~����w���~��w�������w�����w�������w��~���w��~��w�������w��~��w�������w��~���w��~��w�����w�����w�����w��~��w�������w��~��w�����w��~��w�����w��~��w�������w��~��w����������w�����w����������w��~��w�����w��~��w����������w��~��w����������w��~��w�����w��~��w����������w�����w����������w��~��w����������w��~��w����������w��~��w����������w��~��w����������w��~��w�����w�����w�����w��~��w����������w��~��w�����w��~��w�����w��~��w����������w��~��w����������w�����w����������w��~��w�����w��~��w����������w��~��w����������w��~��w�����w��~��w����������w�����w����������w��~��w����������w��~��w����������w��~��w����������w��~��w����������w��~��w��w�����w��w��~��w����������w��~��w��w��~��w��w��~��w����������w��~��w����������w�����w����������w��~��w��w��~��w����������w��~��w����������w��~��w��w��~���w������w��~��w����������w��~���w��~���w��~��w����������w��~������~���w��~��~���~���w��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~��������������ٸ��ϭ��ϭ��ϭ��ϭ��ϭ�������������������������������������������������������������������������������������������������������������������������������������������������ޒ������������ޒ�������������������ޒ������������ޒ����������������ޒ���������ޒ������������ޒ���������ޒ���������ޒ������������ޒ���������������������������������������ޒ���������������������������������������ޒ���������������������������������������������������������������������������������������������������ޒ���������ޒ���������������Э������ޒ��������ޒ���������������Э������������ޒ���������������ޒ��������ޒ���������������ޒ��������������ޒ��������ޒ���������������ޒ���������������ޒ��������������ޒ���������������ޒ��������������ޒ��������������ޒ��������������������������������ޒ�������������������������������ޒ���������������ޒ���������������ޒ�����������������������ޒ��������������ޒ������������������������������������ޒ���������������������������ޒ���������������������������������������������������������������������������������������������������������������������������������������������������������������������@��@��@��@��@��@����������������������������������������������������������������������������������������������������������������������������������������������������������������������޷������������޷�������������������޷������������޷����������������޷���������޷������������޷���������޷���������޷������������޷���������������������������������������޷���������������������������������������޷���������������������������������������������������������������������������������������������������޷���������޷������������������������޷���������޷������������������������������޷���������������޷���������޷���������������޷���������������޷���������޷���������������޷���������������޷���������������޷���������������޷���������������޷���������������޷���������������������������������޷���������������������������������޷���������������޷���������������޷������������������������޷���������������޷��������������������������������������޷�����������������������������޷��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/error-tip-corners.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/error-tip-corners.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/exclamation.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/exclamation.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/search-trigger.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/search-trigger.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/search-trigger.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/search-trigger.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/form/search-trigger.psd 4 Dec 2007 02:48:43 -0000 1.1 @@ -0,0 +1,50 @@ +8BPSf�8BIM7200705288BIM �f4�i����JFIF[[��f��� + +# !"!%'$ '!!   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�K�Z���[o/C�����[���ƻ���k� +JU�����g6&����Wm�"����]SXmW���gz���Ud�h��OOƮ�{Jr��� ���){:����ٔ�o���I��i6wR4X��2�`(�^������-8;+wvI��EJ�4���$��Xj�ǫZ��ׅ�{6�,-��TgQ��l(��q��Z��AʕF���g(�F�4����2g�t�(隸�����{���F^�a4�i�{m��W��w�Q�J�^�$�O6fZj�-Ķ�o�e�����@��Q�J�3ֺ%N�S����6c +��\��ͭͭ&�N���k"�Ϝ�l��|�'���RIJ.��n�m{�$�7�J�e/uo�vF"��� +q�!���~o;ˈ�#�<�/oL��q�Nk������>��/sk+{Of�>W���i�6�.�9m.���!p>Υr^PX `d*���'$�����[+4��wn�gG���6��K���n�O%�Ε�.�L���y\F�M���o `��+�Sq�jUjO׮���S�nT��w�h������i�����IWl*��c*J���:�|�r�~�]��^�W���j�Ҝ�5���c���6ڄ���S��)���D[�B�q�#�k��(��|��v�2�8�\�����[�@�eׇ�5=*8�)�d�0���jK +�tqQRK[I]_����4+�M�5~�w���s�(��#.�k�L.�42NS�H��:�bx=>�aj��Sr���o/3֯Nu��t�SkšΟ�յMXjZ� ����C1�PO$�I�c_��Ӎ�{��4�A�\�wg5�d�|L-�)e �@��ww�0<��+7EU�h��ƣvQK���NRR�v�1J�%�XYk�:8���9��ȹ�����(�'�)�Q����v��9NrJ2j˷�kX׵=:����tڕ��ط�Oݫ�/# +jR��RvV�z��M�]�C>��������x��ZR*�m� +�ɌK����qҵ�"��c K��wNJ��OC���Ku��;�J+�Bd��8�mb��1�P�Ӂ���+�B-Y��m�k�~�����(�M� ��c��=�a�BK�R��$z�T�Ҕ��.�;�� +�q����֦��Ɲ���m4�6�a���q���'�ƹ��ܛݵ����TvW�K@�ŗ7� ����k-Za=����Dž +%!F�v�l{�Qa��m����Ra:�nJ��'����<-i� ��1�d�R��$b���I��(��Vs���#���|θ��0X�+��'Ӊ�ж��Z���l�mb]��{�l߼��Feu����*q�#d~�����_��3�y��m�f�̲]�H���@Z�[/O՗K��f�п�1[��#�?�-5���DK��_�4(���VC� s�#1�j���R$�j��Eݥb�K�ԭ6%�1�S� ����F�p��¾���8BIM���8BIM8BIMf���8BIMnorm�<(�������������������� +Background����e�� ���8BIMnorm�8(��������������������Icons �@�~@�~@�~@�~@�~@��׵���~���~���~���~���~���������~��~����~����~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~ ��������������ٸ��ϭ��ϭ��ϭ��ϭ��ϭ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Э��������Э���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@��@��@��@��@��@��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������*JXdkh^Z^hmkhfN>5����������3�A3�3�A3���3�A3�3�A3����6a����R�6a����R�3�A3�6a����R�6a����R�3�A3��Q������T�Q������T�6a����R�Q������T�Q������T�6a����R��2��������R�2��������R�Q������T�2��������R�2��������R�Q������T�A��������2�A��������2�2��������R�A��������2�A��������2�2��������R�C�������A�C�������A�A��������2�C�������A�C�������A�A��������2�C�������A�C�������A�C�������A�C�������A�C�������A�C�������A�F�������2�F�������2�C�������A�F�������2�F�������2�C�������A�d�������R�d�������R�F�������2�d�������R�d�������R�F�������2T��������T�T��������T�d�������RT��������T�T��������T�d�������RR����˼���R�R����˼���R�T��������TR����˼���R�R����˼���R�T��������T +2����dGCA3� +2����dGCA3�R����˼���R� +2����dGCA3� +2����dGCA3�R����˼���R�?���T ��?���T �� +2����dGCA3�?���T ��?���T �� +2����dGCA3�1���R�1���R�?���T ��1���R�1���R�?���T ��1?3�1?3�1���R�1?3�1?3�1���R���1?3���1?3����4JZbddd`^\L@:  +���������������������������������������������������������������������������^�6l������^�6l���������������^�6l������^�6l���������������`6b��X6p������`6b��X6p������^�6l������`6b��X6p������`6b��X6p������^�6l���� �7`����O7������ �7`����O7�������`6b��X6p����� �7`����O7������ �7`����O7�������`6b��X6p���� �7������7������ �7������7������ �7`����O7������ �7������7������ �7������7������ �7`����O7����� �8�����8������ �8�����8������ �7������7������ �8�����8������ �8�����8������ �7������7����� �8L����B=������ �8L����B=������ �8�����8������ �8L����B=������ �8L����B=������ �8�����8������?8C�|?8�������?8C�|?8������ �8L����B=�������?8C�|?8�������?8C�|?8������ �8L����B=������E7Z�7?������E7Z�7?�������?8C�|?8������E7Z�7?�������E7Z�7?�������?8C�|?8������?1p�߼�����?1p�߼��������E7Z�7?������?1p�߼��������?1p�߼��������E7Z�7?������8*k����8*k�������?1p�߼��������8*k�������8*k�������?1p�߼�������� d���� d�������8*k������� d������� d�������8*k������������������ d��������������������� d���������������������������������������������������4JZbddd`^\L@:  +��������������������������������������������������������������������������������������������������������������������������������񚁜�ǖ�������񚁜�ǖ����������������񚁜�ǖ�������񚁜�ǖ��������������� �x�����x������ �x�����x������񚁜�ǖ������� �x�����x������ �x�����x������񚁜�ǖ������ �q�����q������ �q�����q������ �x�����x������ �q�����q������ �q�����q������ �x�����x����� �k�����k������ �k�����k������ �q�����q������ �k�����k������ �k�����k������ �q�����q����� �gu����nj������ �gu����nj������ �k�����k������ �gu����nj������ �gu����nj������ �k�����k������lgo��lg�������lgo��lg������ �gu����nj�������lgo��lg�������lgo��lg������ �gu����nj������oe��ej������oe��ej�������lgo��lg������oe��ej�������oe��ej�������lgo��lg������f[���������f[������������oe��ej������f[������������f[������������oe��ej������ZN�����ZN��������f[������������ZN��������ZN��������f[������������>y����>y�������ZN��������>y�������>y�������ZN�������������������>y���������������������>y���������������������������������������������������4JZbddd`^\L@:  +�������������������������������������������������������������������������������������������������������������������������������������ɽ���Ƚ�������ɽ���Ƚ�����������������ɽ���Ƚ�������ɽ���Ƚ��������������� �������������� ���������������ɽ���Ƚ������ �������������� ���������������ɽ���Ƚ����� ѵ�����յ������ ѵ�����յ������ �������������� ѵ�����յ������ ѵ�����յ������ ������������� ұ�����ϱ������ ұ�����ϱ������ ѵ�����յ������ ұ�����ϱ������ ұ�����ϱ������ ѵ�����յ����� 䯷���������� 䯷���������� ұ�����ϱ������ 䯷���������� 䯷���������� ұ�����ϱ�����貯��ɲ�������貯��ɲ������� 䯷����������貯��ɲ�������貯��ɲ������� 䯷���������籬���������籬����������貯��ɲ������籬����������籬����������貯��ɲ������䢛��������䢛�����������籬���������䢛�����������䢛�����������籬���������ߍ�����ߍ��������䢛�����������ߍ��������ߍ��������䢛������������j�����j�������ߍ���������j��������j�������ߍ��������������������j����������������������j����������������������������������������������������.]fnmllllikjreQE=(.NdlllkkkjkjqbOC<(.H`ikkmkkjiiiZHA4"�@�~@�~@�~@�~@�~@������׵�������~���~�������~�������~���~�����������������������������~����������~��������������~�������������~����������~�� +����ɤ���������� +���徜�������~�������������~�� +���徜�������~�����Ƣ�������~�������������~�����~G�=J������������xE�<G�����~�� +���߹��������~������xE�<G�����~�����|F�=I�����~�� +���߹��������~�����q`����QK�������ܺ=`����QG���~�����l:c��ZE����~���ܺ=`����QG���~�����=`����QJ���~�����l:c��ZE����~����<������>�������ڜ;������=���~���ع=`����QG���~���ڜ;������=���~����<������=���~���ع=`����QG���~����=�����?�������ٟ<�����>���~���؛;������=���~���ٟ<�����>���~����=�����>���~���؛;������=���~�����=L����DP����������K�P�����M^��ۻ�2�B�SJ+w�͏�����g��ߕ� +^ڧ�?��e�~��ټא��i)[� kdr�� �N=��┓���w��wd��DR�MJV���]��4�Fߍ�����1���jy����f��?ʾ�?L�t��Y�iV$5�/���T6�T�1�HU�=*d��}ok���J�Wv�fJ�5Q�v�Eݚ���hŶ�bi��ȟ�Q�o���k��{r��$�4��+'M��<3oT�@b� �F�Ͻ\e+9������_����2�Nq�*��OB��6���>�����S��?���{(vF'�lm���䷷�3-8�㏥kJ�<[�x����%u~��8�5�JQO^ȟ�>+{][N����.��iڒ/�똤;�l�A<Y[� +��W����_��=�������{��l��Y�%����]CP���e'�rrq�p�8���g��y]�˱T�*j�s�>��mky<���f������á8�er3��!XzT����p�ʹ��𗅥���jw���~!�pڎ�����Q�>X��U�Ϛ�+%������\���l�->=[P���f���f�X��|����(N� 0��Z���o茕V�W��3/���.��MWŚ��G�x,le)h�83� +�����Ct*��5�N:w{�z/��U���_������6ڞ��Aݕ�� �q�=9`F A���o�b�+�������Ï�}V��S��u����h] ���aѤ� +�E#U��W�4�������J�������˺�g��h.sE-�G,rF��)�`U� �A�Y������g���Y������b��V�����NЦ%�v�����ת��K��ɳ�޶�������Vv_.���������_XH�eY�%G�_�\��<�//ԉ�I���C�����S����7��r�Qs<�r�hW��2�-��!�;B�sȗE*V������ח��^ѵ{����������M2�1D�Uw�v�RY�f>��ORI��E)��r�*JK^�A��^��8�� n��1@�������W���O�d�D���|������1�=����^���aHV#��[w�]������^��*�_R�I�{M�����H��d�����DK��_�h�3#�?��c����:]��3����jI������]G�5Ӆ��F5�?��8BIM���8BIM8BIM��f���8BIMnorm�<(�������������������� +Backgroundc���Q?�8BIMnorm�<(��������������������Raster 1 �@�~@�~@�~@�~@�~@��׵���~���~���~���~���~���������~��~����~����~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~�~��~���~�~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~ ��������������ٸ��ϭ��ϭ��ϭ��ϭ��ϭ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Э��������Э���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@��@��@��@��@��@��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������9[^^WMB6* � +� +� +� ,���,,���,� ,���,,���,� +� ,���,,���,� ,���,,���,�  �����D������ �����D������ ,���,,���,� �����D������ �����D������ ,���,,���, ,���������,� ,���������,� �����D������ ,���������,� ,���������,� �����D�����,������,�,������,� ,���������,�,������,�,������,� ,���������,�,�����,�,�����,�,������,�,�����,�,�����,�,������,�,���,�,���,�,�����,�,���,�,���,�,�����,��,�,�,�,�,���,�,�,�,�,�,���,����,�,���,�,����:KNJ8:>6*��������������������������������������������������������������������������������������������������1����1������1����1���������������1����1������1����1��������������1��1������1��1������1����1������1��1������1��1������1����1�����1������1������1��1������1������1������1��1������1�������1�������1������1�������1�������1������1�������1�������1�������1�������1�������1��������������������1�������������������1������������������������������������������:GDF8:>6*����������������������������������������������������������������������������������������������P���P������P���P��������������P���P������P���P�������������P��P������P��P������P���P������P��P������P��P������P���P�����P������P������P��P������P������P������P��P������P�������P�������P������P�������P�������P������P�������P�������P�������P�������P�������P��������������������P�������������������P������������������������������������������" 6F822*&������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ TkikphZNB( NkiklfZPD(I\hfmfXH>(�@�~@�~@�~@�~@�~@��׵���~���~���~���~���~���������~��~����~����~��~�������~��~���~���~��~�������~��~���~���~��~�������~��~���~���~��~�����������������������������~��~��������������~��������������~��~!���������������������������������~��������������~����������������~�� +��������������~��������������~/���513���315��������413���314����~����������������0~���413���314����~���513���315����~����������������~/����313�313����������212�212�����~���413���314����~����212�212�����~�� +��313�313�����~���413���314����~�����3�13������������2�12������~����212�212���~�����2�12������~�����2�12������~����212�212���~�����313������������212�÷���~�����2�12���~�����212�÷���~�����212������~�����2�12���~�����5������������4�ź���~�����212���~�����4�ź���~����4�����~�����212���~����������������Ǽ���~�����4���~�����Ǽ���~��������~�����4���~�����������������~����鼯��~��������~������~����鼯��~������~�������~��~���~�������~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~������~��~��~���~��~��������������ٸ��ϭ��ϭ��ϭ��ϭ��ϭ�������������������������������������������������������������������������������������������������������������������������������������������������������������!����������������������������������������������������������������������������������������������/���TPR���RPT��������SPQ���QPS���������������������0����SPQ���QPS��������TPR���RPT����������������������/����RPR�RPR����������QPQ�QPQ���������SPQ���QPS���������QPQ�QPQ�������� +��RPR�RPR���������SPQ���QPS����������Q�PQ������������Q�PQ����������QPQ�QPQ����Э�����Q�PQ����������Q�PQ���������QPQ�QPQ����Э�����QPQ������������QPQ�����������Q�PQ�����������QPQ����������QPQ����������Q�PQ�����������S������������S�����������QPQ�����������S����������S����������QPQ��������������������������������S�������������������������������S��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@��@��@��@��@��@�������������������������������������������������������������������������������������������������������������������������������������������������������������������������!����������������������������������������������������������������������������������/��������������������������������������������������������������������������������������������������/�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/Thumbs.db =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/Thumbs.db,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/Thumbs.db 4 Dec 2007 02:48:43 -0000 1.1 @@ -0,0 +1,377 @@ +��ࡱ�>�� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������  + +)% !"#$&.'(*=+,-/5012346<789:;>��������?@����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Root Entry��������А�_A�f1������������_2����>3������������� + +�������� !"#$%����'()*+,-./0����23456789:;<����>?@ABCDEFGH����JKLMNOPQRSTU����WXYZ[\]^_`abc����efghijklmn����pqrstuvwxy����{|}~� S����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��W�5��kMB��X����PR$k'`v�.p�F�Y�G9�>��>6�_s��3\X5�y]� +v��v��)��>d9qr����I��C�����m~���L�����wgw�\W�z�S����S�����|%{q�������e*��M���� 6�r�EUҴ�mK�Ӭ��l�!Kx#�[b"�Q�I8rNh��� x�bX��!�z$jG~��(J(��?�� 2����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���Ҏ�ڿ?�V������Qj��[�'�b���:]w5����S���\���]���O;�t�Q�_���� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�������/ſu� mR��[��zX��mkml�S)FFg*�/����T�m������6�e��㖓�\x�����B��;x����j�bk��L��]�wN�e�B�-|C���h��4ko�s��k QB��Z4�b{��ʏ�T� 6���}#��׋�O�g��&���}* ]���i�\en�..W�i�7(E$�号�{�=�����^�ӿ����~nS�r��������� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�A�h�~���ic3�?J)�W-�G�� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�@�������z+������k�oEW�r�ǻ?�� �����JFIF``��C + + + + +  ��C   + +�� +"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������ف�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�=����7�yC�� +(����7�yC�� ++j�ŗ�2��8�#�� �����JFIF``��C + + + + +  ��C   + +��"��21 +������31������41 +������51������ + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���+�59��K?���"������c�� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�8�׍4O}��Q�P��T�V~F��r8<�+n���÷� +�U���E����o�2Y��� O��MT�֍��!��v�r��@s��ǽu֥�jo��������I��^����� �����JFIF``��C + + + + +  ��C   + +�� +"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�5������m���Z(������m���Z)-��� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���ޢ���_��7��4Vܦw/yKEU�� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz����������������������������������������������������61������71����� 81������91�����=����������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���t�{^�5ֹi�h:�zn�e����Z�5��ϔ��2.�%̻r�)�#ER�+��R�n+w�͟O�̱��F4��.JoI5��[{��m�n��� ����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��Y�^���-{Dҵ�H����k�&tr�3�pA���-�܌[}w]��o +�!�6���V�7�<�g�O.�]��%!� o�=��V����Z����ZGᇄ�M����ۮYpĜݪn n�R��������:��lݴW���'q� � V�ۨRT�1��Q�� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���������?��?�֢���r�|��Wr���E^򽨯G���?�� 1����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�-�5�O�v +/K�9QЭ�Ґ�l��+�. +�� +̴����M��|�B�Gf��%��I�R펟{-��m)/��^0�ѳ�d���Kۦr� +�s�����踪ڶ�� �6��M�m&Y��q��@�מTa[<�0l 0�@�:*+[h쭡��vC�rN ��EP�Vְ�@����v��Q���=袀%��(�� =����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdef02���������I12���������22�������������K32������������ ghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�����<=������vző���e�c +!�vvvP>·;��>���o�v���I� ����D�b9#ij8�Y<�þ�r�1ڙ~1��uګ��(�������+�@\D�7��\;d�*�rrF +_���i����t��D�4y����i�hL`DDo�q��.T�O����|~�Zַ5����w�#�_Yu4�y��-�����  +����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?������&�T��m���:H&�ӳ##J�pi����%��t{�i��\��1#��Wl�3a8 �'jd���~!����%����_Z�2]މ�']�R�������G'8�\����?����ABCDEFGHIJKL����NOPQRSTUVWXYZ����\]^_`abcdefgh����jklmnopqrs����uvwxyz{|}~�������"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���?��~|B��Y�G����I�'�-��|юY@�nNN9_�my<)�*��_�m�U�����U�F��$Ie��C�� ��U��Nw��‚�P�ǀ�Sa�X���7:Y�—zA��Q�DDI1[���<�y*�E}2����~5O[��׍����v���_�UM~m=,��?��  +����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?����⭚��4_���<%�|���6 �R9^F�]��k_�4�}B;�+�Mu�cF˲ё����9�H ���/���>$X��u�YY��H��N�J���ơ����p�(*��/ �����������'�Z8/���yH�6��d�y��� -����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���42������������952������������&62������������3972������������@ +w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?����߇�>��Y�LQO ��/"g)� RJ 0�0ʝ����?���\�/����*n_2�Q��H 8��A0%X��x�G?Ə��j�H��TK���3q �� ��� p�,Cckv���o�h: +�Zn�c��9Œ�I'%��Y��fbI$�kԨ�R���{w~����v_#�*�����?�� ����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�(��⋟ �i�v�?��˒9G�"er��;�8# ��w�����E��@X�"n�ctn 0��AH �/������i�Lz��-��g��1�|���#��nI�ci��9��7�Z%�����a��&�`�89$��1$�ĒĒI$��� -����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�+���O��}�艮� -���iH�I<�E���8�32�f������v�{2Oqw=��b5ڗR��8UG$�9$���>%�b�C֢w��n�h[d��`��&�>��U�V �| �sy��~��K��u����u�Yc��Y#%O�m��\�@,'Ծ�_��_� +��;]~}8�[�7�����?�� �����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�8�W��|+b%����o�i|c,O���c��b�h|0�,�/�]��s*�,�\��ո���@�O�y��GN�>��#�d�%��� ���ݘd�� H9 <u���V>����kI�����I��;r9���H�� R����JFIF``��C + + + + +  ��C   + +��"��82������������M^92���� ����[K03������������i�13������������t� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��/�S^h:=޷<^#�4�}����$�`��� w +���j�;����G��Ew.��N��I�<�D�G �� �����)���i_~�6�Wi����3隽��=���B8ʮW#8�Ys���|4�c6�����DP���Iܺ�F�s�`[F�U9_����jڟA?�<9#�6���1$�e$���X���$Y#�4��^��q�?�Q_/�jm����y#��� ?����JFIF``��C + + + + +  ��C   + +��"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�cP�/4��ֳ�N��C���̣{�����rq������X뺇�}o���Y�������i��f�TL�d�L`� �`���?��� +xt����� ����yt�hH��w��%2G�:�]Ô~G�� ���-��o��M�����*� +f0q#;1� ����s�`zl�8��t�R�����k�5nljR���N����� �����JFIF``��C + + + + +  ��C   + +�� +"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���_���“mȹt?�� �����JFIF``��C + + + + +  ��C   + +�� +"�� + ���}!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������� + ���w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?� ־�{Q�����g��[\]�n�f�7�e�9�Iaъ��[w�QEDRM����``$"|�K �wait.gif,��Catalog�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������K �drop-yes.gif<��K �arrow-left-white.gif>��K �arrow-right-white.gif:�N*].�col-move-bottom.gif4F�,].�col-move-top.gif$��K �done.gif*��K �drop-no.gif. ��K �footer-bg.gif4 +�J�K �grid-blue-hd.gif: �J�K �grid-blue-split.gif. b&�� +�grid-hrow.gif4 +�J�K �grid-loading.gif0�J�K �grid-split.gif6�J�K �grid-vista-hd.gif4�J�K �invalid_line.gif*�J�K �loading.gif(�J�K �mso-hd.gif(�J�K �nowait.gif0�J�K �page-first.gifB�J�K �page-first-disabled.gif.�J�K �page-last.gif@�J�K �page-last-disabled.gif.�J�K �page-next.gif@�J�K �page-next-disabled.gif.�J�K �page-prev.gif@�J�K �page-prev-disabled.gif2�J�K �pick-button.gif*�J�K �refresh.gif,"|�K �sort_asc.gif."|�K �sort_desc.gif \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/arrow-left-white.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/arrow-left-white.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/arrow-right-white.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/arrow-right-white.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/col-move-bottom.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/col-move-bottom.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/col-move-top.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/col-move-top.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/columns.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/columns.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/dirty.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/dirty.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/done.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/done.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/drop-no.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/drop-no.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/drop-yes.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/drop-yes.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/footer-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/footer-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-blue-hd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-blue-hd.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-blue-split.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-blue-split.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-hrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-hrow.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-loading.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-loading.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-split.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-split.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-vista-hd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid-vista-hd.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-hd-btn.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-hd-btn.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-hrow-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-hrow-over.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-hrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-hrow.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-special-col-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-special-col-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-special-col-sel-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/grid3-special-col-sel-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/group-by.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/group-by.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/group-expand-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/group-expand-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hd-pop.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hd-pop.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-asc.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-asc.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-desc.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-desc.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-lock.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-lock.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-lock.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-lock.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-unlock.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-unlock.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-unlock.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/hmenu-unlock.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/invalid_line.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/invalid_line.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/loading.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/loading.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/mso-hd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/mso-hd.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/nowait.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/nowait.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-first-disabled.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-first-disabled.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-first.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-first.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-last-disabled.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-last-disabled.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-last.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-last.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-next-disabled.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-next-disabled.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-next.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-next.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-prev-disabled.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-prev-disabled.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-prev.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/page-prev.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/pick-button.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/pick-button.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/refresh.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/refresh.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-check-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-check-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-expand-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-expand-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-over.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-sel.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/row-sel.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/sort_asc.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/sort_asc.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/sort_desc.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/sort_desc.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/wait.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/grid/wait.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/collapse.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/collapse.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/expand.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/expand.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/gradient-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/gradient-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-bottom.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-bottom.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-left.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-top.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/mini-top.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/ns-collapse.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/ns-collapse.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/ns-expand.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/ns-expand.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/panel-close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/panel-close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/panel-title-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/panel-title-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/panel-title-light-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/panel-title-light-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/stick.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/stick.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/stuck.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/stuck.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/tab-close-on.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/tab-close-on.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/tab-close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/layout/tab-close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/checked.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/checked.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/group-checked.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/group-checked.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/item-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/item-over.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/menu-parent.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/menu-parent.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/menu.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/menu.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/unchecked.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/menu/unchecked.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/corners-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/corners-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/left-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/left-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/light-hd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/light-hd.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/tool-sprite-tpl.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/tool-sprite-tpl.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/tool-sprites.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/tool-sprites.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/tools-sprites-trans.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/tools-sprites-trans.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/top-bottom.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/top-bottom.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/top-bottom.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/top-bottom.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/white-corners-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/white-corners-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/white-left-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/white-left-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/white-top-bottom.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/panel/white-top-bottom.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/progress/progress-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/progress/progress-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/qtip/bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/qtip/bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/qtip/close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/qtip/close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/qtip/tip-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/qtip/tip-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/blue-loading.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/blue-loading.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/calendar.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/calendar.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/glass-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/glass-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/hd-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/hd-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/large-loading.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/large-loading.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/left-btn.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/left-btn.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/loading-balls.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/loading-balls.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/right-btn.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/right-btn.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/warning.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/shared/warning.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/e-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/e-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/e-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/e-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/ne-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/ne-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/ne-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/ne-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/nw-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/nw-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/nw-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/nw-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/s-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/s-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/s-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/s-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/se-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/se-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/se-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/se-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/square.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/square.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/sw-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/sw-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/sw-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/sizer/sw-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/scroll-left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/scroll-left.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/scroll-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/scroll-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/scroller-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/scroller-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-inactive-left-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-inactive-left-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-inactive-right-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-inactive-right-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-left-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-left-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-right-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-btm-right-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-strip-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-strip-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-strip-bg.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-strip-bg.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-strip-btm-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tab-strip-btm-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tabs-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tabs/tabs-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/btn-arrow-light.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/btn-arrow-light.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/btn-arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/btn-arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/btn-over-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/btn-over-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/gray-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/gray-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/tb-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/tb-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/tb-btn-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/toolbar/tb-btn-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-add.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-add.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-between.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-between.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-no.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-no.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-over.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-over.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-under.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-under.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-yes.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/drop-yes.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-minus-nl.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-minus-nl.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-minus.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-minus.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-plus-nl.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-plus-nl.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-plus.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end-plus.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-end.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-line.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-line.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-minus-nl.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-minus-nl.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-minus.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-minus.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-plus-nl.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-plus-nl.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-plus.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow-plus.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/elbow.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/folder-open.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/folder-open.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/folder.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/folder.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/leaf.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/leaf.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/loading.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/loading.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/s.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/tree/s.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-error.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-error.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-info.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-info.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-question.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-question.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-warning.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/icon-warning.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-corners.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-corners.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-corners.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-corners.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-corners.psd 4 Dec 2007 02:48:49 -0000 1.1 @@ -0,0 +1,11 @@ +8BPS,�8BIM8BIM �,px����JFIF[[��,��� + +# !"!%'$ '!!   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�gJ�4�t�I����i`Id�X��ٔ3H$�I��JWi>�,Tl��irm�l�:E��֩�_�'�� ���e��zC��֫���=���A�?����Z}_��÷�X�2���!��kGW��0��� ���H�Z�����;z���,����u~��ށa� ����E�_��÷�X�2���!��kGW��0��� ���H�Z�����;z���,����u~��ށa� ����E�_��÷�X�2���!��kGW��0��� ���H�Z�����;z���,����u~��ށa� ����E�_��÷�X�2���!��kGW��0��� ���H�Z�����;z�e��zC��֎���a��[���ל?�-i.���ށc� ����E� ���÷�X��6������kB���0��?� +���8�Zк���;z���l����.���ށc� ����E� ���÷�X��6������kB���0��?� +���8�Zк���;z���l����.���ށc� ����E� ���÷�X��6������kB���0��?� +���8�Zк���;z���l����.���ށc� ����E� ���÷�X��6������kB���0��?� +���8�Zк���;z���l����.���ށc� ����E� ���÷��^���D��L���x��kx�6�v�v���H�投�&S�v����8BIM���8BIM8BIM,(��8BIMnorm�<(��������������������Raster 1,���48BIMnorm�<(��������������������Raster 2������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-right.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-right.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-right.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-right.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/left-right.psd 4 Dec 2007 02:48:49 -0000 1.1 @@ -0,0 +1,7 @@ +8BPS 8BIM8BIM � $$�����JFIF[[�� ��� + +# !"!%'$ '!!   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�R��A�?����Z���W��=�S��������ǭh��C:�=��8BIM���8BIM8BIM��8BIMnorm�<(��������������������Vector 1 �� 8BIMnorm�<(��������������������Raster 1������������������������������������ \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/right-corners.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/right-corners.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/right-corners.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/right-corners.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/right-corners.psd 4 Dec 2007 02:48:49 -0000 1.1 @@ -0,0 +1,7 @@ +8BPS,*8BIM7200704258BIM �,p�����JFIF[[��,��� + +# !"!%'$ '!!   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?�Ʊţ�1�iq��Ǟ"2Z�(�*ă�Q�ҽ>��-U��U-x�3����{]����tU���"j|?2?�ȼ?��?��O��������?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�/��O������'����?�.��Oq��QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O�����\����%�?����x��E��_���QO���O���������Z�-��Q���\��Q�۸�7Lu��z �j�ʧ������8BIM���8BIM8BIM��,���48BIMnorm�<(��������������������Raster 1�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ï����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ï������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/top-bottom.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/top-bottom.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/top-bottom.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/top-bottom.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/default/window/top-bottom.psd 4 Dec 2007 02:48:49 -0000 1.1 @@ -0,0 +1,7 @@ +8BPS,J8BIM8BIM �,������JFIF[[��,��� + +# !"!%'$ '!!   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?���+K��e����We�ݜ֏`�O�]��_'֨�)�P@P@P@P@P@P@P@P@P'� ������O��־�w#�y��8BIM���8BIM8BIM����8BIMnorm�<(��������������������Raster 1,������8BIMnorm�<(��������������������Raster 2������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/gradient-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/gradient-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/s.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/s.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/button/btn-arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/button/btn-arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/button/btn-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/button/btn-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/corners-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/corners-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/left-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/left-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/light-hd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/light-hd.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/tool-sprite-tpl.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/tool-sprite-tpl.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/tool-sprites.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/tool-sprites.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/tools-sprites-trans.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/tools-sprites-trans.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/top-bottom.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/top-bottom.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/top-bottom.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/top-bottom.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/white-corners-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/white-corners-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/white-left-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/white-left-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/white-top-bottom.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/panel/white-top-bottom.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/qtip/bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/qtip/bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/qtip/close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/qtip/close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/qtip/tip-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/qtip/tip-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/scroll-left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/scroll-left.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/scroll-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/scroll-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/scroller-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/scroller-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-left-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-left-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-right-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-btm-right-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-strip-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-strip-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-strip-bg.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-strip-bg.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-strip-btm-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tab-strip-btm-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tabs-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/tabs/tabs-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/btn-arrow-light.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/btn-arrow-light.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/btn-arrow.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/btn-arrow.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/btn-over-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/btn-over-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/gray-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/gray-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/tb-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/tb-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/tb-btn-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/toolbar/tb-btn-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-error.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-error.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-info.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-info.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-question.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-question.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-warning.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/icon-warning.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/left-corners.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/left-corners.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/left-corners.pspimage =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/left-corners.pspimage,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/left-corners.pspimage 4 Dec 2007 02:48:51 -0000 1.1 @@ -0,0 +1,26 @@ +Paint Shop Pro Image File + ~BK..,i@��� +~BK +~FL��� + +~BK8~FL�U�F~FL�_�F~FL~FL ~BK�~BK,~BK,~BK�zp����JFIF[[��,��� + + + +  + + +   ��� + }!1AQa"q2���#B��R��$3br� +%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������� + w!1AQaq"2�B���� #3R�br� +$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ?��7�������5ݷ��g�R{5k}>�d�gi��ǹ��K1gwgwf?ָ,�� ++Ož��K�����Tg�xl�@��\��'?�{���'�2��2��:})�{��R��SB�.����-��AA{��%�2���iX�]��A�5�/@������ ����?�N��נK�g�w��� =����_���g���W���U��$�\⿘Wg)YU�#�G��+�7w����)��I�������_{���I�������@�_�&��o��� �|?��=���|%��a�������,P��I�������@�_�&��o��� �|?��=���|%��a�������,P��I�������@�_�&��o��� �|?��=���|%��a�������,P��I�������@�_�&��o��� �|?��=���|%��a�������,P��I�������@�_�&��o��� �|?��=���|%��a�������,P��I�������@�_�&��o��� �|?��=���|%��a�������,P��I�������@�_�&��o��� �|?��=���|%��a�������,P��I�������@k?�s��[�~hX]���E���3J�B�4.U�ڣ8g���~BK ~BK�spx��Ż�0a�p%��yc[�A5C���(&b�6�6�df�4r����d�u!9S���z�$/$��{"�#ɉ�G�2ߓ�Q�@���u{Q�a�϶��F�����H�[�~BK~npx��ƽ +�@D�kg�@��m�UCO׋� w��4��DH��o��bfЭ�S�j!���L�M�E�$'���d�@�N�F�J�B���wĶ�(M�4=�>�Qi���6}f~BKwgpx��Ż +� EQo�Uȇ|���5�A�QX�Kɷ8����������"^O��@��ܐuE=Ԍ�9#넚#�Ȫ}�����VW���h��g ��~BK\L` x���� +� A�_���A �#�ttp�X����Μ;����>�:���s;�6`��� +���Xv�����2~BKa~BK��BG�����������������������@~BKw� +Main Color,2�����������������������@~BK1!px������� �PTT�`b��B����(�~BK1!px�������&�ppp`b��B��a�J�~BK1!px����xx8����`b��B��2�~BK,` x�b``���?��&FN��Ӓ$�~BK0�Corner����������������������@~BKx����~BKx����~BKx����~BKx����~BK[� +Inner Borders� ����������������������@~BK(@x�b``������;��~BK(@x�b``������;��~BK(@x�b``������;��~BK( x�b``������;��~BK +�Gradient'%3 ����������������������@~BKK;�x�b`���h��w � ��%<�@p��% 8'��(���ˉ4~BKK;�x�b`���h��w � ��%<�@p��% 8'��(���ˉ4~BKK;�x�b`���h��w � ��%<�@p��% 8'��(���ˉ4~BKsc�x� ���@���h��Q%�Q2�F�(���(%��(J�Q�����^)��ʏ/ ޼��y2��΍+Z�Ԝ�(9r`O���-����(Tn~BK�� Gray Bottom2,������������������������@~BK9)�x�Z��#�%G�Qr�%�0 �V� �@��+�2~BK9)�x�Z��#�%G�Qr�%�0 �V�} �@��+�2~BK9)�x�Z��#�%G�Qr�%�0 �V�} �@��+�2~BK-�x�:sf��Q0 +F�� `��{�� \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/left-right.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/left-right.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/right-corners.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/right-corners.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/top-bottom.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/gray/window/top-bottom.png,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/gradient-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/gradient-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/s.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/s.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/bg-center.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/bg-center.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/bg-left.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/bg-left.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/bg-right.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/bg-right.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/collapse.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/collapse.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/dlg-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/dlg-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/e-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/e-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/expand.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/expand.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/hd-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/hd-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/s-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/s-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/se-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/se-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/w-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/basic-dialog/w-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/grid/grid-split.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/grid/grid-split.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/grid/grid-vista-hd.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/grid/grid-vista-hd.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/collapse.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/collapse.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/expand.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/expand.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/gradient-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/gradient-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/ns-collapse.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/ns-collapse.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/ns-expand.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/ns-expand.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/panel-close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/panel-close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/panel-title-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/panel-title-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/panel-title-light-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/panel-title-light-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/stick.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/stick.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/tab-close-on.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/tab-close-on.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/tab-close.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/layout/tab-close.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/qtip/bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/qtip/bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/qtip/tip-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/qtip/tip-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/e-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/e-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/e-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/e-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/ne-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/ne-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/ne-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/ne-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/nw-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/nw-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/nw-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/nw-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/s-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/s-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/s-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/s-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/se-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/se-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/se-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/se-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/sw-handle-dark.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/sw-handle-dark.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/sw-handle.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/sizer/sw-handle.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-inactive-left-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-inactive-right-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-left-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-left-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-right-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-btm-right-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/tabs/tab-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/toolbar/gray-bg.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/toolbar/gray-bg.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/toolbar/tb-btn-sprite.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/images/vista/toolbar/tb-btn-sprite.gif,v diff -u Binary files differ Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/legacy/basic-dialog.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/legacy/basic-dialog.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/legacy/basic-dialog.css 4 Dec 2007 02:48:53 -0000 1.1 @@ -0,0 +1,286 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +.x-dlg-proxy { + background-image: url(../images/default/gradient-bg.gif); + background-color:#c3daf9; + border:1px solid #6593cf; + z-index:10001; + overflow:hidden; + position:absolute; + left:0;top:0; +} +.x-dlg-shadow{ + background:#aaaaaa; + position:absolute; + left:0;top:0; +} +.x-dlg-focus{ + -moz-outline:0 none; + outline:0 none; + width:0; + height:0; + overflow:hidden; + position:absolute; + top:0; + left:0; +} +.x-dlg-mask{ + z-index:10000; + display:none; + position:absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity:.50; + filter: alpha(opacity=50); + background-color:#CCC; +} +body.x-body-masked select { + visibility:hidden; +} +body.x-body-masked .x-dlg select { + visibility:visible; +} +.x-dlg{ + z-index:10001; + overflow:hidden; + position:absolute; + left:300;top:0; +} +.x-dlg .x-dlg-hd { + background: url(../images/default/basic-dialog/hd-sprite.gif) repeat-x 0 -82px; + background-color:navy; + color:#FFF; + font:bold 12px "sans serif", tahoma, verdana, helvetica; + overflow:hidden; + padding:5px; + white-space: nowrap; +} +.x-dlg .x-dlg-hd-left { + background: url(../images/default/basic-dialog/hd-sprite.gif) no-repeat 0 -41px; + padding-left:3px; + margin:0; +} +.x-dlg .x-dlg-hd-right { + background: url(../images/default/basic-dialog/hd-sprite.gif) no-repeat right 0; + padding-right:3px; +} +.x-dlg .x-dlg-dlg-body{ + background:url(../images/default/layout/gradient-bg.gif); + border:1px solid #6593cf; + border-top:0 none; + padding:10px; + position:absolute; + top:24px;left:0; + z-index:1; + overflow:hidden; +} +.x-dlg-collapsed .x-resizable-handle{ + display:none; +} +.x-dlg .x-dlg-bd{ + overflow:hidden; +} +.x-dlg .x-dlg-ft{ + overflow:hidden; + padding:5px; + padding-bottom:0; +} + +.x-dlg .x-tabs-body{ + background:white; + overflow:auto; +} +.x-dlg .x-tabs-top .x-tabs-body{ + border:1px solid #6593cf; + border-top:0 none; +} +.x-dlg .x-tabs-bottom .x-tabs-body{ + border:1px solid #6593cf; + border-bottom:0 none; +} +.x-dlg .x-layout-container .x-tabs-body{ + border:0 none; +} +.x-dlg .inner-tab{ + margin:5px; +} +.x-dlg .x-dlg-ft .x-btn{ + margin-right:5px; + float:right; + clear:none; +} +.x-dlg .x-dlg-ft .x-dlg-btns td { + border:0; + padding:0; +} +.x-dlg .x-dlg-ft .x-dlg-btns-right table{ + float:right; + clear:none; +} +.x-dlg .x-dlg-ft .x-dlg-btns-left table{ + float:left; + clear:none; +} +.x-dlg .x-dlg-ft .x-dlg-btns-center{ + text-align:center; /*ie*/ +} +.x-dlg .x-dlg-ft .x-dlg-btns-center table{ + margin:0 auto; /*everyone else*/ +} + + +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-click .x-btn-center{ + background-position:0 -126px; +} +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-click .x-btn-right{ + background-position:0 -84px; +} +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-click .x-btn-left{ + background-position:0 -63px; +} + +.x-dlg-draggable .x-dlg-hd{ + cursor:move; +} +.x-dlg-closable .x-dlg-hd{ + padding-right:22px; +} +.x-dlg-toolbox { + position:absolute; + top:4px; + right:4px; + z-index:6; + width:40px; + cursor:default; + height:15px; + background:transparent; +} +.x-dlg .x-dlg-close, .x-dlg .x-dlg-collapse { + float:right; + height:15px; + width:15px; + margin:0; + margin-left:2px; + padding:0; + line-height:1px; + font-size:1px; + background-repeat:no-repeat; + cursor:pointer; + visibility:inherit; +} +.x-dlg .x-dlg-close { + background-image:url(../images/default/basic-dialog/close.gif); +} +.x-dlg .x-dlg-collapse { + background-image:url(../images/default/basic-dialog/collapse.gif); +} +.x-dlg-collapsed .x-dlg-collapse { + background-image:url(../images/default/basic-dialog/expand.gif); +} +.x-dlg .x-dlg-close-over, .x-dlg .x-dlg-collapse-over { + +} +.x-dlg div.x-resizable-handle-east{ + background-image:url(../images/default/basic-dialog/e-handle.gif); + border:0; + background-position:right; + margin-right:0; +} +.x-dlg div.x-resizable-handle-south{ + background-image:url(../images/default/sizer/s-handle-dark.gif); + border:0; + height:6px; +} +.x-dlg div.x-resizable-handle-west{ + background-image:url(../images/default/basic-dialog/e-handle.gif); + border:0; + background-position:1px; +} +.x-dlg div.x-resizable-handle-north{ + background-image:url(../images/default/s.gif); + border:0; +} +.x-dlg div.x-resizable-handle-northeast, .xtheme-gray .x-dlg div.x-resizable-handle-northeast{ + background-image:url(../images/default/s.gif); + border:0; +} +.x-dlg div.x-resizable-handle-northwest, .xtheme-gray .x-dlg div.x-resizable-handle-northwest{ + background-image:url(../images/default/s.gif); + border:0; +} +.x-dlg div.x-resizable-handle-southeast{ + background-image:url(../images/default/basic-dialog/se-handle.gif); + background-position: bottom right; + width:8px; + height:8px; + border:0; +} +.x-dlg div.x-resizable-handle-southwest{ + background-image:url(../images/default/sizer/sw-handle-dark.gif); + background-position: top right; + margin-left:1px; + margin-bottom:1px; + border:0; +} + +#x-msg-box .x-dlg-ft .x-btn{ + float:none; + clear:none; + margin:0 3px; +} + +#x-msg-box .x-dlg-bd { + padding:5px; + overflow:hidden !important; + font:normal 13px verdana,tahoma,sans-serif; +} +#x-msg-box .ext-mb-input { + margin-top:4px; + width:95%; +} +#x-msg-box .ext-mb-textarea { + margin-top:4px; + font:normal 13px verdana,tahoma,sans-serif; +} +#x-msg-box .ext-mb-progress-wrap { + margin-top:4px; + border:1px solid #6593cf; +} +#x-msg-box .ext-mb-progress { + height:18px; + background: #e0e8f3 url(../images/default/qtip/bg.gif) repeat-x; +} +#x-msg-box .ext-mb-progress-bar { + height:18px; + overflow:hidden; + width:0; + background:#8BB8F3; + border-top:1px solid #B2D0F7; + border-bottom:1px solid #65A1EF; + border-right:1px solid #65A1EF; +} + +#x-msg-box .x-msg-box-wait { + background: transparent url(../images/default/grid/loading.gif) no-repeat left; + display:block; + width:300px; + padding-left:18px; + line-height:18px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/legacy/grid.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/legacy/grid.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/legacy/grid.css 4 Dec 2007 02:48:53 -0000 1.1 @@ -0,0 +1,295 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* Grid2 styles */ +.x-grid { + position:relative; + overflow:hidden; + background-color:#fff; +} +.x-grid-scroller { + overflow:auto; +} +.x-grid-viewport, .x-grid-locked{ + position:absolute; + left:0; top: 0; + z-index:2; + overflow:hidden; + visibility:hidden; +} +.x-grid-cell-inner, .x-grid-hd-inner{ + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; +} +.x-grid-hd-row td, .x-grid-row td{ + font:normal 11px arial, tahoma, helvetica, sans-serif; + line-height:13px; + white-space: nowrap; + vertical-align: top; + -moz-outline: none; + -moz-user-focus: normal; +} +.x-grid-hd-row td { + line-height:14px; +} +.x-grid-col { + border-right: 1px solid #ebebeb; + border-bottom: 1px solid #ebebeb; +} +/* Locked styles */ + +.x-grid-locked .x-grid-body td { + background-color: #FBFDFF; + border-right: 1px solid #deecfd; + border-bottom: 1px solid #deecfd !important; +} +.x-grid-locked .x-grid-body td .x-grid-cell-inner { + border-top:0 none; +} +.x-grid-locked .x-grid-row-alt td{ + background-color: #F5FAFE; +} + +.x-grid-locked .x-grid-header table{ + border-right:1px solid transparent; +} +.x-grid-locked .x-grid-body table{ + border-right:1px solid #c3daf9; +} + +.x-grid-locked .x-grid-body td .x-grid-cell-inner { + +} +.x-grid-row { + cursor: default; +} +.x-grid-row-alt{ + background-color:#f1f1f1; +} +.x-grid-row-over td{ + background-color:#d9e8fb; +} +.x-grid-resize-proxy { + width:3px; + background-color:#cccccc; + cursor: e-resize; + cursor: col-resize; + position:absolute; + top:0; + height:100px; + overflow:hidden; + visibility:hidden; + border:0 none; + z-index:7; +} +.x-grid-focus { + position:absolute; + top:0; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: normal; + -khtml-user-select: normal; +} + +/* header styles */ +.x-grid-header{ + background: #ebeadb url(../images/default/grid/grid-hrow.gif) repeat-x; + overflow:hidden; + position:relative; + cursor:default; + width:100%; +} +.x-grid-hd-row{ + height:22px; +} +.x-grid-hd { + padding-right:1px; +} +.x-grid-hd-over .x-grid-hd-inner { + border-bottom: 1px solid #c3daf9; +} +.x-grid-hd-over .x-grid-hd-text { + background: #fafafa url(../images/default/grid/grid-hrow.gif) repeat-x 0 1px; + padding-bottom:1px; + border-bottom: 1px solid #b3cae9; +} +.x-grid-sort-icon{ + background-repeat: no-repeat; + display: none; + height: 4px; + width: 13px; + margin-left:3px; + vertical-align: middle; +} +.x-grid-header .sort-asc .x-grid-sort-icon { + background-image: url(../images/default/grid/sort_asc.gif); + display: inline; +} +.x-grid-header .sort-desc .x-grid-sort-icon { + background-image: url(../images/default/grid/sort_desc.gif); + display: inline; +} + +/* Body Styles */ +.x-grid-body { + overflow:hidden; + position:relative; + width:100%; + zoom:1; +} + +.x-grid-cell-text,.x-grid-hd-text { + display: block; + padding: 3px 5px 3px 5px; + -moz-user-select: none; + -khtml-user-select: none; + color:black; +} +.x-grid-hd-text { + padding-top:4px; +} +.x-grid-split { + background-image: url(../images/default/grid/grid-split.gif); + background-position: center; + background-repeat: no-repeat; + cursor: e-resize; + cursor: col-resize; + display: block; + font-size: 1px; + height: 16px; + overflow: hidden; + position: absolute; + top: 2px; + width: 6px; + z-index: 3; +} + +.x-grid-hd-text { + color:#15428b; +} +/* Column Reorder DD */ +.x-dd-drag-proxy .x-grid-hd-inner{ + background: #ebeadb url(../images/default/grid/grid-hrow.gif) repeat-x; + height:22px; + width:120px; +} + +.col-move-top, .col-move-bottom{ + width:9px; + height:9px; + position:absolute; + top:0; + line-height:1px; + font-size:1px; + overflow:hidden; + visibility:hidden; + z-index:20000; +} +.col-move-top{ + background:transparent url(../images/default/grid/col-move-top.gif) no-repeat left top; +} +.col-move-bottom{ + background:transparent url(../images/default/grid/col-move-bottom.gif) no-repeat left top; +} + +/* Selection Styles */ +.x-grid-row-selected td, .x-grid-locked .x-grid-row-selected td{ + background-color: #316ac5 !important; + color: white; +} +.x-grid-row-selected span, .x-grid-row-selected b, .x-grid-row-selected div, .x-grid-row-selected strong, .x-grid-row-selected i{ + color: white !important; +} +.x-grid-row-selected .x-grid-cell-text{ + color: white; +} +.x-grid-cell-selected{ + background-color: #316ac5 !important; + color: white; +} +.x-grid-cell-selected span{ + color: white !important; +} +.x-grid-cell-selected .x-grid-cell-text{ + color: white; +} + +.x-grid-locked td.x-grid-row-marker, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker{ + background: #ebeadb url(../images/default/grid/grid-hrow.gif) repeat-x 0 bottom !important; + vertical-align:middle !important; + color:black; + padding:0; + border-top:1px solid white; + border-bottom:none !important; + border-right:1px solid #6fa0df !important; + text-align:center; +} +.x-grid-locked td.x-grid-row-marker div, .x-grid-locked .x-grid-row-selected td.x-grid-row-marker div{ + padding:0 4px; + color:#15428b !important; + text-align:center; +} + +/* dirty cells */ +.x-grid-dirty-cell { + background: transparent url(../images/default/grid/dirty.gif) no-repeat 0 0; +} + +/* Grid Toolbars */ +.x-grid-topbar, .x-grid-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; + overflow:hidden; + display:none; + zoom:1; + position:relative; +} +.x-grid-topbar .x-toolbar{ + border-right:0 none; +} +.x-grid-bottombar .x-toolbar{ + border-right:0 none; + border-bottom:0 none; + border-top:1px solid #a9bfd3; +} +/* Props Grid Styles */ +.x-props-grid .x-grid-cell-selected .x-grid-cell-text{ + background-color: #316ac5 !important; +} +.x-props-grid .x-grid-col-value .x-grid-cell-text{ + background-color: white; +} +.x-props-grid .x-grid-col-name{ + background-color: #c3daf9; +} +.x-props-grid .x-grid-col-name .x-grid-cell-text{ + background-color: white; + margin-left:10px; +} +.x-props-grid .x-grid-split-value { + visibility:hidden; +} + +/* header menu */ +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +/* dd */ +.x-dd-drag-ghost .x-grid-dd-wrap { + padding:1px 3px 3px 1px; +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/resources/raw-images/shadow.psd =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/resources/raw-images/shadow.psd,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/resources/raw-images/shadow.psd 4 Dec 2007 02:48:53 -0000 1.1 @@ -0,0 +1,468 @@ +8BPS��x�8BIM%8BIM$9� + + + + application/vnd.adobe.photoshop + + + Adobe Photoshop CS3 (10.0x20061208 [20061208.beta.1251 2006/12/08:02:00:00 cutoff; m branch]) Macintosh + 2007-02-14T07:19:41-05:00 + 2007-02-15T01:41:36-05:00 + 2007-02-15T01:41:36-05:00 + + + uuid:D22F38CD8EBDDB11A054D890A8654B63 + uuid:3E705BD227BEDB11A054D890A8654B63 + + + 1 + 720000/10000 + 720000/10000 + 2 + 256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;30FA55A0D54C742C651472AB6E2D67D1 + + + 165 + 156 + 1 + 36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;9E94BED1E75C57F2EFB57F786F6F1E48 + + + 3 + sRGB IEC61966-2.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +8BIM�� + + + + com.apple.print.PageFormat.PMHorizontalRes + + com.apple.print.ticket.creator + com.apple.printingmanager + com.apple.print.ticket.itemArray + + + com.apple.print.PageFormat.PMHorizontalRes + 72 + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PageFormat.PMOrientation + + com.apple.print.ticket.creator + com.apple.printingmanager + com.apple.print.ticket.itemArray + + + com.apple.print.PageFormat.PMOrientation + 1 + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PageFormat.PMScaling + + com.apple.print.ticket.creator + com.apple.printingmanager + com.apple.print.ticket.itemArray + + + com.apple.print.PageFormat.PMScaling + 1 + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PageFormat.PMVerticalRes + + com.apple.print.ticket.creator + com.apple.printingmanager + com.apple.print.ticket.itemArray + + + com.apple.print.PageFormat.PMVerticalRes + 72 + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PageFormat.PMVerticalScaling + + com.apple.print.ticket.creator + com.apple.printingmanager + com.apple.print.ticket.itemArray + + + com.apple.print.PageFormat.PMVerticalScaling + 1 + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.subTicket.paper_info_ticket + + com.apple.print.PageFormat.PMAdjustedPageRect + + com.apple.print.ticket.creator + com.apple.printingmanager + com.apple.print.ticket.itemArray + + + com.apple.print.PageFormat.PMAdjustedPageRect + + 0.0 + 0.0 + 734 + 576 + + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PageFormat.PMAdjustedPaperRect + + com.apple.print.ticket.creator + com.apple.printingmanager + com.apple.print.ticket.itemArray + + + com.apple.print.PageFormat.PMAdjustedPaperRect + + -18 + -18 + 774 + 594 + + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PaperInfo.PMPaperName + + com.apple.print.ticket.creator + com.apple.print.pm.PostScript + com.apple.print.ticket.itemArray + + + com.apple.print.PaperInfo.PMPaperName + na-letter + com.apple.print.ticket.client + com.apple.print.pm.PostScript + com.apple.print.ticket.modDate + 2003-07-01T17:49:36Z + com.apple.print.ticket.stateFlag + 1 + + + + com.apple.print.PaperInfo.PMUnadjustedPageRect + + com.apple.print.ticket.creator + com.apple.print.pm.PostScript + com.apple.print.ticket.itemArray + + + com.apple.print.PaperInfo.PMUnadjustedPageRect + + 0.0 + 0.0 + 734 + 576 + + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PaperInfo.PMUnadjustedPaperRect + + com.apple.print.ticket.creator + com.apple.print.pm.PostScript + com.apple.print.ticket.itemArray + + + com.apple.print.PaperInfo.PMUnadjustedPaperRect + + -18 + -18 + 774 + 594 + + com.apple.print.ticket.client + com.apple.printingmanager + com.apple.print.ticket.modDate + 2007-02-14T12:19:41Z + com.apple.print.ticket.stateFlag + 0 + + + + com.apple.print.PaperInfo.ppd.PMPaperName + + com.apple.print.ticket.creator + com.apple.print.pm.PostScript + com.apple.print.ticket.itemArray + + + com.apple.print.PaperInfo.ppd.PMPaperName + US Letter + com.apple.print.ticket.client + com.apple.print.pm.PostScript + com.apple.print.ticket.modDate + 2003-07-01T17:49:36Z + com.apple.print.ticket.stateFlag + 1 + + + + com.apple.print.ticket.APIVersion + 00.20 + com.apple.print.ticket.privateLock + + com.apple.print.ticket.type + com.apple.print.PaperInfoTicket + + com.apple.print.ticket.APIVersion + 00.20 + com.apple.print.ticket.privateLock + + com.apple.print.ticket.type + com.apple.print.PageFormatTicket + + +8BIM�HH8BIM&?�8BIM� + Transparency8BIM +Transparency8BIM���d8BIM5��d8BIM8BIM +x8BIM8BIM� 8BIM +8BIM' +8BIM�H/fflff/ff���2Z5-8BIM�p��������������������������������������������������������������������������������������������8BIM8BIM 8BIM08BIM-8BIM@@8BIM8BIM�nullbaseNameTEXTUserboundsObjcRct1Top longLeftlongBtomlong�Rghtlong�slicesVlLsObjcslicesliceIDlonggroupIDlongoriginenum ESliceOrigin +autoGeneratedTypeenum +ESliceTypeImg boundsObjcRct1Top longLeftlongBtomlong�Rghtlong�urlTEXTnullTEXTMsgeTEXTaltTagTEXTcellTextIsHTMLboolcellTextTEXT horzAlignenumESliceHorzAligndefault vertAlignenumESliceVertAligndefault bgColorTypeenumESliceBGColorTypeNone topOutsetlong +leftOutsetlong bottomOutsetlong rightOutsetlong8BIM( ?�8BIM H HLinomntrRGB XYZ � 1acspMSFTIEC sRGB���-HP cprtP3desc�lwtpt�bkptrXYZgXYZ,bXYZ@dmndTpdmdd��vuedL�view�$lumi�meas $tech0 rTRC< gTRC< bTRC< textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ �Q�XYZ XYZ o�8��XYZ b����XYZ $����descIEC http://www.iec.chIEC http://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space - sRGB.IEC 61966-2.1 Default RGB colour space - sRGBdesc,Reference Viewing Condition in IEC61966-2.1,Reference Viewing Condition in IEC61966-2.1view��_.��� \�XYZ L VPW�meas�sig CRT curv +#(-27;@EJOTY^chmrw|������������������������� +%+28>ELRY`gnu|���������������� &/8AKT]gqz������������ !-8COZfr~���������� -;HUcq~��������� ++:IXgw��������'7HYj{�������+=Oat������� 2FZn�������  % : O d y � � � � � � + +' += +T +j +� +� +� +� +� +� " 9 Q i � � � � � �  * C \ u � � � � � + + +& +@ +Z +t +� +� +� +� +�.Id���� %A^z���� &Ca~����1Om����&Ed����#Cc����'Ij����4Vx���&Il����Ae����@e���� Ek���*Qw���;c���*R{���Gp���@j���>i���  A l � � �!!H!u!�!�!�"'"U"�"�"�# +#8#f#�#�#�$$M$|$�$�% %8%h%�%�%�&'&W&�&�&�''I'z'�'�( +(?(q(�(�))8)k)�)�**5*h*�*�++6+i+�+�,,9,n,�,�- -A-v-�-�..L.�.�.�/$/Z/�/�/�050l0�0�11J1�1�1�2*2c2�2�3 +3F33�3�4+4e4�4�55M5�5�5�676r6�6�7$7`7�7�88P8�8�99B99�9�:6:t:�:�;-;k;�;�<' >`>�>�?!?a?�?�@#@d@�@�A)AjA�A�B0BrB�B�C:C}C�DDGD�D�EEUE�E�F"FgF�F�G5G{G�HHKH�H�IIcI�I�J7J}J�K KSK�K�L*LrL�MMJM�M�N%NnN�OOIO�O�P'PqP�QQPQ�Q�R1R|R�SS_S�S�TBT�T�U(UuU�VV\V�V�WDW�W�X/X}X�YYiY�ZZVZ�Z�[E[�[�\5\�\�]']x]�^^l^�__a_�``W`�`�aOa�a�bIb�b�cCc�c�d@d�d�e=e�e�f=f�f�g=g�g�h?h�h�iCi�i�jHj�j�kOk�k�lWl�mm`m�nnkn�ooxo�p+p�p�q:q�q�rKr�ss]s�ttpt�u(u�u�v>v�v�wVw�xxnx�y*y�y�zFz�{{c{�|!|�|�}A}�~~b~�#��G��� +�k�͂0����W�������G����r�ׇ;����i�Ή3�����d�ʋ0�����c�ʍ1�����f�Ώ6����n�֑?����z��M��� �����_�ɖ4��� +�u���L���$�����h�՛B��������d�Ҟ@��������i�ءG���&����v��V�ǥ8��������n��R�ĩ7�������u��\�ЭD���-�������u��`�ֲK�³8���%�������y��h��Y�ѹJ�º;���.���!������ +�����z���p���g���_���X���Q���K���F���Aǿ�=ȼ�:ɹ�8ʷ�6˶�5̵�5͵�6ζ�7ϸ�9к�<Ѿ�?���D���I���N���U���\���d���l���v��ۀ�܊�ݖ�ޢ�)߯�6��D���S���c���s���� +����2��F���[���p������(��@���X���r������4���P���m��������8���W���w����)���K���m��8BIM8BIM ���� �����JFIFHH�� Adobe_CM��Adobed����    +     + + +   ����"�� +��? +  +  3!1AQa"q�2���B#$R�b34r��C%�S���cs5���&D�TdE£t6�U�e���u��F'���������������Vfv��������7GWgw��������5!1AQaq"2����B#�R��3$b�r��CScs4�%���&5��D�T�dEU6te����u��F���������������Vfv��������'7GWgw������� ?� ��+�kJ�����(�O��$����?ԥ����*�I)�����)}�#�J��Jl}�#�J_o��R����o��R���?Ԫ�$����?ԥ����*�I)�����)}�#�J��Jl}�#�J_o��R����o��R���?Ԫ�$����?ԫxvYf������J����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?����RWz���RIJI$�R�I$���I%)$�IJI$�R�I$���I%)$�IJWzg��RWzg��%?��� ��$�֟7�}����p���I)�+��L�����F�o����Ω$�诲3�3�ޗ������_:����������8z_dg�f��?�|�J~��#?�7����}����p���I)�+��L�����F�o����Ω$�诲3�3�ޗ������_:����������8z_dg�f��?�|�J~��#?�7����}����p���I)�+��L����x1�H��>N|ԒJ��8BIM!UAdobe PhotoshopAdobe Photoshop CS38BIM"zMM*bj(1ir2ۇi� +��' +��'Adobe Photoshop CS3 (10.0x20061208 [20061208.beta.1251 2006/12/08:02:00:00 cutoff; m branch]) Macintosh2007:02:15 01:41:36�����jr(zHH8BIM��mopt������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������HTargetSettingsMttCObjc +NativeQuadBl long�Grn long�Rd long�Trnsbool addMetadatabool +fileFormatenum +FileFormatPNG24 +interlacedbool noMatteColorbooltransparencyDitherAlgorithmenumDitherAlgorithmNonetransparencyDitherAmountlong����8BIM�-msetnullVersionlong8BIM�ms4w8BIM��maniIRFR�8BIMAnDs�nullAFStlongFrInVlLsObjcnullFrIDlongZ��FStsVlLsObjcnullFsIDlongAFrmlongFsFrVlLslongZ��LCntlong8BIMRoll8BIM�mfriApAD����������8BIMnorm� +�(��������������������Layer 88BIMluniLayer 88BIMlnsrlayr8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMfxrp���������8BIMnormY�(��������������������Layer 18BIMluniLayer 18BIMlnsrlayr8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMfxrp@c���������8BIMnormY�(��������������������Layer 98BIMluniLayer 98BIMlnsrlayr8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMfxrp�S������bbbb8BIMnorm��(��������������������Layer 78BIMluniLayer 78BIMlnsrlayr8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMfxrp�����b&&&8BIMnormY�(��������������������Layer 28BIMluniLayer 28BIMlnsrlayr8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMfxrp�A������>&&&8BIMnormY�(��������������������Layer 58BIMluniLayer 58BIMlnsrlayr8BIMlyid8BIMclbl8BIMinfx8BIMknko8BIMlspf8BIMlclr8BIMfxrp�b�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������(# C:. eWE. +�nW:#��eC(��nI,��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��sL.��nI,��eC(�nW:#eWE. +C:. (#  #( .:C +.EWe#:Wn�(Ce��,In��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls��.Ls���;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������,In�������(Ce�������#:Wn������ +.EWen�s�sn .:CI�L�LI #(,�.�.,������������������������������������,�.�.,I�L�LIn�s�sn���������������������������������������������������8BIMPatt8BIMFMsk ��2�����������������������������������������و����������������Έ����������������Lj����������������ˆ�������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆��������������ˆ���������������Lj����������������Έ����������������و��������������������������������������������������������������������������������������و����������������Έ����������������Lj����������������ˆ�������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆��������������ˆ���������������Lj����������������Έ����������������و��������������������������������������������������������������������������������������و����������������Έ����������������Lj����������������ˆ�������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆������������̆��������������ˆ���������������Lj����������������Έ����������������و��������������������������������������������� + �� + ��  +#&�(�(&# + &-1�3�31-& #-48�;�;84-#&18=�@�@=81&(3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3((3�;�;3(&18=�@�@=81&#-48�;�;84-# &-1�3�31-&  +#&�(�(&# + ��  + �� + \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/debug.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/debug.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/debug.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,491 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.debug = {}; + +(function(){ + +var cp; + +function createConsole(){ + + var scriptPanel = new Ext.debug.ScriptsPanel(); + var logView = new Ext.debug.LogPanel(); + var tree = new Ext.debug.DomTree(); + + var tabs = new Ext.TabPanel({ + activeTab: 0, + border: false, + tabPosition: 'bottom', + items: [{ + title: 'Debug Console', + layout:'border', + items: [logView, scriptPanel] + },{ + title: 'DOM Inspector', + layout:'border', + items: [tree] + }] + }); + + cp = new Ext.Panel({ + id: 'x-debug-browser', + title: 'Console', + collapsible: true, + animCollapse: false, + style: 'position:absolute;left:0;bottom:0;', + height:200, + logView: logView, + layout: 'fit', + + tools:[{ + id: 'close', + handler: function(){ + cp.destroy(); + cp = null; + Ext.EventManager.removeResizeListener(handleResize); + } + }], + + items: tabs + }); + + cp.render(document.body); + + cp.resizer = new Ext.Resizable(cp.el, { + minHeight:50, + handles: "n", + pinned: true, + transparent:true, + resizeElement : function(){ + var box = this.proxy.getBox(); + this.proxy.hide(); + cp.setHeight(box.height); + return box; + } + }); + + function handleResize(){ + cp.setWidth(Ext.getBody().getViewSize().width); + } + Ext.EventManager.onWindowResize(handleResize); + + handleResize(); +} + + +Ext.apply(Ext, { + log : function(){ + if(!cp){ + createConsole(); + } + cp.logView.log.apply(cp.logView, arguments); + }, + + logf : function(format, arg1, arg2, etc){ + Ext.log(String.format.apply(String, arguments)); + }, + + dump : function(o){ + if(typeof o == 'string' || typeof o == 'number' || typeof o == 'undefined' || o instanceof Date){ + Ext.log(o); + }else if(!o){ + Ext.log("null"); + }else if(typeof o != "object"){ + Ext.log('Unknown return type'); + }else if(o instanceof Array){ + Ext.log('['+o.join(',')+']'); + }else{ + var b = ["{\n"]; + for(var key in o){ + var to = typeof o[key]; + if(to != "function" && to != "object"){ + b.push(String.format(" {0}: {1},\n", key, o[key])); + } + } + var s = b.join(""); + if(s.length > 3){ + s = s.substr(0, s.length-2); + } + Ext.log(s + "\n}"); + } + }, + + _timers : {}, + + time : function(name){ + name = name || "def"; + Ext._timers[name] = new Date().getTime(); + }, + + timeEnd : function(name, printResults){ + var t = new Date().getTime(); + name = name || "def"; + var v = String.format("{0} ms", t-Ext._timers[name]); + Ext._timers[name] = new Date().getTime(); + if(printResults !== false){ + Ext.log('Timer ' + (name == "def" ? v : name + ": " + v)); + } + return v; + } +}); + +})(); + + +Ext.debug.ScriptsPanel = Ext.extend(Ext.Panel, { + id:'x-debug-scripts', + region: 'east', + minWidth: 200, + split: true, + width: 350, + border: false, + layout:'anchor', + style:'border-width:0 0 0 1px;', + + initComponent : function(){ + + this.scriptField = new Ext.form.TextArea({ + anchor: '100% -26', + style:'border-width:0;' + }); + + this.trapBox = new Ext.form.Checkbox({ + id: 'console-trap', + boxLabel: 'Trap Errors', + checked: true + }); + + this.toolbar = new Ext.Toolbar([{ + text: 'Run', + scope: this, + handler: this.evalScript + },{ + text: 'Clear', + scope: this, + handler: this.clear + }, + '->', + this.trapBox, + ' ', ' ' + ]); + + this.items = [this.toolbar, this.scriptField]; + + Ext.debug.ScriptsPanel.superclass.initComponent.call(this); + }, + + evalScript : function(){ + var s = this.scriptField.getValue(); + if(this.trapBox.getValue()){ + try{ + var rt = eval(s); + Ext.dump(rt === undefined? '(no return)' : rt); + }catch(e){ + Ext.log(e.message || e.descript); + } + }else{ + var rt = eval(s); + Ext.dump(rt === undefined? '(no return)' : rt); + } + }, + + clear : function(){ + this.scriptField.setValue(''); + this.scriptField.focus(); + } + +}); + +Ext.debug.LogPanel = Ext.extend(Ext.Panel, { + autoScroll: true, + region: 'center', + border: false, + style:'border-width:0 1px 0 0', + + log : function(){ + var markup = [ '
        ', + Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments, ', ')).replace(/\n/g, '
        ').replace(/\s/g, ' '), + '
        '].join(''); + + this.body.insertHtml('beforeend', markup); + this.body.scrollTo('top', 100000); + }, + + clear : function(){ + this.body.update(''); + this.body.dom.scrollTop = 0; + } +}); + +Ext.debug.DomTree = Ext.extend(Ext.tree.TreePanel, { + enableDD:false , + lines:false, + rootVisible:false, + animate:false, + hlColor:'ffff9c', + autoScroll: true, + region:'center', + border:false, + + initComponent : function(){ + + + Ext.debug.DomTree.superclass.initComponent.call(this); + + // tree related stuff + var styles = false, hnode; + var nonSpace = /^\s*$/; + var html = Ext.util.Format.htmlEncode; + var ellipsis = Ext.util.Format.ellipsis; + var styleRe = /\s?([a-z\-]*)\:([^;]*)(?:[;\s\n\r]*)/gi; + + function findNode(n){ + if(!n || n.nodeType != 1 || n == document.body || n == document){ + return false; + } + var pn = [n], p = n; + while((p = p.parentNode) && p.nodeType == 1 && p.tagName.toUpperCase() != 'HTML'){ + pn.unshift(p); + } + var cn = hnode; + for(var i = 0, len = pn.length; i < len; i++){ + cn.expand(); + cn = cn.findChild('htmlNode', pn[i]); + if(!cn){ // in this dialog? + return false; + } + } + cn.select(); + var a = cn.ui.anchor; + treeEl.dom.scrollTop = Math.max(0 ,a.offsetTop-10); + //treeEl.dom.scrollLeft = Math.max(0 ,a.offsetLeft-10); no likey + cn.highlight(); + return true; + } + + function nodeTitle(n){ + var s = n.tagName; + if(n.id){ + s += '#'+n.id; + }else if(n.className){ + s += '.'+n.className; + } + return s; + } + + function onNodeSelect(t, n, last){ + return; + if(last && last.unframe){ + last.unframe(); + } + var props = {}; + if(n && n.htmlNode){ + if(frameEl.pressed){ + n.frame(); + } + if(inspecting){ + return; + } + addStyle.enable(); + reload.setDisabled(n.leaf); + var dom = n.htmlNode; + stylePanel.setTitle(nodeTitle(dom)); + if(styles && !showAll.pressed){ + var s = dom.style ? dom.style.cssText : ''; + if(s){ + var m; + while ((m = styleRe.exec(s)) != null){ + props[m[1].toLowerCase()] = m[2]; + } + } + }else if(styles){ + var cl = Ext.debug.cssList; + var s = dom.style, fly = Ext.fly(dom); + if(s){ + for(var i = 0, len = cl.length; i' + ellipsis(html(String(c.nodeValue)), 35) + '', + cls: 'x-tree-noicon' + })); + } + } + cb(); + }; + + //tree.getSelectionModel().on('selectionchange', onNodeSelect, null, {buffer:250}); + + this.root = this.setRootNode(new Ext.tree.TreeNode('Ext')); + + hnode = this.root.appendChild(new Ext.debug.HtmlNode( + document.getElementsByTagName('html')[0] + )); + + } +}); + + +// highly unusual class declaration +Ext.debug.HtmlNode = function(){ + var html = Ext.util.Format.htmlEncode; + var ellipsis = Ext.util.Format.ellipsis; + var nonSpace = /^\s*$/; + + var attrs = [ + {n: 'id', v: 'id'}, + {n: 'className', v: 'class'}, + {n: 'name', v: 'name'}, + {n: 'type', v: 'type'}, + {n: 'src', v: 'src'}, + {n: 'href', v: 'href'} + ]; + + function hasChild(n){ + for(var i = 0, c; c = n.childNodes[i]; i++){ + if(c.nodeType == 1){ + return true; + } + } + return false; + } + + function renderNode(n, leaf){ + var tag = n.tagName.toLowerCase(); + var s = '<' + tag; + for(var i = 0, len = attrs.length; i < len; i++){ + var a = attrs[i]; + var v = n[a.n]; + if(v && !nonSpace.test(v)){ + s += ' ' + a.v + '="' + html(v) +'"'; + } + } + var style = n.style ? n.style.cssText : ''; + if(style){ + s += ' style="' + html(style.toLowerCase()) +'"'; + } + if(leaf && n.childNodes.length > 0){ + s+='>' + ellipsis(html(String(n.innerHTML)), 35) + '</'+tag+'>'; + }else if(leaf){ + s += ' />'; + }else{ + s += '>'; + } + return s; + } + + var HtmlNode = function(n){ + var leaf = !hasChild(n); + this.htmlNode = n; + this.tagName = n.tagName.toLowerCase(); + var attr = { + text : renderNode(n, leaf), + leaf : leaf, + cls: 'x-tree-noicon' + }; + HtmlNode.superclass.constructor.call(this, attr); + this.attributes.htmlNode = n; // for searching + if(!leaf){ + this.on('expand', this.onExpand, this); + this.on('collapse', this.onCollapse, this); + } + }; + + + Ext.extend(HtmlNode, Ext.tree.AsyncTreeNode, { + cls: 'x-tree-noicon', + preventHScroll: true, + refresh : function(highlight){ + var leaf = !hasChild(this.htmlNode); + this.setText(renderNode(this.htmlNode, leaf)); + if(highlight){ + Ext.fly(this.ui.textNode).highlight(); + } + }, + + onExpand : function(){ + if(!this.closeNode && this.parentNode){ + this.closeNode = this.parentNode.insertBefore(new Ext.tree.TreeNode({ + text:'</' + this.tagName + '>', + cls: 'x-tree-noicon' + }), this.nextSibling); + }else if(this.closeNode){ + this.closeNode.ui.show(); + } + }, + + onCollapse : function(){ + if(this.closeNode){ + this.closeNode.ui.hide(); + } + }, + + render : function(bulkRender){ + HtmlNode.superclass.render.call(this, bulkRender); + }, + + highlightNode : function(){ + //Ext.fly(this.htmlNode).highlight(); + }, + + highlight : function(){ + //Ext.fly(this.ui.textNode).highlight(); + }, + + frame : function(){ + this.htmlNode.style.border = '1px solid #0000ff'; + //this.highlightNode(); + }, + + unframe : function(){ + //Ext.fly(this.htmlNode).removeClass('x-debug-frame'); + this.htmlNode.style.border = ''; + } + }); + + return HtmlNode; +}(); + + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/ext.jsb =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/ext.jsb,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/ext.jsb 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,515 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/license.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/license.txt,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/license.txt 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,50 @@ +Ext JS - JavaScript Library +Copyright (c) 2006-2007, Ext JS, LLC +All rights reserved. +licensing@extjs.com + +http://extjs.com/license + + +License of CSS and Graphics ("Assets") +------------------------------------------------------------------------------------------ +The Assets distributed with Ext are licensed for use ONLY +with their associated Ext JavaScript component ("Component"). Use of the Assets in +any way that does not also include the Component is prohibited without explicit +permission from Ext JS, LLC. Deriving images and CSS from the Assets in an effort +to bypass this license is also prohibited. + + +Open Source License +------------------------------------------------------------------------------------------ +Ext is also licensed under the terms of the Open Source LGPL 3.0 license. You may use +our open source license if you: + * Want to use Ext in an open source project that precludes using non-open source software + * Plan to use Ext in a personal, educational or non-profit manner + * Are using Ext in a commercial application that is not a software development library +or toolkit, you will meet LGPL requirements and you do not wish to support the project + +http://www.gnu.org/licenses/lgpl.html + + +Commercial License +------------------------------------------------------------------------------------------ +If you are using this library for commercial purposes, we encourage you to purchase +a commercial license. Please visit http://extjs.com/license for more details. + + +OEM / Reseller License +------------------------------------------------------------------------------------------ +If you plan to distribute Ext in a product that will be packaged or sold as a software +development library, toolkit or plug-in-based framework ("LIBRARY"), we require that you +work with us to establish a specific license that is appropriate. Use of the open source +license in a LIBRARY is not permitted without explicit permission from Ext JS, LLC. + +For more details, please visit: http://extjs.com/license. + +-- + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/ext-base.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/ext-base.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/ext-base.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,2185 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +(function() { + var libFlyweight; + + Ext.lib.Dom = { + getViewWidth : function(full) { + return full ? this.getDocumentWidth() : this.getViewportWidth(); + }, + + getViewHeight : function(full) { + return full ? this.getDocumentHeight() : this.getViewportHeight(); + }, + + getDocumentHeight: function() { + var scrollHeight = (document.compatMode != "CSS1Compat") ? document.body.scrollHeight : document.documentElement.scrollHeight; + return Math.max(scrollHeight, this.getViewportHeight()); + }, + + getDocumentWidth: function() { + var scrollWidth = (document.compatMode != "CSS1Compat") ? document.body.scrollWidth : document.documentElement.scrollWidth; + return Math.max(scrollWidth, this.getViewportWidth()); + }, + + getViewportHeight: function(){ + if(Ext.isIE){ + return Ext.isStrict ? document.documentElement.clientHeight : + document.body.clientHeight; + }else{ + return self.innerHeight; + } + }, + + getViewportWidth: function() { + if(Ext.isIE){ + return Ext.isStrict ? document.documentElement.clientWidth : + document.body.clientWidth; + }else{ + return self.innerWidth; + } + }, + + isAncestor : function(p, c) { + p = Ext.getDom(p); + c = Ext.getDom(c); + if (!p || !c) { + return false; + } + + if (p.contains && !Ext.isSafari) { + return p.contains(c); + } else if (p.compareDocumentPosition) { + return !!(p.compareDocumentPosition(c) & 16); + } else { + var parent = c.parentNode; + while (parent) { + if (parent == p) { + return true; + } + else if (!parent.tagName || parent.tagName.toUpperCase() == "HTML") { + return false; + } + parent = parent.parentNode; + } + return false; + } + }, + + getRegion : function(el) { + return Ext.lib.Region.getRegion(el); + }, + + getY : function(el) { + return this.getXY(el)[1]; + }, + + getX : function(el) { + return this.getXY(el)[0]; + }, + + + getXY : function(el) { + var p, pe, b, scroll, bd = (document.body || document.documentElement); + el = Ext.getDom(el); + + if(el == bd){ + return [0, 0]; + } + + if (el.getBoundingClientRect) { + b = el.getBoundingClientRect(); + scroll = fly(document).getScroll(); + return [b.left + scroll.left, b.top + scroll.top]; + } + var x = 0, y = 0; + + p = el; + + var hasAbsolute = fly(el).getStyle("position") == "absolute"; + + while (p) { + + x += p.offsetLeft; + y += p.offsetTop; + + if (!hasAbsolute && fly(p).getStyle("position") == "absolute") { + hasAbsolute = true; + } + + if (Ext.isGecko) { + pe = fly(p); + + var bt = parseInt(pe.getStyle("borderTopWidth"), 10) || 0; + var bl = parseInt(pe.getStyle("borderLeftWidth"), 10) || 0; + + + x += bl; + y += bt; + + + if (p != el && pe.getStyle('overflow') != 'visible') { + x += bl; + y += bt; + } + } + p = p.offsetParent; + } + + if (Ext.isSafari && hasAbsolute) { + x -= bd.offsetLeft; + y -= bd.offsetTop; + } + + if (Ext.isGecko && !hasAbsolute) { + var dbd = fly(bd); + x += parseInt(dbd.getStyle("borderLeftWidth"), 10) || 0; + y += parseInt(dbd.getStyle("borderTopWidth"), 10) || 0; + } + + p = el.parentNode; + while (p && p != bd) { + if (!Ext.isOpera || (p.tagName != 'TR' && fly(p).getStyle("display") != "inline")) { + x -= p.scrollLeft; + y -= p.scrollTop; + } + p = p.parentNode; + } + return [x, y]; + }, + + setXY : function(el, xy) { + el = Ext.fly(el, '_setXY'); + el.position(); + var pts = el.translatePoints(xy); + if (xy[0] !== false) { + el.dom.style.left = pts.left + "px"; + } + if (xy[1] !== false) { + el.dom.style.top = pts.top + "px"; + } + }, + + setX : function(el, x) { + this.setXY(el, [x, false]); + }, + + setY : function(el, y) { + this.setXY(el, [false, y]); + } + }; + +/* + * Portions of this file are based on pieces of Yahoo User Interface Library + * Copyright (c) 2007, Yahoo! Inc. All rights reserved. + * YUI licensed under the BSD License: + * http://developer.yahoo.net/yui/license.txt + */ + Ext.lib.Event = function() { + var loadComplete = false; + var listeners = []; + var unloadListeners = []; + var retryCount = 0; + var onAvailStack = []; + var counter = 0; + var lastError = null; + + return { + POLL_RETRYS: 200, + POLL_INTERVAL: 20, + EL: 0, + TYPE: 1, + FN: 2, + WFN: 3, + OBJ: 3, + ADJ_SCOPE: 4, + _interval: null, + + startInterval: function() { + if (!this._interval) { + var self = this; + var callback = function() { + self._tryPreloadAttach(); + }; + this._interval = setInterval(callback, this.POLL_INTERVAL); + + } + }, + + onAvailable: function(p_id, p_fn, p_obj, p_override) { + onAvailStack.push({ id: p_id, + fn: p_fn, + obj: p_obj, + override: p_override, + checkReady: false }); + + retryCount = this.POLL_RETRYS; + this.startInterval(); + }, + + + addListener: function(el, eventName, fn) { + el = Ext.getDom(el); + if (!el || !fn) { + return false; + } + + if ("unload" == eventName) { + unloadListeners[unloadListeners.length] = + [el, eventName, fn]; + return true; + } + + // prevent unload errors with simple check + var wrappedFn = function(e) { + return typeof Ext != 'undefined' ? fn(Ext.lib.Event.getEvent(e)) : false; + }; + + var li = [el, eventName, fn, wrappedFn]; + + var index = listeners.length; + listeners[index] = li; + + this.doAdd(el, eventName, wrappedFn, false); + return true; + + }, + + + removeListener: function(el, eventName, fn) { + var i, len; + + el = Ext.getDom(el); + + if(!fn) { + return this.purgeElement(el, false, eventName); + } + + + if ("unload" == eventName) { + + for (i = 0,len = unloadListeners.length; i < len; i++) { + var li = unloadListeners[i]; + if (li && + li[0] == el && + li[1] == eventName && + li[2] == fn) { + unloadListeners.splice(i, 1); + return true; + } + } + + return false; + } + + var cacheItem = null; + + + var index = arguments[3]; + + if ("undefined" == typeof index) { + index = this._getCacheIndex(el, eventName, fn); + } + + if (index >= 0) { + cacheItem = listeners[index]; + } + + if (!el || !cacheItem) { + return false; + } + + this.doRemove(el, eventName, cacheItem[this.WFN], false); + + delete listeners[index][this.WFN]; + delete listeners[index][this.FN]; + listeners.splice(index, 1); + + return true; + + }, + + + getTarget: function(ev, resolveTextNode) { + ev = ev.browserEvent || ev; + var t = ev.target || ev.srcElement; + return this.resolveTextNode(t); + }, + + + resolveTextNode: function(node) { + if (Ext.isSafari && node && 3 == node.nodeType) { + return node.parentNode; + } else { + return node; + } + }, + + + getPageX: function(ev) { + ev = ev.browserEvent || ev; + var x = ev.pageX; + if (!x && 0 !== x) { + x = ev.clientX || 0; + + if (Ext.isIE) { + x += this.getScroll()[1]; + } + } + + return x; + }, + + + getPageY: function(ev) { + ev = ev.browserEvent || ev; + var y = ev.pageY; + if (!y && 0 !== y) { + y = ev.clientY || 0; + + if (Ext.isIE) { + y += this.getScroll()[0]; + } + } + + + return y; + }, + + + getXY: function(ev) { + ev = ev.browserEvent || ev; + return [this.getPageX(ev), this.getPageY(ev)]; + }, + + + getRelatedTarget: function(ev) { + ev = ev.browserEvent || ev; + var t = ev.relatedTarget; + if (!t) { + if (ev.type == "mouseout") { + t = ev.toElement; + } else if (ev.type == "mouseover") { + t = ev.fromElement; + } + } + + return this.resolveTextNode(t); + }, + + + getTime: function(ev) { + ev = ev.browserEvent || ev; + if (!ev.time) { + var t = new Date().getTime(); + try { + ev.time = t; + } catch(ex) { + this.lastError = ex; + return t; + } + } + + return ev.time; + }, + + + stopEvent: function(ev) { + this.stopPropagation(ev); + this.preventDefault(ev); + }, + + + stopPropagation: function(ev) { + ev = ev.browserEvent || ev; + if (ev.stopPropagation) { + ev.stopPropagation(); + } else { + ev.cancelBubble = true; + } + }, + + + preventDefault: function(ev) { + ev = ev.browserEvent || ev; + if(ev.preventDefault) { + ev.preventDefault(); + } else { + ev.returnValue = false; + } + }, + + + getEvent: function(e) { + var ev = e || window.event; + if (!ev) { + var c = this.getEvent.caller; + while (c) { + ev = c.arguments[0]; + if (ev && Event == ev.constructor) { + break; + } + c = c.caller; + } + } + return ev; + }, + + + getCharCode: function(ev) { + ev = ev.browserEvent || ev; + return ev.charCode || ev.keyCode || 0; + }, + + + _getCacheIndex: function(el, eventName, fn) { + for (var i = 0,len = listeners.length; i < len; ++i) { + var li = listeners[i]; + if (li && + li[this.FN] == fn && + li[this.EL] == el && + li[this.TYPE] == eventName) { + return i; + } + } + + return -1; + }, + + + elCache: {}, + + + getEl: function(id) { + return document.getElementById(id); + }, + + + clearCache: function() { + }, + + + _load: function(e) { + loadComplete = true; + var EU = Ext.lib.Event; + + + if (Ext.isIE) { + EU.doRemove(window, "load", EU._load); + } + }, + + + _tryPreloadAttach: function() { + + if (this.locked) { + return false; + } + + this.locked = true; + + + var tryAgain = !loadComplete; + if (!tryAgain) { + tryAgain = (retryCount > 0); + } + + + var notAvail = []; + for (var i = 0,len = onAvailStack.length; i < len; ++i) { + var item = onAvailStack[i]; + if (item) { + var el = this.getEl(item.id); + + if (el) { + if (!item.checkReady || + loadComplete || + el.nextSibling || + (document && document.body)) { + + var scope = el; + if (item.override) { + if (item.override === true) { + scope = item.obj; + } else { + scope = item.override; + } + } + item.fn.call(scope, item.obj); + onAvailStack[i] = null; + } + } else { + notAvail.push(item); + } + } + } + + retryCount = (notAvail.length === 0) ? 0 : retryCount - 1; + + if (tryAgain) { + + this.startInterval(); + } else { + clearInterval(this._interval); + this._interval = null; + } + + this.locked = false; + + return true; + + }, + + + purgeElement: function(el, recurse, eventName) { + var elListeners = this.getListeners(el, eventName); + if (elListeners) { + for (var i = 0,len = elListeners.length; i < len; ++i) { + var l = elListeners[i]; + this.removeListener(el, l.type, l.fn); + } + } + + if (recurse && el && el.childNodes) { + for (i = 0,len = el.childNodes.length; i < len; ++i) { + this.purgeElement(el.childNodes[i], recurse, eventName); + } + } + }, + + + getListeners: function(el, eventName) { + var results = [], searchLists; + if (!eventName) { + searchLists = [listeners, unloadListeners]; + } else if (eventName == "unload") { + searchLists = [unloadListeners]; + } else { + searchLists = [listeners]; + } + + for (var j = 0; j < searchLists.length; ++j) { + var searchList = searchLists[j]; + if (searchList && searchList.length > 0) { + for (var i = 0,len = searchList.length; i < len; ++i) { + var l = searchList[i]; + if (l && l[this.EL] === el && + (!eventName || eventName === l[this.TYPE])) { + results.push({ + type: l[this.TYPE], + fn: l[this.FN], + obj: l[this.OBJ], + adjust: l[this.ADJ_SCOPE], + index: i + }); + } + } + } + } + + return (results.length) ? results : null; + }, + + + _unload: function(e) { + + var EU = Ext.lib.Event, i, j, l, len, index; + + for (i = 0,len = unloadListeners.length; i < len; ++i) { + l = unloadListeners[i]; + if (l) { + var scope = window; + if (l[EU.ADJ_SCOPE]) { + if (l[EU.ADJ_SCOPE] === true) { + scope = l[EU.OBJ]; + } else { + scope = l[EU.ADJ_SCOPE]; + } + } + l[EU.FN].call(scope, EU.getEvent(e), l[EU.OBJ]); + unloadListeners[i] = null; + l = null; + scope = null; + } + } + + unloadListeners = null; + + if (listeners && listeners.length > 0) { + j = listeners.length; + while (j) { + index = j - 1; + l = listeners[index]; + if (l) { + EU.removeListener(l[EU.EL], l[EU.TYPE], + l[EU.FN], index); + } + j = j - 1; + } + l = null; + + EU.clearCache(); + } + + EU.doRemove(window, "unload", EU._unload); + + }, + + + getScroll: function() { + var dd = document.documentElement, db = document.body; + if (dd && (dd.scrollTop || dd.scrollLeft)) { + return [dd.scrollTop, dd.scrollLeft]; + } else if (db) { + return [db.scrollTop, db.scrollLeft]; + } else { + return [0, 0]; + } + }, + + + doAdd: function () { + if (window.addEventListener) { + return function(el, eventName, fn, capture) { + el.addEventListener(eventName, fn, (capture)); + }; + } else if (window.attachEvent) { + return function(el, eventName, fn, capture) { + el.attachEvent("on" + eventName, fn); + }; + } else { + return function() { + }; + } + }(), + + + doRemove: function() { + if (window.removeEventListener) { + return function (el, eventName, fn, capture) { + el.removeEventListener(eventName, fn, (capture)); + }; + } else if (window.detachEvent) { + return function (el, eventName, fn) { + el.detachEvent("on" + eventName, fn); + }; + } else { + return function() { + }; + } + }() + }; + + }(); + + var E = Ext.lib.Event; + E.on = E.addListener; + E.un = E.removeListener; + if (document && document.body) { + E._load(); + } else { + E.doAdd(window, "load", E._load); + } + E.doAdd(window, "unload", E._unload); + E._tryPreloadAttach(); + + Ext.lib.Ajax = { + request : function(method, uri, cb, data, options) { + if(options){ + var hs = options.headers; + if(hs){ + for(var h in hs){ + if(hs.hasOwnProperty(h)){ + this.initHeader(h, hs[h], false); + } + } + } + if(options.xmlData){ + this.initHeader('Content-Type', 'text/xml', false); + method = 'POST'; + data = options.xmlData; + }else if(options.jsonData){ + this.initHeader('Content-Type', 'text/javascript', false); + method = 'POST'; + data = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData; + } + } + + return this.asyncRequest(method, uri, cb, data); + }, + + serializeForm : function(form) { + if(typeof form == 'string') { + form = (document.getElementById(form) || document.forms[form]); + } + + var el, name, val, disabled, data = '', hasSubmit = false; + for (var i = 0; i < form.elements.length; i++) { + el = form.elements[i]; + disabled = form.elements[i].disabled; + name = form.elements[i].name; + val = form.elements[i].value; + + if (!disabled && name){ + switch (el.type) + { + case 'select-one': + case 'select-multiple': + for (var j = 0; j < el.options.length; j++) { + if (el.options[j].selected) { + if (Ext.isIE) { + data += encodeURIComponent(name) + '=' + encodeURIComponent(el.options[j].attributes['value'].specified ? el.options[j].value : el.options[j].text) + '&'; + } + else { + data += encodeURIComponent(name) + '=' + encodeURIComponent(el.options[j].hasAttribute('value') ? el.options[j].value : el.options[j].text) + '&'; + } + } + } + break; + case 'radio': + case 'checkbox': + if (el.checked) { + data += encodeURIComponent(name) + '=' + encodeURIComponent(val) + '&'; + } + break; + case 'file': + + case undefined: + + case 'reset': + + case 'button': + + break; + case 'submit': + if(hasSubmit == false) { + data += encodeURIComponent(name) + '=' + encodeURIComponent(val) + '&'; + hasSubmit = true; + } + break; + default: + data += encodeURIComponent(name) + '=' + encodeURIComponent(val) + '&'; + break; + } + } + } + data = data.substr(0, data.length - 1); + return data; + }, + + headers:{}, + + hasHeaders:false, + + useDefaultHeader:true, + + defaultPostHeader:'application/x-www-form-urlencoded', + + useDefaultXhrHeader:true, + + defaultXhrHeader:'XMLHttpRequest', + + hasDefaultHeaders:true, + + defaultHeaders:{}, + + poll:{}, + + timeout:{}, + + pollInterval:50, + + transactionId:0, + + setProgId:function(id) + { + this.activeX.unshift(id); + }, + + setDefaultPostHeader:function(b) + { + this.useDefaultHeader = b; + }, + + setDefaultXhrHeader:function(b) + { + this.useDefaultXhrHeader = b; + }, + + setPollingInterval:function(i) + { + if (typeof i == 'number' && isFinite(i)) { + this.pollInterval = i; + } + }, + + createXhrObject:function(transactionId) + { + var obj,http; + try + { + + http = new XMLHttpRequest(); + + obj = { conn:http, tId:transactionId }; + } + catch(e) + { + for (var i = 0; i < this.activeX.length; ++i) { + try + { + + http = new ActiveXObject(this.activeX[i]); + + obj = { conn:http, tId:transactionId }; + break; + } + catch(e) { + } + } + } + finally + { + return obj; + } + }, + + getConnectionObject:function() + { + var o; + var tId = this.transactionId; + + try + { + o = this.createXhrObject(tId); + if (o) { + this.transactionId++; + } + } + catch(e) { + } + finally + { + return o; + } + }, + + asyncRequest:function(method, uri, callback, postData) + { + var o = this.getConnectionObject(); + + if (!o) { + return null; + } + else { + o.conn.open(method, uri, true); + + if (this.useDefaultXhrHeader) { + if (!this.defaultHeaders['X-Requested-With']) { + this.initHeader('X-Requested-With', this.defaultXhrHeader, true); + } + } + + if(postData && this.useDefaultHeader){ + this.initHeader('Content-Type', this.defaultPostHeader); + } + + if (this.hasDefaultHeaders || this.hasHeaders) { + this.setHeader(o); + } + + this.handleReadyState(o, callback); + o.conn.send(postData || null); + + return o; + } + }, + + handleReadyState:function(o, callback) + { + var oConn = this; + + if (callback && callback.timeout) { + this.timeout[o.tId] = window.setTimeout(function() { + oConn.abort(o, callback, true); + }, callback.timeout); + } + + this.poll[o.tId] = window.setInterval( + function() { + if (o.conn && o.conn.readyState == 4) { + window.clearInterval(oConn.poll[o.tId]); + delete oConn.poll[o.tId]; + + if (callback && callback.timeout) { + window.clearTimeout(oConn.timeout[o.tId]); + delete oConn.timeout[o.tId]; + } + + oConn.handleTransactionResponse(o, callback); + } + } + , this.pollInterval); + }, + + handleTransactionResponse:function(o, callback, isAbort) + { + + if (!callback) { + this.releaseObject(o); + return; + } + + var httpStatus, responseObject; + + try + { + if (o.conn.status !== undefined && o.conn.status != 0) { + httpStatus = o.conn.status; + } + else { + httpStatus = 13030; + } + } + catch(e) { + + + httpStatus = 13030; + } + + if (httpStatus >= 200 && httpStatus < 300) { + responseObject = this.createResponseObject(o, callback.argument); + if (callback.success) { + if (!callback.scope) { + callback.success(responseObject); + } + else { + + + callback.success.apply(callback.scope, [responseObject]); + } + } + } + else { + switch (httpStatus) { + + case 12002: + case 12029: + case 12030: + case 12031: + case 12152: + case 13030: + responseObject = this.createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false)); + if (callback.failure) { + if (!callback.scope) { + callback.failure(responseObject); + } + else { + callback.failure.apply(callback.scope, [responseObject]); + } + } + break; + default: + responseObject = this.createResponseObject(o, callback.argument); + if (callback.failure) { + if (!callback.scope) { + callback.failure(responseObject); + } + else { + callback.failure.apply(callback.scope, [responseObject]); + } + } + } + } + + this.releaseObject(o); + responseObject = null; + }, + + createResponseObject:function(o, callbackArg) + { + var obj = {}; + var headerObj = {}; + + try + { + var headerStr = o.conn.getAllResponseHeaders(); + var header = headerStr.split('\n'); + for (var i = 0; i < header.length; i++) { + var delimitPos = header[i].indexOf(':'); + if (delimitPos != -1) { + headerObj[header[i].substring(0, delimitPos)] = header[i].substring(delimitPos + 2); + } + } + } + catch(e) { + } + + obj.tId = o.tId; + obj.status = o.conn.status; + obj.statusText = o.conn.statusText; + obj.getResponseHeader = headerObj; + obj.getAllResponseHeaders = headerStr; + obj.responseText = o.conn.responseText; + obj.responseXML = o.conn.responseXML; + + if (typeof callbackArg !== undefined) { + obj.argument = callbackArg; + } + + return obj; + }, + + createExceptionObject:function(tId, callbackArg, isAbort) + { + var COMM_CODE = 0; + var COMM_ERROR = 'communication failure'; + var ABORT_CODE = -1; + var ABORT_ERROR = 'transaction aborted'; + + var obj = {}; + + obj.tId = tId; + if (isAbort) { + obj.status = ABORT_CODE; + obj.statusText = ABORT_ERROR; + } + else { + obj.status = COMM_CODE; + obj.statusText = COMM_ERROR; + } + + if (callbackArg) { + obj.argument = callbackArg; + } + + return obj; + }, + + initHeader:function(label, value, isDefault) + { + var headerObj = (isDefault) ? this.defaultHeaders : this.headers; + + if (headerObj[label] === undefined) { + headerObj[label] = value; + } + else { + + + headerObj[label] = value + "," + headerObj[label]; + } + + if (isDefault) { + this.hasDefaultHeaders = true; + } + else { + this.hasHeaders = true; + } + }, + + + setHeader:function(o) + { + if (this.hasDefaultHeaders) { + for (var prop in this.defaultHeaders) { + if (this.defaultHeaders.hasOwnProperty(prop)) { + o.conn.setRequestHeader(prop, this.defaultHeaders[prop]); + } + } + } + + if (this.hasHeaders) { + for (var prop in this.headers) { + if (this.headers.hasOwnProperty(prop)) { + o.conn.setRequestHeader(prop, this.headers[prop]); + } + } + this.headers = {}; + this.hasHeaders = false; + } + }, + + resetDefaultHeaders:function() { + delete this.defaultHeaders; + this.defaultHeaders = {}; + this.hasDefaultHeaders = false; + }, + + abort:function(o, callback, isTimeout) + { + if (this.isCallInProgress(o)) { + o.conn.abort(); + window.clearInterval(this.poll[o.tId]); + delete this.poll[o.tId]; + if (isTimeout) { + delete this.timeout[o.tId]; + } + + this.handleTransactionResponse(o, callback, true); + + return true; + } + else { + return false; + } + }, + + + isCallInProgress:function(o) + { + + + if (o.conn) { + return o.conn.readyState != 4 && o.conn.readyState != 0; + } + else { + + return false; + } + }, + + + releaseObject:function(o) + { + + o.conn = null; + + o = null; + }, + + activeX:[ + 'MSXML2.XMLHTTP.3.0', + 'MSXML2.XMLHTTP', + 'Microsoft.XMLHTTP' + ] + + + }; + + + Ext.lib.Region = function(t, r, b, l) { + this.top = t; + this[1] = t; + this.right = r; + this.bottom = b; + this.left = l; + this[0] = l; + }; + + Ext.lib.Region.prototype = { + contains : function(region) { + return ( region.left >= this.left && + region.right <= this.right && + region.top >= this.top && + region.bottom <= this.bottom ); + + }, + + getArea : function() { + return ( (this.bottom - this.top) * (this.right - this.left) ); + }, + + intersect : function(region) { + var t = Math.max(this.top, region.top); + var r = Math.min(this.right, region.right); + var b = Math.min(this.bottom, region.bottom); + var l = Math.max(this.left, region.left); + + if (b >= t && r >= l) { + return new Ext.lib.Region(t, r, b, l); + } else { + return null; + } + }, + union : function(region) { + var t = Math.min(this.top, region.top); + var r = Math.max(this.right, region.right); + var b = Math.max(this.bottom, region.bottom); + var l = Math.min(this.left, region.left); + + return new Ext.lib.Region(t, r, b, l); + }, + + constrainTo : function(r) { + this.top = this.top.constrain(r.top, r.bottom); + this.bottom = this.bottom.constrain(r.top, r.bottom); + this.left = this.left.constrain(r.left, r.right); + this.right = this.right.constrain(r.left, r.right); + return this; + }, + + adjust : function(t, l, b, r) { + this.top += t; + this.left += l; + this.right += r; + this.bottom += b; + return this; + } + }; + + Ext.lib.Region.getRegion = function(el) { + var p = Ext.lib.Dom.getXY(el); + + var t = p[1]; + var r = p[0] + el.offsetWidth; + var b = p[1] + el.offsetHeight; + var l = p[0]; + + return new Ext.lib.Region(t, r, b, l); + }; + + Ext.lib.Point = function(x, y) { + if (x instanceof Array) { + y = x[1]; + x = x[0]; + } + this.x = this.right = this.left = this[0] = x; + this.y = this.top = this.bottom = this[1] = y; + }; + + Ext.lib.Point.prototype = new Ext.lib.Region(); + + + Ext.lib.Anim = { + scroll : function(el, args, duration, easing, cb, scope) { + this.run(el, args, duration, easing, cb, scope, Ext.lib.Scroll); + }, + + motion : function(el, args, duration, easing, cb, scope) { + this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion); + }, + + color : function(el, args, duration, easing, cb, scope) { + this.run(el, args, duration, easing, cb, scope, Ext.lib.ColorAnim); + }, + + run : function(el, args, duration, easing, cb, scope, type) { + type = type || Ext.lib.AnimBase; + if (typeof easing == "string") { + easing = Ext.lib.Easing[easing]; + } + var anim = new type(el, args, duration, easing); + anim.animateX(function() { + Ext.callback(cb, scope); + }); + return anim; + } + }; + + + function fly(el) { + if (!libFlyweight) { + libFlyweight = new Ext.Element.Flyweight(); + } + libFlyweight.dom = el; + return libFlyweight; + } + + + if(Ext.isIE) { + function fnCleanUp() { + var p = Function.prototype; + delete p.createSequence; + delete p.defer; + delete p.createDelegate; + delete p.createCallback; + delete p.createInterceptor; + + window.detachEvent("onunload", fnCleanUp); + } + window.attachEvent("onunload", fnCleanUp); + } + + Ext.lib.AnimBase = function(el, attributes, duration, method) { + if (el) { + this.init(el, attributes, duration, method); + } + }; + + Ext.lib.AnimBase.prototype = { + + toString: function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Anim " + id); + }, + + patterns: { + noNegatives: /width|height|opacity|padding/i, + offsetAttribute: /^((width|height)|(top|left))$/, + defaultUnit: /width|height|top$|bottom$|left$|right$/i, + offsetUnit: /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i + }, + + + doMethod: function(attr, start, end) { + return this.method(this.currentFrame, start, end - start, this.totalFrames); + }, + + + setAttribute: function(attr, val, unit) { + if (this.patterns.noNegatives.test(attr)) { + val = (val > 0) ? val : 0; + } + + Ext.fly(this.getEl(), '_anim').setStyle(attr, val + unit); + }, + + + getAttribute: function(attr) { + var el = this.getEl(); + var val = fly(el).getStyle(attr); + + if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) { + return parseFloat(val); + } + + var a = this.patterns.offsetAttribute.exec(attr) || []; + var pos = !!( a[3] ); + var box = !!( a[2] ); + + + if (box || (fly(el).getStyle('position') == 'absolute' && pos)) { + val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)]; + } else { + val = 0; + } + + return val; + }, + + + getDefaultUnit: function(attr) { + if (this.patterns.defaultUnit.test(attr)) { + return 'px'; + } + + return ''; + }, + + animateX : function(callback, scope) { + var f = function() { + this.onComplete.removeListener(f); + if (typeof callback == "function") { + callback.call(scope || this, this); + } + }; + this.onComplete.addListener(f, this); + this.animate(); + }, + + + setRuntimeAttribute: function(attr) { + var start; + var end; + var attributes = this.attributes; + + this.runtimeAttributes[attr] = {}; + + var isset = function(prop) { + return (typeof prop !== 'undefined'); + }; + + if (!isset(attributes[attr]['to']) && !isset(attributes[attr]['by'])) { + return false; + } + + start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr); + + + if (isset(attributes[attr]['to'])) { + end = attributes[attr]['to']; + } else if (isset(attributes[attr]['by'])) { + if (start.constructor == Array) { + end = []; + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + attributes[attr]['by'][i]; + } + } else { + end = start + attributes[attr]['by']; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + + + this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ? attributes[attr]['unit'] : this.getDefaultUnit(attr); + }, + + + init: function(el, attributes, duration, method) { + + var isAnimated = false; + + + var startTime = null; + + + var actualFrames = 0; + + + el = Ext.getDom(el); + + + this.attributes = attributes || {}; + + + this.duration = duration || 1; + + + this.method = method || Ext.lib.Easing.easeNone; + + + this.useSeconds = true; + + + this.currentFrame = 0; + + + this.totalFrames = Ext.lib.AnimMgr.fps; + + + this.getEl = function() { + return el; + }; + + + this.isAnimated = function() { + return isAnimated; + }; + + + this.getStartTime = function() { + return startTime; + }; + + this.runtimeAttributes = {}; + + + this.animate = function() { + if (this.isAnimated()) { + return false; + } + + this.currentFrame = 0; + + this.totalFrames = ( this.useSeconds ) ? Math.ceil(Ext.lib.AnimMgr.fps * this.duration) : this.duration; + + Ext.lib.AnimMgr.registerElement(this); + }; + + + this.stop = function(finish) { + if (finish) { + this.currentFrame = this.totalFrames; + this._onTween.fire(); + } + Ext.lib.AnimMgr.stop(this); + }; + + var onStart = function() { + this.onStart.fire(); + + this.runtimeAttributes = {}; + for (var attr in this.attributes) { + this.setRuntimeAttribute(attr); + } + + isAnimated = true; + actualFrames = 0; + startTime = new Date(); + }; + + + var onTween = function() { + var data = { + duration: new Date() - this.getStartTime(), + currentFrame: this.currentFrame + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', currentFrame: ' + data.currentFrame + ); + }; + + this.onTween.fire(data); + + var runtimeAttributes = this.runtimeAttributes; + + for (var attr in runtimeAttributes) { + this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + } + + actualFrames += 1; + }; + + var onComplete = function() { + var actual_duration = (new Date() - startTime) / 1000 ; + + var data = { + duration: actual_duration, + frames: actualFrames, + fps: actualFrames / actual_duration + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', frames: ' + data.frames + + ', fps: ' + data.fps + ); + }; + + isAnimated = false; + actualFrames = 0; + this.onComplete.fire(data); + }; + + + this._onStart = new Ext.util.Event(this); + this.onStart = new Ext.util.Event(this); + this.onTween = new Ext.util.Event(this); + this._onTween = new Ext.util.Event(this); + this.onComplete = new Ext.util.Event(this); + this._onComplete = new Ext.util.Event(this); + this._onStart.addListener(onStart); + this._onTween.addListener(onTween); + this._onComplete.addListener(onComplete); + } + }; + + + Ext.lib.AnimMgr = new function() { + + var thread = null; + + + var queue = []; + + + var tweenCount = 0; + + + this.fps = 1000; + + + this.delay = 1; + + + this.registerElement = function(tween) { + queue[queue.length] = tween; + tweenCount += 1; + tween._onStart.fire(); + this.start(); + }; + + + this.unRegister = function(tween, index) { + tween._onComplete.fire(); + index = index || getIndex(tween); + if (index != -1) { + queue.splice(index, 1); + } + + tweenCount -= 1; + if (tweenCount <= 0) { + this.stop(); + } + }; + + + this.start = function() { + if (thread === null) { + thread = setInterval(this.run, this.delay); + } + }; + + + this.stop = function(tween) { + if (!tween) { + clearInterval(thread); + + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[0].isAnimated()) { + this.unRegister(queue[0], 0); + } + } + + queue = []; + thread = null; + tweenCount = 0; + } + else { + this.unRegister(tween); + } + }; + + + this.run = function() { + for (var i = 0, len = queue.length; i < len; ++i) { + var tween = queue[i]; + if (!tween || !tween.isAnimated()) { + continue; + } + + if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null) + { + tween.currentFrame += 1; + + if (tween.useSeconds) { + correctFrame(tween); + } + tween._onTween.fire(); + } + else { + Ext.lib.AnimMgr.stop(tween, i); + } + } + }; + + var getIndex = function(anim) { + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[i] == anim) { + return i; + } + } + return -1; + }; + + + var correctFrame = function(tween) { + var frames = tween.totalFrames; + var frame = tween.currentFrame; + var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames); + var elapsed = (new Date() - tween.getStartTime()); + var tweak = 0; + + if (elapsed < tween.duration * 1000) { + tweak = Math.round((elapsed / expected - 1) * tween.currentFrame); + } else { + tweak = frames - (frame + 1); + } + if (tweak > 0 && isFinite(tweak)) { + if (tween.currentFrame + tweak >= frames) { + tweak = frames - (frame + 1); + } + + tween.currentFrame += tweak; + } + }; + }; + + Ext.lib.Bezier = new function() { + + this.getPosition = function(points, t) { + var n = points.length; + var tmp = []; + + for (var i = 0; i < n; ++i) { + tmp[i] = [points[i][0], points[i][1]]; + } + + for (var j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; + }; + (function() { + + Ext.lib.ColorAnim = function(el, attributes, duration, method) { + Ext.lib.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + Ext.extend(Ext.lib.ColorAnim, Ext.lib.AnimBase); + + + var Y = Ext.lib; + var superclass = Y.ColorAnim.superclass; + var proto = Y.ColorAnim.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("ColorAnim " + id); + }; + + proto.patterns.color = /color$/i; + proto.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i; + proto.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i; + proto.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i; + proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; + + + proto.parseColor = function(s) { + if (s.length == 3) { + return s; + } + + var c = this.patterns.hex.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ]; + } + + c = this.patterns.rgb.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ]; + } + + c = this.patterns.hex3.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ]; + } + + return null; + }; + + proto.getAttribute = function(attr) { + var el = this.getEl(); + if (this.patterns.color.test(attr)) { + var val = fly(el).getStyle(attr); + + if (this.patterns.transparent.test(val)) { + var parent = el.parentNode; + val = fly(parent).getStyle(attr); + + while (parent && this.patterns.transparent.test(val)) { + parent = parent.parentNode; + val = fly(parent).getStyle(attr); + if (parent.tagName.toUpperCase() == 'HTML') { + val = '#fff'; + } + } + } + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val; + + if (this.patterns.color.test(attr)) { + val = []; + for (var i = 0, len = start.length; i < len; ++i) { + val[i] = superclass.doMethod.call(this, attr, start[i], end[i]); + } + + val = 'rgb(' + Math.floor(val[0]) + ',' + Math.floor(val[1]) + ',' + Math.floor(val[2]) + ')'; + } + else { + val = superclass.doMethod.call(this, attr, start, end); + } + + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + superclass.setRuntimeAttribute.call(this, attr); + + if (this.patterns.color.test(attr)) { + var attributes = this.attributes; + var start = this.parseColor(this.runtimeAttributes[attr].start); + var end = this.parseColor(this.runtimeAttributes[attr].end); + + if (typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined') { + end = this.parseColor(attributes[attr].by); + + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + end[i]; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + } + }; + })(); + + + Ext.lib.Easing = { + + + easeNone: function (t, b, c, d) { + return c * t / d + b; + }, + + + easeIn: function (t, b, c, d) { + return c * (t /= d) * t + b; + }, + + + easeOut: function (t, b, c, d) { + return -c * (t /= d) * (t - 2) + b; + }, + + + easeBoth: function (t, b, c, d) { + if ((t /= d / 2) < 1) { + return c / 2 * t * t + b; + } + + return -c / 2 * ((--t) * (t - 2) - 1) + b; + }, + + + easeInStrong: function (t, b, c, d) { + return c * (t /= d) * t * t * t + b; + }, + + + easeOutStrong: function (t, b, c, d) { + return -c * ((t = t / d - 1) * t * t * t - 1) + b; + }, + + + easeBothStrong: function (t, b, c, d) { + if ((t /= d / 2) < 1) { + return c / 2 * t * t * t * t + b; + } + + return -c / 2 * ((t -= 2) * t * t * t - 2) + b; + }, + + + + elasticIn: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ((t /= d) == 1) { + return b + c; + } + if (!p) { + p = d * .3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p / 4; + } + else { + var s = p / (2 * Math.PI) * Math.asin(c / a); + } + + return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; + }, + + + elasticOut: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ((t /= d) == 1) { + return b + c; + } + if (!p) { + p = d * .3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p / 4; + } + else { + var s = p / (2 * Math.PI) * Math.asin(c / a); + } + + return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b; + }, + + + elasticBoth: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + + if ((t /= d / 2) == 2) { + return b + c; + } + + if (!p) { + p = d * (.3 * 1.5); + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p / 4; + } + else { + var s = p / (2 * Math.PI) * Math.asin(c / a); + } + + if (t < 1) { + return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * + Math.sin((t * d - s) * (2 * Math.PI) / p)) + b; + } + return a * Math.pow(2, -10 * (t -= 1)) * + Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b; + }, + + + + backIn: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c * (t /= d) * t * ((s + 1) * t - s) + b; + }, + + + backOut: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; + }, + + + backBoth: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + + if ((t /= d / 2 ) < 1) { + return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b; + } + return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; + }, + + + bounceIn: function (t, b, c, d) { + return c - Ext.lib.Easing.bounceOut(d - t, 0, c, d) + b; + }, + + + bounceOut: function (t, b, c, d) { + if ((t /= d) < (1 / 2.75)) { + return c * (7.5625 * t * t) + b; + } else if (t < (2 / 2.75)) { + return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b; + } else if (t < (2.5 / 2.75)) { + return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b; + } + return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b; + }, + + + bounceBoth: function (t, b, c, d) { + if (t < d / 2) { + return Ext.lib.Easing.bounceIn(t * 2, 0, c, d) * .5 + b; + } + return Ext.lib.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b; + } + }; + + (function() { + Ext.lib.Motion = function(el, attributes, duration, method) { + if (el) { + Ext.lib.Motion.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + Ext.extend(Ext.lib.Motion, Ext.lib.ColorAnim); + + + var Y = Ext.lib; + var superclass = Y.Motion.superclass; + var proto = Y.Motion.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Motion " + id); + }; + + proto.patterns.points = /^points$/i; + + proto.setAttribute = function(attr, val, unit) { + if (this.patterns.points.test(attr)) { + unit = unit || 'px'; + superclass.setAttribute.call(this, 'left', val[0], unit); + superclass.setAttribute.call(this, 'top', val[1], unit); + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; + + proto.getAttribute = function(attr) { + if (this.patterns.points.test(attr)) { + var val = [ + superclass.getAttribute.call(this, 'left'), + superclass.getAttribute.call(this, 'top') + ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if (this.patterns.points.test(attr)) { + var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100; + val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t); + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + if (this.patterns.points.test(attr)) { + var el = this.getEl(); + var attributes = this.attributes; + var start; + var control = attributes['points']['control'] || []; + var end; + var i, len; + + if (control.length > 0 && !(control[0] instanceof Array)) { + control = [control]; + } else { + var tmp = []; + for (i = 0,len = control.length; i < len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + } + + Ext.fly(el).position(); + + if (isset(attributes['points']['from'])) { + Ext.lib.Dom.setXY(el, attributes['points']['from']); + } + else { + Ext.lib.Dom.setXY(el, Ext.lib.Dom.getXY(el)); + } + + start = this.getAttribute('points'); + + + if (isset(attributes['points']['to'])) { + end = translateValues.call(this, attributes['points']['to'], start); + + var pageXY = Ext.lib.Dom.getXY(this.getEl()); + for (i = 0,len = control.length; i < len; ++i) { + control[i] = translateValues.call(this, control[i], start); + } + + + } else if (isset(attributes['points']['by'])) { + end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ]; + + for (i = 0,len = control.length; i < len; ++i) { + control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; + } + } + + this.runtimeAttributes[attr] = [start]; + + if (control.length > 0) { + this.runtimeAttributes[attr] = this.runtimeAttributes[attr].concat(control); + } + + this.runtimeAttributes[attr][this.runtimeAttributes[attr].length] = end; + } + else { + superclass.setRuntimeAttribute.call(this, attr); + } + }; + + var translateValues = function(val, start) { + var pageXY = Ext.lib.Dom.getXY(this.getEl()); + val = [ val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1] ]; + + return val; + }; + + var isset = function(prop) { + return (typeof prop !== 'undefined'); + }; + })(); + + + (function() { + Ext.lib.Scroll = function(el, attributes, duration, method) { + if (el) { + Ext.lib.Scroll.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + Ext.extend(Ext.lib.Scroll, Ext.lib.ColorAnim); + + + var Y = Ext.lib; + var superclass = Y.Scroll.superclass; + var proto = Y.Scroll.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Scroll " + id); + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if (attr == 'scroll') { + val = [ + this.method(this.currentFrame, start[0], end[0] - start[0], this.totalFrames), + this.method(this.currentFrame, start[1], end[1] - start[1], this.totalFrames) + ]; + + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.getAttribute = function(attr) { + var val = null; + var el = this.getEl(); + + if (attr == 'scroll') { + val = [ el.scrollLeft, el.scrollTop ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.setAttribute = function(attr, val, unit) { + var el = this.getEl(); + + if (attr == 'scroll') { + el.scrollLeft = val[0]; + el.scrollTop = val[1]; + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; + })(); + + +})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/jquery-bridge.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/jquery-bridge.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/jquery-bridge.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,537 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +if(typeof jQuery == "undefined"){ + throw "Unable to load Ext, jQuery not found."; +} + +(function(){ +var libFlyweight; + +Ext.lib.Dom = { + getViewWidth : function(full){ + // jQuery doesn't report full window size on document query, so max both + return full ? Math.max(jQuery(document).width(),jQuery(window).width()) : jQuery(window).width(); + }, + + getViewHeight : function(full){ + // jQuery doesn't report full window size on document query, so max both + return full ? Math.max(jQuery(document).height(),jQuery(window).height()) : jQuery(window).height(); + }, + + isAncestor : function(p, c){ + p = Ext.getDom(p); + c = Ext.getDom(c); + if (!p || !c) {return false;} + + if(p.contains && !Ext.isSafari) { + return p.contains(c); + }else if(p.compareDocumentPosition) { + return !!(p.compareDocumentPosition(c) & 16); + }else{ + var parent = c.parentNode; + while (parent) { + if (parent == p) { + return true; + } + else if (!parent.tagName || parent.tagName.toUpperCase() == "HTML") { + return false; + } + parent = parent.parentNode; + } + return false; + } + }, + + getRegion : function(el){ + return Ext.lib.Region.getRegion(el); + }, + + ////////////////////////////////////////////////////////////////////////////////////// + // Use of jQuery.offset() removed to promote consistent behavior across libs. + // JVS 05/23/07 + ////////////////////////////////////////////////////////////////////////////////////// + + getY : function(el){ + return this.getXY(el)[1]; + }, + + getX : function(el){ + return this.getXY(el)[0]; + }, + + getXY : function(el) { + var p, pe, b, scroll, bd = (document.body || document.documentElement); + el = Ext.getDom(el); + + if(el == bd){ + return [0, 0]; + } + + if (el.getBoundingClientRect) { + b = el.getBoundingClientRect(); + scroll = fly(document).getScroll(); + return [b.left + scroll.left, b.top + scroll.top]; + } + var x = 0, y = 0; + + p = el; + + var hasAbsolute = fly(el).getStyle("position") == "absolute"; + + while (p) { + + x += p.offsetLeft; + y += p.offsetTop; + + if (!hasAbsolute && fly(p).getStyle("position") == "absolute") { + hasAbsolute = true; + } + + if (Ext.isGecko) { + pe = fly(p); + + var bt = parseInt(pe.getStyle("borderTopWidth"), 10) || 0; + var bl = parseInt(pe.getStyle("borderLeftWidth"), 10) || 0; + + + x += bl; + y += bt; + + + if (p != el && pe.getStyle('overflow') != 'visible') { + x += bl; + y += bt; + } + } + p = p.offsetParent; + } + + if (Ext.isSafari && hasAbsolute) { + x -= bd.offsetLeft; + y -= bd.offsetTop; + } + + if (Ext.isGecko && !hasAbsolute) { + var dbd = fly(bd); + x += parseInt(dbd.getStyle("borderLeftWidth"), 10) || 0; + y += parseInt(dbd.getStyle("borderTopWidth"), 10) || 0; + } + + p = el.parentNode; + while (p && p != bd) { + if (!Ext.isOpera || (p.tagName != 'TR' && fly(p).getStyle("display") != "inline")) { + x -= p.scrollLeft; + y -= p.scrollTop; + } + p = p.parentNode; + } + return [x, y]; + }, + + setXY : function(el, xy){ + el = Ext.fly(el, '_setXY'); + el.position(); + var pts = el.translatePoints(xy); + if(xy[0] !== false){ + el.dom.style.left = pts.left + "px"; + } + if(xy[1] !== false){ + el.dom.style.top = pts.top + "px"; + } + }, + + setX : function(el, x){ + this.setXY(el, [x, false]); + }, + + setY : function(el, y){ + this.setXY(el, [false, y]); + } +}; + +// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights +function fly(el){ + if(!libFlyweight){ + libFlyweight = new Ext.Element.Flyweight(); + } + libFlyweight.dom = el; + return libFlyweight; +} +Ext.lib.Event = { + getPageX : function(e){ + e = e.browserEvent || e; + return e.pageX; + }, + + getPageY : function(e){ + e = e.browserEvent || e; + return e.pageY; + }, + + getXY : function(e){ + e = e.browserEvent || e; + return [e.pageX, e.pageY]; + }, + + getTarget : function(e){ + return e.target; + }, + + // all Ext events will go through event manager which provides scoping + on : function(el, eventName, fn, scope, override){ + jQuery(el).bind(eventName, fn); + }, + + un : function(el, eventName, fn){ + jQuery(el).unbind(eventName, fn); + }, + + purgeElement : function(el){ + jQuery(el).unbind(); + }, + + preventDefault : function(e){ + e = e.browserEvent || e; + if(e.preventDefault){ + e.preventDefault(); + }else{ + e.returnValue = false; + } + }, + + stopPropagation : function(e){ + e = e.browserEvent || e; + if(e.stopPropagation){ + e.stopPropagation(); + }else{ + e.cancelBubble = true; + } + }, + + stopEvent : function(e){ + this.preventDefault(e); + this.stopPropagation(e); + }, + + onAvailable : function(id, fn, scope){ + var start = new Date(); + var f = function(){ + if(start.getElapsed() > 10000){ + clearInterval(iid); + } + var el = document.getElementById(id); + if(el){ + clearInterval(iid); + fn.call(scope||window, el); + } + }; + var iid = setInterval(f, 50); + }, + + resolveTextNode: function(node) { + if (node && 3 == node.nodeType) { + return node.parentNode; + } else { + return node; + } + }, + + getRelatedTarget: function(ev) { + ev = ev.browserEvent || ev; + var t = ev.relatedTarget; + if (!t) { + if (ev.type == "mouseout") { + t = ev.toElement; + } else if (ev.type == "mouseover") { + t = ev.fromElement; + } + } + + return this.resolveTextNode(t); + } +}; + +Ext.lib.Ajax = function(){ + var createComplete = function(cb){ + return function(xhr, status){ + if((status == 'error' || status == 'timeout') && cb.failure){ + cb.failure.call(cb.scope||window, { + responseText: xhr.responseText, + responseXML : xhr.responseXML, + argument: cb.argument + }); + }else if(cb.success){ + cb.success.call(cb.scope||window, { + responseText: xhr.responseText, + responseXML : xhr.responseXML, + argument: cb.argument + }); + } + }; + }; + return { + request : function(method, uri, cb, data, options){ + var o = { + type: method, + url: uri, + data: data, + timeout: cb.timeout, + complete: createComplete(cb) + }; + + if(options){ + if(options.xmlData){ + o.data = options.xmlData; + o.processData = false; + o.type = 'POST'; + o.contentType = 'text/xml'; + }else if(options.jsonData){ + o.data = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData; + o.processData = false; + o.type = 'POST'; + o.contentType = 'text/javascript'; + } + if(options.headers){ + o.beforeSend = function(xhr){ + var hs = options.headers; + for(var h in hs){ + if(hs.hasOwnProperty(h)){ + xhr.setRequestHeader(h, hs[h]); + } + } + } + } + } + jQuery.ajax(o); + }, + + formRequest : function(form, uri, cb, data, isUpload, sslUri){ + jQuery.ajax({ + type: Ext.getDom(form).method ||'POST', + url: uri, + data: jQuery(form).formSerialize()+(data?'&'+data:''), + timeout: cb.timeout, + complete: createComplete(cb) + }); + }, + + isCallInProgress : function(trans){ + return false; + }, + + abort : function(trans){ + return false; + }, + + serializeForm : function(form){ + return jQuery(form.dom||form).formSerialize(); + } + }; +}(); + +Ext.lib.Anim = function(){ + var createAnim = function(cb, scope){ + var animated = true; + return { + stop : function(skipToLast){ + // do nothing + }, + + isAnimated : function(){ + return animated; + }, + + proxyCallback : function(){ + animated = false; + Ext.callback(cb, scope); + } + }; + }; + return { + scroll : function(el, args, duration, easing, cb, scope){ + // scroll anim not supported so just scroll immediately + var anim = createAnim(cb, scope); + el = Ext.getDom(el); + if(typeof args.scroll.to[0] == 'number'){ + el.scrollLeft = args.scroll.to[0]; + } + if(typeof args.scroll.to[1] == 'number'){ + el.scrollTop = args.scroll.to[1]; + } + anim.proxyCallback(); + return anim; + }, + + motion : function(el, args, duration, easing, cb, scope){ + return this.run(el, args, duration, easing, cb, scope); + }, + + color : function(el, args, duration, easing, cb, scope){ + // color anim not supported, so execute callback immediately + var anim = createAnim(cb, scope); + anim.proxyCallback(); + return anim; + }, + + run : function(el, args, duration, easing, cb, scope, type){ + var anim = createAnim(cb, scope), e = Ext.fly(el, '_animrun'); + var o = {}; + for(var k in args){ + if(args[k].from){ + if(k != 'points'){ + e.setStyle(k, args[k].from); + } + } + switch(k){ // jquery doesn't support, so convert + case 'points': + var by, pts; + e.position(); + if(by = args.points.by){ + var xy = e.getXY(); + pts = e.translatePoints([xy[0]+by[0], xy[1]+by[1]]); + }else{ + pts = e.translatePoints(args.points.to); + } + o.left = pts.left; + o.top = pts.top; + if(!parseInt(e.getStyle('left'), 10)){ // auto bug + e.setLeft(0); + } + if(!parseInt(e.getStyle('top'), 10)){ + e.setTop(0); + } + if(args.points.from){ + e.setXY(args.points.from); + } + break; + case 'width': + o.width = args.width.to; + break; + case 'height': + o.height = args.height.to; + break; + case 'opacity': + o.opacity = args.opacity.to; + break; + case 'left': + o.left = args.left.to; + break; + case 'top': + o.top = args.top.to; + break; + default: + o[k] = args[k].to; + break; + } + } + // TODO: find out about easing plug in? + jQuery(el).animate(o, duration*1000, undefined, anim.proxyCallback); + return anim; + } + }; +}(); + + +Ext.lib.Region = function(t, r, b, l) { + this.top = t; + this[1] = t; + this.right = r; + this.bottom = b; + this.left = l; + this[0] = l; +}; + +Ext.lib.Region.prototype = { + contains : function(region) { + return ( region.left >= this.left && + region.right <= this.right && + region.top >= this.top && + region.bottom <= this.bottom ); + + }, + + getArea : function() { + return ( (this.bottom - this.top) * (this.right - this.left) ); + }, + + intersect : function(region) { + var t = Math.max( this.top, region.top ); + var r = Math.min( this.right, region.right ); + var b = Math.min( this.bottom, region.bottom ); + var l = Math.max( this.left, region.left ); + + if (b >= t && r >= l) { + return new Ext.lib.Region(t, r, b, l); + } else { + return null; + } + }, + union : function(region) { + var t = Math.min( this.top, region.top ); + var r = Math.max( this.right, region.right ); + var b = Math.max( this.bottom, region.bottom ); + var l = Math.min( this.left, region.left ); + + return new Ext.lib.Region(t, r, b, l); + }, + + constrainTo : function(r) { + this.top = this.top.constrain(r.top, r.bottom); + this.bottom = this.bottom.constrain(r.top, r.bottom); + this.left = this.left.constrain(r.left, r.right); + this.right = this.right.constrain(r.left, r.right); + return this; + }, + + adjust : function(t, l, b, r){ + this.top += t; + this.left += l; + this.right += r; + this.bottom += b; + return this; + } +}; + +Ext.lib.Region.getRegion = function(el) { + var p = Ext.lib.Dom.getXY(el); + + var t = p[1]; + var r = p[0] + el.offsetWidth; + var b = p[1] + el.offsetHeight; + var l = p[0]; + + return new Ext.lib.Region(t, r, b, l); +}; + +Ext.lib.Point = function(x, y) { + if (x instanceof Array) { + y = x[1]; + x = x[0]; + } + this.x = this.right = this.left = this[0] = x; + this.y = this.top = this.bottom = this[1] = y; +}; + +Ext.lib.Point.prototype = new Ext.lib.Region(); + +// prevent IE leaks +if(Ext.isIE) { + function fnCleanUp() { + var p = Function.prototype; + delete p.createSequence; + delete p.defer; + delete p.createDelegate; + delete p.createCallback; + delete p.createInterceptor; + + window.detachEvent("onunload", fnCleanUp); + } + window.attachEvent("onunload", fnCleanUp); +} +})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/prototype-bridge.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/prototype-bridge.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/prototype-bridge.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,543 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +(function(){ + +var libFlyweight; + +Ext.lib.Dom = { + getViewWidth : function(full){ + return full ? this.getDocumentWidth() : this.getViewportWidth(); + }, + + getViewHeight : function(full){ + return full ? this.getDocumentHeight() : this.getViewportHeight(); + }, + + getDocumentHeight: function() { // missing from prototype? + var scrollHeight = (document.compatMode != "CSS1Compat") ? document.body.scrollHeight : document.documentElement.scrollHeight; + return Math.max(scrollHeight, this.getViewportHeight()); + }, + + getDocumentWidth: function() { // missing from prototype? + var scrollWidth = (document.compatMode != "CSS1Compat") ? document.body.scrollWidth : document.documentElement.scrollWidth; + return Math.max(scrollWidth, this.getViewportWidth()); + }, + + getViewportHeight: function() { // missing from prototype? + var height = self.innerHeight; + var mode = document.compatMode; + + if ( (mode || Ext.isIE) && !Ext.isOpera ) { + height = (mode == "CSS1Compat") ? + document.documentElement.clientHeight : // Standards + document.body.clientHeight; // Quirks + } + + return height; + }, + + getViewportWidth: function() { // missing from prototype? + var width = self.innerWidth; // Safari + var mode = document.compatMode; + + if (mode || Ext.isIE) { // IE, Gecko, Opera + width = (mode == "CSS1Compat") ? + document.documentElement.clientWidth : // Standards + document.body.clientWidth; // Quirks + } + return width; + }, + + isAncestor : function(p, c){ // missing from prototype? + p = Ext.getDom(p); + c = Ext.getDom(c); + if (!p || !c) {return false;} + + if(p.contains && !Ext.isSafari) { + return p.contains(c); + }else if(p.compareDocumentPosition) { + return !!(p.compareDocumentPosition(c) & 16); + }else{ + var parent = c.parentNode; + while (parent) { + if (parent == p) { + return true; + } + else if (!parent.tagName || parent.tagName.toUpperCase() == "HTML") { + return false; + } + parent = parent.parentNode; + } + return false; + } + }, + + getRegion : function(el){ + return Ext.lib.Region.getRegion(el); + }, + + getY : function(el){ + return this.getXY(el)[1]; + }, + + getX : function(el){ + return this.getXY(el)[0]; + }, + + getXY : function(el){ // this initially used Position.cumulativeOffset but it is not accurate enough + var p, pe, b, scroll, bd = (document.body || document.documentElement); + el = Ext.getDom(el); + + if(el == bd){ + return [0, 0]; + } + + if (el.getBoundingClientRect) { + b = el.getBoundingClientRect(); + scroll = fly(document).getScroll(); + return [b.left + scroll.left, b.top + scroll.top]; + } + var x = 0, y = 0; + + p = el; + + var hasAbsolute = fly(el).getStyle("position") == "absolute"; + + while (p) { + + x += p.offsetLeft; + y += p.offsetTop; + + if (!hasAbsolute && fly(p).getStyle("position") == "absolute") { + hasAbsolute = true; + } + + if (Ext.isGecko) { + pe = fly(p); + + var bt = parseInt(pe.getStyle("borderTopWidth"), 10) || 0; + var bl = parseInt(pe.getStyle("borderLeftWidth"), 10) || 0; + + + x += bl; + y += bt; + + + if (p != el && pe.getStyle('overflow') != 'visible') { + x += bl; + y += bt; + } + } + p = p.offsetParent; + } + + if (Ext.isSafari && hasAbsolute) { + x -= bd.offsetLeft; + y -= bd.offsetTop; + } + + if (Ext.isGecko && !hasAbsolute) { + var dbd = fly(bd); + x += parseInt(dbd.getStyle("borderLeftWidth"), 10) || 0; + y += parseInt(dbd.getStyle("borderTopWidth"), 10) || 0; + } + + p = el.parentNode; + while (p && p != bd) { + if (!Ext.isOpera || (p.tagName != 'TR' && fly(p).getStyle("display") != "inline")) { + x -= p.scrollLeft; + y -= p.scrollTop; + } + p = p.parentNode; + } + return [x, y]; + }, + + setXY : function(el, xy){ // this initially used Position.cumulativeOffset but it is not accurate enough + el = Ext.fly(el, '_setXY'); + el.position(); + var pts = el.translatePoints(xy); + if(xy[0] !== false){ + el.dom.style.left = pts.left + "px"; + } + if(xy[1] !== false){ + el.dom.style.top = pts.top + "px"; + } + }, + + setX : function(el, x){ + this.setXY(el, [x, false]); + }, + + setY : function(el, y){ + this.setXY(el, [false, y]); + } +}; + +Ext.lib.Event = { + getPageX : function(e){ + return Event.pointerX(e.browserEvent || e); + }, + + getPageY : function(e){ + return Event.pointerY(e.browserEvent || e); + }, + + getXY : function(e){ + e = e.browserEvent || e; + return [Event.pointerX(e), Event.pointerY(e)]; + }, + + getTarget : function(e){ + return Event.element(e.browserEvent || e); + }, + + resolveTextNode: function(node) { + if (node && 3 == node.nodeType) { + return node.parentNode; + } else { + return node; + } + }, + + getRelatedTarget: function(ev) { // missing from prototype? + ev = ev.browserEvent || ev; + var t = ev.relatedTarget; + if (!t) { + if (ev.type == "mouseout") { + t = ev.toElement; + } else if (ev.type == "mouseover") { + t = ev.fromElement; + } + } + + return this.resolveTextNode(t); + }, + + on : function(el, eventName, fn){ + Event.observe(el, eventName, fn, false); + }, + + un : function(el, eventName, fn){ + Event.stopObserving(el, eventName, fn, false); + }, + + purgeElement : function(el){ + // no equiv? + }, + + preventDefault : function(e){ // missing from prototype? + e = e.browserEvent || e; + if(e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + }, + + stopPropagation : function(e){ // missing from prototype? + e = e.browserEvent || e; + if(e.stopPropagation) { + e.stopPropagation(); + } else { + e.cancelBubble = true; + } + }, + + stopEvent : function(e){ + Event.stop(e.browserEvent || e); + }, + + onAvailable : function(id, fn, scope){ // no equiv + var start = new Date(), iid; + var f = function(){ + if(start.getElapsed() > 10000){ + clearInterval(iid); + } + var el = document.getElementById(id); + if(el){ + clearInterval(iid); + fn.call(scope||window, el); + } + }; + iid = setInterval(f, 50); + } +}; + +Ext.lib.Ajax = function(){ + var createSuccess = function(cb){ + return cb.success ? function(xhr){ + cb.success.call(cb.scope||window, { + responseText: xhr.responseText, + responseXML : xhr.responseXML, + argument: cb.argument + }); + } : Ext.emptyFn; + }; + var createFailure = function(cb){ + return cb.failure ? function(xhr){ + cb.failure.call(cb.scope||window, { + responseText: xhr.responseText, + responseXML : xhr.responseXML, + argument: cb.argument + }); + } : Ext.emptyFn; + }; + return { + request : function(method, uri, cb, data, options){ + var o = { + method: method, + parameters: data || '', + timeout: cb.timeout, + onSuccess: createSuccess(cb), + onFailure: createFailure(cb) + }; + if(options){ + if(options.headers){ + o.requestHeaders = options.headers; + } + if(options.xmlData){ + method = 'POST'; + o.contentType = 'text/xml'; + o.postBody = options.xmlData; + delete o.parameters; + } + if(options.jsonData){ + method = 'POST'; + o.contentType = 'text/javascript'; + o.postBody = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData; + delete o.parameters; + } + } + new Ajax.Request(uri, o); + }, + + formRequest : function(form, uri, cb, data, isUpload, sslUri){ + new Ajax.Request(uri, { + method: Ext.getDom(form).method ||'POST', + parameters: Form.serialize(form)+(data?'&'+data:''), + timeout: cb.timeout, + onSuccess: createSuccess(cb), + onFailure: createFailure(cb) + }); + }, + + isCallInProgress : function(trans){ + return false; + }, + + abort : function(trans){ + return false; + }, + + serializeForm : function(form){ + return Form.serialize(form.dom||form); + } + }; +}(); + + +Ext.lib.Anim = function(){ + + var easings = { + easeOut: function(pos) { + return 1-Math.pow(1-pos,2); + }, + easeIn: function(pos) { + return 1-Math.pow(1-pos,2); + } + }; + var createAnim = function(cb, scope){ + return { + stop : function(skipToLast){ + this.effect.cancel(); + }, + + isAnimated : function(){ + return this.effect.state == 'running'; + }, + + proxyCallback : function(){ + Ext.callback(cb, scope); + } + }; + }; + return { + scroll : function(el, args, duration, easing, cb, scope){ + // not supported so scroll immediately? + var anim = createAnim(cb, scope); + el = Ext.getDom(el); + if(typeof args.scroll.to[0] == 'number'){ + el.scrollLeft = args.scroll.to[0]; + } + if(typeof args.scroll.to[1] == 'number'){ + el.scrollTop = args.scroll.to[1]; + } + anim.proxyCallback(); + return anim; + }, + + motion : function(el, args, duration, easing, cb, scope){ + return this.run(el, args, duration, easing, cb, scope); + }, + + color : function(el, args, duration, easing, cb, scope){ + return this.run(el, args, duration, easing, cb, scope); + }, + + run : function(el, args, duration, easing, cb, scope, type){ + var o = {}; + for(var k in args){ + switch(k){ // scriptaculous doesn't support, so convert these + case 'points': + var by, pts, e = Ext.fly(el, '_animrun'); + e.position(); + if(by = args.points.by){ + var xy = e.getXY(); + pts = e.translatePoints([xy[0]+by[0], xy[1]+by[1]]); + }else{ + pts = e.translatePoints(args.points.to); + } + o.left = pts.left+'px'; + o.top = pts.top+'px'; + break; + case 'width': + o.width = args.width.to+'px'; + break; + case 'height': + o.height = args.height.to+'px'; + break; + case 'opacity': + o.opacity = String(args.opacity.to); + break; + default: + o[k] = String(args[k].to); + break; + } + } + var anim = createAnim(cb, scope); + anim.effect = new Effect.Morph(Ext.id(el), { + duration: duration, + afterFinish: anim.proxyCallback, + transition: easings[easing] || Effect.Transitions.linear, + style: o + }); + return anim; + } + }; +}(); + + +// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights +function fly(el){ + if(!libFlyweight){ + libFlyweight = new Ext.Element.Flyweight(); + } + libFlyweight.dom = el; + return libFlyweight; +} + +Ext.lib.Region = function(t, r, b, l) { + this.top = t; + this[1] = t; + this.right = r; + this.bottom = b; + this.left = l; + this[0] = l; +}; + +Ext.lib.Region.prototype = { + contains : function(region) { + return ( region.left >= this.left && + region.right <= this.right && + region.top >= this.top && + region.bottom <= this.bottom ); + + }, + + getArea : function() { + return ( (this.bottom - this.top) * (this.right - this.left) ); + }, + + intersect : function(region) { + var t = Math.max( this.top, region.top ); + var r = Math.min( this.right, region.right ); + var b = Math.min( this.bottom, region.bottom ); + var l = Math.max( this.left, region.left ); + + if (b >= t && r >= l) { + return new Ext.lib.Region(t, r, b, l); + } else { + return null; + } + }, + union : function(region) { + var t = Math.min( this.top, region.top ); + var r = Math.max( this.right, region.right ); + var b = Math.max( this.bottom, region.bottom ); + var l = Math.min( this.left, region.left ); + + return new Ext.lib.Region(t, r, b, l); + }, + + constrainTo : function(r) { + this.top = this.top.constrain(r.top, r.bottom); + this.bottom = this.bottom.constrain(r.top, r.bottom); + this.left = this.left.constrain(r.left, r.right); + this.right = this.right.constrain(r.left, r.right); + return this; + }, + + adjust : function(t, l, b, r){ + this.top += t; + this.left += l; + this.right += r; + this.bottom += b; + return this; + } +}; + +Ext.lib.Region.getRegion = function(el) { + var p = Ext.lib.Dom.getXY(el); + + var t = p[1]; + var r = p[0] + el.offsetWidth; + var b = p[1] + el.offsetHeight; + var l = p[0]; + + return new Ext.lib.Region(t, r, b, l); +}; + +Ext.lib.Point = function(x, y) { + if (x instanceof Array) { + y = x[1]; + x = x[0]; + } + this.x = this.right = this.left = this[0] = x; + this.y = this.top = this.bottom = this[1] = y; +}; + +Ext.lib.Point.prototype = new Ext.lib.Region(); + + +// prevent IE leaks +if(Ext.isIE) { + function fnCleanUp() { + var p = Function.prototype; + delete p.createSequence; + delete p.defer; + delete p.createDelegate; + delete p.createCallback; + delete p.createInterceptor; + + window.detachEvent("onunload", fnCleanUp); + } + window.attachEvent("onunload", fnCleanUp); +} +})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/yui-bridge.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/yui-bridge.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/adapter/yui-bridge.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,338 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +if(typeof YAHOO == "undefined"){ + throw "Unable to load Ext, core YUI utilities (yahoo, dom, event) not found."; +} + +(function(){ +var E = YAHOO.util.Event; +var D = YAHOO.util.Dom; +var CN = YAHOO.util.Connect; + +var ES = YAHOO.util.Easing; +var A = YAHOO.util.Anim; +var libFlyweight; + +Ext.lib.Dom = { + getViewWidth : function(full){ + return full ? D.getDocumentWidth() : D.getViewportWidth(); + }, + + getViewHeight : function(full){ + return full ? D.getDocumentHeight() : D.getViewportHeight(); + }, + + isAncestor : function(haystack, needle){ + return D.isAncestor(haystack, needle); + }, + + getRegion : function(el){ + return D.getRegion(el); + }, + + getY : function(el){ + return this.getXY(el)[1]; + }, + + getX : function(el){ + return this.getXY(el)[0]; + }, + + // original version based on YahooUI getXY + // this version fixes several issues in Safari and FF + // and boosts performance by removing the batch overhead, repetitive dom lookups and array index calls + getXY : function(el){ + var p, pe, b, scroll, bd = (document.body || document.documentElement); + el = Ext.getDom(el); + + if(el == bd){ + return [0, 0]; + } + + if (el.getBoundingClientRect) { + b = el.getBoundingClientRect(); + scroll = fly(document).getScroll(); + return [b.left + scroll.left, b.top + scroll.top]; + } + var x = 0, y = 0; + + p = el; + + var hasAbsolute = fly(el).getStyle("position") == "absolute"; + + while (p) { + + x += p.offsetLeft; + y += p.offsetTop; + + if (!hasAbsolute && fly(p).getStyle("position") == "absolute") { + hasAbsolute = true; + } + + if (Ext.isGecko) { + pe = fly(p); + + var bt = parseInt(pe.getStyle("borderTopWidth"), 10) || 0; + var bl = parseInt(pe.getStyle("borderLeftWidth"), 10) || 0; + + + x += bl; + y += bt; + + + if (p != el && pe.getStyle('overflow') != 'visible') { + x += bl; + y += bt; + } + } + p = p.offsetParent; + } + + if (Ext.isSafari && hasAbsolute) { + x -= bd.offsetLeft; + y -= bd.offsetTop; + } + + if (Ext.isGecko && !hasAbsolute) { + var dbd = fly(bd); + x += parseInt(dbd.getStyle("borderLeftWidth"), 10) || 0; + y += parseInt(dbd.getStyle("borderTopWidth"), 10) || 0; + } + + p = el.parentNode; + while (p && p != bd) { + if (!Ext.isOpera || (p.tagName != 'TR' && fly(p).getStyle("display") != "inline")) { + x -= p.scrollLeft; + y -= p.scrollTop; + } + p = p.parentNode; + } + return [x, y]; + }, + + setXY : function(el, xy){ + el = Ext.fly(el, '_setXY'); + el.position(); + var pts = el.translatePoints(xy); + if(xy[0] !== false){ + el.dom.style.left = pts.left + "px"; + } + if(xy[1] !== false){ + el.dom.style.top = pts.top + "px"; + } + }, + + setX : function(el, x){ + this.setXY(el, [x, false]); + }, + + setY : function(el, y){ + this.setXY(el, [false, y]); + } +}; + +Ext.lib.Event = { + getPageX : function(e){ + return E.getPageX(e.browserEvent || e); + }, + + getPageY : function(e){ + return E.getPageY(e.browserEvent || e); + }, + + getXY : function(e){ + return E.getXY(e.browserEvent || e); + }, + + getTarget : function(e){ + return E.getTarget(e.browserEvent || e); + }, + + getRelatedTarget : function(e){ + return E.getRelatedTarget(e.browserEvent || e); + }, + + on : function(el, eventName, fn, scope, override){ + E.on(el, eventName, fn, scope, override); + }, + + un : function(el, eventName, fn){ + E.removeListener(el, eventName, fn); + }, + + purgeElement : function(el){ + E.purgeElement(el); + }, + + preventDefault : function(e){ + E.preventDefault(e.browserEvent || e); + }, + + stopPropagation : function(e){ + E.stopPropagation(e.browserEvent || e); + }, + + stopEvent : function(e){ + E.stopEvent(e.browserEvent || e); + }, + + onAvailable : function(el, fn, scope, override){ + return E.onAvailable(el, fn, scope, override); + } +}; + +Ext.lib.Ajax = { + request : function(method, uri, cb, data, options){ + if(options){ + var hs = options.headers; + if(hs){ + for(var h in hs){ + if(hs.hasOwnProperty(h)){ + CN.initHeader(h, hs[h], false); + } + } + } + if(options.xmlData){ + CN.initHeader('Content-Type', 'text/xml', false); + method = 'POST'; + data = options.xmlData; + }else if(options.jsonData){ + CN.initHeader('Content-Type', 'text/javascript', false); + method = 'POST'; + data = typeof options.jsonData == 'object' ? Ext.encode(options.jsonData) : options.jsonData; + } + } + return CN.asyncRequest(method, uri, cb, data); + }, + + formRequest : function(form, uri, cb, data, isUpload, sslUri){ + CN.setForm(form, isUpload, sslUri); + return CN.asyncRequest(Ext.getDom(form).method ||'POST', uri, cb, data); + }, + + isCallInProgress : function(trans){ + return CN.isCallInProgress(trans); + }, + + abort : function(trans){ + return CN.abort(trans); + }, + + serializeForm : function(form){ + var d = CN.setForm(form.dom || form); + CN.resetFormState(); + return d; + } +}; + +Ext.lib.Region = YAHOO.util.Region; +Ext.lib.Point = YAHOO.util.Point; + + +Ext.lib.Anim = { + scroll : function(el, args, duration, easing, cb, scope){ + this.run(el, args, duration, easing, cb, scope, YAHOO.util.Scroll); + }, + + motion : function(el, args, duration, easing, cb, scope){ + this.run(el, args, duration, easing, cb, scope, YAHOO.util.Motion); + }, + + color : function(el, args, duration, easing, cb, scope){ + this.run(el, args, duration, easing, cb, scope, YAHOO.util.ColorAnim); + }, + + run : function(el, args, duration, easing, cb, scope, type){ + type = type || YAHOO.util.Anim; + if(typeof easing == "string"){ + easing = YAHOO.util.Easing[easing]; + } + var anim = new type(el, args, duration, easing); + anim.animateX(function(){ + Ext.callback(cb, scope); + }); + return anim; + } +}; + +// all lib flyweight calls use their own flyweight to prevent collisions with developer flyweights +function fly(el){ + if(!libFlyweight){ + libFlyweight = new Ext.Element.Flyweight(); + } + libFlyweight.dom = el; + return libFlyweight; +} + +// prevent IE leaks +if(Ext.isIE) { + function fnCleanUp() { + var p = Function.prototype; + delete p.createSequence; + delete p.defer; + delete p.createDelegate; + delete p.createCallback; + delete p.createInterceptor; + + window.detachEvent("onunload", fnCleanUp); + } + window.attachEvent("onunload", fnCleanUp); +} +// various overrides + +// add ability for callbacks with animations +if(YAHOO.util.Anim){ + YAHOO.util.Anim.prototype.animateX = function(callback, scope){ + var f = function(){ + this.onComplete.unsubscribe(f); + if(typeof callback == "function"){ + callback.call(scope || this, this); + } + }; + this.onComplete.subscribe(f, this, true); + this.animate(); + }; +} + +if(YAHOO.util.DragDrop && Ext.dd.DragDrop){ + YAHOO.util.DragDrop.defaultPadding = Ext.dd.DragDrop.defaultPadding; + YAHOO.util.DragDrop.constrainTo = Ext.dd.DragDrop.constrainTo; +} + +YAHOO.util.Dom.getXY = function(el) { + var f = function(el) { + return Ext.lib.Dom.getXY(el); + }; + return YAHOO.util.Dom.batch(el, f, YAHOO.util.Dom, true); +}; + + +// workaround for Safari anim duration speed problems +if(YAHOO.util.AnimMgr){ + YAHOO.util.AnimMgr.fps = 1000; +} + +YAHOO.util.Region.prototype.adjust = function(t, l, b, r){ + this.top += t; + this.left += l; + this.right += r; + this.bottom += b; + return this; +}; + +YAHOO.util.Region.prototype.constrainTo = function(r) { + this.top = this.top.constrain(r.top, r.bottom); + this.bottom = this.bottom.constrain(r.top, r.bottom); + this.left = this.left.constrain(r.left, r.right); + this.right = this.right.constrain(r.left, r.right); + return this; +}; + + +})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/CompositeElement.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/CompositeElement.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/CompositeElement.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,369 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.CompositeElement + * Standard composite class. Creates a Ext.Element for every element in the collection. + *

        + * NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element + * actions will be performed on all the elements in this collection. + *

        + * All methods return this and can be chained. +
        
        + var els = Ext.select("#some-el div.some-class", true);
        + // or select directly from an existing element
        + var el = Ext.get('some-el');
        + el.select('div.some-class', true);
        +
        + els.setWidth(100); // all elements become 100 width
        + els.hide(true); // all elements fade out and hide
        + // or
        + els.setWidth(100).hide(true);
        + 
        + */ +Ext.CompositeElement = function(els){ + this.elements = []; + this.addElements(els); +}; +Ext.CompositeElement.prototype = { + isComposite: true, + addElements : function(els){ + if(!els) return this; + if(typeof els == "string"){ + els = Ext.Element.selectorFunction(els); + } + var yels = this.elements; + var index = yels.length-1; + for(var i = 0, len = els.length; i < len; i++) { + yels[++index] = Ext.get(els[i]); + } + return this; + }, + + /** + * Clears this composite and adds the elements returned by the passed selector. + * @param {String/Array} els A string CSS selector, an array of elements or an element + * @return {CompositeElement} this + */ + fill : function(els){ + this.elements = []; + this.add(els); + return this; + }, + + /** + * Filters this composite to only elements that match the passed selector. + * @param {String} selector A string CSS selector + * @return {CompositeElement} this + */ + filter : function(selector){ + var els = []; + this.each(function(el){ + if(el.is(selector)){ + els[els.length] = el.dom; + } + }); + this.fill(els); + return this; + }, + + invoke : function(fn, args){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++) { + Ext.Element.prototype[fn].apply(els[i], args); + } + return this; + }, + /** + * Adds elements to this composite. + * @param {String/Array} els A string CSS selector, an array of elements or an element + * @return {CompositeElement} this + */ + add : function(els){ + if(typeof els == "string"){ + this.addElements(Ext.Element.selectorFunction(els)); + }else if(els.length !== undefined){ + this.addElements(els); + }else{ + this.addElements([els]); + } + return this; + }, + /** + * Calls the passed function passing (el, this, index) for each element in this composite. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The this object (defaults to the element) + * @return {CompositeElement} this + */ + each : function(fn, scope){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++){ + if(fn.call(scope || els[i], els[i], this, i) === false) { + break; + } + } + return this; + }, + + /** + * Returns the Element object at the specified index + * @param {Number} index + * @return {Ext.Element} + */ + item : function(index){ + return this.elements[index] || null; + }, + + /** + * Returns the first Element + * @return {Ext.Element} + */ + first : function(){ + return this.item(0); + }, + + /** + * Returns the last Element + * @return {Ext.Element} + */ + last : function(){ + return this.item(this.elements.length-1); + }, + + /** + * Returns the number of elements in this composite + * @return Number + */ + getCount : function(){ + return this.elements.length; + }, + + /** + * Returns true if this composite contains the passed element + * @return Boolean + */ + contains : function(el){ + return this.indexOf(el) !== -1; + }, + + /** + * Returns true if this composite contains the passed element + * @return Boolean + */ + indexOf : function(el){ + return this.elements.indexOf(Ext.get(el)); + }, + + + /** + * Removes the specified element(s). + * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite + * or an array of any of those. + * @param {Boolean} removeDom (optional) True to also remove the element from the document + * @return {CompositeElement} this + */ + removeElement : function(el, removeDom){ + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++){ + this.removeElement(el[i]); + } + return this; + } + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1 && this.elements[index]){ + if(removeDom){ + var d = this.elements[index]; + if(d.dom){ + d.remove(); + }else{ + Ext.removeNode(d); + } + } + this.elements.splice(index, 1); + } + return this; + }, + + /** + * Replaces the specified element with the passed element. + * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite + * to replace. + * @param {Mixed} replacement The id of an element or the Element itself. + * @param {Boolean} domReplace (Optional) True to remove and replace the element in the document too. + * @return {CompositeElement} this + */ + replaceElement : function(el, replacement, domReplace){ + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1){ + if(domReplace){ + this.elements[index].replaceWith(replacement); + }else{ + this.elements.splice(index, 1, Ext.get(replacement)) + } + } + return this; + }, + + /** + * Removes all elements. + */ + clear : function(){ + this.elements = []; + } +}; +(function(){ +Ext.CompositeElement.createCall = function(proto, fnName){ + if(!proto[fnName]){ + proto[fnName] = function(){ + return this.invoke(fnName, arguments); + }; + } +}; +for(var fnName in Ext.Element.prototype){ + if(typeof Ext.Element.prototype[fnName] == "function"){ + Ext.CompositeElement.createCall(Ext.CompositeElement.prototype, fnName); + } +}; +})(); + +/** + * @class Ext.CompositeElementLite + * @extends Ext.CompositeElement + * Flyweight composite class. Reuses the same Ext.Element for element operations. +
        
        + var els = Ext.select("#some-el div.some-class");
        + // or select directly from an existing element
        + var el = Ext.get('some-el');
        + el.select('div.some-class');
        +
        + els.setWidth(100); // all elements become 100 width
        + els.hide(true); // all elements fade out and hide
        + // or
        + els.setWidth(100).hide(true);
        + 


        + * NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element + * actions will be performed on all the elements in this collection. + */ +Ext.CompositeElementLite = function(els){ + Ext.CompositeElementLite.superclass.constructor.call(this, els); + this.el = new Ext.Element.Flyweight(); +}; +Ext.extend(Ext.CompositeElementLite, Ext.CompositeElement, { + addElements : function(els){ + if(els){ + if(els instanceof Array){ + this.elements = this.elements.concat(els); + }else{ + var yels = this.elements; + var index = yels.length-1; + for(var i = 0, len = els.length; i < len; i++) { + yels[++index] = els[i]; + } + } + } + return this; + }, + invoke : function(fn, args){ + var els = this.elements; + var el = this.el; + for(var i = 0, len = els.length; i < len; i++) { + el.dom = els[i]; + Ext.Element.prototype[fn].apply(el, args); + } + return this; + }, + /** + * Returns a flyweight Element of the dom element object at the specified index + * @param {Number} index + * @return {Ext.Element} + */ + item : function(index){ + if(!this.elements[index]){ + return null; + } + this.el.dom = this.elements[index]; + return this.el; + }, + + // fixes scope with flyweight + addListener : function(eventName, handler, scope, opt){ + var els = this.elements; + for(var i = 0, len = els.length; i < len; i++) { + Ext.EventManager.on(els[i], eventName, handler, scope || els[i], opt); + } + return this; + }, + + /** + * Calls the passed function passing (el, this, index) for each element in this composite. The element + * passed is the flyweight (shared) Ext.Element instance, so if you require a + * a reference to the dom node, use el.dom. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The this object (defaults to the element) + * @return {CompositeElement} this + */ + each : function(fn, scope){ + var els = this.elements; + var el = this.el; + for(var i = 0, len = els.length; i < len; i++){ + el.dom = els[i]; + if(fn.call(scope || el, el, this, i) === false){ + break; + } + } + return this; + }, + + indexOf : function(el){ + return this.elements.indexOf(Ext.getDom(el)); + }, + + replaceElement : function(el, replacement, domReplace){ + var index = typeof el == 'number' ? el : this.indexOf(el); + if(index !== -1){ + replacement = Ext.getDom(replacement); + if(domReplace){ + var d = this.elements[index]; + d.parentNode.insertBefore(replacement, d); + Ext.removeNode(d); + } + this.elements.splice(index, 1, replacement); + } + return this; + } +}); +Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; +if(Ext.DomQuery){ + Ext.Element.selectorFunction = Ext.DomQuery.select; +} + +Ext.Element.select = function(selector, unique, root){ + var els; + if(typeof selector == "string"){ + els = Ext.Element.selectorFunction(selector, root); + }else if(selector.length !== undefined){ + els = selector; + }else{ + throw "Invalid selector"; + } + if(unique === true){ + return new Ext.CompositeElement(els); + }else{ + return new Ext.CompositeElementLite(els); + } +}; +/** + * Selects elements based on the passed CSS selector to enable working on them as 1. + * @param {String/Array} selector The CSS selector or an array of elements + * @param {Boolean} unique (optional) true to create a unique Ext.Element for each element (defaults to a shared flyweight object) + * @param {HTMLElement/String} root (optional) The root element of the query or id of the root + * @return {CompositeElementLite/CompositeElement} + * @member Ext + * @method select + */ +Ext.select = Ext.Element.select; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/DomHelper.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/DomHelper.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/DomHelper.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,408 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.DomHelper + * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
        + * This is an example, where an unordered list with 5 children items is appended to an existing element with id 'my-div':
        +
        
        +var list = dh.append('my-div', {
        +    tag: 'ul', cls: 'my-list', children: [
        +        {tag: 'li', id: 'item0', html: 'List Item 0'}, 
        +        {tag: 'li', id: 'item1', html: 'List Item 1'}, 
        +        {tag: 'li', id: 'item2', html: 'List Item 2'}, 
        +        {tag: 'li', id: 'item3', html: 'List Item 3'}, 
        +        {tag: 'li', id: 'item4', html: 'List Item 4'}
        +    ]
        +});
        + 
        + * For more information and examples, see the original blog post. + * @singleton + */ +Ext.DomHelper = function(){ + var tempTableEl = null; + var emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i; + var tableRe = /^table|tbody|tr|td$/i; + + // build as innerHTML where available + /** @ignore */ + var createHtml = function(o){ + if(typeof o == 'string'){ + return o; + } + var b = ""; + if(!o.tag){ + o.tag = "div"; + } + b += "<" + o.tag; + for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || typeof o[attr] == "function") continue; + if(attr == "style"){ + var s = o["style"]; + if(typeof s == "function"){ + s = s.call(); + } + if(typeof s == "string"){ + b += ' style="' + s + '"'; + }else if(typeof s == "object"){ + b += ' style="'; + for(var key in s){ + if(typeof s[key] != "function"){ + b += key + ":" + s[key] + ";"; + } + } + b += '"'; + } + }else{ + if(attr == "cls"){ + b += ' class="' + o["cls"] + '"'; + }else if(attr == "htmlFor"){ + b += ' for="' + o["htmlFor"] + '"'; + }else{ + b += " " + attr + '="' + o[attr] + '"'; + } + } + } + if(emptyTags.test(o.tag)){ + b += "/>"; + }else{ + b += ">"; + var cn = o.children || o.cn; + if(cn){ + if(cn instanceof Array){ + for(var i = 0, len = cn.length; i < len; i++) { + b += createHtml(cn[i], b); + } + }else{ + b += createHtml(cn, b); + } + } + if(o.html){ + b += o.html; + } + b += ""; + } + return b; + }; + + // build as dom + /** @ignore */ + var createDom = function(o, parentNode){ + var el = document.createElement(o.tag||'div'); + var useSet = el.setAttribute ? true : false; // In IE some elements don't have setAttribute + for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || attr == "style" || typeof o[attr] == "function") continue; + if(attr=="cls"){ + el.className = o["cls"]; + }else{ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + Ext.DomHelper.applyStyles(el, o.style); + var cn = o.children || o.cn; + if(cn){ + if(cn instanceof Array){ + for(var i = 0, len = cn.length; i < len; i++) { + createDom(cn[i], el); + } + }else{ + createDom(cn, el); + } + } + if(o.html){ + el.innerHTML = o.html; + } + if(parentNode){ + parentNode.appendChild(el); + } + return el; + }; + + var ieTable = function(depth, s, h, e){ + tempTableEl.innerHTML = [s, h, e].join(''); + var i = -1, el = tempTableEl; + while(++i < depth){ + el = el.firstChild; + } + return el; + }; + + // kill repeat to save bytes + var ts = '', + te = '
        ', + tbs = ts+'', + tbe = ''+te, + trs = tbs + '', + tre = ''+tbe; + + /** + * @ignore + * Nasty code for IE's broken table implementation + */ + var insertIntoTable = function(tag, where, el, html){ + if(!tempTableEl){ + tempTableEl = document.createElement('div'); + } + var node; + var before = null; + if(tag == 'td'){ + if(where == 'afterbegin' || where == 'beforeend'){ // INTO a TD + return; + } + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + } else{ + before = el.nextSibling; + el = el.parentNode; + } + node = ieTable(4, trs, html, tre); + } + else if(tag == 'tr'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else{ // INTO a TR + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(4, trs, html, tre); + } + } else if(tag == 'tbody'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else{ + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(3, tbs, html, tbe); + } + } else{ // TABLE + if(where == 'beforebegin' || where == 'afterend'){ // OUTSIDE the table + return; + } + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(2, ts, html, te); + } + el.insertBefore(node, before); + return node; + }; + + + return { + /** True to force the use of DOM instead of html fragments @type Boolean */ + useDom : false, + + /** + * Returns the markup for the passed Element(s) config. + * @param {Object} o The DOM object spec (and children) + * @return {String} + */ + markup : function(o){ + return createHtml(o); + }, + + /** + * Applies a style specification to an element. + * @param {String/HTMLElement} el The element to apply styles to + * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or + * a function which returns such a specification. + */ + applyStyles : function(el, styles){ + if(styles){ + el = Ext.fly(el); + if(typeof styles == "string"){ + var re = /\s?([a-z\-]*)\:\s?([^;]*);?/gi; + var matches; + while ((matches = re.exec(styles)) != null){ + el.setStyle(matches[1], matches[2]); + } + }else if (typeof styles == "object"){ + for (var style in styles){ + el.setStyle(style, styles[style]); + } + }else if (typeof styles == "function"){ + Ext.DomHelper.applyStyles(el, styles.call()); + } + } + }, + + /** + * Inserts an HTML fragment into the DOM. + * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. + * @param {HTMLElement} el The context element + * @param {String} html The HTML fragmenet + * @return {HTMLElement} The new node + */ + insertHtml : function(where, el, html){ + where = where.toLowerCase(); + if(el.insertAdjacentHTML){ + if(tableRe.test(el.tagName)){ + var rs; + if(rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html)){ + return rs; + } + } + switch(where){ + case "beforebegin": + el.insertAdjacentHTML('BeforeBegin', html); + return el.previousSibling; + case "afterbegin": + el.insertAdjacentHTML('AfterBegin', html); + return el.firstChild; + case "beforeend": + el.insertAdjacentHTML('BeforeEnd', html); + return el.lastChild; + case "afterend": + el.insertAdjacentHTML('AfterEnd', html); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + } + var range = el.ownerDocument.createRange(); + var frag; + switch(where){ + case "beforebegin": + range.setStartBefore(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el); + return el.previousSibling; + case "afterbegin": + if(el.firstChild){ + range.setStartBefore(el.firstChild); + frag = range.createContextualFragment(html); + el.insertBefore(frag, el.firstChild); + return el.firstChild; + }else{ + el.innerHTML = html; + return el.firstChild; + } + case "beforeend": + if(el.lastChild){ + range.setStartAfter(el.lastChild); + frag = range.createContextualFragment(html); + el.appendChild(frag); + return el.lastChild; + }else{ + el.innerHTML = html; + return el.lastChild; + } + case "afterend": + range.setStartAfter(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el.nextSibling); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + }, + + /** + * Creates new DOM element(s) and inserts them before el. + * @param {Mixed} el The context element + * @param {Object/String} o The DOM object spec (and children) or raw HTML blob + * @param {Boolean} returnElement (optional) true to return a Ext.Element + * @return {HTMLElement/Ext.Element} The new node + */ + insertBefore : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "beforeBegin"); + }, + + /** + * Creates new DOM element(s) and inserts them after el. + * @param {Mixed} el The context element + * @param {Object} o The DOM object spec (and children) + * @param {Boolean} returnElement (optional) true to return a Ext.Element + * @return {HTMLElement/Ext.Element} The new node + */ + insertAfter : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling"); + }, + + /** + * Creates new DOM element(s) and inserts them as the first child of el. + * @param {Mixed} el The context element + * @param {Object/String} o The DOM object spec (and children) or raw HTML blob + * @param {Boolean} returnElement (optional) true to return a Ext.Element + * @return {HTMLElement/Ext.Element} The new node + */ + insertFirst : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterBegin", "firstChild"); + }, + + // private + doInsert : function(el, o, returnElement, pos, sibling){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + (sibling === "firstChild" ? el : el.parentNode).insertBefore(newNode, sibling ? el[sibling] : el); + }else{ + var html = createHtml(o); + newNode = this.insertHtml(pos, el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + /** + * Creates new DOM element(s) and appends them to el. + * @param {Mixed} el The context element + * @param {Object/String} o The DOM object spec (and children) or raw HTML blob + * @param {Boolean} returnElement (optional) true to return a Ext.Element + * @return {HTMLElement/Ext.Element} The new node + */ + append : function(el, o, returnElement){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + el.appendChild(newNode); + }else{ + var html = createHtml(o); + newNode = this.insertHtml("beforeEnd", el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + /** + * Creates new DOM element(s) and overwrites the contents of el with them. + * @param {Mixed} el The context element + * @param {Object/String} o The DOM object spec (and children) or raw HTML blob + * @param {Boolean} returnElement (optional) true to return a Ext.Element + * @return {HTMLElement/Ext.Element} The new node + */ + overwrite : function(el, o, returnElement){ + el = Ext.getDom(el); + el.innerHTML = createHtml(o); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + }, + + /** + * Creates a new Ext.Template from the DOM object spec. + * @param {Object} o The DOM object spec (and children) + * @return {Ext.Template} The new template + */ + createTemplate : function(o){ + var html = createHtml(o); + return new Ext.Template(html); + } + }; +}(); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/DomQuery.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/DomQuery.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/DomQuery.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,813 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* + * This is code is also distributed under MIT license for use + * with jQuery and prototype JavaScript libraries. + */ +/** + * @class Ext.DomQuery +Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). +

        +DomQuery supports most of the CSS3 selectors spec, along with some custom selectors and basic XPath.

        + +

        +All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure. +

        +

        Element Selectors:

        +
          +
        • * any element
        • +
        • E an element with the tag E
        • +
        • E F All descendent elements of E that have the tag F
        • +
        • E > F or E/F all direct children elements of E that have the tag F
        • +
        • E + F all elements with the tag F that are immediately preceded by an element with the tag E
        • +
        • E ~ F all elements with the tag F that are preceded by a sibling element with the tag E
        • +
        +

        Attribute Selectors:

        +

        The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.

        +
          +
        • E[foo] has an attribute "foo"
        • +
        • E[foo=bar] has an attribute "foo" that equals "bar"
        • +
        • E[foo^=bar] has an attribute "foo" that starts with "bar"
        • +
        • E[foo$=bar] has an attribute "foo" that ends with "bar"
        • +
        • E[foo*=bar] has an attribute "foo" that contains the substring "bar"
        • +
        • E[foo%=2] has an attribute "foo" that is evenly divisible by 2
        • +
        • E[foo!=bar] has an attribute "foo" that does not equal "bar"
        • +
        +

        Pseudo Classes:

        +
          +
        • E:first-child E is the first child of its parent
        • +
        • E:last-child E is the last child of its parent
        • +
        • E:nth-child(n) E is the nth child of its parent (1 based as per the spec)
        • +
        • E:nth-child(odd) E is an odd child of its parent
        • +
        • E:nth-child(even) E is an even child of its parent
        • +
        • E:only-child E is the only child of its parent
        • +
        • E:checked E is an element that is has a checked attribute that is true (e.g. a radio or checkbox)
        • +
        • E:first the first E in the resultset
        • +
        • E:last the last E in the resultset
        • +
        • E:nth(n) the nth E in the resultset (1 based)
        • +
        • E:odd shortcut for :nth-child(odd)
        • +
        • E:even shortcut for :nth-child(even)
        • +
        • E:contains(foo) E's innerHTML contains the substring "foo"
        • +
        • E:nodeValue(foo) E contains a textNode with a nodeValue that equals "foo"
        • +
        • E:not(S) an E element that does not match simple selector S
        • +
        • E:has(S) an E element that has a descendent that matches simple selector S
        • +
        • E:next(S) an E element whose next sibling matches simple selector S
        • +
        • E:prev(S) an E element whose previous sibling matches simple selector S
        • +
        +

        CSS Value Selectors:

        +
          +
        • E{display=none} css value "display" that equals "none"
        • +
        • E{display^=none} css value "display" that starts with "none"
        • +
        • E{display$=none} css value "display" that ends with "none"
        • +
        • E{display*=none} css value "display" that contains the substring "none"
        • +
        • E{display%=2} css value "display" that is evenly divisible by 2
        • +
        • E{display!=none} css value "display" that does not equal "none"
        • +
        + * @singleton + */ +Ext.DomQuery = function(){ + var cache = {}, simpleCache = {}, valueCache = {}; + var nonSpace = /\S/; + var trimRe = /^\s+|\s+$/g; + var tplRe = /\{(\d+)\}/g; + var modeRe = /^(\s?[\/>+~]\s?|\s|$)/; + var tagTokenRe = /^(#)?([\w-\*]+)/; + var nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/; + + function child(p, index){ + var i = 0; + var n = p.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(d){ + var n = d.firstChild, ni = -1; + while(n){ + var nx = n.nextSibling; + if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ + d.removeChild(n); + }else{ + n.nodeIndex = ++ni; + } + n = nx; + } + return this; + }; + + function byClassName(c, a, v){ + if(!v){ + return c; + } + var r = [], ri = -1, cn; + for(var i = 0, ci; ci = c[i]; i++){ + if((' '+ci.className+' ').indexOf(v) != -1){ + r[++ri] = ci; + } + } + return r; + }; + + 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.children || 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 == "~"){ + for(var i = 0, n; n = ns[i]; i++){ + while((n = n.nextSibling) && (n.nodeType != 1 || (tagName == '*' || n.tagName.toLowerCase()!=tagName))); + if(n){ + result[++ri] = n; + } + } + } + return result; + }; + + function concat(a, b){ + if(b.slice){ + return a.concat(b); + } + for(var i = 0, l = b.length; i < l; i++){ + a[a.length] = b[i]; + } + return a; + } + + function byTag(cs, tagName){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!tagName){ + return cs; + } + var r = [], ri = -1; + tagName = tagName.toLowerCase(); + for(var i = 0, ci; ci = cs[i]; i++){ + if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ + r[++ri] = ci; + } + } + return r; + }; + + function byId(cs, attr, id){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!id){ + return cs; + } + var r = [], ri = -1; + for(var i = 0,ci; ci = cs[i]; i++){ + if(ci && ci.id == id){ + r[++ri] = ci; + return r; + } + } + return r; + }; + + function byAttribute(cs, attr, value, op, custom){ + var r = [], ri = -1, st = custom=="{"; + var f = Ext.DomQuery.operators[op]; + for(var i = 0, ci; ci = cs[i]; i++){ + var a; + if(st){ + a = Ext.DomQuery.getStyle(ci, attr); + } + else if(attr == "class" || attr == "className"){ + a = ci.className; + }else if(attr == "for"){ + a = ci.htmlFor; + }else if(attr == "href"){ + a = ci.getAttribute("href", 2); + }else{ + a = ci.getAttribute(attr); + } + if((f && f(a, value)) || (!f && a)){ + r[++ri] = ci; + } + } + return r; + }; + + function byPseudo(cs, name, value){ + return Ext.DomQuery.pseudos[name](cs, value); + }; + + // This is for IE MSXML which does not support expandos. + // IE runs the same speed using setAttribute, however FF slows way down + // and Safari completely fails so they need to continue to use expandos. + var isIE = window.ActiveXObject ? true : false; + + // this eval is stop the compressor from + // renaming the variable to something shorter + eval("var batch = 30803;"); + + var key = 30803; + + function nodupIEXml(cs){ + var d = ++key; + cs[0].setAttribute("_nodup", d); + var r = [cs[0]]; + for(var i = 1, len = cs.length; i < len; i++){ + var c = cs[i]; + if(!c.getAttribute("_nodup") != d){ + c.setAttribute("_nodup", d); + r[r.length] = c; + } + } + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].removeAttribute("_nodup"); + } + return r; + } + + function nodup(cs){ + if(!cs){ + return []; + } + var len = cs.length, c, i, r = cs, cj, ri = -1; + if(!len || typeof cs.nodeType != "undefined" || len == 1){ + return cs; + } + if(isIE && typeof cs[0].selectSingleNode != "undefined"){ + return nodupIEXml(cs); + } + var d = ++key; + cs[0]._nodup = d; + for(i = 1; c = cs[i]; i++){ + if(c._nodup != d){ + c._nodup = d; + }else{ + r = []; + for(var j = 0; j < i; j++){ + r[++ri] = cs[j]; + } + for(j = i+1; cj = cs[j]; j++){ + if(cj._nodup != d){ + cj._nodup = d; + r[++ri] = cj; + } + } + return r; + } + } + return r; + } + + function quickDiffIEXml(c1, c2){ + var d = ++key; + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].setAttribute("_qdiff", d); + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i].getAttribute("_qdiff") != d){ + r[r.length] = c2[i]; + } + } + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].removeAttribute("_qdiff"); + } + return r; + } + + function quickDiff(c1, c2){ + var len1 = c1.length; + if(!len1){ + return c2; + } + if(isIE && c1[0].selectSingleNode){ + return quickDiffIEXml(c1, c2); + } + var d = ++key; + for(var i = 0; i < len1; i++){ + c1[i]._qdiff = d; + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i]._qdiff != d){ + r[r.length] = c2[i]; + } + } + return r; + } + + function quickId(ns, mode, root, id){ + if(ns == root){ + var d = root.ownerDocument || root; + return d.getElementById(id); + } + ns = getNodes(ns, mode, "*"); + return byId(ns, null, id); + } + + return { + getStyle : function(el, name){ + return Ext.fly(el).getStyle(name); + }, + /** + * Compiles a selector/xpath query into a reusable function. The returned function + * takes one parameter "root" (optional), which is the context node from where the query should start. + * @param {String} selector The selector/xpath query + * @param {String} type (optional) Either "select" (the default) or "simple" for a simple selector match + * @return {Function} + */ + compile : function(path, type){ + type = type || "select"; + + var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"]; + var q = path, mode, lq; + var tk = Ext.DomQuery.matchers; + var tklen = tk.length; + var mm; + + // accept leading mode switch + var lmode = q.match(modeRe); + if(lmode && lmode[1]){ + fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; + q = q.replace(lmode[1], ""); + } + // strip leading slashes + while(path.substr(0, 1)=="/"){ + path = path.substr(1); + } + + while(q && lq != q){ + lq = q; + var tm = q.match(tagTokenRe); + if(type == "select"){ + if(tm){ + if(tm[1] == "#"){ + fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; + }else{ + fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; + } + q = q.replace(tm[0], ""); + }else if(q.substr(0, 1) != '@'){ + fn[fn.length] = 'n = getNodes(n, mode, "*");'; + } + }else{ + if(tm){ + if(tm[1] == "#"){ + fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");'; + }else{ + fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");'; + } + q = q.replace(tm[0], ""); + } + } + while(!(mm = q.match(modeRe))){ + var matched = false; + for(var j = 0; j < tklen; j++){ + var t = tk[j]; + var m = q.match(t.re); + if(m){ + fn[fn.length] = t.select.replace(tplRe, function(x, i){ + return m[i]; + }); + q = q.replace(m[0], ""); + matched = true; + break; + } + } + // prevent infinite loop on bad selector + if(!matched){ + throw 'Error parsing selector, parsing failed at "' + q + '"'; + } + } + if(mm[1]){ + fn[fn.length] = 'mode="'+mm[1].replace(trimRe, "")+'";'; + q = q.replace(mm[1], ""); + } + } + fn[fn.length] = "return nodup(n);\n}"; + eval(fn.join("")); + return f; + }, + + /** + * Selects a group of elements. + * @param {String} selector The selector/xpath query (can be a comma separated list of selectors) + * @param {Node} root (optional) The start of the query (defaults to document). + * @return {Array} + */ + select : function(path, root, type){ + if(!root || root == document){ + root = document; + } + if(typeof root == "string"){ + root = document.getElementById(root); + } + var paths = path.split(","); + var results = []; + for(var i = 0, len = paths.length; i < len; i++){ + var p = paths[i].replace(trimRe, ""); + if(!cache[p]){ + cache[p] = Ext.DomQuery.compile(p); + if(!cache[p]){ + throw p + " is not a valid selector"; + } + } + var result = cache[p](root); + if(result && result != document){ + results = results.concat(result); + } + } + if(paths.length > 1){ + return nodup(results); + } + return results; + }, + + /** + * Selects a single element. + * @param {String} selector The selector/xpath query + * @param {Node} root (optional) The start of the query (defaults to document). + * @return {Element} + */ + selectNode : function(path, root){ + return Ext.DomQuery.select(path, root)[0]; + }, + + /** + * Selects the value of a node, optionally replacing null with the defaultValue. + * @param {String} selector The selector/xpath query + * @param {Node} root (optional) The start of the query (defaults to document). + * @param {String} defaultValue + */ + selectValue : function(path, root, defaultValue){ + path = path.replace(trimRe, ""); + if(!valueCache[path]){ + valueCache[path] = Ext.DomQuery.compile(path, "select"); + } + var n = valueCache[path](root); + n = n[0] ? n[0] : n; + var v = (n && n.firstChild ? n.firstChild.nodeValue : null); + return ((v === null||v === undefined||v==='') ? defaultValue : v); + }, + + /** + * Selects the value of a node, parsing integers and floats. + * @param {String} selector The selector/xpath query + * @param {Node} root (optional) The start of the query (defaults to document). + * @param {Number} defaultValue + * @return {Number} + */ + selectNumber : function(path, root, defaultValue){ + var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0); + return parseFloat(v); + }, + + /** + * Returns true if the passed element(s) match the passed simple selector (e.g. div.some-class or span:first-child) + * @param {String/HTMLElement/Array} el An element id, element or array of elements + * @param {String} selector The simple selector to test + * @return {Boolean} + */ + is : function(el, ss){ + if(typeof el == "string"){ + el = document.getElementById(el); + } + var isArray = (el instanceof Array); + var result = Ext.DomQuery.filter(isArray ? el : [el], ss); + return isArray ? (result.length == el.length) : (result.length > 0); + }, + + /** + * Filters an array of elements to only include matches of a simple selector (e.g. div.some-class or span:first-child) + * @param {Array} el An array of elements to filter + * @param {String} selector The simple selector to test + * @param {Boolean} nonMatches If true, it returns the elements that DON'T match + * the selector instead of the ones that match + * @return {Array} + */ + 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; + }, + + /** + * Collection of matching regular expressions and code snippets. + */ + matchers : [{ + re: /^\.([\w-]+)/, + select: 'n = byClassName(n, null, " {1} ");' + }, { + re: /^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, + select: 'n = byPseudo(n, "{1}", "{2}");' + },{ + re: /^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/, + select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");' + }, { + re: /^#([\w-]+)/, + select: 'n = byId(n, null, "{1}");' + },{ + re: /^@([\w-]+)/, + select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};' + } + ], + + /** + * Collection of operator comparison functions. The default operators are =, !=, ^=, $=, *=, %=, |= and ~=. + * New operators can be added as long as the match the format c= where c is any character other than space, > <. + */ + 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; + } + }, + + /** + * Collection of "pseudo class" processors. Each processor is passed the current nodeset (array) + * and the argument (if any) supplied in the selector. + */ + 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; + var m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a); + var 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('|'); + var 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; + var 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; + var 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; + var 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; + } + } + }; +}(); + +/** + * Selects an array of DOM nodes by CSS/XPath selector. Shorthand of {@link Ext.DomQuery#select} + * @param {String} path The selector/xpath query + * @param {Node} root (optional) The start of the query (defaults to document). + * @return {Array} + * @member Ext + * @method query + */ +Ext.query = Ext.DomQuery.select; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Element.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Element.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Element.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,3037 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Element + * Represents an Element in the DOM.

        + * Usage:
        +
        
        +var el = Ext.get("my-div");
        +
        +// or with getEl
        +var el = getEl("my-div");
        +
        +// or with a DOM element
        +var el = Ext.get(myDivElement);
        +
        + * Using Ext.get() or getEl() instead of calling the constructor directly ensures you get the same object + * each call instead of constructing a new one.

        + * Animations
        + * Many of the functions for manipulating an element have an optional "animate" parameter. The animate parameter + * should either be a boolean (true) or an object literal with animation options. Note that the supported Element animation + * options are a subset of the {@link Ext.Fx} animation options specific to Fx effects. The Element animation options are: +
        +Option    Default   Description
        +--------- --------  ---------------------------------------------
        +duration  .35       The duration of the animation in seconds
        +easing    easeOut   The easing method
        +callback  none      A function to execute when the anim completes
        +scope     this      The scope (this) of the callback function
        +
        +* Also, the Anim object being used for the animation will be set on your options object as "anim", which allows you to stop or +* manipulate the animation. Here's an example: +
        
        +var el = Ext.get("my-div");
        +
        +// no animation
        +el.setWidth(100);
        +
        +// default animation
        +el.setWidth(100, true);
        +
        +// animation with some options set
        +el.setWidth(100, {
        +    duration: 1,
        +    callback: this.foo,
        +    scope: this
        +});
        +
        +// using the "anim" property to get the Anim object
        +var opt = {
        +    duration: 1,
        +    callback: this.foo,
        +    scope: this
        +};
        +el.setWidth(100, opt);
        +...
        +if(opt.anim.isAnimated()){
        +    opt.anim.stop();
        +}
        +
        +* Composite (Collections of) Elements
        + * For working with collections of Elements, see {@link Ext.CompositeElement} + * @constructor Create a new Element directly. + * @param {String/HTMLElement} element + * @param {Boolean} forceNew (optional) By default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. This will skip that check (useful for extending this class). + */ +(function(){ +var D = Ext.lib.Dom; +var E = Ext.lib.Event; +var A = Ext.lib.Anim; + +// local style camelizing for speed +var propCache = {}; +var camelRe = /(-[a-z])/gi; +var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; +var view = document.defaultView; + +Ext.Element = function(element, forceNew){ + var dom = typeof element == "string" ? + document.getElementById(element) : element; + if(!dom){ // invalid id/element + return null; + } + var id = dom.id; + if(forceNew !== true && id && Ext.Element.cache[id]){ // element object already exists + return Ext.Element.cache[id]; + } + + /** + * The DOM element + * @type HTMLElement + */ + this.dom = dom; + + /** + * The DOM element ID + * @type String + */ + this.id = id || Ext.id(dom); +}; + +var El = Ext.Element; + +El.prototype = { + /** + * The element's default display mode (defaults to "") + * @type String + */ + originalDisplay : "", + + visibilityMode : 1, + /** + * The default unit to append to CSS values where a unit isn't provided (defaults to px). + * @type String + */ + defaultUnit : "px", + /** + * Sets the element's visibility mode. When setVisible() is called it + * will use this to determine whether to set the visibility or the display property. + * @param visMode Element.VISIBILITY or Element.DISPLAY + * @return {Ext.Element} this + */ + setVisibilityMode : function(visMode){ + this.visibilityMode = visMode; + return this; + }, + /** + * Convenience method for setVisibilityMode(Element.DISPLAY) + * @param {String} display (optional) What to set display to when visible + * @return {Ext.Element} this + */ + enableDisplayMode : function(display){ + this.setVisibilityMode(El.DISPLAY); + if(typeof display != "undefined") this.originalDisplay = display; + return this; + }, + + /** + * Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child) + * @param {String} selector The simple selector to test + * @param {Number/Mixed} maxDepth (optional) The max depth to + search as a number or element (defaults to 10 || document.body) + * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node + * @return {HTMLElement} The matching DOM node (or null if no match was found) + */ + findParent : function(simpleSelector, maxDepth, returnEl){ + var p = this.dom, b = document.body, depth = 0, dq = Ext.DomQuery, stopEl; + maxDepth = maxDepth || 50; + if(typeof maxDepth != "number"){ + stopEl = Ext.getDom(maxDepth); + maxDepth = 10; + } + while(p && p.nodeType == 1 && depth < maxDepth && p != b && p != stopEl){ + if(dq.is(p, simpleSelector)){ + return returnEl ? Ext.get(p) : p; + } + depth++; + p = p.parentNode; + } + return null; + }, + + + /** + * Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child) + * @param {String} selector The simple selector to test + * @param {Number/Mixed} maxDepth (optional) The max depth to + search as a number or element (defaults to 10 || document.body) + * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node + * @return {HTMLElement} The matching DOM node (or null if no match was found) + */ + findParentNode : function(simpleSelector, maxDepth, returnEl){ + var p = Ext.fly(this.dom.parentNode, '_internal'); + return p ? p.findParent(simpleSelector, maxDepth, returnEl) : null; + }, + + /** + * Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). + * This is a shortcut for findParentNode() that always returns an Ext.Element. + * @param {String} selector The simple selector to test + * @param {Number/Mixed} maxDepth (optional) The max depth to + search as a number or element (defaults to 10 || document.body) + * @return {Ext.Element} The matching DOM node (or null if no match was found) + */ + up : function(simpleSelector, maxDepth){ + return this.findParentNode(simpleSelector, maxDepth, true); + }, + + + + /** + * Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child) + * @param {String} selector The simple selector to test + * @return {Boolean} True if this element matches the selector, else false + */ + is : function(simpleSelector){ + return Ext.DomQuery.is(this.dom, simpleSelector); + }, + + /** + * Perform animation on this element. + * @param {Object} args The animation control args + * @param {Float} duration (optional) How long the animation lasts in seconds (defaults to .35) + * @param {Function} onComplete (optional) Function to call when animation completes + * @param {String} easing (optional) Easing method to use (defaults to 'easeOut') + * @param {String} animType (optional) 'run' is the default. Can also be 'color', 'motion', or 'scroll' + * @return {Ext.Element} this + */ + animate : function(args, duration, onComplete, easing, animType){ + this.anim(args, {duration: duration, callback: onComplete, easing: easing}, animType); + return this; + }, + + /* + * @private Internal animation call + */ + anim : function(args, opt, animType, defaultDur, defaultEase, cb){ + animType = animType || 'run'; + opt = opt || {}; + var anim = Ext.lib.Anim[animType]( + this.dom, args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || 'easeOut', + function(){ + Ext.callback(cb, this); + Ext.callback(opt.callback, opt.scope || this, [this, opt]); + }, + this + ); + opt.anim = anim; + return anim; + }, + + // private legacy anim prep + 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]}); + }, + + /** + * Removes worthless text nodes + * @param {Boolean} forceReclean (optional) By default the element + * keeps track if it has been cleaned already so + * you can call this over and over. However, if you update the element and + * need to force a reclean, you can pass true. + */ + clean : function(forceReclean){ + if(this.isCleaned && forceReclean !== true){ + return this; + } + var ns = /\S/; + var d = this.dom, n = d.firstChild, ni = -1; + while(n){ + var nx = n.nextSibling; + if(n.nodeType == 3 && !ns.test(n.nodeValue)){ + d.removeChild(n); + }else{ + n.nodeIndex = ++ni; + } + n = nx; + } + this.isCleaned = true; + return this; + }, + + /** + * Scrolls this element into view within the passed container. + * @param {Mixed} container (optional) The container element to scroll (defaults to document.body) + * @param {Boolean} hscroll (optional) False to disable horizontal scroll (defaults to true) + * @return {Ext.Element} this + */ + scrollIntoView : function(container, hscroll){ + var c = Ext.getDom(container) || Ext.getBody().dom; + var el = this.dom; + + var o = this.getOffsetsTo(c), + l = o[0] + c.scrollLeft, + t = o[1] + c.scrollTop, + b = t+el.offsetHeight, + r = l+el.offsetWidth; + + var ch = c.clientHeight; + var ct = parseInt(c.scrollTop, 10); + var cl = parseInt(c.scrollLeft, 10); + var cb = ct + ch; + var cr = cl + c.clientWidth; + + if(el.offsetHeight > ch || t < ct){ + c.scrollTop = t; + }else if(b > cb){ + c.scrollTop = b-ch; + } + c.scrollTop = c.scrollTop; // corrects IE, other browsers will ignore + + if(hscroll !== false){ + if(el.offsetWidth > c.clientWidth || l < cl){ + c.scrollLeft = l; + }else if(r > cr){ + c.scrollLeft = r-c.clientWidth; + } + c.scrollLeft = c.scrollLeft; + } + return this; + }, + + // private + scrollChildIntoView : function(child, hscroll){ + Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); + }, + + /** + * Measures the element's content height and updates height to match. Note: this function uses setTimeout so + * the new height may not be available immediately. + * @param {Boolean} animate (optional) Animate the transition (defaults to false) + * @param {Float} duration (optional) Length of the animation in seconds (defaults to .35) + * @param {Function} onComplete (optional) Function to call when animation completes + * @param {String} easing (optional) Easing method to use (defaults to easeOut) + * @return {Ext.Element} this + */ + autoHeight : function(animate, duration, onComplete, easing){ + var oldHeight = this.getHeight(); + this.clip(); + this.setHeight(1); // force clipping + setTimeout(function(){ + var height = parseInt(this.dom.scrollHeight, 10); // parseInt for Safari + if(!animate){ + this.setHeight(height); + this.unclip(); + if(typeof onComplete == "function"){ + onComplete(); + } + }else{ + this.setHeight(oldHeight); // restore original height + this.setHeight(height, animate, duration, function(){ + this.unclip(); + if(typeof onComplete == "function") onComplete(); + }.createDelegate(this), easing); + } + }.createDelegate(this), 0); + return this; + }, + + /** + * Returns true if this element is an ancestor of the passed element + * @param {HTMLElement/String} el The element to check + * @return {Boolean} True if this element is an ancestor of el, else false + */ + contains : function(el){ + if(!el){return false;} + return D.isAncestor(this.dom, el.dom ? el.dom : el); + }, + + /** + * Checks whether the element is currently visible using both visibility and display properties. + * @param {Boolean} deep (optional) True to walk the dom and see if parent elements are hidden (defaults to false) + * @return {Boolean} True if the element is currently visible, else false + */ + isVisible : function(deep) { + var vis = !(this.getStyle("visibility") == "hidden" || this.getStyle("display") == "none"); + if(deep !== true || !vis){ + return vis; + } + var p = this.dom.parentNode; + while(p && p.tagName.toLowerCase() != "body"){ + if(!Ext.fly(p, '_isVisible').isVisible()){ + return false; + } + p = p.parentNode; + } + return true; + }, + + /** + * Creates a {@link Ext.CompositeElement} for child nodes based on the passed CSS selector (the selector should not contain an id). + * @param {String} selector The CSS selector + * @param {Boolean} unique (optional) True to create a unique Ext.Element for each child (defaults to false, which creates a single shared flyweight object) + * @return {CompositeElement/CompositeElementLite} The composite element + */ + select : function(selector, unique){ + return El.select(selector, unique, this.dom); + }, + + /** + * Selects child nodes based on the passed CSS selector (the selector should not contain an id). + * @param {String} selector The CSS selector + * @return {Array} An array of the matched nodes + */ + query : function(selector, unique){ + return Ext.DomQuery.select(selector, this.dom); + }, + + /** + * Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id). + * @param {String} selector The CSS selector + * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false) + * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true) + */ + child : function(selector, returnDom){ + var n = Ext.DomQuery.selectNode(selector, this.dom); + return returnDom ? n : Ext.get(n); + }, + + /** + * Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id). + * @param {String} selector The CSS selector + * @param {Boolean} returnDom (optional) True to return the DOM node instead of Ext.Element (defaults to false) + * @return {HTMLElement/Ext.Element} The child Ext.Element (or DOM node if returnDom = true) + */ + down : function(selector, returnDom){ + var n = Ext.DomQuery.selectNode(" > " + selector, this.dom); + return returnDom ? n : Ext.get(n); + }, + + /** + * Initializes a {@link Ext.dd.DD} drag drop object for this element. + * @param {String} group The group the DD object is member of + * @param {Object} config The DD config object + * @param {Object} overrides An object containing methods to override/implement on the DD object + * @return {Ext.dd.DD} The DD object + */ + initDD : function(group, config, overrides){ + var dd = new Ext.dd.DD(Ext.id(this.dom), group, config); + return Ext.apply(dd, overrides); + }, + + /** + * Initializes a {@link Ext.dd.DDProxy} object for this element. + * @param {String} group The group the DDProxy object is member of + * @param {Object} config The DDProxy config object + * @param {Object} overrides An object containing methods to override/implement on the DDProxy object + * @return {Ext.dd.DDProxy} The DDProxy object + */ + initDDProxy : function(group, config, overrides){ + var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config); + return Ext.apply(dd, overrides); + }, + + /** + * Initializes a {@link Ext.dd.DDTarget} object for this element. + * @param {String} group The group the DDTarget object is member of + * @param {Object} config The DDTarget config object + * @param {Object} overrides An object containing methods to override/implement on the DDTarget object + * @return {Ext.dd.DDTarget} The DDTarget object + */ + initDDTarget : function(group, config, overrides){ + var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config); + return Ext.apply(dd, overrides); + }, + + /** + * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use + * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property. + * @param {Boolean} visible Whether the element is visible + * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object + * @return {Ext.Element} this + */ + setVisible : function(visible, animate){ + if(!animate || !A){ + if(this.visibilityMode == El.DISPLAY){ + this.setDisplayed(visible); + }else{ + this.fixDisplay(); + this.dom.style.visibility = visible ? "visible" : "hidden"; + } + }else{ + // closure for composites + var dom = this.dom; + var visMode = this.visibilityMode; + if(visible){ + this.setOpacity(.01); + this.setVisible(true); + } + this.anim({opacity: { to: (visible?1:0) }}, + this.preanim(arguments, 1), + null, .35, 'easeIn', function(){ + if(!visible){ + if(visMode == El.DISPLAY){ + dom.style.display = "none"; + }else{ + dom.style.visibility = "hidden"; + } + Ext.get(dom).setOpacity(1); + } + }); + } + return this; + }, + + /** + * Returns true if display is not "none" + * @return {Boolean} + */ + isDisplayed : function() { + return this.getStyle("display") != "none"; + }, + + /** + * Toggles the element's visibility or display, depending on visibility mode. + * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object + * @return {Ext.Element} this + */ + toggle : function(animate){ + this.setVisible(!this.isVisible(), this.preanim(arguments, 0)); + return this; + }, + + /** + * Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true. + * @param {Mixed} value Boolean value to display the element using its default display, or a string to set the display directly. + * @return {Ext.Element} this + */ + setDisplayed : function(value) { + if(typeof value == "boolean"){ + value = value ? this.originalDisplay : "none"; + } + this.setStyle("display", value); + return this; + }, + + /** + * Tries to focus the element. Any exceptions are caught and ignored. + * @return {Ext.Element} this + */ + focus : function() { + try{ + this.dom.focus(); + }catch(e){} + return this; + }, + + /** + * Tries to blur the element. Any exceptions are caught and ignored. + * @return {Ext.Element} this + */ + blur : function() { + try{ + this.dom.blur(); + }catch(e){} + return this; + }, + + /** + * Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out. + * @param {String/Array} className The CSS class to add, or an array of classes + * @return {Ext.Element} this + */ + addClass : function(className){ + if(className instanceof Array){ + for(var i = 0, len = className.length; i < len; i++) { + this.addClass(className[i]); + } + }else{ + if(className && !this.hasClass(className)){ + this.dom.className = this.dom.className + " " + className; + } + } + return this; + }, + + /** + * Adds one or more CSS classes to this element and removes the same class(es) from all siblings. + * @param {String/Array} className The CSS class to add, or an array of classes + * @return {Ext.Element} this + */ + radioClass : function(className){ + var siblings = this.dom.parentNode.childNodes; + for(var i = 0; i < siblings.length; i++) { + var s = siblings[i]; + if(s.nodeType == 1){ + Ext.get(s).removeClass(className); + } + } + this.addClass(className); + return this; + }, + + /** + * Removes one or more CSS classes from the element. + * @param {String/Array} className The CSS class to remove, or an array of classes + * @return {Ext.Element} this + */ + removeClass : function(className){ + if(!className || !this.dom.className){ + return this; + } + if(className instanceof Array){ + for(var i = 0, len = className.length; i < len; i++) { + this.removeClass(className[i]); + } + }else{ + if(this.hasClass(className)){ + var re = this.classReCache[className]; + if (!re) { + re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', "g"); + this.classReCache[className] = re; + } + this.dom.className = + this.dom.className.replace(re, " "); + } + } + return this; + }, + + // private + classReCache: {}, + + /** + * Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it). + * @param {String} className The CSS class to toggle + * @return {Ext.Element} this + */ + toggleClass : function(className){ + if(this.hasClass(className)){ + this.removeClass(className); + }else{ + this.addClass(className); + } + return this; + }, + + /** + * Checks if the specified CSS class exists on this element's DOM node. + * @param {String} className The CSS class to check for + * @return {Boolean} True if the class exists, else false + */ + hasClass : function(className){ + return className && (' '+this.dom.className+' ').indexOf(' '+className+' ') != -1; + }, + + /** + * Replaces a CSS class on the element with another. If the old name does not exist, the new name will simply be added. + * @param {String} oldClassName The CSS class to replace + * @param {String} newClassName The replacement CSS class + * @return {Ext.Element} this + */ + replaceClass : function(oldClassName, newClassName){ + this.removeClass(oldClassName); + this.addClass(newClassName); + return this; + }, + + /** + * Returns an object with properties matching the styles requested. + * For example, el.getStyles('color', 'font-size', 'width') might return + * {'color': '#FFFFFF', 'font-size': '13px', 'width': '100px'}. + * @param {String} style1 A style name + * @param {String} style2 A style name + * @param {String} etc. + * @return {Object} The style object + */ + getStyles : function(){ + var a = arguments, len = a.length, r = {}; + for(var i = 0; i < len; i++){ + r[a[i]] = this.getStyle(a[i]); + } + return r; + }, + + /** + * Normalizes currentStyle and computedStyle. + * @param {String} property The style property whose value is returned. + * @return {String} The current value of the style property for this element. + */ + getStyle : function(){ + return view && view.getComputedStyle ? + function(prop){ + var el = this.dom, v, cs, camel; + if(prop == 'float'){ + prop = "cssFloat"; + } + if(v = el.style[prop]){ + return v; + } + if(cs = view.getComputedStyle(el, "")){ + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + return cs[camel]; + } + return null; + } : + function(prop){ + var el = this.dom, v, cs, camel; + if(prop == 'opacity'){ + if(typeof el.style.filter == 'string'){ + var m = el.style.filter.match(/alpha\(opacity=(.*)\)/i); + if(m){ + var fv = parseFloat(m[1]); + if(!isNaN(fv)){ + return fv ? fv / 100 : 0; + } + } + } + return 1; + }else if(prop == 'float'){ + prop = "styleFloat"; + } + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + if(v = el.style[camel]){ + return v; + } + if(cs = el.currentStyle){ + return cs[camel]; + } + return null; + }; + }(), + + /** + * Wrapper for setting style properties, also takes single object parameter of multiple styles. + * @param {String/Object} property The style property to be set, or an object of multiple styles. + * @param {String} value (optional) The value to apply to the given property, or null if an object was passed. + * @return {Ext.Element} this + */ + setStyle : function(prop, value){ + if(typeof prop == "string"){ + var camel; + if(!(camel = propCache[prop])){ + camel = propCache[prop] = prop.replace(camelRe, camelFn); + } + if(camel == 'opacity') { + this.setOpacity(value); + }else{ + this.dom.style[camel] = value; + } + }else{ + for(var style in prop){ + if(typeof prop[style] != "function"){ + this.setStyle(style, prop[style]); + } + } + } + return this; + }, + + /** + * More flexible version of {@link #setStyle} for setting style properties. + * @param {String/Object/Function} styles A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or + * a function which returns such a specification. + * @return {Ext.Element} this + */ + applyStyles : function(style){ + Ext.DomHelper.applyStyles(this.dom, style); + return this; + }, + + /** + * Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @return {Number} The X position of the element + */ + getX : function(){ + return D.getX(this.dom); + }, + + /** + * Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @return {Number} The Y position of the element + */ + getY : function(){ + return D.getY(this.dom); + }, + + /** + * Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @return {Array} The XY position of the element + */ + getXY : function(){ + return D.getXY(this.dom); + }, + + /** + * Returns the offsets of this element from the passed element. Both element must be part of the DOM tree and not have display:none to have page coordinates. + * @param {Mixed} element The element to get the offsets from. + * @return {Array} The XY page offsets (e.g. [100, -200]) + */ + getOffsetsTo : function(el){ + var o = this.getXY(); + var e = Ext.fly(el, '_internal').getXY(); + return [o[0]-e[0],o[1]-e[1]]; + }, + + /** + * Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Number} The X position of the element + * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object + * @return {Ext.Element} this + */ + setX : function(x, animate){ + if(!animate || !A){ + D.setX(this.dom, x); + }else{ + this.setXY([x, this.getY()], this.preanim(arguments, 1)); + } + return this; + }, + + /** + * Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Number} The Y position of the element + * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object + * @return {Ext.Element} this + */ + setY : function(y, animate){ + if(!animate || !A){ + D.setY(this.dom, y); + }else{ + this.setXY([this.getX(), y], this.preanim(arguments, 1)); + } + return this; + }, + + /** + * Sets the element's left position directly using CSS style (instead of {@link #setX}). + * @param {String} left The left CSS property value + * @return {Ext.Element} this + */ + setLeft : function(left){ + this.setStyle("left", this.addUnits(left)); + return this; + }, + + /** + * Sets the element's top position directly using CSS style (instead of {@link #setY}). + * @param {String} top The top CSS property value + * @return {Ext.Element} this + */ + setTop : function(top){ + this.setStyle("top", this.addUnits(top)); + return this; + }, + + /** + * Sets the element's CSS right style. + * @param {String} right The right CSS property value + * @return {Ext.Element} this + */ + setRight : function(right){ + this.setStyle("right", this.addUnits(right)); + return this; + }, + + /** + * Sets the element's CSS bottom style. + * @param {String} bottom The bottom CSS property value + * @return {Ext.Element} this + */ + setBottom : function(bottom){ + this.setStyle("bottom", this.addUnits(bottom)); + return this; + }, + + /** + * Sets the position of the element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Array} pos Contains X & Y [x, y] values for new position (coordinates are page-based) + * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object + * @return {Ext.Element} this + */ + setXY : function(pos, animate){ + if(!animate || !A){ + D.setXY(this.dom, pos); + }else{ + this.anim({points: {to: pos}}, this.preanim(arguments, 1), 'motion'); + } + return this; + }, + + /** + * Sets the position of the element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Number} x X value for new position (coordinates are page-based) + * @param {Number} y Y value for new position (coordinates are page-based) + * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object + * @return {Ext.Element} this + */ + setLocation : function(x, y, animate){ + this.setXY([x, y], this.preanim(arguments, 2)); + return this; + }, + + /** + * Sets the position of the element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @param {Number} x X value for new position (coordinates are page-based) + * @param {Number} y Y value for new position (coordinates are page-based) + * @param {Boolean/Object} animate (optional) True for the default animation, or a standard Element animation config object + * @return {Ext.Element} this + */ + moveTo : function(x, y, animate){ + this.setXY([x, y], this.preanim(arguments, 2)); + return this; + }, + + /** + * Returns the region of the given element. + * The element must be part of the DOM tree to have a region (display:none or elements not appended return false). + * @return {Region} A Ext.lib.Region containing "top, left, bottom, right" member data. + */ + getRegion : function(){ + return D.getRegion(this.dom); + }, + + /** + * Returns the offset height of the element + * @param {Boolean} contentHeight (optional) true to get the height minus borders and padding + * @return {Number} The element's height + */ + getHeight : function(contentHeight){ + var h = this.dom.offsetHeight || 0; + h = contentHeight !== true ? h : h-this.getBorderWidth("tb")-this.getPadding("tb"); + return h < 0 ? 0 : h; + }, + + /** + * Returns the offset width of the element + * @param {Boolean} contentWidth (optional) true to get the width minus borders and padding + * @return {Number} The element's width + */ + getWidth : function(contentWidth){ + var w = this.dom.offsetWidth || 0; + w = contentWidth !== true ? w : w-this.getBorderWidth("lr")-this.getPadding("lr"); + return w < 0 ? 0 : w; + }, + + /** + * Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders + * when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements + * if a height has not been set using CSS. + * @return {Number} + */ + getComputedHeight : function(){ + var h = Math.max(this.dom.offsetHeight, this.dom.clientHeight); + if(!h){ + h = parseInt(this.getStyle('height'), 10) || 0; + if(!this.isBorderBox()){ + h += this.getFrameWidth('tb'); + } + } + return h; + }, + + /** + * Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders + * when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements + * if a width has not been set using CSS. + * @return {Number} + */ + getComputedWidth : function(){ + var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); + if(!w){ + w = parseInt(this.getStyle('width'), 10) || 0; + if(!this.isBorderBox()){ + w += this.getFrameWidth('lr'); + } + } + return w; + }, + + /** + * Returns the size of the element. + * @param {Boolean} contentSize (optional) true to get the width/size minus borders and padding + * @return {Object} An object containing the element's size {width: (element width), height: (element height)} + */ + getSize : function(contentSize){ + return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; + }, + + getStyleSize : function(){ + var w, h, d = this.dom, s = d.style; + if(s.width && s.width != 'auto'){ + w = parseInt(s.width, 10); + if(Ext.isBorderBox){ + w -= this.getFrameWidth('lr'); + } + } + if(s.height && s.height != 'auto'){ + h = parseInt(s.height, 10); + if(Ext.isBorderBox){ + h -= this.getFrameWidth('tb'); + } + } + return {width: w || this.getWidth(true), height: h || this.getHeight(true)}; + + }, + + /** + * Returns the width and height of the viewport. + * @return {Object} An object containing the viewport's size {width: (viewport width), height: (viewport height)} + */ + getViewSize : function(){ + var d = this.dom, doc = document, aw = 0, ah = 0; + if(d == doc || d == doc.body){ + return {width : D.getViewWidth(), height: D.getViewHeight()}; + }else{ + return { + width : d.clientWidth, + height: d.clientHeight + }; + } + }, + + /** + * Returns the value of the "value" attribute + * @param {Boolean} asNumber true to parse the value as a number + * @return {String/Number} + */ + getValue : function(asNumber){ + return asNumber ? parseInt(this.dom.value, 10) : this.dom.value; + }, + + // private + adjustWidth : function(width){ + if(typeof width == "number"){ + if(this.autoBoxAdjust && !this.isBorderBox()){ + width -= (this.getBorderWidth("lr") + this.getPadding("lr")); + } + if(width < 0){ + width = 0; + } + } + return width; + }, + + // private + adjustHeight : function(height){ + if(typeof height == "number"){ + if(this.autoBoxAdjust && !this.isBorderBox()){ + height -= (this.getBorderWidth("tb") + this.getPadding("tb")); + } + if(height < 0){ + height = 0; + } + } + return height; + }, + + /** + * Set the width of the element + * @param {Number} width The new width + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + setWidth : function(width, animate){ + width = this.adjustWidth(width); + if(!animate || !A){ + this.dom.style.width = this.addUnits(width); + }else{ + this.anim({width: {to: width}}, this.preanim(arguments, 1)); + } + return this; + }, + + /** + * Set the height of the element + * @param {Number} height The new height + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + setHeight : function(height, animate){ + height = this.adjustHeight(height); + if(!animate || !A){ + this.dom.style.height = this.addUnits(height); + }else{ + this.anim({height: {to: height}}, this.preanim(arguments, 1)); + } + return this; + }, + + /** + * Set the size of the element. If animation is true, both width an height will be animated concurrently. + * @param {Number} width The new width + * @param {Number} height The new height + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + setSize : function(width, height, animate){ + if(typeof width == "object"){ // in case of object from getSize() + height = width.height; width = width.width; + } + width = this.adjustWidth(width); height = this.adjustHeight(height); + if(!animate || !A){ + this.dom.style.width = this.addUnits(width); + this.dom.style.height = this.addUnits(height); + }else{ + this.anim({width: {to: width}, height: {to: height}}, this.preanim(arguments, 2)); + } + return this; + }, + + /** + * Sets the element's position and size in one shot. If animation is true then width, height, x and y will be animated concurrently. + * @param {Number} x X value for new position (coordinates are page-based) + * @param {Number} y Y value for new position (coordinates are page-based) + * @param {Number} width The new width + * @param {Number} height The new height + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + setBounds : function(x, y, width, height, animate){ + if(!animate || !A){ + this.setSize(width, height); + this.setLocation(x, y); + }else{ + width = this.adjustWidth(width); height = this.adjustHeight(height); + this.anim({points: {to: [x, y]}, width: {to: width}, height: {to: height}}, + this.preanim(arguments, 4), 'motion'); + } + return this; + }, + + /** + * Sets the element's position and size the the specified region. If animation is true then width, height, x and y will be animated concurrently. + * @param {Ext.lib.Region} region The region to fill + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + setRegion : function(region, animate){ + this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.preanim(arguments, 1)); + return this; + }, + + /** + * Appends an event handler to this element. The shorthand version {@link #on} is equivalent. + * @param {String} eventName The type of event to handle + * @param {Function} fn The handler function the event invokes + * @param {Object} scope (optional) The scope (this element) of the handler function + * @param {Object} options (optional) An object containing handler configuration properties. + * This may contain any of the following properties:
          + *
        • scope {Object} : The scope in which to execute the handler function. The handler function's "this" context.
        • + *
        • delegate {String} : A simple selector to filter the target or look for a descendant of the target
        • + *
        • stopEvent {Boolean} : True to stop the event. That is stop propagation, and prevent the default action.
        • + *
        • preventDefault {Boolean} : True to prevent the default action
        • + *
        • stopPropagation {Boolean} : True to prevent event propagation
        • + *
        • normalized {Boolean} : False to pass a browser event to the handler function instead of an Ext.EventObject
        • + *
        • delay {Number} : The number of milliseconds to delay the invocation of the handler after te event fires.
        • + *
        • single {Boolean} : True to add a handler to handle just the next firing of the event, and then remove itself.
        • + *
        • buffer {Number} : Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed + * by the specified number of milliseconds. If the event fires again within that time, the original + * handler is not invoked, but the new handler is scheduled in its place.
        • + *

        + *

        + * Combining Options
        + * In the following examples, the shorthand form {@link #on} is used rather than the more verbose + * addListener. The two are equivalent. Using the options argument, it is possible to combine different + * types of listeners:
        + *
        + * A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)

        + * Code:
        
        +el.on('click', this.onClick, this, {
        +    single: true,
        +    delay: 100,
        +    stopEvent : true,
        +    forumId: 4
        +});
        + *

        + * Attaching multiple handlers in 1 call
        + * The method also allows for a single argument to be passed which is a config object containing properties + * which specify multiple handlers. + *

        + * Code:

        
        +el.on({
        +    'click' : {
        +        fn: this.onClick,
        +        scope: this,
        +        delay: 100
        +    },
        +    'mouseover' : {
        +        fn: this.onMouseOver,
        +        scope: this
        +    },
        +    'mouseout' : {
        +        fn: this.onMouseOut,
        +        scope: this
        +    }
        +});
        + *

        + * Or a shorthand syntax:
        + * Code:

        
        +el.on({
        +    'click' : this.onClick,
        +    'mouseover' : this.onMouseOver,
        +    'mouseout' : this.onMouseOut,
        +    scope: this
        +});
        + */ + addListener : function(eventName, fn, scope, options){ + Ext.EventManager.on(this.dom, eventName, fn, scope || this, options); + }, + + /** + * Removes an event handler from this element. The shorthand version {@link #un} is equivalent. Example: + *
        
        +el.removeListener('click', this.handlerFn);
        +// or
        +el.un('click', this.handlerFn);
        +
        + * @param {String} eventName the type of event to remove + * @param {Function} fn the method the event invokes + * @return {Ext.Element} this + */ + removeListener : function(eventName, fn){ + Ext.EventManager.removeListener(this.dom, eventName, fn); + return this; + }, + + /** + * Removes all previous added listeners from this element + * @return {Ext.Element} this + */ + removeAllListeners : function(){ + E.purgeElement(this.dom); + return this; + }, + + /** + * Create an event handler on this element such that when the event fires and is handled by this element, + * it will be relayed to another object (i.e., fired again as if it originated from that object instead). + * @param {String} eventName The type of event to relay + * @param {Object} object Any object that extends {@link Ext.util.Observable} that will provide the context + * for firing the relayed event + */ + relayEvent : function(eventName, observable){ + this.on(eventName, function(e){ + observable.fireEvent(eventName, e); + }); + }, + + /** + * Set the opacity of the element + * @param {Float} opacity The new opacity. 0 = transparent, .5 = 50% visibile, 1 = fully visible, etc + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + setOpacity : function(opacity, animate){ + if(!animate || !A){ + var s = this.dom.style; + if(Ext.isIE){ + s.zoom = 1; + s.filter = (s.filter || '').replace(/alpha\([^\)]*\)/gi,"") + + (opacity == 1 ? "" : " alpha(opacity=" + opacity * 100 + ")"); + }else{ + s.opacity = opacity; + } + }else{ + this.anim({opacity: {to: opacity}}, this.preanim(arguments, 1), null, .35, 'easeIn'); + } + return this; + }, + + /** + * Gets the left X coordinate + * @param {Boolean} local True to get the local css position instead of page coordinate + * @return {Number} + */ + getLeft : function(local){ + if(!local){ + return this.getX(); + }else{ + return parseInt(this.getStyle("left"), 10) || 0; + } + }, + + /** + * Gets the right X coordinate of the element (element X position + element width) + * @param {Boolean} local True to get the local css position instead of page coordinate + * @return {Number} + */ + getRight : function(local){ + if(!local){ + return this.getX() + this.getWidth(); + }else{ + return (this.getLeft(true) + this.getWidth()) || 0; + } + }, + + /** + * Gets the top Y coordinate + * @param {Boolean} local True to get the local css position instead of page coordinate + * @return {Number} + */ + getTop : function(local) { + if(!local){ + return this.getY(); + }else{ + return parseInt(this.getStyle("top"), 10) || 0; + } + }, + + /** + * Gets the bottom Y coordinate of the element (element Y position + element height) + * @param {Boolean} local True to get the local css position instead of page coordinate + * @return {Number} + */ + getBottom : function(local){ + if(!local){ + return this.getY() + this.getHeight(); + }else{ + return (this.getTop(true) + this.getHeight()) || 0; + } + }, + + /** + * Initializes positioning on this element. If a desired position is not passed, it will make the + * the element positioned relative IF it is not already positioned. + * @param {String} pos (optional) Positioning to use "relative", "absolute" or "fixed" + * @param {Number} zIndex (optional) The zIndex to apply + * @param {Number} x (optional) Set the page X position + * @param {Number} y (optional) Set the page Y position + */ + position : function(pos, zIndex, x, y){ + if(!pos){ + if(this.getStyle('position') == 'static'){ + this.setStyle('position', 'relative'); + } + }else{ + this.setStyle("position", pos); + } + if(zIndex){ + this.setStyle("z-index", zIndex); + } + if(x !== undefined && y !== undefined){ + this.setXY([x, y]); + }else if(x !== undefined){ + this.setX(x); + }else if(y !== undefined){ + this.setY(y); + } + }, + + /** + * Clear positioning back to the default when the document was loaded + * @param {String} value (optional) The value to use for the left,right,top,bottom, defaults to '' (empty string). You could use 'auto'. + * @return {Ext.Element} this + */ + clearPositioning : function(value){ + value = value ||''; + this.setStyle({ + "left": value, + "right": value, + "top": value, + "bottom": value, + "z-index": "", + "position" : "static" + }); + return this; + }, + + /** + * Gets an object with all CSS positioning properties. Useful along with setPostioning to get + * snapshot before performing an update and then restoring the element. + * @return {Object} + */ + getPositioning : function(){ + var l = this.getStyle("left"); + var t = this.getStyle("top"); + return { + "position" : this.getStyle("position"), + "left" : l, + "right" : l ? "" : this.getStyle("right"), + "top" : t, + "bottom" : t ? "" : this.getStyle("bottom"), + "z-index" : this.getStyle("z-index") + }; + }, + + /** + * Gets the width of the border(s) for the specified side(s) + * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, + * passing lr would get the border (l)eft width + the border (r)ight width. + * @return {Number} The width of the sides passed added together + */ + getBorderWidth : function(side){ + return this.addStyles(side, El.borders); + }, + + /** + * Gets the width of the padding(s) for the specified side(s) + * @param {String} side Can be t, l, r, b or any combination of those to add multiple values. For example, + * passing lr would get the padding (l)eft + the padding (r)ight. + * @return {Number} The padding of the sides passed added together + */ + getPadding : function(side){ + return this.addStyles(side, El.paddings); + }, + + /** + * Set positioning with an object returned by getPositioning(). + * @param {Object} posCfg + * @return {Ext.Element} this + */ + setPositioning : function(pc){ + this.applyStyles(pc); + if(pc.right == "auto"){ + this.dom.style.right = ""; + } + if(pc.bottom == "auto"){ + this.dom.style.bottom = ""; + } + return this; + }, + + // private + fixDisplay : function(){ + if(this.getStyle("display") == "none"){ + this.setStyle("visibility", "hidden"); + this.setStyle("display", this.originalDisplay); // first try reverting to default + if(this.getStyle("display") == "none"){ // if that fails, default to block + this.setStyle("display", "block"); + } + } + }, + + /** + * Quick set left and top adding default units + * @param {String} left The left CSS property value + * @param {String} top The top CSS property value + * @return {Ext.Element} this + */ + setLeftTop : function(left, top){ + this.dom.style.left = this.addUnits(left); + this.dom.style.top = this.addUnits(top); + return this; + }, + + /** + * Move this element relative to its current position. + * @param {String} direction Possible values are: "l","left" - "r","right" - "t","top","up" - "b","bottom","down". + * @param {Number} distance How far to move the element in pixels + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + move : function(direction, distance, animate){ + var xy = this.getXY(); + direction = direction.toLowerCase(); + switch(direction){ + case "l": + case "left": + this.moveTo(xy[0]-distance, xy[1], this.preanim(arguments, 2)); + break; + case "r": + case "right": + this.moveTo(xy[0]+distance, xy[1], this.preanim(arguments, 2)); + break; + case "t": + case "top": + case "up": + this.moveTo(xy[0], xy[1]-distance, this.preanim(arguments, 2)); + break; + case "b": + case "bottom": + case "down": + this.moveTo(xy[0], xy[1]+distance, this.preanim(arguments, 2)); + break; + } + return this; + }, + + /** + * Store the current overflow setting and clip overflow on the element - use {@link #unclip} to remove + * @return {Ext.Element} this + */ + clip : function(){ + if(!this.isClipped){ + this.isClipped = true; + this.originalClip = { + "o": this.getStyle("overflow"), + "x": this.getStyle("overflow-x"), + "y": this.getStyle("overflow-y") + }; + this.setStyle("overflow", "hidden"); + this.setStyle("overflow-x", "hidden"); + this.setStyle("overflow-y", "hidden"); + } + return this; + }, + + /** + * Return clipping (overflow) to original clipping before clip() was called + * @return {Ext.Element} this + */ + unclip : function(){ + if(this.isClipped){ + this.isClipped = false; + var o = this.originalClip; + if(o.o){this.setStyle("overflow", o.o);} + if(o.x){this.setStyle("overflow-x", o.x);} + if(o.y){this.setStyle("overflow-y", o.y);} + } + return this; + }, + + + /** + * Gets the x,y coordinates specified by the anchor position on the element. + * @param {String} anchor (optional) The specified anchor position (defaults to "c"). See {@link #alignTo} + * for details on supported anchor positions. + * @param {Boolean} local (optional) True to get the local (element top/left-relative) anchor position instead + * of page coordinates + * @param {Object} size (optional) An object containing the size to use for calculating anchor position + * {width: (target width), height: (target height)} (defaults to the element's current size) + * @return {Array} [x, y] An array containing the element's x and y coordinates + */ + getAnchorXY : function(anchor, local, s){ + //Passing a different size is useful for pre-calculating anchors, + //especially for anchored animations that change the el size. + + var w, h, vp = false; + if(!s){ + var d = this.dom; + if(d == document.body || d == document){ + vp = true; + w = D.getViewWidth(); h = D.getViewHeight(); + }else{ + w = this.getWidth(); h = this.getHeight(); + } + }else{ + w = s.width; h = s.height; + } + var x = 0, y = 0, r = Math.round; + switch((anchor || "tl").toLowerCase()){ + case "c": + x = r(w*.5); + y = r(h*.5); + break; + case "t": + x = r(w*.5); + y = 0; + break; + case "l": + x = 0; + y = r(h*.5); + break; + case "r": + x = w; + y = r(h*.5); + break; + case "b": + x = r(w*.5); + y = h; + break; + case "tl": + x = 0; + y = 0; + break; + case "bl": + x = 0; + y = h; + break; + case "br": + x = w; + y = h; + break; + case "tr": + x = w; + y = 0; + break; + } + if(local === true){ + return [x, y]; + } + if(vp){ + var sc = this.getScroll(); + return [x + sc.left, y + sc.top]; + } + //Add the element's offset xy + var o = this.getXY(); + return [x+o[0], y+o[1]]; + }, + + /** + * Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the + * supported position values. + * @param {Mixed} element The element to align to. + * @param {String} position The position to align to. + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @return {Array} [x, y] + */ + getAlignToXY : function(el, p, o){ + el = Ext.get(el); + if(!el || !el.dom){ + throw "Element.alignToXY with an element that doesn't exist"; + } + var d = this.dom; + var c = false; //constrain to viewport + var p1 = "", p2 = ""; + o = o || [0,0]; + + if(!p){ + p = "tl-bl"; + }else if(p == "?"){ + p = "tl-bl?"; + }else if(p.indexOf("-") == -1){ + p = "tl-" + p; + } + p = p.toLowerCase(); + var m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); + if(!m){ + throw "Element.alignTo with an invalid alignment " + p; + } + p1 = m[1]; p2 = m[2]; c = !!m[3]; + + //Subtract the aligned el's internal xy from the target's offset xy + //plus custom offset to get the aligned el's new offset xy + var a1 = this.getAnchorXY(p1, true); + var a2 = el.getAnchorXY(p2, false); + + var x = a2[0] - a1[0] + o[0]; + var y = a2[1] - a1[1] + o[1]; + + if(c){ + //constrain the aligned el to viewport if necessary + var w = this.getWidth(), h = this.getHeight(), r = el.getRegion(); + // 5px of margin for ie + var dw = D.getViewWidth()-5, dh = D.getViewHeight()-5; + + //If we are at a viewport boundary and the aligned el is anchored on a target border that is + //perpendicular to the vp border, allow the aligned el to slide on that border, + //otherwise swap the aligned el to the opposite border of the target. + var p1y = p1.charAt(0), p1x = p1.charAt(p1.length-1); + var p2y = p2.charAt(0), p2x = p2.charAt(p2.length-1); + var swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); + var swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); + + var doc = document; + var scrollX = (doc.documentElement.scrollLeft || doc.body.scrollLeft || 0)+5; + var scrollY = (doc.documentElement.scrollTop || doc.body.scrollTop || 0)+5; + + if((x+w) > dw + scrollX){ + x = swapX ? r.left-w : dw+scrollX-w; + } + if(x < scrollX){ + x = swapX ? r.right : scrollX; + } + if((y+h) > dh + scrollY){ + y = swapY ? r.top-h : dh+scrollY-h; + } + if (y < scrollY){ + y = swapY ? r.bottom : scrollY; + } + } + return [x,y]; + }, + + // private + getConstrainToXY : function(){ + var os = {top:0, left:0, bottom:0, right: 0}; + + return function(el, local, offsets, proposedXY){ + el = Ext.get(el); + offsets = offsets ? Ext.applyIf(offsets, os) : os; + + var vw, vh, vx = 0, vy = 0; + if(el.dom == document.body || el.dom == document){ + vw = Ext.lib.Dom.getViewWidth(); + vh = Ext.lib.Dom.getViewHeight(); + }else{ + vw = el.dom.clientWidth; + vh = el.dom.clientHeight; + if(!local){ + var vxy = el.getXY(); + vx = vxy[0]; + vy = vxy[1]; + } + } + + var s = el.getScroll(); + + vx += offsets.left + s.left; + vy += offsets.top + s.top; + + vw -= offsets.right; + vh -= offsets.bottom; + + var vr = vx+vw; + var vb = vy+vh; + + var xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]); + var x = xy[0], y = xy[1]; + var w = this.dom.offsetWidth, h = this.dom.offsetHeight; + + // only move it if it needs it + var moved = false; + + // first validate right/bottom + if((x + w) > vr){ + x = vr - w; + moved = true; + } + if((y + h) > vb){ + y = vb - h; + moved = true; + } + // then make sure top/left isn't negative + if(x < vx){ + x = vx; + moved = true; + } + if(y < vy){ + y = vy; + moved = true; + } + return moved ? [x, y] : false; + }; + }(), + + // private + adjustForConstraints : function(xy, parent, offsets){ + return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; + }, + + /** + * Aligns this element with another element relative to the specified anchor points. If the other element is the + * document it aligns it to the viewport. + * The position parameter is optional, and can be specified in any one of the following formats: + *
          + *
        • Blank: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").
        • + *
        • One anchor (deprecated): The passed anchor position is used as the target element's anchor point. + * The element being aligned will position its top-left corner (tl) to that point. This method has been + * deprecated in favor of the newer two anchor syntax below.
        • + *
        • Two anchors: If two values from the table below are passed separated by a dash, the first value is used as the + * element's anchor point, and the second value is used as the target's anchor point.
        • + *
        + * In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of + * the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to + * the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than + * that specified in order to enforce the viewport constraints. + * Following are all of the supported anchor positions: +
        +Value  Description
        +-----  -----------------------------
        +tl     The top left corner (default)
        +t      The center of the top edge
        +tr     The top right corner
        +l      The center of the left edge
        +c      In the center of the element
        +r      The center of the right edge
        +bl     The bottom left corner
        +b      The center of the bottom edge
        +br     The bottom right corner
        +
        +Example Usage: +
        
        +// align el to other-el using the default positioning ("tl-bl", non-constrained)
        +el.alignTo("other-el");
        +
        +// align the top left corner of el with the top right corner of other-el (constrained to viewport)
        +el.alignTo("other-el", "tr?");
        +
        +// align the bottom right corner of el with the center left edge of other-el
        +el.alignTo("other-el", "br-l?");
        +
        +// align the center of el with the bottom left corner of other-el and
        +// adjust the x position by -6 pixels (and the y position by 0)
        +el.alignTo("other-el", "c-bl", [-6, 0]);
        +
        + * @param {Mixed} element The element to align to. + * @param {String} position The position to align to. + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + alignTo : function(element, position, offsets, animate){ + var xy = this.getAlignToXY(element, position, offsets); + this.setXY(xy, this.preanim(arguments, 3)); + return this; + }, + + /** + * Anchors an element to another element and realigns it when the window is resized. + * @param {Mixed} element The element to align to. + * @param {String} position The position to align to. + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @param {Boolean/Object} animate (optional) True for the default animation or a standard Element animation config object + * @param {Boolean/Number} monitorScroll (optional) True to monitor body scroll and reposition. If this parameter + * is a number, it is used as the buffer delay (defaults to 50ms). + * @param {Function} callback The function to call after the animation finishes + * @return {Ext.Element} this + */ + anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback){ + var action = function(){ + this.alignTo(el, alignment, offsets, animate); + Ext.callback(callback, this); + }; + Ext.EventManager.onWindowResize(action, this); + var tm = typeof monitorScroll; + if(tm != 'undefined'){ + Ext.EventManager.on(window, 'scroll', action, this, + {buffer: tm == 'number' ? monitorScroll : 50}); + } + action.call(this); // align immediately + return this; + }, + /** + * Clears any opacity settings from this element. Required in some cases for IE. + * @return {Ext.Element} this + */ + clearOpacity : function(){ + if (window.ActiveXObject) { + if(typeof this.dom.style.filter == 'string' && (/alpha/i).test(this.dom.style.filter)){ + this.dom.style.filter = ""; + } + } else { + this.dom.style.opacity = ""; + this.dom.style["-moz-opacity"] = ""; + this.dom.style["-khtml-opacity"] = ""; + } + return this; + }, + + /** + * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}. + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + hide : function(animate){ + this.setVisible(false, this.preanim(arguments, 0)); + return this; + }, + + /** + * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}. + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + show : function(animate){ + this.setVisible(true, this.preanim(arguments, 0)); + return this; + }, + + /** + * @private Test if size has a unit, otherwise appends the default + */ + addUnits : function(size){ + return Ext.Element.addUnits(size, this.defaultUnit); + }, + + /** + * Update the innerHTML of this element, optionally searching for and processing scripts + * @param {String} html The new HTML + * @param {Boolean} loadScripts (optional) True to look for and process scripts (defaults to false) + * @param {Function} callback (optional) For async script loading you can be notified when the update completes + * @return {Ext.Element} this + */ + update : function(html, loadScripts, callback){ + if(typeof html == "undefined"){ + html = ""; + } + if(loadScripts !== true){ + this.dom.innerHTML = html; + if(typeof callback == "function"){ + callback(); + } + return this; + } + var id = Ext.id(); + var dom = this.dom; + + html += ''; + + E.onAvailable(id, function(){ + var hd = document.getElementsByTagName("head")[0]; + var re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig; + var srcRe = /\ssrc=([\'\"])(.*?)\1/i; + var typeRe = /\stype=([\'\"])(.*?)\1/i; + + var match; + while(match = re.exec(html)){ + var attrs = match[1]; + var srcMatch = attrs ? attrs.match(srcRe) : false; + if(srcMatch && srcMatch[2]){ + var s = document.createElement("script"); + s.src = srcMatch[2]; + var typeMatch = attrs.match(typeRe); + if(typeMatch && typeMatch[2]){ + s.type = typeMatch[2]; + } + hd.appendChild(s); + }else if(match[2] && match[2].length > 0){ + if(window.execScript) { + window.execScript(match[2]); + } else { + window.eval(match[2]); + } + } + } + var el = document.getElementById(id); + if(el){Ext.removeNode(el);} + if(typeof callback == "function"){ + callback(); + } + }); + dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); + return this; + }, + + /** + * Direct access to the Updater {@link Ext.Updater#update} method (takes the same parameters). + * @param {String/Function} url The url for this request or a function to call to get the url + * @param {String/Object} params (optional) The parameters to pass as either a url encoded string "param1=1&param2=2" or an object {param1: 1, param2: 2} + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + * @param {Boolean} discardUrl (optional) By default when you execute an update the defaultUrl is changed to the last used url. If true, it will not store the url. + * @return {Ext.Element} this + */ + load : function(){ + var um = this.getUpdater(); + um.update.apply(um, arguments); + return this; + }, + + /** + * Gets this element's Updater + * @return {Ext.Updater} The Updater + */ + getUpdater : function(){ + if(!this.updateManager){ + this.updateManager = new Ext.Updater(this); + } + return this.updateManager; + }, + + /** + * Disables text selection for this element (normalized across browsers) + * @return {Ext.Element} this + */ + unselectable : function(){ + this.dom.unselectable = "on"; + this.swallowEvent("selectstart", true); + this.applyStyles("-moz-user-select:none;-khtml-user-select:none;"); + this.addClass("x-unselectable"); + return this; + }, + + /** + * Calculates the x, y to center this element on the screen + * @return {Array} The x, y values [x, y] + */ + getCenterXY : function(){ + return this.getAlignToXY(document, 'c-c'); + }, + + /** + * Centers the Element in either the viewport, or another Element. + * @param {Mixed} centerIn (optional) The element in which to center the element. + */ + center : function(centerIn){ + this.alignTo(centerIn || document, 'c-c'); + return this; + }, + + /** + * Tests various css rules/browsers to determine if this element uses a border box + * @return {Boolean} + */ + isBorderBox : function(){ + return noBoxAdjust[this.dom.tagName.toLowerCase()] || Ext.isBorderBox; + }, + + /** + * Return a box {x, y, width, height} that can be used to set another elements + * size/location to match this element. + * @param {Boolean} contentBox (optional) If true a box for the content of the element is returned. + * @param {Boolean} local (optional) If true the element's left and top are returned instead of page x/y. + * @return {Object} box An object in the format {x, y, width, height} + */ + getBox : function(contentBox, local){ + var xy; + if(!local){ + xy = this.getXY(); + }else{ + var left = parseInt(this.getStyle("left"), 10) || 0; + var top = parseInt(this.getStyle("top"), 10) || 0; + xy = [left, top]; + } + var el = this.dom, w = el.offsetWidth, h = el.offsetHeight, bx; + if(!contentBox){ + bx = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: w, height: h}; + }else{ + var l = this.getBorderWidth("l")+this.getPadding("l"); + var r = this.getBorderWidth("r")+this.getPadding("r"); + var t = this.getBorderWidth("t")+this.getPadding("t"); + var b = this.getBorderWidth("b")+this.getPadding("b"); + bx = {x: xy[0]+l, y: xy[1]+t, 0: xy[0]+l, 1: xy[1]+t, width: w-(l+r), height: h-(t+b)}; + } + bx.right = bx.x + bx.width; + bx.bottom = bx.y + bx.height; + return bx; + }, + + /** + * Returns the sum width of the padding and borders for the passed "sides". See getBorderWidth() + for more information about the sides. + * @param {String} sides + * @return {Number} + */ + getFrameWidth : function(sides, onlyContentBox){ + return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); + }, + + /** + * Sets the element's box. Use getBox() on another element to get a box obj. If animate is true then width, height, x and y will be animated concurrently. + * @param {Object} box The box to fill {x, y, width, height} + * @param {Boolean} adjust (optional) Whether to adjust for box-model issues automatically + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Ext.Element} this + */ + setBox : function(box, adjust, animate){ + var w = box.width, h = box.height; + if((adjust && !this.autoBoxAdjust) && !this.isBorderBox()){ + w -= (this.getBorderWidth("lr") + this.getPadding("lr")); + h -= (this.getBorderWidth("tb") + this.getPadding("tb")); + } + this.setBounds(box.x, box.y, w, h, this.preanim(arguments, 2)); + return this; + }, + + /** + * Forces the browser to repaint this element + * @return {Ext.Element} this + */ + repaint : function(){ + var dom = this.dom; + this.addClass("x-repaint"); + setTimeout(function(){ + Ext.get(dom).removeClass("x-repaint"); + }, 1); + return this; + }, + + /** + * Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed, + * then it returns the calculated width of the sides (see getPadding) + * @param {String} sides (optional) Any combination of l, r, t, b to get the sum of those sides + * @return {Object/Number} + */ + getMargins : function(side){ + if(!side){ + return { + top: parseInt(this.getStyle("margin-top"), 10) || 0, + left: parseInt(this.getStyle("margin-left"), 10) || 0, + bottom: parseInt(this.getStyle("margin-bottom"), 10) || 0, + right: parseInt(this.getStyle("margin-right"), 10) || 0 + }; + }else{ + return this.addStyles(side, El.margins); + } + }, + + // private + addStyles : function(sides, styles){ + var val = 0, v, w; + for(var i = 0, len = sides.length; i < len; i++){ + v = this.getStyle(styles[sides.charAt(i)]); + if(v){ + w = parseInt(v, 10); + if(w){ val += (w >= 0 ? w : -1 * w); } + } + } + return val; + }, + + /** + * Creates a proxy element of this element + * @param {String/Object} config The class name of the proxy element or a DomHelper config object + * @param {String/HTMLElement} renderTo (optional) The element or element id to render the proxy to (defaults to document.body) + * @param {Boolean} matchBox (optional) True to align and size the proxy to this element now (defaults to false) + * @return {Ext.Element} The new proxy element + */ + createProxy : function(config, renderTo, matchBox){ + config = typeof config == "object" ? + config : {tag : "div", cls: config}; + + var proxy; + if(renderTo){ + proxy = Ext.DomHelper.append(renderTo, config, true); + }else { + proxy = Ext.DomHelper.insertBefore(this.dom, config, true); + } + if(matchBox){ + proxy.setBox(this.getBox()); + } + return proxy; + }, + + /** + * Puts a mask over this element to disable user interaction. Requires core.css. + * This method can only be applied to elements which accept child nodes. + * @param {String} msg (optional) A message to display in the mask + * @param {String} msgCls (optional) A css class to apply to the msg element + * @return {Element} The mask element + */ + mask : function(msg, msgCls){ + if(this.getStyle("position") == "static"){ + this.setStyle("position", "relative"); + } + if(this._maskMsg){ + this._maskMsg.remove(); + } + if(this._mask){ + this._mask.remove(); + } + + this._mask = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask"}, true); + + this.addClass("x-masked"); + this._mask.setDisplayed(true); + if(typeof msg == 'string'){ + this._maskMsg = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask-msg", cn:{tag:'div'}}, true); + var mm = this._maskMsg; + mm.dom.className = msgCls ? "ext-el-mask-msg " + msgCls : "ext-el-mask-msg"; + mm.dom.firstChild.innerHTML = msg; + mm.setDisplayed(true); + mm.center(this); + } + if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && this.getStyle('height') == 'auto'){ // ie will not expand full height automatically + this._mask.setSize(this.dom.clientWidth, this.getHeight()); + } + return this._mask; + }, + + /** + * Removes a previously applied mask. + */ + unmask : function(){ + if(this._mask){ + if(this._maskMsg){ + this._maskMsg.remove(); + delete this._maskMsg; + } + this._mask.remove(); + delete this._mask; + } + this.removeClass("x-masked"); + }, + + /** + * Returns true if this element is masked + * @return {Boolean} + */ + isMasked : function(){ + return this._mask && this._mask.isVisible(); + }, + + /** + * Creates an iframe shim for this element to keep selects and other windowed objects from + * showing through. + * @return {Ext.Element} The new shim element + */ + createShim : function(){ + var el = document.createElement('iframe'); + el.frameBorder = 'no'; + el.className = 'ext-shim'; + if(Ext.isIE && Ext.isSecure){ + el.src = Ext.SSL_SECURE_URL; + } + var shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); + shim.autoBoxAdjust = false; + return shim; + }, + + /** + * Removes this element from the DOM and deletes it from the cache + */ + remove : function(){ + Ext.removeNode(this.dom); + delete El.cache[this.dom.id]; + }, + + /** + * Sets up event handlers to call the passed functions when the mouse is over this element. Automatically + * filters child element mouse events. + * @param {Function} overFn + * @param {Function} outFn + * @param {Object} scope (optional) + * @return {Ext.Element} this + */ + hover : function(overFn, outFn, scope){ + var preOverFn = function(e){ + if(!e.within(this, true)){ + overFn.apply(scope || this, arguments); + } + }; + var preOutFn = function(e){ + if(!e.within(this, true)){ + outFn.apply(scope || this, arguments); + } + }; + this.on("mouseover", preOverFn, this.dom); + this.on("mouseout", preOutFn, this.dom); + return this; + }, + + /** + * Sets up event handlers to add and remove a css class when the mouse is over this element + * @param {String} className + * @param {Boolean} preventFlicker (optional) If set to true, it prevents flickering by filtering + * mouseout events for children elements + * @return {Ext.Element} this + */ + addClassOnOver : function(className, preventFlicker){ + this.hover( + function(){ + Ext.fly(this, '_internal').addClass(className); + }, + function(){ + Ext.fly(this, '_internal').removeClass(className); + } + ); + return this; + }, + + /** + * Sets up event handlers to add and remove a css class when this element has the focus + * @param {String} className + * @return {Ext.Element} this + */ + addClassOnFocus : function(className){ + this.on("focus", function(){ + Ext.fly(this, '_internal').addClass(className); + }, this.dom); + this.on("blur", function(){ + Ext.fly(this, '_internal').removeClass(className); + }, this.dom); + return this; + }, + /** + * Sets up event handlers to add and remove a css class when the mouse is down and then up on this element (a click effect) + * @param {String} className + * @return {Ext.Element} this + */ + addClassOnClick : function(className){ + var dom = this.dom; + this.on("mousedown", function(){ + Ext.fly(dom, '_internal').addClass(className); + var d = Ext.getDoc(); + var fn = function(){ + Ext.fly(dom, '_internal').removeClass(className); + d.removeListener("mouseup", fn); + }; + d.on("mouseup", fn); + }); + return this; + }, + + /** + * Stops the specified event from bubbling and optionally prevents the default action + * @param {String} eventName + * @param {Boolean} preventDefault (optional) true to prevent the default action too + * @return {Ext.Element} this + */ + swallowEvent : function(eventName, preventDefault){ + var fn = function(e){ + e.stopPropagation(); + if(preventDefault){ + e.preventDefault(); + } + }; + if(eventName instanceof Array){ + for(var i = 0, len = eventName.length; i < len; i++){ + this.on(eventName[i], fn); + } + return this; + } + this.on(eventName, fn); + return this; + }, + + /** + * Gets the parent node for this element, optionally chaining up trying to match a selector + * @param {String} selector (optional) Find a parent node that matches the passed simple selector + * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element + * @return {Ext.Element/HTMLElement} The parent node or null + */ + parent : function(selector, returnDom){ + return this.matchNode('parentNode', 'parentNode', selector, returnDom); + }, + + /** + * Gets the next sibling, skipping text nodes + * @param {String} selector (optional) Find the next sibling that matches the passed simple selector + * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element + * @return {Ext.Element/HTMLElement} The next sibling or null + */ + next : function(selector, returnDom){ + return this.matchNode('nextSibling', 'nextSibling', selector, returnDom); + }, + + /** + * Gets the previous sibling, skipping text nodes + * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector + * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element + * @return {Ext.Element/HTMLElement} The previous sibling or null + */ + prev : function(selector, returnDom){ + return this.matchNode('previousSibling', 'previousSibling', selector, returnDom); + }, + + + /** + * Gets the first child, skipping text nodes + * @param {String} selector (optional) Find the next sibling that matches the passed simple selector + * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element + * @return {Ext.Element/HTMLElement} The first child or null + */ + first : function(selector, returnDom){ + return this.matchNode('nextSibling', 'firstChild', selector, returnDom); + }, + + /** + * Gets the last child, skipping text nodes + * @param {String} selector (optional) Find the previous sibling that matches the passed simple selector + * @param {Boolean} returnDom (optional) True to return a raw dom node instead of an Ext.Element + * @return {Ext.Element/HTMLElement} The last child or null + */ + last : function(selector, returnDom){ + return this.matchNode('previousSibling', 'lastChild', selector, returnDom); + }, + + matchNode : function(dir, start, selector, returnDom){ + var n = this.dom[start]; + while(n){ + if(n.nodeType == 1 && (!selector || Ext.DomQuery.is(n, selector))){ + return !returnDom ? Ext.get(n) : n; + } + n = n[dir]; + } + return null; + }, + + /** + * Appends the passed element(s) to this element + * @param {String/HTMLElement/Array/Element/CompositeElement} el + * @return {Ext.Element} this + */ + appendChild: function(el){ + el = Ext.get(el); + el.appendTo(this); + return this; + }, + + /** + * Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element. + * @param {Object} config DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be + * automatically generated with the specified attributes. + * @param {HTMLElement} insertBefore (optional) a child element of this element + * @param {Boolean} returnDom (optional) true to return the dom node instead of creating an Element + * @return {Ext.Element} The new child element + */ + createChild: function(config, insertBefore, returnDom){ + config = config || {tag:'div'}; + if(insertBefore){ + return Ext.DomHelper.insertBefore(insertBefore, config, returnDom !== true); + } + return Ext.DomHelper[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); + }, + + /** + * Appends this element to the passed element + * @param {Mixed} el The new parent element + * @return {Ext.Element} this + */ + appendTo: function(el){ + el = Ext.getDom(el); + el.appendChild(this.dom); + return this; + }, + + /** + * Inserts this element before the passed element in the DOM + * @param {Mixed} el The element to insert before + * @return {Ext.Element} this + */ + insertBefore: function(el){ + el = Ext.getDom(el); + el.parentNode.insertBefore(this.dom, el); + return this; + }, + + /** + * Inserts this element after the passed element in the DOM + * @param {Mixed} el The element to insert after + * @return {Ext.Element} this + */ + insertAfter: function(el){ + el = Ext.getDom(el); + el.parentNode.insertBefore(this.dom, el.nextSibling); + return this; + }, + + /** + * Inserts (or creates) an element (or DomHelper config) as the first child of the this element + * @param {Mixed/Object} el The id or element to insert or a DomHelper config to create and insert + * @return {Ext.Element} The new child + */ + insertFirst: function(el, returnDom){ + el = el || {}; + if(typeof el == 'object' && !el.nodeType){ // dh config + return this.createChild(el, this.dom.firstChild, returnDom); + }else{ + el = Ext.getDom(el); + this.dom.insertBefore(el, this.dom.firstChild); + return !returnDom ? Ext.get(el) : el; + } + }, + + /** + * Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element + * @param {Mixed/Object/Array} el The id, element to insert or a DomHelper config to create and insert *or* an array of any of those. + * @param {String} where (optional) 'before' or 'after' defaults to before + * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element + * @return {Ext.Element} the inserted Element + */ + insertSibling: function(el, where, returnDom){ + var rt; + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++){ + rt = this.insertSibling(el[i], where, returnDom); + } + return rt; + } + where = where ? where.toLowerCase() : 'before'; + el = el || {}; + var refNode = where == 'before' ? this.dom : this.dom.nextSibling; + + if(typeof el == 'object' && !el.nodeType){ // dh config + if(where == 'after' && !this.dom.nextSibling){ + rt = Ext.DomHelper.append(this.dom.parentNode, el, !returnDom); + }else{ + rt = Ext.DomHelper[where == 'after' ? 'insertAfter' : 'insertBefore'](this.dom, el, !returnDom); + } + + }else{ + rt = this.dom.parentNode.insertBefore(Ext.getDom(el), refNode); + if(!returnDom){ + rt = Ext.get(rt); + } + } + return rt; + }, + + /** + * Creates and wraps this element with another element + * @param {Object} config (optional) DomHelper element config object for the wrapper element or null for an empty div + * @param {Boolean} returnDom (optional) True to return the raw DOM element instead of Ext.Element + * @return {HTMLElement/Element} The newly created wrapper element + */ + wrap: function(config, returnDom){ + if(!config){ + config = {tag: "div"}; + } + var newEl = Ext.DomHelper.insertBefore(this.dom, config, !returnDom); + newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); + return newEl; + }, + + /** + * Replaces the passed element with this element + * @param {Mixed} el The element to replace + * @return {Ext.Element} this + */ + replace: function(el){ + el = Ext.get(el); + this.insertBefore(el); + el.remove(); + return this; + }, + + /** + * Replaces this element with the passed element + * @param {Mixed/Object} el The new element or a DomHelper config of an element to create + * @return {Ext.Element} this + */ + replaceWith: function(el){ + if(typeof el == 'object' && !el.nodeType){ // dh config + el = this.insertSibling(el, 'before'); + }else{ + el = Ext.getDom(el); + this.dom.parentNode.insertBefore(el, this.dom); + } + El.uncache(this.id); + this.dom.parentNode.removeChild(this.dom); + this.dom = el; + this.id = Ext.id(el); + El.cache[this.id] = this; + return this; + }, + + /** + * Inserts an html fragment into this element + * @param {String} where Where to insert the html in relation to the this element - beforeBegin, afterBegin, beforeEnd, afterEnd. + * @param {String} html The HTML fragment + * @param {Boolean} returnEl True to return an Ext.Element + * @return {HTMLElement/Ext.Element} The inserted node (or nearest related if more than 1 inserted) + */ + insertHtml : function(where, html, returnEl){ + var el = Ext.DomHelper.insertHtml(where, this.dom, html); + return returnEl ? Ext.get(el) : el; + }, + + /** + * Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function) + * @param {Object} o The object with the attributes + * @param {Boolean} useSet (optional) false to override the default setAttribute to use expandos. + * @return {Ext.Element} this + */ + set : function(o, useSet){ + var el = this.dom; + useSet = typeof useSet == 'undefined' ? (el.setAttribute ? true : false) : useSet; + for(var attr in o){ + if(attr == "style" || typeof o[attr] == "function") continue; + if(attr=="cls"){ + el.className = o["cls"]; + }else if(o.hasOwnProperty(attr)){ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + if(o.style){ + Ext.DomHelper.applyStyles(el, o.style); + } + return this; + }, + + /** + * Convenience method for constructing a KeyMap + * @param {Number/Array/Object/String} key Either a string with the keys to listen for, the numeric key code, array of key codes or an object with the following options: + * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)} + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function + * @return {Ext.KeyMap} The KeyMap created + */ + addKeyListener : function(key, fn, scope){ + var config; + if(typeof key != "object" || key instanceof Array){ + config = { + key: key, + fn: fn, + scope: scope + }; + }else{ + config = { + key : key.key, + shift : key.shift, + ctrl : key.ctrl, + alt : key.alt, + fn: fn, + scope: scope + }; + } + return new Ext.KeyMap(this, config); + }, + + /** + * Creates a KeyMap for this element + * @param {Object} config The KeyMap config. See {@link Ext.KeyMap} for more details + * @return {Ext.KeyMap} The KeyMap created + */ + addKeyMap : function(config){ + return new Ext.KeyMap(this, config); + }, + + /** + * Returns true if this element is scrollable. + * @return {Boolean} + */ + isScrollable : function(){ + var dom = this.dom; + return dom.scrollHeight > dom.clientHeight || dom.scrollWidth > dom.clientWidth; + }, + + /** + * Scrolls this element the specified scroll point. It does NOT do bounds checking so if you scroll to a weird value it will try to do it. For auto bounds checking, use scroll(). + * @param {String} side Either "left" for scrollLeft values or "top" for scrollTop values. + * @param {Number} value The new scroll value + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Element} this + */ + scrollTo : function(side, value, animate){ + var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop"; + if(!animate || !A){ + this.dom[prop] = value; + }else{ + var to = prop == "scrollLeft" ? [value, this.dom.scrollTop] : [this.dom.scrollLeft, value]; + this.anim({scroll: {"to": to}}, this.preanim(arguments, 2), 'scroll'); + } + return this; + }, + + /** + * Scrolls this element the specified direction. Does bounds checking to make sure the scroll is + * within this element's scrollable range. + * @param {String} direction Possible values are: "l","left" - "r","right" - "t","top","up" - "b","bottom","down". + * @param {Number} distance How far to scroll the element in pixels + * @param {Boolean/Object} animate (optional) true for the default animation or a standard Element animation config object + * @return {Boolean} Returns true if a scroll was triggered or false if the element + * was scrolled as far as it could go. + */ + scroll : function(direction, distance, animate){ + if(!this.isScrollable()){ + return; + } + var el = this.dom; + var l = el.scrollLeft, t = el.scrollTop; + var w = el.scrollWidth, h = el.scrollHeight; + var cw = el.clientWidth, ch = el.clientHeight; + direction = direction.toLowerCase(); + var scrolled = false; + var a = this.preanim(arguments, 2); + switch(direction){ + case "l": + case "left": + if(w - l > cw){ + var v = Math.min(l + distance, w-cw); + this.scrollTo("left", v, a); + scrolled = true; + } + break; + case "r": + case "right": + if(l > 0){ + var v = Math.max(l - distance, 0); + this.scrollTo("left", v, a); + scrolled = true; + } + break; + case "t": + case "top": + case "up": + if(t > 0){ + var v = Math.max(t - distance, 0); + this.scrollTo("top", v, a); + scrolled = true; + } + break; + case "b": + case "bottom": + case "down": + if(h - t > ch){ + var v = Math.min(t + distance, h-ch); + this.scrollTo("top", v, a); + scrolled = true; + } + break; + } + return scrolled; + }, + + /** + * Translates the passed page coordinates into left/top css values for this element + * @param {Number/Array} x The page x or an array containing [x, y] + * @param {Number} y The page y + * @return {Object} An object with left and top properties. e.g. {left: (value), top: (value)} + */ + translatePoints : function(x, y){ + if(typeof x == 'object' || x instanceof Array){ + y = x[1]; x = x[0]; + } + var p = this.getStyle('position'); + var o = this.getXY(); + + var l = parseInt(this.getStyle('left'), 10); + var t = parseInt(this.getStyle('top'), 10); + + if(isNaN(l)){ + l = (p == "relative") ? 0 : this.dom.offsetLeft; + } + if(isNaN(t)){ + t = (p == "relative") ? 0 : this.dom.offsetTop; + } + + return {left: (x - o[0] + l), top: (y - o[1] + t)}; + }, + + /** + * Returns the current scroll position of the element. + * @return {Object} An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)} + */ + getScroll : function(){ + var d = this.dom, doc = document; + if(d == doc || d == doc.body){ + var l, t; + if(Ext.isIE && Ext.isStrict){ + l = doc.documentElement.scrollLeft || (doc.body.scrollLeft || 0); + t = doc.documentElement.scrollTop || (doc.body.scrollTop || 0); + }else{ + l = window.pageXOffset || (doc.body.scrollLeft || 0); + t = window.pageYOffset || (doc.body.scrollTop || 0); + } + return {left: l, top: t}; + }else{ + return {left: d.scrollLeft, top: d.scrollTop}; + } + }, + + /** + * Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values + * are convert to standard 6 digit hex color. + * @param {String} attr The css attribute + * @param {String} defaultValue The default value to use when a valid color isn't found + * @param {String} prefix (optional) defaults to #. Use an empty string when working with + * color anims. + */ + getColor : function(attr, defaultValue, prefix){ + var v = this.getStyle(attr); + if(!v || v == "transparent" || v == "inherit") { + return defaultValue; + } + var color = typeof prefix == "undefined" ? "#" : prefix; + if(v.substr(0, 4) == "rgb("){ + var rvs = v.slice(4, v.length -1).split(","); + for(var i = 0; i < 3; i++){ + var h = parseInt(rvs[i]); + var s = h.toString(16); + if(h < 16){ + s = "0" + s; + } + color += s; + } + } else { + if(v.substr(0, 1) == "#"){ + if(v.length == 4) { + for(var i = 1; i < 4; i++){ + var c = v.charAt(i); + color += c + c; + } + }else if(v.length == 7){ + color += v.substr(1); + } + } + } + return(color.length > 5 ? color.toLowerCase() : defaultValue); + }, + + /** + * Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a + * gradient background, rounded corners and a 4-way shadow. Example usage: + *
        
        +// Basic box wrap
        +Ext.get("foo").boxWrap();
        +
        +// You can also add a custom class and use CSS inheritance rules to customize the box look.
        +// 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
        +// for how to create a custom box wrap style.
        +Ext.get("foo").boxWrap().addClass("x-box-blue");
        +
        + * @param {String} class (optional) A base CSS class to apply to the containing wrapper element (defaults to 'x-box'). + * Note that there are a number of CSS rules that are dependent on this name to make the overall effect work, + * so if you supply an alternate base class, make sure you also supply all of the necessary rules. + * @return {Ext.Element} this + */ + boxWrap : function(cls){ + cls = cls || 'x-box'; + var el = Ext.get(this.insertHtml('beforeBegin', String.format('
        '+El.boxMarkup+'
        ', cls))); + el.child('.'+cls+'-mc').dom.appendChild(this.dom); + return el; + }, + + /** + * Returns the value of a namespaced attribute from the element's underlying DOM node. + * @param {String} namespace The namespace in which to look for the attribute + * @param {String} name The attribute name + * @return {String} The attribute value + */ + getAttributeNS : Ext.isIE ? function(ns, name){ + var d = this.dom; + var type = typeof d[ns+":"+name]; + if(type != 'undefined' && type != 'unknown'){ + return d[ns+":"+name]; + } + return d[name]; + } : function(ns, name){ + var d = this.dom; + return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name]; + }, + + 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); + } +}; + +var ep = El.prototype; + +/** + * Appends an event handler (shorthand for {@link #addListener}). + * @param {String} eventName The type of event to handle + * @param {Function} fn The handler function the event invokes + * @param {Object} scope (optional) The scope (this element) of the handler function + * @param {Object} options (optional) An object containing standard {@link #addListener} options + * @member Ext.Element + * @method on + */ +ep.on = ep.addListener; + // backwards compat +ep.mon = ep.addListener; + +ep.getUpdateManager = ep.getUpdater; + +/** + * Removes an event handler from this element (shorthand for {@link #removeListener}). + * @param {String} eventName the type of event to remove + * @param {Function} fn the method the event invokes + * @return {Ext.Element} this + * @member Ext.Element + * @method un + */ +ep.un = ep.removeListener; + +/** + * true to automatically adjust width and height settings for box-model issues (default to true) + */ +ep.autoBoxAdjust = true; + +// private +El.unitPattern = /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i; + +// private +El.addUnits = function(v, defaultUnit){ + if(v === "" || v == "auto"){ + return v; + } + if(v === undefined){ + return ''; + } + if(typeof v == "number" || !El.unitPattern.test(v)){ + return v + (defaultUnit || 'px'); + } + return v; +}; + +// special markup used throughout Ext when box wrapping elements +El.boxMarkup = '
        '; +/** + * Visibility mode constant - Use visibility to hide element + * @static + * @type Number + */ +El.VISIBILITY = 1; +/** + * Visibility mode constant - Use display to hide element + * @static + * @type Number + */ +El.DISPLAY = 2; + +El.borders = {l: "border-left-width", r: "border-right-width", t: "border-top-width", b: "border-bottom-width"}; +El.paddings = {l: "padding-left", r: "padding-right", t: "padding-top", b: "padding-bottom"}; +El.margins = {l: "margin-left", r: "margin-right", t: "margin-top", b: "margin-bottom"}; + + + +/** + * @private + */ +El.cache = {}; + +var docEl; + +/** + * Static method to retrieve Element objects. Uses simple caching to consistently return the same object. + * Automatically fixes if an object was recreated with the same id via AJAX or DOM. + * @param {Mixed} el The id of the node, a DOM Node or an existing Element. + * @return {Element} The Element object (or null if no matching element was found) + * @static + */ +El.get = function(el){ + var ex, elm, id; + if(!el){ return null; } + if(typeof el == "string"){ // element id + if(!(elm = document.getElementById(el))){ + return null; + } + if(ex = El.cache[el]){ + ex.dom = elm; + }else{ + ex = El.cache[el] = new El(elm); + } + return ex; + }else if(el.tagName){ // dom element + if(!(id = el.id)){ + id = Ext.id(el); + } + if(ex = El.cache[id]){ + ex.dom = el; + }else{ + ex = El.cache[id] = new El(el); + } + return ex; + }else if(el instanceof El){ + if(el != docEl){ + el.dom = document.getElementById(el.id) || el.dom; // refresh dom element in case no longer valid, + // catch case where it hasn't been appended + El.cache[el.id] = el; // in case it was created directly with Element(), let's cache it + } + return el; + }else if(el.isComposite){ + return el; + }else if(el instanceof Array){ + return El.select(el); + }else if(el == document){ + // create a bogus element object representing the document object + if(!docEl){ + var f = function(){}; + f.prototype = El.prototype; + docEl = new f(); + docEl.dom = document; + } + return docEl; + } + return null; +}; + +// private +El.uncache = function(el){ + for(var i = 0, a = arguments, len = a.length; i < len; i++) { + if(a[i]){ + delete El.cache[a[i].id || a[i]]; + } + } +}; + +// private +// Garbage collection - uncache elements/purge listeners on orphaned elements +// so we don't hold a reference and cause the browser to retain them +El.garbageCollect = function(){ + if(!Ext.enableGarbageCollector){ + clearInterval(El.collectorThread); + return; + } + for(var eid in El.cache){ + var el = El.cache[eid], d = el.dom; + // ------------------------------------------------------- + // Determining what is garbage: + // ------------------------------------------------------- + // !d + // dom node is null, definitely garbage + // ------------------------------------------------------- + // !d.parentNode + // no parentNode == direct orphan, definitely garbage + // ------------------------------------------------------- + // !d.offsetParent && !document.getElementById(eid) + // display none elements have no offsetParent so we will + // also try to look it up by it's id. However, check + // offsetParent first so we don't do unneeded lookups. + // This enables collection of elements that are not orphans + // directly, but somewhere up the line they have an orphan + // parent. + // ------------------------------------------------------- + if(!d || !d.parentNode || (!d.offsetParent && !document.getElementById(eid))){ + delete El.cache[eid]; + if(d && Ext.enableListenerCollection){ + E.purgeElement(d); + } + } + } +} +El.collectorThreadId = setInterval(El.garbageCollect, 30000); + +var flyFn = function(){}; +flyFn.prototype = El.prototype; +var _cls = new flyFn(); + +// dom is optional +El.Flyweight = function(dom){ + this.dom = dom; +}; + +El.Flyweight.prototype = _cls; +El.Flyweight.prototype.isFlyweight = true; + +El._flyweights = {}; +/** + * Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - + * the dom node can be overwritten by other code. + * @param {String/HTMLElement} el The dom node or id + * @param {String} named (optional) Allows for creation of named reusable flyweights to + * prevent conflicts (e.g. internally Ext uses "_internal") + * @static + * @return {Element} The shared Element object (or null if no matching element was found) + */ +El.fly = function(el, named){ + named = named || '_global'; + el = Ext.getDom(el); + if(!el){ + return null; + } + if(!El._flyweights[named]){ + El._flyweights[named] = new El.Flyweight(); + } + El._flyweights[named].dom = el; + return El._flyweights[named]; +}; + +/** + * Static method to retrieve Element objects. Uses simple caching to consistently return the same object. + * Automatically fixes if an object was recreated with the same id via AJAX or DOM. + * Shorthand of {@link Ext.Element#get} + * @param {Mixed} el The id of the node, a DOM Node or an existing Element. + * @return {Element} The Element object + * @member Ext + * @method get + */ +Ext.get = El.get; +/** + * Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - + * the dom node can be overwritten by other code. + * Shorthand of {@link Ext.Element#fly} + * @param {String/HTMLElement} el The dom node or id + * @param {String} named (optional) Allows for creation of named reusable flyweights to + * prevent conflicts (e.g. internally Ext uses "_internal") + * @static + * @return {Element} The shared Element object + * @member Ext + * @method fly + */ +Ext.fly = El.fly; + +// speedy lookup for elements never to box adjust +var noBoxAdjust = Ext.isStrict ? { + select:1 +} : { + input:1, select:1, textarea:1 +}; +if(Ext.isIE || Ext.isGecko){ + noBoxAdjust['button'] = 1; +} + + +Ext.EventManager.on(window, 'unload', function(){ + delete El.cache; + delete El._flyweights; +}); +})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/EventManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/EventManager.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/EventManager.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,695 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.EventManager + * Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides + * several useful events directly. + * See {@link Ext.EventObject} for more details on normalized event objects. + * @singleton + */ +Ext.EventManager = function(){ + var docReadyEvent, docReadyProcId, docReadyState = false; + var resizeEvent, resizeTask, textEvent, textSize; + var E = Ext.lib.Event; + var D = Ext.lib.Dom; + + + var fireDocReady = function(){ + if(!docReadyState){ + docReadyState = true; + Ext.isReady = true; + if(docReadyProcId){ + clearInterval(docReadyProcId); + } + if(Ext.isGecko || Ext.isOpera) { + document.removeEventListener("DOMContentLoaded", fireDocReady, false); + } + if(Ext.isIE){ + var defer = document.getElementById("ie-deferred-loader"); + if(defer){ + defer.onreadystatechange = null; + defer.parentNode.removeChild(defer); + } + } + if(docReadyEvent){ + docReadyEvent.fire(); + docReadyEvent.clearListeners(); + } + } + }; + + var initDocReady = function(){ + docReadyEvent = new Ext.util.Event(); + if(Ext.isGecko || Ext.isOpera) { + document.addEventListener("DOMContentLoaded", fireDocReady, false); + }else if(Ext.isIE){ + document.write(""); + var defer = document.getElementById("ie-deferred-loader"); + defer.onreadystatechange = function(){ + if(this.readyState == "complete"){ + fireDocReady(); + } + }; + }else if(Ext.isSafari){ + docReadyProcId = setInterval(function(){ + var rs = document.readyState; + if(rs == "complete") { + fireDocReady(); + } + }, 10); + } + // no matter what, make sure it fires on load + E.on(window, "load", fireDocReady); + }; + + var createBuffered = function(h, o){ + var task = new Ext.util.DelayedTask(h); + return function(e){ + // create new event object impl so new events don't wipe out properties + e = new Ext.EventObjectImpl(e); + task.delay(o.buffer, h, null, [e]); + }; + }; + + var createSingle = function(h, el, ename, fn){ + return function(e){ + Ext.EventManager.removeListener(el, ename, fn); + h(e); + }; + }; + + var createDelayed = function(h, o){ + return function(e){ + // create new event object impl so new events don't wipe out properties + e = new Ext.EventObjectImpl(e); + setTimeout(function(){ + h(e); + }, o.delay || 10); + }; + }; + + var listen = function(element, ename, opt, fn, scope){ + var o = (!opt || typeof opt == "boolean") ? {} : opt; + fn = fn || o.fn; scope = scope || o.scope; + var el = Ext.getDom(element); + if(!el){ + throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; + } + var h = function(e){ + e = Ext.EventObject.setEvent(e); + var t; + if(o.delegate){ + t = e.getTarget(o.delegate, el); + if(!t){ + return; + } + }else{ + t = e.target; + } + if(o.stopEvent === true){ + e.stopEvent(); + } + if(o.preventDefault === true){ + e.preventDefault(); + } + if(o.stopPropagation === true){ + e.stopPropagation(); + } + + if(o.normalized === false){ + e = e.browserEvent; + } + + fn.call(scope || el, e, t, o); + }; + if(o.delay){ + h = createDelayed(h, o); + } + if(o.single){ + h = createSingle(h, el, ename, fn); + } + if(o.buffer){ + h = createBuffered(h, o); + } + fn._handlers = fn._handlers || []; + fn._handlers.push([Ext.id(el), ename, h]); + + E.on(el, ename, h); + if(ename == "mousewheel" && el.addEventListener){ // workaround for jQuery + el.addEventListener("DOMMouseScroll", h, false); + E.on(window, 'unload', function(){ + el.removeEventListener("DOMMouseScroll", h, false); + }); + } + if(ename == "mousedown" && el == document){ // fix stopped mousedowns on the document + Ext.EventManager.stoppedMouseDownEvent.addListener(h); + } + return h; + }; + + var stopListening = function(el, ename, fn){ + var id = Ext.id(el), hds = fn._handlers, hd = fn; + if(hds){ + for(var i = 0, len = hds.length; i < len; i++){ + var h = hds[i]; + if(h[0] == id && h[1] == ename){ + hd = h[2]; + hds.splice(i, 1); + break; + } + } + } + E.un(el, ename, hd); + el = Ext.getDom(el); + if(ename == "mousewheel" && el.addEventListener){ + el.removeEventListener("DOMMouseScroll", hd, false); + } + if(ename == "mousedown" && el == document){ // fix stopped mousedowns on the document + Ext.EventManager.stoppedMouseDownEvent.removeListener(hd); + } + }; + + var propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/; + var pub = { + + /** + * Appends an event handler to an element. The shorthand version {@link #on} is equivalent. Typically you will + * use {@link Ext.Element#addListener} directly on an Element in favor of calling this version. + * @param {String/HTMLElement} el The html element or id to assign the event handler to + * @param {String} eventName The type of event to listen for + * @param {Function} handler The handler function the event invokes + * @param {Object} scope (optional) The scope in which to execute the handler + * function (the handler function's "this" context) + * @param {Object} options (optional) An object containing handler configuration properties. + * This may contain any of the following properties:
          + *
        • scope {Object} : The scope in which to execute the handler function. The handler function's "this" context.
        • + *
        • delegate {String} : A simple selector to filter the target or look for a descendant of the target
        • + *
        • stopEvent {Boolean} : True to stop the event. That is stop propagation, and prevent the default action.
        • + *
        • preventDefault {Boolean} : True to prevent the default action
        • + *
        • stopPropagation {Boolean} : True to prevent event propagation
        • + *
        • normalized {Boolean} : False to pass a browser event to the handler function instead of an Ext.EventObject
        • + *
        • delay {Number} : The number of milliseconds to delay the invocation of the handler after te event fires.
        • + *
        • single {Boolean} : True to add a handler to handle just the next firing of the event, and then remove itself.
        • + *
        • buffer {Number} : Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed + * by the specified number of milliseconds. If the event fires again within that time, the original + * handler is not invoked, but the new handler is scheduled in its place.
        • + *

        + *

        See {@link Ext.Element#addListener} for examples of how to use these options.

        + */ + addListener : function(element, eventName, fn, scope, options){ + if(typeof eventName == "object"){ + var o = eventName; + for(var e in o){ + if(propRe.test(e)){ + continue; + } + if(typeof o[e] == "function"){ + // shared options + listen(element, e, o, o[e], o.scope); + }else{ + // individual options + listen(element, e, o[e]); + } + } + return; + } + return listen(element, eventName, options, fn, scope); + }, + + /** + * Removes an event handler from an element. The shorthand version {@link #un} is equivalent. Typically + * you will use {@link Ext.Element#removeListener} directly on an Element in favor of calling this version. + * @param {String/HTMLElement} el The id or html element from which to remove the event + * @param {String} eventName The type of event + * @param {Function} fn The handler function to remove + * @return {Boolean} True if a listener was actually removed, else false + */ + removeListener : function(element, eventName, fn){ + return stopListening(element, eventName, fn); + }, + + /** + * Fires when the document is ready (before onload and before images are loaded). Can be + * accessed shorthanded as Ext.onReady(). + * @param {Function} fn The method the event invokes + * @param {Object} scope (optional) An object that becomes the scope of the handler + * @param {boolean} options (optional) An object containing standard {@link #addListener} options + */ + onDocumentReady : function(fn, scope, options){ + if(docReadyState){ // if it already fired + docReadyEvent.addListener(fn, scope, options); + docReadyEvent.fire(); + docReadyEvent.clearListeners(); + return; + } + if(!docReadyEvent){ + initDocReady(); + } + docReadyEvent.addListener(fn, scope, options); + }, + + /** + * Fires when the window is resized and provides resize event buffering (50 milliseconds), passes new viewport width and height to handlers. + * @param {Function} fn The method the event invokes + * @param {Object} scope An object that becomes the scope of the handler + * @param {boolean} options + */ + onWindowResize : function(fn, scope, options){ + if(!resizeEvent){ + resizeEvent = new Ext.util.Event(); + resizeTask = new Ext.util.DelayedTask(function(){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + }); + E.on(window, "resize", this.fireWindowResize, this); + } + resizeEvent.addListener(fn, scope, options); + }, + + // exposed only to allow manual firing + fireWindowResize : function(){ + if(resizeEvent){ + if((Ext.isIE||Ext.isAir) && resizeTask){ + resizeTask.delay(50); + }else{ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + } + } + }, + + /** + * Fires when the user changes the active text size. Handler gets called with 2 params, the old size and the new size. + * @param {Function} fn The method the event invokes + * @param {Object} scope An object that becomes the scope of the handler + * @param {boolean} options + */ + onTextResize : function(fn, scope, options){ + if(!textEvent){ + textEvent = new Ext.util.Event(); + var textEl = new Ext.Element(document.createElement('div')); + textEl.dom.className = 'x-text-resize'; + textEl.dom.innerHTML = 'X'; + textEl.appendTo(document.body); + textSize = textEl.dom.offsetHeight; + setInterval(function(){ + if(textEl.dom.offsetHeight != textSize){ + textEvent.fire(textSize, textSize = textEl.dom.offsetHeight); + } + }, this.textResizeInterval); + } + textEvent.addListener(fn, scope, options); + }, + + /** + * Removes the passed window resize listener. + * @param {Function} fn The method the event invokes + * @param {Object} scope The scope of handler + */ + removeResizeListener : function(fn, scope){ + if(resizeEvent){ + resizeEvent.removeListener(fn, scope); + } + }, + + // private + fireResize : function(){ + if(resizeEvent){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + } + }, + /** + * Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL) + */ + ieDeferSrc : false, + /** + * The frequency, in milliseconds, to check for text resize events (defaults to 50) + */ + textResizeInterval : 50 + }; + /** + * Appends an event handler to an element. Shorthand for {@link #addListener}. + * @param {String/HTMLElement} el The html element or id to assign the event handler to + * @param {String} eventName The type of event to listen for + * @param {Function} handler The handler function the event invokes + * @param {Object} scope (optional) The scope in which to execute the handler + * function (the handler function's "this" context) + * @param {Object} options (optional) An object containing standard {@link #addListener} options + * @member Ext.EventManager + * @method on + */ + pub.on = pub.addListener; + /** + * Removes an event handler from an element. Shorthand for {@link #removeListener}. + * @param {String/HTMLElement} el The id or html element from which to remove the event + * @param {String} eventName The type of event + * @param {Function} fn The handler function to remove + * @return {Boolean} True if a listener was actually removed, else false + * @member Ext.EventManager + * @method un + */ + pub.un = pub.removeListener; + + pub.stoppedMouseDownEvent = new Ext.util.Event(); + return pub; +}(); +/** + * Fires when the document is ready (before onload and before images are loaded). Shorthand of {@link Ext.EventManager#onDocumentReady}. + * @param {Function} fn The method the event invokes + * @param {Object} scope An object that becomes the scope of the handler + * @param {boolean} override If true, the obj passed in becomes + * the execution scope of the listener + * @member Ext + * @method onReady + */ +Ext.onReady = Ext.EventManager.onDocumentReady; + +Ext.onReady(function(){ + var bd = Ext.getBody(); + if(!bd){ return; } + + var cls = [ + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') + : Ext.isGecko ? "ext-gecko" + : Ext.isOpera ? "ext-opera" + : Ext.isSafari ? "ext-safari" : ""]; + + if(Ext.isMac){ + cls.push("ext-mac"); + } + if(Ext.isLinux){ + cls.push("ext-linux"); + } + if(Ext.isBorderBox){ + cls.push('ext-border-box'); + } + if(Ext.isStrict){ // add to the parent to allow for selectors like ".ext-strict .ext-ie" + var p = bd.dom.parentNode; + if(p){ + p.className += ' ext-strict'; + } + } + bd.addClass(cls.join(' ')); +}); + +/** + * @class Ext.EventObject + * EventObject exposes the Yahoo! UI Event functionality directly on the object + * passed to your event handler. It exists mostly for convenience. It also fixes the annoying null checks automatically to cleanup your code + * Example: + *
        
        + function handleClick(e){ // e is not a standard event object, it is a Ext.EventObject
        +    e.preventDefault();
        +    var target = e.getTarget();
        +    ...
        + }
        + var myDiv = Ext.get("myDiv");
        + myDiv.on("click", handleClick);
        + //or
        + Ext.EventManager.on("myDiv", 'click', handleClick);
        + Ext.EventManager.addListener("myDiv", 'click', handleClick);
        + 
        + * @singleton + */ +Ext.EventObject = function(){ + + var E = Ext.lib.Event; + + // safari keypress events for special keys return bad keycodes + var safariKeys = { + 63234 : 37, // left + 63235 : 39, // right + 63232 : 38, // up + 63233 : 40, // down + 63276 : 33, // page up + 63277 : 34, // page down + 63272 : 46, // delete + 63273 : 36, // home + 63275 : 35 // end + }; + + // normalize button clicks + var btnMap = Ext.isIE ? {1:0,4:1,2:2} : + (Ext.isSafari ? {1:0,2:1,3:2} : {0:0,1:1,2:2}); + + Ext.EventObjectImpl = function(e){ + if(e){ + this.setEvent(e.browserEvent || e); + } + }; + Ext.EventObjectImpl.prototype = { + /** The normal browser event */ + browserEvent : null, + /** The button pressed in a mouse event */ + button : -1, + /** True if the shift key was down during the event */ + shiftKey : false, + /** True if the control key was down during the event */ + ctrlKey : false, + /** True if the alt key was down during the event */ + altKey : false, + + /** Key constant @type Number */ + BACKSPACE : 8, + /** Key constant @type Number */ + TAB : 9, + /** Key constant @type Number */ + RETURN : 13, + /** Key constant @type Number */ + ENTER : 13, + /** Key constant @type Number */ + SHIFT : 16, + /** Key constant @type Number */ + CONTROL : 17, + /** Key constant @type Number */ + ESC : 27, + /** Key constant @type Number */ + SPACE : 32, + /** Key constant @type Number */ + PAGEUP : 33, + /** Key constant @type Number */ + PAGEDOWN : 34, + /** Key constant @type Number */ + END : 35, + /** Key constant @type Number */ + HOME : 36, + /** Key constant @type Number */ + LEFT : 37, + /** Key constant @type Number */ + UP : 38, + /** Key constant @type Number */ + RIGHT : 39, + /** Key constant @type Number */ + DOWN : 40, + /** Key constant @type Number */ + DELETE : 46, + /** Key constant @type Number */ + F5 : 116, + + /** @private */ + setEvent : function(e){ + if(e == this || (e && e.browserEvent)){ // already wrapped + return e; + } + this.browserEvent = e; + if(e){ + // normalize buttons + this.button = e.button ? btnMap[e.button] : (e.which ? e.which-1 : -1); + if(e.type == 'click' && this.button == -1){ + this.button = 0; + } + this.type = e.type; + this.shiftKey = e.shiftKey; + // mac metaKey behaves like ctrlKey + this.ctrlKey = e.ctrlKey || e.metaKey; + this.altKey = e.altKey; + // in getKey these will be normalized for the mac + this.keyCode = e.keyCode; + this.charCode = e.charCode; + // cache the target for the delayed and or buffered events + this.target = E.getTarget(e); + // same for XY + this.xy = E.getXY(e); + }else{ + this.button = -1; + this.shiftKey = false; + this.ctrlKey = false; + this.altKey = false; + this.keyCode = 0; + this.charCode =0; + this.target = null; + this.xy = [0, 0]; + } + return this; + }, + + /** + * Stop the event (preventDefault and stopPropagation) + */ + stopEvent : function(){ + if(this.browserEvent){ + if(this.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(this); + } + E.stopEvent(this.browserEvent); + } + }, + + /** + * Prevents the browsers default handling of the event. + */ + preventDefault : function(){ + if(this.browserEvent){ + E.preventDefault(this.browserEvent); + } + }, + + /** @private */ + isNavKeyPress : function(){ + var k = this.keyCode; + k = Ext.isSafari ? (safariKeys[k] || k) : k; + return (k >= 33 && k <= 40) || k == this.RETURN || k == this.TAB || k == this.ESC; + }, + + isSpecialKey : function(){ + var k = this.keyCode; + return (this.type == 'keypress' && this.ctrlKey) || k == 9 || k == 13 || k == 40 || k == 27 || + (k == 16) || (k == 17) || + (k >= 18 && k <= 20) || + (k >= 33 && k <= 35) || + (k >= 36 && k <= 39) || + (k >= 44 && k <= 45); + }, + /** + * Cancels bubbling of the event. + */ + stopPropagation : function(){ + if(this.browserEvent){ + if(this.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(this); + } + E.stopPropagation(this.browserEvent); + } + }, + + /** + * Gets the key code for the event. + * @return {Number} + */ + getCharCode : function(){ + return this.charCode || this.keyCode; + }, + + /** + * Returns a normalized keyCode for the event. + * @return {Number} The key code + */ + getKey : function(){ + var k = this.keyCode || this.charCode; + return Ext.isSafari ? (safariKeys[k] || k) : k; + }, + + /** + * Gets the x coordinate of the event. + * @return {Number} + */ + getPageX : function(){ + return this.xy[0]; + }, + + /** + * Gets the y coordinate of the event. + * @return {Number} + */ + getPageY : function(){ + return this.xy[1]; + }, + + /** + * Gets the time of the event. + * @return {Number} + */ + getTime : function(){ + if(this.browserEvent){ + return E.getTime(this.browserEvent); + } + return null; + }, + + /** + * Gets the page coordinates of the event. + * @return {Array} The xy values like [x, y] + */ + getXY : function(){ + return this.xy; + }, + + /** + * Gets the target for the event. + * @param {String} selector (optional) A simple selector to filter the target or look for an ancestor of the target + * @param {Number/Mixed} maxDepth (optional) The max depth to + search as a number or element (defaults to 10 || document.body) + * @param {Boolean} returnEl (optional) True to return a Ext.Element object instead of DOM node + * @return {HTMLelement} + */ + getTarget : function(selector, maxDepth, returnEl){ + var t = Ext.get(this.target); + return selector ? t.findParent(selector, maxDepth, returnEl) : (returnEl ? t : this.target); + }, + + /** + * Gets the related target. + * @return {HTMLElement} + */ + getRelatedTarget : function(){ + if(this.browserEvent){ + return E.getRelatedTarget(this.browserEvent); + } + return null; + }, + + /** + * Normalizes mouse wheel delta across browsers + * @return {Number} The delta + */ + getWheelDelta : function(){ + var e = this.browserEvent; + var delta = 0; + if(e.wheelDelta){ /* IE/Opera. */ + delta = e.wheelDelta/120; + }else if(e.detail){ /* Mozilla case. */ + delta = -e.detail/3; + } + return delta; + }, + + /** + * Returns true if the control, meta, shift or alt key was pressed during this event. + * @return {Boolean} + */ + hasModifier : function(){ + return ((this.ctrlKey || this.altKey) || this.shiftKey) ? true : false; + }, + + /** + * Returns true if the target of this event equals el or is a child of el + * @param {Mixed} el + * @param {Boolean} related (optional) true to test if the related target is within el instead of the target + * @return {Boolean} + */ + within : function(el, related){ + var t = this[related ? "getRelatedTarget" : "getTarget"](); + return t && Ext.fly(el).contains(t); + }, + + getPoint : function(){ + return new Ext.lib.Point(this.xy[0], this.xy[1]); + } + }; + + return new Ext.EventObjectImpl(); +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Ext.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Ext.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Ext.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,836 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + + +Ext = {version: '2.0'}; + +// for old browsers +window["undefined"] = window["undefined"]; + +/** + * @class Ext + * Ext core utilities and functions. + * @singleton + */ + +/** + * Copies all the properties of config to obj. + * @param {Object} obj The receiver of the properties + * @param {Object} config The source of the properties + * @param {Object} defaults A different object that will also be applied for default values + * @return {Object} returns obj + * @member Ext apply + */ +Ext.apply = function(o, c, defaults){ + if(defaults){ + // no "this" reference for friendly out of scope calls + Ext.apply(o, defaults); + } + if(o && c && typeof c == 'object'){ + for(var p in c){ + o[p] = c[p]; + } + } + return o; +}; + +(function(){ + var idSeed = 0; + var ua = navigator.userAgent.toLowerCase(); + + var isStrict = document.compatMode == "CSS1Compat", + isOpera = ua.indexOf("opera") > -1, + isSafari = (/webkit|khtml/).test(ua), + isIE = !isOpera && ua.indexOf("msie") > -1, + isIE7 = !isOpera && ua.indexOf("msie 7") > -1, + isGecko = !isSafari && ua.indexOf("gecko") > -1, + isBorderBox = isIE && !isStrict, + isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1), + isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1), + isLinux = (ua.indexOf("linux") != -1), + isSecure = window.location.href.toLowerCase().indexOf("https") === 0; + + // remove css image flicker + if(isIE && !isIE7){ + try{ + document.execCommand("BackgroundImageCache", false, true); + }catch(e){} + } + + Ext.apply(Ext, { + /** + * True if the browser is in strict mode + * @type Boolean + */ + isStrict : isStrict, + /** + * True if the page is running over SSL + * @type Boolean + */ + isSecure : isSecure, + /** + * True when the document is fully initialized and ready for action + * @type Boolean + */ + isReady : false, + + /** + * True to automatically uncache orphaned Ext.Elements periodically (defaults to true) + * @type Boolean + */ + enableGarbageCollector : true, + + /** + * True to automatically purge event listeners after uncaching an element (defaults to false). + * Note: this only happens if enableGarbageCollector is true. + * @type Boolean + */ + enableListenerCollection:false, + + + /** + * URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent + * the IE insecure content warning (defaults to javascript:false). + * @type String + */ + SSL_SECURE_URL : "javascript:false", + + /** + * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. (Defaults to + * "http://extjs.com/s.gif" and you should change this to a URL on your server). + * @type String + */ + BLANK_IMAGE_URL : "http:/"+"/extjs.com/s.gif", + + /** + * A reusable empty function + * @property + * @type Function + */ + emptyFn : function(){}, + + /** + * Copies all the properties of config to obj if they don't already exist. + * @param {Object} obj The receiver of the properties + * @param {Object} config The source of the properties + * @return {Object} returns obj + */ + applyIf : function(o, c){ + if(o && c){ + for(var p in c){ + if(typeof o[p] == "undefined"){ o[p] = c[p]; } + } + } + return o; + }, + + /** + * Applies event listeners to elements by selectors when the document is ready. + * The event name is specified with an @ suffix. +
        
        +Ext.addBehaviors({
        +   // add a listener for click on all anchors in element with id foo
        +   '#foo a@click' : function(e, t){
        +       // do something
        +   },
        +
        +   // add the same listener to multiple selectors (separated by comma BEFORE the @)
        +   '#foo a, #bar span.some-class@mouseover' : function(){
        +       // do something
        +   }
        +});
        +
        + * @param {Object} obj The list of behaviors to apply + */ + addBehaviors : function(o){ + if(!Ext.isReady){ + Ext.onReady(function(){ + Ext.addBehaviors(o); + }); + return; + } + var cache = {}; // simple cache for applying multiple behaviors to same selector does query multiple times + for(var b in o){ + var parts = b.split('@'); + if(parts[1]){ // for Object prototype breakers + var s = parts[0]; + if(!cache[s]){ + cache[s] = Ext.select(s); + } + cache[s].on(parts[1], o[b]); + } + } + cache = null; + }, + + /** + * Generates unique ids. If the element already has an id, it is unchanged + * @param {Mixed} el (optional) The element to generate an id for + * @param {String} prefix (optional) Id prefix (defaults "ext-gen") + * @return {String} The generated Id. + */ + id : function(el, prefix){ + prefix = prefix || "ext-gen"; + el = Ext.getDom(el); + var id = prefix + (++idSeed); + return el ? (el.id ? el.id : (el.id = id)) : id; + }, + + /** + * Extends one class with another class and optionally overrides members with the passed literal. This class + * also adds the function "override()" to the class that can be used to override + * members on an instance. + * @param {Object} subclass The class inheriting the functionality + * @param {Object} superclass The class being extended + * @param {Object} overrides (optional) A literal with members + * @method extend + */ + extend : function(){ + // inline overrides + var io = function(o){ + for(var m in o){ + this[m] = o[m]; + } + }; + return function(sb, sp, overrides){ + if(typeof sp == 'object'){ + overrides = sp; + sp = sb; + sb = function(){sp.apply(this, arguments);}; + } + var F = function(){}, sbp, spp = sp.prototype; + F.prototype = spp; + sbp = sb.prototype = new F(); + sbp.constructor=sb; + sb.superclass=spp; + if(spp.constructor == Object.prototype.constructor){ + spp.constructor=sp; + } + sb.override = function(o){ + Ext.override(sb, o); + }; + sbp.override = io; + Ext.override(sb, overrides); + return sb; + }; + }(), + + /** + * Adds a list of functions to the prototype of an existing class, overwriting any existing methods with the same name. + * Usage:
        
        +Ext.override(MyClass, {
        +    newMethod1: function(){
        +        // etc.
        +    },
        +    newMethod2: function(foo){
        +        // etc.
        +    }
        +});
        + 
        + * @param {Object} origclass The class to override + * @param {Object} overrides The list of functions to add to origClass. This should be specified as an object literal + * containing one or more methods. + * @method override + */ + override : function(origclass, overrides){ + if(overrides){ + var p = origclass.prototype; + for(var method in overrides){ + p[method] = overrides[method]; + } + } + }, + + /** + * Creates namespaces to be used for scoping variables and classes so that they are not global. Usage: + *
        
        +Ext.namespace('Company', 'Company.data');
        +Company.Widget = function() { ... }
        +Company.data.CustomStore = function(config) { ... }
        +
        + * @param {String} namespace1 + * @param {String} namespace2 + * @param {String} etc + * @method namespace + */ + namespace : function(){ + var a=arguments, o=null, i, j, d, rt; + for (i=0; i + *
      • string: If the object passed is a string
      • + *
      • number: If the object passed is a number
      • + *
      • boolean: If the object passed is a boolean value
      • + *
      • function: If the object passed is a function reference
      • + *
      • object: If the object passed is an object
      • + *
      • array: If the object passed is an array
      • + *
      • regexp: If the object passed is a regular expression
      • + *
      • element: If the object passed is a DOM Element
      • + *
      • nodelist: If the object passed is a DOM NodeList
      • + *
      • textnode: If the object passed is a DOM text node and contains something other than whitespace
      • + *
      • whitespace: If the object passed is a DOM text node and contains only whitespace
      • + * @param {Mixed} object + * @return {String} + */ + type : function(o){ + if(o === undefined || o === null){ + return false; + } + if(o.htmlElement){ + return 'element'; + } + var t = typeof o; + if(t == 'object' && o.nodeName) { + switch(o.nodeType) { + case 1: return 'element'; + case 3: return (/\S/).test(o.nodeValue) ? 'textnode' : 'whitespace'; + } + } + if(t == 'object' || t == 'function') { + switch(o.constructor) { + case Array: return 'array'; + case RegExp: return 'regexp'; + } + if(typeof o.length == 'number' && typeof o.item == 'function') { + return 'nodelist'; + } + } + return t; + }, + + /** + * Returns true if the passed value is null, undefined or an empty string (optional). + * @param {Mixed} value The value to test + * @param {Boolean} allowBlank (optional) Pass true if an empty string is not considered empty + * @return {Boolean} + */ + isEmpty : function(v, allowBlank){ + return v === null || v === undefined || (!allowBlank ? v === '' : false); + }, + + value : function(v, defaultValue, allowBlank){ + return Ext.isEmpty(v, allowBlank) ? defaultValue : v; + }, + + /** @type Boolean */ + isOpera : isOpera, + /** @type Boolean */ + isSafari : isSafari, + /** @type Boolean */ + isIE : isIE, + /** @type Boolean */ + isIE6 : isIE && !isIE7, + /** @type Boolean */ + isIE7 : isIE7, + /** @type Boolean */ + isGecko : isGecko, + /** @type Boolean */ + isBorderBox : isBorderBox, + /** @type Boolean */ + isLinux : isLinux, + /** @type Boolean */ + isWindows : isWindows, + /** @type Boolean */ + isMac : isMac, + /** @type Boolean */ + isAir : !!window.htmlControl, + + /** + By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash, + you may want to set this to true. + @type Boolean + */ + useShims : ((isIE && !isIE7) || (isGecko && isMac)) + }); + + // in intellij using keyword "namespace" causes parsing errors + Ext.ns = Ext.namespace; +})(); + +Ext.ns("Ext", "Ext.util", "Ext.grid", "Ext.dd", "Ext.tree", "Ext.data", + "Ext.form", "Ext.menu", "Ext.state", "Ext.lib", "Ext.layout", "Ext.app", "Ext.ux"); + + +/** + * @class Function + * These functions are available on every Function object (any JavaScript function). + */ +Ext.apply(Function.prototype, { + /** + * Creates a callback that passes arguments[0], arguments[1], arguments[2], ... + * Call directly on any function. Example: myFunction.createCallback(myarg, myarg2) + * Will create a function that is bound to those 2 args. + * @return {Function} The new function + */ + createCallback : function(/*args...*/){ + // make args available, in function below + var args = arguments; + var method = this; + return function() { + return method.apply(window, args); + }; + }, + + /** + * Creates a delegate (callback) that sets the scope to obj. + * Call directly on any function. Example: this.myFunction.createDelegate(this) + * Will create a function that is automatically scoped to this. + * @param {Object} obj (optional) The object for which the scope is set + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Function} The new function + */ + createDelegate : function(obj, args, appendArgs){ + var method = this; + return function() { + var callArgs = args || arguments; + if(appendArgs === true){ + callArgs = Array.prototype.slice.call(arguments, 0); + callArgs = callArgs.concat(args); + }else if(typeof appendArgs == "number"){ + callArgs = Array.prototype.slice.call(arguments, 0); // copy arguments first + var applyArgs = [appendArgs, 0].concat(args); // create method call params + Array.prototype.splice.apply(callArgs, applyArgs); // splice them in + } + return method.apply(obj || window, callArgs); + }; + }, + + /** + * Calls this function after the number of millseconds specified. + * @param {Number} millis The number of milliseconds for the setTimeout call (if 0 the function is executed immediately) + * @param {Object} obj (optional) The object for which the scope is set + * @param {Array} args (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) + * @param {Boolean/Number} appendArgs (optional) if True args are appended to call args instead of overriding, + * if a number the args are inserted at the specified position + * @return {Number} The timeout id that can be used with clearTimeout + */ + defer : function(millis, obj, args, appendArgs){ + var fn = this.createDelegate(obj, args, appendArgs); + if(millis){ + return setTimeout(fn, millis); + } + fn(); + return 0; + }, + /** + * 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 + * @param {Function} fcn The function to sequence + * @param {Object} scope (optional) The scope of the passed fcn (Defaults to scope of original function or window) + * @return {Function} The new function + */ + createSequence : function(fcn, scope){ + if(typeof fcn != "function"){ + return this; + } + var method = this; + return function() { + var retval = method.apply(this || window, arguments); + fcn.apply(scope || this || window, arguments); + return retval; + }; + }, + + /** + * Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called. + * The resulting function returns the results of the original function. + * The passed fcn is called with the parameters of the original function. + * @addon + * @param {Function} fcn The function to call before the original + * @param {Object} scope (optional) The scope of the passed fcn (Defaults to scope of original function or window) + * @return {Function} The new function + */ + createInterceptor : function(fcn, scope){ + if(typeof fcn != "function"){ + return this; + } + var method = this; + return function() { + fcn.target = this; + fcn.method = method; + if(fcn.apply(scope || this || window, arguments) === false){ + return; + } + return method.apply(this || window, arguments); + }; + } +}); + +/** + * @class String + * These functions are available as static methods on the JavaScript String object. + */ +Ext.applyIf(String, { + + /** + * Escapes the passed string for ' and \ + * @param {String} string The string to escape + * @return {String} The escaped string + * @static + */ + escape : function(string) { + return string.replace(/('|\\)/g, "\\$1"); + }, + + /** + * Pads the left side of a string with a specified character. This is especially useful + * for normalizing number and date strings. Example usage: + *
        
        +var s = String.leftPad('123', 5, '0');
        +// s now contains the string: '00123'
        +
        + * @param {String} string The original string + * @param {Number} size The total length of the output string + * @param {String} char (optional) The character with which to pad the original string (defaults to empty string " ") + * @return {String} The padded string + * @static + */ + leftPad : function (val, size, ch) { + var result = new String(val); + if(ch === null || ch === undefined || ch === '') { + ch = " "; + } + while (result.length < size) { + result = ch + result; + } + return result; + }, + + /** + * Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each + * token must be unique, and must increment in the format {0}, {1}, etc. Example usage: + *
        
        +var cls = 'my-class', text = 'Some text';
        +var s = String.format('
        {1}
        ', cls, text); +// s now contains the string: '
        Some text
        ' +
        + * @param {String} string The tokenized string to be formatted + * @param {String} value1 The value to replace token {0} + * @param {String} value2 Etc... + * @return {String} The formatted string + * @static + */ + format : function(format){ + var args = Array.prototype.slice.call(arguments, 1); + return format.replace(/\{(\d+)\}/g, function(m, i){ + return args[i]; + }); + } +}); + +/** + * Utility function that allows you to easily switch a string between two alternating values. The passed value + * is compared to the current string, and if they are equal, the other value that was passed in is returned. If + * they are already different, the first value passed in is returned. Note that this method returns the new value + * but does not change the current string. + *
        
        +// alternate sort directions
        +sort = sort.toggle('ASC', 'DESC');
        +
        +// instead of conditional logic:
        +sort = (sort == 'ASC' ? 'DESC' : 'ASC');
        +
        + * @param {String} value The value to compare to the current string + * @param {String} other The new value to use if the string already equals the first value passed in + * @return {String} The new value + */ +String.prototype.toggle = function(value, other){ + return this == value ? other : value; +}; + +/** + * Trims whitespace from either end of a string, leaving spaces within the string intact. Example: + *
        
        +var s = '  foo bar  ';
        +alert('-' + s + '-');         //alerts "- foo bar -"
        +alert('-' + s.trim() + '-');  //alerts "-foo bar-"
        +
        + * @return {String} The trimmed string + */ +String.prototype.trim = function(){ + var re = /^\s+|\s+$/g; + return function(){ return this.replace(re, ""); }; +}(); +/** + * @class Number + */ +Ext.applyIf(Number.prototype, { + /** + * Checks whether or not the current number is within a desired range. If the number is already within the + * range it is returned, otherwise the min or max value is returned depending on which side of the range is + * exceeded. Note that this method returns the constrained value but does not change the current number. + * @param {Number} min The minimum number in the range + * @param {Number} max The maximum number in the range + * @return {Number} The constrained value if outside the range, otherwise the current value + */ + constrain : function(min, max){ + return Math.min(Math.max(this, min), max); + } +}); +/** + * @class Array + */ +Ext.applyIf(Array.prototype, { + /** + * Checks whether or not the specified object exists in the array. + * @param {Object} o The object to check for + * @return {Number} The index of o in the array (or -1 if it is not found) + */ + indexOf : function(o){ + for (var i = 0, len = this.length; i < len; i++){ + if(this[i] == o) return i; + } + return -1; + }, + + /** + * Removes the specified object from the array. If the object is not found nothing happens. + * @param {Object} o The object to remove + * @return {Array} this array + */ + remove : function(o){ + var index = this.indexOf(o); + if(index != -1){ + this.splice(index, 1); + } + return this; + } +}); + +/** + Returns the number of milliseconds between this date and date + @param {Date} date (optional) Defaults to now + @return {Number} The diff in milliseconds + @member Date getElapsed + */ +Date.prototype.getElapsed = function(date) { + return Math.abs((date || new Date()).getTime()-this.getTime()); +}; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Fx.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Fx.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Fx.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,1004 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + + +//Notifies Element that fx methods are available +Ext.enableFx = true; + +/** + * @class Ext.Fx + *

        A class to provide basic animation and visual effects support. Note: This class is automatically applied + * to the {@link Ext.Element} interface when included, so all effects calls should be performed via Element. + * Conversely, since the effects are not actually defined in Element, Ext.Fx must be included in order for the + * Element effects to work.


        + * + *

        It is important to note that although the Fx methods and many non-Fx Element methods support "method chaining" in that + * they return the Element object itself as the method return value, it is not always possible to mix the two in a single + * method chain. The Fx methods use an internal effects queue so that each effect can be properly timed and sequenced. + * Non-Fx methods, on the other hand, have no such internal queueing and will always execute immediately. For this reason, + * while it may be possible to mix certain Fx and non-Fx method calls in a single chain, it may not always provide the + * expected results and should be done with care.


        + * + *

        Motion effects support 8-way anchoring, meaning that you can choose one of 8 different anchor points on the Element + * that will serve as either the start or end point of the animation. Following are all of the supported anchor positions:

        +
        +Value  Description
        +-----  -----------------------------
        +tl     The top left corner
        +t      The center of the top edge
        +tr     The top right corner
        +l      The center of the left edge
        +r      The center of the right edge
        +bl     The bottom left corner
        +b      The center of the bottom edge
        +br     The bottom right corner
        +
        + * Although some Fx methods accept specific custom config parameters, the ones shown in the Config Options section + * below are common options that can be passed to any Fx method. + * + * @cfg {Function} callback A function called when the effect is finished. Note that effects are queued internally by the + * Fx class, so do not need to use the callback parameter to specify another effect -- effects can simply be chained together + * and called in sequence (e.g., el.slideIn().highlight();). The callback is intended for any additional code that should + * run once a particular effect has completed. + * @cfg {Object} scope The scope of the effect function + * @cfg {String} easing A valid Easing value for the effect + * @cfg {String} afterCls A css class to apply after the effect + * @cfg {Number} duration The length of time (in seconds) that the effect should last + * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes + * @cfg {Boolean} useDisplay Whether to use the display CSS property instead of visibility when hiding Elements (only applies to + * effects that end with the element being visually hidden, ignored otherwise) + * @cfg {String/Object/Function} afterStyle A style specification string, e.g. "width:100px", or an object in the form {width:"100px"}, or + * a function which returns such a specification that will be applied to the Element after the effect finishes + * @cfg {Boolean} block Whether the effect should block other effects from queueing while it runs + * @cfg {Boolean} concurrent Whether to allow subsequently-queued effects to run at the same time as the current effect, or to ensure that they run in sequence + * @cfg {Boolean} stopFx Whether subsequent effects should be stopped and removed after the current effect finishes + */ +Ext.Fx = { + /** + * Slides the element into view. An anchor point can be optionally passed to set the point of + * origin for the slide effect. This function automatically handles wrapping the element with + * a fixed-size container if needed. See the Fx class overview for valid anchor point options. + * Usage: + *
        
        +// default: slide the element in from the top
        +el.slideIn();
        +
        +// custom: slide the element in from the right with a 2-second duration
        +el.slideIn('r', { duration: 2 });
        +
        +// common config options shown with default values
        +el.slideIn('t', {
        +    easing: 'easeOut',
        +    duration: .5
        +});
        +
        + * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't') + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + slideIn : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + + anchor = anchor || "t"; + + // fix display to visibility + this.fixDisplay(); + + // restore values after effect + var r = this.getFxRestore(); + var b = this.getBox(); + // fixed size for slide + this.setSize(b); + + // wrap if needed + var wrap = this.fxWrap(r.pos, o, "hidden"); + + var st = this.dom.style; + st.visibility = "visible"; + st.position = "absolute"; + + // clear out temp styles after slide and unwrap + var after = function(){ + el.fxUnwrap(wrap, r.pos, o); + st.width = r.width; + st.height = r.height; + el.afterFx(o); + }; + // time to calc the positions + var a, pt = {to: [b.x, b.y]}, bw = {to: b.width}, bh = {to: b.height}; + + switch(anchor.toLowerCase()){ + case "t": + wrap.setSize(b.width, 0); + st.left = st.bottom = "0"; + a = {height: bh}; + break; + case "l": + wrap.setSize(0, b.height); + st.right = st.top = "0"; + a = {width: bw}; + break; + case "r": + wrap.setSize(0, b.height); + wrap.setX(b.right); + st.left = st.top = "0"; + a = {width: bw, points: pt}; + break; + case "b": + wrap.setSize(b.width, 0); + wrap.setY(b.bottom); + st.left = st.top = "0"; + a = {height: bh, points: pt}; + break; + case "tl": + wrap.setSize(0, 0); + st.right = st.bottom = "0"; + a = {width: bw, height: bh}; + break; + case "bl": + wrap.setSize(0, 0); + wrap.setY(b.y+b.height); + st.right = st.top = "0"; + a = {width: bw, height: bh, points: pt}; + break; + case "br": + wrap.setSize(0, 0); + wrap.setXY([b.right, b.bottom]); + st.left = st.top = "0"; + a = {width: bw, height: bh, points: pt}; + break; + case "tr": + wrap.setSize(0, 0); + wrap.setX(b.x+b.width); + st.left = st.bottom = "0"; + a = {width: bw, height: bh, points: pt}; + break; + } + this.dom.style.visibility = "visible"; + wrap.show(); + + arguments.callee.anim = wrap.fxanim(a, + o, + 'motion', + .5, + 'easeOut', after); + }); + return this; + }, + + /** + * Slides the element out of view. An anchor point can be optionally passed to set the end point + * for the slide effect. When the effect is completed, the element will be hidden (visibility = + * 'hidden') but block elements will still take up space in the document. The element must be removed + * from the DOM using the 'remove' config option if desired. This function automatically handles + * wrapping the element with a fixed-size container if needed. See the Fx class overview for valid anchor point options. + * Usage: + *
        
        +// default: slide the element out to the top
        +el.slideOut();
        +
        +// custom: slide the element out to the right with a 2-second duration
        +el.slideOut('r', { duration: 2 });
        +
        +// common config options shown with default values
        +el.slideOut('t', {
        +    easing: 'easeOut',
        +    duration: .5,
        +    remove: false,
        +    useDisplay: false
        +});
        +
        + * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't') + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + slideOut : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + + anchor = anchor || "t"; + + // restore values after effect + var r = this.getFxRestore(); + + var b = this.getBox(); + // fixed size for slide + this.setSize(b); + + // wrap if needed + var wrap = this.fxWrap(r.pos, o, "visible"); + + var st = this.dom.style; + st.visibility = "visible"; + st.position = "absolute"; + + wrap.setSize(b); + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.fxUnwrap(wrap, r.pos, o); + + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + var a, zero = {to: 0}; + switch(anchor.toLowerCase()){ + case "t": + st.left = st.bottom = "0"; + a = {height: zero}; + break; + case "l": + st.right = st.top = "0"; + a = {width: zero}; + break; + case "r": + st.left = st.top = "0"; + a = {width: zero, points: {to:[b.right, b.y]}}; + break; + case "b": + st.left = st.top = "0"; + a = {height: zero, points: {to:[b.x, b.bottom]}}; + break; + case "tl": + st.right = st.bottom = "0"; + a = {width: zero, height: zero}; + break; + case "bl": + st.right = st.top = "0"; + a = {width: zero, height: zero, points: {to:[b.x, b.bottom]}}; + break; + case "br": + st.left = st.top = "0"; + a = {width: zero, height: zero, points: {to:[b.x+b.width, b.bottom]}}; + break; + case "tr": + st.left = st.bottom = "0"; + a = {width: zero, height: zero, points: {to:[b.right, b.y]}}; + break; + } + + arguments.callee.anim = wrap.fxanim(a, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + /** + * Fades the element out while slowly expanding it in all directions. When the effect is completed, the + * element will be hidden (visibility = 'hidden') but block elements will still take up space in the document. + * The element must be removed from the DOM using the 'remove' config option if desired. + * Usage: + *
        
        +// default
        +el.puff();
        +
        +// common config options shown with default values
        +el.puff({
        +    easing: 'easeOut',
        +    duration: .5,
        +    remove: false,
        +    useDisplay: false
        +});
        +
        + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + puff : function(o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + this.clearOpacity(); + this.show(); + + // restore values after effect + var r = this.getFxRestore(); + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + st.fontSize = ''; + el.afterFx(o); + }; + + var width = this.getWidth(); + var height = this.getHeight(); + + arguments.callee.anim = this.fxanim({ + width : {to: this.adjustWidth(width * 2)}, + height : {to: this.adjustHeight(height * 2)}, + points : {by: [-(width * .5), -(height * .5)]}, + opacity : {to: 0}, + fontSize: {to:200, unit: "%"} + }, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + /** + * Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television). + * When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still + * take up space in the document. The element must be removed from the DOM using the 'remove' config option if desired. + * Usage: + *
        
        +// default
        +el.switchOff();
        +
        +// all config options shown with default values
        +el.switchOff({
        +    easing: 'easeIn',
        +    duration: .3,
        +    remove: false,
        +    useDisplay: false
        +});
        +
        + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + switchOff : function(o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + this.clearOpacity(); + this.clip(); + + // restore values after effect + var r = this.getFxRestore(); + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + this.fxanim({opacity:{to:0.3}}, null, null, .1, null, function(){ + this.clearOpacity(); + (function(){ + this.fxanim({ + height:{to:1}, + points:{by:[0, this.getHeight() * .5]} + }, o, 'motion', 0.3, 'easeIn', after); + }).defer(100, this); + }); + }); + return this; + }, + + /** + * Highlights the Element by setting a color (applies to the background-color by default, but can be + * changed using the "attr" config option) and then fading back to the original color. If no original + * color is available, you should provide the "endColor" config option which will be cleared after the animation. + * Usage: +
        
        +// default: highlight background to yellow
        +el.highlight();
        +
        +// custom: highlight foreground text to blue for 2 seconds
        +el.highlight("0000ff", { attr: 'color', duration: 2 });
        +
        +// common config options shown with default values
        +el.highlight("ffff9c", {
        +    attr: "background-color", //can be any valid CSS property (attribute) that supports a color value
        +    endColor: (current color) or "ffffff",
        +    easing: 'easeIn',
        +    duration: 1
        +});
        +
        + * @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading # (defaults to yellow: 'ffff9c') + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + highlight : function(color, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + color = color || "ffff9c"; + var attr = o.attr || "backgroundColor"; + + this.clearOpacity(); + this.show(); + + var origColor = this.getColor(attr); + var restoreColor = this.dom.style[attr]; + var endColor = (o.endColor || origColor) || "ffffff"; + + var after = function(){ + el.dom.style[attr] = restoreColor; + el.afterFx(o); + }; + + var a = {}; + a[attr] = {from: color, to: endColor}; + arguments.callee.anim = this.fxanim(a, + o, + 'color', + 1, + 'easeIn', after); + }); + return this; + }, + + /** + * Shows a ripple of exploding, attenuating borders to draw attention to an Element. + * Usage: +
        
        +// default: a single light blue ripple
        +el.frame();
        +
        +// custom: 3 red ripples lasting 3 seconds total
        +el.frame("ff0000", 3, { duration: 3 });
        +
        +// common config options shown with default values
        +el.frame("C3DAF9", 1, {
        +    duration: 1 //duration of entire animation (not each individual ripple)
        +    // Note: Easing is not configurable and will be ignored if included
        +});
        +
        + * @param {String} color (optional) The color of the border. Should be a 6 char hex color without the leading # (defaults to light blue: 'C3DAF9'). + * @param {Number} count (optional) The number of ripples to display (defaults to 1) + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + frame : function(color, count, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + color = color || "#C3DAF9"; + if(color.length == 6){ + color = "#" + color; + } + count = count || 1; + var duration = o.duration || 1; + this.show(); + + var b = this.getBox(); + var animFn = function(){ + var proxy = Ext.getBody().createChild({ + style:{ + visbility:"hidden", + position:"absolute", + "z-index":"35000", // yee haw + border:"0px solid " + color + } + }); + var scale = Ext.isBorderBox ? 2 : 1; + proxy.animate({ + top:{from:b.y, to:b.y - 20}, + left:{from:b.x, to:b.x - 20}, + borderWidth:{from:0, to:10}, + opacity:{from:1, to:0}, + height:{from:b.height, to:(b.height + (20*scale))}, + width:{from:b.width, to:(b.width + (20*scale))} + }, duration, function(){ + proxy.remove(); + if(--count > 0){ + animFn(); + }else{ + el.afterFx(o); + } + }); + }; + animFn.call(this); + }); + return this; + }, + + /** + * Creates a pause before any subsequent queued effects begin. If there are + * no effects queued after the pause it will have no effect. + * Usage: +
        
        +el.pause(1);
        +
        + * @param {Number} seconds The length of time to pause (in seconds) + * @return {Ext.Element} The Element + */ + pause : function(seconds){ + var el = this.getFxEl(); + var o = {}; + + el.queueFx(o, function(){ + setTimeout(function(){ + el.afterFx(o); + }, seconds * 1000); + }); + return this; + }, + + /** + * Fade an element in (from transparent to opaque). The ending opacity can be specified + * using the "endOpacity" config option. + * Usage: +
        
        +// default: fade in from opacity 0 to 100%
        +el.fadeIn();
        +
        +// custom: fade in from opacity 0 to 75% over 2 seconds
        +el.fadeIn({ endOpacity: .75, duration: 2});
        +
        +// common config options shown with default values
        +el.fadeIn({
        +    endOpacity: 1, //can be any value between 0 and 1 (e.g. .5)
        +    easing: 'easeOut',
        +    duration: .5
        +});
        +
        + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + fadeIn : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + this.setOpacity(0); + this.fixDisplay(); + this.dom.style.visibility = 'visible'; + var to = o.endOpacity || 1; + arguments.callee.anim = this.fxanim({opacity:{to:to}}, + o, null, .5, "easeOut", function(){ + if(to == 1){ + this.clearOpacity(); + } + el.afterFx(o); + }); + }); + return this; + }, + + /** + * Fade an element out (from opaque to transparent). The ending opacity can be specified + * using the "endOpacity" config option. Note that IE may require useDisplay:true in order + * to redisplay correctly. + * Usage: +
        
        +// default: fade out from the element's current opacity to 0
        +el.fadeOut();
        +
        +// custom: fade out from the element's current opacity to 25% over 2 seconds
        +el.fadeOut({ endOpacity: .25, duration: 2});
        +
        +// common config options shown with default values
        +el.fadeOut({
        +    endOpacity: 0, //can be any value between 0 and 1 (e.g. .5)
        +    easing: 'easeOut',
        +    duration: .5
        +    remove: false,
        +    useDisplay: false
        +});
        +
        + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + fadeOut : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, + o, null, .5, "easeOut", function(){ + if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ + this.dom.style.display = "none"; + }else{ + this.dom.style.visibility = "hidden"; + } + this.clearOpacity(); + el.afterFx(o); + }); + }); + return this; + }, + + /** + * Animates the transition of an element's dimensions from a starting height/width + * to an ending height/width. + * Usage: +
        
        +// change height and width to 100x100 pixels
        +el.scale(100, 100);
        +
        +// common config options shown with default values.  The height and width will default to
        +// the element's existing values if passed as null.
        +el.scale(
        +    [element's width],
        +    [element's height], {
        +    easing: 'easeOut',
        +    duration: .35
        +});
        +
        + * @param {Number} width The new width (pass undefined to keep the original width) + * @param {Number} height The new height (pass undefined to keep the original height) + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + scale : function(w, h, o){ + this.shift(Ext.apply({}, o, { + width: w, + height: h + })); + return this; + }, + + /** + * Animates the transition of any combination of an element's dimensions, xy position and/or opacity. + * Any of these properties not specified in the config object will not be changed. This effect + * requires that at least one new dimension, position or opacity setting must be passed in on + * the config object in order for the function to have any effect. + * Usage: +
        
        +// slide the element horizontally to x position 200 while changing the height and opacity
        +el.shift({ x: 200, height: 50, opacity: .8 });
        +
        +// common config options shown with default values.
        +el.shift({
        +    width: [element's width],
        +    height: [element's height],
        +    x: [element's x position],
        +    y: [element's y position],
        +    opacity: [element's opacity],
        +    easing: 'easeOut',
        +    duration: .35
        +});
        +
        + * @param {Object} options Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + shift : function(o){ + var el = this.getFxEl(); + o = o || {}; + el.queueFx(o, function(){ + var a = {}, w = o.width, h = o.height, x = o.x, y = o.y, op = o.opacity; + if(w !== undefined){ + a.width = {to: this.adjustWidth(w)}; + } + if(h !== undefined){ + a.height = {to: this.adjustHeight(h)}; + } + if(x !== undefined || y !== undefined){ + a.points = {to: [ + x !== undefined ? x : this.getX(), + y !== undefined ? y : this.getY() + ]}; + } + if(op !== undefined){ + a.opacity = {to: op}; + } + if(o.xy !== undefined){ + a.points = {to: o.xy}; + } + arguments.callee.anim = this.fxanim(a, + o, 'motion', .35, "easeOut", function(){ + el.afterFx(o); + }); + }); + return this; + }, + + /** + * Slides the element while fading it out of view. An anchor point can be optionally passed to set the + * ending point of the effect. + * Usage: + *
        
        +// default: slide the element downward while fading out
        +el.ghost();
        +
        +// custom: slide the element out to the right with a 2-second duration
        +el.ghost('r', { duration: 2 });
        +
        +// common config options shown with default values
        +el.ghost('b', {
        +    easing: 'easeOut',
        +    duration: .5
        +    remove: false,
        +    useDisplay: false
        +});
        +
        + * @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b') + * @param {Object} options (optional) Object literal with any of the Fx config options + * @return {Ext.Element} The Element + */ + ghost : function(anchor, o){ + var el = this.getFxEl(); + o = o || {}; + + el.queueFx(o, function(){ + anchor = anchor || "b"; + + // restore values after effect + var r = this.getFxRestore(); + var w = this.getWidth(), + h = this.getHeight(); + + var st = this.dom.style; + + var after = function(){ + if(o.useDisplay){ + el.setDisplayed(false); + }else{ + el.hide(); + } + + el.clearOpacity(); + el.setPositioning(r.pos); + st.width = r.width; + st.height = r.height; + + el.afterFx(o); + }; + + var a = {opacity: {to: 0}, points: {}}, pt = a.points; + switch(anchor.toLowerCase()){ + case "t": + pt.by = [0, -h]; + break; + case "l": + pt.by = [-w, 0]; + break; + case "r": + pt.by = [w, 0]; + break; + case "b": + pt.by = [0, h]; + break; + case "tl": + pt.by = [-w, -h]; + break; + case "bl": + pt.by = [-w, h]; + break; + case "br": + pt.by = [w, h]; + break; + case "tr": + pt.by = [w, -h]; + break; + } + + arguments.callee.anim = this.fxanim(a, + o, + 'motion', + .5, + "easeOut", after); + }); + return this; + }, + + /** + * Ensures that all effects queued after syncFx is called on the element are + * run concurrently. This is the opposite of {@link #sequenceFx}. + * @return {Ext.Element} The Element + */ + syncFx : function(){ + this.fxDefaults = Ext.apply(this.fxDefaults || {}, { + block : false, + concurrent : true, + stopFx : false + }); + return this; + }, + + /** + * Ensures that all effects queued after sequenceFx is called on the element are + * run in sequence. This is the opposite of {@link #syncFx}. + * @return {Ext.Element} The Element + */ + sequenceFx : function(){ + this.fxDefaults = Ext.apply(this.fxDefaults || {}, { + block : false, + concurrent : false, + stopFx : false + }); + return this; + }, + + /* @private */ + nextFx : function(){ + var ef = this.fxQueue[0]; + if(ef){ + ef.call(this); + } + }, + + /** + * Returns true if the element has any effects actively running or queued, else returns false. + * @return {Boolean} True if element has active effects, else false + */ + hasActiveFx : function(){ + return this.fxQueue && this.fxQueue[0]; + }, + + /** + * Stops any running effects and clears the element's internal effects queue if it contains + * any additional effects that haven't started yet. + * @return {Ext.Element} The Element + */ + stopFx : function(){ + if(this.hasActiveFx()){ + var cur = this.fxQueue[0]; + if(cur && cur.anim && cur.anim.isAnimated()){ + this.fxQueue = [cur]; // clear out others + cur.anim.stop(true); + } + } + return this; + }, + + /* @private */ + beforeFx : function(o){ + if(this.hasActiveFx() && !o.concurrent){ + if(o.stopFx){ + this.stopFx(); + return true; + } + return false; + } + return true; + }, + + /** + * Returns true if the element is currently blocking so that no other effect can be queued + * until this effect is finished, else returns false if blocking is not set. This is commonly + * used to ensure that an effect initiated by a user action runs to completion prior to the + * same effect being restarted (e.g., firing only one effect even if the user clicks several times). + * @return {Boolean} True if blocking, else false + */ + hasFxBlock : function(){ + var q = this.fxQueue; + return q && q[0] && q[0].block; + }, + + /* @private */ + queueFx : function(o, fn){ + if(!this.fxQueue){ + this.fxQueue = []; + } + if(!this.hasFxBlock()){ + Ext.applyIf(o, this.fxDefaults); + if(!o.concurrent){ + var run = this.beforeFx(o); + fn.block = o.block; + this.fxQueue.push(fn); + if(run){ + this.nextFx(); + } + }else{ + fn.call(this); + } + } + return this; + }, + + /* @private */ + fxWrap : function(pos, o, vis){ + var wrap; + if(!o.wrap || !(wrap = Ext.get(o.wrap))){ + var wrapXY; + if(o.fixPosition){ + wrapXY = this.getXY(); + } + var div = document.createElement("div"); + div.style.visibility = vis; + wrap = Ext.get(this.dom.parentNode.insertBefore(div, this.dom)); + wrap.setPositioning(pos); + if(wrap.getStyle("position") == "static"){ + wrap.position("relative"); + } + this.clearPositioning('auto'); + wrap.clip(); + wrap.dom.appendChild(this.dom); + if(wrapXY){ + wrap.setXY(wrapXY); + } + } + return wrap; + }, + + /* @private */ + fxUnwrap : function(wrap, pos, o){ + this.clearPositioning(); + this.setPositioning(pos); + if(!o.wrap){ + wrap.dom.parentNode.insertBefore(this.dom, wrap.dom); + wrap.remove(); + } + }, + + /* @private */ + getFxRestore : function(){ + var st = this.dom.style; + return {pos: this.getPositioning(), width: st.width, height : st.height}; + }, + + /* @private */ + afterFx : function(o){ + if(o.afterStyle){ + this.applyStyles(o.afterStyle); + } + if(o.afterCls){ + this.addClass(o.afterCls); + } + if(o.remove === true){ + this.remove(); + } + Ext.callback(o.callback, o.scope, [this]); + if(!o.concurrent){ + this.fxQueue.shift(); + this.nextFx(); + } + }, + + /* @private */ + getFxEl : function(){ // support for composite element fx + return Ext.get(this.dom); + }, + + /* @private */ + fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){ + animType = animType || 'run'; + opt = opt || {}; + var anim = Ext.lib.Anim[animType]( + this.dom, args, + (opt.duration || defaultDur) || .35, + (opt.easing || defaultEase) || 'easeOut', + function(){ + Ext.callback(cb, this); + }, + this + ); + opt.anim = anim; + return anim; + } +}; + +// backwords compat +Ext.Fx.resize = Ext.Fx.scale; + +//When included, Ext.Fx is automatically applied to Element so that all basic +//effects are available directly via the Element API +Ext.apply(Ext.Element.prototype, Ext.Fx); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Template.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Template.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/Template.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,239 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** +* @class Ext.Template +* Represents an HTML fragment template. Templates can be precompiled for greater performance. +* For a list of available format functions, see {@link Ext.util.Format}.
        +* Usage: +
        
        +var t = new Ext.Template(
        +    '<div name="{id}">',
        +        '<span class="{cls}">{name:trim} {value:ellipsis(10)}</span>',
        +    '</div>'
        +);
        +t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});
        +
        +* For more information see this blog post with examples: DomHelper - Create Elements using DOM, HTML fragments and Templates. +* @constructor +* @param {String/Array} html The HTML fragment or an array of fragments to join("") or multiple arguments to join("") +*/ +Ext.Template = function(html){ + var a = arguments; + if(html instanceof Array){ + html = html.join(""); + }else if(a.length > 1){ + var buf = []; + for(var i = 0, len = a.length; i < len; i++){ + if(typeof a[i] == 'object'){ + Ext.apply(this, a[i]); + }else{ + buf[buf.length] = a[i]; + } + } + html = buf.join(''); + } + /**@private*/ + this.html = html; + if(this.compiled){ + this.compile(); + } +}; +Ext.Template.prototype = { + /** + * Returns an HTML fragment of this template with the specified values applied. + * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @return {String} The HTML fragment + */ + applyTemplate : function(values){ + if(this.compiled){ + return this.compiled(values); + } + var useF = this.disableFormats !== true; + var fm = Ext.util.Format, tpl = this; + var fn = function(m, name, format, args){ + if(format && useF){ + if(format.substr(0, 5) == "this."){ + return tpl.call(format.substr(5), values[name], values); + }else{ + if(args){ + // quoted values are required for strings in compiled templates, + // but for non compiled we need to strip them + // quoted reversed for jsmin + var re = /^\s*['"](.*)["']\s*$/; + args = args.split(','); + for(var i = 0, len = args.length; i < len; i++){ + args[i] = args[i].replace(re, "$1"); + } + args = [values[name]].concat(args); + }else{ + args = [values[name]]; + } + return fm[format].apply(fm, args); + } + }else{ + return values[name] !== undefined ? values[name] : ""; + } + }; + return this.html.replace(this.re, fn); + }, + + /** + * Sets the HTML used as the template and optionally compiles it. + * @param {String} html + * @param {Boolean} compile (optional) True to compile the template (defaults to undefined) + * @return {Ext.Template} this + */ + set : function(html, compile){ + this.html = html; + this.compiled = null; + if(compile){ + this.compile(); + } + return this; + }, + + /** + * True to disable format functions (defaults to false) + * @type Boolean + */ + disableFormats : false, + + /** + * The regular expression used to match template variables + * @type RegExp + * @property + */ + re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, + + /** + * Compiles the template into an internal function, eliminating the RegEx overhead. + * @return {Ext.Template} this + */ + compile : function(){ + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + var sep = Ext.isGecko ? "+" : ","; + var fn = function(m, name, format, args){ + if(format && useF){ + args = args ? ',' + args : ""; + if(format.substr(0, 5) != "this."){ + format = "fm." + format + '('; + }else{ + format = 'this.call("'+ format.substr(5) + '", '; + args = ", values"; + } + }else{ + args= ''; format = "(values['" + name + "'] == undefined ? '' : "; + } + return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; + }; + var body; + // branched to use + in gecko and [].join() in others + if(Ext.isGecko){ + body = "this.compiled = function(values){ return '" + + this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + + "';};"; + }else{ + body = ["this.compiled = function(values){ return ['"]; + body.push(this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return this; + }, + + // private function used to call members + call : function(fnName, value, allValues){ + return this[fnName](value, allValues); + }, + + /** + * Applies the supplied values to the template and inserts the new node(s) as the first child of el. + * @param {Mixed} el The context element + * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) + * @return {HTMLElement/Ext.Element} The new node or Element + */ + insertFirst: function(el, values, returnElement){ + return this.doInsert('afterBegin', el, values, returnElement); + }, + + /** + * Applies the supplied values to the template and inserts the new node(s) before el. + * @param {Mixed} el The context element + * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) + * @return {HTMLElement/Ext.Element} The new node or Element + */ + insertBefore: function(el, values, returnElement){ + return this.doInsert('beforeBegin', el, values, returnElement); + }, + + /** + * Applies the supplied values to the template and inserts the new node(s) after el. + * @param {Mixed} el The context element + * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) + * @return {HTMLElement/Ext.Element} The new node or Element + */ + insertAfter : function(el, values, returnElement){ + return this.doInsert('afterEnd', el, values, returnElement); + }, + + /** + * Applies the supplied values to the template and appends the new node(s) to el. + * @param {Mixed} el The context element + * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) + * @return {HTMLElement/Ext.Element} The new node or Element + */ + append : function(el, values, returnElement){ + return this.doInsert('beforeEnd', el, values, returnElement); + }, + + doInsert : function(where, el, values, returnEl){ + el = Ext.getDom(el); + var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values)); + return returnEl ? Ext.get(newNode, true) : newNode; + }, + + /** + * Applies the supplied values to the template and overwrites the content of el with the new node(s). + * @param {Mixed} el The context element + * @param {Object/Array} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined) + * @return {HTMLElement/Ext.Element} The new node or Element + */ + overwrite : function(el, values, returnElement){ + el = Ext.getDom(el); + el.innerHTML = this.applyTemplate(values); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + } +}; +/** + * Alias for {@link #applyTemplate} + * @method + */ +Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; + +// backwards compat +Ext.DomHelper.Template = Ext.Template; + +/** + * Creates a template from the passed element's value (display:none textarea, preferred) or innerHTML. + * @param {String/HTMLElement} el A DOM element or its id + * @param {Object} config A configuration object + * @return {Ext.Template} The created template + * @static + */ +Ext.Template.from = function(el, config){ + el = Ext.getDom(el); + return new Ext.Template(el.value || el.innerHTML, config || ''); +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/UpdateManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/UpdateManager.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/core/UpdateManager.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,527 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Updater + * @extends Ext.util.Observable + * Provides AJAX-style update for Element object.

        + * Usage:
        + *
        
        + * // Get it from a Ext.Element object
        + * var el = Ext.get("foo");
        + * var mgr = el.getUpdater();
        + * mgr.update({
        + *     url: "http://myserver.com/index.php", 
        + *     params: {
        + *         param1: "foo",
        + *         param2: "bar"
        + *     }
        + * });
        + * ...
        + * mgr.formUpdate("myFormId", "http://myserver.com/index.php");
        + * 
        + * // or directly (returns the same Updater instance) + * var mgr = new Ext.Updater("myElementId"); + * mgr.startAutoRefresh(60, "http://myserver.com/index.php"); + * mgr.on("update", myFcnNeedsToKnow); + *
        + // short handed call directly from the element object + Ext.get("foo").load({ + url: "bar.php", + scripts: true, + params: "param1=foo&param2=bar", + text: "Loading Foo..." + }); + *
        + * @constructor + * Create new Updater directly. + * @param {Mixed} el The element to update + * @param {Boolean} forceNew (optional) By default the constructor checks to see if the passed element already has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class). + */ +Ext.Updater = function(el, forceNew){ + el = Ext.get(el); + if(!forceNew && el.updateManager){ + return el.updateManager; + } + /** + * The Element object + * @type Ext.Element + */ + this.el = el; + /** + * Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true. + * @type String + */ + this.defaultUrl = null; + + this.addEvents( + /** + * @event beforeupdate + * Fired before an update is made, return false from your handler and the update is cancelled. + * @param {Ext.Element} el + * @param {String/Object/Function} url + * @param {String/Object} params + */ + "beforeupdate", + /** + * @event update + * Fired after successful update is made. + * @param {Ext.Element} el + * @param {Object} oResponseObject The response Object + */ + "update", + /** + * @event failure + * Fired on update failure. + * @param {Ext.Element} el + * @param {Object} oResponseObject The response Object + */ + "failure" + ); + var d = Ext.Updater.defaults; + /** + * Blank page URL to use with SSL file uploads (Defaults to Ext.Updater.defaults.sslBlankUrl or "about:blank"). + * @type String + */ + this.sslBlankUrl = d.sslBlankUrl; + /** + * Whether to append unique parameter on get request to disable caching (Defaults to Ext.Updater.defaults.disableCaching or false). + * @type Boolean + */ + this.disableCaching = d.disableCaching; + /** + * Text for loading indicator (Defaults to Ext.Updater.defaults.indicatorText or '<div class="loading-indicator">Loading...</div>'). + * @type String + */ + this.indicatorText = d.indicatorText; + /** + * Whether to show indicatorText when loading (Defaults to Ext.Updater.defaults.showLoadIndicator or true). + * @type String + */ + this.showLoadIndicator = d.showLoadIndicator; + /** + * Timeout for requests or form posts in seconds (Defaults to Ext.Updater.defaults.timeout or 30 seconds). + * @type Number + */ + this.timeout = d.timeout; + + /** + * True to process scripts in the output (Defaults to Ext.Updater.defaults.loadScripts (false)). + * @type Boolean + */ + this.loadScripts = d.loadScripts; + + /** + * Transaction object of current executing transaction + */ + this.transaction = null; + + /** + * @private + */ + this.autoRefreshProcId = null; + /** + * Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + this.refreshDelegate = this.refresh.createDelegate(this); + /** + * Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + this.updateDelegate = this.update.createDelegate(this); + /** + * Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + this.formUpdateDelegate = this.formUpdate.createDelegate(this); + + if(!this.renderer){ + /** + * The renderer for this Updater. Defaults to {@link Ext.Updater.BasicRenderer}. + */ + this.renderer = new Ext.Updater.BasicRenderer(); + } + Ext.Updater.superclass.constructor.call(this); +}; + +Ext.extend(Ext.Updater, Ext.util.Observable, { + /** + * Get the Element this Updater is bound to + * @return {Ext.Element} The element + */ + getEl : function(){ + return this.el; + }, + /** + * Performs an asynchronous request, updating this element with the response. + * If params are specified it uses POST, otherwise it uses GET.

        + * NB: Due to the asynchronous nature of remote server requests, the Element + * will not have been fully updated when the function returns. To postprocess the returned + * data, use the callback option, or an update event handler. + * @param {Object} options A config object containing any of the following options:
          + *
        • url : String/Function

          The URL to + * request or a function which returns the URL.

        • + *
        • method : String

          The HTTP method to + * use. Defaults to POST if params are present, or GET if not.

        • + *
        • params : String/Object/Function

          The + * parameters to pass to the server. These may be specified as a urlencoded + * string, or as an object containing properties which represent parameters, + * or as a function, which returns an object.

        • + *
        • scripts : Boolean

          If true + * any <script> tags embedded in the response text will be extracted + * and executed. If this option is specified, the callback will be + * called after the execution of the scripts.

        • + *
        • callback : Function

          A function to + * be called when the response from the server arrives. The following + * parameters are passed:

            + *
          • el : Ext.Element

            The Element being updated.

          • + *
          • success : Boolean

            True for success, false for failure.

          • + *
          • response : XMLHttpRequest

            The XMLHttpRequest which processed the update.

          • + *
          • options : Object

            The config object passed to the update call.

          + *

        • + *
        • scope : Object

          The scope in which + * to execute the callback (The callback's this reference.) If the + * params option is a function, this scope is used for that function also.

        • + *
        • discardUrl : Boolean

          If not passed + * as false the URL of this request becomes the default URL for + * this Updater object, and will be subsequently used in {@link #refresh} + * calls.

        • + *
        • timeout : Number

          The timeout to use + * when waiting for a response.

        • + *
        • nocache : Boolean

          Only needed for GET + * requests, this option causes an extra, generated parameter to be passed + * to defeat caching.

        + *

        + * For example: +

        
        +um.update({
        +    url: "your-url.php",
        +    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
        +    callback: yourFunction,
        +    scope: yourObject, //(optional scope)  
        +    discardUrl: false, 
        +    nocache: false,
        +    text: "Loading...",
        +    timeout: 30,
        +    scripts: false // Save time by avoiding RegExp execution.
        +});
        +
        + */ + update : function(url, params, callback, discardUrl){ + if(this.fireEvent("beforeupdate", this.el, url, params) !== false){ + var method = this.method, cfg, callerScope; + if(typeof url == "object"){ // must be config object + cfg = url; + url = cfg.url; + params = params || cfg.params; + callback = callback || cfg.callback; + discardUrl = discardUrl || cfg.discardUrl; + callerScope = cfg.scope; + if(typeof cfg.method != "undefined"){method = cfg.method;}; + if(typeof cfg.nocache != "undefined"){this.disableCaching = cfg.nocache;}; + if(typeof cfg.text != "undefined"){this.indicatorText = '
        '+cfg.text+"
        ";}; + if(typeof cfg.scripts != "undefined"){this.loadScripts = cfg.scripts;}; + if(typeof cfg.timeout != "undefined"){this.timeout = cfg.timeout;}; + } + this.showLoading(); + if(!discardUrl){ + this.defaultUrl = url; + } + if(typeof url == "function"){ + url = url.call(this); + } + + method = method || (params ? "POST" : "GET"); + if(method == "GET"){ + url = this.prepareUrl(url); + } + + var o = Ext.apply(cfg ||{}, { + url : url, + params: (typeof params == "function" && callerScope) ? params.createDelegate(callerScope) : params, + success: this.processSuccess, + failure: this.processFailure, + scope: this, + callback: undefined, + timeout: (this.timeout*1000), + argument: { + "options": cfg, + "url": url, + "form": null, + "callback": callback, + "scope": callerScope || window, + "params": params + } + }); + + this.transaction = Ext.Ajax.request(o); + } + }, + + /** + * Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipart/form-data", it assumes it's a file upload. + * Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning. + * @param {String/HTMLElement} form The form Id or form element + * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used. + * @param {Boolean} reset (optional) Whether to try to reset the form after the update + * @param {Function} callback (optional) Callback when transaction is complete. The following + * parameters are passed:
          + *
        • el : Ext.Element

          The Element being updated.

        • + *
        • success : Boolean

          True for success, false for failure.

        • + *
        • response : XMLHttpRequest

          The XMLHttpRequest which processed the update.

        + */ + formUpdate : function(form, url, reset, callback){ + if(this.fireEvent("beforeupdate", this.el, form, url) !== false){ + if(typeof url == "function"){ + url = url.call(this); + } + form = Ext.getDom(form) + this.transaction = Ext.Ajax.request({ + form: form, + url:url, + success: this.processSuccess, + failure: this.processFailure, + scope: this, + timeout: (this.timeout*1000), + argument: { + "url": url, + "form": form, + "callback": callback, + "reset": reset + } + }); + this.showLoading.defer(1, this); + } + }, + + /** + * Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + */ + refresh : function(callback){ + if(this.defaultUrl == null){ + return; + } + this.update(this.defaultUrl, null, callback, true); + }, + + /** + * Set this element to auto refresh. + * @param {Number} interval How often to update (in seconds). + * @param {String/Function} url (optional) The url for this request or a function to call to get the url (Defaults to the last used url) + * @param {String/Object} params (optional) The parameters to pass as either a url encoded string "¶m1=1¶m2=2" or as an object {param1: 1, param2: 2} + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + * @param {Boolean} refreshNow (optional) Whether to execute the refresh now, or wait the interval + */ + startAutoRefresh : function(interval, url, params, callback, refreshNow){ + if(refreshNow){ + this.update(url || this.defaultUrl, params, callback, true); + } + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + } + this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000); + }, + + /** + * Stop auto refresh on this element. + */ + stopAutoRefresh : function(){ + if(this.autoRefreshProcId){ + clearInterval(this.autoRefreshProcId); + delete this.autoRefreshProcId; + } + }, + + isAutoRefreshing : function(){ + return this.autoRefreshProcId ? true : false; + }, + /** + * Called to update the element to "Loading" state. Override to perform custom action. + */ + showLoading : function(){ + if(this.showLoadIndicator){ + this.el.update(this.indicatorText); + } + }, + + /** + * Adds unique parameter to query string if disableCaching = true + * @private + */ + prepareUrl : function(url){ + if(this.disableCaching){ + var append = "_dc=" + (new Date().getTime()); + if(url.indexOf("?") !== -1){ + url += "&" + append; + }else{ + url += "?" + append; + } + } + return url; + }, + + /** + * @private + */ + processSuccess : function(response){ + this.transaction = null; + if(response.argument.form && response.argument.reset){ + try{ // put in try/catch since some older FF releases had problems with this + response.argument.form.reset(); + }catch(e){} + } + if(this.loadScripts){ + this.renderer.render(this.el, response, this, + this.updateComplete.createDelegate(this, [response])); + }else{ + this.renderer.render(this.el, response, this); + this.updateComplete(response); + } + }, + + updateComplete : function(response){ + this.fireEvent("update", this.el, response); + if(typeof response.argument.callback == "function"){ + response.argument.callback.call(response.argument.scope, this.el, true, response, response.argument.options); + } + }, + + /** + * @private + */ + processFailure : function(response){ + this.transaction = null; + this.fireEvent("failure", this.el, response); + if(typeof response.argument.callback == "function"){ + response.argument.callback.call(response.argument.scope, this.el, false, response, response.argument.options); + } + }, + + /** + * Set the content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details. + * @param {Object} renderer The object implementing the render() method + */ + setRenderer : function(renderer){ + this.renderer = renderer; + }, + + getRenderer : function(){ + return this.renderer; + }, + + /** + * Set the defaultUrl used for updates + * @param {String/Function} defaultUrl The url or a function to call to get the url + */ + setDefaultUrl : function(defaultUrl){ + this.defaultUrl = defaultUrl; + }, + + /** + * Aborts the executing transaction + */ + abort : function(){ + if(this.transaction){ + Ext.Ajax.abort(this.transaction); + } + }, + + /** + * Returns true if an update is in progress + * @return {Boolean} + */ + isUpdating : function(){ + if(this.transaction){ + return Ext.Ajax.isLoading(this.transaction); + } + return false; + } +}); + +/** + * @class Ext.Updater.defaults + * The defaults collection enables customizing the default properties of Updater + */ + Ext.Updater.defaults = { + /** + * Timeout for requests or form posts in seconds (Defaults 30 seconds). + * @type Number + */ + timeout : 30, + + /** + * True to process scripts by default (Defaults to false). + * @type Boolean + */ + loadScripts : false, + + /** + * Blank page URL to use with SSL file uploads (Defaults to "javascript:false"). + * @type String + */ + sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false"), + /** + * Whether to append unique parameter on get request to disable caching (Defaults to false). + * @type Boolean + */ + disableCaching : false, + /** + * Whether to show indicatorText when loading (Defaults to true). + * @type Boolean + */ + showLoadIndicator : true, + /** + * Text for loading indicator (Defaults to '<div class="loading-indicator">Loading...</div>'). + * @type String + */ + indicatorText : '
        Loading...
        ' + }; + +/** + * Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}). + *Usage: + *
        Ext.Updater.updateElement("my-div", "stuff.php");
        + * @param {Mixed} el The element to update + * @param {String} url The url + * @param {String/Object} params (optional) Url encoded param string or an object of name/value pairs + * @param {Object} options (optional) A config object with any of the Updater properties you want to set - for example: {disableCaching:true, indicatorText: "Loading data..."} + * @static + * @deprecated + * @member Ext.Updater + */ +Ext.Updater.updateElement = function(el, url, params, options){ + var um = Ext.get(el).getUpdater(); + Ext.apply(um, options); + um.update(url, params, options ? options.callback : null); +}; +// alias for backwards compat +Ext.Updater.update = Ext.Updater.updateElement; +/** + * @class Ext.Updater.BasicRenderer + * Default Content renderer. Updates the elements innerHTML with the responseText. + */ +Ext.Updater.BasicRenderer = function(){}; + +Ext.Updater.BasicRenderer.prototype = { + /** + * This is called when the transaction is completed and it's time to update the element - The BasicRenderer + * updates the elements innerHTML with the responseText - To perform a custom render (i.e. XML or JSON processing), + * create an object with a "render(el, response)" method and pass it to setRenderer on the Updater. + * @param {Ext.Element} el The element being rendered + * @param {Object} response The XMLHttpRequest object + * @param {Updater} updateManager The calling update manager + * @param {Function} callback A callback that will need to be called if loadScripts is true on the Updater + */ + render : function(el, response, updateManager, callback){ + el.update(response.responseText, updateManager.loadScripts, callback); + } +}; + +Ext.UpdateManager = Ext.Updater; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/ArrayReader.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/ArrayReader.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/ArrayReader.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,73 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.ArrayReader + * @extends Ext.data.DataReader + * Data reader class to create an Array of Ext.data.Record objects from an Array. + * Each element of that Array represents a row of data fields. The + * fields are pulled into a Record object using as a subscript, the mapping property + * of the field definition if it exists, or the field's ordinal position in the definition.
        + *

        + * Example code:. + *

        
        +var Employee = Ext.data.Record.create([
        +    {name: 'name', mapping: 1},         // "mapping" only needed if an "id" field is present which
        +    {name: 'occupation', mapping: 2}    // precludes using the ordinal position as the index.
        +]);
        +var myReader = new Ext.data.ArrayReader({
        +    id: 0                     // The subscript within row Array that provides an ID for the Record (optional)
        +}, Employee);
        +
        + *

        + * This would consume an Array like this: + *

        
        +[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
        +  
        + * @cfg {String} id (optional) The subscript within row Array that provides an ID for the Record + * @constructor + * Create a new ArrayReader + * @param {Object} meta Metadata configuration options. + * @param {Object} recordType Either an Array of field definition objects + * as specified to {@link Ext.data.Record#create}, + * or a {@link Ext.data.Record Record} constructor + * created using {@link Ext.data.Record#create}. + */ +Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { + /** + * Create a data block containing Ext.data.Records from an XML document. + * @param {Object} o An Array of row objects which represents the dataset. + * @return {Object} data A data block which is used by an Ext.data.Store object as + * a cache of Ext.data.Records. + */ + readRecords : function(o){ + var sid = this.meta ? this.meta.id : null; + var recordType = this.recordType, fields = recordType.prototype.fields; + var records = []; + var root = o; + for(var i = 0; i < root.length; i++){ + var n = root[i]; + var values = {}; + var id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null); + for(var j = 0, jlen = fields.length; j < jlen; j++){ + var f = fields.items[j]; + var k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j; + var v = n[k] !== undefined ? n[k] : f.defaultValue; + v = f.convert(v); + values[f.name] = v; + } + var record = new recordType(values, id); + record.json = n; + records[records.length] = record; + } + return { + records : records, + totalRecords : records.length + }; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Connection.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Connection.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Connection.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,462 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.Connection + * @extends Ext.util.Observable + * The class encapsulates a connection to the page's originating domain, allowing requests to be made + * either to a configured URL, or to a URL specified at request time.

        + *

        + * Requests made by this class are asynchronous, and will return immediately. No data from + * the server will be available to the statement immediately following the {@link #request} call. + * To process returned data, use a callback in the request options object, or an event listener.


        + *

        + * Note: If you are doing a file upload, you will not get a normal response object sent back to + * your callback or event handler. Since the upload is handled via in IFRAME, there is no XMLHttpRequest. + * The response object is created using the innerHTML of the IFRAME's document as the responseText + * property and, if present, the IFRAME's XML document as the responseXML property.


        + * This means that a valid XML or HTML document must be returned. If JSON data is required, it is suggested + * that it be placed either inside a <textarea> in an HTML document and retrieved from the responseText + * using a regex, or inside a CDATA section in an XML document and retrieved from the responseXML using + * standard DOM methods. + * @constructor + * @param {Object} config a configuration object. + */ +Ext.data.Connection = function(config){ + Ext.apply(this, config); + this.addEvents( + /** + * @event beforerequest + * Fires before a network request is made to retrieve a data object. + * @param {Connection} conn This Connection object. + * @param {Object} options The options config object passed to the {@link #request} method. + */ + "beforerequest", + /** + * @event requestcomplete + * Fires if the request was successfully completed. + * @param {Connection} conn This Connection object. + * @param {Object} response The XHR object containing the response data. + * See The XMLHttpRequest Object + * for details. + * @param {Object} options The options config object passed to the {@link #request} method. + */ + "requestcomplete", + /** + * @event requestexception + * Fires if an error HTTP status was returned from the server. + * See HTTP Status Code Definitions + * for details of HTTP status codes. + * @param {Connection} conn This Connection object. + * @param {Object} response The XHR object containing the response data. + * See The XMLHttpRequest Object + * for details. + * @param {Object} options The options config object passed to the {@link #request} method. + */ + "requestexception" + ); + Ext.data.Connection.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.Connection, Ext.util.Observable, { + /** + * @cfg {String} url (Optional) The default URL to be used for requests to the server. (defaults to undefined) + */ + /** + * @cfg {Object} extraParams (Optional) An object containing properties which are used as + * extra parameters to each request made by this object. (defaults to undefined) + */ + /** + * @cfg {Object} defaultHeaders (Optional) An object containing request headers which are added + * to each request made by this object. (defaults to undefined) + */ + /** + * @cfg {String} method (Optional) The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET) + */ + /** + * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000) + */ + timeout : 30000, + /** + * @cfg {Boolean} autoAbort (Optional) Whether this request should abort any pending requests. (defaults to false) + * @type Boolean + */ + autoAbort:false, + + /** + * @cfg {Boolean} disableCaching (Optional) True to add a unique cache-buster param to GET requests. (defaults to true) + * @type Boolean + */ + disableCaching: true, + + /** + *

        Sends an HTTP request to a remote server.

        + *

        Important: Ajax server requests are asynchronous, and this call will + * return before the response has been recieved. Process any returned data + * in a callback function. + * @param {Object} options An object which may contain the following properties:

          + *
        • url : String (Optional)

          The URL to + * which to send the request. Defaults to configured URL

        • + *
        • params : Object/String/Function (Optional)

          + * An object containing properties which are used as parameters to the + * request, a url encoded string or a function to call to get either.

        • + *
        • method : String (Optional)

          The HTTP method to use + * for the request. Defaults to the configured method, or if no method was configured, + * "GET" if no parameters are being sent, and "POST" if parameters are being sent.

        • + *
        • callback : Function (Optional)

          The + * function to be called upon receipt of the HTTP response. The callback is + * called regardless of success or failure and is passed the following + * parameters:

            + *
          • options : Object

            The parameter to the request call.

          • + *
          • success : Boolean

            True if the request succeeded.

          • + *
          • response : Object

            The XMLHttpRequest object containing the response data. See http://www.w3.org/TR/XMLHttpRequest/ for details about accessing elements of the response.

          • + *

        • + *
        • success : Function (Optional)

          The function + * to be called upon success of the request. The callback is passed the following + * parameters:

            + *
          • response : Object

            The XMLHttpRequest object containing the response data.

          • + *
          • options : Object

            The parameter to the request call.

          • + *

        • + *
        • failure : Function (Optional)

          The function + * to be called upon failure of the request. The callback is passed the + * following parameters:

            + *
          • response : Object

            The XMLHttpRequest object containing the response data.

          • + *
          • options : Object

            The parameter to the request call.

          • + *

        • + *
        • scope : Object (Optional)

          The scope in + * which to execute the callbacks: The "this" object for the callback function. + * Defaults to the browser window.

        • + *
        • form : Object/String (Optional)

          A form + * object or id to pull parameters from.

        • + *
        • isUpload : Boolean (Optional)

          True if + * the form object is a file upload (will usually be automatically detected).

        • + *
        • headers : Object (Optional)

          Request + * headers to set for the request.

        • + *
        • xmlData : Object (Optional)

          XML document + * to use for the post. Note: This will be used instead of params for the post + * data. Any params will be appended to the URL.

        • + *
        • jsonData : Object/String (Optional)

          JSON + * data to use as the post. Note: This will be used instead of params for the post + * data. Any params will be appended to the URL.

        • + *
        • disableCaching : Boolean (Optional)

          True + * to add a unique cache-buster param to GET requests.

        • + *

        + *

        The options object may also contain any other property which might be needed to perform + * postprocessing in a callback because it is passed to callback functions.

        + * @return {Number} transactionId The id of the server transaction. This may be used + * to cancel the request. + */ + request : function(o){ + if(this.fireEvent("beforerequest", this, o) !== false){ + var p = o.params; + + if(typeof p == "function"){ + p = p.call(o.scope||window, o); + } + if(typeof p == "object"){ + p = Ext.urlEncode(p); + } + if(this.extraParams){ + var extras = Ext.urlEncode(this.extraParams); + p = p ? (p + '&' + extras) : extras; + } + + var url = o.url || this.url; + if(typeof url == 'function'){ + url = url.call(o.scope||window, o); + } + + if(o.form){ + var form = Ext.getDom(o.form); + url = url || form.action; + + var enctype = form.getAttribute("enctype"); + if(o.isUpload || (enctype && enctype.toLowerCase() == 'multipart/form-data')){ + return this.doFormUpload(o, p, url); + } + var f = Ext.lib.Ajax.serializeForm(form); + p = p ? (p + '&' + f) : f; + } + + var hs = o.headers; + if(this.defaultHeaders){ + hs = Ext.apply(hs || {}, this.defaultHeaders); + if(!o.headers){ + o.headers = hs; + } + } + + var cb = { + success: this.handleResponse, + failure: this.handleFailure, + scope: this, + argument: {options: o}, + timeout : this.timeout + }; + + var method = o.method||this.method||(p ? "POST" : "GET"); + + if(method == 'GET' && (this.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ + url += (url.indexOf('?') != -1 ? '&' : '?') + '_dc=' + (new Date().getTime()); + } + + if(typeof o.autoAbort == 'boolean'){ // options gets top priority + if(o.autoAbort){ + this.abort(); + } + }else if(this.autoAbort !== false){ + this.abort(); + } + if((method == 'GET' && p) || o.xmlData || o.jsonData){ + url += (url.indexOf('?') != -1 ? '&' : '?') + p; + p = ''; + } + this.transId = Ext.lib.Ajax.request(method, url, cb, p, o); + return this.transId; + }else{ + Ext.callback(o.callback, o.scope, [o, null, null]); + return null; + } + }, + + /** + * Determine whether this object has a request outstanding. + * @param {Number} transactionId (Optional) defaults to the last transaction + * @return {Boolean} True if there is an outstanding request. + */ + isLoading : function(transId){ + if(transId){ + return Ext.lib.Ajax.isCallInProgress(transId); + }else{ + return this.transId ? true : false; + } + }, + + /** + * Aborts any outstanding request. + * @param {Number} transactionId (Optional) defaults to the last transaction + */ + abort : function(transId){ + if(transId || this.isLoading()){ + Ext.lib.Ajax.abort(transId || this.transId); + } + }, + + // private + handleResponse : function(response){ + this.transId = false; + var options = response.argument.options; + response.argument = options ? options.argument : null; + this.fireEvent("requestcomplete", this, response, options); + Ext.callback(options.success, options.scope, [response, options]); + Ext.callback(options.callback, options.scope, [options, true, response]); + }, + + // private + handleFailure : function(response, e){ + this.transId = false; + var options = response.argument.options; + response.argument = options ? options.argument : null; + this.fireEvent("requestexception", this, response, options, e); + Ext.callback(options.failure, options.scope, [response, options]); + Ext.callback(options.callback, options.scope, [options, false, response]); + }, + + // private + doFormUpload : function(o, ps, url){ + var id = Ext.id(); + var frame = document.createElement('iframe'); + frame.id = id; + frame.name = id; + frame.className = 'x-hidden'; + if(Ext.isIE){ + frame.src = Ext.SSL_SECURE_URL; + } + document.body.appendChild(frame); + + if(Ext.isIE){ + document.frames[id].name = id; + } + + var form = Ext.getDom(o.form); + form.target = id; + form.method = 'POST'; + form.enctype = form.encoding = 'multipart/form-data'; + if(url){ + form.action = url; + } + + var hiddens, hd; + if(ps){ // add dynamic params + hiddens = []; + ps = Ext.urlDecode(ps, false); + for(var k in ps){ + if(ps.hasOwnProperty(k)){ + hd = document.createElement('input'); + hd.type = 'hidden'; + hd.name = k; + hd.value = ps[k]; + form.appendChild(hd); + hiddens.push(hd); + } + } + } + + function cb(){ + var r = { // bogus response object + responseText : '', + responseXML : null + }; + + r.argument = o ? o.argument : null; + + try { // + var doc; + if(Ext.isIE){ + doc = frame.contentWindow.document; + }else { + doc = (frame.contentDocument || window.frames[id].document); + } + if(doc && doc.body){ + r.responseText = doc.body.innerHTML; + } + if(doc && doc.XMLDocument){ + r.responseXML = doc.XMLDocument; + }else { + r.responseXML = doc; + } + } + catch(e) { + // ignore + } + + Ext.EventManager.removeListener(frame, 'load', cb, this); + + this.fireEvent("requestcomplete", this, r, o); + + Ext.callback(o.success, o.scope, [r, o]); + Ext.callback(o.callback, o.scope, [o, true, r]); + + setTimeout(function(){Ext.removeNode(frame);}, 100); + } + + Ext.EventManager.on(frame, 'load', cb, this); + form.submit(); + + if(hiddens){ // remove dynamic params + for(var i = 0, len = hiddens.length; i < len; i++){ + Ext.removeNode(hiddens[i]); + } + } + } +}); + +/** + * @class Ext.Ajax + * @extends Ext.data.Connection + * Global Ajax request class. Provides a simple way to make Ajax requests with maximum flexibility. Example usage: + *
        
        +// Basic request
        +Ext.Ajax.request({
        +   url: 'foo.php',
        +   success: someFn,
        +   failure: otherFn,
        +   headers: {
        +       'my-header': 'foo'
        +   },
        +   params: { foo: 'bar' }
        +});
        +
        +// Simple ajax form submission
        +Ext.Ajax.request({
        +    form: 'some-form',
        +    params: 'foo=bar'
        +});
        +
        +// Default headers to pass in every request
        +Ext.Ajax.defaultHeaders = {
        +    'Powered-By': 'Ext'
        +};
        +
        +// Global Ajax events can be handled on every request!
        +Ext.Ajax.on('beforerequest', this.showSpinner, this);
        +
        + * @singleton + */ +Ext.Ajax = new Ext.data.Connection({ + /** + * @cfg {String} url @hide + */ + /** + * @cfg {Object} extraParams @hide + */ + /** + * @cfg {Object} defaultHeaders @hide + */ + /** + * @cfg {String} method (Optional) @hide + */ + /** + * @cfg {Number} timeout (Optional) @hide + */ + /** + * @cfg {Boolean} autoAbort (Optional) @hide + */ + + /** + * @cfg {Boolean} disableCaching (Optional) @hide + */ + + /** + * @property disableCaching + * True to add a unique cache-buster param to GET requests. (defaults to true) + * @type Boolean + */ + /** + * @property url + * The default URL to be used for requests to the server. (defaults to undefined) + * @type String + */ + /** + * @property extraParams + * An object containing properties which are used as + * extra parameters to each request made by this object. (defaults to undefined) + * @type Object + */ + /** + * @property defaultHeaders + * An object containing request headers which are added to each request made by this object. (defaults to undefined) + * @type Object + */ + /** + * @property method + * The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET) + * @type String + */ + /** + * @property timeout + * The timeout in milliseconds to be used for requests. (defaults to 30000) + * @type Number + */ + + /** + * @property autoAbort + * Whether a new request should abort any pending requests. (defaults to false) + * @type Boolean + */ + autoAbort : false, + + /** + * Serialize the passed form into a url encoded string + * @param {String/HTMLElement} form + * @return {String} + */ + serializeForm : function(form){ + return Ext.lib.Ajax.serializeForm(form); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataField.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataField.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataField.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,107 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +// private +// Field objects are not intended to be created directly, but are created +// behind the scenes when defined for Record objects. See Record.js for details. +Ext.data.Field = function(config){ + if(typeof config == "string"){ + config = {name: config}; + } + Ext.apply(this, config); + + if(!this.type){ + this.type = "auto"; + } + + var st = Ext.data.SortTypes; + // named sortTypes are supported, here we look them up + if(typeof this.sortType == "string"){ + this.sortType = st[this.sortType]; + } + + // set default sortType for strings and dates + if(!this.sortType){ + switch(this.type){ + case "string": + this.sortType = st.asUCString; + break; + case "date": + this.sortType = st.asDate; + break; + default: + this.sortType = st.none; + } + } + + // define once + var stripRe = /[\$,%]/g; + + // prebuilt conversion function for this field, instead of + // switching every time we're reading a value + if(!this.convert){ + var cv, dateFormat = this.dateFormat; + switch(this.type){ + case "": + case "auto": + case undefined: + cv = function(v){ return v; }; + break; + case "string": + cv = function(v){ return (v === undefined || v === null) ? '' : String(v); }; + break; + case "int": + cv = function(v){ + return v !== undefined && v !== null && v !== '' ? + parseInt(String(v).replace(stripRe, ""), 10) : ''; + }; + break; + case "float": + cv = function(v){ + return v !== undefined && v !== null && v !== '' ? + parseFloat(String(v).replace(stripRe, ""), 10) : ''; + }; + break; + case "bool": + case "boolean": + cv = function(v){ return v === true || v === "true" || v == 1; }; + break; + case "date": + cv = function(v){ + if(!v){ + return ''; + } + if(v instanceof Date){ + return v; + } + if(dateFormat){ + if(dateFormat == "timestamp"){ + return new Date(v*1000); + } + if(dateFormat == "time"){ + return new Date(parseInt(v, 10)); + } + return Date.parseDate(v, dateFormat); + } + var parsed = Date.parse(v); + return parsed ? new Date(parsed) : null; + }; + break; + + } + this.convert = cv; + } +}; + +Ext.data.Field.prototype = { + dateFormat: null, + defaultValue: "", + mapping: null, + sortType : null, + sortDir : "ASC" +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataProxy.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataProxy.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataProxy.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,52 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.DataProxy + * @extends Ext.util.Observable + * This class is an abstract base class for implementations which provide retrieval of + * unformatted data objects.
        + *

        + * DataProxy implementations are usually used in conjunction with an implementation of Ext.data.DataReader + * (of the appropriate type which knows how to parse the data object) to provide a block of + * {@link Ext.data.Records} to an {@link Ext.data.Store}.
        + *

        + * Custom implementations must implement the load method as described in + * {@link Ext.data.HttpProxy#load}. + */ +Ext.data.DataProxy = function(){ + this.addEvents( + /** + * @event beforeload + * Fires before a network request is made to retrieve a data object. + * @param {Object} This DataProxy object. + * @param {Object} params The params parameter to the load function. + */ + 'beforeload', + /** + * @event load + * Fires before the load method's callback is called. + * @param {Object} This DataProxy object. + * @param {Object} o The data object. + * @param {Object} arg The callback argument object passed to the load function. + */ + 'load', + /** + * @event loadexception + * Fires if an Exception occurs during data retrieval. + * @param {Object} This DataProxy object. + * @param {Object} o The data object. + * @param {Object} arg The callback argument object passed to the load function. + * @param {Object} e The Exception. + */ + 'loadexception' + ); + Ext.data.DataProxy.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.DataProxy, Ext.util.Observable); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataReader.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataReader.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/DataReader.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,35 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.DataReader + * Abstract base class for reading structured data from a data source and converting + * it into an object containing {@link Ext.data.Record} objects and metadata for use + * by an {@link Ext.data.Store}. This class is intended to be extended and should not + * be created directly. For existing implementations, see {@link Ext.data.ArrayReader}, + * {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader}. + * @constructor Create a new DataReader + * @param {Object} meta Metadata configuration options (implementation-specific) + * @param {Object} recordType Either an Array of field definition objects as specified + * in {@link Ext.data.Record#create}, or an {@link Ext.data.Record} object created + * using {@link Ext.data.Record#create}. + */ +Ext.data.DataReader = function(meta, recordType){ + /** + * This DataReader's configured metadata as passed to the constructor. + * @type Mixed + * @property meta + */ + this.meta = meta; + this.recordType = recordType instanceof Array ? + Ext.data.Record.create(recordType) : recordType; +}; + +Ext.data.DataReader.prototype = { + +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/GroupingStore.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/GroupingStore.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/GroupingStore.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,116 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.GroupingStore + * @extends Ext.data.Store + * A specialized store implementation that provides for grouping records by one of the available fields. + * @constructor + * Creates a new GroupingStore. + * @param {Object} config A config object containing the objects needed for the Store to access data, + * and read the data into Records. + */ +Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { + /** + * @cfg {String} groupField + * The field name by which to sort the store's data (defaults to ''). + */ + /** + * @cfg {Boolean} remoteGroup + * True if the grouping should apply on the server side, false if it is local only (defaults to false). If the + * grouping is local, it can be applied immediately to the data. If it is remote, then it will simply act as a + * helper, automatically sending the grouping field name as the 'groupBy' param with each XHR call. + */ + remoteGroup : false, + /** + * @cfg {Boolean} groupOnSort + * True to sort the data on the grouping field when a grouping operation occurs, false to sort based on the + * existing sort info (defaults to false). + */ + groupOnSort:false, + + /** + * Clears any existing grouping and refreshes the data using the default sort. + */ + clearGrouping : function(){ + this.groupField = false; + if(this.remoteGroup){ + if(this.baseParams){ + delete this.baseParams.groupBy; + } + this.reload(); + }else{ + this.applySort(); + this.fireEvent('datachanged', this); + } + }, + + /** + * Groups the data by the specified field. + * @param {String} field The field name by which to sort the store's data + * @param {Boolean} forceRegroup (optional) True to force the group to be refreshed even if the field passed + * in is the same as the current grouping field, false to skip grouping on the same field (defaults to false) + */ + groupBy : function(field, forceRegroup){ + if(this.groupField == field && !forceRegroup){ + return; // already grouped by this field + } + this.groupField = field; + if(this.remoteGroup){ + if(!this.baseParams){ + this.baseParams = {}; + } + this.baseParams['groupBy'] = field; + } + if(this.groupOnSort){ + this.sort(field); + return; + } + if(this.remoteGroup){ + this.reload(); + }else{ + var si = this.sortInfo || {}; + if(si.field != field){ + this.applySort(); + }else{ + this.sortData(field); + } + this.fireEvent('datachanged', this); + } + }, + + // private + applySort : function(){ + Ext.data.GroupingStore.superclass.applySort.call(this); + if(!this.groupOnSort && !this.remoteGroup){ + var gs = this.getGroupState(); + if(gs && gs != this.sortInfo.field){ + this.sortData(this.groupField); + } + } + }, + + // private + applyGrouping : function(alwaysFireChange){ + if(this.groupField !== false){ + this.groupBy(this.groupField, true); + return true; + }else{ + if(alwaysFireChange === true){ + this.fireEvent('datachanged', this); + } + return false; + } + }, + + // private + getGroupState : function(){ + return this.groupOnSort && this.groupField !== false ? + (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/HttpProxy.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/HttpProxy.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/HttpProxy.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,120 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.HttpProxy + * @extends Ext.data.DataProxy + * An implementation of {@link Ext.data.DataProxy} that reads a data object from a {@link Ext.data.Connection Connection} object + * configured to reference a certain URL.
        + *

        + * Note that this class cannot be used to retrieve data from a domain other than the domain + * from which the running page was served.
        + *

        + * For cross-domain access to remote data, use a {@link Ext.data.ScriptTagProxy ScriptTagProxy}.
        + *

        + * Be aware that to enable the browser to parse an XML document, the server must set + * the Content-Type header in the HTTP response to "text/xml". + * @constructor + * @param {Object} conn an {@link Ext.data.Connection} object, or options parameter to {@link Ext.Ajax.request}. + * If an options parameter is passed, the singleton {@link Ext.Ajax} object will be used to make the request. + */ +Ext.data.HttpProxy = function(conn){ + Ext.data.HttpProxy.superclass.constructor.call(this); + /** + * The Connection object (Or options parameter to {@link Ext.Ajax.request}) which this HttpProxy uses to make requests to the server. + * Properties of this object may be changed dynamically to change the way data is requested. + * @property + */ + this.conn = conn; + this.useAjax = !conn || !conn.events; +}; + +Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { + /** + * Return the {@link Ext.data.Connection} object being used by this Proxy. + * @return {Connection} The Connection object. This object may be used to subscribe to events on + * a finer-grained basis than the DataProxy events. + */ + getConnection : function(){ + return this.useAjax ? Ext.Ajax : this.conn; + }, + + /** + * Load data from the configured {@link Ext.data.Connection}, read the data object into + * a block of Ext.data.Records using the passed {@link Ext.data.DataReader} implementation, and + * process that block using the passed callback. + * @param {Object} params An object containing properties which are to be used as HTTP parameters + * for the request to the remote server. + * @param {Ext.data.DataReader} reader The Reader object which converts the data + * object into a block of Ext.data.Records. + * @param {Function} callback The function into which to pass the block of Ext.data.Records. + * The function must be passed

          + *
        • The Record block object
        • + *
        • The "arg" argument from the load function
        • + *
        • A boolean success indicator
        • + *
        + * @param {Object} scope The scope in which to call the callback + * @param {Object} arg An optional argument which is passed to the callback as its second parameter. + */ + load : function(params, reader, callback, scope, arg){ + if(this.fireEvent("beforeload", this, params) !== false){ + var o = { + params : params || {}, + request: { + callback : callback, + scope : scope, + arg : arg + }, + reader: reader, + callback : this.loadResponse, + scope: this + }; + if(this.useAjax){ + Ext.applyIf(o, this.conn); + if(this.activeRequest){ + Ext.Ajax.abort(this.activeRequest); + } + this.activeRequest = Ext.Ajax.request(o); + }else{ + this.conn.request(o); + } + }else{ + callback.call(scope||this, null, arg, false); + } + }, + + // private + loadResponse : function(o, success, response){ + delete this.activeRequest; + if(!success){ + this.fireEvent("loadexception", this, o, response); + o.request.callback.call(o.request.scope, null, o.request.arg, false); + return; + } + var result; + try { + result = o.reader.read(response); + }catch(e){ + this.fireEvent("loadexception", this, o, response, e); + o.request.callback.call(o.request.scope, null, o.request.arg, false); + return; + } + this.fireEvent("load", this, o, o.request.arg); + o.request.callback.call(o.request.scope, result, o.request.arg, true); + }, + + // private + update : function(dataSet){ + + }, + + // private + updateResponse : function(dataSet){ + + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/JsonReader.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/JsonReader.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/JsonReader.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,219 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.JsonReader + * @extends Ext.data.DataReader + * Data reader class to create an Array of Ext.data.Record objects from a JSON response + * based on mappings in a provided Ext.data.Record constructor.
        + *

        + * Example code: + *

        
        +var Employee = Ext.data.Record.create([
        +    {name: 'name', mapping: 'name'},     // "mapping" property not needed if it's the same as "name"
        +    {name: 'occupation'}                 // This field will use "occupation" as the mapping.
        +]);
        +var myReader = new Ext.data.JsonReader({
        +    totalProperty: "results",    // The property which contains the total dataset size (optional)
        +    root: "rows",                // The property which contains an Array of row objects
        +    id: "id"                     // The property within each row object that provides an ID for the record (optional)
        +}, Employee);
        +
        + *

        + * This would consume a JSON file like this: + *

        
        +{ 'results': 2, 'rows': [
        +    { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },
        +    { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' } ]
        +}
        +
        + *

        It is possible to change a JsonReader's metadata at any time by including a + * MetaData property in the data object. If this is detected in the + * object, a {@link Ext.data.Store Store} object using this Reader will fire its + * {@link Ext.data.Store#metachange metachange} event.

        + *

        The MetaData property may contain any of the configuration + * options for this class. Additionally, it may contain a fields + * property which the JsonReader will use that as an argument to {@link Ext.data.Record.create} + * to configure the layout of the Records which it will produce.

        + * Using the MetaData property, and the Store's {@link Ext.data.Store#metachange metachange} event, + * it is possible to have a Store-driven control initialize itself. The metachange + * event handler may interrogate the MetaData property (which + * may contain any user-defined properties needed) and the MetaData.fields + * property to perform any configuration required.

        + *

        To use this facility to send the same data as the above example without + * having to code the creation of the Record constructor, you would create the + * JsonReader like this:

        
        +var myReader = new Ext.data.JsonReader();
        +
        + *

        The first data packet from the server would configure the reader by + * containing a metaData property as well as the data:

        
        +{
        +  'metaData': {
        +    totalProperty: 'results',
        +    root: 'rows',
        +    id: 'id',
        +    fields: [
        +      {name: 'name'},
        +      {name: 'occupation'} ]
        +   },
        +  'results': 2, 'rows': [
        +    { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },
        +    { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' } ]
        +}
        +
        + * @cfg {String} totalProperty Name of the property from which to retrieve the total number of records + * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being + * paged from the remote server. + * @cfg {String} successProperty Name of the property from which to retrieve the success attribute used by forms. + * @cfg {String} root name of the property which contains the Array of row objects. + * @cfg {String} id Name of the property within a row object that contains a record identifier value. + * @constructor + * Create a new JsonReader + * @param {Object} meta Metadata configuration options. + * @param {Object} recordType Either an Array of field definition objects as passed to + * {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record} constructor created using {@link Ext.data.Record#create}. + */ +Ext.data.JsonReader = function(meta, recordType){ + meta = meta || {}; + Ext.data.JsonReader.superclass.constructor.call(this, meta, recordType || meta.fields); +}; +Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { + /** + * This JsonReader's metadata as passed to the constructor, or as passed in + * the last data packet's MetaData property. + * @type Mixed + * @property meta + */ + /** + * This method is only used by a DataProxy which has retrieved data from a remote server. + * @param {Object} response The XHR object which contains the JSON data in its responseText. + * @return {Object} data A data block which is used by an Ext.data.Store object as + * a cache of Ext.data.Records. + */ + read : function(response){ + var json = response.responseText; + var o = eval("("+json+")"); + if(!o) { + throw {message: "JsonReader.read: Json object not found"}; + } + if(o.metaData){ + delete this.ef; + this.meta = o.metaData; + this.recordType = Ext.data.Record.create(o.metaData.fields); + this.onMetaChange(this.meta, this.recordType, o); + } + return this.readRecords(o); + }, + + // private function a store will implement + onMetaChange : function(meta, recordType, o){ + + }, + + /** + * @ignore + */ + simpleAccess: function(obj, subsc) { + return obj[subsc]; + }, + + /** + * @ignore + */ + getJsonAccessor: function(){ + var re = /[\[\.]/; + return function(expr) { + try { + return(re.test(expr)) + ? new Function("obj", "return obj." + expr) + : function(obj){ + return obj[expr]; + }; + } catch(e){} + return Ext.emptyFn; + }; + }(), + + /** + * Create a data block containing Ext.data.Records from a JSON object. + * @param {Object} o An object which contains an Array of row objects in the property specified + * in the config as 'root, and optionally a property, specified in the config as 'totalProperty' + * which contains the total size of the dataset. + * @return {Object} data A data block which is used by an Ext.data.Store object as + * a cache of Ext.data.Records. + */ + readRecords : function(o){ + /** + * After any data loads, the raw JSON data is available for further custom processing. If no data is + * loaded or there is a load exception this property will be undefined. + * @type Object + */ + this.jsonData = o; + var s = this.meta, Record = this.recordType, + f = Record.prototype.fields, fi = f.items, fl = f.length; + +// Generate extraction functions for the totalProperty, the root, the id, and for each field + if (!this.ef) { + if(s.totalProperty) { + this.getTotal = this.getJsonAccessor(s.totalProperty); + } + if(s.successProperty) { + this.getSuccess = this.getJsonAccessor(s.successProperty); + } + this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;}; + if (s.id) { + var g = this.getJsonAccessor(s.id); + this.getId = function(rec) { + var r = g(rec); + return (r === undefined || r === "") ? null : r; + }; + } else { + this.getId = function(){return null;}; + } + this.ef = []; + for(var i = 0; i < fl; i++){ + f = fi[i]; + var map = (f.mapping !== undefined && f.mapping !== null) ? f.mapping : f.name; + this.ef[i] = this.getJsonAccessor(map); + } + } + + var root = this.getRoot(o), c = root.length, totalRecords = c, success = true; + if(s.totalProperty){ + var v = parseInt(this.getTotal(o), 10); + if(!isNaN(v)){ + totalRecords = v; + } + } + if(s.successProperty){ + var v = this.getSuccess(o); + if(v === false || v === 'false'){ + success = false; + } + } + var records = []; + for(var i = 0; i < c; i++){ + var n = root[i]; + var values = {}; + var id = this.getId(n); + for(var j = 0; j < fl; j++){ + f = fi[j]; + var v = this.ef[j](n); + values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue); + } + var record = new Record(values, id); + record.json = n; + records[i] = record; + } + return { + success : success, + records : records, + totalRecords : totalRecords + }; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/JsonStore.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/JsonStore.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/JsonStore.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,47 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.JsonStore + * @extends Ext.data.Store + * Small helper class to make creating Stores for JSON data easier.
        +
        
        +var store = new Ext.data.JsonStore({
        +    url: 'get-images.php',
        +    root: 'images',
        +    fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
        +});
        +
        + * This would consume a returned object of the form: +
        
        +{
        +    images: [
        +        {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
        +        {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
        +    ]
        +}
        +
        + * An object literal of this form could also be used as the {@link #data} config option. + * Note: Although they are not listed, this class inherits all of the config options of Store, + * JsonReader. + * @cfg {String} url The URL from which to load data through an HttpProxy. Either this + * option, or the {@link #data} option must be specified. + * @cfg {Object} data A data object readable this object's JsonReader. Either this + * option, or the {@link #url} option must be specified. + * @cfg {Array} fields Either an Array of field definition objects as passed to + * {@link Ext.data.Record#create}, or a {@link Ext.data.Record Record} constructor created using {@link Ext.data.Record#create}. + * @constructor + * @param {Object} config + */ +Ext.data.JsonStore = function(c){ + Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(c, { + proxy: !c.data ? new Ext.data.HttpProxy({url: c.url}) : undefined, + reader: new Ext.data.JsonReader(c, c.fields) + })); +}; +Ext.extend(Ext.data.JsonStore, Ext.data.Store); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/MemoryProxy.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/MemoryProxy.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/MemoryProxy.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,57 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.MemoryProxy + * @extends Ext.data.DataProxy + * An implementation of Ext.data.DataProxy that simply passes the data specified in its constructor + * to the Reader when its load method is called. + * @constructor + * @param {Object} data The data object which the Reader uses to construct a block of Ext.data.Records. + */ +Ext.data.MemoryProxy = function(data){ + Ext.data.MemoryProxy.superclass.constructor.call(this); + this.data = data; +}; + +Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, { + /** + * Load data from the requested source (in this case an in-memory + * data object passed to the constructor), read the data object into + * a block of Ext.data.Records using the passed Ext.data.DataReader implementation, and + * process that block using the passed callback. + * @param {Object} params This parameter is not used by the MemoryProxy class. + * @param {Ext.data.DataReader) reader The Reader object which converts the data + * object into a block of Ext.data.Records. + * @param {Function} callback The function into which to pass the block of Ext.data.records. + * The function must be passed
          + *
        • The Record block object
        • + *
        • The "arg" argument from the load function
        • + *
        • A boolean success indicator
        • + *
        + * @param {Object} scope The scope in which to call the callback + * @param {Object} arg An optional argument which is passed to the callback as its second parameter. + */ + load : function(params, reader, callback, scope, arg){ + params = params || {}; + var result; + try { + result = reader.readRecords(this.data); + }catch(e){ + this.fireEvent("loadexception", this, arg, null, e); + callback.call(scope, null, arg, false); + return; + } + callback.call(scope, result, arg, true); + }, + + // private + update : function(params, records){ + + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Record.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Record.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Record.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,269 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** +* @class Ext.data.Record + * Instances of this class encapsulate both record definition information, and record + * value information for use in {@link Ext.data.Store} objects, or any code which needs + * to access Records cached in an {@link Ext.data.Store} object.
        + *

        + * Constructors for this class are generated by passing an Array of field definition objects to {@link #create}. + * Instances are usually only created by {@link Ext.data.Reader} implementations when processing unformatted data + * objects.
        + *

        + * Record objects generated by this constructor inherit all the methods of Ext.data.Record listed below. + * @constructor + * This constructor should not be used to create Record objects. Instead, use the constructor generated by + * {@link #create}. The parameters are the same. + * @param {Array} data An associative Array of data values keyed by the field name. + * @param {Object} id (Optional) The id of the record. This id should be unique, and is used by the + * {@link Ext.data.Store} object which owns the Record to index its collection of Records. If + * not specified an integer id is generated. + */ +Ext.data.Record = function(data, id){ + this.id = (id || id === 0) ? id : ++Ext.data.Record.AUTO_ID; + this.data = data; +}; + +/** + * Generate a constructor for a specific record layout. + * @param {Array} o An Array of field definition objects which specify field names, and optionally, + * data types, and a mapping for an {@link Ext.data.Reader} to extract the field's value from a data object. + * Each field definition object may contain the following properties:

          + *
        • name : String

          The name by which the field is referenced within the Record. This is referenced by, + * for example the dataIndex property in column definition objects passed to {@link Ext.grid.ColumnModel}

        • + *
        • mapping : String

          (Optional) A path specification for use by the {@link Ext.data.Reader} implementation + * that is creating the Record to access the data value from the data object. If an {@link Ext.data.JsonReader} + * is being used, then this is a string containing the javascript expression to reference the data relative to + * the record item's root. If an {@link Ext.data.XmlReader} is being used, this is an {@link Ext.DomQuery} path + * to the data item relative to the record element. If the mapping expression is the same as the field name, + * this may be omitted.

        • + *
        • type : String

          (Optional) The data type for conversion to displayable value. Possible values are + *

          • auto (Default, implies no conversion)
          • + *
          • string
          • + *
          • int
          • + *
          • float
          • + *
          • boolean
          • + *
          • date

        • + *
        • sortType : Mixed

          (Optional) A member of {@link Ext.data.SortTypes}.

        • + *
        • sortDir : String

          (Optional) Initial direction to sort. "ASC" or "DESC"

        • + *
        • convert : Function

          (Optional) A function which converts the value provided + * by the Reader into an object that will be stored in the Record. It is passed the + * following parameters:

            + *
          • v : Mixed

            The data value as read by the Reader.

          • + *

        • + *
        • dateFormat : String

          (Optional) A format String for the Date.parseDate function.

        • + *
        + *
        usage:
        
        +var TopicRecord = Ext.data.Record.create([
        +    {name: 'title', mapping: 'topic_title'},
        +    {name: 'author', mapping: 'username'},
        +    {name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
        +    {name: 'lastPost', mapping: 'post_time', type: 'date'},
        +    {name: 'lastPoster', mapping: 'user2'},
        +    {name: 'excerpt', mapping: 'post_text'}
        +]);
        +
        +var myNewRecord = new TopicRecord({
        +    title: 'Do my job please',
        +    author: 'noobie',
        +    totalPosts: 1,
        +    lastPost: new Date(),
        +    lastPoster: 'Animal',
        +    excerpt: 'No way dude!'
        +});
        +myStore.add(myNewRecord);
        +
        + *

        In the simplest case, if no properties other than name are required, a field definition + * may consist of just a field name string.

        + * @method create + * @return {function} A constructor which is used to create new Records according + * to the definition. + * @static + */ +Ext.data.Record.create = function(o){ + var f = Ext.extend(Ext.data.Record, {}); + var p = f.prototype; + p.fields = new Ext.util.MixedCollection(false, function(field){ + return field.name; + }); + for(var i = 0, len = o.length; i < len; i++){ + p.fields.add(new Ext.data.Field(o[i])); + } + f.getField = function(name){ + return p.fields.get(name); + }; + return f; +}; + +Ext.data.Record.AUTO_ID = 1000; +Ext.data.Record.EDIT = 'edit'; +Ext.data.Record.REJECT = 'reject'; +Ext.data.Record.COMMIT = 'commit'; + +Ext.data.Record.prototype = { + /** + * The data for this record an object hash. + * @property data + * @type {Object} + */ + /** + * The unique ID of the record as specified at construction time. + * @property id + * @type {Object} + */ + /** + * Readonly flag - true if this record has been modified. + * @type Boolean + */ + dirty : false, + editing : false, + error: null, + /** + * This object contains a key and value storing the original values of all modified fields or is null if no fields have been modified. + * @property modified + * @type {Object} + */ + modified: null, + + // private + join : function(store){ + this.store = store; + }, + + /** + * Set the named field to the specified value. + * @param {String} name The name of the field to set. + * @param {Object} value The value to set the field to. + */ + set : function(name, value){ + if(String(this.data[name]) == String(value)){ + return; + } + this.dirty = true; + if(!this.modified){ + this.modified = {}; + } + if(typeof this.modified[name] == 'undefined'){ + this.modified[name] = this.data[name]; + } + this.data[name] = value; + if(!this.editing){ + this.store.afterEdit(this); + } + }, + + /** + * Get the value of the named field. + * @param {String} name The name of the field to get the value of. + * @return {Object} The value of the field. + */ + get : function(name){ + return this.data[name]; + }, + + /** + * Begin an edit. While in edit mode, no events are relayed to the containing store. + */ + beginEdit : function(){ + this.editing = true; + this.modified = {}; + }, + + /** + * Cancels all changes made in the current edit operation. + */ + cancelEdit : function(){ + this.editing = false; + delete this.modified; + }, + + /** + * End an edit. If any data was modified, the containing store is notified. + */ + endEdit : function(){ + this.editing = false; + if(this.dirty && this.store){ + this.store.afterEdit(this); + } + }, + + /** + * Usually called by the {@link Ext.data.Store} which owns the Record. + * Rejects all changes made to the Record since either creation, or the last commit operation. + * Modified fields are reverted to their original values. + *

        + * Developers should subscribe to the {@link Ext.data.Store#update} event to have their code notified + * of reject operations. + * @param {Boolean} silent (optional) True to skip notification of the owning store of the change (defaults to false) + */ + reject : function(silent){ + var m = this.modified; + for(var n in m){ + if(typeof m[n] != "function"){ + this.data[n] = m[n]; + } + } + this.dirty = false; + delete this.modified; + this.editing = false; + if(this.store && silent !== true){ + this.store.afterReject(this); + } + }, + + /** + * Usually called by the {@link Ext.data.Store} which owns the Record. + * Commits all changes made to the Record since either creation, or the last commit operation. + *

        + * Developers should subscribe to the {@link Ext.data.Store#update} event to have their code notified + * of commit operations. + * @param {Boolean} silent (optional) True to skip notification of the owning store of the change (defaults to false) + */ + commit : function(silent){ + this.dirty = false; + delete this.modified; + this.editing = false; + if(this.store && silent !== true){ + this.store.afterCommit(this); + } + }, + + /** + * Gets a hash of only the fields that have been modified since this record was created or commited. + * @return Object + */ + getChanges : function(){ + var m = this.modified, cs = {}; + for(var n in m){ + if(m.hasOwnProperty(n)){ + cs[n] = this.data[n]; + } + } + return cs; + }, + + // private + hasError : function(){ + return this.error != null; + }, + + // private + clearError : function(){ + this.error = null; + }, + + /** + * Creates a copy of this record. + * @param {String} id (optional) A new record id if you don't want to use this record's id + * @return {Record} + */ + copy : function(newId) { + return new this.constructor(Ext.apply({}, this.data), newId || this.id); + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/ScriptTagProxy.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/ScriptTagProxy.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/ScriptTagProxy.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,199 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.ScriptTagProxy + * @extends Ext.data.DataProxy + * An implementation of Ext.data.DataProxy that reads a data object from a URL which may be in a domain + * other than the originating domain of the running page.
        + *

        + * Note that if you are retrieving data from a page that is in a domain that is NOT the same as the originating domain + * of the running page, you must use this class, rather than HttpProxy.
        + *

        + * The content passed back from a server resource requested by a ScriptTagProxy is executable JavaScript + * source code that is used as the source inside a <script> tag.
        + *

        + * In order for the browser to process the returned data, the server must wrap the data object + * with a call to a callback function, the name of which is passed as a parameter by the ScriptTagProxy. + * Below is a Java example for a servlet which returns data for either a ScriptTagProxy, or an HttpProxy + * depending on whether the callback name was passed: + *

        + *

        
        +boolean scriptTag = false;
        +String cb = request.getParameter("callback");
        +if (cb != null) {
        +    scriptTag = true;
        +    response.setContentType("text/javascript");
        +} else {
        +    response.setContentType("application/x-json");
        +}
        +Writer out = response.getWriter();
        +if (scriptTag) {
        +    out.write(cb + "(");
        +}
        +out.print(dataBlock.toJsonString());
        +if (scriptTag) {
        +    out.write(");");
        +}
        +
        + * + * @constructor + * @param {Object} config A configuration object. + */ +Ext.data.ScriptTagProxy = function(config){ + Ext.data.ScriptTagProxy.superclass.constructor.call(this); + Ext.apply(this, config); + this.head = document.getElementsByTagName("head")[0]; +}; + +Ext.data.ScriptTagProxy.TRANS_ID = 1000; + +Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, { + /** + * @cfg {String} url The URL from which to request the data object. + */ + /** + * @cfg {Number} timeout (Optional) The number of milliseconds to wait for a response. Defaults to 30 seconds. + */ + timeout : 30000, + /** + * @cfg {String} callbackParam (Optional) The name of the parameter to pass to the server which tells + * the server the name of the callback function set up by the load call to process the returned data object. + * Defaults to "callback".

        The server-side processing must read this parameter value, and generate + * javascript output which calls this named function passing the data object as its only parameter. + */ + callbackParam : "callback", + /** + * @cfg {Boolean} nocache (Optional) Defaults to true. Disable cacheing by adding a unique parameter + * name to the request. + */ + nocache : true, + + /** + * Load data from the configured URL, read the data object into + * a block of Ext.data.Records using the passed Ext.data.DataReader implementation, and + * process that block using the passed callback. + * @param {Object} params An object containing properties which are to be used as HTTP parameters + * for the request to the remote server. + * @param {Ext.data.DataReader} reader The Reader object which converts the data + * object into a block of Ext.data.Records. + * @param {Function} callback The function into which to pass the block of Ext.data.Records. + * The function must be passed

          + *
        • The Record block object
        • + *
        • The "arg" argument from the load function
        • + *
        • A boolean success indicator
        • + *
        + * @param {Object} scope The scope in which to call the callback + * @param {Object} arg An optional argument which is passed to the callback as its second parameter. + */ + load : function(params, reader, callback, scope, arg){ + if(this.fireEvent("beforeload", this, params) !== false){ + + var p = Ext.urlEncode(Ext.apply(params, this.extraParams)); + + var url = this.url; + url += (url.indexOf("?") != -1 ? "&" : "?") + p; + if(this.nocache){ + url += "&_dc=" + (new Date().getTime()); + } + var transId = ++Ext.data.ScriptTagProxy.TRANS_ID; + var trans = { + id : transId, + cb : "stcCallback"+transId, + scriptId : "stcScript"+transId, + params : params, + arg : arg, + url : url, + callback : callback, + scope : scope, + reader : reader + }; + var conn = this; + + window[trans.cb] = function(o){ + conn.handleResponse(o, trans); + }; + + url += String.format("&{0}={1}", this.callbackParam, trans.cb); + + if(this.autoAbort !== false){ + this.abort(); + } + + trans.timeoutId = this.handleFailure.defer(this.timeout, this, [trans]); + + var script = document.createElement("script"); + script.setAttribute("src", url); + script.setAttribute("type", "text/javascript"); + script.setAttribute("id", trans.scriptId); + this.head.appendChild(script); + + this.trans = trans; + }else{ + callback.call(scope||this, null, arg, false); + } + }, + + // private + isLoading : function(){ + return this.trans ? true : false; + }, + + /** + * Abort the current server request. + */ + abort : function(){ + if(this.isLoading()){ + this.destroyTrans(this.trans); + } + }, + + // private + destroyTrans : function(trans, isLoaded){ + this.head.removeChild(document.getElementById(trans.scriptId)); + clearTimeout(trans.timeoutId); + if(isLoaded){ + window[trans.cb] = undefined; + try{ + delete window[trans.cb]; + }catch(e){} + }else{ + // if hasn't been loaded, wait for load to remove it to prevent script error + window[trans.cb] = function(){ + window[trans.cb] = undefined; + try{ + delete window[trans.cb]; + }catch(e){} + }; + } + }, + + // private + handleResponse : function(o, trans){ + this.trans = false; + this.destroyTrans(trans, true); + var result; + try { + result = trans.reader.readRecords(o); + }catch(e){ + this.fireEvent("loadexception", this, o, trans.arg, e); + trans.callback.call(trans.scope||window, null, trans.arg, false); + return; + } + this.fireEvent("load", this, o, trans.arg); + trans.callback.call(trans.scope||window, result, trans.arg, true); + }, + + // private + handleFailure : function(trans){ + this.trans = false; + this.destroyTrans(trans, false); + this.fireEvent("loadexception", this, null, trans.arg); + trans.callback.call(trans.scope||window, null, trans.arg, false); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/SimpleStore.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/SimpleStore.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/SimpleStore.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,39 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.SimpleStore + * @extends Ext.data.Store + * Small helper class to make creating Stores from Array data easier. + * @cfg {Number} id The array index of the record id. Leave blank to auto generate ids. + * @cfg {Array} fields An array of field definition objects, or field name strings. + * @cfg {Array} data The multi-dimensional array of data + * @constructor + * @param {Object} config + */ +Ext.data.SimpleStore = function(config){ + Ext.data.SimpleStore.superclass.constructor.call(this, Ext.apply(config, { + reader: new Ext.data.ArrayReader({ + id: config.id + }, + Ext.data.Record.create(config.fields) + ) + })); +}; +Ext.extend(Ext.data.SimpleStore, Ext.data.Store, { + loadData : function(data, append){ + if(this.expandData === true){ + var r = []; + for(var i = 0, len = data.length; i < len; i++){ + r[r.length] = [data[i]]; + } + data = r; + } + Ext.data.SimpleStore.superclass.loadData.call(this, data, append); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/SortTypes.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/SortTypes.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/SortTypes.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,95 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + + +/** + * @class Ext.data.SortTypes + * @singleton + * Defines the default sorting (casting?) comparison functions used when sorting data. + */ +Ext.data.SortTypes = { + /** + * Default sort that does nothing + * @param {Mixed} s The value being converted + * @return {Mixed} The comparison value + */ + none : function(s){ + return s; + }, + + /** + * The regular expression used to strip tags + * @type {RegExp} + * @property + */ + stripTagsRE : /<\/?[^>]+>/gi, + + /** + * Strips all HTML tags to sort on text only + * @param {Mixed} s The value being converted + * @return {String} The comparison value + */ + asText : function(s){ + return String(s).replace(this.stripTagsRE, ""); + }, + + /** + * Strips all HTML tags to sort on text only - Case insensitive + * @param {Mixed} s The value being converted + * @return {String} The comparison value + */ + asUCText : function(s){ + return String(s).toUpperCase().replace(this.stripTagsRE, ""); + }, + + /** + * Case insensitive string + * @param {Mixed} s The value being converted + * @return {String} The comparison value + */ + asUCString : function(s) { + return String(s).toUpperCase(); + }, + + /** + * Date sorting + * @param {Mixed} s The value being converted + * @return {Number} The comparison value + */ + asDate : function(s) { + if(!s){ + return 0; + } + if(s instanceof Date){ + return s.getTime(); + } + return Date.parse(String(s)); + }, + + /** + * Float sorting + * @param {Mixed} s The value being converted + * @return {Float} The comparison value + */ + asFloat : function(s) { + var val = parseFloat(String(s).replace(/,/g, "")); + if(isNaN(val)) val = 0; + return val; + }, + + /** + * Integer sorting + * @param {Mixed} s The value being converted + * @return {Number} The comparison value + */ + asInt : function(s) { + var val = parseInt(String(s).replace(/,/g, "")); + if(isNaN(val)) val = 0; + return val; + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Store.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Store.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Store.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,793 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.Store + * @extends Ext.util.Observable + * The Store class encapsulates a client side cache of {@link Ext.data.Record Record} + * objects which provide input data for Components such as the {@link Ext.grid.GridPanel GridPanel}, + * the {@link Ext.form.ComboBox ComboBox}, or the {@link Ext.DataView DataView}

        + *

        A Store object uses its {@link #proxy configured} implementation of {@link Ext.data.DataProxy DataProxy} + * to access a data object unless you call {@link #loadData} directly and pass in your data.

        + *

        A Store object has no knowledge of the format of the data returned by the Proxy.

        + *

        A Store object uses its {@link #reader configured} implementation of {@link Ext.data.DataReader DataReader} + * to create {@link Ext.data.Record Record} instances from the data object. These Records + * are cached and made available through accessor functions.

        + * @constructor + * Creates a new Store. + * @param {Object} config A config object containing the objects needed for the Store to access data, + * and read the data into Records. + */ +Ext.data.Store = function(config){ + this.data = new Ext.util.MixedCollection(false); + this.data.getKey = function(o){ + return o.id; + }; + /** + * An object containing properties which are used as parameters on any HTTP request. + * @property + */ + this.baseParams = {}; + // private + this.paramNames = { + "start" : "start", + "limit" : "limit", + "sort" : "sort", + "dir" : "dir" + }; + + if(config && config.data){ + this.inlineData = config.data; + delete config.data; + } + + Ext.apply(this, config); + + if(this.url && !this.proxy){ + this.proxy = new Ext.data.HttpProxy({url: this.url}); + } + + if(this.reader){ // reader passed + if(!this.recordType){ + this.recordType = this.reader.recordType; + } + if(this.reader.onMetaChange){ + this.reader.onMetaChange = this.onMetaChange.createDelegate(this); + } + } + + if(this.recordType){ + this.fields = this.recordType.prototype.fields; + } + this.modified = []; + + this.addEvents( + /** + * @event datachanged + * Fires when the data cache has changed, and a widget which is using this Store + * as a Record cache should refresh its view. + * @param {Store} this + */ + 'datachanged', + /** + * @event metachange + * Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders. + * @param {Store} this + * @param {Object} meta The JSON metadata + */ + 'metachange', + /** + * @event add + * Fires when Records have been added to the Store + * @param {Store} this + * @param {Ext.data.Record[]} records The array of Records added + * @param {Number} index The index at which the record(s) were added + */ + 'add', + /** + * @event remove + * Fires when a Record has been removed from the Store + * @param {Store} this + * @param {Ext.data.Record} record The Record that was removed + * @param {Number} index The index at which the record was removed + */ + 'remove', + /** + * @event update + * Fires when a Record has been updated + * @param {Store} this + * @param {Ext.data.Record} record The Record that was updated + * @param {String} operation The update operation being performed. Value may be one of: + *
        
        + Ext.data.Record.EDIT
        + Ext.data.Record.REJECT
        + Ext.data.Record.COMMIT
        +         * 
        + */ + 'update', + /** + * @event clear + * Fires when the data cache has been cleared. + * @param {Store} this + */ + 'clear', + /** + * @event beforeload + * Fires before a request is made for a new data object. If the beforeload handler returns false + * the load action will be canceled. + * @param {Store} this + * @param {Object} options The loading options that were specified (see {@link #load} for details) + */ + 'beforeload', + /** + * @event load + * Fires after a new set of Records has been loaded. + * @param {Store} this + * @param {Ext.data.Record[]} records The Records that were loaded + * @param {Object} options The loading options that were specified (see {@link #load} for details) + */ + 'load', + /** + * @event loadexception + * Fires if an exception occurs in the Proxy during loading. + * Called with the signature of the Proxy's "loadexception" event. + */ + 'loadexception' + ); + + if(this.proxy){ + this.relayEvents(this.proxy, ["loadexception"]); + } + this.sortToggle = {}; + + Ext.data.Store.superclass.constructor.call(this); + + if(this.storeId || this.id){ + Ext.StoreMgr.register(this); + } + if(this.inlineData){ + this.loadData(this.inlineData); + delete this.inlineData; + }else if(this.autoLoad){ + this.load.defer(10, this, [ + typeof this.autoLoad == 'object' ? + this.autoLoad : undefined]); + } +}; +Ext.extend(Ext.data.Store, Ext.util.Observable, { + /** + * @cfg {String} storeId If passed, the id to use to register with the StoreMgr + */ + /** + * @cfg {String} url If passed, an HttpProxy is created for the passed URL + */ + /** + * @cfg {Boolean/Object} autoLoad If passed, this store's load method is automatically called after creation with the autoLoad object + */ + /** + * @cfg {Ext.data.DataProxy} proxy The Proxy object which provides access to a data object. + */ + /** + * @cfg {Array} data Inline data to be loaded when the store is initialized. + */ + /** + * @cfg {Ext.data.Reader} reader The Reader object which processes the data object and returns + * an Array of Ext.data.record objects which are cached keyed by their id property. + */ + /** + * @cfg {Object} baseParams An object containing properties which are to be sent as parameters + * on any HTTP request + */ + /** + * @cfg {Object} sortInfo A config object in the format: {field: "fieldName", direction: "ASC|DESC"} + */ + /** + * @cfg {boolean} remoteSort True if sorting is to be handled by requesting the + * Proxy to provide a refreshed version of the data object in sorted order, as + * opposed to sorting the Record cache in place (defaults to false). + *

        If remote sorting is specified, then clicking on a column header causes the + * current page to be requested from the server with the addition of the following + * two parameters: + *

          + *
        • sort : String

          The name (as specified in + * the Record's Field definition) of the field to sort on.

        • + *
        • dir : String

          The direction of the sort, "ASC" or "DESC".

        • + *

        + */ + remoteSort : false, + + /** + * @cfg {boolean} pruneModifiedRecords True to clear all modified record information each time the store is + * loaded or when a record is removed. (defaults to false). + */ + pruneModifiedRecords : false, + + /** + * Contains the last options object used as the parameter to the load method. See {@link #load} + * for the details of what this may contain. This may be useful for accessing any params which + * were used to load the current Record cache. + * @property + */ + lastOptions : null, + + destroy : function(){ + if(this.id){ + Ext.StoreMgr.unregister(this); + } + this.data = null; + this.purgeListeners(); + }, + + /** + * Add Records to the Store and fires the add event. + * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache. + */ + add : function(records){ + records = [].concat(records); + if(records.length < 1){ + return; + } + for(var i = 0, len = records.length; i < len; i++){ + records[i].join(this); + } + var index = this.data.length; + this.data.addAll(records); + if(this.snapshot){ + this.snapshot.addAll(records); + } + this.fireEvent("add", this, records, index); + }, + + /** + * (Local sort only) Inserts the passed the record in the Store at the index where it + * should go based on the current sort information + * @param {Ext.data.Record} record + */ + addSorted : function(record){ + var index = this.findInsertIndex(record); + this.insert(index, record); + }, + + /** + * Remove a Record from the Store and fires the remove event. + * @param {Ext.data.Record} record Th Ext.data.Record object to remove from the cache. + */ + remove : function(record){ + var index = this.data.indexOf(record); + this.data.removeAt(index); + if(this.pruneModifiedRecords){ + this.modified.remove(record); + } + if(this.snapshot){ + this.snapshot.remove(record); + } + this.fireEvent("remove", this, record, index); + }, + + /** + * Remove all Records from the Store and fires the clear event. + */ + removeAll : function(){ + this.data.clear(); + if(this.snapshot){ + this.snapshot.clear(); + } + if(this.pruneModifiedRecords){ + this.modified = []; + } + this.fireEvent("clear", this); + }, + + /** + * Inserts Records to the Store at the given index and fires the add event. + * @param {Number} index The start index at which to insert the passed Records. + * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache. + */ + insert : function(index, records){ + records = [].concat(records); + for(var i = 0, len = records.length; i < len; i++){ + this.data.insert(index, records[i]); + records[i].join(this); + } + this.fireEvent("add", this, records, index); + }, + + /** + * Get the index within the cache of the passed Record. + * @param {Ext.data.Record} record The Ext.data.Record object to to find. + * @return {Number} The index of the passed Record. Returns -1 if not found. + */ + indexOf : function(record){ + return this.data.indexOf(record); + }, + + /** + * Get the index within the cache of the Record with the passed id. + * @param {String} id The id of the Record to find. + * @return {Number} The index of the Record. Returns -1 if not found. + */ + indexOfId : function(id){ + return this.data.indexOfKey(id); + }, + + /** + * Get the Record with the specified id. + * @param {String} id The id of the Record to find. + * @return {Ext.data.Record} The Record with the passed id. Returns undefined if not found. + */ + getById : function(id){ + return this.data.key(id); + }, + + /** + * Get the Record at the specified index. + * @param {Number} index The index of the Record to find. + * @return {Ext.data.Record} The Record at the passed index. Returns undefined if not found. + */ + getAt : function(index){ + return this.data.itemAt(index); + }, + + /** + * Returns a range of Records between specified indices. + * @param {Number} startIndex (optional) The starting index (defaults to 0) + * @param {Number} endIndex (optional) The ending index (defaults to the last Record in the Store) + * @return {Ext.data.Record[]} An array of Records + */ + getRange : function(start, end){ + return this.data.getRange(start, end); + }, + + // private + storeOptions : function(o){ + o = Ext.apply({}, o); + delete o.callback; + delete o.scope; + this.lastOptions = o; + }, + + /** + * Loads the Record cache from the configured Proxy using the configured Reader. + *

        If using remote paging, then the first load call must specify the start + * and limit properties in the options.params property to establish the initial + * position within the dataset, and the number of Records to cache on each read from the Proxy.

        + *

        It is important to note that for remote data sources, loading is asynchronous, + * and this call will return before the new data has been loaded. Perform any post-processing + * in a callback function, or in a "load" event handler.

        + * @param {Object} options An object containing properties which control loading options:
          + *
        • params :Object

          An object containing properties to pass as HTTP parameters to a remote data source.

        • + *
        • callback : Function}

          A function to be called after the Records have been loaded. The callback is + * passed the following arguments:

            + *
          • r : Ext.data.Record[]
          • + *
          • options: Options object from the load call
          • + *
          • success: Boolean success indicator

        • + *
        • scope : Object

          Scope with which to call the callback (defaults to the Store object)

        • + *
        • add : Boolean

          Indicator to append loaded records rather than replace the current cache.

        • + *
        + */ + load : function(options){ + options = options || {}; + if(this.fireEvent("beforeload", this, options) !== false){ + this.storeOptions(options); + var p = Ext.apply(options.params || {}, this.baseParams); + if(this.sortInfo && this.remoteSort){ + var pn = this.paramNames; + p[pn["sort"]] = this.sortInfo.field; + p[pn["dir"]] = this.sortInfo.direction; + } + this.proxy.load(p, this.reader, this.loadRecords, this, options); + } + }, + + /** + * Reloads the Record cache from the configured Proxy using the configured Reader and + * the options from the last load operation performed. + * @param {Object} options (optional) An object containing properties which may override the options + * used in the last load operation. See {@link #load} for details (defaults to null, in which case + * the most recently used options are reused). + */ + reload : function(options){ + this.load(Ext.applyIf(options||{}, this.lastOptions)); + }, + + // private + // Called as a callback by the Reader during a load operation. + loadRecords : function(o, options, success){ + if(!o || success === false){ + if(success !== false){ + this.fireEvent("load", this, [], options); + } + if(options.callback){ + options.callback.call(options.scope || this, [], options, false); + } + return; + } + var r = o.records, t = o.totalRecords || r.length; + if(!options || options.add !== true){ + if(this.pruneModifiedRecords){ + this.modified = []; + } + for(var i = 0, len = r.length; i < len; i++){ + r[i].join(this); + } + if(this.snapshot){ + this.data = this.snapshot; + delete this.snapshot; + } + this.data.clear(); + this.data.addAll(r); + this.totalLength = t; + this.applySort(); + this.fireEvent("datachanged", this); + }else{ + this.totalLength = Math.max(t, this.data.length+r.length); + this.add(r); + } + this.fireEvent("load", this, r, options); + if(options.callback){ + options.callback.call(options.scope || this, r, options, true); + } + }, + + /** + * Loads data from a passed data block. A Reader which understands the format of the data + * must have been configured in the constructor. + * @param {Object} data The data block from which to read the Records. The format of the data expected + * is dependent on the type of Reader that is configured and should correspond to that Reader's readRecords parameter. + * @param {Boolean} append (Optional) True to append the new Records rather than replace the existing cache. + */ + loadData : function(o, append){ + var r = this.reader.readRecords(o); + this.loadRecords(r, {add: append}, true); + }, + + /** + * Gets the number of cached records. + *

        If using paging, this may not be the total size of the dataset. If the data object + * used by the Reader contains the dataset size, then the {@link #getTotalCount} function returns + * the dataset size.

        + * @return {Number} The number of Records in the Store's cache. + */ + getCount : function(){ + return this.data.length || 0; + }, + + /** + * Gets the total number of records in the dataset as returned by the server. + *

        If using paging, for this to be accurate, the data object used by the Reader must contain + * the dataset size. For remote data sources, this is provided by a query on the server.

        + * @return {Number} The number of Records as specified in the data object passed to the Reader + * by the Proxy + *

        This value is not updated when changing the contents of the Store locally.

        + */ + getTotalCount : function(){ + return this.totalLength || 0; + }, + + /** + * Returns an object describing the current sort state of this Store. + * @return {Object} The sort state of the Store. An object with two properties:
          + *
        • field : String

          The name of the field by which the Records are sorted.

        • + *
        • direction : String

          The sort order, "ASC" or "DESC".

        • + *
        + */ + getSortState : function(){ + return this.sortInfo; + }, + + // private + applySort : function(){ + if(this.sortInfo && !this.remoteSort){ + var s = this.sortInfo, f = s.field; + this.sortData(f, s.direction); + } + }, + + // private + sortData : function(f, direction){ + direction = direction || 'ASC'; + var st = this.fields.get(f).sortType; + var fn = function(r1, r2){ + var v1 = st(r1.data[f]), v2 = st(r2.data[f]); + return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0); + }; + this.data.sort(direction, fn); + if(this.snapshot && this.snapshot != this.data){ + this.snapshot.sort(direction, fn); + } + }, + + /** + * Sets the default sort column and order to be used by the next load operation. + * @param {String} fieldName The name of the field to sort by. + * @param {String} dir (optional) The sort order, "ASC" or "DESC" (defaults to "ASC") + */ + setDefaultSort : function(field, dir){ + dir = dir ? dir.toUpperCase() : "ASC"; + this.sortInfo = {field: field, direction: dir}; + this.sortToggle[field] = dir; + }, + + /** + * Sort the Records. + * If remote sorting is used, the sort is performed on the server, and the cache is + * reloaded. If local sorting is used, the cache is sorted internally. + * @param {String} fieldName The name of the field to sort by. + * @param {String} dir (optional) The sort order, "ASC" or "DESC" (defaults to "ASC") + */ + sort : function(fieldName, dir){ + var f = this.fields.get(fieldName); + if(!f){ + return false; + } + if(!dir){ + if(this.sortInfo && this.sortInfo.field == f.name){ // toggle sort dir + dir = (this.sortToggle[f.name] || "ASC").toggle("ASC", "DESC"); + }else{ + dir = f.sortDir; + } + } + this.sortToggle[f.name] = dir; + this.sortInfo = {field: f.name, direction: dir}; + if(!this.remoteSort){ + this.applySort(); + this.fireEvent("datachanged", this); + }else{ + this.load(this.lastOptions); + } + }, + + /** + * Calls the specified function for each of the Records in the cache. + * @param {Function} fn The function to call. The Record is passed as the first parameter. + * Returning false aborts and exits the iteration. + * @param {Object} scope (optional) The scope in which to call the function (defaults to the Record). + */ + each : function(fn, scope){ + this.data.each(fn, scope); + }, + + /** + * Gets all records modified since the last commit. Modified records are persisted across load operations + * (e.g., during paging). + * @return {Ext.data.Record[]} An array of Records containing outstanding modifications. + */ + getModifiedRecords : function(){ + return this.modified; + }, + + // private + createFilterFn : function(property, value, anyMatch, caseSensitive){ + if(Ext.isEmpty(value, false)){ + return false; + } + value = this.data.createValueMatcher(value, anyMatch, caseSensitive); + return function(r){ + return value.test(r.data[property]); + }; + }, + + /** + * Sums the value of property for each record between start and end and returns the result. + * @param {String} property A field on your records + * @param {Number} start The record index to start at (defaults to 0) + * @param {Number} end The last record index to include (defaults to length - 1) + * @return {Number} The sum + */ + sum : function(property, start, end){ + var rs = this.data.items, v = 0; + start = start || 0; + end = (end || end === 0) ? end : rs.length-1; + + for(var i = start; i <= end; i++){ + v += (rs[i].data[property] || 0); + } + return v; + }, + + /** + * Filter the records by a specified property. + * @param {String} field A field on your records + * @param {String/RegExp} value Either a string that the field + * should start with or a RegExp to test against the field + * @param {Boolean} anyMatch (optional) True to match any part not just the beginning + * @param {Boolean} caseSensitive (optional) True for case sensitive comparison + */ + filter : function(property, value, anyMatch, caseSensitive){ + var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); + return fn ? this.filterBy(fn) : this.clearFilter(); + }, + + /** + * Filter by a function. The specified function will be called for each + * Record in this Store. If the function returns true the Record is included, + * otherwise it is filtered out. + * @param {Function} fn The function to be called. It will be passed the following parameters:
          + *
        • record : Ext.data.Record

          The {@link Ext.data.Record record} + * to test for filtering. Access field values using {@link Ext.data.Record#get}.

        • + *
        • id : Object

          The ID of the Record passed.

        • + *
        + * @param {Object} scope (optional) The scope of the function (defaults to this) + */ + filterBy : function(fn, scope){ + this.snapshot = this.snapshot || this.data; + this.data = this.queryBy(fn, scope||this); + this.fireEvent("datachanged", this); + }, + + /** + * Query the records by a specified property. + * @param {String} field A field on your records + * @param {String/RegExp} value Either a string that the field + * should start with or a RegExp to test against the field + * @param {Boolean} anyMatch (optional) True to match any part not just the beginning + * @param {Boolean} caseSensitive (optional) True for case sensitive comparison + * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records + */ + query : function(property, value, anyMatch, caseSensitive){ + var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); + return fn ? this.queryBy(fn) : this.data.clone(); + }, + + /** + * Query the cached records in this Store using a filtering function. The specified function + * will be called with each record in this Store. If the function returns true the record is + * included in the results. + * @param {Function} fn The function to be called. It will be passed the following parameters:
          + *
        • record : Ext.data.Record

          The {@link Ext.data.Record record} + * to test for filtering. Access field values using {@link Ext.data.Record#get}.

        • + *
        • id : Object

          The ID of the Record passed.

        • + *
        + * @param {Object} scope (optional) The scope of the function (defaults to this) + * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records + **/ + queryBy : function(fn, scope){ + var data = this.snapshot || this.data; + return data.filterBy(fn, scope||this); + }, + + /** + * Finds the index of the first matching record in this store by a specific property/value. + * @param {String} property A property on your objects + * @param {String/RegExp} value Either string that the property values + * should start with or a RegExp to test against the property. + * @param {Number} startIndex (optional) The index to start searching at + * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning + * @param {Boolean} caseSensitive (optional) True for case sensitive comparison + * @return {Number} The matched index or -1 + */ + find : function(property, value, start, anyMatch, caseSensitive){ + var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); + return fn ? this.data.findIndexBy(fn, null, start) : -1; + }, + + /** + * Find the index of the first matching Record in this Store by a function. + * If the function returns true it is considered a match. + * @param {Function} fn The function to be called. It will be passed the following parameters:
          + *
        • record : Ext.data.Record

          The {@link Ext.data.Record record} + * to test for filtering. Access field values using {@link Ext.data.Record#get}.

        • + *
        • id : Object

          The ID of the Record passed.

        • + *
        + * @param {Object} scope (optional) The scope of the function (defaults to this) + * @param {Number} startIndex (optional) The index to start searching at + * @return {Number} The matched index or -1 + */ + findBy : function(fn, scope, start){ + return this.data.findIndexBy(fn, scope, start); + }, + + /** + * Collects unique values for a particular dataIndex from this store. + * @param {String} dataIndex The property to collect + * @param {Boolean} allowNull (optional) Pass true to allow null, undefined or empty string values + * @param {Boolean} bypassFilter (optional) Pass true to collect from all records, even ones which are filtered + * @return {Array} An array of the unique values + **/ + collect : function(dataIndex, allowNull, bypassFilter){ + var d = (bypassFilter === true && this.snapshot) ? + this.snapshot.items : this.data.items; + var v, sv, r = [], l = {}; + for(var i = 0, len = d.length; i < len; i++){ + v = d[i].data[dataIndex]; + sv = String(v); + if((allowNull || !Ext.isEmpty(v)) && !l[sv]){ + l[sv] = true; + r[r.length] = v; + } + } + return r; + }, + + /** + * Revert to a view of the Record cache with no filtering applied. + * @param {Boolean} suppressEvent If true the filter is cleared silently without notifying listeners + */ + clearFilter : function(suppressEvent){ + if(this.isFiltered()){ + this.data = this.snapshot; + delete this.snapshot; + if(suppressEvent !== true){ + this.fireEvent("datachanged", this); + } + } + }, + + /** + * Returns true if this store is currently filtered + * @return {Boolean} + */ + isFiltered : function(){ + return this.snapshot && this.snapshot != this.data; + }, + + // private + afterEdit : function(record){ + if(this.modified.indexOf(record) == -1){ + this.modified.push(record); + } + this.fireEvent("update", this, record, Ext.data.Record.EDIT); + }, + + // private + afterReject : function(record){ + this.modified.remove(record); + this.fireEvent("update", this, record, Ext.data.Record.REJECT); + }, + + // private + afterCommit : function(record){ + this.modified.remove(record); + this.fireEvent("update", this, record, Ext.data.Record.COMMIT); + }, + + /** + * Commit all Records with outstanding changes. To handle updates for changes, subscribe to the + * Store's "update" event, and perform updating when the third parameter is Ext.data.Record.COMMIT. + */ + commitChanges : function(){ + var m = this.modified.slice(0); + this.modified = []; + for(var i = 0, len = m.length; i < len; i++){ + m[i].commit(); + } + }, + + /** + * Cancel outstanding changes on all changed records. + */ + rejectChanges : function(){ + var m = this.modified.slice(0); + this.modified = []; + for(var i = 0, len = m.length; i < len; i++){ + m[i].reject(); + } + }, + + // private + onMetaChange : function(meta, rtype, o){ + this.recordType = rtype; + this.fields = rtype.prototype.fields; + delete this.snapshot; + this.sortInfo = meta.sortInfo; + this.modified = []; + this.fireEvent('metachange', this, this.reader.meta); + }, + + // private + findInsertIndex : function(record){ + this.suspendEvents(); + var data = this.data.clone(); + this.data.add(record); + this.applySort(); + var index = this.data.indexOf(record); + this.data = data; + this.resumeEvents(); + return index; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/StoreMgr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/StoreMgr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/StoreMgr.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,41 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.StoreMgr + * @extends Ext.util.MixedCollection + * The default global group of stores. + * @singleton + */ +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)); + } + }, + + /** + * Gets a registered Store by id + * @param {String/Object} id The id of the Store or a Store + * @return {Ext.data.Store} + */ + lookup : function(id){ + return typeof id == "object" ? id : this.get(id); + }, + + // getKey implementation for MixedCollection + getKey : function(o){ + return o.storeId || o.id; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Tree.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Tree.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/Tree.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,750 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.Tree + * @extends Ext.util.Observable + * Represents a tree data structure and bubbles all the events for its nodes. The nodes + * in the tree have most standard DOM functionality. + * @constructor + * @param {Node} root (optional) The root node + */ +Ext.data.Tree = function(root){ + this.nodeHash = {}; + /** + * The root node for this tree + * @type Node + */ + this.root = null; + if(root){ + this.setRootNode(root); + } + this.addEvents( + /** + * @event append + * Fires when a new child node is appended to a node in this tree. + * @param {Tree} tree The owner tree + * @param {Node} parent The parent node + * @param {Node} node The newly appended node + * @param {Number} index The index of the newly appended node + */ + "append", + /** + * @event remove + * Fires when a child node is removed from a node in this tree. + * @param {Tree} tree The owner tree + * @param {Node} parent The parent node + * @param {Node} node The child node removed + */ + "remove", + /** + * @event move + * Fires when a node is moved to a new location in the tree + * @param {Tree} tree The owner tree + * @param {Node} node The node moved + * @param {Node} oldParent The old parent of this node + * @param {Node} newParent The new parent of this node + * @param {Number} index The index it was moved to + */ + "move", + /** + * @event insert + * Fires when a new child node is inserted in a node in this tree. + * @param {Tree} tree The owner tree + * @param {Node} parent The parent node + * @param {Node} node The child node inserted + * @param {Node} refNode The child node the node was inserted before + */ + "insert", + /** + * @event beforeappend + * Fires before a new child is appended to a node in this tree, return false to cancel the append. + * @param {Tree} tree The owner tree + * @param {Node} parent The parent node + * @param {Node} node The child node to be appended + */ + "beforeappend", + /** + * @event beforeremove + * Fires before a child is removed from a node in this tree, return false to cancel the remove. + * @param {Tree} tree The owner tree + * @param {Node} parent The parent node + * @param {Node} node The child node to be removed + */ + "beforeremove", + /** + * @event beforemove + * Fires before a node is moved to a new location in the tree. Return false to cancel the move. + * @param {Tree} tree The owner tree + * @param {Node} node The node being moved + * @param {Node} oldParent The parent of the node + * @param {Node} newParent The new parent the node is moving to + * @param {Number} index The index it is being moved to + */ + "beforemove", + /** + * @event beforeinsert + * Fires before a new child is inserted in a node in this tree, return false to cancel the insert. + * @param {Tree} tree The owner tree + * @param {Node} parent The parent node + * @param {Node} node The child node to be inserted + * @param {Node} refNode The child node the node is being inserted before + */ + "beforeinsert" + ); + + Ext.data.Tree.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.Tree, Ext.util.Observable, { + /** + * @cfg {String} pathSeparator + * The token used to separate paths in node ids (defaults to '/'). + */ + pathSeparator: "/", + + // private + proxyNodeEvent : function(){ + return this.fireEvent.apply(this, arguments); + }, + + /** + * Returns the root node for this tree. + * @return {Node} + */ + getRootNode : function(){ + return this.root; + }, + + /** + * Sets the root node for this tree. + * @param {Node} node + * @return {Node} + */ + setRootNode : function(node){ + this.root = node; + node.ownerTree = this; + node.isRoot = true; + this.registerNode(node); + return node; + }, + + /** + * Gets a node in this tree by its id. + * @param {String} id + * @return {Node} + */ + getNodeById : function(id){ + return this.nodeHash[id]; + }, + + // private + registerNode : function(node){ + this.nodeHash[node.id] = node; + }, + + // private + unregisterNode : function(node){ + delete this.nodeHash[node.id]; + }, + + toString : function(){ + return "[Tree"+(this.id?" "+this.id:"")+"]"; + } +}); + +/** + * @class Ext.data.Node + * @extends Ext.util.Observable + * @cfg {Boolean} leaf true if this node is a leaf and does not have children + * @cfg {String} id The id for this node. If one is not specified, one is generated. + * @constructor + * @param {Object} attributes The attributes/config for the node + */ +Ext.data.Node = function(attributes){ + /** + * The attributes supplied for the node. You can use this property to access any custom attributes you supplied. + * @type {Object} + */ + this.attributes = attributes || {}; + this.leaf = this.attributes.leaf; + /** + * The node id. @type String + */ + this.id = this.attributes.id; + if(!this.id){ + this.id = Ext.id(null, "ynode-"); + this.attributes.id = this.id; + } + /** + * All child nodes of this node. @type Array + */ + this.childNodes = []; + if(!this.childNodes.indexOf){ // indexOf is a must + this.childNodes.indexOf = function(o){ + for(var i = 0, len = this.length; i < len; i++){ + if(this[i] == o) return i; + } + return -1; + }; + } + /** + * The parent node for this node. @type Node + */ + this.parentNode = null; + /** + * The first direct child node of this node, or null if this node has no child nodes. @type Node + */ + this.firstChild = null; + /** + * The last direct child node of this node, or null if this node has no child nodes. @type Node + */ + this.lastChild = null; + /** + * The node immediately preceding this node in the tree, or null if there is no sibling node. @type Node + */ + this.previousSibling = null; + /** + * The node immediately following this node in the tree, or null if there is no sibling node. @type Node + */ + this.nextSibling = null; + + this.addEvents({ + /** + * @event append + * Fires when a new child node is appended + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} node The newly appended node + * @param {Number} index The index of the newly appended node + */ + "append" : true, + /** + * @event remove + * Fires when a child node is removed + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} node The removed node + */ + "remove" : true, + /** + * @event move + * Fires when this node is moved to a new location in the tree + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} oldParent The old parent of this node + * @param {Node} newParent The new parent of this node + * @param {Number} index The index it was moved to + */ + "move" : true, + /** + * @event insert + * Fires when a new child node is inserted. + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} node The child node inserted + * @param {Node} refNode The child node the node was inserted before + */ + "insert" : true, + /** + * @event beforeappend + * Fires before a new child is appended, return false to cancel the append. + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} node The child node to be appended + */ + "beforeappend" : true, + /** + * @event beforeremove + * Fires before a child is removed, return false to cancel the remove. + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} node The child node to be removed + */ + "beforeremove" : true, + /** + * @event beforemove + * Fires before this node is moved to a new location in the tree. Return false to cancel the move. + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} oldParent The parent of this node + * @param {Node} newParent The new parent this node is moving to + * @param {Number} index The index it is being moved to + */ + "beforemove" : true, + /** + * @event beforeinsert + * Fires before a new child is inserted, return false to cancel the insert. + * @param {Tree} tree The owner tree + * @param {Node} this This node + * @param {Node} node The child node to be inserted + * @param {Node} refNode The child node the node is being inserted before + */ + "beforeinsert" : true + }); + this.listeners = this.attributes.listeners; + Ext.data.Node.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.Node, Ext.util.Observable, { + // private + fireEvent : function(evtName){ + // first do standard event for this node + if(Ext.data.Node.superclass.fireEvent.apply(this, arguments) === false){ + return false; + } + // then bubble it up to the tree if the event wasn't cancelled + var ot = this.getOwnerTree(); + if(ot){ + if(ot.proxyNodeEvent.apply(ot, arguments) === false){ + return false; + } + } + return true; + }, + + /** + * Returns true if this node is a leaf + * @return {Boolean} + */ + isLeaf : function(){ + return this.leaf === true; + }, + + // private + setFirstChild : function(node){ + this.firstChild = node; + }, + + //private + setLastChild : function(node){ + this.lastChild = node; + }, + + + /** + * Returns true if this node is the last child of its parent + * @return {Boolean} + */ + isLast : function(){ + return (!this.parentNode ? true : this.parentNode.lastChild == this); + }, + + /** + * Returns true if this node is the first child of its parent + * @return {Boolean} + */ + isFirst : function(){ + return (!this.parentNode ? true : this.parentNode.firstChild == this); + }, + + hasChildNodes : function(){ + return !this.isLeaf() && this.childNodes.length > 0; + }, + + /** + * Insert node(s) as the last child node of this node. + * @param {Node/Array} node The node or Array of nodes to append + * @return {Node} The appended node if single append, or null if an array was passed + */ + appendChild : function(node){ + var multi = false; + if(node instanceof Array){ + multi = node; + }else if(arguments.length > 1){ + multi = arguments; + } + // if passed an array or multiple args do them one by one + if(multi){ + for(var i = 0, len = multi.length; i < len; i++) { + this.appendChild(multi[i]); + } + }else{ + if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){ + return false; + } + var index = this.childNodes.length; + var oldParent = node.parentNode; + // it's a move, make sure we move it cleanly + if(oldParent){ + if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index) === false){ + return false; + } + oldParent.removeChild(node); + } + index = this.childNodes.length; + if(index == 0){ + this.setFirstChild(node); + } + this.childNodes.push(node); + node.parentNode = this; + var ps = this.childNodes[index-1]; + if(ps){ + node.previousSibling = ps; + ps.nextSibling = node; + }else{ + node.previousSibling = null; + } + node.nextSibling = null; + this.setLastChild(node); + node.setOwnerTree(this.getOwnerTree()); + this.fireEvent("append", this.ownerTree, this, node, index); + if(oldParent){ + node.fireEvent("move", this.ownerTree, node, oldParent, this, index); + } + return node; + } + }, + + /** + * Removes a child node from this node. + * @param {Node} node The node to remove + * @return {Node} The removed node + */ + removeChild : function(node){ + var index = this.childNodes.indexOf(node); + if(index == -1){ + return false; + } + if(this.fireEvent("beforeremove", this.ownerTree, this, node) === false){ + return false; + } + + // remove it from childNodes collection + this.childNodes.splice(index, 1); + + // update siblings + if(node.previousSibling){ + node.previousSibling.nextSibling = node.nextSibling; + } + if(node.nextSibling){ + node.nextSibling.previousSibling = node.previousSibling; + } + + // update child refs + if(this.firstChild == node){ + this.setFirstChild(node.nextSibling); + } + if(this.lastChild == node){ + this.setLastChild(node.previousSibling); + } + + node.setOwnerTree(null); + // clear any references from the node + node.parentNode = null; + node.previousSibling = null; + node.nextSibling = null; + this.fireEvent("remove", this.ownerTree, this, node); + return node; + }, + + /** + * Inserts the first node before the second node in this nodes childNodes collection. + * @param {Node} node The node to insert + * @param {Node} refNode The node to insert before (if null the node is appended) + * @return {Node} The inserted node + */ + insertBefore : function(node, refNode){ + if(!refNode){ // like standard Dom, refNode can be null for append + return this.appendChild(node); + } + // nothing to do + if(node == refNode){ + return false; + } + + if(this.fireEvent("beforeinsert", this.ownerTree, this, node, refNode) === false){ + return false; + } + var index = this.childNodes.indexOf(refNode); + var oldParent = node.parentNode; + var refIndex = index; + + // when moving internally, indexes will change after remove + if(oldParent == this && this.childNodes.indexOf(node) < index){ + refIndex--; + } + + // it's a move, make sure we move it cleanly + if(oldParent){ + if(node.fireEvent("beforemove", node.getOwnerTree(), node, oldParent, this, index, refNode) === false){ + return false; + } + oldParent.removeChild(node); + } + if(refIndex == 0){ + this.setFirstChild(node); + } + this.childNodes.splice(refIndex, 0, node); + node.parentNode = this; + var ps = this.childNodes[refIndex-1]; + if(ps){ + node.previousSibling = ps; + ps.nextSibling = node; + }else{ + node.previousSibling = null; + } + node.nextSibling = refNode; + refNode.previousSibling = node; + node.setOwnerTree(this.getOwnerTree()); + this.fireEvent("insert", this.ownerTree, this, node, refNode); + if(oldParent){ + node.fireEvent("move", this.ownerTree, node, oldParent, this, refIndex, refNode); + } + return node; + }, + + /** + * Removes this node from it's parent + * @return {Node} this + */ + remove : function(){ + this.parentNode.removeChild(this); + return this; + }, + + /** + * Returns the child node at the specified index. + * @param {Number} index + * @return {Node} + */ + item : function(index){ + return this.childNodes[index]; + }, + + /** + * Replaces one child node in this node with another. + * @param {Node} newChild The replacement node + * @param {Node} oldChild The node to replace + * @return {Node} The replaced node + */ + replaceChild : function(newChild, oldChild){ + this.insertBefore(newChild, oldChild); + this.removeChild(oldChild); + return oldChild; + }, + + /** + * Returns the index of a child node + * @param {Node} node + * @return {Number} The index of the node or -1 if it was not found + */ + indexOf : function(child){ + return this.childNodes.indexOf(child); + }, + + /** + * Returns the tree this node is in. + * @return {Tree} + */ + getOwnerTree : function(){ + // if it doesn't have one, look for one + if(!this.ownerTree){ + var p = this; + while(p){ + if(p.ownerTree){ + this.ownerTree = p.ownerTree; + break; + } + p = p.parentNode; + } + } + return this.ownerTree; + }, + + /** + * Returns depth of this node (the root node has a depth of 0) + * @return {Number} + */ + getDepth : function(){ + var depth = 0; + var p = this; + while(p.parentNode){ + ++depth; + p = p.parentNode; + } + return depth; + }, + + // private + setOwnerTree : function(tree){ + // if it's move, we need to update everyone + if(tree != this.ownerTree){ + if(this.ownerTree){ + this.ownerTree.unregisterNode(this); + } + this.ownerTree = tree; + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].setOwnerTree(tree); + } + if(tree){ + tree.registerNode(this); + } + } + }, + + /** + * Returns the path for this node. The path can be used to expand or select this node programmatically. + * @param {String} attr (optional) The attr to use for the path (defaults to the node's id) + * @return {String} The path + */ + getPath : function(attr){ + attr = attr || "id"; + var p = this.parentNode; + var b = [this.attributes[attr]]; + while(p){ + b.unshift(p.attributes[attr]); + p = p.parentNode; + } + var sep = this.getOwnerTree().pathSeparator; + return sep + b.join(sep); + }, + + /** + * Bubbles up the tree from this node, calling the specified function with each node. The scope (this) of + * function call will be the scope provided or the current node. The arguments to the function + * will be the args provided or the current node. If the function returns false at any point, + * the bubble is stopped. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function (defaults to current node) + * @param {Array} args (optional) The args to call the function with (default to passing the current node) + */ + bubble : function(fn, scope, args){ + var p = this; + while(p){ + if(fn.apply(scope || p, args || [p]) === false){ + break; + } + p = p.parentNode; + } + }, + + /** + * Cascades down the tree from this node, calling the specified function with each node. The scope (this) of + * function call will be the scope provided or the current node. The arguments to the function + * will be the args provided or the current node. If the function returns false at any point, + * the cascade is stopped on that branch. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function (defaults to current node) + * @param {Array} args (optional) The args to call the function with (default to passing the current node) + */ + cascade : function(fn, scope, args){ + if(fn.apply(scope || this, args || [this]) !== false){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].cascade(fn, scope, args); + } + } + }, + + /** + * Interates the child nodes of this node, calling the specified function with each node. The scope (this) of + * function call will be the scope provided or the current node. The arguments to the function + * will be the args provided or the current node. If the function returns false at any point, + * the iteration stops. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function (defaults to current node) + * @param {Array} args (optional) The args to call the function with (default to passing the current node) + */ + eachChild : function(fn, scope, args){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + if(fn.apply(scope || this, args || [cs[i]]) === false){ + break; + } + } + }, + + /** + * Finds the first child that has the attribute with the specified value. + * @param {String} attribute The attribute name + * @param {Mixed} value The value to search for + * @return {Node} The found child or null if none was found + */ + findChild : function(attribute, value){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + if(cs[i].attributes[attribute] == value){ + return cs[i]; + } + } + return null; + }, + + /** + * Finds the first child by a custom function. The child matches if the function passed + * returns true. + * @param {Function} fn + * @param {Object} scope (optional) + * @return {Node} The found child or null if none was found + */ + findChildBy : function(fn, scope){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + if(fn.call(scope||cs[i], cs[i]) === true){ + return cs[i]; + } + } + return null; + }, + + /** + * Sorts this nodes children using the supplied sort function + * @param {Function} fn + * @param {Object} scope (optional) + */ + sort : function(fn, scope){ + var cs = this.childNodes; + var len = cs.length; + if(len > 0){ + var sortFn = scope ? function(){fn.apply(scope, arguments);} : fn; + cs.sort(sortFn); + for(var i = 0; i < len; i++){ + var n = cs[i]; + n.previousSibling = cs[i-1]; + n.nextSibling = cs[i+1]; + if(i == 0){ + this.setFirstChild(n); + } + if(i == len-1){ + this.setLastChild(n); + } + } + } + }, + + /** + * Returns true if this node is an ancestor (at any point) of the passed node. + * @param {Node} node + * @return {Boolean} + */ + contains : function(node){ + return node.isAncestor(this); + }, + + /** + * Returns true if the passed node is an ancestor (at any point) of this node. + * @param {Node} node + * @return {Boolean} + */ + isAncestor : function(node){ + var p = this.parentNode; + while(p){ + if(p == node){ + return true; + } + p = p.parentNode; + } + return false; + }, + + toString : function(){ + return "[Node"+(this.id?" "+this.id:"")+"]"; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/XmlReader.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/XmlReader.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/data/XmlReader.js 4 Dec 2007 02:48:54 -0000 1.1 @@ -0,0 +1,129 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.data.XmlReader + * @extends Ext.data.DataReader + * Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document + * based on mappings in a provided Ext.data.Record constructor.

        + *

        + * Note that in order for the browser to parse a returned XML document, the Content-Type + * header in the HTTP response must be set to "text/xml". + *

        + * Example code: + *

        
        +var Employee = Ext.data.Record.create([
        +   {name: 'name', mapping: 'name'},     // "mapping" property not needed if it's the same as "name"
        +   {name: 'occupation'}                 // This field will use "occupation" as the mapping.
        +]);
        +var myReader = new Ext.data.XmlReader({
        +   totalRecords: "results", // The element which contains the total dataset size (optional)
        +   record: "row",           // The repeated element which contains row information
        +   id: "id"                 // The element within the row that provides an ID for the record (optional)
        +}, Employee);
        +
        + *

        + * This would consume an XML file like this: + *

        
        +<?xml?>
        +<dataset>
        + <results>2</results>
        + <row>
        +   <id>1</id>
        +   <name>Bill</name>
        +   <occupation>Gardener</occupation>
        + </row>
        + <row>
        +   <id>2</id>
        +   <name>Ben</name>
        +   <occupation>Horticulturalist</occupation>
        + </row>
        +</dataset>
        +
        + * @cfg {String} totalRecords The DomQuery path from which to retrieve the total number of records + * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being + * paged from the remote server. + * @cfg {String} record The DomQuery path to the repeated element which contains record information. + * @cfg {String} success The DomQuery path to the success attribute used by forms. + * @cfg {String} id The DomQuery path relative from the record element to the element that contains + * a record identifier value. + * @constructor + * Create a new XmlReader. + * @param {Object} meta Metadata configuration options + * @param {Object} recordType Either an Array of field definition objects as passed to + * {@link Ext.data.Record#create}, or a Record constructor object created using {@link Ext.data.Record#create}. + */ +Ext.data.XmlReader = function(meta, recordType){ + meta = meta || {}; + Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields); +}; +Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, { + /** + * This method is only used by a DataProxy which has retrieved data from a remote server. + * @param {Object} response The XHR object which contains the parsed XML document. The response is expected + * to contain a property called responseXML which refers to an XML document object. + * @return {Object} records A data block which is used by an {@link Ext.data.Store} as + * a cache of Ext.data.Records. + */ + read : function(response){ + var doc = response.responseXML; + if(!doc) { + throw {message: "XmlReader.read: XML Document not available"}; + } + return this.readRecords(doc); + }, + + /** + * Create a data block containing Ext.data.Records from an XML document. + * @param {Object} doc A parsed XML document. + * @return {Object} records A data block which is used by an {@link Ext.data.Store} as + * a cache of Ext.data.Records. + */ + readRecords : function(doc){ + /** + * After any data loads/reads, the raw XML Document is available for further custom processing. + * @type XMLDocument + */ + this.xmlData = doc; + var root = doc.documentElement || doc; + var q = Ext.DomQuery; + var recordType = this.recordType, fields = recordType.prototype.fields; + var sid = this.meta.id; + var totalRecords = 0, success = true; + if(this.meta.totalRecords){ + totalRecords = q.selectNumber(this.meta.totalRecords, root, 0); + } + + if(this.meta.success){ + var sv = q.selectValue(this.meta.success, root, true); + success = sv !== false && sv !== 'false'; + } + var records = []; + var ns = q.select(this.meta.record, root); + for(var i = 0, len = ns.length; i < len; i++) { + var n = ns[i]; + var values = {}; + var id = sid ? q.selectValue(sid, n) : undefined; + for(var j = 0, jlen = fields.length; j < jlen; j++){ + var f = fields.items[j]; + var v = q.selectValue(f.mapping || f.name, n, f.defaultValue); + v = f.convert(v); + values[f.name] = v; + } + var record = new recordType(values, id); + record.node = n; + records[records.length] = record; + } + + return { + success : success, + records : records, + totalRecords : totalRecords || records.length + }; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DDCore.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DDCore.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DDCore.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,2965 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* + * These classes are derivatives of the similarly named classes in the YUI Library. + * The original license: + * Copyright (c) 2006, Yahoo! Inc. All rights reserved. + * Code licensed under the BSD License: + * http://developer.yahoo.net/yui/license.txt + */ + +(function() { + +var Event=Ext.EventManager; +var Dom=Ext.lib.Dom; + +/** + * @class Ext.dd.DragDrop + * Defines the interface and base operation of items that that can be + * dragged or can be drop targets. It was designed to be extended, overriding + * the event handlers for startDrag, onDrag, onDragOver and onDragOut. + * Up to three html elements can be associated with a DragDrop instance: + *
          + *
        • linked element: the element that is passed into the constructor. + * This is the element which defines the boundaries for interaction with + * other DragDrop objects.
        • + *
        • handle element(s): The drag operation only occurs if the element that + * was clicked matches a handle element. By default this is the linked + * element, but there are times that you will want only a portion of the + * linked element to initiate the drag operation, and the setHandleElId() + * method provides a way to define this.
        • + *
        • drag element: this represents the element that would be moved along + * with the cursor during a drag operation. By default, this is the linked + * element itself as in {@link Ext.dd.DD}. setDragElId() lets you define + * a separate element that would be moved, as in {@link Ext.dd.DDProxy}. + *
        • + *
        + * This class should not be instantiated until the onload event to ensure that + * the associated elements are available. + * The following would define a DragDrop obj that would interact with any + * other DragDrop obj in the "group1" group: + *
        + *  dd = new Ext.dd.DragDrop("div1", "group1");
        + * 
        + * Since none of the event handlers have been implemented, nothing would + * actually happen if you were to run the code above. Normally you would + * override this class or one of the default implementations, but you can + * also override the methods you want on an instance of the class... + *
        + *  dd.onDragDrop = function(e, id) {
        + *    alert("dd was dropped on " + id);
        + *  }
        + * 
        + * @constructor + * @param {String} id of the element that is linked to this instance + * @param {String} sGroup the group of related DragDrop objects + * @param {object} config an object containing configurable attributes + * Valid properties for DragDrop: + * padding, isTarget, maintainOffset, primaryButtonOnly + */ +Ext.dd.DragDrop = function(id, sGroup, config) { + if(id) { + this.init(id, sGroup, config); + } +}; + +Ext.dd.DragDrop.prototype = { + + /** + * The id of the element associated with this object. This is what we + * refer to as the "linked element" because the size and position of + * this element is used to determine when the drag and drop objects have + * interacted. + * @property id + * @type String + */ + id: null, + + /** + * Configuration attributes passed into the constructor + * @property config + * @type object + */ + config: null, + + /** + * The id of the element that will be dragged. By default this is same + * as the linked element , but could be changed to another element. Ex: + * Ext.dd.DDProxy + * @property dragElId + * @type String + * @private + */ + dragElId: null, + + /** + * the id of the element that initiates the drag operation. By default + * this is the linked element, but could be changed to be a child of this + * element. This lets us do things like only starting the drag when the + * header element within the linked html element is clicked. + * @property handleElId + * @type String + * @private + */ + handleElId: null, + + /** + * An associative array of HTML tags that will be ignored if clicked. + * @property invalidHandleTypes + * @type {string: string} + */ + invalidHandleTypes: null, + + /** + * An associative array of ids for elements that will be ignored if clicked + * @property invalidHandleIds + * @type {string: string} + */ + invalidHandleIds: null, + + /** + * An indexted array of css class names for elements that will be ignored + * if clicked. + * @property invalidHandleClasses + * @type string[] + */ + invalidHandleClasses: null, + + /** + * The linked element's absolute X position at the time the drag was + * started + * @property startPageX + * @type int + * @private + */ + startPageX: 0, + + /** + * The linked element's absolute X position at the time the drag was + * started + * @property startPageY + * @type int + * @private + */ + startPageY: 0, + + /** + * The group defines a logical collection of DragDrop objects that are + * related. Instances only get events when interacting with other + * DragDrop object in the same group. This lets us define multiple + * groups using a single DragDrop subclass if we want. + * @property groups + * @type object An object in the format {'group1':true, 'group2':true} + */ + groups: null, + + /** + * Individual drag/drop instances can be locked. This will prevent + * onmousedown start drag. + * @property locked + * @type boolean + * @private + */ + locked: false, + + /** + * Lock this instance + * @method lock + */ + lock: function() { this.locked = true; }, + + /** + * Unlock this instace + * @method unlock + */ + unlock: function() { this.locked = false; }, + + /** + * By default, all insances can be a drop target. This can be disabled by + * setting isTarget to false. + * @property isTarget + * @type boolean + */ + isTarget: true, + + /** + * The padding configured for this drag and drop object for calculating + * the drop zone intersection with this object. + * @property padding + * @type int[] An array containing the 4 padding values: [top, right, bottom, left] + */ + padding: null, + + /** + * Cached reference to the linked element + * @property _domRef + * @private + */ + _domRef: null, + + /** + * Internal typeof flag + * @property __ygDragDrop + * @private + */ + __ygDragDrop: true, + + /** + * Set to true when horizontal contraints are applied + * @property constrainX + * @type boolean + * @private + */ + constrainX: false, + + /** + * Set to true when vertical contraints are applied + * @property constrainY + * @type boolean + * @private + */ + constrainY: false, + + /** + * The left constraint + * @property minX + * @type int + * @private + */ + minX: 0, + + /** + * The right constraint + * @property maxX + * @type int + * @private + */ + maxX: 0, + + /** + * The up constraint + * @property minY + * @type int + * @type int + * @private + */ + minY: 0, + + /** + * The down constraint + * @property maxY + * @type int + * @private + */ + maxY: 0, + + /** + * Maintain offsets when we resetconstraints. Set to true when you want + * the position of the element relative to its parent to stay the same + * when the page changes + * + * @property maintainOffset + * @type boolean + */ + maintainOffset: false, + + /** + * Array of pixel locations the element will snap to if we specified a + * horizontal graduation/interval. This array is generated automatically + * when you define a tick interval. + * @property xTicks + * @type int[] + */ + xTicks: null, + + /** + * Array of pixel locations the element will snap to if we specified a + * vertical graduation/interval. This array is generated automatically + * when you define a tick interval. + * @property yTicks + * @type int[] + */ + yTicks: null, + + /** + * By default the drag and drop instance will only respond to the primary + * button click (left button for a right-handed mouse). Set to true to + * allow drag and drop to start with any mouse click that is propogated + * by the browser + * @property primaryButtonOnly + * @type boolean + */ + primaryButtonOnly: true, + + /** + * The availabe property is false until the linked dom element is accessible. + * @property available + * @type boolean + */ + available: false, + + /** + * By default, drags can only be initiated if the mousedown occurs in the + * region the linked element is. This is done in part to work around a + * bug in some browsers that mis-report the mousedown if the previous + * mouseup happened outside of the window. This property is set to true + * if outer handles are defined. + * + * @property hasOuterHandles + * @type boolean + * @default false + */ + hasOuterHandles: false, + + /** + * Code that executes immediately before the startDrag event + * @method b4StartDrag + * @private + */ + b4StartDrag: function(x, y) { }, + + /** + * Abstract method called after a drag/drop object is clicked + * and the drag or mousedown time thresholds have beeen met. + * @method startDrag + * @param {int} X click location + * @param {int} Y click location + */ + startDrag: function(x, y) { /* override this */ }, + + /** + * Code that executes immediately before the onDrag event + * @method b4Drag + * @private + */ + b4Drag: function(e) { }, + + /** + * Abstract method called during the onMouseMove event while dragging an + * object. + * @method onDrag + * @param {Event} e the mousemove event + */ + onDrag: function(e) { /* override this */ }, + + /** + * Abstract method called when this element fist begins hovering over + * another DragDrop obj + * @method onDragEnter + * @param {Event} e the mousemove event + * @param {String|DragDrop[]} id In POINT mode, the element + * id this is hovering over. In INTERSECT mode, an array of one or more + * dragdrop items being hovered over. + */ + onDragEnter: function(e, id) { /* override this */ }, + + /** + * Code that executes immediately before the onDragOver event + * @method b4DragOver + * @private + */ + b4DragOver: function(e) { }, + + /** + * Abstract method called when this element is hovering over another + * DragDrop obj + * @method onDragOver + * @param {Event} e the mousemove event + * @param {String|DragDrop[]} id In POINT mode, the element + * id this is hovering over. In INTERSECT mode, an array of dd items + * being hovered over. + */ + onDragOver: function(e, id) { /* override this */ }, + + /** + * Code that executes immediately before the onDragOut event + * @method b4DragOut + * @private + */ + b4DragOut: function(e) { }, + + /** + * Abstract method called when we are no longer hovering over an element + * @method onDragOut + * @param {Event} e the mousemove event + * @param {String|DragDrop[]} id In POINT mode, the element + * id this was hovering over. In INTERSECT mode, an array of dd items + * that the mouse is no longer over. + */ + onDragOut: function(e, id) { /* override this */ }, + + /** + * Code that executes immediately before the onDragDrop event + * @method b4DragDrop + * @private + */ + b4DragDrop: function(e) { }, + + /** + * Abstract method called when this item is dropped on another DragDrop + * obj + * @method onDragDrop + * @param {Event} e the mouseup event + * @param {String|DragDrop[]} id In POINT mode, the element + * id this was dropped on. In INTERSECT mode, an array of dd items this + * was dropped on. + */ + onDragDrop: function(e, id) { /* override this */ }, + + /** + * Abstract method called when this item is dropped on an area with no + * drop target + * @method onInvalidDrop + * @param {Event} e the mouseup event + */ + onInvalidDrop: function(e) { /* override this */ }, + + /** + * Code that executes immediately before the endDrag event + * @method b4EndDrag + * @private + */ + b4EndDrag: function(e) { }, + + /** + * Fired when we are done dragging the object + * @method endDrag + * @param {Event} e the mouseup event + */ + endDrag: function(e) { /* override this */ }, + + /** + * Code executed immediately before the onMouseDown event + * @method b4MouseDown + * @param {Event} e the mousedown event + * @private + */ + b4MouseDown: function(e) { }, + + /** + * Event handler that fires when a drag/drop obj gets a mousedown + * @method onMouseDown + * @param {Event} e the mousedown event + */ + onMouseDown: function(e) { /* override this */ }, + + /** + * Event handler that fires when a drag/drop obj gets a mouseup + * @method onMouseUp + * @param {Event} e the mouseup event + */ + onMouseUp: function(e) { /* override this */ }, + + /** + * Override the onAvailable method to do what is needed after the initial + * position was determined. + * @method onAvailable + */ + onAvailable: function () { + }, + + /* + * Provides default constraint padding to "constrainTo" elements (defaults to {left: 0, right:0, top:0, bottom:0}). + * @type Object + */ + defaultPadding : {left:0, right:0, top:0, bottom:0}, + + /* + * Initializes the drag drop object's constraints to restrict movement to a certain element. + * + * Usage: +
        
        + var dd = new Ext.dd.DDProxy("dragDiv1", "proxytest",
        +                { dragElId: "existingProxyDiv" });
        + dd.startDrag = function(){
        +     this.constrainTo("parent-id");
        + };
        + 
        + * Or you can initalize it using the {@link Ext.Element} object: +
        
        + Ext.get("dragDiv1").initDDProxy("proxytest", {dragElId: "existingProxyDiv"}, {
        +     startDrag : function(){
        +         this.constrainTo("parent-id");
        +     }
        + });
        + 
        + * @param {Mixed} constrainTo The element to constrain to. + * @param {Object/Number} pad (optional) Pad provides a way to specify "padding" of the constraints, + * and can be either a number for symmetrical padding (4 would be equal to {left:4, right:4, top:4, bottom:4}) or + * an object containing the sides to pad. For example: {right:10, bottom:10} + * @param {Boolean} inContent (optional) Constrain the draggable in the content box of the element (inside padding and borders) + */ + constrainTo : function(constrainTo, pad, inContent){ + if(typeof pad == "number"){ + pad = {left: pad, right:pad, top:pad, bottom:pad}; + } + pad = pad || this.defaultPadding; + var b = Ext.get(this.getEl()).getBox(); + var ce = Ext.get(constrainTo); + var s = ce.getScroll(); + var 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()}; + }else{ + var xy = ce.getXY(); + c = {x : xy[0]+s.left, y: xy[1]+s.top, width: cd.clientWidth, height: cd.clientHeight}; + } + + + var topSpace = b.y - c.y; + var leftSpace = b.x - c.x; + + this.resetConstraints(); + this.setXConstraint(leftSpace - (pad.left||0), // left + c.width - leftSpace - b.width - (pad.right||0), //right + this.xTickSize + ); + this.setYConstraint(topSpace - (pad.top||0), //top + c.height - topSpace - b.height - (pad.bottom||0), //bottom + this.yTickSize + ); + }, + + /** + * Returns a reference to the linked element + * @method getEl + * @return {HTMLElement} the html element + */ + getEl: function() { + if (!this._domRef) { + this._domRef = Ext.getDom(this.id); + } + + return this._domRef; + }, + + /** + * Returns a reference to the actual element to drag. By default this is + * the same as the html element, but it can be assigned to another + * element. An example of this can be found in Ext.dd.DDProxy + * @method getDragEl + * @return {HTMLElement} the html element + */ + getDragEl: function() { + return Ext.getDom(this.dragElId); + }, + + /** + * Sets up the DragDrop object. Must be called in the constructor of any + * Ext.dd.DragDrop subclass + * @method init + * @param id the id of the linked element + * @param {String} sGroup the group of related items + * @param {object} config configuration attributes + */ + init: function(id, sGroup, config) { + this.initTarget(id, sGroup, config); + Event.on(this.id, "mousedown", this.handleMouseDown, this); + // Event.on(this.id, "selectstart", Event.preventDefault); + }, + + /** + * Initializes Targeting functionality only... the object does not + * get a mousedown handler. + * @method initTarget + * @param id the id of the linked element + * @param {String} sGroup the group of related items + * @param {object} config configuration attributes + */ + initTarget: function(id, sGroup, config) { + + // configuration attributes + this.config = config || {}; + + // create a local reference to the drag and drop manager + this.DDM = Ext.dd.DDM; + // initialize the groups array + this.groups = {}; + + // assume that we have an element reference instead of an id if the + // parameter is not a string + if (typeof id !== "string") { + id = Ext.id(id); + } + + // set the id + this.id = id; + + // add to an interaction group + this.addToGroup((sGroup) ? sGroup : "default"); + + // We don't want to register this as the handle with the manager + // so we just set the id rather than calling the setter. + this.handleElId = id; + + // the linked element is the element that gets dragged by default + this.setDragElId(id); + + // by default, clicked anchors will not start drag operations. + this.invalidHandleTypes = { A: "A" }; + this.invalidHandleIds = {}; + this.invalidHandleClasses = []; + + this.applyConfig(); + + this.handleOnAvailable(); + }, + + /** + * Applies the configuration parameters that were passed into the constructor. + * This is supposed to happen at each level through the inheritance chain. So + * a DDProxy implentation will execute apply config on DDProxy, DD, and + * DragDrop in order to get all of the parameters that are available in + * each object. + * @method applyConfig + */ + applyConfig: function() { + + // configurable properties: + // padding, isTarget, maintainOffset, primaryButtonOnly + this.padding = this.config.padding || [0, 0, 0, 0]; + this.isTarget = (this.config.isTarget !== false); + this.maintainOffset = (this.config.maintainOffset); + this.primaryButtonOnly = (this.config.primaryButtonOnly !== false); + + }, + + /** + * Executed when the linked element is available + * @method handleOnAvailable + * @private + */ + handleOnAvailable: function() { + this.available = true; + this.resetConstraints(); + this.onAvailable(); + }, + + /** + * Configures the padding for the target zone in px. Effectively expands + * (or reduces) the virtual object size for targeting calculations. + * Supports css-style shorthand; if only one parameter is passed, all sides + * will have that padding, and if only two are passed, the top and bottom + * will have the first param, the left and right the second. + * @method setPadding + * @param {int} iTop Top pad + * @param {int} iRight Right pad + * @param {int} iBot Bot pad + * @param {int} iLeft Left pad + */ + setPadding: function(iTop, iRight, iBot, iLeft) { + // this.padding = [iLeft, iRight, iTop, iBot]; + if (!iRight && 0 !== iRight) { + this.padding = [iTop, iTop, iTop, iTop]; + } else if (!iBot && 0 !== iBot) { + this.padding = [iTop, iRight, iTop, iRight]; + } else { + this.padding = [iTop, iRight, iBot, iLeft]; + } + }, + + /** + * Stores the initial placement of the linked element. + * @method setInitialPosition + * @param {int} diffX the X offset, default 0 + * @param {int} diffY the Y offset, default 0 + */ + setInitPosition: function(diffX, diffY) { + var el = this.getEl(); + + if (!this.DDM.verifyEl(el)) { + return; + } + + var dx = diffX || 0; + var dy = diffY || 0; + + var p = Dom.getXY( el ); + + this.initPageX = p[0] - dx; + this.initPageY = p[1] - dy; + + this.lastPageX = p[0]; + this.lastPageY = p[1]; + + + this.setStartPosition(p); + }, + + /** + * Sets the start position of the element. This is set when the obj + * is initialized, the reset when a drag is started. + * @method setStartPosition + * @param pos current position (from previous lookup) + * @private + */ + setStartPosition: function(pos) { + var p = pos || Dom.getXY( this.getEl() ); + this.deltaSetXY = null; + + this.startPageX = p[0]; + this.startPageY = p[1]; + }, + + /** + * Add this instance to a group of related drag/drop objects. All + * instances belong to at least one group, and can belong to as many + * groups as needed. + * @method addToGroup + * @param sGroup {string} the name of the group + */ + addToGroup: function(sGroup) { + this.groups[sGroup] = true; + this.DDM.regDragDrop(this, sGroup); + }, + + /** + * Remove's this instance from the supplied interaction group + * @method removeFromGroup + * @param {string} sGroup The group to drop + */ + removeFromGroup: function(sGroup) { + if (this.groups[sGroup]) { + delete this.groups[sGroup]; + } + + this.DDM.removeDDFromGroup(this, sGroup); + }, + + /** + * Allows you to specify that an element other than the linked element + * will be moved with the cursor during a drag + * @method setDragElId + * @param id {string} the id of the element that will be used to initiate the drag + */ + setDragElId: function(id) { + this.dragElId = id; + }, + + /** + * Allows you to specify a child of the linked element that should be + * used to initiate the drag operation. An example of this would be if + * you have a content div with text and links. Clicking anywhere in the + * content area would normally start the drag operation. Use this method + * to specify that an element inside of the content div is the element + * that starts the drag operation. + * @method setHandleElId + * @param id {string} the id of the element that will be used to + * initiate the drag. + */ + setHandleElId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + this.handleElId = id; + this.DDM.regHandle(this.id, id); + }, + + /** + * Allows you to set an element outside of the linked element as a drag + * handle + * @method setOuterHandleElId + * @param id the id of the element that will be used to initiate the drag + */ + setOuterHandleElId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + Event.on(id, "mousedown", + this.handleMouseDown, this); + this.setHandleElId(id); + + this.hasOuterHandles = true; + }, + + /** + * Remove all drag and drop hooks for this element + * @method unreg + */ + unreg: function() { + Event.un(this.id, "mousedown", + this.handleMouseDown); + this._domRef = null; + this.DDM._remove(this); + }, + + destroy : function(){ + this.unreg(); + }, + + /** + * Returns true if this instance is locked, or the drag drop mgr is locked + * (meaning that all drag/drop is disabled on the page.) + * @method isLocked + * @return {boolean} true if this obj or all drag/drop is locked, else + * false + */ + isLocked: function() { + return (this.DDM.isLocked() || this.locked); + }, + + /** + * Fired when this object is clicked + * @method handleMouseDown + * @param {Event} e + * @param {Ext.dd.DragDrop} oDD the clicked dd object (this dd obj) + * @private + */ + handleMouseDown: function(e, oDD){ + if (this.primaryButtonOnly && e.button != 0) { + return; + } + + if (this.isLocked()) { + return; + } + + this.DDM.refreshCache(this.groups); + + var pt = new Ext.lib.Point(Ext.lib.Event.getPageX(e), Ext.lib.Event.getPageY(e)); + if (!this.hasOuterHandles && !this.DDM.isOverTarget(pt, this) ) { + } else { + if (this.clickValidator(e)) { + + // set the initial element position + this.setStartPosition(); + + + this.b4MouseDown(e); + this.onMouseDown(e); + + this.DDM.handleMouseDown(e, this); + + this.DDM.stopEvent(e); + } else { + + + } + } + }, + + clickValidator: function(e) { + var target = e.getTarget(); + return ( this.isValidHandleChild(target) && + (this.id == this.handleElId || + this.DDM.handleWasClicked(target, this.id)) ); + }, + + /** + * Allows you to specify a tag name that should not start a drag operation + * when clicked. This is designed to facilitate embedding links within a + * drag handle that do something other than start the drag. + * @method addInvalidHandleType + * @param {string} tagName the type of element to exclude + */ + addInvalidHandleType: function(tagName) { + var type = tagName.toUpperCase(); + this.invalidHandleTypes[type] = type; + }, + + /** + * Lets you to specify an element id for a child of a drag handle + * that should not initiate a drag + * @method addInvalidHandleId + * @param {string} id the element id of the element you wish to ignore + */ + addInvalidHandleId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + this.invalidHandleIds[id] = id; + }, + + /** + * Lets you specify a css class of elements that will not initiate a drag + * @method addInvalidHandleClass + * @param {string} cssClass the class of the elements you wish to ignore + */ + addInvalidHandleClass: function(cssClass) { + this.invalidHandleClasses.push(cssClass); + }, + + /** + * Unsets an excluded tag name set by addInvalidHandleType + * @method removeInvalidHandleType + * @param {string} tagName the type of element to unexclude + */ + removeInvalidHandleType: function(tagName) { + var type = tagName.toUpperCase(); + // this.invalidHandleTypes[type] = null; + delete this.invalidHandleTypes[type]; + }, + + /** + * Unsets an invalid handle id + * @method removeInvalidHandleId + * @param {string} id the id of the element to re-enable + */ + removeInvalidHandleId: function(id) { + if (typeof id !== "string") { + id = Ext.id(id); + } + delete this.invalidHandleIds[id]; + }, + + /** + * Unsets an invalid css class + * @method removeInvalidHandleClass + * @param {string} cssClass the class of the element(s) you wish to + * re-enable + */ + removeInvalidHandleClass: function(cssClass) { + for (var i=0, len=this.invalidHandleClasses.length; i= this.minX; i = i - iTickSize) { + if (!tickMap[i]) { + this.xTicks[this.xTicks.length] = i; + tickMap[i] = true; + } + } + + for (i = this.initPageX; i <= this.maxX; i = i + iTickSize) { + if (!tickMap[i]) { + this.xTicks[this.xTicks.length] = i; + tickMap[i] = true; + } + } + + this.xTicks.sort(this.DDM.numericSort) ; + }, + + /** + * Create the array of vertical tick marks if an interval was specified in + * setYConstraint(). + * @method setYTicks + * @private + */ + setYTicks: function(iStartY, iTickSize) { + this.yTicks = []; + this.yTickSize = iTickSize; + + var tickMap = {}; + + for (var i = this.initPageY; i >= this.minY; i = i - iTickSize) { + if (!tickMap[i]) { + this.yTicks[this.yTicks.length] = i; + tickMap[i] = true; + } + } + + for (i = this.initPageY; i <= this.maxY; i = i + iTickSize) { + if (!tickMap[i]) { + this.yTicks[this.yTicks.length] = i; + tickMap[i] = true; + } + } + + this.yTicks.sort(this.DDM.numericSort) ; + }, + + /** + * By default, the element can be dragged any place on the screen. Use + * this method to limit the horizontal travel of the element. Pass in + * 0,0 for the parameters if you want to lock the drag to the y axis. + * @method setXConstraint + * @param {int} iLeft the number of pixels the element can move to the left + * @param {int} iRight the number of pixels the element can move to the + * right + * @param {int} iTickSize optional parameter for specifying that the + * element + * should move iTickSize pixels at a time. + */ + setXConstraint: function(iLeft, iRight, iTickSize) { + this.leftConstraint = iLeft; + this.rightConstraint = iRight; + + this.minX = this.initPageX - iLeft; + this.maxX = this.initPageX + iRight; + if (iTickSize) { this.setXTicks(this.initPageX, iTickSize); } + + this.constrainX = true; + }, + + /** + * Clears any constraints applied to this instance. Also clears ticks + * since they can't exist independent of a constraint at this time. + * @method clearConstraints + */ + clearConstraints: function() { + this.constrainX = false; + this.constrainY = false; + this.clearTicks(); + }, + + /** + * Clears any tick interval defined for this instance + * @method clearTicks + */ + clearTicks: function() { + this.xTicks = null; + this.yTicks = null; + this.xTickSize = 0; + this.yTickSize = 0; + }, + + /** + * By default, the element can be dragged any place on the screen. Set + * this to limit the vertical travel of the element. Pass in 0,0 for the + * parameters if you want to lock the drag to the x axis. + * @method setYConstraint + * @param {int} iUp the number of pixels the element can move up + * @param {int} iDown the number of pixels the element can move down + * @param {int} iTickSize optional parameter for specifying that the + * element should move iTickSize pixels at a time. + */ + setYConstraint: function(iUp, iDown, iTickSize) { + this.topConstraint = iUp; + this.bottomConstraint = iDown; + + this.minY = this.initPageY - iUp; + this.maxY = this.initPageY + iDown; + if (iTickSize) { this.setYTicks(this.initPageY, iTickSize); } + + this.constrainY = true; + + }, + + /** + * resetConstraints must be called if you manually reposition a dd element. + * @method resetConstraints + * @param {boolean} maintainOffset + */ + resetConstraints: function() { + + + // Maintain offsets if necessary + if (this.initPageX || this.initPageX === 0) { + // figure out how much this thing has moved + var dx = (this.maintainOffset) ? this.lastPageX - this.initPageX : 0; + var dy = (this.maintainOffset) ? this.lastPageY - this.initPageY : 0; + + this.setInitPosition(dx, dy); + + // This is the first time we have detected the element's position + } else { + this.setInitPosition(); + } + + if (this.constrainX) { + this.setXConstraint( this.leftConstraint, + this.rightConstraint, + this.xTickSize ); + } + + if (this.constrainY) { + this.setYConstraint( this.topConstraint, + this.bottomConstraint, + this.yTickSize ); + } + }, + + /** + * Normally the drag element is moved pixel by pixel, but we can specify + * that it move a number of pixels at a time. This method resolves the + * location when we have it set up like this. + * @method getTick + * @param {int} val where we want to place the object + * @param {int[]} tickArray sorted array of valid points + * @return {int} the closest tick + * @private + */ + getTick: function(val, tickArray) { + + if (!tickArray) { + // If tick interval is not defined, it is effectively 1 pixel, + // so we return the value passed to us. + return val; + } else if (tickArray[0] >= val) { + // The value is lower than the first tick, so we return the first + // tick. + return tickArray[0]; + } else { + for (var i=0, len=tickArray.length; i= val) { + var diff1 = val - tickArray[i]; + var diff2 = tickArray[next] - val; + return (diff2 > diff1) ? tickArray[i] : tickArray[next]; + } + } + + // The value is larger than the last tick, so we return the last + // tick. + return tickArray[tickArray.length - 1]; + } + }, + + /** + * toString method + * @method toString + * @return {string} string representation of the dd obj + */ + toString: function() { + return ("DragDrop " + this.id); + } + +}; + +})(); +/** + * The drag and drop utility provides a framework for building drag and drop + * applications. In addition to enabling drag and drop for specific elements, + * the drag and drop elements are tracked by the manager class, and the + * interactions between the various elements are tracked during the drag and + * the implementing code is notified about these important moments. + */ + +// Only load the library once. Rewriting the manager class would orphan +// existing drag and drop instances. +if (!Ext.dd.DragDropMgr) { + +/** + * @class Ext.dd.DragDropMgr + * DragDropMgr is a singleton that tracks the element interaction for + * all DragDrop items in the window. Generally, you will not call + * this class directly, but it does have helper methods that could + * be useful in your DragDrop implementations. + * @singleton + */ +Ext.dd.DragDropMgr = function() { + + var Event = Ext.EventManager; + + return { + + /** + * Two dimensional Array of registered DragDrop objects. The first + * dimension is the DragDrop item group, the second the DragDrop + * object. + * @property ids + * @type {string: string} + * @private + * @static + */ + ids: {}, + + /** + * Array of element ids defined as drag handles. Used to determine + * if the element that generated the mousedown event is actually the + * handle and not the html element itself. + * @property handleIds + * @type {string: string} + * @private + * @static + */ + handleIds: {}, + + /** + * the DragDrop object that is currently being dragged + * @property dragCurrent + * @type DragDrop + * @private + * @static + **/ + dragCurrent: null, + + /** + * the DragDrop object(s) that are being hovered over + * @property dragOvers + * @type Array + * @private + * @static + */ + dragOvers: {}, + + /** + * the X distance between the cursor and the object being dragged + * @property deltaX + * @type int + * @private + * @static + */ + deltaX: 0, + + /** + * the Y distance between the cursor and the object being dragged + * @property deltaY + * @type int + * @private + * @static + */ + deltaY: 0, + + /** + * Flag to determine if we should prevent the default behavior of the + * events we define. By default this is true, but this can be set to + * false if you need the default behavior (not recommended) + * @property preventDefault + * @type boolean + * @static + */ + preventDefault: true, + + /** + * Flag to determine if we should stop the propagation of the events + * we generate. This is true by default but you may want to set it to + * false if the html element contains other features that require the + * mouse click. + * @property stopPropagation + * @type boolean + * @static + */ + stopPropagation: true, + + /** + * Internal flag that is set to true when drag and drop has been + * intialized + * @property initialized + * @private + * @static + */ + initalized: false, + + /** + * All drag and drop can be disabled. + * @property locked + * @private + * @static + */ + locked: false, + + /** + * Called the first time an element is registered. + * @method init + * @private + * @static + */ + init: function() { + this.initialized = true; + }, + + /** + * In point mode, drag and drop interaction is defined by the + * location of the cursor during the drag/drop + * @property POINT + * @type int + * @static + */ + POINT: 0, + + /** + * In intersect mode, drag and drop interactio nis defined by the + * overlap of two or more drag and drop objects. + * @property INTERSECT + * @type int + * @static + */ + INTERSECT: 1, + + /** + * The current drag and drop mode. Default: POINT + * @property mode + * @type int + * @static + */ + mode: 0, + + /** + * Runs method on all drag and drop objects + * @method _execOnAll + * @private + * @static + */ + _execOnAll: function(sMethod, args) { + for (var i in this.ids) { + for (var j in this.ids[i]) { + var oDD = this.ids[i][j]; + if (! this.isTypeOfDD(oDD)) { + continue; + } + oDD[sMethod].apply(oDD, args); + } + } + }, + + /** + * Drag and drop initialization. Sets up the global event handlers + * @method _onLoad + * @private + * @static + */ + _onLoad: function() { + + this.init(); + + + Event.on(document, "mouseup", this.handleMouseUp, this, true); + Event.on(document, "mousemove", this.handleMouseMove, this, true); + Event.on(window, "unload", this._onUnload, this, true); + Event.on(window, "resize", this._onResize, this, true); + // Event.on(window, "mouseout", this._test); + + }, + + /** + * Reset constraints on all drag and drop objs + * @method _onResize + * @private + * @static + */ + _onResize: function(e) { + this._execOnAll("resetConstraints", []); + }, + + /** + * Lock all drag and drop functionality + * @method lock + * @static + */ + lock: function() { this.locked = true; }, + + /** + * Unlock all drag and drop functionality + * @method unlock + * @static + */ + unlock: function() { this.locked = false; }, + + /** + * Is drag and drop locked? + * @method isLocked + * @return {boolean} True if drag and drop is locked, false otherwise. + * @static + */ + isLocked: function() { return this.locked; }, + + /** + * Location cache that is set for all drag drop objects when a drag is + * initiated, cleared when the drag is finished. + * @property locationCache + * @private + * @static + */ + locationCache: {}, + + /** + * Set useCache to false if you want to force object the lookup of each + * drag and drop linked element constantly during a drag. + * @property useCache + * @type boolean + * @static + */ + useCache: true, + + /** + * The number of pixels that the mouse needs to move after the + * mousedown before the drag is initiated. Default=3; + * @property clickPixelThresh + * @type int + * @static + */ + clickPixelThresh: 3, + + /** + * The number of milliseconds after the mousedown event to initiate the + * drag if we don't get a mouseup event. Default=1000 + * @property clickTimeThresh + * @type int + * @static + */ + clickTimeThresh: 350, + + /** + * Flag that indicates that either the drag pixel threshold or the + * mousdown time threshold has been met + * @property dragThreshMet + * @type boolean + * @private + * @static + */ + dragThreshMet: false, + + /** + * Timeout used for the click time threshold + * @property clickTimeout + * @type Object + * @private + * @static + */ + clickTimeout: null, + + /** + * The X position of the mousedown event stored for later use when a + * drag threshold is met. + * @property startX + * @type int + * @private + * @static + */ + startX: 0, + + /** + * The Y position of the mousedown event stored for later use when a + * drag threshold is met. + * @property startY + * @type int + * @private + * @static + */ + startY: 0, + + /** + * Each DragDrop instance must be registered with the DragDropMgr. + * This is executed in DragDrop.init() + * @method regDragDrop + * @param {DragDrop} oDD the DragDrop object to register + * @param {String} sGroup the name of the group this element belongs to + * @static + */ + regDragDrop: function(oDD, sGroup) { + if (!this.initialized) { this.init(); } + + if (!this.ids[sGroup]) { + this.ids[sGroup] = {}; + } + this.ids[sGroup][oDD.id] = oDD; + }, + + /** + * Removes the supplied dd instance from the supplied group. Executed + * by DragDrop.removeFromGroup, so don't call this function directly. + * @method removeDDFromGroup + * @private + * @static + */ + removeDDFromGroup: function(oDD, sGroup) { + if (!this.ids[sGroup]) { + this.ids[sGroup] = {}; + } + + var obj = this.ids[sGroup]; + if (obj && obj[oDD.id]) { + delete obj[oDD.id]; + } + }, + + /** + * Unregisters a drag and drop item. This is executed in + * DragDrop.unreg, use that method instead of calling this directly. + * @method _remove + * @private + * @static + */ + _remove: function(oDD) { + for (var g in oDD.groups) { + if (g && this.ids[g][oDD.id]) { + delete this.ids[g][oDD.id]; + } + } + delete this.handleIds[oDD.id]; + }, + + /** + * Each DragDrop handle element must be registered. This is done + * automatically when executing DragDrop.setHandleElId() + * @method regHandle + * @param {String} sDDId the DragDrop id this element is a handle for + * @param {String} sHandleId the id of the element that is the drag + * handle + * @static + */ + regHandle: function(sDDId, sHandleId) { + if (!this.handleIds[sDDId]) { + this.handleIds[sDDId] = {}; + } + this.handleIds[sDDId][sHandleId] = sHandleId; + }, + + /** + * Utility function to determine if a given element has been + * registered as a drag drop item. + * @method isDragDrop + * @param {String} id the element id to check + * @return {boolean} true if this element is a DragDrop item, + * false otherwise + * @static + */ + isDragDrop: function(id) { + return ( this.getDDById(id) ) ? true : false; + }, + + /** + * Returns the drag and drop instances that are in all groups the + * passed in instance belongs to. + * @method getRelated + * @param {DragDrop} p_oDD the obj to get related data for + * @param {boolean} bTargetsOnly if true, only return targetable objs + * @return {DragDrop[]} the related instances + * @static + */ + getRelated: function(p_oDD, bTargetsOnly) { + var oDDs = []; + for (var i in p_oDD.groups) { + for (j in this.ids[i]) { + var dd = this.ids[i][j]; + if (! this.isTypeOfDD(dd)) { + continue; + } + if (!bTargetsOnly || dd.isTarget) { + oDDs[oDDs.length] = dd; + } + } + } + + return oDDs; + }, + + /** + * Returns true if the specified dd target is a legal target for + * the specifice drag obj + * @method isLegalTarget + * @param {DragDrop} the drag obj + * @param {DragDrop} the target + * @return {boolean} true if the target is a legal target for the + * dd obj + * @static + */ + isLegalTarget: function (oDD, oTargetDD) { + var targets = this.getRelated(oDD, true); + for (var i=0, len=targets.length;i this.clickPixelThresh || + diffY > this.clickPixelThresh) { + this.startDrag(this.startX, this.startY); + } + } + + if (this.dragThreshMet) { + this.dragCurrent.b4Drag(e); + this.dragCurrent.onDrag(e); + if(!this.dragCurrent.moveOnly){ + this.fireEvents(e, false); + } + } + + this.stopEvent(e); + + return true; + }, + + /** + * Iterates over all of the DragDrop elements to find ones we are + * hovering over or dropping on + * @method fireEvents + * @param {Event} e the event + * @param {boolean} isDrop is this a drop op or a mouseover op? + * @private + * @static + */ + fireEvents: function(e, isDrop) { + var dc = this.dragCurrent; + + // If the user did the mouse up outside of the window, we could + // get here even though we have ended the drag. + if (!dc || dc.isLocked()) { + return; + } + + var pt = e.getPoint(); + + // cache the previous dragOver array + var oldOvers = []; + + var outEvts = []; + var overEvts = []; + var dropEvts = []; + var enterEvts = []; + + // Check to see if the object(s) we were hovering over is no longer + // being hovered over so we can fire the onDragOut event + for (var i in this.dragOvers) { + + var ddo = this.dragOvers[i]; + + if (! this.isTypeOfDD(ddo)) { + continue; + } + + if (! this.isOverTarget(pt, ddo, this.mode)) { + outEvts.push( ddo ); + } + + oldOvers[i] = true; + delete this.dragOvers[i]; + } + + for (var sGroup in dc.groups) { + + if ("string" != typeof sGroup) { + continue; + } + + for (i in this.ids[sGroup]) { + var oDD = this.ids[sGroup][i]; + if (! this.isTypeOfDD(oDD)) { + continue; + } + + if (oDD.isTarget && !oDD.isLocked() && oDD != dc) { + if (this.isOverTarget(pt, oDD, this.mode)) { + // look for drop interactions + if (isDrop) { + dropEvts.push( oDD ); + // look for drag enter and drag over interactions + } else { + + // initial drag over: dragEnter fires + if (!oldOvers[oDD.id]) { + enterEvts.push( oDD ); + // subsequent drag overs: dragOver fires + } else { + overEvts.push( oDD ); + } + + this.dragOvers[oDD.id] = oDD; + } + } + } + } + } + + if (this.mode) { + if (outEvts.length) { + dc.b4DragOut(e, outEvts); + dc.onDragOut(e, outEvts); + } + + if (enterEvts.length) { + dc.onDragEnter(e, enterEvts); + } + + if (overEvts.length) { + dc.b4DragOver(e, overEvts); + dc.onDragOver(e, overEvts); + } + + if (dropEvts.length) { + dc.b4DragDrop(e, dropEvts); + dc.onDragDrop(e, dropEvts); + } + + } else { + // fire dragout events + var len = 0; + for (i=0, len=outEvts.length; i + * Ext.dd.DragDropMgr.refreshCache(ddinstance.groups); + * + * Alternatively: + * + * Ext.dd.DragDropMgr.refreshCache({group1:true, group2:true}); + * + * @TODO this really should be an indexed array. Alternatively this + * method could accept both. + * @method refreshCache + * @param {Object} groups an associative array of groups to refresh + * @static + */ + refreshCache: function(groups) { + for (var sGroup in groups) { + if ("string" != typeof sGroup) { + continue; + } + for (var i in this.ids[sGroup]) { + var oDD = this.ids[sGroup][i]; + + if (this.isTypeOfDD(oDD)) { + // if (this.isTypeOfDD(oDD) && oDD.isTarget) { + var loc = this.getLocation(oDD); + if (loc) { + this.locationCache[oDD.id] = loc; + } else { + delete this.locationCache[oDD.id]; + // this will unregister the drag and drop object if + // the element is not in a usable state + // oDD.unreg(); + } + } + } + } + }, + + /** + * This checks to make sure an element exists and is in the DOM. The + * main purpose is to handle cases where innerHTML is used to remove + * drag and drop objects from the DOM. IE provides an 'unspecified + * error' when trying to access the offsetParent of such an element + * @method verifyEl + * @param {HTMLElement} el the element to check + * @return {boolean} true if the element looks usable + * @static + */ + verifyEl: function(el) { + if (el) { + var parent; + if(Ext.isIE){ + try{ + parent = el.offsetParent; + }catch(e){} + }else{ + parent = el.offsetParent; + } + if (parent) { + return true; + } + } + + return false; + }, + + /** + * Returns a Region object containing the drag and drop element's position + * and size, including the padding configured for it + * @method getLocation + * @param {DragDrop} oDD the drag and drop object to get the + * location for + * @return {Ext.lib.Region} a Region object representing the total area + * the element occupies, including any padding + * the instance is configured for. + * @static + */ + getLocation: function(oDD) { + if (! this.isTypeOfDD(oDD)) { + return null; + } + + var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l; + + try { + pos= Ext.lib.Dom.getXY(el); + } catch (e) { } + + if (!pos) { + return null; + } + + x1 = pos[0]; + x2 = x1 + el.offsetWidth; + y1 = pos[1]; + y2 = y1 + el.offsetHeight; + + t = y1 - oDD.padding[0]; + r = x2 + oDD.padding[1]; + b = y2 + oDD.padding[2]; + l = x1 - oDD.padding[3]; + + return new Ext.lib.Region( t, r, b, l ); + }, + + /** + * Checks the cursor location to see if it over the target + * @method isOverTarget + * @param {Ext.lib.Point} pt The point to evaluate + * @param {DragDrop} oTarget the DragDrop object we are inspecting + * @return {boolean} true if the mouse is over the target + * @private + * @static + */ + isOverTarget: function(pt, oTarget, intersect) { + // use cache if available + var loc = this.locationCache[oTarget.id]; + if (!loc || !this.useCache) { + loc = this.getLocation(oTarget); + this.locationCache[oTarget.id] = loc; + + } + + if (!loc) { + return false; + } + + oTarget.cursorIsOver = loc.contains( pt ); + + // DragDrop is using this as a sanity check for the initial mousedown + // in this case we are done. In POINT mode, if the drag obj has no + // contraints, we are also done. Otherwise we need to evaluate the + // location of the target as related to the actual location of the + // dragged element. + var dc = this.dragCurrent; + if (!dc || !dc.getTargetCoord || + (!intersect && !dc.constrainX && !dc.constrainY)) { + return oTarget.cursorIsOver; + } + + oTarget.overlap = null; + + // Get the current location of the drag element, this is the + // location of the mouse event less the delta that represents + // where the original mousedown happened on the element. We + // need to consider constraints and ticks as well. + var pos = dc.getTargetCoord(pt.x, pt.y); + + var el = dc.getDragEl(); + var curRegion = new Ext.lib.Region( pos.y, + pos.x + el.offsetWidth, + pos.y + el.offsetHeight, + pos.x ); + + var overlap = curRegion.intersect(loc); + + if (overlap) { + oTarget.overlap = overlap; + return (intersect) ? true : oTarget.cursorIsOver; + } else { + return false; + } + }, + + /** + * unload event handler + * @method _onUnload + * @private + * @static + */ + _onUnload: function(e, me) { + Ext.dd.DragDropMgr.unregAll(); + }, + + /** + * Cleans up the drag and drop events and objects. + * @method unregAll + * @private + * @static + */ + unregAll: function() { + + if (this.dragCurrent) { + this.stopDrag(); + this.dragCurrent = null; + } + + this._execOnAll("unreg", []); + + for (var i in this.elementCache) { + delete this.elementCache[i]; + } + + this.elementCache = {}; + this.ids = {}; + }, + + /** + * A cache of DOM elements + * @property elementCache + * @private + * @static + */ + elementCache: {}, + + /** + * Get the wrapper for the DOM element specified + * @method getElWrapper + * @param {String} id the id of the element to get + * @return {Ext.dd.DDM.ElementWrapper} the wrapped element + * @private + * @deprecated This wrapper isn't that useful + * @static + */ + getElWrapper: function(id) { + var oWrapper = this.elementCache[id]; + if (!oWrapper || !oWrapper.el) { + oWrapper = this.elementCache[id] = + new this.ElementWrapper(Ext.getDom(id)); + } + return oWrapper; + }, + + /** + * Returns the actual DOM element + * @method getElement + * @param {String} id the id of the elment to get + * @return {Object} The element + * @deprecated use Ext.lib.Ext.getDom instead + * @static + */ + getElement: function(id) { + return Ext.getDom(id); + }, + + /** + * Returns the style property for the DOM element (i.e., + * document.getElById(id).style) + * @method getCss + * @param {String} id the id of the elment to get + * @return {Object} The style property of the element + * @deprecated use Ext.lib.Dom instead + * @static + */ + getCss: function(id) { + var el = Ext.getDom(id); + return (el) ? el.style : null; + }, + + /** + * Inner class for cached elements + * @class DragDropMgr.ElementWrapper + * @for DragDropMgr + * @private + * @deprecated + */ + ElementWrapper: function(el) { + /** + * The element + * @property el + */ + this.el = el || null; + /** + * The element id + * @property id + */ + this.id = this.el && el.id; + /** + * A reference to the style property + * @property css + */ + this.css = this.el && el.style; + }, + + /** + * Returns the X position of an html element + * @method getPosX + * @param el the element for which to get the position + * @return {int} the X coordinate + * @for DragDropMgr + * @deprecated use Ext.lib.Dom.getX instead + * @static + */ + getPosX: function(el) { + return Ext.lib.Dom.getX(el); + }, + + /** + * Returns the Y position of an html element + * @method getPosY + * @param el the element for which to get the position + * @return {int} the Y coordinate + * @deprecated use Ext.lib.Dom.getY instead + * @static + */ + getPosY: function(el) { + return Ext.lib.Dom.getY(el); + }, + + /** + * Swap two nodes. In IE, we use the native method, for others we + * emulate the IE behavior + * @method swapNode + * @param n1 the first node to swap + * @param n2 the other node to swap + * @static + */ + swapNode: function(n1, n2) { + if (n1.swapNode) { + n1.swapNode(n2); + } else { + var p = n2.parentNode; + var s = n2.nextSibling; + + if (s == n1) { + p.insertBefore(n1, n2); + } else if (n2 == n1.nextSibling) { + p.insertBefore(n2, n1); + } else { + n1.parentNode.replaceChild(n2, n1); + p.insertBefore(n1, s); + } + } + }, + + /** + * Returns the current scroll position + * @method getScroll + * @private + * @static + */ + getScroll: function () { + var t, l, dde=document.documentElement, db=document.body; + if (dde && (dde.scrollTop || dde.scrollLeft)) { + t = dde.scrollTop; + l = dde.scrollLeft; + } else if (db) { + t = db.scrollTop; + l = db.scrollLeft; + } else { + + } + return { top: t, left: l }; + }, + + /** + * Returns the specified element style property + * @method getStyle + * @param {HTMLElement} el the element + * @param {string} styleProp the style property + * @return {string} The value of the style property + * @deprecated use Ext.lib.Dom.getStyle + * @static + */ + getStyle: function(el, styleProp) { + return Ext.fly(el).getStyle(styleProp); + }, + + /** + * Gets the scrollTop + * @method getScrollTop + * @return {int} the document's scrollTop + * @static + */ + getScrollTop: function () { return this.getScroll().top; }, + + /** + * Gets the scrollLeft + * @method getScrollLeft + * @return {int} the document's scrollTop + * @static + */ + getScrollLeft: function () { return this.getScroll().left; }, + + /** + * Sets the x/y position of an element to the location of the + * target element. + * @method moveToEl + * @param {HTMLElement} moveEl The element to move + * @param {HTMLElement} targetEl The position reference element + * @static + */ + moveToEl: function (moveEl, targetEl) { + var aCoord = Ext.lib.Dom.getXY(targetEl); + Ext.lib.Dom.setXY(moveEl, aCoord); + }, + + /** + * Numeric array sort function + * @method numericSort + * @static + */ + numericSort: function(a, b) { return (a - b); }, + + /** + * Internal counter + * @property _timeoutCount + * @private + * @static + */ + _timeoutCount: 0, + + /** + * Trying to make the load order less important. Without this we get + * an error if this file is loaded before the Event Utility. + * @method _addListeners + * @private + * @static + */ + _addListeners: function() { + var DDM = Ext.dd.DDM; + if ( Ext.lib.Event && document ) { + DDM._onLoad(); + } else { + if (DDM._timeoutCount > 2000) { + } else { + setTimeout(DDM._addListeners, 10); + if (document && document.body) { + DDM._timeoutCount += 1; + } + } + } + }, + + /** + * Recursively searches the immediate parent and all child nodes for + * the handle element in order to determine wheter or not it was + * clicked. + * @method handleWasClicked + * @param node the html element to inspect + * @static + */ + handleWasClicked: function(node, id) { + if (this.isHandle(id, node.id)) { + return true; + } else { + // check to see if this is a text node child of the one we want + var p = node.parentNode; + + while (p) { + if (this.isHandle(id, p.id)) { + return true; + } else { + p = p.parentNode; + } + } + } + + return false; + } + + }; + +}(); + +// shorter alias, save a few bytes +Ext.dd.DDM = Ext.dd.DragDropMgr; +Ext.dd.DDM._addListeners(); + +} + +/** + * @class Ext.dd.DD + * A DragDrop implementation where the linked element follows the + * mouse cursor during a drag. + * @extends Ext.dd.DragDrop + * @constructor + * @param {String} id the id of the linked element + * @param {String} sGroup the group of related DragDrop items + * @param {object} config an object containing configurable attributes + * Valid properties for DD: + * scroll + */ +Ext.dd.DD = function(id, sGroup, config) { + if (id) { + this.init(id, sGroup, config); + } +}; + +Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, { + + /** + * When set to true, the utility automatically tries to scroll the browser + * window wehn a drag and drop element is dragged near the viewport boundary. + * Defaults to true. + * @property scroll + * @type boolean + */ + scroll: true, + + /** + * Sets the pointer offset to the distance between the linked element's top + * left corner and the location the element was clicked + * @method autoOffset + * @param {int} iPageX the X coordinate of the click + * @param {int} iPageY the Y coordinate of the click + */ + autoOffset: function(iPageX, iPageY) { + var x = iPageX - this.startPageX; + var y = iPageY - this.startPageY; + this.setDelta(x, y); + }, + + /** + * Sets the pointer offset. You can call this directly to force the + * offset to be in a particular location (e.g., pass in 0,0 to set it + * to the center of the object) + * @method setDelta + * @param {int} iDeltaX the distance from the left + * @param {int} iDeltaY the distance from the top + */ + setDelta: function(iDeltaX, iDeltaY) { + this.deltaX = iDeltaX; + this.deltaY = iDeltaY; + }, + + /** + * Sets the drag element to the location of the mousedown or click event, + * maintaining the cursor location relative to the location on the element + * that was clicked. Override this if you want to place the element in a + * location other than where the cursor is. + * @method setDragElPos + * @param {int} iPageX the X coordinate of the mousedown or drag event + * @param {int} iPageY the Y coordinate of the mousedown or drag event + */ + setDragElPos: function(iPageX, iPageY) { + // the first time we do this, we are going to check to make sure + // the element has css positioning + + var el = this.getDragEl(); + this.alignElWithMouse(el, iPageX, iPageY); + }, + + /** + * Sets the element to the location of the mousedown or click event, + * maintaining the cursor location relative to the location on the element + * that was clicked. Override this if you want to place the element in a + * location other than where the cursor is. + * @method alignElWithMouse + * @param {HTMLElement} el the element to move + * @param {int} iPageX the X coordinate of the mousedown or drag event + * @param {int} iPageY the Y coordinate of the mousedown or drag event + */ + alignElWithMouse: function(el, iPageX, iPageY) { + var oCoord = this.getTargetCoord(iPageX, iPageY); + var fly = el.dom ? el : Ext.fly(el, '_dd'); + if (!this.deltaSetXY) { + var aCoord = [oCoord.x, oCoord.y]; + fly.setXY(aCoord); + var newLeft = fly.getLeft(true); + var newTop = fly.getTop(true); + this.deltaSetXY = [ newLeft - oCoord.x, newTop - oCoord.y ]; + } else { + fly.setLeftTop(oCoord.x + this.deltaSetXY[0], oCoord.y + this.deltaSetXY[1]); + } + + this.cachePosition(oCoord.x, oCoord.y); + this.autoScroll(oCoord.x, oCoord.y, el.offsetHeight, el.offsetWidth); + return oCoord; + }, + + /** + * Saves the most recent position so that we can reset the constraints and + * tick marks on-demand. We need to know this so that we can calculate the + * number of pixels the element is offset from its original position. + * @method cachePosition + * @param iPageX the current x position (optional, this just makes it so we + * don't have to look it up again) + * @param iPageY the current y position (optional, this just makes it so we + * don't have to look it up again) + */ + cachePosition: function(iPageX, iPageY) { + if (iPageX) { + this.lastPageX = iPageX; + this.lastPageY = iPageY; + } else { + var aCoord = Ext.lib.Dom.getXY(this.getEl()); + this.lastPageX = aCoord[0]; + this.lastPageY = aCoord[1]; + } + }, + + /** + * Auto-scroll the window if the dragged object has been moved beyond the + * visible window boundary. + * @method autoScroll + * @param {int} x the drag element's x position + * @param {int} y the drag element's y position + * @param {int} h the height of the drag element + * @param {int} w the width of the drag element + * @private + */ + autoScroll: function(x, y, h, w) { + + if (this.scroll) { + // The client height + var clientH = Ext.lib.Dom.getViewHeight(); + + // The client width + var clientW = Ext.lib.Dom.getViewWidth(); + + // The amt scrolled down + var st = this.DDM.getScrollTop(); + + // The amt scrolled right + var sl = this.DDM.getScrollLeft(); + + // Location of the bottom of the element + var bot = h + y; + + // Location of the right of the element + var right = w + x; + + // The distance from the cursor to the bottom of the visible area, + // adjusted so that we don't scroll if the cursor is beyond the + // element drag constraints + var toBot = (clientH + st - y - this.deltaY); + + // The distance from the cursor to the right of the visible area + var toRight = (clientW + sl - x - this.deltaX); + + + // How close to the edge the cursor must be before we scroll + // var thresh = (document.all) ? 100 : 40; + var thresh = 40; + + // How many pixels to scroll per autoscroll op. This helps to reduce + // clunky scrolling. IE is more sensitive about this ... it needs this + // value to be higher. + var scrAmt = (document.all) ? 80 : 30; + + // Scroll down if we are near the bottom of the visible page and the + // obj extends below the crease + if ( bot > clientH && toBot < thresh ) { + window.scrollTo(sl, st + scrAmt); + } + + // Scroll up if the window is scrolled down and the top of the object + // goes above the top border + if ( y < st && st > 0 && y - st < thresh ) { + window.scrollTo(sl, st - scrAmt); + } + + // Scroll right if the obj is beyond the right border and the cursor is + // near the border. + if ( right > clientW && toRight < thresh ) { + window.scrollTo(sl + scrAmt, st); + } + + // Scroll left if the window has been scrolled to the right and the obj + // extends past the left border + if ( x < sl && sl > 0 && x - sl < thresh ) { + window.scrollTo(sl - scrAmt, st); + } + } + }, + + /** + * Finds the location the element should be placed if we want to move + * it to where the mouse location less the click offset would place us. + * @method getTargetCoord + * @param {int} iPageX the X coordinate of the click + * @param {int} iPageY the Y coordinate of the click + * @return an object that contains the coordinates (Object.x and Object.y) + * @private + */ + getTargetCoord: function(iPageX, iPageY) { + + + var x = iPageX - this.deltaX; + var y = iPageY - this.deltaY; + + if (this.constrainX) { + if (x < this.minX) { x = this.minX; } + if (x > this.maxX) { x = this.maxX; } + } + + if (this.constrainY) { + if (y < this.minY) { y = this.minY; } + if (y > this.maxY) { y = this.maxY; } + } + + x = this.getTick(x, this.xTicks); + y = this.getTick(y, this.yTicks); + + + return {x:x, y:y}; + }, + + /* + * Sets up config options specific to this class. Overrides + * Ext.dd.DragDrop, but all versions of this method through the + * inheritance chain are called + */ + applyConfig: function() { + Ext.dd.DD.superclass.applyConfig.call(this); + this.scroll = (this.config.scroll !== false); + }, + + /* + * Event that fires prior to the onMouseDown event. Overrides + * Ext.dd.DragDrop. + */ + b4MouseDown: function(e) { + // this.resetConstraints(); + this.autoOffset(e.getPageX(), + e.getPageY()); + }, + + /* + * Event that fires prior to the onDrag event. Overrides + * Ext.dd.DragDrop. + */ + b4Drag: function(e) { + this.setDragElPos(e.getPageX(), + e.getPageY()); + }, + + toString: function() { + return ("DD " + this.id); + } + + ////////////////////////////////////////////////////////////////////////// + // Debugging ygDragDrop events that can be overridden + ////////////////////////////////////////////////////////////////////////// + /* + startDrag: function(x, y) { + }, + + onDrag: function(e) { + }, + + onDragEnter: function(e, id) { + }, + + onDragOver: function(e, id) { + }, + + onDragOut: function(e, id) { + }, + + onDragDrop: function(e, id) { + }, + + endDrag: function(e) { + } + + */ + +}); +/** + * @class Ext.dd.DDProxy + * A DragDrop implementation that inserts an empty, bordered div into + * the document that follows the cursor during drag operations. At the time of + * the click, the frame div is resized to the dimensions of the linked html + * element, and moved to the exact location of the linked element. + * + * References to the "frame" element refer to the single proxy element that + * was created to be dragged in place of all DDProxy elements on the + * page. + * + * @extends Ext.dd.DD + * @constructor + * @param {String} id the id of the linked html element + * @param {String} sGroup the group of related DragDrop objects + * @param {object} config an object containing configurable attributes + * Valid properties for DDProxy in addition to those in DragDrop: + * resizeFrame, centerFrame, dragElId + */ +Ext.dd.DDProxy = function(id, sGroup, config) { + if (id) { + this.init(id, sGroup, config); + this.initFrame(); + } +}; + +/** + * The default drag frame div id + * @property Ext.dd.DDProxy.dragElId + * @type String + * @static + */ +Ext.dd.DDProxy.dragElId = "ygddfdiv"; + +Ext.extend(Ext.dd.DDProxy, Ext.dd.DD, { + + /** + * By default we resize the drag frame to be the same size as the element + * we want to drag (this is to get the frame effect). We can turn it off + * if we want a different behavior. + * @property resizeFrame + * @type boolean + */ + resizeFrame: true, + + /** + * By default the frame is positioned exactly where the drag element is, so + * we use the cursor offset provided by Ext.dd.DD. Another option that works only if + * you do not have constraints on the obj is to have the drag frame centered + * around the cursor. Set centerFrame to true for this effect. + * @property centerFrame + * @type boolean + */ + centerFrame: false, + + /** + * Creates the proxy element if it does not yet exist + * @method createFrame + */ + createFrame: function() { + var self = this; + var body = document.body; + + if (!body || !body.firstChild) { + setTimeout( function() { self.createFrame(); }, 50 ); + return; + } + + var div = this.getDragEl(); + + if (!div) { + div = document.createElement("div"); + div.id = this.dragElId; + var s = div.style; + + s.position = "absolute"; + s.visibility = "hidden"; + s.cursor = "move"; + s.border = "2px solid #aaa"; + s.zIndex = 999; + + // appendChild can blow up IE if invoked prior to the window load event + // while rendering a table. It is possible there are other scenarios + // that would cause this to happen as well. + body.insertBefore(div, body.firstChild); + } + }, + + /** + * Initialization for the drag frame element. Must be called in the + * constructor of all subclasses + * @method initFrame + */ + initFrame: function() { + this.createFrame(); + }, + + applyConfig: function() { + Ext.dd.DDProxy.superclass.applyConfig.call(this); + + this.resizeFrame = (this.config.resizeFrame !== false); + this.centerFrame = (this.config.centerFrame); + this.setDragElId(this.config.dragElId || Ext.dd.DDProxy.dragElId); + }, + + /** + * Resizes the drag frame to the dimensions of the clicked object, positions + * it over the object, and finally displays it + * @method showFrame + * @param {int} iPageX X click position + * @param {int} iPageY Y click position + * @private + */ + showFrame: function(iPageX, iPageY) { + var el = this.getEl(); + var dragEl = this.getDragEl(); + var s = dragEl.style; + + this._resizeProxy(); + + if (this.centerFrame) { + this.setDelta( Math.round(parseInt(s.width, 10)/2), + Math.round(parseInt(s.height, 10)/2) ); + } + + this.setDragElPos(iPageX, iPageY); + + Ext.fly(dragEl).show(); + }, + + /** + * The proxy is automatically resized to the dimensions of the linked + * element when a drag is initiated, unless resizeFrame is set to false + * @method _resizeProxy + * @private + */ + _resizeProxy: function() { + if (this.resizeFrame) { + var el = this.getEl(); + Ext.fly(this.getDragEl()).setSize(el.offsetWidth, el.offsetHeight); + } + }, + + // overrides Ext.dd.DragDrop + b4MouseDown: function(e) { + var x = e.getPageX(); + var y = e.getPageY(); + this.autoOffset(x, y); + this.setDragElPos(x, y); + }, + + // overrides Ext.dd.DragDrop + b4StartDrag: function(x, y) { + // show the drag frame + this.showFrame(x, y); + }, + + // overrides Ext.dd.DragDrop + b4EndDrag: function(e) { + Ext.fly(this.getDragEl()).hide(); + }, + + // overrides Ext.dd.DragDrop + // By default we try to move the element to the last location of the frame. + // This is so that the default behavior mirrors that of Ext.dd.DD. + endDrag: function(e) { + + var lel = this.getEl(); + var del = this.getDragEl(); + + // Show the drag frame briefly so we can get its position + del.style.visibility = ""; + + this.beforeMove(); + // Hide the linked element before the move to get around a Safari + // rendering bug. + lel.style.visibility = "hidden"; + Ext.dd.DDM.moveToEl(lel, del); + del.style.visibility = "hidden"; + lel.style.visibility = ""; + + this.afterDrag(); + }, + + beforeMove : function(){ + + }, + + afterDrag : function(){ + + }, + + toString: function() { + return ("DDProxy " + this.id); + } + +}); +/** + * @class Ext.dd.DDTarget + * A DragDrop implementation that does not move, but can be a drop + * target. You would get the same result by simply omitting implementation + * for the event callbacks, but this way we reduce the processing cost of the + * event listener and the callbacks. + * @extends Ext.dd.DragDrop + * @constructor + * @param {String} id the id of the element that is a drop target + * @param {String} sGroup the group of related DragDrop objects + * @param {object} config an object containing configurable attributes + * Valid properties for DDTarget in addition to those in + * DragDrop: + * none + */ +Ext.dd.DDTarget = function(id, sGroup, config) { + if (id) { + this.initTarget(id, sGroup, config); + } +}; + +// Ext.dd.DDTarget.prototype = new Ext.dd.DragDrop(); +Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, { + toString: function() { + return ("DDTarget " + this.id); + } +}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragSource.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragSource.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragSource.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,367 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.dd.DragSource + * @extends Ext.dd.DDProxy + * A simple class that provides the basic implementation needed to make any element draggable. + * @constructor + * @param {Mixed} el The container element + * @param {Object} config + */ +Ext.dd.DragSource = function(el, config){ + this.el = Ext.get(el); + 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, + {dragElId : this.proxy.id, resizeFrame: false, isTarget: false, scroll: this.scroll === true}); + + this.dragging = false; +}; + +Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, { + /** + * @cfg {String} ddGroup + * A named drag drop group to which this object belongs. If a group is specified, then this object will only + * interact with other drag drop objects in the same group (defaults to undefined). + */ + /** + * @cfg {String} dropAllowed + * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok"). + */ + dropAllowed : "x-dd-drop-ok", + /** + * @cfg {String} dropNotAllowed + * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop"). + */ + dropNotAllowed : "x-dd-drop-nodrop", + + /** + * Returns the data object associated with this drag source + * @return {Object} data An object containing arbitrary data + */ + getDragData : function(e){ + return this.dragData; + }, + + // private + onDragEnter : function(e, id){ + var target = Ext.dd.DragDropMgr.getDDById(id); + this.cachedTarget = target; + if(this.beforeDragEnter(target, e, id) !== false){ + if(target.isNotifyTarget){ + var status = target.notifyEnter(this, e, this.dragData); + this.proxy.setStatus(status); + }else{ + this.proxy.setStatus(this.dropAllowed); + } + + if(this.afterDragEnter){ + /** + * An empty function by default, but provided so that you can perform a custom action + * when the dragged item enters the drop target by providing an implementation. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @method afterDragEnter + */ + this.afterDragEnter(target, e, id); + } + } + }, + + /** + * An empty function by default, but provided so that you can perform a custom action + * before the dragged item enters the drop target and optionally cancel the onDragEnter. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @return {Boolean} isValid True if the drag event is valid, else false to cancel + */ + beforeDragEnter : function(target, e, id){ + return true; + }, + + // private + alignElWithMouse: function() { + Ext.dd.DragSource.superclass.alignElWithMouse.apply(this, arguments); + this.proxy.sync(); + }, + + // private + onDragOver : function(e, id){ + var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); + if(this.beforeDragOver(target, e, id) !== false){ + if(target.isNotifyTarget){ + var status = target.notifyOver(this, e, this.dragData); + this.proxy.setStatus(status); + } + + if(this.afterDragOver){ + /** + * An empty function by default, but provided so that you can perform a custom action + * while the dragged item is over the drop target by providing an implementation. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @method afterDragOver + */ + this.afterDragOver(target, e, id); + } + } + }, + + /** + * An empty function by default, but provided so that you can perform a custom action + * while the dragged item is over the drop target and optionally cancel the onDragOver. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @return {Boolean} isValid True if the drag event is valid, else false to cancel + */ + beforeDragOver : function(target, e, id){ + return true; + }, + + // private + onDragOut : function(e, id){ + var target = this.cachedTarget || Ext.dd.DragDropMgr.getDDById(id); + if(this.beforeDragOut(target, e, id) !== false){ + if(target.isNotifyTarget){ + target.notifyOut(this, e, this.dragData); + } + this.proxy.reset(); + if(this.afterDragOut){ + /** + * An empty function by default, but provided so that you can perform a custom action + * after the dragged item is dragged out of the target without dropping. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @method afterDragOut + */ + this.afterDragOut(target, e, id); + } + } + this.cachedTarget = null; + }, + + /** + * An empty function by default, but provided so that you can perform a custom action before the dragged + * item is dragged out of the target without dropping, and optionally cancel the onDragOut. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @return {Boolean} isValid True if the drag event is valid, else false to cancel + */ + beforeDragOut : function(target, e, id){ + return true; + }, + + // private + 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)){ // valid drop? + this.onValidDrop(target, e, id); + }else{ + this.onInvalidDrop(target, e, id); + } + }else{ + this.onValidDrop(target, e, id); + } + + if(this.afterDragDrop){ + /** + * An empty function by default, but provided so that you can perform a custom action + * after a valid drag drop has occurred by providing an implementation. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dropped element + * @method afterDragDrop + */ + this.afterDragDrop(target, e, id); + } + } + delete this.cachedTarget; + }, + + /** + * An empty function by default, but provided so that you can perform a custom action before the dragged + * item is dropped onto the target and optionally cancel the onDragDrop. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @return {Boolean} isValid True if the drag drop event is valid, else false to cancel + */ + beforeDragDrop : function(target, e, id){ + return true; + }, + + // private + onValidDrop : function(target, e, id){ + this.hideProxy(); + if(this.afterValidDrop){ + /** + * An empty function by default, but provided so that you can perform a custom action + * after a valid drop has occurred by providing an implementation. + * @param {Object} target The target DD + * @param {Event} e The event object + * @param {String} id The id of the dropped element + * @method afterInvalidDrop + */ + this.afterValidDrop(target, e, id); + } + }, + + // private + getRepairXY : function(e, data){ + return this.el.getXY(); + }, + + // private + onInvalidDrop : function(target, e, id){ + this.beforeInvalidDrop(target, e, id); + if(this.cachedTarget){ + if(this.cachedTarget.isNotifyTarget){ + this.cachedTarget.notifyOut(this, e, this.dragData); + } + this.cacheTarget = null; + } + this.proxy.repair(this.getRepairXY(e, this.dragData), this.afterRepair, this); + + if(this.afterInvalidDrop){ + /** + * An empty function by default, but provided so that you can perform a custom action + * after an invalid drop has occurred by providing an implementation. + * @param {Event} e The event object + * @param {String} id The id of the dropped element + * @method afterInvalidDrop + */ + this.afterInvalidDrop(e, id); + } + }, + + // private + afterRepair : function(){ + if(Ext.enableFx){ + this.el.highlight(this.hlColor || "c3daf9"); + } + this.dragging = false; + }, + + /** + * An empty function by default, but provided so that you can perform a custom action after an invalid + * drop has occurred. + * @param {Ext.dd.DragDrop} target The drop target + * @param {Event} e The event object + * @param {String} id The id of the dragged element + * @return {Boolean} isValid True if the invalid drop should proceed, else false to cancel + */ + beforeInvalidDrop : function(target, e, id){ + return true; + }, + + // private + handleMouseDown : function(e){ + if(this.dragging) { + return; + } + var data = this.getDragData(e); + if(data && this.onBeforeDrag(data, e) !== false){ + this.dragData = data; + this.proxy.stop(); + Ext.dd.DragSource.superclass.handleMouseDown.apply(this, arguments); + } + }, + + /** + * An empty function by default, but provided so that you can perform a custom action before the initial + * drag event begins and optionally cancel it. + * @param {Object} data An object containing arbitrary data to be shared with drop targets + * @param {Event} e The event object + * @return {Boolean} isValid True if the drag event is valid, else false to cancel + */ + onBeforeDrag : function(data, e){ + return true; + }, + + /** + * An empty function by default, but provided so that you can perform a custom action once the initial + * drag event has begun. The drag cannot be canceled from this function. + * @param {Number} x The x position of the click on the dragged object + * @param {Number} y The y position of the click on the dragged object + */ + onStartDrag : Ext.emptyFn, + + // private override + startDrag : function(x, y){ + this.proxy.reset(); + this.dragging = true; + this.proxy.update(""); + this.onInitDrag(x, y); + this.proxy.show(); + }, + + // private + onInitDrag : function(x, y){ + var clone = this.el.dom.cloneNode(true); + clone.id = Ext.id(); // prevent duplicate ids + this.proxy.update(clone); + this.onStartDrag(x, y); + return true; + }, + + /** + * Returns the drag source's underlying {@link Ext.dd.StatusProxy} + * @return {Ext.dd.StatusProxy} proxy The StatusProxy + */ + getProxy : function(){ + return this.proxy; + }, + + /** + * Hides the drag source's {@link Ext.dd.StatusProxy} + */ + hideProxy : function(){ + this.proxy.hide(); + this.proxy.reset(true); + this.dragging = false; + }, + + // private + triggerCacheRefresh : function(){ + Ext.dd.DDM.refreshCache(this.groups); + }, + + // private - override to prevent hiding + b4EndDrag: function(e) { + }, + + // private - override to prevent moving + endDrag : function(e){ + this.onEndDrag(this.dragData, e); + }, + + // private + onEndDrag : function(data, e){ + }, + + // private - pin to cursor + autoOffset : function(x, y) { + this.setDelta(-12, -20); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragTracker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragTracker.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragTracker.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,160 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.dd.DragTracker = 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); + } +} + +Ext.extend(Ext.dd.DragTracker, Ext.util.Observable, { + active: false, + tolerance: 5, + autoStart: false, + + initEl: function(el){ + this.el = Ext.get(el); + el.on('mousedown', this.onMouseDown, this, + this.delegate ? {delegate: this.delegate} : undefined); + }, + + destroy : function(){ + this.el.un('mousedown', this.onMouseDown, this); + }, + + onMouseDown: function(e, target){ + if(this.fireEvent('mousedown', this, e) !== false && this.onBeforeStart(e) !== false){ + this.startXY = this.lastXY = e.getXY(); + this.dragTarget = this.delegate ? target : this.el.dom; + e.preventDefault(); + var doc = Ext.getDoc(); + doc.on('mouseup', this.onMouseUp, this); + doc.on('mousemove', this.onMouseMove, this); + doc.on('selectstart', this.stopSelect, this); + if(this.autoStart){ + this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this); + } + } + }, + + onMouseMove: function(e, target){ + e.preventDefault(); + var xy = e.getXY(), s = this.startXY; + this.lastXY = xy; + if(!this.active){ + if(Math.abs(s[0]-xy[0]) > this.tolerance || Math.abs(s[1]-xy[1]) > this.tolerance){ + this.triggerStart(); + }else{ + return; + } + } + this.fireEvent('mousemove', this, e); + this.onDrag(e); + this.fireEvent('drag', this, e); + }, + + onMouseUp: function(e){ + var doc = Ext.getDoc(); + doc.un('mousemove', this.onMouseMove, this); + doc.un('mouseup', this.onMouseUp, this); + doc.un('selectstart', this.stopSelect, this); + e.preventDefault(); + this.clearStart(); + this.active = false; + delete this.elRegion; + this.fireEvent('mouseup', this, e); + this.onEnd(e); + this.fireEvent('dragend', this, e); + }, + + triggerStart: function(isTimer){ + this.clearStart(); + this.active = true; + this.onStart(this.startXY); + this.fireEvent('dragstart', this, this.startXY); + }, + + clearStart : function(){ + if(this.timer){ + clearTimeout(this.timer); + delete this.timer; + } + }, + + stopSelect : function(e){ + e.stopEvent(); + return false; + }, + + onBeforeStart : function(e){ + + }, + + onStart : function(xy){ + + }, + + onDrag : function(e){ + + }, + + onEnd : function(e){ + + }, + + getDragTarget : function(){ + return this.dragTarget; + }, + + getDragCt : function(){ + return this.el; + }, + + getXY : function(constrain){ + return constrain ? + this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY; + }, + + getOffset : function(constrain){ + var xy = this.getXY(constrain); + var s = this.startXY; + return [s[0]-xy[0], s[1]-xy[1]]; + }, + + constrainModes: { + 'point' : function(xy){ + + if(!this.elRegion){ + this.elRegion = this.getDragCt().getRegion(); + } + + var dr = this.dragRegion; + + dr.left = xy[0]; + dr.top = xy[1]; + dr.right = xy[0]; + dr.bottom = xy[1]; + + dr.constrainTo(this.elRegion); + + return [dr.left, dr.top]; + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragZone.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragZone.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DragZone.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,79 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.dd.DragZone + * @extends Ext.dd.DragSource + * This class provides a container DD instance that proxies for multiple child node sources.
        + * By default, this class requires that draggable child nodes are registered with {@link Ext.dd.Registry}. + * @constructor + * @param {Mixed} el The container element + * @param {Object} config + */ +Ext.dd.DragZone = function(el, config){ + Ext.dd.DragZone.superclass.constructor.call(this, el, config); + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.el); + } +}; + +Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, { + /** + * @cfg {Boolean} containerScroll True to register this container with the Scrollmanager + * for auto scrolling during drag operations. + */ + /** + * @cfg {String} hlColor The color to use when visually highlighting the drag source in the afterRepair + * method after a failed drop (defaults to "c3daf9" - light blue) + */ + + /** + * Called when a mousedown occurs in this container. Looks in {@link Ext.dd.Registry} + * for a valid target to drag based on the mouse down. Override this method + * to provide your own lookup logic (e.g. finding a child by class name). Make sure your returned + * object has a "ddel" attribute (with an HTML Element) for other functions to work. + * @param {EventObject} e The mouse down event + * @return {Object} The dragData + */ + getDragData : function(e){ + return Ext.dd.Registry.getHandleFromEvent(e); + }, + + /** + * Called once drag threshold has been reached to initialize the proxy element. By default, it clones the + * this.dragData.ddel + * @param {Number} x The x position of the click on the dragged object + * @param {Number} y The y position of the click on the dragged object + * @return {Boolean} true to continue the drag, false to cancel + */ + onInitDrag : function(x, y){ + this.proxy.update(this.dragData.ddel.cloneNode(true)); + this.onStartDrag(x, y); + return true; + }, + + /** + * Called after a repair of an invalid drop. By default, highlights this.dragData.ddel + */ + afterRepair : function(){ + if(Ext.enableFx){ + Ext.Element.fly(this.dragData.ddel).highlight(this.hlColor || "c3daf9"); + } + this.dragging = false; + }, + + /** + * Called before a repair of an invalid drop to get the XY to animate to. By default returns + * the XY of this.dragData.ddel + * @param {EventObject} e The mouse up event + * @return {Array} The xy location (e.g. [100, 200]) + */ + getRepairXY : function(e){ + return Ext.Element.fly(this.dragData.ddel).getXY(); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DropTarget.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DropTarget.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DropTarget.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,117 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.dd.DropTarget + * @extends Ext.dd.DDTarget + * A simple class that provides the basic implementation needed to make any element a drop target that can have + * draggable items dropped onto it. The drop has no effect until an implementation of notifyDrop is provided. + * @constructor + * @param {Mixed} el The container element + * @param {Object} config + */ +Ext.dd.DropTarget = 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.extend(Ext.dd.DropTarget, Ext.dd.DDTarget, { + /** + * @cfg {String} ddGroup + * A named drag drop group to which this object belongs. If a group is specified, then this object will only + * interact with other drag drop objects in the same group (defaults to undefined). + */ + /** + * @cfg {String} overClass + * The CSS class applied to the drop target element while the drag source is over it (defaults to ""). + */ + /** + * @cfg {String} dropAllowed + * The CSS class returned to the drag source when drop is allowed (defaults to "x-dd-drop-ok"). + */ + dropAllowed : "x-dd-drop-ok", + /** + * @cfg {String} dropNotAllowed + * The CSS class returned to the drag source when drop is not allowed (defaults to "x-dd-drop-nodrop"). + */ + dropNotAllowed : "x-dd-drop-nodrop", + + // private + isTarget : true, + + // private + isNotifyTarget : true, + + /** + * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source is now over the + * target. This default implementation adds the CSS class specified by overClass (if any) to the drop element + * and returns the dropAllowed config value. This method should be overridden if drop validation is required. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {String} status The CSS class that communicates the drop status back to the source so that the + * underlying {@link Ext.dd.StatusProxy} can be updated + */ + notifyEnter : function(dd, e, data){ + if(this.overClass){ + this.el.addClass(this.overClass); + } + return this.dropAllowed; + }, + + /** + * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the target. + * This method will be called on every mouse movement while the drag source is over the drop target. + * This default implementation simply returns the dropAllowed config value. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {String} status The CSS class that communicates the drop status back to the source so that the + * underlying {@link Ext.dd.StatusProxy} can be updated + */ + notifyOver : function(dd, e, data){ + return this.dropAllowed; + }, + + /** + * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the source has been dragged + * out of the target without dropping. This default implementation simply removes the CSS class specified by + * overClass (if any) from the drop element. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + */ + notifyOut : function(dd, e, data){ + if(this.overClass){ + this.el.removeClass(this.overClass); + } + }, + + /** + * The function a {@link Ext.dd.DragSource} calls once to notify this drop target that the dragged item has + * been dropped on it. This method has no default implementation and returns false, so you must provide an + * implementation that does something to process the drop event and returns true so that the drag source's + * repair action does not run. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {Boolean} True if the drop was valid, else false + */ + notifyDrop : function(dd, e, data){ + return false; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DropZone.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DropZone.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/DropZone.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,208 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.dd.DropZone + * @extends Ext.dd.DropTarget + * This class provides a container DD instance that proxies for multiple child node targets.
        + * By default, this class requires that child nodes accepting drop are registered with {@link Ext.dd.Registry}. + * @constructor + * @param {Mixed} el The container element + * @param {Object} config + */ +Ext.dd.DropZone = function(el, config){ + Ext.dd.DropZone.superclass.constructor.call(this, el, config); +}; + +Ext.extend(Ext.dd.DropZone, Ext.dd.DropTarget, { + /** + * Returns a custom data object associated with the DOM node that is the target of the event. By default + * this looks up the event target in the {@link Ext.dd.Registry}, although you can override this method to + * provide your own custom lookup. + * @param {Event} e The event + * @return {Object} data The custom data + */ + getTargetFromEvent : function(e){ + return Ext.dd.Registry.getTargetFromEvent(e); + }, + + /** + * Called internally when the DropZone determines that a {@link Ext.dd.DragSource} has entered a drop node + * that it has registered. This method has no default implementation and should be overridden to provide + * node-specific processing if necessary. + * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from + * {@link #getTargetFromEvent} for this node) + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + */ + onNodeEnter : function(n, dd, e, data){ + + }, + + /** + * Called internally while the DropZone determines that a {@link Ext.dd.DragSource} is over a drop node + * that it has registered. The default implementation returns this.dropNotAllowed, so it should be + * overridden to provide the proper feedback. + * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from + * {@link #getTargetFromEvent} for this node) + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {String} status The CSS class that communicates the drop status back to the source so that the + * underlying {@link Ext.dd.StatusProxy} can be updated + */ + onNodeOver : function(n, dd, e, data){ + return this.dropAllowed; + }, + + /** + * Called internally when the DropZone determines that a {@link Ext.dd.DragSource} has been dragged out of + * the drop node without dropping. This method has no default implementation and should be overridden to provide + * node-specific processing if necessary. + * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from + * {@link #getTargetFromEvent} for this node) + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + */ + onNodeOut : function(n, dd, e, data){ + + }, + + /** + * Called internally when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped onto + * the drop node. The default implementation returns false, so it should be overridden to provide the + * appropriate processing of the drop event and return true so that the drag source's repair action does not run. + * @param {Object} nodeData The custom data associated with the drop node (this is the same value returned from + * {@link #getTargetFromEvent} for this node) + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {Boolean} True if the drop was valid, else false + */ + onNodeDrop : function(n, dd, e, data){ + return false; + }, + + /** + * Called internally while the DropZone determines that a {@link Ext.dd.DragSource} is being dragged over it, + * but not over any of its registered drop nodes. The default implementation returns this.dropNotAllowed, so + * it should be overridden to provide the proper feedback if necessary. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {String} status The CSS class that communicates the drop status back to the source so that the + * underlying {@link Ext.dd.StatusProxy} can be updated + */ + onContainerOver : function(dd, e, data){ + return this.dropNotAllowed; + }, + + /** + * Called internally when the DropZone determines that a {@link Ext.dd.DragSource} has been dropped on it, + * but not on any of its registered drop nodes. The default implementation returns false, so it should be + * overridden to provide the appropriate processing of the drop event if you need the drop zone itself to + * be able to accept drops. It should return true when valid so that the drag source's repair action does not run. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {Boolean} True if the drop was valid, else false + */ + onContainerDrop : function(dd, e, data){ + return false; + }, + + /** + * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source is now over + * the zone. The default implementation returns this.dropNotAllowed and expects that only registered drop + * nodes can process drag drop operations, so if you need the drop zone itself to be able to process drops + * you should override this method and provide a custom implementation. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {String} status The CSS class that communicates the drop status back to the source so that the + * underlying {@link Ext.dd.StatusProxy} can be updated + */ + notifyEnter : function(dd, e, data){ + return this.dropNotAllowed; + }, + + /** + * The function a {@link Ext.dd.DragSource} calls continuously while it is being dragged over the drop zone. + * This method will be called on every mouse movement while the drag source is over the drop zone. + * It will call {@link #onNodeOver} while the drag source is over a registered node, and will also automatically + * delegate to the appropriate node-specific methods as necessary when the drag source enters and exits + * registered nodes ({@link #onNodeEnter}, {@link #onNodeOut}). If the drag source is not currently over a + * registered node, it will call {@link #onContainerOver}. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {String} status The CSS class that communicates the drop status back to the source so that the + * underlying {@link Ext.dd.StatusProxy} can be updated + */ + notifyOver : function(dd, e, data){ + var n = this.getTargetFromEvent(e); + if(!n){ // not over valid drop target + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + return this.onContainerOver(dd, e, data); + } + if(this.lastOverNode != n){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + } + this.onNodeEnter(n, dd, e, data); + this.lastOverNode = n; + } + return this.onNodeOver(n, dd, e, data); + }, + + /** + * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the source has been dragged + * out of the zone without dropping. If the drag source is currently over a registered node, the notification + * will be delegated to {@link #onNodeOut} for node-specific handling, otherwise it will be ignored. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop target + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag zone + */ + notifyOut : function(dd, e, data){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + }, + + /** + * The function a {@link Ext.dd.DragSource} calls once to notify this drop zone that the dragged item has + * been dropped on it. The drag zone will look up the target node based on the event passed in, and if there + * is a node registered for that event, it will delegate to {@link #onNodeDrop} for node-specific handling, + * otherwise it will call {@link #onContainerDrop}. + * @param {Ext.dd.DragSource} source The drag source that was dragged over this drop zone + * @param {Event} e The event + * @param {Object} data An object containing arbitrary data supplied by the drag source + * @return {Boolean} True if the drop was valid, else false + */ + notifyDrop : function(dd, e, data){ + if(this.lastOverNode){ + this.onNodeOut(this.lastOverNode, dd, e, data); + this.lastOverNode = null; + } + var n = this.getTargetFromEvent(e); + return n ? + this.onNodeDrop(n, dd, e, data) : + this.onContainerDrop(dd, e, data); + }, + + // private + triggerCacheRefresh : function(){ + Ext.dd.DDM.refreshCache(this.groups); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/Registry.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/Registry.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/Registry.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,129 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.dd.Registry + * Provides easy access to all drag drop components that are registered on a page. Items can be retrieved either + * directly by DOM node id, or by passing in the drag drop event that occurred and looking up the event target. + * @singleton + */ +Ext.dd.Registry = function(){ + var elements = {}; + var handles = {}; + var autoIdSeed = 0; + + var getId = function(el, autogen){ + if(typeof el == "string"){ + return el; + } + var id = el.id; + if(!id && autogen !== false){ + id = "extdd-" + (++autoIdSeed); + el.id = id; + } + return id; + }; + + return { + /** + * Resgister a drag drop element + * @param {String/HTMLElement) element The id or DOM node to register + * @param {Object} data (optional) An custom data object that will be passed between the elements that are involved + * in drag drop operations. You can populate this object with any arbitrary properties that your own code + * knows how to interpret, plus there are some specific properties known to the Registry that should be + * populated in the data object (if applicable): + *
        +Value      Description
        +--------- ------------------------------------------
        +handles Array of DOM nodes that trigger dragging
        + for the element being registered
        +isHandle True if the element passed in triggers
        + dragging itself, else false +
        + */ + register : function(el, data){ + data = data || {}; + if(typeof el == "string"){ + el = document.getElementById(el); + } + data.ddel = el; + elements[getId(el)] = data; + if(data.isHandle !== false){ + handles[data.ddel.id] = data; + } + if(data.handles){ + var hs = data.handles; + for(var i = 0, len = hs.length; i < len; i++){ + handles[getId(hs[i])] = data; + } + } + }, + + /** + * Unregister a drag drop element + * @param {String/HTMLElement) element The id or DOM node to unregister + */ + unregister : function(el){ + var id = getId(el, false); + var data = elements[id]; + if(data){ + delete elements[id]; + if(data.handles){ + var hs = data.handles; + for(var i = 0, len = hs.length; i < len; i++){ + delete handles[getId(hs[i], false)]; + } + } + } + }, + + /** + * Returns the handle registered for a DOM Node by id + * @param {String/HTMLElement} id The DOM node or id to look up + * @return {Object} handle The custom handle data + */ + getHandle : function(id){ + if(typeof id != "string"){ // must be element? + id = id.id; + } + return handles[id]; + }, + + /** + * Returns the handle that is registered for the DOM node that is the target of the event + * @param {Event} e The event + * @return {Object} handle The custom handle data + */ + getHandleFromEvent : function(e){ + var t = Ext.lib.Event.getTarget(e); + return t ? handles[t.id] : null; + }, + + /** + * Returns a custom data object that is registered for a DOM node by id + * @param {String/HTMLElement} id The DOM node or id to look up + * @return {Object} data The custom data + */ + getTarget : function(id){ + if(typeof id != "string"){ // must be element? + id = id.id; + } + return elements[id]; + }, + + /** + * Returns a custom data object that is registered for the DOM node that is the target of the event + * @param {Event} e The event + * @return {Object} data The custom data + */ + getTargetFromEvent : function(e){ + var t = Ext.lib.Event.getTarget(e); + return t ? elements[t.id] || handles[t.id] : null; + } + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/ScrollManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/ScrollManager.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/ScrollManager.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,187 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.dd.ScrollManager + * Provides automatic scrolling of overflow regions in the page during drag operations.

        + * Note: This class uses "Point Mode" and is untested in "Intersect Mode". + * @singleton + */ +Ext.dd.ScrollManager = function(){ + var ddm = Ext.dd.DragDropMgr; + 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; + var inc = proc.el.ddScrollConfig ? + proc.el.ddScrollConfig.increment : dds.increment; + if(!dds.animate){ + if(proc.el.scroll(proc.dir, inc)){ + triggerRefresh(); + } + }else{ + proc.el.scroll(proc.dir, inc, true, dds.animDuration, triggerRefresh); + } + } + }; + + var clearProc = function(){ + if(proc.id){ + clearInterval(proc.id); + } + proc.id = 0; + proc.el = null; + proc.dir = ""; + }; + + var startProc = function(el, dir){ + clearProc(); + proc.el = el; + proc.dir = dir; + proc.id = setInterval(doScroll, Ext.dd.ScrollManager.frequency); + }; + + var onFire = function(e, isDrop){ + if(isDrop || !ddm.dragCurrent){ return; } + var dds = Ext.dd.ScrollManager; + if(!dragEl || dragEl != ddm.dragCurrent){ + dragEl = ddm.dragCurrent; + // refresh regions on drag start + dds.refreshCache(); + } + + var xy = Ext.lib.Event.getXY(e); + var pt = new Ext.lib.Point(xy[0], xy[1]); + for(var id in els){ + var el = els[id], r = el._region; + var c = el.ddScrollConfig ? el.ddScrollConfig : dds; + if(r && r.contains(pt) && el.isScrollable()){ + if(r.bottom - pt.y <= c.vthresh){ + if(proc.el != el){ + startProc(el, "down"); + } + return; + }else if(r.right - pt.x <= c.hthresh){ + if(proc.el != el){ + startProc(el, "left"); + } + return; + }else if(pt.y - r.top <= c.vthresh){ + if(proc.el != el){ + startProc(el, "up"); + } + return; + }else if(pt.x - r.left <= c.hthresh){ + if(proc.el != el){ + startProc(el, "right"); + } + return; + } + } + } + clearProc(); + }; + + ddm.fireEvents = ddm.fireEvents.createSequence(onFire, ddm); + ddm.stopDrag = ddm.stopDrag.createSequence(onStop, ddm); + + return { + /** + * Registers new overflow element(s) to auto scroll + * @param {Mixed/Array} el The id of or the element to be scrolled or an array of either + */ + register : function(el){ + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++) { + this.register(el[i]); + } + }else{ + el = Ext.get(el); + els[el.id] = el; + } + }, + + /** + * Unregisters overflow element(s) so they are no longer scrolled + * @param {Mixed/Array} el The id of or the element to be removed or an array of either + */ + unregister : function(el){ + if(el instanceof Array){ + for(var i = 0, len = el.length; i < len; i++) { + this.unregister(el[i]); + } + }else{ + el = Ext.get(el); + delete els[el.id]; + } + }, + + /** + * The number of pixels from the top or bottom edge of a container the pointer needs to be to + * trigger scrolling (defaults to 25) + * @type Number + */ + vthresh : 25, + /** + * The number of pixels from the right or left edge of a container the pointer needs to be to + * trigger scrolling (defaults to 25) + * @type Number + */ + hthresh : 25, + + /** + * The number of pixels to scroll in each scroll increment (defaults to 50) + * @type Number + */ + increment : 100, + + /** + * The frequency of scrolls in milliseconds (defaults to 500) + * @type Number + */ + frequency : 500, + + /** + * True to animate the scroll (defaults to true) + * @type Boolean + */ + animate: true, + + /** + * The animation duration in seconds - + * MUST BE less than Ext.dd.ScrollManager.frequency! (defaults to .4) + * @type Number + */ + animDuration: .4, + + /** + * Manually trigger a cache refresh. + */ + refreshCache : function(){ + for(var id in els){ + if(typeof els[id] == 'object'){ // for people extending the object prototype + els[id]._region = els[id].getRegion(); + } + } + } + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/StatusProxy.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/StatusProxy.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/dd/StatusProxy.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,168 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.dd.StatusProxy + * A specialized drag proxy that supports a drop status icon, {@link Ext.Layer} styles and auto-repair. This is the + * default drag proxy used by all Ext.dd components. + * @constructor + * @param {Object} config + */ +Ext.dd.StatusProxy = function(config){ + Ext.apply(this, config); + this.id = this.id || Ext.id(); + this.el = new Ext.Layer({ + dh: { + id: this.id, tag: "div", cls: "x-dd-drag-proxy "+this.dropNotAllowed, children: [ + {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]); + this.dropStatus = this.dropNotAllowed; +}; + +Ext.dd.StatusProxy.prototype = { + /** + * @cfg {String} dropAllowed + * The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok"). + */ + dropAllowed : "x-dd-drop-ok", + /** + * @cfg {String} dropNotAllowed + * The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop"). + */ + dropNotAllowed : "x-dd-drop-nodrop", + + /** + * Updates the proxy's visual element to indicate the status of whether or not drop is allowed + * over the current target element. + * @param {String} cssClass The css class for the new drop status indicator image + */ + setStatus : function(cssClass){ + cssClass = cssClass || this.dropNotAllowed; + if(this.dropStatus != cssClass){ + this.el.replaceClass(this.dropStatus, cssClass); + this.dropStatus = cssClass; + } + }, + + /** + * Resets the status indicator to the default dropNotAllowed value + * @param {Boolean} clearGhost True to also remove all content from the ghost, false to preserve it + */ + reset : function(clearGhost){ + this.el.dom.className = "x-dd-drag-proxy " + this.dropNotAllowed; + this.dropStatus = this.dropNotAllowed; + if(clearGhost){ + this.ghost.update(""); + } + }, + + /** + * Updates the contents of the ghost element + * @param {String} html The html that will replace the current innerHTML of the ghost element + */ + update : function(html){ + if(typeof html == "string"){ + this.ghost.update(html); + }else{ + this.ghost.update(""); + html.style.margin = "0"; + this.ghost.dom.appendChild(html); + } + }, + + /** + * Returns the underlying proxy {@link Ext.Layer} + * @return {Ext.Layer} el + */ + getEl : function(){ + return this.el; + }, + + /** + * Returns the ghost element + * @return {Ext.Element} el + */ + getGhost : function(){ + return this.ghost; + }, + + /** + * Hides the proxy + * @param {Boolean} clear True to reset the status and clear the ghost contents, false to preserve them + */ + hide : function(clear){ + this.el.hide(); + if(clear){ + this.reset(true); + } + }, + + /** + * Stops the repair animation if it's currently running + */ + stop : function(){ + if(this.anim && this.anim.isAnimated && this.anim.isAnimated()){ + this.anim.stop(); + } + }, + + /** + * Displays this proxy + */ + show : function(){ + this.el.show(); + }, + + /** + * Force the Layer to sync its shadow and shim positions to the element + */ + sync : function(){ + this.el.sync(); + }, + + /** + * Causes the proxy to return to its position of origin via an animation. Should be called after an + * invalid drop operation by the item being dragged. + * @param {Array} xy The XY position of the element ([x, y]) + * @param {Function} callback The function to call after the repair is complete + * @param {Object} scope The scope in which to execute the callback + */ + repair : function(xy, callback, scope){ + this.callback = callback; + this.scope = scope; + if(xy && this.animRepair !== false){ + this.el.addClass("x-dd-drag-repair"); + this.el.hideUnders(true); + this.anim = this.el.shift({ + duration: this.repairDuration || .5, + easing: 'easeOut', + xy: xy, + stopFx: true, + callback: this.afterRepair, + scope: this + }); + }else{ + this.afterRepair(); + } + }, + + // private + afterRepair : function(){ + this.hide(true); + if(typeof this.callback == "function"){ + this.callback.call(this.scope || this); + } + this.callback = null; + this.scope = null; + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/AbstractGridView.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/AbstractGridView.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/AbstractGridView.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,96 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.AbstractGridView = function(){ + this.grid = null; + + this.events = { + "beforerowremoved" : true, + "beforerowsinserted" : true, + "beforerefresh" : true, + "rowremoved" : true, + "rowsinserted" : true, + "rowupdated" : true, + "refresh" : true + }; + Ext.grid.AbstractGridView.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.AbstractGridView, Ext.util.Observable, { + rowClass : "x-grid-row", + cellClass : "x-grid-cell", + tdClass : "x-grid-td", + hdClass : "x-grid-hd", + splitClass : "x-grid-hd-split", + + init: function(grid){ + this.grid = grid; + var cid = this.grid.getGridEl().id; + this.colSelector = "#" + cid + " ." + this.cellClass + "-"; + this.tdSelector = "#" + cid + " ." + this.tdClass + "-"; + this.hdSelector = "#" + cid + " ." + this.hdClass + "-"; + this.splitSelector = "#" + cid + " ." + this.splitClass + "-"; + }, + + getColumnRenderers : function(){ + var renderers = []; + var cm = this.grid.colModel; + var colCount = cm.getColumnCount(); + for(var i = 0; i < colCount; i++){ + renderers[i] = cm.getRenderer(i); + } + return renderers; + }, + + getColumnIds : function(){ + var ids = []; + var cm = this.grid.colModel; + var colCount = cm.getColumnCount(); + for(var i = 0; i < colCount; i++){ + ids[i] = cm.getColumnId(i); + } + return ids; + }, + + getDataIndexes : function(){ + if(!this.indexMap){ + this.indexMap = this.buildIndexMap(); + } + return this.indexMap.colToData; + }, + + getColumnIndexByDataIndex : function(dataIndex){ + if(!this.indexMap){ + this.indexMap = this.buildIndexMap(); + } + return this.indexMap.dataToCol[dataIndex]; + }, + + /** + * Set a css style for a column dynamically. + * @param {Number} colIndex The index of the column + * @param {String} name The css property name + * @param {String} value The css value + */ + setCSSStyle : function(colIndex, name, value){ + var selector = "#" + this.grid.id + " .x-grid-col-" + colIndex; + Ext.util.CSS.updateRule(selector, name, value); + }, + + generateRules : function(cm){ + var ruleBuf = []; + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + var cid = cm.getColumnId(i); + ruleBuf.push(this.colSelector, cid, " {\n", cm.config[i].css, "}\n", + this.tdSelector, cid, " {\n}\n", + this.hdSelector, cid, " {\n}\n", + this.splitSelector, cid, " {\n}\n"); + } + return Ext.util.CSS.createStyleSheet(ruleBuf.join("")); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/BasicDialog.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/BasicDialog.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/BasicDialog.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,1196 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.BasicDialog + * @extends Ext.util.Observable + * Lightweight Dialog Class. The code below shows the creation of a typical dialog using existing HTML markup: + *
        
        +var dlg = new Ext.BasicDialog("my-dlg", {
        +    height: 200,
        +    width: 300,
        +    minHeight: 100,
        +    minWidth: 150,
        +    modal: true,
        +    proxyDrag: true,
        +    shadow: true
        +});
        +dlg.addKeyListener(27, dlg.hide, dlg); // ESC can also close the dialog
        +dlg.addButton('OK', dlg.hide, dlg);    // Could call a save function instead of hiding
        +dlg.addButton('Cancel', dlg.hide, dlg);
        +dlg.show();
        +
        + A Dialog should always be a direct child of the body element. + * @cfg {Boolean/DomHelper} autoCreate True to auto create from scratch, or using a DomHelper Object (defaults to false) + * @cfg {String} title Default text to display in the title bar (defaults to null) + * @cfg {Number} width Width of the dialog in pixels (can also be set via CSS). Determined by browser if unspecified. + * @cfg {Number} height Height of the dialog in pixels (can also be set via CSS). Determined by browser if unspecified. + * @cfg {Number} x The default left page coordinate of the dialog (defaults to center screen) + * @cfg {Number} y The default top page coordinate of the dialog (defaults to center screen) + * @cfg {String/Element} animateTarget Id or element from which the dialog should animate while opening + * (defaults to null with no animation) + * @cfg {Boolean} resizable False to disable manual dialog resizing (defaults to true) + * @cfg {String} resizeHandles Which resize handles to display - see the {@link Ext.Resizable} handles config + * property for valid values (defaults to 'all') + * @cfg {Number} minHeight The minimum allowable height for a resizable dialog (defaults to 80) + * @cfg {Number} minWidth The minimum allowable width for a resizable dialog (defaults to 200) + * @cfg {Boolean} modal True to show the dialog modally, preventing user interaction with the rest of the page (defaults to false) + * @cfg {Boolean} autoScroll True to allow the dialog body contents to overflow and display scrollbars (defaults to false) + * @cfg {Boolean} closable False to remove the built-in top-right corner close button (defaults to true) + * @cfg {Boolean} collapsible False to remove the built-in top-right corner collapse button (defaults to true) + * @cfg {Boolean} constraintoviewport True to keep the dialog constrained within the visible viewport boundaries (defaults to true) + * @cfg {Boolean} syncHeightBeforeShow True to cause the dimensions to be recalculated before the dialog is shown (defaults to false) + * @cfg {Boolean} draggable False to disable dragging of the dialog within the viewport (defaults to true) + * @cfg {Boolean} autoTabs If true, all elements with class 'x-dlg-tab' will get automatically converted to tabs (defaults to false) + * @cfg {String} tabTag The tag name of tab elements, used when autoTabs = true (defaults to 'div') + * @cfg {Boolean} proxyDrag True to drag a lightweight proxy element rather than the dialog itself, used when + * draggable = true (defaults to false) + * @cfg {Boolean} fixedcenter True to ensure that anytime the dialog is shown or resized it gets centered (defaults to false) + * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right + * shadow (defaults to false) + * @cfg {Number} shadowOffset The number of pixels to offset the shadow if displayed (defaults to 5) + * @cfg {String} buttonAlign Valid values are "left," "center" and "right" (defaults to "right") + * @cfg {Number} minButtonWidth Minimum width of all dialog buttons (defaults to 75) + * @cfg {Boolean} shim True to create an iframe shim that prevents selects from showing through (defaults to false) + * @constructor + * Create a new BasicDialog. + * @param {Mixed} el The container element or DOM node, or its id + * @param {Object} config Configuration options + */ +Ext.BasicDialog = function(el, config){ + this.el = Ext.get(el); + var dh = Ext.DomHelper; + if(!this.el && config && config.autoCreate){ + if(typeof config.autoCreate == "object"){ + if(!config.autoCreate.id){ + config.autoCreate.id = el; + } + this.el = dh.append(document.body, + config.autoCreate, true); + }else{ + this.el = dh.append(document.body, + {tag: "div", id: el, style:'visibility:hidden;'}, true); + } + } + el = this.el; + el.setDisplayed(true); + el.hide = this.hideAction; + this.id = el.id; + el.addClass("x-dlg"); + + Ext.apply(this, config); + + this.proxy = el.createProxy("x-dlg-proxy"); + this.proxy.hide = this.hideAction; + this.proxy.setOpacity(.5); + this.proxy.hide(); + + if(config.width){ + el.setWidth(config.width); + } + if(config.height){ + el.setHeight(config.height); + } + this.size = el.getSize(); + if(typeof config.x != "undefined" && typeof config.y != "undefined"){ + this.xy = [config.x,config.y]; + }else{ + this.xy = el.getCenterXY(true); + } + /** The header element @type Ext.Element */ + this.header = el.child("> .x-dlg-hd"); + /** The body element @type Ext.Element */ + this.body = el.child("> .x-dlg-bd"); + /** The footer element @type Ext.Element */ + this.footer = el.child("> .x-dlg-ft"); + + if(!this.header){ + this.header = el.createChild({tag: "div", cls:"x-dlg-hd", html: " "}, this.body ? this.body.dom : null); + } + if(!this.body){ + this.body = el.createChild({tag: "div", cls:"x-dlg-bd"}); + } + + this.header.unselectable(); + if(this.title){ + this.header.update(this.title); + } + // this element allows the dialog to be focused for keyboard event + this.focusEl = el.createChild({tag: "a", href:"#", cls:"x-dlg-focus", tabIndex:"-1"}); + this.focusEl.swallowEvent("click", true); + + this.header.wrap({cls:"x-dlg-hd-right"}).wrap({cls:"x-dlg-hd-left"}, true); + + // wrap the body and footer for special rendering + this.bwrap = this.body.wrap({tag: "div", cls:"x-dlg-dlg-body"}); + if(this.footer){ + this.bwrap.dom.appendChild(this.footer.dom); + } + + this.bg = this.el.createChild({ + tag: "div", cls:"x-dlg-bg", + html: '
         
        ' + }); + this.centerBg = this.bg.child("div.x-dlg-bg-center"); + + + if(this.autoScroll !== false && !this.autoTabs){ + this.body.setStyle("overflow", "auto"); + } + + this.toolbox = this.el.createChild({cls: "x-dlg-toolbox"}); + + if(this.closable !== false){ + this.el.addClass("x-dlg-closable"); + this.close = this.toolbox.createChild({cls:"x-dlg-close"}); + this.close.on("click", this.closeClick, this); + this.close.addClassOnOver("x-dlg-close-over"); + } + if(this.collapsible !== false){ + this.collapseBtn = this.toolbox.createChild({cls:"x-dlg-collapse"}); + this.collapseBtn.on("click", this.collapseClick, this); + this.collapseBtn.addClassOnOver("x-dlg-collapse-over"); + this.header.on("dblclick", this.collapseClick, this); + } + if(this.resizable !== false){ + this.el.addClass("x-dlg-resizable"); + this.resizer = new Ext.Resizable(el, { + minWidth: this.minWidth || 80, + minHeight:this.minHeight || 80, + handles: this.resizeHandles || "all", + pinned: true + }); + this.resizer.on("beforeresize", this.beforeResize, this); + this.resizer.on("resize", this.onResize, this); + } + if(this.draggable !== false){ + el.addClass("x-dlg-draggable"); + if (!this.proxyDrag) { + var dd = new Ext.dd.DD(el.dom.id, "WindowDrag"); + } + else { + var dd = new Ext.dd.DDProxy(el.dom.id, "WindowDrag", {dragElId: this.proxy.id}); + } + dd.setHandleElId(this.header.id); + dd.endDrag = this.endMove.createDelegate(this); + dd.startDrag = this.startMove.createDelegate(this); + dd.onDrag = this.onDrag.createDelegate(this); + dd.scroll = false; + this.dd = dd; + } + if(this.modal){ + this.mask = dh.append(document.body, {tag: "div", cls:"x-dlg-mask"}, true); + this.mask.enableDisplayMode("block"); + this.mask.hide(); + this.el.addClass("x-dlg-modal"); + } + if(this.shadow){ + this.shadow = new Ext.Shadow({ + mode : typeof this.shadow == "string" ? this.shadow : "sides", + offset : this.shadowOffset + }); + }else{ + this.shadowOffset = 0; + } + if(Ext.useShims && this.shim !== false){ + this.shim = this.el.createShim(); + this.shim.hide = this.hideAction; + this.shim.hide(); + }else{ + this.shim = false; + } + if(this.autoTabs){ + this.initTabs(); + } + this.addEvents({ + /** + * @event keydown + * Fires when a key is pressed + * @param {Ext.BasicDialog} this + * @param {Ext.EventObject} e + */ + "keydown" : true, + /** + * @event move + * Fires when this dialog is moved by the user. + * @param {Ext.BasicDialog} this + * @param {Number} x The new page X + * @param {Number} y The new page Y + */ + "move" : true, + /** + * @event resize + * Fires when this dialog is resized by the user. + * @param {Ext.BasicDialog} this + * @param {Number} width The new width + * @param {Number} height The new height + */ + "resize" : true, + /** + * @event beforehide + * Fires before this dialog is hidden. + * @param {Ext.BasicDialog} this + */ + "beforehide" : true, + /** + * @event hide + * Fires when this dialog is hidden. + * @param {Ext.BasicDialog} this + */ + "hide" : true, + /** + * @event beforeshow + * Fires before this dialog is shown. + * @param {Ext.BasicDialog} this + */ + "beforeshow" : true, + /** + * @event show + * Fires when this dialog is shown. + * @param {Ext.BasicDialog} this + */ + "show" : true + }); + el.on("keydown", this.onKeyDown, this); + el.on("mousedown", this.toFront, this); + Ext.EventManager.onWindowResize(this.adjustViewport, this, true); + this.el.hide(); + Ext.DialogManager.register(this); + Ext.BasicDialog.superclass.constructor.call(this); +}; + +Ext.extend(Ext.BasicDialog, Ext.util.Observable, { + shadowOffset: Ext.isIE ? 6 : 5, + minHeight: 80, + minWidth: 200, + minButtonWidth: 75, + defaultButton: null, + buttonAlign: "right", + tabTag: 'div', + firstShow: true, + + /** + * Sets the dialog title text + * @param {String} text The title text to display + * @return {Ext.BasicDialog} this + */ + setTitle : function(text){ + this.header.update(text); + return this; + }, + + // private + closeClick : function(){ + this.hide(); + }, + + // private + collapseClick : function(){ + this[this.collapsed ? "expand" : "collapse"](); + }, + + /** + * Collapses the dialog to its minimized state (only the title bar is visible). + * Equivalent to the user clicking the collapse dialog button. + */ + collapse : function(){ + if(!this.collapsed){ + this.collapsed = true; + this.el.addClass("x-dlg-collapsed"); + this.restoreHeight = this.el.getHeight(); + this.resizeTo(this.el.getWidth(), this.header.getHeight()); + } + }, + + /** + * Expands a collapsed dialog back to its normal state. Equivalent to the user + * clicking the expand dialog button. + */ + expand : function(){ + if(this.collapsed){ + this.collapsed = false; + this.el.removeClass("x-dlg-collapsed"); + this.resizeTo(this.el.getWidth(), this.restoreHeight); + } + }, + + /** + * Reinitializes the tabs component, clearing out old tabs and finding new ones. + * @return {Ext.TabPanel} The tabs component + */ + initTabs : function(){ + var tabs = this.getTabs(); + while(tabs.getTab(0)){ + tabs.removeTab(0); + } + this.el.select(this.tabTag+'.x-dlg-tab').each(function(el){ + var dom = el.dom; + tabs.addTab(Ext.id(dom), dom.title); + dom.title = ""; + }); + tabs.activate(0); + return tabs; + }, + + // private + beforeResize : function(){ + this.resizer.minHeight = Math.max(this.minHeight, this.getHeaderFooterHeight(true)+40); + }, + + // private + onResize : function(){ + this.refreshSize(); + this.syncBodyHeight(); + this.adjustAssets(); + this.focus(); + this.fireEvent("resize", this, this.size.width, this.size.height); + }, + + // private + onKeyDown : function(e){ + if(this.isVisible()){ + this.fireEvent("keydown", this, e); + } + }, + + /** + * Resizes the dialog. + * @param {Number} width + * @param {Number} height + * @return {Ext.BasicDialog} this + */ + resizeTo : function(width, height){ + this.el.setSize(width, height); + this.size = {width: width, height: height}; + this.syncBodyHeight(); + if(this.fixedcenter){ + this.center(); + } + if(this.isVisible()){ + this.constrainXY(); + this.adjustAssets(); + } + this.fireEvent("resize", this, width, height); + return this; + }, + + + /** + * Resizes the dialog to fit the specified content size. + * @param {Number} width + * @param {Number} height + * @return {Ext.BasicDialog} this + */ + setContentSize : function(w, h){ + h += this.getHeaderFooterHeight() + this.body.getMargins("tb"); + w += this.body.getMargins("lr") + this.bwrap.getMargins("lr") + this.centerBg.getPadding("lr"); + //if(!this.el.isBorderBox()){ + h += this.body.getPadding("tb") + this.bwrap.getBorderWidth("tb") + this.body.getBorderWidth("tb") + this.el.getBorderWidth("tb"); + w += this.body.getPadding("lr") + this.bwrap.getBorderWidth("lr") + this.body.getBorderWidth("lr") + this.bwrap.getPadding("lr") + this.el.getBorderWidth("lr"); + //} + if(this.tabs){ + h += this.tabs.stripWrap.getHeight() + this.tabs.bodyEl.getMargins("tb") + this.tabs.bodyEl.getPadding("tb"); + w += this.tabs.bodyEl.getMargins("lr") + this.tabs.bodyEl.getPadding("lr"); + } + this.resizeTo(w, h); + return this; + }, + + /** + * Adds a key listener for when this dialog is displayed. This allows you to hook in a function that will be + * executed in response to a particular key being pressed while the dialog is active. + * @param {Number/Array/Object} key Either the numeric key code, array of key codes or an object with the following options: + * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)} + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function + * @return {Ext.BasicDialog} this + */ + addKeyListener : function(key, fn, scope){ + var keyCode, shift, ctrl, alt; + if(typeof key == "object" && !(key instanceof Array)){ + keyCode = key["key"]; + shift = key["shift"]; + ctrl = key["ctrl"]; + alt = key["alt"]; + }else{ + keyCode = key; + } + var handler = function(dlg, e){ + if((!shift || e.shiftKey) && (!ctrl || e.ctrlKey) && (!alt || e.altKey)){ + var k = e.getKey(); + if(keyCode instanceof Array){ + for(var i = 0, len = keyCode.length; i < len; i++){ + if(keyCode[i] == k){ + fn.call(scope || window, dlg, k, e); + return; + } + } + }else{ + if(k == keyCode){ + fn.call(scope || window, dlg, k, e); + } + } + } + }; + this.on("keydown", handler); + return this; + }, + + /** + * Returns the TabPanel component (creates it if it doesn't exist). + * Note: If you wish to simply check for the existence of tabs without creating them, + * check for a null 'tabs' property. + * @return {Ext.TabPanel} The tabs component + */ + getTabs : function(){ + if(!this.tabs){ + this.el.addClass("x-dlg-auto-tabs"); + this.body.addClass(this.tabPosition == "bottom" ? "x-tabs-bottom" : "x-tabs-top"); + this.tabs = new Ext.TabPanel(this.body.dom, this.tabPosition == "bottom"); + } + return this.tabs; + }, + + /** + * Adds a button to the footer section of the dialog. + * @param {String/Object} config A string becomes the button text, an object can either be a Button config + * object or a valid Ext.DomHelper element config + * @param {Function} handler The function called when the button is clicked + * @param {Object} scope (optional) The scope of the handler function + * @return {Ext.Button} The new button + */ + addButton : function(config, handler, scope){ + var dh = Ext.DomHelper; + if(!this.footer){ + this.footer = dh.append(this.bwrap, {tag: "div", cls:"x-dlg-ft"}, true); + } + if(!this.btnContainer){ + var tb = this.footer.createChild({ + + cls:"x-dlg-btns x-dlg-btns-"+this.buttonAlign, + html:'
        ' + }, null, true); + this.btnContainer = tb.firstChild.firstChild.firstChild; + } + var bconfig = { + handler: handler, + scope: scope, + minWidth: this.minButtonWidth, + hideParent:true + }; + if(typeof config == "string"){ + bconfig.text = config; + }else{ + if(config.tag){ + bconfig.dhconfig = config; + }else{ + Ext.apply(bconfig, config); + } + } + var btn = new Ext.Button( + bconfig + ); + btn.render(this.btnContainer.appendChild(document.createElement("td"))); + this.syncBodyHeight(); + if(!this.buttons){ + /** + * Array of all the buttons that have been added to this dialog via addButton + * @type Array + */ + this.buttons = []; + } + this.buttons.push(btn); + return btn; + }, + + /** + * Sets the default button to be focused when the dialog is displayed. + * @param {Ext.BasicDialog.Button} btn The button object returned by {@link #addButton} + * @return {Ext.BasicDialog} this + */ + setDefaultButton : function(btn){ + this.defaultButton = btn; + return this; + }, + + // private + getHeaderFooterHeight : function(safe){ + var height = 0; + if(this.header){ + height += this.header.getHeight(); + } + if(this.footer){ + var fm = this.footer.getMargins(); + height += (this.footer.getHeight()+fm.top+fm.bottom); + } + height += this.bwrap.getPadding("tb")+this.bwrap.getBorderWidth("tb"); + height += this.centerBg.getPadding("tb"); + return height; + }, + + // private + syncBodyHeight : function(){ + var bd = this.body, cb = this.centerBg, bw = this.bwrap; + var height = this.size.height - this.getHeaderFooterHeight(false); + bd.setHeight(height-bd.getMargins("tb")); + var hh = this.header.getHeight(); + var h = this.size.height-hh; + cb.setHeight(h); + bw.setLeftTop(cb.getPadding("l"), hh+cb.getPadding("t")); + bw.setHeight(h-cb.getPadding("tb")); + bw.setWidth(this.el.getWidth(true)-cb.getPadding("lr")); + bd.setWidth(bw.getWidth(true)); + if(this.tabs){ + this.tabs.syncHeight(); + if(Ext.isIE){ + this.tabs.el.repaint(); + } + } + }, + + /** + * Restores the previous state of the dialog if Ext.state is configured. + * @return {Ext.BasicDialog} this + */ + restoreState : function(){ + var box = Ext.state.Manager.get(this.stateId || (this.el.id + "-state")); + if(box && box.width){ + this.xy = [box.x, box.y]; + this.resizeTo(box.width, box.height); + } + return this; + }, + + // private + beforeShow : function(){ + this.expand(); + if(this.fixedcenter){ + this.xy = this.el.getCenterXY(true); + } + if(this.modal){ + Ext.getBody().addClass("x-body-masked"); + this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.mask.show(); + } + this.constrainXY(); + }, + + // private + animShow : function(){ + var b = Ext.get(this.animateTarget, true).getBox(); + this.proxy.setSize(b.width, b.height); + this.proxy.setLocation(b.x, b.y); + this.proxy.show(); + this.proxy.setBounds(this.xy[0], this.xy[1], this.size.width, this.size.height, + true, .35, this.showEl.createDelegate(this)); + }, + + /** + * Shows the dialog. + * @param {Mixed} animateTarget (optional) Reset the animation target + * @return {Ext.BasicDialog} this + */ + show : function(animateTarget){ + if (this.fireEvent("beforeshow", this) === false){ + return; + } + if(this.syncHeightBeforeShow){ + this.syncBodyHeight(); + }else if(this.firstShow){ + this.firstShow = false; + this.syncBodyHeight(); // sync the height on the first show instead of in the constructor + } + this.animateTarget = animateTarget || this.animateTarget; + if(!this.el.isVisible()){ + this.beforeShow(); + if(this.animateTarget){ + this.animShow(); + }else{ + this.showEl(); + } + } + return this; + }, + + // private + showEl : function(){ + this.proxy.hide(); + this.el.setXY(this.xy); + this.el.show(); + this.adjustAssets(true); + this.toFront(); + this.focus(); + // IE peekaboo bug - fix found by Dave Fenwick + if(Ext.isIE){ + this.el.repaint(); + } + this.fireEvent("show", this); + }, + + /** + * Focuses the dialog. If a defaultButton is set, it will receive focus, otherwise the + * dialog itself will receive focus. + */ + focus : function(){ + if(this.defaultButton){ + this.defaultButton.focus(); + }else{ + this.focusEl.focus(); + } + }, + + // private + constrainXY : function(){ + if(this.constraintoviewport !== false){ + if(!this.viewSize){ + if(this.container){ + var s = this.container.getSize(); + this.viewSize = [s.width, s.height]; + }else{ + this.viewSize = [Ext.lib.Dom.getViewWidth(),Ext.lib.Dom.getViewHeight()]; + } + } + var s = Ext.get(this.container||document).getScroll(); + + var x = this.xy[0], y = this.xy[1]; + var w = this.size.width, h = this.size.height; + var vw = this.viewSize[0], vh = this.viewSize[1]; + // only move it if it needs it + var moved = false; + // first validate right/bottom + if(x + w > vw+s.left){ + x = vw - w; + moved = true; + } + if(y + h > vh+s.top){ + y = vh - h; + moved = true; + } + // then make sure top/left isn't negative + if(x < s.left){ + x = s.left; + moved = true; + } + if(y < s.top){ + y = s.top; + moved = true; + } + if(moved){ + // cache xy + this.xy = [x, y]; + if(this.isVisible()){ + this.el.setLocation(x, y); + this.adjustAssets(); + } + } + } + }, + + // private + onDrag : function(){ + if(!this.proxyDrag){ + this.xy = this.el.getXY(); + this.adjustAssets(); + } + }, + + // private + adjustAssets : function(doShow){ + var x = this.xy[0], y = this.xy[1]; + var w = this.size.width, h = this.size.height; + if(doShow === true){ + if(this.shadow){ + this.shadow.show(this.el); + } + if(this.shim){ + this.shim.show(); + } + } + if(this.shadow && this.shadow.isVisible()){ + this.shadow.show(this.el); + } + if(this.shim && this.shim.isVisible()){ + this.shim.setBounds(x, y, w, h); + } + }, + + // private + adjustViewport : function(w, h){ + if(!w || !h){ + w = Ext.lib.Dom.getViewWidth(); + h = Ext.lib.Dom.getViewHeight(); + } + // cache the size + this.viewSize = [w, h]; + if(this.modal && this.mask.isVisible()){ + this.mask.setSize(w, h); // first make sure the mask isn't causing overflow + this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + } + if(this.isVisible()){ + this.constrainXY(); + } + }, + + /** + * Destroys this dialog and all its supporting elements (including any tabs, shim, + * shadow, proxy, mask, etc.) Also removes all event listeners. + * @param {Boolean} removeEl (optional) true to remove the element from the DOM + */ + destroy : function(removeEl){ + if(this.isVisible()){ + this.animateTarget = null; + this.hide(); + } + Ext.EventManager.removeResizeListener(this.adjustViewport, this); + if(this.tabs){ + this.tabs.destroy(removeEl); + } + Ext.destroy( + this.shim, + this.proxy, + this.resizer, + this.close, + this.mask + ); + if(this.dd){ + this.dd.unreg(); + } + if(this.buttons){ + for(var i = 0, len = this.buttons.length; i < len; i++){ + this.buttons[i].destroy(); + } + } + this.el.removeAllListeners(); + if(removeEl === true){ + this.el.update(""); + this.el.remove(); + } + Ext.DialogManager.unregister(this); + }, + + // private + startMove : function(){ + if(this.proxyDrag){ + this.proxy.show(); + } + if(this.constraintoviewport !== false){ + this.dd.constrainTo(document.body, {right: this.shadowOffset, bottom: this.shadowOffset}); + } + }, + + // private + endMove : function(){ + if(!this.proxyDrag){ + Ext.dd.DD.prototype.endDrag.apply(this.dd, arguments); + }else{ + Ext.dd.DDProxy.prototype.endDrag.apply(this.dd, arguments); + this.proxy.hide(); + } + this.refreshSize(); + this.adjustAssets(); + this.focus(); + this.fireEvent("move", this, this.xy[0], this.xy[1]); + }, + + /** + * Brings this dialog to the front of any other visible dialogs + * @return {Ext.BasicDialog} this + */ + toFront : function(){ + Ext.DialogManager.bringToFront(this); + return this; + }, + + /** + * Sends this dialog to the back (under) of any other visible dialogs + * @return {Ext.BasicDialog} this + */ + toBack : function(){ + Ext.DialogManager.sendToBack(this); + return this; + }, + + /** + * Centers this dialog in the viewport + * @return {Ext.BasicDialog} this + */ + center : function(){ + var xy = this.el.getCenterXY(true); + this.moveTo(xy[0], xy[1]); + return this; + }, + + /** + * Moves the dialog's top-left corner to the specified point + * @param {Number} x + * @param {Number} y + * @return {Ext.BasicDialog} this + */ + moveTo : function(x, y){ + this.xy = [x,y]; + if(this.isVisible()){ + this.el.setXY(this.xy); + this.adjustAssets(); + } + return this; + }, + + /** + * Aligns the dialog to the specified element + * @param {Mixed} element The element to align to. + * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details). + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @return {Ext.BasicDialog} this + */ + alignTo : function(element, position, offsets){ + this.xy = this.el.getAlignToXY(element, position, offsets); + if(this.isVisible()){ + this.el.setXY(this.xy); + this.adjustAssets(); + } + return this; + }, + + /** + * Anchors an element to another element and realigns it when the window is resized. + * @param {Mixed} element The element to align to. + * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details) + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @param {Boolean/Number} monitorScroll (optional) true to monitor body scroll and reposition. If this parameter + * is a number, it is used as the buffer delay (defaults to 50ms). + * @return {Ext.BasicDialog} this + */ + anchorTo : function(el, alignment, offsets, monitorScroll){ + var action = function(){ + this.alignTo(el, alignment, offsets); + }; + Ext.EventManager.onWindowResize(action, this); + var tm = typeof monitorScroll; + if(tm != 'undefined'){ + Ext.EventManager.on(window, 'scroll', action, this, + {buffer: tm == 'number' ? monitorScroll : 50}); + } + action.call(this); + return this; + }, + + /** + * Returns true if the dialog is visible + * @return {Boolean} + */ + isVisible : function(){ + return this.el.isVisible(); + }, + + // private + animHide : function(callback){ + var b = Ext.get(this.animateTarget).getBox(); + this.proxy.show(); + this.proxy.setBounds(this.xy[0], this.xy[1], this.size.width, this.size.height); + this.el.hide(); + this.proxy.setBounds(b.x, b.y, b.width, b.height, true, .35, + this.hideEl.createDelegate(this, [callback])); + }, + + /** + * Hides the dialog. + * @param {Function} callback (optional) Function to call when the dialog is hidden + * @return {Ext.BasicDialog} this + */ + hide : function(callback){ + if (this.fireEvent("beforehide", this) === false){ + return; + } + if(this.shadow){ + this.shadow.hide(); + } + if(this.shim) { + this.shim.hide(); + } + if(this.animateTarget){ + this.animHide(callback); + }else{ + this.el.hide(); + this.hideEl(callback); + } + return this; + }, + + // private + hideEl : function(callback){ + this.proxy.hide(); + if(this.modal){ + this.mask.hide(); + Ext.getBody().removeClass("x-body-masked"); + } + this.fireEvent("hide", this); + if(typeof callback == "function"){ + callback(); + } + }, + + // private + hideAction : function(){ + this.setLeft("-10000px"); + this.setTop("-10000px"); + this.setStyle("visibility", "hidden"); + }, + + // private + refreshSize : function(){ + this.size = this.el.getSize(); + this.xy = this.el.getXY(); + Ext.state.Manager.set(this.stateId || this.el.id + "-state", this.el.getBox()); + }, + + // private + // z-index is managed by the DialogManager and may be overwritten at any time + setZIndex : function(index){ + if(this.modal){ + this.mask.setStyle("z-index", index); + } + if(this.shim){ + this.shim.setStyle("z-index", ++index); + } + if(this.shadow){ + this.shadow.setZIndex(++index); + } + this.el.setStyle("z-index", ++index); + if(this.proxy){ + this.proxy.setStyle("z-index", ++index); + } + if(this.resizer){ + this.resizer.proxy.setStyle("z-index", ++index); + } + + this.lastZIndex = index; + }, + + /** + * Returns the element for this dialog + * @return {Ext.Element} The underlying dialog Element + */ + getEl : function(){ + return this.el; + } +}); + +/** + * @class Ext.DialogManager + * Provides global access to BasicDialogs that have been created and + * support for z-indexing (layering) multiple open dialogs. + */ +Ext.DialogManager = function(){ + var list = {}; + var accessList = []; + var front = null; + + // private + var sortDialogs = function(d1, d2){ + return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1; + }; + + // private + var orderDialogs = function(){ + accessList.sort(sortDialogs); + var seed = Ext.DialogManager.zseed; + for(var i = 0, len = accessList.length; i < len; i++){ + var dlg = accessList[i]; + if(dlg){ + dlg.setZIndex(seed + (i*10)); + } + } + }; + + return { + /** + * The starting z-index for BasicDialogs (defaults to 9000) + * @type Number The z-index value + */ + zseed : 9000, + + // private + register : function(dlg){ + list[dlg.id] = dlg; + accessList.push(dlg); + }, + + // private + unregister : function(dlg){ + delete list[dlg.id]; + if(!accessList.indexOf){ + for(var i = 0, len = accessList.length; i < len; i++){ + if(accessList[i] == dlg){ + accessList.splice(i, 1); + return; + } + } + }else{ + var i = accessList.indexOf(dlg); + if(i != -1){ + accessList.splice(i, 1); + } + } + }, + + /** + * Gets a registered dialog by id + * @param {String/Object} id The id of the dialog or a dialog + * @return {Ext.BasicDialog} this + */ + get : function(id){ + return typeof id == "object" ? id : list[id]; + }, + + /** + * Brings the specified dialog to the front + * @param {String/Object} dlg The id of the dialog or a dialog + * @return {Ext.BasicDialog} this + */ + bringToFront : function(dlg){ + dlg = this.get(dlg); + if(dlg != front){ + front = dlg; + dlg._lastAccess = new Date().getTime(); + orderDialogs(); + } + return dlg; + }, + + /** + * Sends the specified dialog to the back + * @param {String/Object} dlg The id of the dialog or a dialog + * @return {Ext.BasicDialog} this + */ + sendToBack : function(dlg){ + dlg = this.get(dlg); + dlg._lastAccess = -(new Date().getTime()); + orderDialogs(); + return dlg; + }, + + /** + * Hides all dialogs + */ + hideAll : function(){ + for(var id in list){ + if(list[id] && typeof list[id] != "function" && list[id].isVisible()){ + list[id].hide(); + } + } + } + }; +}(); + +/** + * @class Ext.LayoutDialog + * @extends Ext.BasicDialog + * Dialog which provides adjustments for working with a layout in a Dialog. + * Add your necessary layout config options to the dialog's config.
        + * Example usage (including a nested layout): + *
        
        +if(!dialog){
        +    dialog = new Ext.LayoutDialog("download-dlg", {
        +        modal: true,
        +        width:600,
        +        height:450,
        +        shadow:true,
        +        minWidth:500,
        +        minHeight:350,
        +        autoTabs:true,
        +        proxyDrag:true,
        +        // layout config merges with the dialog config
        +        center:{
        +            tabPosition: "top",
        +            alwaysShowTabs: true
        +        }
        +    });
        +    dialog.addKeyListener(27, dialog.hide, dialog);
        +    dialog.setDefaultButton(dialog.addButton("Close", dialog.hide, dialog));
        +    dialog.addButton("Build It!", this.getDownload, this);
        +
        +    // we can even add nested layouts
        +    var innerLayout = new Ext.BorderLayout("dl-inner", {
        +        east: {
        +            initialSize: 200,
        +            autoScroll:true,
        +            split:true
        +        },
        +        center: {
        +            autoScroll:true
        +        }
        +    });
        +    innerLayout.beginUpdate();
        +    innerLayout.add("east", new Ext.ContentPanel("dl-details"));
        +    innerLayout.add("center", new Ext.ContentPanel("selection-panel"));
        +    innerLayout.endUpdate(true);
        +
        +    var layout = dialog.getLayout();
        +    layout.beginUpdate();
        +    layout.add("center", new Ext.ContentPanel("standard-panel",
        +                        {title: "Download the Source", fitToFrame:true}));
        +    layout.add("center", new Ext.NestedLayoutPanel(innerLayout,
        +               {title: "Build your own ext.js"}));
        +    layout.getRegion("center").showPanel(sp);
        +    layout.endUpdate();
        +}
        +
        + * @constructor + * @param {Mixed} el The id of or container element + * @param {Object} config configuration options + */ +Ext.LayoutDialog = function(el, config){ + config.autoTabs = false; + Ext.LayoutDialog.superclass.constructor.call(this, el, config); + this.body.setStyle({overflow:"hidden", position:"relative"}); + this.layout = new Ext.BorderLayout(this.body.dom, config); + this.layout.monitorWindowResize = false; + this.el.addClass("x-dlg-auto-layout"); + // fix case when center region overwrites center function + this.center = Ext.BasicDialog.prototype.center; + this.on("show", this.layout.layout, this.layout, true); +}; +Ext.extend(Ext.LayoutDialog, Ext.BasicDialog, { + /** + * Ends update of the layout and resets display to none. Use standard beginUpdate/endUpdate on the layout. + * @deprecated + */ + endUpdate : function(){ + this.layout.endUpdate(); + }, + + /** + * Begins an update of the layout and sets display to block and visibility to hidden. Use standard beginUpdate/endUpdate on the layout. + * @deprecated + */ + beginUpdate : function(){ + this.layout.beginUpdate(); + }, + + /** + * Get the BorderLayout for this dialog + * @return {Ext.BorderLayout} + */ + getLayout : function(){ + return this.layout; + }, + + showEl : function(){ + Ext.LayoutDialog.superclass.showEl.apply(this, arguments); + if(Ext.isIE7){ + this.layout.layout(); + } + }, + + // private + // Use the syncHeightBeforeShow config option to control this automatically + syncBodyHeight : function(){ + Ext.LayoutDialog.superclass.syncBodyHeight.call(this); + if(this.layout){this.layout.layout();} + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/GridView2.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/GridView2.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/GridView2.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,1530 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +Ext.grid.GridView = function(config){ + Ext.grid.GridView.superclass.constructor.call(this); + this.el = null; + + Ext.apply(this, config); +}; + +Ext.extend(Ext.grid.GridView, Ext.grid.AbstractGridView, { + + /** + * Override this function to apply custom css classes to rows during rendering + * @param {Record} record The record + * @param {Number} index + * @method getRowClass + */ + rowClass : "x-grid-row", + + cellClass : "x-grid-col", + + tdClass : "x-grid-td", + + hdClass : "x-grid-hd", + + splitClass : "x-grid-split", + + sortClasses : ["sort-asc", "sort-desc"], + + enableMoveAnim : false, + + hlColor: "C3DAF9", + + dh : Ext.DomHelper, + + fly : Ext.Element.fly, + + css : Ext.util.CSS, + + borderWidth: 1, + + splitOffset: 3, + + scrollIncrement : 22, + + cellRE: /(?:.*?)x-grid-(?:hd|cell|csplit)-(?:[\d]+)-([\d]+)(?:.*?)/, + + findRE: /\s?(?:x-grid-hd|x-grid-col|x-grid-csplit)\s/, + + getEditorParent : function(ed){ + return ed.parentEl || document.body; + }, + + bind : function(ds, cm){ + if(this.ds){ + this.ds.un("load", this.onLoad, this); + this.ds.un("datachanged", this.onDataChange); + this.ds.un("add", this.onAdd); + this.ds.un("remove", this.onRemove); + this.ds.un("update", this.onUpdate); + this.ds.un("clear", this.onClear); + } + if(ds){ + ds.on("load", this.onLoad, this); + ds.on("datachanged", this.onDataChange, this); + ds.on("add", this.onAdd, this); + ds.on("remove", this.onRemove, this); + ds.on("update", this.onUpdate, this); + ds.on("clear", this.onClear, this); + } + this.ds = ds; + + if(this.cm){ + this.cm.un("widthchange", this.onColWidthChange, this); + this.cm.un("headerchange", this.onHeaderChange, this); + this.cm.un("hiddenchange", this.onHiddenChange, this); + this.cm.un("columnmoved", this.onColumnMove, this); + this.cm.un("columnlockchange", this.onColumnLock, this); + } + if(cm){ + this.generateRules(cm); + cm.on("widthchange", this.onColWidthChange, this); + cm.on("headerchange", this.onHeaderChange, this); + cm.on("hiddenchange", this.onHiddenChange, this); + cm.on("columnmoved", this.onColumnMove, this); + cm.on("columnlockchange", this.onColumnLock, this); + } + this.cm = cm; + }, + + init: function(grid){ + Ext.grid.GridView.superclass.init.call(this, grid); + + this.bind(grid.dataSource, grid.colModel); + + grid.on("headerclick", this.handleHeaderClick, this); + + if(grid.trackMouseOver){ + grid.on("mouseover", this.onRowOver, this); + grid.on("mouseout", this.onRowOut, this); + } + grid.cancelTextSelection = function(){}; + this.gridId = grid.id; + + var tpls = this.templates || {}; + + if(!tpls.master){ + tpls.master = new Ext.Template( + '
        ', + '
        ', + '
        ', + '
        ', + '
        {lockedHeader}
        ', + '
        {lockedBody}
        ', + "
        ", + '
        ', + '
        {header}
        ', + '
        {body}
        ', + "
        ", + '
        ', + '', + '
         
        ', + "
        " + ); + tpls.master.disableformats = true; + } + + if(!tpls.header){ + tpls.header = new Ext.Template( + '', + '{cells}', + "
        {splits}" + ); + tpls.header.disableformats = true; + } + tpls.header.compile(); + + if(!tpls.hcell){ + tpls.hcell = new Ext.Template( + '
        ', + '
        {value}
        ', + "
        " + ); + tpls.hcell.disableFormats = true; + } + tpls.hcell.compile(); + + if(!tpls.hsplit){ + tpls.hsplit = new Ext.Template('
         
        '); + tpls.hsplit.disableFormats = true; + } + tpls.hsplit.compile(); + + if(!tpls.body){ + tpls.body = new Ext.Template( + '', + "{rows}", + "
        " + ); + tpls.body.disableFormats = true; + } + tpls.body.compile(); + + if(!tpls.row){ + tpls.row = new Ext.Template('{cells}'); + tpls.row.disableFormats = true; + } + tpls.row.compile(); + + if(!tpls.cell){ + tpls.cell = new Ext.Template( + '', + '
        {value}
        ', + "" + ); + tpls.cell.disableFormats = true; + } + tpls.cell.compile(); + + this.templates = tpls; + }, + + // remap these for backwards compat + onColWidthChange : function(){ + this.updateColumns.apply(this, arguments); + }, + onHeaderChange : function(){ + this.updateHeaders.apply(this, arguments); + }, + onHiddenChange : function(){ + this.handleHiddenChange.apply(this, arguments); + }, + onColumnMove : function(){ + this.handleColumnMove.apply(this, arguments); + }, + onColumnLock : function(){ + this.handleLockChange.apply(this, arguments); + }, + + onDataChange : function(){ + this.refresh(); + this.updateHeaderSortState(); + }, + + onClear : function(){ + this.refresh(); + }, + + onUpdate : function(ds, record){ + this.refreshRow(record); + }, + + refreshRow : function(record){ + var ds = this.ds, index; + if(typeof record == 'number'){ + index = record; + record = ds.getAt(index); + }else{ + index = ds.indexOf(record); + } + this.insertRows(ds, index, index, true); + this.onRemove(ds, record, index+1, true); + this.syncRowHeights(index, index); + this.layout(); + this.fireEvent("rowupdated", this, index, record); + }, + + onAdd : function(ds, records, index){ + this.insertRows(ds, index, index + (records.length-1)); + }, + + onRemove : function(ds, record, index, isUpdate){ + if(isUpdate !== true){ + this.fireEvent("beforerowremoved", this, index, record); + } + var bt = this.getBodyTable(), lt = this.getLockedTable(); + if(bt.rows[index]){ + bt.firstChild.removeChild(bt.rows[index]); + } + if(lt.rows[index]){ + lt.firstChild.removeChild(lt.rows[index]); + } + if(isUpdate !== true){ + this.stripeRows(index); + this.syncRowHeights(index, index); + this.layout(); + this.fireEvent("rowremoved", this, index, record); + } + }, + + onLoad : function(){ + this.scrollToTop(); + }, + + /** + * Scrolls the grid to the top + */ + scrollToTop : function(){ + if(this.scroller){ + this.scroller.dom.scrollTop = 0; + this.syncScroll(); + } + }, + + /** + * Gets a panel in the header of the grid that can be used for toolbars etc. + * After modifying the contents of this panel a call to grid.autoSize() may be + * required to register any changes in size. + * @param {Boolean} doShow By default the header is hidden. Pass true to show the panel + * @return Ext.Element + */ + getHeaderPanel : function(doShow){ + if(doShow){ + this.headerPanel.show(); + } + return this.headerPanel; + }, + + /** + * Gets a panel in the footer of the grid that can be used for toolbars etc. + * After modifying the contents of this panel a call to grid.autoSize() may be + * required to register any changes in size. + * @param {Boolean} doShow By default the footer is hidden. Pass true to show the panel + * @return Ext.Element + */ + getFooterPanel : function(doShow){ + if(doShow){ + this.footerPanel.show(); + } + return this.footerPanel; + }, + + initElements : function(){ + var E = Ext.Element; + var el = this.grid.getGridEl().dom.firstChild; + var cs = el.childNodes; + + this.el = new E(el); + this.headerPanel = new E(el.firstChild); + this.headerPanel.enableDisplayMode("block"); + + this.scroller = new E(cs[1]); + this.scrollSizer = new E(this.scroller.dom.firstChild); + + this.lockedWrap = new E(cs[2]); + this.lockedHd = new E(this.lockedWrap.dom.firstChild); + this.lockedBody = new E(this.lockedWrap.dom.childNodes[1]); + + this.mainWrap = new E(cs[3]); + this.mainHd = new E(this.mainWrap.dom.firstChild); + this.mainBody = new E(this.mainWrap.dom.childNodes[1]); + + this.footerPanel = new E(cs[4]); + this.footerPanel.enableDisplayMode("block"); + + this.focusEl = new E(cs[5]); + this.focusEl.swallowEvent("click", true); + this.resizeProxy = new E(cs[6]); + + this.headerSelector = String.format( + '#{0} td.x-grid-hd, #{1} td.x-grid-hd', + this.lockedHd.id, this.mainHd.id + ); + + this.splitterSelector = String.format( + '#{0} div.x-grid-split, #{1} div.x-grid-split', + this.lockedHd.id, this.mainHd.id + ); + }, + + getHeaderCell : function(index){ + return Ext.DomQuery.select(this.headerSelector)[index]; + }, + + getHeaderCellMeasure : function(index){ + return this.getHeaderCell(index).firstChild; + }, + + getHeaderCellText : function(index){ + return this.getHeaderCell(index).firstChild.firstChild; + }, + + getLockedTable : function(){ + return this.lockedBody.dom.firstChild; + }, + + getBodyTable : function(){ + return this.mainBody.dom.firstChild; + }, + + getLockedRow : function(index){ + return this.getLockedTable().rows[index]; + }, + + getRow : function(index){ + return this.getBodyTable().rows[index]; + }, + + getRowComposite : function(index){ + if(!this.rowEl){ + this.rowEl = new Ext.CompositeElementLite(); + } + var els = [], lrow, mrow; + if(lrow = this.getLockedRow(index)){ + els.push(lrow); + } + if(mrow = this.getRow(index)){ + els.push(mrow); + } + this.rowEl.elements = els; + return this.rowEl; + }, + + getCell : function(rowIndex, colIndex){ + var locked = this.cm.getLockedCount(); + var source; + if(colIndex < locked){ + source = this.lockedBody.dom.firstChild; + }else{ + source = this.mainBody.dom.firstChild; + colIndex -= locked; + } + return source.rows[rowIndex].childNodes[colIndex]; + }, + + getCellText : function(rowIndex, colIndex){ + return this.getCell(rowIndex, colIndex).firstChild.firstChild; + }, + + getCellBox : function(cell){ + var b = this.fly(cell).getBox(); + if(Ext.isOpera){ // opera fails to report the Y + b.y = cell.offsetTop + this.mainBody.getY(); + } + return b; + }, + + getCellIndex : function(cell){ + var id = String(cell.className).match(this.cellRE); + if(id){ + return parseInt(id[1], 10); + } + return 0; + }, + + findHeaderIndex : function(n){ + var r = Ext.fly(n).findParent("td." + this.hdClass, 6); + return r ? this.getCellIndex(r) : false; + }, + + findHeaderCell : function(n){ + var r = Ext.fly(n).findParent("td." + this.hdClass, 6); + return r ? r : false; + }, + + findRowIndex : function(n){ + if(!n){ + return false; + } + var r = Ext.fly(n).findParent("tr." + this.rowClass, 6); + return r ? r.rowIndex : false; + }, + + findCellIndex : function(node){ + var stop = this.el.dom; + while(node && node != stop){ + if(this.findRE.test(node.className)){ + return this.getCellIndex(node); + } + node = node.parentNode; + } + return false; + }, + + getColumnId : function(index){ + return this.cm.getColumnId(index); + }, + + getSplitters : function(){ + if(this.splitterSelector){ + return Ext.DomQuery.select(this.splitterSelector); + }else{ + return null; + } + }, + + getSplitter : function(index){ + return this.getSplitters()[index]; + }, + + onRowOver : function(e, t){ + var row; + if((row = this.findRowIndex(t)) !== false){ + this.getRowComposite(row).addClass("x-grid-row-over"); + } + }, + + onRowOut : function(e, t){ + var row; + if((row = this.findRowIndex(t)) !== false && row !== this.findRowIndex(e.getRelatedTarget())){ + this.getRowComposite(row).removeClass("x-grid-row-over"); + } + }, + + renderHeaders : function(){ + var cm = this.cm; + var ct = this.templates.hcell, ht = this.templates.header, st = this.templates.hsplit; + var cb = [], lb = [], sb = [], lsb = [], p = {}; + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + p.cellId = "x-grid-hd-0-" + i; + p.splitId = "x-grid-csplit-0-" + i; + p.id = cm.getColumnId(i); + p.title = cm.getColumnTooltip(i) || ""; + p.value = cm.getColumnHeader(i) || ""; + p.style = (this.grid.enableColumnResize === false || !cm.isResizable(i) || cm.isFixed(i)) ? 'cursor:default' : ''; + if(!cm.isLocked(i)){ + cb[cb.length] = ct.apply(p); + sb[sb.length] = st.apply(p); + }else{ + lb[lb.length] = ct.apply(p); + lsb[lsb.length] = st.apply(p); + } + } + return [ht.apply({cells: lb.join(""), splits:lsb.join("")}), + ht.apply({cells: cb.join(""), splits:sb.join("")})]; + }, + + updateHeaders : function(){ + var html = this.renderHeaders(); + this.lockedHd.update(html[0]); + this.mainHd.update(html[1]); + }, + + /** + * Focuses the specified row. + * @param {Number} row The row index + */ + focusRow : function(row){ + var x = this.scroller.dom.scrollLeft; + this.focusCell(row, 0, false); + this.scroller.dom.scrollLeft = x; + }, + + /** + * Focuses the specified cell. + * @param {Number} row The row index + * @param {Number} col The column index + * @param {Boolean} hscroll false to disable horizontal scrolling + */ + focusCell : function(row, col, hscroll){ + var el = this.ensureVisible(row, col, hscroll); + this.focusEl.alignTo(el, "tl-tl"); + if(Ext.isGecko){ + this.focusEl.focus(); + }else{ + this.focusEl.focus.defer(1, this.focusEl); + } + }, + + /** + * Scrolls the specified cell into view + * @param {Number} row The row index + * @param {Number} col The column index + * @param {Boolean} hscroll false to disable horizontal scrolling + */ + ensureVisible : function(row, col, hscroll){ + if(typeof row != "number"){ + row = row.rowIndex; + } + if(row < 0 && row >= this.ds.getCount()){ + return; + } + col = (col !== undefined ? col : 0); + var cm = this.grid.colModel; + while(cm.isHidden(col)){ + col++; + } + + var el = this.getCell(row, col); + if(!el){ + return; + } + var c = this.scroller.dom; + + var ctop = parseInt(el.offsetTop, 10); + var cleft = parseInt(el.offsetLeft, 10); + var cbot = ctop + el.offsetHeight; + var cright = cleft + el.offsetWidth; + + var ch = c.clientHeight - this.mainHd.dom.offsetHeight; + var stop = parseInt(c.scrollTop, 10); + var sleft = parseInt(c.scrollLeft, 10); + var sbot = stop + ch; + var sright = sleft + c.clientWidth; + + if(ctop < stop){ + c.scrollTop = ctop; + }else if(cbot > sbot){ + c.scrollTop = cbot-ch; + } + + if(hscroll !== false){ + if(cleft < sleft){ + c.scrollLeft = cleft; + }else if(cright > sright){ + c.scrollLeft = cright-c.clientWidth; + } + } + return el; + }, + + updateColumns : function(){ + this.grid.stopEditing(); + var cm = this.grid.colModel, colIds = this.getColumnIds(); + //var totalWidth = cm.getTotalWidth(); + var pos = 0; + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + //if(cm.isHidden(i)) continue; + var w = cm.getColumnWidth(i); + this.css.updateRule(this.colSelector+colIds[i], "width", (w - this.borderWidth) + "px"); + this.css.updateRule(this.hdSelector+colIds[i], "width", (w - this.borderWidth) + "px"); + } + this.updateSplitters(); + }, + + generateRules : function(cm){ + var ruleBuf = []; + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + var cid = cm.getColumnId(i); + var align = ''; + if(cm.config[i].align){ + align = 'text-align:'+cm.config[i].align+';'; + } + var hidden = ''; + if(cm.isHidden(i)){ + hidden = 'display:none;'; + } + var width = "width:" + (cm.getColumnWidth(i) - this.borderWidth) + "px;"; + ruleBuf.push( + this.colSelector, cid, " {\n", cm.config[i].css, align, width, "\n}\n", + this.hdSelector, cid, " {\n", align, width, "}\n", + this.tdSelector, cid, " {\n",hidden,"\n}\n", + this.splitSelector, cid, " {\n", hidden , "\n}\n"); + } + return Ext.util.CSS.createStyleSheet(ruleBuf.join("")); + }, + + updateSplitters : function(){ + var cm = this.cm, s = this.getSplitters(); + if(s){ // splitters not created yet + var pos = 0, locked = true; + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + if(cm.isHidden(i)) continue; + var w = cm.getColumnWidth(i); + if(!cm.isLocked(i) && locked){ + pos = 0; + locked = false; + } + pos += w; + s[i].style.left = (pos-this.splitOffset) + "px"; + } + } + }, + + handleHiddenChange : function(colModel, colIndex, hidden){ + if(hidden){ + this.hideColumn(colIndex); + }else{ + this.unhideColumn(colIndex); + } + }, + + hideColumn : function(colIndex){ + var cid = this.getColumnId(colIndex); + this.css.updateRule(this.tdSelector+cid, "display", "none"); + this.css.updateRule(this.splitSelector+cid, "display", "none"); + if(Ext.isSafari){ + this.updateHeaders(); + } + this.updateSplitters(); + this.layout(); + }, + + unhideColumn : function(colIndex){ + var cid = this.getColumnId(colIndex); + this.css.updateRule(this.tdSelector+cid, "display", ""); + this.css.updateRule(this.splitSelector+cid, "display", ""); + + if(Ext.isSafari){ + this.updateHeaders(); + } + this.updateSplitters(); + this.layout(); + }, + + insertRows : function(dm, firstRow, lastRow, isUpdate){ + if(firstRow == 0 && lastRow == dm.getCount()-1){ + this.refresh(); + }else{ + if(!isUpdate){ + this.fireEvent("beforerowsinserted", this, firstRow, lastRow); + } + var s = this.getScrollState(); + var markup = this.renderRows(firstRow, lastRow); + this.bufferRows(markup[0], this.getLockedTable(), firstRow); + this.bufferRows(markup[1], this.getBodyTable(), firstRow); + this.restoreScroll(s); + if(!isUpdate){ + this.fireEvent("rowsinserted", this, firstRow, lastRow); + this.syncRowHeights(firstRow, lastRow); + this.stripeRows(firstRow); + this.layout(); + } + } + }, + + bufferRows : function(markup, target, index){ + var before = null, trows = target.rows, tbody = target.tBodies[0]; + if(index < trows.length){ + before = trows[index]; + } + var b = document.createElement("div"); + b.innerHTML = ""+markup+"
        "; + var rows = b.firstChild.rows; + for(var i = 0, len = rows.length; i < len; i++){ + if(before){ + tbody.insertBefore(rows[0], before); + }else{ + tbody.appendChild(rows[0]); + } + } + b.innerHTML = ""; + b = null; + }, + + deleteRows : function(dm, firstRow, lastRow){ + if(dm.getRowCount()<1){ + this.fireEvent("beforerefresh", this); + this.mainBody.update(""); + this.lockedBody.update(""); + this.fireEvent("refresh", this); + }else{ + this.fireEvent("beforerowsdeleted", this, firstRow, lastRow); + var bt = this.getBodyTable(); + var tbody = bt.firstChild; + var rows = bt.rows; + for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + tbody.removeChild(rows[firstRow]); + } + this.stripeRows(firstRow); + this.fireEvent("rowsdeleted", this, firstRow, lastRow); + } + }, + + updateRows : function(dataSource, firstRow, lastRow){ + var s = this.getScrollState(); + this.refresh(); + this.restoreScroll(s); + }, + + handleSort : function(dataSource, sortColumnIndex, sortDir, noRefresh){ + if(!noRefresh){ + this.refresh(); + } + this.updateHeaderSortState(); + }, + + getScrollState : function(){ + var sb = this.scroller.dom; + return {left: sb.scrollLeft, top: sb.scrollTop}; + }, + + stripeRows : function(startRow){ + if(!this.grid.stripeRows || this.ds.getCount() < 1){ + return; + } + startRow = startRow || 0; + var rows = this.getBodyTable().rows; + var lrows = this.getLockedTable().rows; + var cls = ' x-grid-row-alt '; + for(var i = startRow, len = rows.length; i < len; i++){ + var row = rows[i], lrow = lrows[i]; + var isAlt = ((i+1) % 2 == 0); + var hasAlt = (' '+row.className + ' ').indexOf(cls) != -1; + if(isAlt == hasAlt){ + continue; + } + if(isAlt){ + row.className += " x-grid-row-alt"; + }else{ + row.className = row.className.replace("x-grid-row-alt", ""); + } + if(lrow){ + lrow.className = row.className; + } + } + }, + + restoreScroll : function(state){ + var sb = this.scroller.dom; + sb.scrollLeft = state.left; + sb.scrollTop = state.top; + this.syncScroll(); + }, + + syncScroll : function(){ + var sb = this.scroller.dom; + var sh = this.mainHd.dom; + var bs = this.mainBody.dom; + var lv = this.lockedBody.dom; + sh.scrollLeft = bs.scrollLeft = sb.scrollLeft; + lv.scrollTop = bs.scrollTop = sb.scrollTop; + }, + + handleScroll : function(e){ + this.syncScroll(); + var sb = this.scroller.dom; + this.grid.fireEvent("bodyscroll", sb.scrollLeft, sb.scrollTop); + e.stopEvent(); + }, + + handleWheel : function(e){ + var d = e.getWheelDelta(); + this.scroller.dom.scrollTop -= d*22; + // set this here to prevent jumpy scrolling on large tables + this.lockedBody.dom.scrollTop = this.mainBody.dom.scrollTop = this.scroller.dom.scrollTop; + e.stopEvent(); + }, + + renderRows : function(startRow, endRow){ + // pull in all the crap needed to render rows + var g = this.grid, cm = g.colModel, ds = g.dataSource, stripe = g.stripeRows; + var colCount = cm.getColumnCount(); + + if(ds.getCount() < 1){ + return ["", ""]; + } + + // build a map for all the columns + var cs = []; + for(var i = 0; i < colCount; i++){ + var name = cm.getDataIndex(i); + cs[i] = { + name : typeof name == 'undefined' ? ds.fields.get(i).name : name, + renderer : cm.getRenderer(i), + id : cm.getColumnId(i), + locked : cm.isLocked(i) + }; + } + + startRow = startRow || 0; + endRow = typeof endRow == "undefined"? ds.getCount()-1 : endRow; + + // records to render + var rs = ds.getRange(startRow, endRow); + + return this.doRender(cs, rs, ds, startRow, colCount, stripe); + }, + + // As much as I hate to duplicate code, this was branched because FireFox really hates + // [].join("") on strings. The performance difference was substantial enough to + // branch this function + doRender : Ext.isGecko ? + function(cs, rs, ds, startRow, colCount, stripe){ + var ts = this.templates, ct = ts.cell, rt = ts.row; + // buffers + var buf = "", lbuf = "", cb, lcb, c, p = {}, rp = {}, r, rowIndex; + for(var j = 0, len = rs.length; j < len; j++){ + r = rs[j]; cb = ""; lcb = ""; rowIndex = (j+startRow); + for(var i = 0; i < colCount; i++){ + c = cs[i]; + p.cellId = "x-grid-cell-" + rowIndex + "-" + i; + p.id = c.id; + p.css = p.attr = ""; + p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds); + if(p.value == undefined || p.value === "") p.value = " "; + if(r.dirty && typeof r.modified[c.name] !== 'undefined'){ + p.css += p.css ? ' x-grid-dirty-cell' : 'x-grid-dirty-cell'; + } + var markup = ct.apply(p); + if(!c.locked){ + cb+= markup; + }else{ + lcb+= markup; + } + } + var alt = []; + if(stripe && ((rowIndex+1) % 2 == 0)){ + alt[0] = "x-grid-row-alt"; + } + if(r.dirty){ + alt[1] = " x-grid-dirty-row"; + } + rp.cells = lcb; + if(this.getRowClass){ + alt[2] = this.getRowClass(r, rowIndex); + } + rp.alt = alt.join(" "); + lbuf+= rt.apply(rp); + rp.cells = cb; + buf+= rt.apply(rp); + } + return [lbuf, buf]; + } : + function(cs, rs, ds, startRow, colCount, stripe){ + var ts = this.templates, ct = ts.cell, rt = ts.row; + // buffers + var buf = [], lbuf = [], cb, lcb, c, p = {}, rp = {}, r, rowIndex; + for(var j = 0, len = rs.length; j < len; j++){ + r = rs[j]; cb = []; lcb = []; rowIndex = (j+startRow); + for(var i = 0; i < colCount; i++){ + c = cs[i]; + p.cellId = "x-grid-cell-" + rowIndex + "-" + i; + p.id = c.id; + p.css = p.attr = ""; + p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds); + if(p.value == undefined || p.value === "") p.value = " "; + if(r.dirty && typeof r.modified[c.name] !== 'undefined'){ + p.css += p.css ? ' x-grid-dirty-cell' : 'x-grid-dirty-cell'; + } + var markup = ct.apply(p); + if(!c.locked){ + cb[cb.length] = markup; + }else{ + lcb[lcb.length] = markup; + } + } + var alt = []; + if(stripe && ((rowIndex+1) % 2 == 0)){ + alt[0] = "x-grid-row-alt"; + } + if(r.dirty){ + alt[1] = " x-grid-dirty-row"; + } + rp.cells = lcb; + if(this.getRowClass){ + alt[2] = this.getRowClass(r, rowIndex); + } + rp.alt = alt.join(" "); + rp.cells = lcb.join(""); + lbuf[lbuf.length] = rt.apply(rp); + rp.cells = cb.join(""); + buf[buf.length] = rt.apply(rp); + } + return [lbuf.join(""), buf.join("")]; + }, + + renderBody : function(){ + var markup = this.renderRows(); + var bt = this.templates.body; + return [bt.apply({rows: markup[0]}), bt.apply({rows: markup[1]})]; + }, + + /** + * Refreshes the grid + * @param {Boolean} headersToo + */ + refresh : function(headersToo){ + this.fireEvent("beforerefresh", this); + this.grid.stopEditing(); + var result = this.renderBody(); + this.lockedBody.update(result[0]); + this.mainBody.update(result[1]); + if(headersToo === true){ + this.updateHeaders(); + this.updateColumns(); + this.updateSplitters(); + this.updateHeaderSortState(); + } + this.syncRowHeights(); + this.layout(); + this.fireEvent("refresh", this); + }, + + handleColumnMove : function(cm, oldIndex, newIndex){ + this.indexMap = null; + var s = this.getScrollState(); + this.refresh(true); + this.restoreScroll(s); + this.afterMove(newIndex); + }, + + afterMove : function(colIndex){ + if(this.enableMoveAnim && Ext.enableFx){ + this.fly(this.getHeaderCell(colIndex).firstChild).highlight(this.hlColor); + } + }, + + updateCell : function(dm, rowIndex, dataIndex){ + var colIndex = this.getColumnIndexByDataIndex(dataIndex); + if(typeof colIndex == "undefined"){ // not present in grid + return; + } + var cm = this.grid.colModel; + var cell = this.getCell(rowIndex, colIndex); + var cellText = this.getCellText(rowIndex, colIndex); + + var p = { + cellId : "x-grid-cell-" + rowIndex + "-" + colIndex, + id : cm.getColumnId(colIndex), + css: colIndex == cm.getColumnCount()-1 ? "x-grid-col-last" : "" + }; + var renderer = cm.getRenderer(colIndex); + var val = renderer(dm.getValueAt(rowIndex, dataIndex), p, rowIndex, colIndex, dm); + if(typeof val == "undefined" || val === "") val = " "; + cellText.innerHTML = val; + cell.className = this.cellClass + " " + p.cellId + " " + p.css; + this.syncRowHeights(rowIndex, rowIndex); + }, + + calcColumnWidth : function(colIndex, maxRowsToMeasure){ + var maxWidth = 0; + if(this.grid.autoSizeHeaders){ + var h = this.getHeaderCellMeasure(colIndex); + maxWidth = Math.max(maxWidth, h.scrollWidth); + } + var tb, index; + if(this.cm.isLocked(colIndex)){ + tb = this.getLockedTable(); + index = colIndex; + }else{ + tb = this.getBodyTable(); + index = colIndex - this.cm.getLockedCount(); + } + if(tb && tb.rows){ + var rows = tb.rows; + var stopIndex = Math.min(maxRowsToMeasure || rows.length, rows.length); + for(var i = 0; i < stopIndex; i++){ + var cell = rows[i].childNodes[index].firstChild; + maxWidth = Math.max(maxWidth, cell.scrollWidth); + } + } + return maxWidth + /*margin for error in IE*/ 5; + }, + /** + * Autofit a column to its content. + * @param {Number} colIndex + * @param {Boolean} forceMinSize true to force the column to go smaller if possible + */ + autoSizeColumn : function(colIndex, forceMinSize, suppressEvent){ + if(this.cm.isHidden(colIndex)){ + return; // can't calc a hidden column + } + if(forceMinSize){ + var cid = this.cm.getColumnId(colIndex); + this.css.updateRule(this.colSelector + cid, "width", this.grid.minColumnWidth + "px"); + if(this.grid.autoSizeHeaders){ + this.css.updateRule(this.hdSelector + cid, "width", this.grid.minColumnWidth + "px"); + } + } + var newWidth = this.calcColumnWidth(colIndex); + this.cm.setColumnWidth(colIndex, + Math.max(this.grid.minColumnWidth, newWidth), suppressEvent); + if(!suppressEvent){ + this.grid.fireEvent("columnresize", colIndex, newWidth); + } + }, + + /** + * Autofits all columns to their content and then expands to fit any extra space in the grid + */ + autoSizeColumns : function(){ + var cm = this.grid.colModel; + var colCount = cm.getColumnCount(); + for(var i = 0; i < colCount; i++){ + this.autoSizeColumn(i, true, true); + } + if(cm.getTotalWidth() < this.scroller.dom.clientWidth){ + this.fitColumns(); + }else{ + this.updateColumns(); + this.layout(); + } + }, + + /** + * Autofits all columns to the grid's width proportionate with their current size + * @param {Boolean} reserveScrollSpace Reserve space for a scrollbar + */ + fitColumns : function(reserveScrollSpace){ + var cm = this.grid.colModel; + var colCount = cm.getColumnCount(); + var cols = []; + var width = 0; + var i, w; + for (i = 0; i < colCount; i++){ + if(!cm.isHidden(i) && !cm.isFixed(i)){ + w = cm.getColumnWidth(i); + cols.push(i); + cols.push(w); + width += w; + } + } + var avail = Math.min(this.scroller.dom.clientWidth, this.el.getWidth()); + if(reserveScrollSpace){ + avail -= 17; + } + var frac = (avail - cm.getTotalWidth())/width; + while (cols.length){ + w = cols.pop(); + i = cols.pop(); + cm.setColumnWidth(i, Math.floor(w + w*frac), true); + } + this.updateColumns(); + this.layout(); + }, + + onRowSelect : function(rowIndex){ + var row = this.getRowComposite(rowIndex); + row.addClass("x-grid-row-selected"); + }, + + onRowDeselect : function(rowIndex){ + var row = this.getRowComposite(rowIndex); + row.removeClass("x-grid-row-selected"); + }, + + onCellSelect : function(row, col){ + var cell = this.getCell(row, col); + if(cell){ + Ext.fly(cell).addClass("x-grid-cell-selected"); + } + }, + + onCellDeselect : function(row, col){ + var cell = this.getCell(row, col); + if(cell){ + Ext.fly(cell).removeClass("x-grid-cell-selected"); + } + }, + + updateHeaderSortState : function(){ + var state = this.ds.getSortState(); + if(!state){ + return; + } + this.sortState = state; + var sortColumn = this.cm.findColumnIndex(state.field); + if(sortColumn != -1){ + var sortDir = state.direction; + var sc = this.sortClasses; + var hds = this.el.select(this.headerSelector).removeClass(sc); + hds.item(sortColumn).addClass(sc[sortDir == "DESC" ? 1 : 0]); + } + }, + + handleHeaderClick : function(g, index){ + if(this.headersDisabled){ + return; + } + var dm = g.store, cm = g.colModel; + if(!cm.isSortable(index)){ + return; + } + g.stopEditing(); + dm.sort(cm.getDataIndex(index)); + }, + + + destroy : function(){ + if(this.colMenu){ + this.colMenu.removeAll(); + Ext.menu.MenuMgr.unregister(this.colMenu); + this.colMenu.getEl().remove(); + delete this.colMenu; + } + if(this.hmenu){ + this.hmenu.removeAll(); + Ext.menu.MenuMgr.unregister(this.hmenu); + this.hmenu.getEl().remove(); + delete this.hmenu; + } + if(this.grid.enableColumnMove){ + var dds = Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; + if(dds){ + for(var dd in dds){ + if(!dds[dd].config.isTarget && dds[dd].dragElId){ + var elid = dds[dd].dragElId; + dds[dd].unreg(); + Ext.get(elid).remove(); + } else if(dds[dd].config.isTarget){ + dds[dd].proxyTop.remove(); + dds[dd].proxyBottom.remove(); + dds[dd].unreg(); + } + if(Ext.dd.DDM.locationCache[dd]){ + delete Ext.dd.DDM.locationCache[dd]; + } + } + delete Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; + } + } + + this.bind(null, null); + Ext.EventManager.removeResizeListener(this.onWindowResize, this); + }, + + handleLockChange : function(){ + this.refresh(true); + }, + + onDenyColumnLock : function(){ + + }, + + onDenyColumnHide : function(){ + + }, + + handleHdMenuClick : function(item){ + var index = this.hdCtxIndex; + var cm = this.cm, ds = this.ds; + switch(item.id){ + case "asc": + ds.sort(cm.getDataIndex(index), "ASC"); + break; + case "desc": + ds.sort(cm.getDataIndex(index), "DESC"); + break; + case "lock": + var lc = cm.getLockedCount(); + if(cm.getColumnCount(true) <= lc+1){ + this.onDenyColumnLock(); + return; + } + if(lc != index){ + cm.setLocked(index, true, true); + cm.moveColumn(index, lc); + this.grid.fireEvent("columnmove", index, lc); + }else{ + cm.setLocked(index, true); + } + break; + case "unlock": + var lc = cm.getLockedCount(); + if((lc-1) != index){ + cm.setLocked(index, false, true); + cm.moveColumn(index, lc-1); + this.grid.fireEvent("columnmove", index, lc-1); + }else{ + cm.setLocked(index, false); + } + break; + default: + index = cm.getIndexById(item.id.substr(4)); + if(index != -1){ + if(item.checked && cm.getColumnCount(true) <= 1){ + this.onDenyColumnHide(); + return false; + } + cm.setHidden(index, item.checked); + } + } + return true; + }, + + beforeColMenuShow : function(){ + var cm = this.cm, colCount = cm.getColumnCount(); + this.colMenu.removeAll(); + for(var i = 0; i < colCount; i++){ + this.colMenu.add(new Ext.menu.CheckItem({ + id: "col-"+cm.getColumnId(i), + text: cm.getColumnHeader(i), + checked: !cm.isHidden(i), + hideOnClick:false + })); + } + }, + + handleHdCtx : function(g, index, e){ + e.stopEvent(); + var hd = this.getHeaderCell(index); + this.hdCtxIndex = index; + var ms = this.hmenu.items, cm = this.cm; + ms.get("asc").setDisabled(!cm.isSortable(index)); + ms.get("desc").setDisabled(!cm.isSortable(index)); + if(this.grid.enableColLock !== false){ + ms.get("lock").setDisabled(cm.isLocked(index)); + ms.get("unlock").setDisabled(!cm.isLocked(index)); + } + this.hmenu.show(hd, "tl-bl"); + }, + + handleHdOver : function(e){ + var hd = this.findHeaderCell(e.getTarget()); + if(hd && !this.headersDisabled){ + if(this.grid.colModel.isSortable(this.getCellIndex(hd))){ + this.fly(hd).addClass("x-grid-hd-over"); + } + } + }, + + handleHdOut : function(e){ + var hd = this.findHeaderCell(e.getTarget()); + if(hd){ + this.fly(hd).removeClass("x-grid-hd-over"); + } + }, + + handleSplitDblClick : function(e, t){ + var i = this.getCellIndex(t); + if(this.grid.enableColumnResize !== false && this.cm.isResizable(i) && !this.cm.isFixed(i)){ + this.autoSizeColumn(i, true); + this.layout(); + } + }, + + render : function(){ + + var cm = this.cm; + var colCount = cm.getColumnCount(); + + if(this.grid.monitorWindowResize === true){ + Ext.EventManager.onWindowResize(this.onWindowResize, this, true); + } + var header = this.renderHeaders(); + var body = this.templates.body.apply({rows:""}); + var html = this.templates.master.apply({ + lockedBody: body, + body: body, + lockedHeader: header[0], + header: header[1] + }); + + //this.updateColumns(); + + this.grid.getGridEl().dom.innerHTML = html; + + this.initElements(); + + this.scroller.on("scroll", this.handleScroll, this); + this.lockedBody.on("mousewheel", this.handleWheel, this); + this.mainBody.on("mousewheel", this.handleWheel, this); + + this.mainHd.on("mouseover", this.handleHdOver, this); + this.mainHd.on("mouseout", this.handleHdOut, this); + this.mainHd.on("dblclick", this.handleSplitDblClick, this, + {delegate: "."+this.splitClass}); + + this.lockedHd.on("mouseover", this.handleHdOver, this); + this.lockedHd.on("mouseout", this.handleHdOut, this); + this.lockedHd.on("dblclick", this.handleSplitDblClick, this, + {delegate: "."+this.splitClass}); + + if(this.grid.enableColumnResize !== false && Ext.grid.SplitDragZone){ + new Ext.grid.SplitDragZone(this.grid, this.lockedHd.dom, this.mainHd.dom); + } + + this.updateSplitters(); + + if(this.grid.enableColumnMove && Ext.grid.HeaderDragZone){ + new Ext.grid.HeaderDragZone(this.grid, this.lockedHd.dom, this.mainHd.dom); + new Ext.grid.HeaderDropZone(this.grid, this.lockedHd.dom, this.mainHd.dom); + } + + if(this.grid.enableCtxMenu !== false && Ext.menu.Menu){ + this.hmenu = new Ext.menu.Menu({id: this.grid.id + "-hctx"}); + this.hmenu.add( + {id:"asc", text: this.sortAscText, cls: "xg-hmenu-sort-asc"}, + {id:"desc", text: this.sortDescText, cls: "xg-hmenu-sort-desc"} + ); + if(this.grid.enableColLock !== false){ + this.hmenu.add('-', + {id:"lock", text: this.lockText, cls: "xg-hmenu-lock"}, + {id:"unlock", text: this.unlockText, cls: "xg-hmenu-unlock"} + ); + } + if(this.grid.enableColumnHide !== false){ + + this.colMenu = new Ext.menu.Menu({id:this.grid.id + "-hcols-menu"}); + this.colMenu.on("beforeshow", this.beforeColMenuShow, this); + this.colMenu.on("itemclick", this.handleHdMenuClick, this); + + this.hmenu.add('-', + {id:"columns", text: this.columnsText, menu: this.colMenu} + ); + } + this.hmenu.on("itemclick", this.handleHdMenuClick, this); + + this.grid.on("headercontextmenu", this.handleHdCtx, this); + } + + if((this.grid.enableDragDrop || this.grid.enableDrag) && Ext.grid.GridDragZone){ + this.dd = new Ext.grid.GridDragZone(this.grid, { + ddGroup : this.grid.ddGroup || 'GridDD' + }); + } + + /* + for(var i = 0; i < colCount; i++){ + if(cm.isHidden(i)){ + this.hideColumn(i); + } + if(cm.config[i].align){ + this.css.updateRule(this.colSelector + i, "textAlign", cm.config[i].align); + this.css.updateRule(this.hdSelector + i, "textAlign", cm.config[i].align); + } + }*/ + + this.updateHeaderSortState(); + + this.beforeInitialResize(); + this.layout(true); + + // two part rendering gives faster view to the user + this.renderPhase2.defer(1, this); + }, + + renderPhase2 : function(){ + // render the rows now + this.refresh(); + if(this.grid.autoSizeColumns){ + this.autoSizeColumns(); + } + }, + + beforeInitialResize : function(){ + + }, + + onColumnSplitterMoved : function(i, w){ + this.userResized = true; + var cm = this.grid.colModel; + cm.setColumnWidth(i, w, true); + var cid = cm.getColumnId(i); + this.css.updateRule(this.colSelector + cid, "width", (w-this.borderWidth) + "px"); + this.css.updateRule(this.hdSelector + cid, "width", (w-this.borderWidth) + "px"); + this.updateSplitters(); + this.layout(); + this.grid.fireEvent("columnresize", i, w); + }, + + syncRowHeights : function(startIndex, endIndex){ + if(this.grid.enableRowHeightSync === true && this.cm.getLockedCount() > 0){ + startIndex = startIndex || 0; + var mrows = this.getBodyTable().rows; + var lrows = this.getLockedTable().rows; + var len = mrows.length-1; + endIndex = Math.min(endIndex || len, len); + for(var i = startIndex; i <= endIndex; i++){ + var m = mrows[i], l = lrows[i]; + var h = Math.max(m.offsetHeight, l.offsetHeight); + m.style.height = l.style.height = h + "px"; + } + } + }, + + layout : function(initialRender, is2ndPass){ + var g = this.grid; + var auto = g.autoHeight; + var scrollOffset = 16; + var c = g.getGridEl(), cm = this.cm, + expandCol = g.autoExpandColumn, + gv = this; + //c.beginMeasure(); + + if(!c.dom.offsetWidth){ // display:none? + if(initialRender){ + this.lockedWrap.show(); + this.mainWrap.show(); + } + return; + } + + var hasLock = this.cm.isLocked(0); + + var tbh = this.headerPanel.getHeight(); + var bbh = this.footerPanel.getHeight(); + + if(auto){ + var ch = this.getBodyTable().offsetHeight + tbh + bbh + this.mainHd.getHeight(); + var newHeight = ch + c.getBorderWidth("tb"); + if(g.maxHeight){ + newHeight = Math.min(g.maxHeight, newHeight); + } + c.setHeight(newHeight); + } + + if(g.autoWidth){ + c.setWidth(cm.getTotalWidth()+c.getBorderWidth('lr')); + } + + var s = this.scroller; + + var csize = c.getSize(true); + + this.el.setSize(csize.width, csize.height); + + this.headerPanel.setWidth(csize.width); + this.footerPanel.setWidth(csize.width); + + var hdHeight = this.mainHd.getHeight(); + var vw = csize.width; + var vh = csize.height - (tbh + bbh); + + s.setSize(vw, vh); + + var bt = this.getBodyTable(); + var ltWidth = hasLock ? + Math.max(this.getLockedTable().offsetWidth, this.lockedHd.dom.firstChild.offsetWidth) : 0; + + var scrollHeight = bt.offsetHeight; + var scrollWidth = ltWidth + bt.offsetWidth; + var vscroll = false, hscroll = false; + + this.scrollSizer.setSize(scrollWidth, scrollHeight+hdHeight); + + var lw = this.lockedWrap, mw = this.mainWrap; + var lb = this.lockedBody, mb = this.mainBody; + + setTimeout(function(){ + var t = s.dom.offsetTop; + var w = s.dom.clientWidth, + h = s.dom.clientHeight; + + lw.setTop(t); + lw.setSize(ltWidth, h); + + mw.setLeftTop(ltWidth, t); + mw.setSize(w-ltWidth, h); + + lb.setHeight(h-hdHeight); + mb.setHeight(h-hdHeight); + + if(is2ndPass !== true && !gv.userResized && expandCol){ + // high speed resize without full column calculation + var ci = cm.getIndexById(expandCol); + var tw = cm.getTotalWidth(false); + var currentWidth = cm.getColumnWidth(ci); + var cw = Math.min(Math.max(((w-tw)+currentWidth-2)-/*scrollbar*/(w <= s.dom.offsetWidth ? 0 : 18), g.autoExpandMin), g.autoExpandMax); + if(currentWidth != cw){ + cm.setColumnWidth(ci, cw, true); + gv.css.updateRule(gv.colSelector+expandCol, "width", (cw - gv.borderWidth) + "px"); + gv.css.updateRule(gv.hdSelector+expandCol, "width", (cw - gv.borderWidth) + "px"); + gv.updateSplitters(); + gv.layout(false, true); + } + } + + if(initialRender){ + lw.show(); + mw.show(); + } + //c.endMeasure(); + }, 10); + }, + + onWindowResize : function(){ + if(!this.grid.monitorWindowResize || this.grid.autoHeight){ + return; + } + this.layout(); + }, + + appendFooter : function(parentEl){ + return null; + }, + + sortAscText : "Sort Ascending", + sortDescText : "Sort Descending", + lockText : "Lock Column", + unlockText : "Unlock Column", + columnsText : "Columns" +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/JsonView.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/JsonView.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/JsonView.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,300 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.JsonView + * @extends Ext.View + * Shortcut class to create a JSON + {@link Ext.Updater} template view. Usage: +
        
        +var view = new Ext.JsonView("my-element",
        +    '<div id="{id}">{foo} - {bar}</div>', // auto create template
        +    { multiSelect: true, jsonRoot: "data" }
        +);
        +
        +// listen for node click?
        +view.on("click", function(vw, index, node, e){
        +    alert('Node "' + node.id + '" at index: ' + index + " was clicked.");
        +});
        +
        +// direct load of JSON data
        +view.load("foobar.php");
        +
        +// Example from my blog list
        +var tpl = new Ext.Template(
        +    '<div class="entry">' +
        +    '<a class="entry-title" href="{link}">{title}</a>' +
        +    "<h4>{date} by {author} | {comments} Comments</h4>{description}" +
        +    "</div><hr />"
        +);
        +
        +var moreView = new Ext.JsonView("entry-list", tpl, {
        +    jsonRoot: "posts"
        +});
        +moreView.on("beforerender", this.sortEntries, this);
        +moreView.load({
        +    url: "/blog/get-posts.php",
        +    params: "allposts=true",
        +    text: "Loading Blog Entries..."
        +});
        +
        + * @constructor + * Create a new JsonView + * @param {Mixed} container The container element where the view is to be rendered. + * @param {Template} tpl The rendering template + * @param {Object} config The config object + */ +Ext.JsonView = function(container, tpl, config){ + Ext.JsonView.superclass.constructor.call(this, container, tpl, config); + + var um = this.el.getUpdater(); + um.setRenderer(this); + um.on("update", this.onLoad, this); + um.on("failure", this.onLoadException, this); + + /** + * @event beforerender + * Fires before rendering of the downloaded JSON data. + * @param {Ext.JsonView} this + * @param {Object} data The JSON data loaded + */ + /** + * @event load + * Fires when data is loaded. + * @param {Ext.JsonView} this + * @param {Object} data The JSON data loaded + * @param {Object} response The raw Connect response object + */ + /** + * @event loadexception + * Fires when loading fails. + * @param {Ext.JsonView} this + * @param {Object} response The raw Connect response object + */ + this.addEvents({ + 'beforerender' : true, + 'load' : true, + 'loadexception' : true + }); +}; +Ext.extend(Ext.JsonView, Ext.View, { + /** + * The root property in the loaded JSON object that contains the data + * @type {String} + */ + jsonRoot : "", + + /** + * Refreshes the view. + */ + refresh : function(){ + this.clearSelections(); + this.el.update(""); + var html = []; + var o = this.jsonData; + if(o && o.length > 0){ + for(var i = 0, len = o.length; i < len; i++){ + var data = this.prepareData(o[i], i, o); + html[html.length] = this.tpl.apply(data); + } + }else{ + html.push(this.emptyText); + } + this.el.update(html.join("")); + this.nodes = this.el.dom.childNodes; + this.updateIndexes(0); + }, + + /** + * Performs an async HTTP request, and loads the JSON from the response. If params are specified it uses POST, otherwise it uses GET. + * @param {Object/String/Function} url The URL for this request, or a function to call to get the URL, or a config object containing any of the following options: +
        
        +     view.load({
        +         url: "your-url.php",
        +         params: {param1: "foo", param2: "bar"}, // or a URL encoded string
        +         callback: yourFunction,
        +         scope: yourObject, //(optional scope)
        +         discardUrl: false,
        +         nocache: false,
        +         text: "Loading...",
        +         timeout: 30,
        +         scripts: false
        +     });
        +     
        + * The only required property is url. The optional properties nocache, text and scripts + * are shorthand for disableCaching, indicatorText and loadScripts and are used to set their associated property on this Updater instance. + * @param {String/Object} params (optional) The parameters to pass, as either a URL encoded string "param1=1&param2=2" or an object {param1: 1, param2: 2} + * @param {Function} callback (optional) Callback when transaction is complete - called with signature (oElement, bSuccess) + * @param {Boolean} discardUrl (optional) By default when you execute an update the defaultUrl is changed to the last used URL. If true, it will not store the URL. + */ + load : function(){ + var um = this.el.getUpdater(); + um.update.apply(um, arguments); + }, + + render : function(el, response){ + this.clearSelections(); + this.el.update(""); + var o; + try{ + o = Ext.util.JSON.decode(response.responseText); + if(this.jsonRoot){ + o = eval("o." + this.jsonRoot); + } + } catch(e){ + } + /** + * The current JSON data or null + */ + this.jsonData = o; + this.beforeRender(); + this.refresh(); + }, + +/** + * Get the number of records in the current JSON dataset + * @return {Number} + */ + getCount : function(){ + return this.jsonData ? this.jsonData.length : 0; + }, + +/** + * Returns the JSON object for the specified node(s) + * @param {HTMLElement/Array} node The node or an array of nodes + * @return {Object/Array} If you pass in an array, you get an array back, otherwise + * you get the JSON object for the node + */ + getNodeData : function(node){ + if(node instanceof Array){ + var data = []; + for(var i = 0, len = node.length; i < len; i++){ + data.push(this.getNodeData(node[i])); + } + return data; + } + return this.jsonData[this.indexOf(node)] || null; + }, + + beforeRender : function(){ + this.snapshot = this.jsonData; + if(this.sortInfo){ + this.sort.apply(this, this.sortInfo); + } + this.fireEvent("beforerender", this, this.jsonData); + }, + + onLoad : function(el, o){ + this.fireEvent("load", this, this.jsonData, o); + }, + + onLoadException : function(el, o){ + this.fireEvent("loadexception", this, o); + }, + +/** + * Filter the data by a specific property. + * @param {String} property A property on your JSON objects + * @param {String/RegExp} value Either string that the property values + * should start with, or a RegExp to test against the property + */ + filter : function(property, value){ + if(this.jsonData){ + var data = []; + var ss = this.snapshot; + if(typeof value == "string"){ + var vlen = value.length; + if(vlen == 0){ + this.clearFilter(); + return; + } + value = value.toLowerCase(); + for(var i = 0, len = ss.length; i < len; i++){ + var o = ss[i]; + if(o[property].substr(0, vlen).toLowerCase() == value){ + data.push(o); + } + } + } else if(value.exec){ // regex? + for(var i = 0, len = ss.length; i < len; i++){ + var o = ss[i]; + if(value.test(o[property])){ + data.push(o); + } + } + } else{ + return; + } + this.jsonData = data; + this.refresh(); + } + }, + +/** + * Filter by a function. The passed function will be called with each + * object in the current dataset. If the function returns true the value is kept, + * otherwise it is filtered. + * @param {Function} fn + * @param {Object} scope (optional) The scope of the function (defaults to this JsonView) + */ + filterBy : function(fn, scope){ + if(this.jsonData){ + var data = []; + var ss = this.snapshot; + for(var i = 0, len = ss.length; i < len; i++){ + var o = ss[i]; + if(fn.call(scope || this, o)){ + data.push(o); + } + } + this.jsonData = data; + this.refresh(); + } + }, + +/** + * Clears the current filter. + */ + clearFilter : function(){ + if(this.snapshot && this.jsonData != this.snapshot){ + this.jsonData = this.snapshot; + this.refresh(); + } + }, + + +/** + * Sorts the data for this view and refreshes it. + * @param {String} property A property on your JSON objects to sort on + * @param {String} direction (optional) "desc" or "asc" (defaults to "asc") + * @param {Function} sortType (optional) A function to call to convert the data to a sortable value. + */ + sort : function(property, dir, sortType){ + this.sortInfo = Array.prototype.slice.call(arguments, 0); + if(this.jsonData){ + var p = property; + var dsc = dir && dir.toLowerCase() == "desc"; + var f = function(o1, o2){ + var v1 = sortType ? sortType(o1[p]) : o1[p]; + var v2 = sortType ? sortType(o2[p]) : o2[p]; + ; + if(v1 < v2){ + return dsc ? +1 : -1; + } else if(v1 > v2){ + return dsc ? -1 : +1; + } else{ + return 0; + } + }; + this.jsonData.sort(f); + this.refresh(); + if(this.jsonData != this.snapshot){ + this.snapshot.sort(f); + } + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/MasterTemplate.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/MasterTemplate.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/MasterTemplate.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,147 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.MasterTemplate + * @extends Ext.Template + * Provides a template that can have child templates. The syntax is: +
        
        +var t = new Ext.MasterTemplate(
        +	'<select name="{name}">',
        +		'<tpl name="options"><option value="{value:trim}">{text:ellipsis(10)}</option></tpl>',
        +	'</select>'
        +);
        +t.add('options', {value: 'foo', text: 'bar'});
        +// or you can add multiple child elements in one shot
        +t.addAll('options', [
        +    {value: 'foo', text: 'bar'},
        +    {value: 'foo2', text: 'bar2'},
        +    {value: 'foo3', text: 'bar3'}
        +]);
        +// then append, applying the master template values
        +t.append('my-form', {name: 'my-select'});
        +
        +* A name attribute for the child template is not required if you have only one child +* template or you want to refer to them by index. + */ +Ext.MasterTemplate = function(){ + Ext.MasterTemplate.superclass.constructor.apply(this, arguments); + this.originalHtml = this.html; + var st = {}; + var m, re = this.subTemplateRe; + re.lastIndex = 0; + var subIndex = 0; + while(m = re.exec(this.html)){ + var name = m[1], content = m[2]; + st[subIndex] = { + name: name, + index: subIndex, + buffer: [], + tpl : new Ext.Template(content) + }; + if(name){ + st[name] = st[subIndex]; + } + st[subIndex].tpl.compile(); + st[subIndex].tpl.call = this.call.createDelegate(this); + subIndex++; + } + this.subCount = subIndex; + this.subs = st; +}; +Ext.extend(Ext.MasterTemplate, Ext.Template, { + /** + * The regular expression used to match sub templates + * @type RegExp + * @property + */ + subTemplateRe : /((?:.|\n)*?)<\/tpl>/gi, + + /** + * Applies the passed values to a child template. + * @param {String/Number} name (optional) The name or index of the child template + * @param {Array/Object} values The values to be applied to the template + * @return {MasterTemplate} this + */ + add : function(name, values){ + if(arguments.length == 1){ + values = arguments[0]; + name = 0; + } + var s = this.subs[name]; + s.buffer[s.buffer.length] = s.tpl.apply(values); + return this; + }, + + /** + * Applies all the passed values to a child template. + * @param {String/Number} name (optional) The name or index of the child template + * @param {Array} values The values to be applied to the template, this should be an array of objects. + * @param {Boolean} reset (optional) True to reset the template first + * @return {MasterTemplate} this + */ + fill : function(name, values, reset){ + var a = arguments; + if(a.length == 1 || (a.length == 2 && typeof a[1] == "boolean")){ + values = a[0]; + name = 0; + reset = a[1]; + } + if(reset){ + this.reset(); + } + for(var i = 0, len = values.length; i < len; i++){ + this.add(name, values[i]); + } + return this; + }, + + /** + * Resets the template for reuse + * @return {MasterTemplate} this + */ + reset : function(){ + var s = this.subs; + for(var i = 0; i < this.subCount; i++){ + s[i].buffer = []; + } + return this; + }, + + applyTemplate : function(values){ + var s = this.subs; + var replaceIndex = -1; + this.html = this.originalHtml.replace(this.subTemplateRe, function(m, name){ + return s[++replaceIndex].buffer.join(""); + }); + return Ext.MasterTemplate.superclass.applyTemplate.call(this, values); + }, + + apply : function(){ + return this.applyTemplate.apply(this, arguments); + }, + + compile : function(){return this;} +}); + +/** + * Alias for fill(). + * @method + */ +Ext.MasterTemplate.prototype.addAll = Ext.MasterTemplate.prototype.fill; + /** + * Creates a template from the passed element's value (display:none textarea, preferred) or innerHTML. e.g. + * var tpl = Ext.MasterTemplate.from('element-id'); + * @param {String/HTMLElement} el + * @param {Object} config + * @static + */ +Ext.MasterTemplate.from = function(el, config){ + el = Ext.getDom(el); + return new Ext.MasterTemplate(el.value || el.innerHTML, config || ''); +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/View.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/View.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/View.js 4 Dec 2007 02:48:55 -0000 1.1 @@ -0,0 +1,461 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.View + * @extends Ext.util.Observable + * Create a "View" for an element based on a data model or Updater and the supplied DomHelper template. + * This class also supports single and multi selection modes.
        + * Create a data model bound view: +
        
        + var store = new Ext.data.Store(...);
        +
        + var view = new Ext.View("my-element",
        + '<div id="{0}">{2} - {1}</div>', // auto create template
        + {
        + singleSelect: true,
        + selectedClass: "xdataview-selected",
        + store: store
        + });
        +
        + // listen for node click?
        + view.on("click", function(vw, index, node, e){
        + alert('Node "' + node.id + '" at index: ' + index + " was clicked.");
        + });
        +
        + // load XML data
        + dataModel.load("foobar.xml");
        + 
        + For an example of creating a JSON/Updater view, see {@link Ext.JsonView}. + *

        + * Note: The root of your template must be a single node. Table/row implementations may work but are not supported due to + * IE"s limited insertion support with tables and Opera"s faulty event bubbling. + * @constructor + * Create a new View + * @param {Mixed} container The container element where the view is to be rendered. + * @param {String/DomHelper.Template} tpl The rendering template or a string to create a template with + * @param {Object} config The config object + */ +Ext.View = function(container, tpl, config){ + this.el = Ext.get(container); + if(typeof tpl == "string"){ + tpl = new Ext.Template(tpl); + } + tpl.compile(); + /** + * The template used by this View + * @type {Ext.DomHelper.Template} + */ + this.tpl = tpl; + + Ext.apply(this, config); + + /** @private */ + this.addEvents({ + /** + * @event beforeclick + * Fires before a click is processed. Returns false to cancel the default action. + * @param {Ext.View} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "beforeclick" : true, + /** + * @event click + * Fires when a template node is clicked. + * @param {Ext.View} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "click" : true, + /** + * @event dblclick + * Fires when a template node is double clicked. + * @param {Ext.View} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "dblclick" : true, + /** + * @event contextmenu + * Fires when a template node is right clicked. + * @param {Ext.View} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "contextmenu" : true, + /** + * @event selectionchange + * Fires when the selected nodes change. + * @param {Ext.View} this + * @param {Array} selections Array of the selected nodes + */ + "selectionchange" : true, + + /** + * @event beforeselect + * Fires before a selection is made. If any handlers return false, the selection is cancelled. + * @param {Ext.View} this + * @param {HTMLElement} node The node to be selected + * @param {Array} selections Array of currently selected nodes + */ + "beforeselect" : true + }); + + this.el.on({ + "click": this.onClick, + "dblclick": this.onDblClick, + "contextmenu": this.onContextMenu, + scope:this + }); + + this.selections = []; + this.nodes = []; + this.cmp = new Ext.CompositeElementLite([]); + if(this.store){ + this.setStore(this.store, true); + } + Ext.View.superclass.constructor.call(this); +}; + +Ext.extend(Ext.View, Ext.util.Observable, { + /** + * The css class to add to selected nodes + * @type {Ext.DomHelper.Template} + */ + selectedClass : "x-view-selected", + + emptyText : "", + /** + * Returns the element this view is bound to. + * @return {Ext.Element} + */ + getEl : function(){ + return this.el; + }, + + /** + * Refreshes the view. + */ + refresh : function(){ + var t = this.tpl; + this.clearSelections(); + this.el.update(""); + var html = []; + var records = this.store.getRange(); + if(records.length < 1){ + this.el.update(this.emptyText); + return; + } + for(var i = 0, len = records.length; i < len; i++){ + var data = this.prepareData(records[i].data, i, records[i]); + html[html.length] = t.apply(data); + } + this.el.update(html.join("")); + this.nodes = this.el.dom.childNodes; + this.updateIndexes(0); + }, + + /** + * Function to override to reformat the data that is sent to + * the template for each node. + * @param {Array/Object} data The raw data (array of colData for a data model bound view or + * a JSON object for an Updater bound view). + */ + prepareData : function(data){ + return data; + }, + + onUpdate : function(ds, record){ + this.clearSelections(); + var index = this.store.indexOf(record); + var n = this.nodes[index]; + this.tpl.insertBefore(n, this.prepareData(record.data)); + n.parentNode.removeChild(n); + this.updateIndexes(index, index); + }, + + onAdd : function(ds, records, index){ + this.clearSelections(); + if(this.nodes.length == 0){ + this.refresh(); + return; + } + var n = this.nodes[index]; + for(var i = 0, len = records.length; i < len; i++){ + var d = this.prepareData(records[i].data); + if(n){ + this.tpl.insertBefore(n, d); + }else{ + this.tpl.append(this.el, d); + } + } + this.updateIndexes(index); + }, + + onRemove : function(ds, record, index){ + this.clearSelections(); + this.el.dom.removeChild(this.nodes[index]); + this.updateIndexes(index); + }, + + /** + * Refresh an individual node. + * @param {Number} index + */ + refreshNode : function(index){ + this.onUpdate(this.store, this.store.getAt(index)); + }, + + updateIndexes : function(startIndex, endIndex){ + var ns = this.nodes; + startIndex = startIndex || 0; + endIndex = endIndex || ns.length - 1; + for(var i = startIndex; i <= endIndex; i++){ + ns[i].nodeIndex = i; + } + }, + + /** + * Changes the data store this view uses and refresh the view. + * @param {Store} store + */ + setStore : function(store, initial){ + if(!initial && this.store){ + this.store.un("datachanged", this.refresh, this); + this.store.un("add", this.onAdd, this); + this.store.un("remove", this.onRemove, this); + this.store.un("update", this.onUpdate, this); + this.store.un("clear", this.refresh, this); + } + if(store){ + store.on("datachanged", this.refresh, this); + store.on("add", this.onAdd, this); + store.on("remove", this.onRemove, this); + store.on("update", this.onUpdate, this); + store.on("clear", this.refresh, this); + } + this.store = store; + if(store){ + this.refresh(); + } + }, + + /** + * Returns the template node the passed child belongs to or null if it doesn't belong to one. + * @param {HTMLElement} node + * @return {HTMLElement} The template node + */ + findItemFromChild : function(node){ + var el = this.el.dom; + if(!node || node.parentNode == el){ + return node; + } + var p = node.parentNode; + while(p && p != el){ + if(p.parentNode == el){ + return p; + } + p = p.parentNode; + } + return null; + }, + + /** @ignore */ + onClick : function(e){ + var item = this.findItemFromChild(e.getTarget()); + if(item){ + var index = this.indexOf(item); + if(this.onItemClick(item, index, e) !== false){ + this.fireEvent("click", this, index, item, e); + } + }else{ + this.clearSelections(); + } + }, + + /** @ignore */ + onContextMenu : function(e){ + var item = this.findItemFromChild(e.getTarget()); + if(item){ + this.fireEvent("contextmenu", this, this.indexOf(item), item, e); + } + }, + + /** @ignore */ + onDblClick : function(e){ + var item = this.findItemFromChild(e.getTarget()); + if(item){ + this.fireEvent("dblclick", this, this.indexOf(item), item, e); + } + }, + + onItemClick : function(item, index, e){ + if(this.fireEvent("beforeclick", this, index, item, e) === false){ + return false; + } + if(this.multiSelect || this.singleSelect){ + if(this.multiSelect && e.shiftKey && this.lastSelection){ + this.select(this.getNodes(this.indexOf(this.lastSelection), index), false); + }else{ + this.select(item, this.multiSelect && e.ctrlKey); + this.lastSelection = item; + } + e.preventDefault(); + } + return true; + }, + + /** + * Get the number of selected nodes. + * @return {Number} + */ + getSelectionCount : function(){ + return this.selections.length; + }, + + /** + * Get the currently selected nodes. + * @return {Array} An array of HTMLElements + */ + getSelectedNodes : function(){ + return this.selections; + }, + + /** + * Get the indexes of the selected nodes. + * @return {Array} + */ + getSelectedIndexes : function(){ + var indexes = [], s = this.selections; + for(var i = 0, len = s.length; i < len; i++){ + indexes.push(s[i].nodeIndex); + } + return indexes; + }, + + /** + * Clear all selections + * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange event + */ + clearSelections : function(suppressEvent){ + if(this.nodes && (this.multiSelect || this.singleSelect) && this.selections.length > 0){ + this.cmp.elements = this.selections; + this.cmp.removeClass(this.selectedClass); + this.selections = []; + if(!suppressEvent){ + this.fireEvent("selectionchange", this, this.selections); + } + } + }, + + /** + * Returns true if the passed node is selected + * @param {HTMLElement/Number} node The node or node index + * @return {Boolean} + */ + isSelected : function(node){ + var s = this.selections; + if(s.length < 1){ + return false; + } + node = this.getNode(node); + return s.indexOf(node) !== -1; + }, + + /** + * Selects nodes. + * @param {Array/HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select + * @param {Boolean} keepExisting (optional) true to keep existing selections + * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent + */ + select : function(nodeInfo, keepExisting, suppressEvent){ + if(nodeInfo instanceof Array){ + if(!keepExisting){ + this.clearSelections(true); + } + for(var i = 0, len = nodeInfo.length; i < len; i++){ + this.select(nodeInfo[i], true, true); + } + } else{ + var node = this.getNode(nodeInfo); + if(node && !this.isSelected(node)){ + if(!keepExisting){ + this.clearSelections(true); + } + if(this.fireEvent("beforeselect", this, node, this.selections) !== false){ + Ext.fly(node).addClass(this.selectedClass); + this.selections.push(node); + if(!suppressEvent){ + this.fireEvent("selectionchange", this, this.selections); + } + } + } + } + }, + + /** + * Gets a template node. + * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node + * @return {HTMLElement} The node or null if it wasn't found + */ + getNode : function(nodeInfo){ + if(typeof nodeInfo == "string"){ + return document.getElementById(nodeInfo); + }else if(typeof nodeInfo == "number"){ + return this.nodes[nodeInfo]; + } + return nodeInfo; + }, + + /** + * Gets a range template nodes. + * @param {Number} startIndex + * @param {Number} endIndex + * @return {Array} An array of nodes + */ + getNodes : function(start, end){ + var ns = this.nodes; + start = start || 0; + end = typeof end == "undefined" ? ns.length - 1 : end; + var nodes = []; + if(start <= end){ + for(var i = start; i <= end; i++){ + nodes.push(ns[i]); + } + } else{ + for(var i = start; i >= end; i--){ + nodes.push(ns[i]); + } + } + return nodes; + }, + + /** + * Finds the index of the passed node + * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node + * @return {Number} The index of the node or -1 + */ + indexOf : function(node){ + node = this.getNode(node); + if(typeof node.nodeIndex == "number"){ + return node.nodeIndex; + } + var ns = this.nodes; + for(var i = 0, len = ns.length; i < len; i++){ + if(ns[i] == node){ + return i; + } + } + return -1; + } +}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BasicLayoutRegion.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BasicLayoutRegion.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BasicLayoutRegion.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,292 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.BasicLayoutRegion + * @extends Ext.util.Observable + * This class represents a lightweight region in a layout manager. This region does not move dom nodes + * and does not have a titlebar, tabs or any other features. All it does is size and position + * panels. To create a BasicLayoutRegion, add lightweight:true or basic:true to your regions config. + */ +Ext.BasicLayoutRegion = function(mgr, config, pos, skipConfig){ + this.mgr = mgr; + this.position = pos; + this.events = { + /** + * @event beforeremove + * Fires before a panel is removed (or closed). To cancel the removal set "e.cancel = true" on the event argument. + * @param {Ext.LayoutRegion} this + * @param {Ext.ContentPanel} panel The panel + * @param {Object} e The cancel event object + */ + "beforeremove" : true, + /** + * @event invalidated + * Fires when the layout for this region is changed. + * @param {Ext.LayoutRegion} this + */ + "invalidated" : true, + /** + * @event visibilitychange + * Fires when this region is shown or hidden + * @param {Ext.LayoutRegion} this + * @param {Boolean} visibility true or false + */ + "visibilitychange" : true, + /** + * @event paneladded + * Fires when a panel is added. + * @param {Ext.LayoutRegion} this + * @param {Ext.ContentPanel} panel The panel + */ + "paneladded" : true, + /** + * @event panelremoved + * Fires when a panel is removed. + * @param {Ext.LayoutRegion} this + * @param {Ext.ContentPanel} panel The panel + */ + "panelremoved" : true, + /** + * @event collapsed + * Fires when this region is collapsed. + * @param {Ext.LayoutRegion} this + */ + "collapsed" : true, + /** + * @event expanded + * Fires when this region is expanded. + * @param {Ext.LayoutRegion} this + */ + "expanded" : true, + /** + * @event slideshow + * Fires when this region is slid into view. + * @param {Ext.LayoutRegion} this + */ + "slideshow" : true, + /** + * @event slidehide + * Fires when this region slides out of view. + * @param {Ext.LayoutRegion} this + */ + "slidehide" : true, + /** + * @event panelactivated + * Fires when a panel is activated. + * @param {Ext.LayoutRegion} this + * @param {Ext.ContentPanel} panel The activated panel + */ + "panelactivated" : true, + /** + * @event resized + * Fires when the user resizes this region. + * @param {Ext.LayoutRegion} this + * @param {Number} newSize The new size (width for east/west, height for north/south) + */ + "resized" : true + }; + /** A collection of panels in this region. @type Ext.util.MixedCollection */ + this.panels = new Ext.util.MixedCollection(); + this.panels.getKey = this.getPanelId.createDelegate(this); + this.box = null; + this.activePanel = null; + if(skipConfig !== true){ + this.applyConfig(config); + } +}; + +Ext.extend(Ext.BasicLayoutRegion, Ext.util.Observable, { + getPanelId : function(p){ + return p.getId(); + }, + + applyConfig : function(config){ + this.margins = config.margins || this.margins || {top: 0, left: 0, right:0, bottom: 0}; + this.config = config; + }, + + /** + * Resizes the region to the specified size. For vertical regions (west, east) this adjusts + * the width, for horizontal (north, south) the height. + * @param {Number} newSize The new width or height + */ + resizeTo : function(newSize){ + var el = this.el ? this.el : + (this.activePanel ? this.activePanel.getEl() : null); + if(el){ + switch(this.position){ + case "east": + case "west": + el.setWidth(newSize); + this.fireEvent("resized", this, newSize); + break; + case "north": + case "south": + el.setHeight(newSize); + this.fireEvent("resized", this, newSize); + break; + } + } + }, + + getBox : function(){ + return this.activePanel ? this.activePanel.getEl().getBox(false, true) : null; + }, + + getMargins : function(){ + return this.margins; + }, + + updateBox : function(box){ + this.box = box; + var el = this.activePanel.getEl(); + el.dom.style.left = box.x + "px"; + el.dom.style.top = box.y + "px"; + this.activePanel.setSize(box.width, box.height); + }, + + /** + * Returns the container element for this region. + * @return {Ext.Element} + */ + getEl : function(){ + return this.activePanel; + }, + + /** + * Returns true if this region is currently visible. + * @return {Boolean} + */ + isVisible : function(){ + return this.activePanel ? true : false; + }, + + setActivePanel : function(panel){ + panel = this.getPanel(panel); + if(this.activePanel && this.activePanel != panel){ + this.activePanel.setActiveState(false); + this.activePanel.getEl().setLeftTop(-10000,-10000); + } + this.activePanel = panel; + panel.setActiveState(true); + if(this.box){ + panel.setSize(this.box.width, this.box.height); + } + this.fireEvent("panelactivated", this, panel); + this.fireEvent("invalidated"); + }, + + /** + * Show the specified panel. + * @param {Number/String/ContentPanel} panelId The panels index, id or the panel itself + * @return {Ext.ContentPanel} The shown panel or null + */ + showPanel : function(panel){ + if(panel = this.getPanel(panel)){ + this.setActivePanel(panel); + } + return panel; + }, + + /** + * Get the active panel for this region. + * @return {Ext.ContentPanel} The active panel or null + */ + getActivePanel : function(){ + return this.activePanel; + }, + + /** + * Add the passed ContentPanel(s) + * @param {ContentPanel...} panel The ContentPanel(s) to add (you can pass more than one) + * @return {Ext.ContentPanel} The panel added (if only one was added) + */ + add : function(panel){ + if(arguments.length > 1){ + for(var i = 0, len = arguments.length; i < len; i++) { + this.add(arguments[i]); + } + return null; + } + if(this.hasPanel(panel)){ + this.showPanel(panel); + return panel; + } + var el = panel.getEl(); + if(el.dom.parentNode != this.mgr.el.dom){ + this.mgr.el.dom.appendChild(el.dom); + } + if(panel.setRegion){ + panel.setRegion(this); + } + this.panels.add(panel); + el.setStyle("position", "absolute"); + if(!panel.background){ + this.setActivePanel(panel); + if(this.config.initialSize && this.panels.getCount()==1){ + this.resizeTo(this.config.initialSize); + } + } + this.fireEvent("paneladded", this, panel); + return panel; + }, + + /** + * Returns true if the panel is in this region. + * @param {Number/String/ContentPanel} panel The panels index, id or the panel itself + * @return {Boolean} + */ + hasPanel : function(panel){ + if(typeof panel == "object"){ // must be panel obj + panel = panel.getId(); + } + return this.getPanel(panel) ? true : false; + }, + + /** + * Removes the specified panel. If preservePanel is not true (either here or in the config), the panel is destroyed. + * @param {Number/String/ContentPanel} panel The panels index, id or the panel itself + * @param {Boolean} preservePanel Overrides the config preservePanel option + * @return {Ext.ContentPanel} The panel that was removed + */ + remove : function(panel, preservePanel){ + panel = this.getPanel(panel); + if(!panel){ + return null; + } + var e = {}; + this.fireEvent("beforeremove", this, panel, e); + if(e.cancel === true){ + return null; + } + var panelId = panel.getId(); + this.panels.removeKey(panelId); + return panel; + }, + + /** + * Returns the panel specified or null if it's not in this region. + * @param {Number/String/ContentPanel} panel The panels index, id or the panel itself + * @return {Ext.ContentPanel} + */ + getPanel : function(id){ + if(typeof id == "object"){ // must be panel obj + return id; + } + return this.panels.get(id); + }, + + /** + * Returns this regions position (north/south/east/west/center). + * @return {String} + */ + getPosition: function(){ + return this.position; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BorderLayout.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BorderLayout.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BorderLayout.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,336 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.BorderLayout + * @extends Ext.LayoutManager + * This class represents a common layout manager used in desktop applications. + * Example: +
        
        + var layout = new Ext.BorderLayout(document.body, {
        +    north: {
        +        initialSize: 25,
        +        titlebar: false
        +    },
        +    west: {
        +        split:true,
        +        initialSize: 200,
        +        minSize: 175,
        +        maxSize: 400,
        +        titlebar: true,
        +        collapsible: true
        +    },
        +    east: {
        +        split:true,
        +        initialSize: 202,
        +        minSize: 175,
        +        maxSize: 400,
        +        titlebar: true,
        +        collapsible: true
        +    },
        +    south: {
        +        split:true,
        +        initialSize: 100,
        +        minSize: 100,
        +        maxSize: 200,
        +        titlebar: true,
        +        collapsible: true
        +    },
        +    center: {
        +        titlebar: true,
        +        autoScroll:true,
        +        resizeTabs: true,
        +        minTabWidth: 50,
        +        preferredTabWidth: 150
        +    }
        +});
        +
        +// shorthand
        +var CP = Ext.ContentPanel;
        +
        +layout.beginUpdate();
        +layout.add("north", new CP("north", "North"));
        +layout.add("south", new CP("south", {title: "South", closable: true}));
        +layout.add("west", new CP("west", {title: "West"}));
        +layout.add("east", new CP("autoTabs", {title: "Auto Tabs", closable: true}));
        +layout.add("center", new CP("center1", {title: "Close Me", closable: true}));
        +layout.add("center", new CP("center2", {title: "Center Panel", closable: false}));
        +layout.getRegion("center").showPanel("center1");
        +layout.endUpdate();
        +
        + +The container the layout is rendered into can be either the body element or any other element. +If it is not the body element, the container needs to either be an absolute positioned element, +or you will need to add "position:relative" to the css of the container. You will also need to specify +the container size if it is not the body element. + +* @constructor +* Create a new BorderLayout +* @param {Mixed} container The container this layout is bound to +* @param {Object} config Configuration options + */ +Ext.BorderLayout = function(container, config){ + config = config || {}; + Ext.BorderLayout.superclass.constructor.call(this, container, config); + this.factory = config.factory || Ext.BorderLayout.RegionFactory; + for(var i = 0, len = this.factory.validRegions.length; i < len; i++) { + var target = this.factory.validRegions[i]; + if(config[target]){ + this.addRegion(target, config[target]); + } + } +}; + +Ext.extend(Ext.BorderLayout, Ext.LayoutManager, { + /** + * Creates and adds a new region if it doesn't already exist. + * @param {String} target The target region key (north, south, east, west or center). + * @param {Object} config The regions config object + * @return {BorderLayoutRegion} The new region + */ + addRegion : function(target, config){ + if(!this.regions[target]){ + var r = this.factory.create(target, this, config); + this.bindRegion(target, r); + } + return this.regions[target]; + }, + + // private (kinda) + bindRegion : function(name, r){ + this.regions[name] = r; + r.on("visibilitychange", this.layout, this); + r.on("paneladded", this.layout, this); + r.on("panelremoved", this.layout, this); + r.on("invalidated", this.layout, this); + r.on("resized", this.onRegionResized, this); + r.on("collapsed", this.onRegionCollapsed, this); + r.on("expanded", this.onRegionExpanded, this); + }, + + /** + * Performs a layout update. + */ + layout : function(){ + if(this.updating) return; + var size = this.getViewSize(); + var w = size.width, h = size.height; + var centerW = w, centerH = h, centerY = 0, centerX = 0; + //var x = 0, y = 0; + + var rs = this.regions; + var n = rs["north"], s = rs["south"], west = rs["west"], e = rs["east"], c = rs["center"]; + //if(this.hideOnLayout){ // not supported anymore + //c.el.setStyle("display", "none"); + //} + if(n && n.isVisible()){ + var b = n.getBox(); + var m = n.getMargins(); + b.width = w - (m.left+m.right); + b.x = m.left; + b.y = m.top; + centerY = b.height + b.y + m.bottom; + centerH -= centerY; + n.updateBox(this.safeBox(b)); + } + if(s && s.isVisible()){ + var b = s.getBox(); + var m = s.getMargins(); + b.width = w - (m.left+m.right); + b.x = m.left; + var totalHeight = (b.height + m.top + m.bottom); + b.y = h - totalHeight + m.top; + centerH -= totalHeight; + s.updateBox(this.safeBox(b)); + } + if(west && west.isVisible()){ + var b = west.getBox(); + var m = west.getMargins(); + b.height = centerH - (m.top+m.bottom); + b.x = m.left; + b.y = centerY + m.top; + var totalWidth = (b.width + m.left + m.right); + centerX += totalWidth; + centerW -= totalWidth; + west.updateBox(this.safeBox(b)); + } + if(e && e.isVisible()){ + var b = e.getBox(); + var m = e.getMargins(); + b.height = centerH - (m.top+m.bottom); + var totalWidth = (b.width + m.left + m.right); + b.x = w - totalWidth + m.left; + b.y = centerY + m.top; + centerW -= totalWidth; + e.updateBox(this.safeBox(b)); + } + if(c){ + var m = c.getMargins(); + var centerBox = { + x: centerX + m.left, + y: centerY + m.top, + width: centerW - (m.left+m.right), + height: centerH - (m.top+m.bottom) + }; + //if(this.hideOnLayout){ + //c.el.setStyle("display", "block"); + //} + c.updateBox(this.safeBox(centerBox)); + } + this.el.repaint(); + this.fireEvent("layout", this); + }, + + safeBox : function(box){ + box.width = Math.max(0, box.width); + box.height = Math.max(0, box.height); + return box; + }, + + /** + * Adds a ContentPanel (or subclass) to this layout. + * @param {String} target The target region key (north, south, east, west or center). + * @param {Ext.ContentPanel} panel The panel to add + * @return {Ext.ContentPanel} The added panel + */ + add : function(target, panel){ + target = target.toLowerCase(); + return this.regions[target].add(panel); + }, + + /** + * Remove a ContentPanel (or subclass) to this layout. + * @param {String} target The target region key (north, south, east, west or center). + * @param {Number/String/Ext.ContentPanel} panel The index, id or panel to remove + * @return {Ext.ContentPanel} The removed panel + */ + remove : function(target, panel){ + target = target.toLowerCase(); + return this.regions[target].remove(panel); + }, + + /** + * Searches all regions for a panel with the specified id + * @param {String} panelId + * @return {Ext.ContentPanel} The panel or null if it wasn't found + */ + findPanel : function(panelId){ + var rs = this.regions; + for(var target in rs){ + if(typeof rs[target] != "function"){ + var p = rs[target].getPanel(panelId); + if(p){ + return p; + } + } + } + return null; + }, + + /** + * Searches all regions for a panel with the specified id and activates (shows) it. + * @param {String/ContentPanel} panelId The panels id or the panel itself + * @return {Ext.ContentPanel} The shown panel or null + */ + showPanel : function(panelId) { + var rs = this.regions; + for(var target in rs){ + var r = rs[target]; + if(typeof r != "function"){ + if(r.hasPanel(panelId)){ + return r.showPanel(panelId); + } + } + } + return null; + }, + + /** + * Restores this layouts state using Ext.state.Manager or the state provided by the passed provider. + * @param {Ext.state.Provider} provider (optional) An alternate state provider + */ + restoreState : function(provider){ + if(!provider){ + provider = Ext.state.Manager; + } + var sm = new Ext.LayoutStateManager(); + sm.init(this, provider); + }, + + + batchAdd : function(regions){ + this.beginUpdate(); + for(var rname in regions){ + var lr = this.regions[rname]; + if(lr){ + this.addTypedPanels(lr, regions[rname]); + } + } + this.endUpdate(); + }, + + /* @private */ + addTypedPanels : function(lr, ps){ + if(typeof ps == 'string'){ + lr.add(new Ext.ContentPanel(ps)); + } + else if(ps instanceof Array){ + for(var i =0, len = ps.length; i < len; i++){ + this.addTypedPanels(lr, ps[i]); + } + } + else if(!ps.events){ // raw config? + var el = ps.el; + delete ps.el; // prevent conflict + lr.add(new Ext.ContentPanel(el || Ext.id(), ps)); + } + else { // panel object assumed! + lr.add(ps); + } + } +}); + +Ext.BorderLayout.create = function(config, targetEl){ + var layout = new Ext.BorderLayout(targetEl || document.body, config); + layout.beginUpdate(); + var regions = Ext.BorderLayout.RegionFactory.validRegions; + for(var j = 0, jlen = regions.length; j < jlen; j++){ + var lr = regions[j]; + if(layout.regions[lr] && config[lr].panels){ + var r = layout.regions[lr]; + var ps = config[lr].panels; + layout.addTypedPanels(r, ps); + } + } + layout.endUpdate(); + return layout; +}; + +Ext.BorderLayout.RegionFactory = { + validRegions : ["north","south","east","west","center"], + + create : function(target, mgr, config){ + target = target.toLowerCase(); + if(config.lightweight || config.basic){ + return new Ext.BasicLayoutRegion(mgr, config, target); + } + switch(target){ + case "north": + return new Ext.NorthLayoutRegion(mgr, config); + case "south": + return new Ext.SouthLayoutRegion(mgr, config); + case "east": + return new Ext.EastLayoutRegion(mgr, config); + case "west": + return new Ext.WestLayoutRegion(mgr, config); + case "center": + return new Ext.CenterLayoutRegion(mgr, config); + } + throw 'Layout region "'+target+'" not supported.'; + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BorderLayoutRegions.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BorderLayoutRegions.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/BorderLayoutRegions.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,201 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* + * These classes are private internal classes + */ +Ext.CenterLayoutRegion = function(mgr, config){ + Ext.CenterLayoutRegion.superclass.constructor.call(this, mgr, config, "center"); + this.visible = true; + this.minWidth = config.minWidth || 20; + this.minHeight = config.minHeight || 20; +}; + +Ext.extend(Ext.CenterLayoutRegion, Ext.LayoutRegion, { + hide : function(){ + // center panel can't be hidden + }, + + show : function(){ + // center panel can't be hidden + }, + + getMinWidth: function(){ + return this.minWidth; + }, + + getMinHeight: function(){ + return this.minHeight; + } +}); + + +Ext.NorthLayoutRegion = function(mgr, config){ + Ext.NorthLayoutRegion.superclass.constructor.call(this, mgr, config, "north", "n-resize"); + if(this.split){ + this.split.placement = Ext.SplitBar.TOP; + this.split.orientation = Ext.SplitBar.VERTICAL; + this.split.el.addClass("x-layout-split-v"); + } + var size = config.initialSize || config.height; + if(typeof size != "undefined"){ + this.el.setHeight(size); + } +}; +Ext.extend(Ext.NorthLayoutRegion, Ext.SplitLayoutRegion, { + orientation: Ext.SplitBar.VERTICAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + box.height += this.split.el.getHeight(); + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + box.height -= this.split.el.getHeight(); + this.split.el.setLeft(box.x); + this.split.el.setTop(box.y+box.height); + this.split.el.setWidth(box.width); + } + if(this.collapsed){ + this.updateBody(box.width, null); + } + Ext.NorthLayoutRegion.superclass.updateBox.call(this, box); + } +}); + +Ext.SouthLayoutRegion = function(mgr, config){ + Ext.SouthLayoutRegion.superclass.constructor.call(this, mgr, config, "south", "s-resize"); + if(this.split){ + this.split.placement = Ext.SplitBar.BOTTOM; + this.split.orientation = Ext.SplitBar.VERTICAL; + this.split.el.addClass("x-layout-split-v"); + } + var size = config.initialSize || config.height; + if(typeof size != "undefined"){ + this.el.setHeight(size); + } +}; +Ext.extend(Ext.SouthLayoutRegion, Ext.SplitLayoutRegion, { + orientation: Ext.SplitBar.VERTICAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + var sh = this.split.el.getHeight(); + box.height += sh; + box.y -= sh; + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sh = this.split.el.getHeight(); + box.height -= sh; + box.y += sh; + this.split.el.setLeft(box.x); + this.split.el.setTop(box.y-sh); + this.split.el.setWidth(box.width); + } + if(this.collapsed){ + this.updateBody(box.width, null); + } + Ext.SouthLayoutRegion.superclass.updateBox.call(this, box); + } +}); + +Ext.EastLayoutRegion = function(mgr, config){ + Ext.EastLayoutRegion.superclass.constructor.call(this, mgr, config, "east", "e-resize"); + if(this.split){ + this.split.placement = Ext.SplitBar.RIGHT; + this.split.orientation = Ext.SplitBar.HORIZONTAL; + this.split.el.addClass("x-layout-split-h"); + } + var size = config.initialSize || config.width; + if(typeof size != "undefined"){ + this.el.setWidth(size); + } +}; +Ext.extend(Ext.EastLayoutRegion, Ext.SplitLayoutRegion, { + orientation: Ext.SplitBar.HORIZONTAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + var sw = this.split.el.getWidth(); + box.width += sw; + box.x -= sw; + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sw = this.split.el.getWidth(); + box.width -= sw; + this.split.el.setLeft(box.x); + this.split.el.setTop(box.y); + this.split.el.setHeight(box.height); + box.x += sw; + } + if(this.collapsed){ + this.updateBody(null, box.height); + } + Ext.EastLayoutRegion.superclass.updateBox.call(this, box); + } +}); + +Ext.WestLayoutRegion = function(mgr, config){ + Ext.WestLayoutRegion.superclass.constructor.call(this, mgr, config, "west", "w-resize"); + if(this.split){ + this.split.placement = Ext.SplitBar.LEFT; + this.split.orientation = Ext.SplitBar.HORIZONTAL; + this.split.el.addClass("x-layout-split-h"); + } + var size = config.initialSize || config.width; + if(typeof size != "undefined"){ + this.el.setWidth(size); + } +}; +Ext.extend(Ext.WestLayoutRegion, Ext.SplitLayoutRegion, { + orientation: Ext.SplitBar.HORIZONTAL, + getBox : function(){ + if(this.collapsed){ + return this.collapsedEl.getBox(); + } + var box = this.el.getBox(); + if(this.split){ + box.width += this.split.el.getWidth(); + } + return box; + }, + + updateBox : function(box){ + if(this.split && !this.collapsed){ + var sw = this.split.el.getWidth(); + box.width -= sw; + this.split.el.setLeft(box.x+box.width); + this.split.el.setTop(box.y); + this.split.el.setHeight(box.height); + } + if(this.collapsed){ + this.updateBody(null, box.height); + } + Ext.WestLayoutRegion.superclass.updateBox.call(this, box); + } +}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/ContentPanels.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/ContentPanels.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/ContentPanels.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,475 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.ContentPanel + * @extends Ext.util.Observable + * A basic ContentPanel element. + * @cfg {Boolean} fitToFrame True for this panel to adjust its size to fit when the region resizes (defaults to false) + * @cfg {Boolean} fitContainer When using {@link #fitToFrame} and {@link #resizeEl}, you can also fit the parent container (defaults to false) + * @cfg {Boolean/Object} autoCreate True to auto generate the DOM element for this panel, or a {@link Ext.DomHelper} config of the element to create + * @cfg {Boolean} closable True if the panel can be closed/removed + * @cfg {Boolean} background True if the panel should not be activated when it is added (defaults to false) + * @cfg {Mixed} resizeEl An element to resize if {@link #fitToFrame} is true (instead of this panel's element) + * @cfg {Toolbar} toolbar A toolbar for this panel + * @cfg {Boolean} autoScroll True to scroll overflow in this panel (use with {@link #fitToFrame}) + * @cfg {String} title The title for this panel + * @cfg {Array} adjustments Values to add to the width/height when doing a {@link #fitToFrame} (default is [0, 0]) + * @cfg {String} url Calls {@link #setUrl} with this value + * @cfg {String/Object} params When used with {@link #url}, calls {@link #setUrl} with this value + * @cfg {Boolean} loadOnce When used with {@link #url}, calls {@link #setUrl} with this value + * @constructor + * Create a new ContentPanel. + * @param {Mixed} el The container element for this panel + * @param {String/Object} config A string to set only the title or a config object + * @param {String} content (optional) Set the HTML content for this panel + */ +Ext.ContentPanel = function(el, config, content){ + if(el.autoCreate){ + config = el; + el = Ext.id(); + } + this.el = Ext.get(el); + if(!this.el && config && config.autoCreate){ + if(typeof config.autoCreate == "object"){ + if(!config.autoCreate.id){ + config.autoCreate.id = config.id||el; + } + this.el = Ext.DomHelper.append(document.body, + config.autoCreate, true); + }else{ + this.el = Ext.DomHelper.append(document.body, + {tag: "div", cls: "x-layout-inactive-content", id: config.id||el}, true); + } + } + this.closable = false; + this.loaded = false; + this.active = false; + if(typeof config == "string"){ + this.title = config; + }else{ + Ext.apply(this, config); + } + if(this.resizeEl){ + this.resizeEl = Ext.get(this.resizeEl, true); + }else{ + this.resizeEl = this.el; + } + this.addEvents({ + /** + * @event activate + * Fires when this panel is activated. + * @param {Ext.ContentPanel} this + */ + "activate" : true, + /** + * @event deactivate + * Fires when this panel is activated. + * @param {Ext.ContentPanel} this + */ + "deactivate" : true, + + /** + * @event resize + * Fires when this panel is resized if fitToFrame is true. + * @param {Ext.ContentPanel} this + * @param {Number} width The width after any component adjustments + * @param {Number} height The height after any component adjustments + */ + "resize" : true + }); + if(this.autoScroll){ + this.resizeEl.setStyle("overflow", "auto"); + } + content = content || this.content; + if(content){ + this.setContent(content); + } + if(config && config.url){ + this.setUrl(this.url, this.params, this.loadOnce); + } + Ext.ContentPanel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.ContentPanel, Ext.util.Observable, { + tabTip:'', + setRegion : function(region){ + this.region = region; + if(region){ + this.el.replaceClass("x-layout-inactive-content", "x-layout-active-content"); + }else{ + this.el.replaceClass("x-layout-active-content", "x-layout-inactive-content"); + } + }, + + /** + * Returns the toolbar for this Panel if one was configured. + * @return {Ext.Toolbar} + */ + getToolbar : function(){ + return this.toolbar; + }, + + setActiveState : function(active){ + this.active = active; + if(!active){ + this.fireEvent("deactivate", this); + }else{ + this.fireEvent("activate", this); + } + }, + /** + * Updates this panel's element + * @param {String} content The new content + * @param {Boolean} loadScripts (optional) true to look for and process scripts + */ + setContent : function(content, loadScripts){ + this.el.update(content, loadScripts); + }, + + ignoreResize : function(w, h){ + if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){ + return true; + }else{ + this.lastSize = {width: w, height: h}; + return false; + } + }, + /** + * Get the {@link Ext.Updater} for this panel. Enables you to perform Ajax updates. + * @return {Ext.Updater} The Updater + */ + getUpdater : function(){ + return this.el.getUpdater(); + }, + /** + * Loads this content panel immediately with content from XHR. Note: to delay loading until the panel is activated, use {@link #setUrl}. + * @param {Object/String/Function} url The URL for this request or a function to call to get the URL or a config object containing any of the following options: +
        
        +panel.load({
        +    url: "your-url.php",
        +    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
        +    callback: yourFunction,
        +    scope: yourObject, //(optional scope)
        +    discardUrl: false,
        +    nocache: false,
        +    text: "Loading...",
        +    timeout: 30,
        +    scripts: false
        +});
        +
        + * The only required property is url. The optional properties nocache, text and scripts + * are shorthand for disableCaching, indicatorText and loadScripts and are used to set their associated property on this panel Updater instance. + * @param {String/Object} params (optional) The parameters to pass as either a URL encoded string "param1=1&param2=2" or an object {param1: 1, param2: 2} + * @param {Function} callback (optional) Callback when transaction is complete -- called with signature (oElement, bSuccess, oResponse) + * @param {Boolean} discardUrl (optional) By default when you execute an update the defaultUrl is changed to the last used URL. If true, it will not store the URL. + * @return {Ext.ContentPanel} this + */ + load : function(){ + this.el.load.apply(this.el, arguments); + return this; + }, + + + /** + * Set a URL to be used to load the content for this panel. When this panel is activated, the content will be loaded from that URL. + * @param {String/Function} url The URL to load the content from or a function to call to get the URL + * @param {String/Object} params (optional) The string params for the update call or an object of the params. See {@link Ext.Updater#update} for more details. (Defaults to null) + * @param {Boolean} loadOnce (optional) Whether to only load the content once. If this is false it makes the Ajax call every time this panel is activated. (Defaults to false) + * @return {Ext.Updater} The Updater + */ + setUrl : function(url, params, loadOnce){ + if(this.refreshDelegate){ + this.removeListener("activate", this.refreshDelegate); + } + this.refreshDelegate = this._handleRefresh.createDelegate(this, [url, params, loadOnce]); + this.on("activate", this.refreshDelegate); + return this.el.getUpdater(); + }, + + _handleRefresh : function(url, params, loadOnce){ + if(!loadOnce || !this.loaded){ + var updater = this.el.getUpdater(); + updater.update(url, params, this._setLoaded.createDelegate(this)); + } + }, + + _setLoaded : function(){ + this.loaded = true; + }, + + /** + * Returns this panel's id + * @return {String} + */ + getId : function(){ + return this.el.id; + }, + + /** + * Returns this panel's element + * @return {Ext.Element} + */ + getEl : function(){ + return this.el; + }, + + adjustForComponents : function(width, height){ + if(this.resizeEl != this.el){ + width -= this.el.getFrameWidth('lr'); + height -= this.el.getFrameWidth('tb'); + } + if(this.toolbar){ + var te = this.toolbar.getEl(); + height -= te.getHeight(); + te.setWidth(width); + } + if(this.adjustments){ + width += this.adjustments[0]; + height += this.adjustments[1]; + } + return {"width": width, "height": height}; + }, + + setSize : function(width, height){ + if(this.fitToFrame && !this.ignoreResize(width, height)){ + if(this.fitContainer && this.resizeEl != this.el){ + this.el.setSize(width, height); + } + var size = this.adjustForComponents(width, height); + this.resizeEl.setSize(this.autoWidth ? "auto" : size.width, this.autoHeight ? "auto" : size.height); + this.fireEvent('resize', this, size.width, size.height); + } + }, + + /** + * Returns this panel's title + * @return {String} + */ + getTitle : function(){ + return this.title; + }, + + /** + * Set this panel's title + * @param {String} title + */ + setTitle : function(title){ + this.title = title; + if(this.region){ + this.region.updatePanelTitle(this, title); + } + }, + + /** + * Returns true is this panel was configured to be closable + * @return {Boolean} + */ + isClosable : function(){ + return this.closable; + }, + + beforeSlide : function(){ + this.el.clip(); + this.resizeEl.clip(); + }, + + afterSlide : function(){ + this.el.unclip(); + this.resizeEl.unclip(); + }, + + /** + * Force a content refresh from the URL specified in the {@link #setUrl} method. + * Will fail silently if the {@link #setUrl} method has not been called. + * This does not activate the panel, just updates its content. + */ + refresh : function(){ + if(this.refreshDelegate){ + this.loaded = false; + this.refreshDelegate(); + } + }, + + /** + * Destroys this panel + */ + destroy : function(){ + this.el.removeAllListeners(); + var tempEl = document.createElement("span"); + tempEl.appendChild(this.el.dom); + tempEl.innerHTML = ""; + this.el.remove(); + this.el = null; + } +}); + +Ext.ContentPanel.prototype.getUpdateManager = Ext.ContentPanel.prototype.getUpdater; + +/** + * @class Ext.GridPanel + * @extends Ext.ContentPanel + * @constructor + * Create a new GridPanel. + * @param {Ext.grid.Grid} grid The grid for this panel + * @param {String/Object} config A string to set only the panel's title, or a config object + */ +Ext.GridPanel = function(grid, config){ + this.wrapper = Ext.DomHelper.append(document.body, // wrapper for IE7 strict & safari scroll issue + {tag: "div", cls: "x-layout-grid-wrapper x-layout-inactive-content"}, true); + this.wrapper.dom.appendChild(grid.getGridEl().dom); + Ext.GridPanel.superclass.constructor.call(this, this.wrapper, config); + if(this.toolbar){ + this.toolbar.el.insertBefore(this.wrapper.dom.firstChild); + } + grid.monitorWindowResize = false; // turn off autosizing + grid.autoHeight = false; + grid.autoWidth = false; + this.grid = grid; + this.grid.getGridEl().replaceClass("x-layout-inactive-content", "x-layout-component-panel"); +}; + +Ext.extend(Ext.GridPanel, Ext.ContentPanel, { + getId : function(){ + return this.grid.id; + }, + + /** + * Returns the grid for this panel + * @return {Ext.grid.Grid} + */ + getGrid : function(){ + return this.grid; + }, + + setSize : function(width, height){ + if(!this.ignoreResize(width, height)){ + var grid = this.grid; + var size = this.adjustForComponents(width, height); + grid.getGridEl().setSize(size.width, size.height); + grid.autoSize(); + } + }, + + beforeSlide : function(){ + this.grid.getView().scroller.clip(); + }, + + afterSlide : function(){ + this.grid.getView().scroller.unclip(); + }, + + destroy : function(){ + this.grid.destroy(); + delete this.grid; + Ext.GridPanel.superclass.destroy.call(this); + } +}); + + +/** + * @class Ext.NestedLayoutPanel + * @extends Ext.ContentPanel + * @constructor + * Create a new NestedLayoutPanel. + * @param {Ext.BorderLayout} layout The layout for this panel + * @param {String/Object} config A string to set only the title or a config object + */ +Ext.NestedLayoutPanel = function(layout, config){ + Ext.NestedLayoutPanel.superclass.constructor.call(this, layout.getEl(), config); + layout.monitorWindowResize = false; // turn off autosizing + this.layout = layout; + this.layout.getEl().addClass("x-layout-nested-layout"); +}; + +Ext.extend(Ext.NestedLayoutPanel, Ext.ContentPanel, { + + setSize : function(width, height){ + if(!this.ignoreResize(width, height)){ + var size = this.adjustForComponents(width, height); + var el = this.layout.getEl(); + el.setSize(size.width, size.height); + var touch = el.dom.offsetWidth; + this.layout.layout(); + // ie requires a double layout on the first pass + if(Ext.isIE && !this.initialized){ + this.initialized = true; + this.layout.layout(); + } + } + }, + + /** + * Returns the nested BorderLayout for this panel + * @return {Ext.BorderLayout} + */ + getLayout : function(){ + return this.layout; + } +}); + +Ext.ScrollPanel = function(el, config, content){ + config = config || {}; + config.fitToFrame = true; + Ext.ScrollPanel.superclass.constructor.call(this, el, config, content); + + this.el.dom.style.overflow = "hidden"; + var wrap = this.el.wrap({cls: "x-scroller x-layout-inactive-content"}); + this.el.removeClass("x-layout-inactive-content"); + this.el.on("mousewheel", this.onWheel, this); + + var up = wrap.createChild({cls: "x-scroller-up", html: " "}, this.el.dom); + var down = wrap.createChild({cls: "x-scroller-down", html: " "}); + up.unselectable(); down.unselectable(); + up.on("click", this.scrollUp, this); + down.on("click", this.scrollDown, this); + up.addClassOnOver("x-scroller-btn-over"); + down.addClassOnOver("x-scroller-btn-over"); + up.addClassOnClick("x-scroller-btn-click"); + down.addClassOnClick("x-scroller-btn-click"); + this.adjustments = [0, -(up.getHeight() + down.getHeight())]; + + this.resizeEl = this.el; + this.el = wrap; this.up = up; this.down = down; +}; + +Ext.extend(Ext.ScrollPanel, Ext.ContentPanel, { + increment : 100, + wheelIncrement : 5, + scrollUp : function(){ + this.resizeEl.scroll("up", this.increment, {callback: this.afterScroll, scope: this}); + }, + + scrollDown : function(){ + this.resizeEl.scroll("down", this.increment, {callback: this.afterScroll, scope: this}); + }, + + afterScroll : function(){ + var el = this.resizeEl; + var t = el.dom.scrollTop, h = el.dom.scrollHeight, ch = el.dom.clientHeight; + this.up[t == 0 ? "addClass" : "removeClass"]("x-scroller-btn-disabled"); + this.down[h - t <= ch ? "addClass" : "removeClass"]("x-scroller-btn-disabled"); + }, + + setSize : function(){ + Ext.ScrollPanel.superclass.setSize.apply(this, arguments); + this.afterScroll(); + }, + + onWheel : function(e){ + var d = e.getWheelDelta(); + this.resizeEl.dom.scrollTop -= (d*this.wheelIncrement); + this.afterScroll(); + e.stopEvent(); + }, + + setContent : function(content, loadScripts){ + this.resizeEl.update(content, loadScripts); + } + +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutManager.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutManager.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,143 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.LayoutManager + * @extends Ext.util.Observable + * Base class for layout managers. + */ +Ext.LayoutManager = function(container, config){ + Ext.LayoutManager.superclass.constructor.call(this); + this.el = Ext.get(container); + // ie scrollbar fix + if(this.el.dom == document.body && Ext.isIE && !config.allowScroll){ + document.body.scroll = "no"; + }else if(this.el.dom != document.body && this.el.getStyle('position') == 'static'){ + this.el.position('relative'); + } + this.id = this.el.id; + this.el.addClass("x-layout-container"); + /** false to disable window resize monitoring @type Boolean */ + this.monitorWindowResize = true; + this.regions = {}; + this.addEvents({ + /** + * @event layout + * Fires when a layout is performed. + * @param {Ext.LayoutManager} this + */ + "layout" : true, + /** + * @event regionresized + * Fires when the user resizes a region. + * @param {Ext.LayoutRegion} region The resized region + * @param {Number} newSize The new size (width for east/west, height for north/south) + */ + "regionresized" : true, + /** + * @event regioncollapsed + * Fires when a region is collapsed. + * @param {Ext.LayoutRegion} region The collapsed region + */ + "regioncollapsed" : true, + /** + * @event regionexpanded + * Fires when a region is expanded. + * @param {Ext.LayoutRegion} region The expanded region + */ + "regionexpanded" : true + }); + this.updating = false; + Ext.EventManager.onWindowResize(this.onWindowResize, this, true); +}; + +Ext.extend(Ext.LayoutManager, Ext.util.Observable, { + /** + * Returns true if this layout is currently being updated + * @return {Boolean} + */ + isUpdating : function(){ + return this.updating; + }, + + /** + * Suspend the LayoutManager from doing auto-layouts while + * making multiple add or remove calls + */ + beginUpdate : function(){ + this.updating = true; + }, + + /** + * Restore auto-layouts and optionally disable the manager from performing a layout + * @param {Boolean} noLayout true to disable a layout update + */ + endUpdate : function(noLayout){ + this.updating = false; + if(!noLayout){ + this.layout(); + } + }, + + layout: function(){ + + }, + + onRegionResized : function(region, newSize){ + this.fireEvent("regionresized", region, newSize); + this.layout(); + }, + + onRegionCollapsed : function(region){ + this.fireEvent("regioncollapsed", region); + }, + + onRegionExpanded : function(region){ + this.fireEvent("regionexpanded", region); + }, + + /** + * Returns the size of the current view. This method normalizes document.body and element embedded layouts and + * performs box-model adjustments. + * @return {Object} The size as an object {width: (the width), height: (the height)} + */ + getViewSize : function(){ + var size; + if(this.el.dom != document.body){ + size = this.el.getSize(); + }else{ + size = {width: Ext.lib.Dom.getViewWidth(), height: Ext.lib.Dom.getViewHeight()}; + } + size.width -= this.el.getBorderWidth("lr")-this.el.getPadding("lr"); + size.height -= this.el.getBorderWidth("tb")-this.el.getPadding("tb"); + return size; + }, + + /** + * Returns the Element this layout is bound to. + * @return {Ext.Element} + */ + getEl : function(){ + return this.el; + }, + + /** + * Returns the specified region. + * @param {String} target The region key ('center', 'north', 'south', 'east' or 'west') + * @return {Ext.LayoutRegion} + */ + getRegion : function(target){ + return this.regions[target.toLowerCase()]; + }, + + onWindowResize : function(){ + if(this.monitorWindowResize){ + this.layout(); + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutRegion.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutRegion.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutRegion.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,591 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.LayoutRegion + * @extends Ext.BasicLayoutRegion + * This class represents a region in a layout manager. + * @cfg {Boolean} collapsible False to disable collapsing (defaults to true) + * @cfg {Boolean} collapsed True to set the initial display to collapsed (defaults to false) + * @cfg {Boolean} floatable False to disable floating (defaults to true) + * @cfg {Object} margins Margins for the element (defaults to {top: 0, left: 0, right:0, bottom: 0}) + * @cfg {Object} cmargins Margins for the element when collapsed (defaults to: north/south {top: 2, left: 0, right:0, bottom: 2} or east/west {top: 0, left: 2, right:2, bottom: 0}) + * @cfg {String} tabPosition "top" or "bottom" (defaults to "bottom") + * @cfg {String} collapsedTitle Optional string message to display in the collapsed block of a north or south region + * @cfg {Boolean} alwaysShowTabs True to always display tabs even when there is only 1 panel (defaults to false) + * @cfg {Boolean} autoScroll True to enable overflow scrolling (defaults to false) + * @cfg {Boolean} titlebar True to display a title bar (defaults to true) + * @cfg {String} title The title for the region (overrides panel titles) + * @cfg {Boolean} animate True to animate expand/collapse (defaults to false) + * @cfg {Boolean} autoHide False to disable auto hiding when the mouse leaves the "floated" region (defaults to true) + * @cfg {Boolean} preservePanels True to preserve removed panels so they can be readded later (defaults to false) + * @cfg {Boolean} closeOnTab True to place the close icon on the tabs instead of the region titlebar (defaults to false) + * @cfg {Boolean} hideTabs True to hide the tab strip (defaults to false) + * @cfg {Boolean} resizeTabs True to enable automatic tab resizing. This will resize the tabs so they are all the same size and fit within + * the space available, similar to FireFox 1.5 tabs (defaults to false) + * @cfg {Number} minTabWidth The minimum tab width (defaults to 40) + * @cfg {Number} preferredTabWidth The preferred tab width (defaults to 150) + * @cfg {Boolean} showPin True to show a pin button +* @cfg {Boolean} hidden True to start the region hidden (defaults to false) +* @cfg {Boolean} hideWhenEmpty True to hide the region when it has no panels +* @cfg {Boolean} disableTabTips True to disable tab tooltips + */ +Ext.LayoutRegion = function(mgr, config, pos){ + Ext.LayoutRegion.superclass.constructor.call(this, mgr, config, pos, true); + var dh = Ext.DomHelper; + /** This region's container element @type Ext.Element */ + this.el = dh.append(mgr.el.dom, {tag: "div", cls: "x-layout-panel x-layout-panel-" + this.position}, true); + /** This region's title element @type Ext.Element */ + + this.titleEl = dh.append(this.el.dom, {tag: "div", unselectable: "on", cls: "x-unselectable x-layout-panel-hd x-layout-title-"+this.position, children:[ + {tag: "span", cls: "x-unselectable x-layout-panel-hd-text", unselectable: "on", html: " "}, + {tag: "div", cls: "x-unselectable x-layout-panel-hd-tools", unselectable: "on"} + ]}, true); + this.titleEl.enableDisplayMode(); + /** This region's title text element @type HTMLElement */ + this.titleTextEl = this.titleEl.dom.firstChild; + this.tools = Ext.get(this.titleEl.dom.childNodes[1], true); + this.closeBtn = this.createTool(this.tools.dom, "x-layout-close"); + this.closeBtn.enableDisplayMode(); + this.closeBtn.on("click", this.closeClicked, this); + this.closeBtn.hide(); + + this.createBody(config); + this.visible = true; + this.collapsed = false; + + if(config.hideWhenEmpty){ + this.hide(); + this.on("paneladded", this.validateVisibility, this); + this.on("panelremoved", this.validateVisibility, this); + } + this.applyConfig(config); +}; + +Ext.extend(Ext.LayoutRegion, Ext.BasicLayoutRegion, { + + createBody : function(){ + /** This region's body element @type Ext.Element */ + this.bodyEl = this.el.createChild({tag: "div", cls: "x-layout-panel-body"}); + }, + + applyConfig : function(c){ + if(c.collapsible && this.position != "center" && !this.collapsedEl){ + var dh = Ext.DomHelper; + if(c.titlebar !== false){ + this.collapseBtn = this.createTool(this.tools.dom, "x-layout-collapse-"+this.position); + this.collapseBtn.on("click", this.collapse, this); + this.collapseBtn.enableDisplayMode(); + + if(c.showPin === true || this.showPin){ + this.stickBtn = this.createTool(this.tools.dom, "x-layout-stick"); + this.stickBtn.enableDisplayMode(); + this.stickBtn.on("click", this.expand, this); + this.stickBtn.hide(); + } + } + /** This region's collapsed element @type Ext.Element */ + this.collapsedEl = dh.append(this.mgr.el.dom, {cls: "x-layout-collapsed x-layout-collapsed-"+this.position, children:[ + {cls: "x-layout-collapsed-tools", children:[{cls: "x-layout-ctools-inner"}]} + ]}, true); + if(c.floatable !== false){ + this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); + this.collapsedEl.on("click", this.collapseClick, this); + } + + if(c.collapsedTitle && (this.position == "north" || this.position== "south")) { + this.collapsedTitleTextEl = dh.append(this.collapsedEl.dom, {tag: "div", cls: "x-unselectable x-layout-panel-hd-text", + id: "message", unselectable: "on", style:{"float":"left"}}); + this.collapsedTitleTextEl.innerHTML = c.collapsedTitle; + } + this.expandBtn = this.createTool(this.collapsedEl.dom.firstChild.firstChild, "x-layout-expand-"+this.position); + this.expandBtn.on("click", this.expand, this); + } + if(this.collapseBtn){ + this.collapseBtn.setVisible(c.collapsible == true); + } + this.cmargins = c.cmargins || this.cmargins || + (this.position == "west" || this.position == "east" ? + {top: 0, left: 2, right:2, bottom: 0} : + {top: 2, left: 0, right:0, bottom: 2}); + this.margins = c.margins || this.margins || {top: 0, left: 0, right:0, bottom: 0}; + this.bottomTabs = c.tabPosition != "top"; + this.autoScroll = c.autoScroll || false; + if(this.autoScroll){ + this.bodyEl.setStyle("overflow", "auto"); + }else{ + this.bodyEl.setStyle("overflow", "hidden"); + } + //if(c.titlebar !== false){ + if((!c.titlebar && !c.title) || c.titlebar === false){ + this.titleEl.hide(); + }else{ + this.titleEl.show(); + if(c.title){ + this.titleTextEl.innerHTML = c.title; + } + } + //} + this.duration = c.duration || .30; + this.slideDuration = c.slideDuration || .45; + this.config = c; + if(c.collapsed){ + this.collapse(true); + } + if(c.hidden){ + this.hide(); + } + }, + /** + * Returns true if this region is currently visible. + * @return {Boolean} + */ + isVisible : function(){ + return this.visible; + }, + + /** + * Updates the title for collapsed north/south regions (used with {@link #collapsedTitle} config option) + * @param {String} title (optional) The title text (accepts HTML markup, defaults to the numeric character reference for a non-breaking space, "&#160;") + */ + setCollapsedTitle : function(title){ + title = title || " "; + if(this.collapsedTitleTextEl){ + this.collapsedTitleTextEl.innerHTML = title; + } + }, + + getBox : function(){ + var b; + if(!this.collapsed){ + b = this.el.getBox(false, true); + }else{ + b = this.collapsedEl.getBox(false, true); + } + return b; + }, + + getMargins : function(){ + return this.collapsed ? this.cmargins : this.margins; + }, + + highlight : function(){ + this.el.addClass("x-layout-panel-dragover"); + }, + + unhighlight : function(){ + this.el.removeClass("x-layout-panel-dragover"); + }, + + updateBox : function(box){ + this.box = box; + if(!this.collapsed){ + this.el.dom.style.left = box.x + "px"; + this.el.dom.style.top = box.y + "px"; + this.updateBody(box.width, box.height); + }else{ + this.collapsedEl.dom.style.left = box.x + "px"; + this.collapsedEl.dom.style.top = box.y + "px"; + this.collapsedEl.setSize(box.width, box.height); + } + if(this.tabs){ + this.tabs.autoSizeTabs(); + } + }, + + updateBody : function(w, h){ + if(w !== null){ + this.el.setWidth(w); + w -= this.el.getBorderWidth("rl"); + if(this.config.adjustments){ + w += this.config.adjustments[0]; + } + } + if(h !== null){ + this.el.setHeight(h); + h = this.titleEl && this.titleEl.isDisplayed() ? h - (this.titleEl.getHeight()||0) : h; + h -= this.el.getBorderWidth("tb"); + if(this.config.adjustments){ + h += this.config.adjustments[1]; + } + this.bodyEl.setHeight(h); + if(this.tabs){ + h = this.tabs.syncHeight(h); + } + } + if(this.panelSize){ + w = w !== null ? w : this.panelSize.width; + h = h !== null ? h : this.panelSize.height; + } + if(this.activePanel){ + var el = this.activePanel.getEl(); + w = w !== null ? w : el.getWidth(); + h = h !== null ? h : el.getHeight(); + this.panelSize = {width: w, height: h}; + this.activePanel.setSize(w, h); + } + if(Ext.isIE && this.tabs){ + this.tabs.el.repaint(); + } + }, + + /** + * Returns the container element for this region. + * @return {Ext.Element} + */ + getEl : function(){ + return this.el; + }, + + /** + * Hides this region. + */ + hide : function(){ + if(!this.collapsed){ + this.el.dom.style.left = "-2000px"; + this.el.hide(); + }else{ + this.collapsedEl.dom.style.left = "-2000px"; + this.collapsedEl.hide(); + } + this.visible = false; + this.fireEvent("visibilitychange", this, false); + }, + + /** + * Shows this region if it was previously hidden. + */ + show : function(){ + if(!this.collapsed){ + this.el.show(); + }else{ + this.collapsedEl.show(); + } + this.visible = true; + this.fireEvent("visibilitychange", this, true); + }, + + closeClicked : function(){ + if(this.activePanel){ + this.remove(this.activePanel); + } + }, + + collapseClick : function(e){ + if(this.isSlid){ + e.stopPropagation(); + this.slideIn(); + }else{ + e.stopPropagation(); + this.slideOut(); + } + }, + + /** + * Collapses this region. + * @param {Boolean} skipAnim (optional) true to collapse the element without animation (if animate is true) + */ + collapse : function(skipAnim){ + if(this.collapsed) return; + this.collapsed = true; + if(this.split){ + this.split.el.hide(); + } + if(this.config.animate && skipAnim !== true){ + this.fireEvent("invalidated", this); + this.animateCollapse(); + }else{ + this.el.setLocation(-20000,-20000); + this.el.hide(); + this.collapsedEl.show(); + this.fireEvent("collapsed", this); + this.fireEvent("invalidated", this); + } + }, + + animateCollapse : function(){ + // overridden + }, + + /** + * Expands this region if it was previously collapsed. + * @param {Ext.EventObject} e The event that triggered the expand (or null if calling manually) + * @param {Boolean} skipAnim (optional) true to expand the element without animation (if animate is true) + */ + expand : function(e, skipAnim){ + if(e) e.stopPropagation(); + if(!this.collapsed || this.el.hasActiveFx()) return; + if(this.isSlid){ + this.afterSlideIn(); + skipAnim = true; + } + this.collapsed = false; + if(this.config.animate && skipAnim !== true){ + this.animateExpand(); + }else{ + this.el.show(); + if(this.split){ + this.split.el.show(); + } + this.collapsedEl.setLocation(-2000,-2000); + this.collapsedEl.hide(); + this.fireEvent("invalidated", this); + this.fireEvent("expanded", this); + } + }, + + animateExpand : function(){ + // overridden + }, + + initTabs : function(){ + this.bodyEl.setStyle("overflow", "hidden"); + var ts = new Ext.TabPanel(this.bodyEl.dom, { + tabPosition: this.bottomTabs ? 'bottom' : 'top', + disableTooltips: this.config.disableTabTips + }); + if(this.config.hideTabs){ + ts.stripWrap.setDisplayed(false); + } + this.tabs = ts; + ts.resizeTabs = this.config.resizeTabs === true; + ts.minTabWidth = this.config.minTabWidth || 40; + ts.maxTabWidth = this.config.maxTabWidth || 250; + ts.preferredTabWidth = this.config.preferredTabWidth || 150; + ts.monitorResize = false; + ts.bodyEl.setStyle("overflow", this.config.autoScroll ? "auto" : "hidden"); + ts.bodyEl.addClass('x-layout-tabs-body'); + this.panels.each(this.initPanelAsTab, this); + }, + + initPanelAsTab : function(panel){ + var ti = this.tabs.addTab(panel.getEl().id, panel.getTitle(), null, + this.config.closeOnTab && panel.isClosable()); + if(panel.tabTip !== undefined){ + ti.setTooltip(panel.tabTip); + } + ti.on("activate", function(){ + this.setActivePanel(panel); + }, this); + if(this.config.closeOnTab){ + ti.on("beforeclose", function(t, e){ + e.cancel = true; + this.remove(panel); + }, this); + } + return ti; + }, + + updatePanelTitle : function(panel, title){ + if(this.activePanel == panel){ + this.updateTitle(title); + } + if(this.tabs){ + var ti = this.tabs.getTab(panel.getEl().id); + ti.setText(title); + if(panel.tabTip !== undefined){ + ti.setTooltip(panel.tabTip); + } + } + }, + + updateTitle : function(title){ + if(this.titleTextEl && !this.config.title){ + this.titleTextEl.innerHTML = (typeof title != "undefined" && title.length > 0 ? title : " "); + } + }, + + setActivePanel : function(panel){ + panel = this.getPanel(panel); + if(this.activePanel && this.activePanel != panel){ + this.activePanel.setActiveState(false); + } + this.activePanel = panel; + panel.setActiveState(true); + if(this.panelSize){ + panel.setSize(this.panelSize.width, this.panelSize.height); + } + if(this.closeBtn){ + this.closeBtn.setVisible(!this.config.closeOnTab && !this.isSlid && panel.isClosable()); + } + this.updateTitle(panel.getTitle()); + if(this.tabs){ + this.fireEvent("invalidated", this); + } + this.fireEvent("panelactivated", this, panel); + }, + + /** + * Shows the specified panel. + * @param {Number/String/ContentPanel} panelId The panel's index, id or the panel itself + * @return {Ext.ContentPanel} The shown panel, or null if a panel could not be found from panelId + */ + showPanel : function(panel){ + if(panel = this.getPanel(panel)){ + if(this.tabs){ + var tab = this.tabs.getTab(panel.getEl().id); + if(tab.isHidden()){ + this.tabs.unhideTab(tab.id); + } + tab.activate(); + }else{ + this.setActivePanel(panel); + } + } + return panel; + }, + + /** + * Get the active panel for this region. + * @return {Ext.ContentPanel} The active panel or null + */ + getActivePanel : function(){ + return this.activePanel; + }, + + validateVisibility : function(){ + if(this.panels.getCount() < 1){ + this.updateTitle(" "); + this.closeBtn.hide(); + this.hide(); + }else{ + if(!this.isVisible()){ + this.show(); + } + } + }, + + /** + * Adds the passed ContentPanel(s) to this region. + * @param {ContentPanel...} panel The ContentPanel(s) to add (you can pass more than one) + * @return {Ext.ContentPanel} The panel added (if only one was added; null otherwise) + */ + add : function(panel){ + if(arguments.length > 1){ + for(var i = 0, len = arguments.length; i < len; i++) { + this.add(arguments[i]); + } + return null; + } + if(this.hasPanel(panel)){ + this.showPanel(panel); + return panel; + } + panel.setRegion(this); + this.panels.add(panel); + if(this.panels.getCount() == 1 && !this.config.alwaysShowTabs){ + this.bodyEl.dom.appendChild(panel.getEl().dom); + if(panel.background !== true){ + this.setActivePanel(panel); + } + this.fireEvent("paneladded", this, panel); + return panel; + } + if(!this.tabs){ + this.initTabs(); + }else{ + this.initPanelAsTab(panel); + } + if(panel.background !== true){ + this.tabs.activate(panel.getEl().id); + } + this.fireEvent("paneladded", this, panel); + return panel; + }, + + /** + * Hides the tab for the specified panel. + * @param {Number/String/ContentPanel} panel The panel's index, id or the panel itself + */ + hidePanel : function(panel){ + if(this.tabs && (panel = this.getPanel(panel))){ + this.tabs.hideTab(panel.getEl().id); + } + }, + + /** + * Unhides the tab for a previously hidden panel. + * @param {Number/String/ContentPanel} panel The panel's index, id or the panel itself + */ + unhidePanel : function(panel){ + if(this.tabs && (panel = this.getPanel(panel))){ + this.tabs.unhideTab(panel.getEl().id); + } + }, + + clearPanels : function(){ + while(this.panels.getCount() > 0){ + this.remove(this.panels.first()); + } + }, + + /** + * Removes the specified panel. If preservePanel is not true (either here or in the config), the panel is destroyed. + * @param {Number/String/ContentPanel} panel The panel's index, id or the panel itself + * @param {Boolean} preservePanel Overrides the config preservePanel option + * @return {Ext.ContentPanel} The panel that was removed + */ + remove : function(panel, preservePanel){ + panel = this.getPanel(panel); + if(!panel){ + return null; + } + var e = {}; + this.fireEvent("beforeremove", this, panel, e); + if(e.cancel === true){ + return null; + } + preservePanel = (typeof preservePanel != "undefined" ? preservePanel : (this.config.preservePanels === true || panel.preserve === true)); + var panelId = panel.getId(); + this.panels.removeKey(panelId); + if(preservePanel){ + document.body.appendChild(panel.getEl().dom); + } + if(this.tabs){ + this.tabs.removeTab(panel.getEl().id); + }else if (!preservePanel){ + this.bodyEl.dom.removeChild(panel.getEl().dom); + } + if(this.panels.getCount() == 1 && this.tabs && !this.config.alwaysShowTabs){ + var p = this.panels.first(); + var tempEl = document.createElement("div"); // temp holder to keep IE from deleting the node + tempEl.appendChild(p.getEl().dom); + this.bodyEl.update(""); + this.bodyEl.dom.appendChild(p.getEl().dom); + tempEl = null; + this.updateTitle(p.getTitle()); + this.tabs = null; + this.bodyEl.setStyle("overflow", this.config.autoScroll ? "auto" : "hidden"); + this.setActivePanel(p); + } + panel.setRegion(null); + if(this.activePanel == panel){ + this.activePanel = null; + } + if(this.config.autoDestroy !== false && preservePanel !== true){ + try{panel.destroy();}catch(e){} + } + this.fireEvent("panelremoved", this, panel); + return panel; + }, + + /** + * Returns the TabPanel component used by this region + * @return {Ext.TabPanel} + */ + getTabs : function(){ + return this.tabs; + }, + + createTool : function(parentEl, className){ + var btn = Ext.DomHelper.append(parentEl, {tag: "div", cls: "x-layout-tools-button", + children: [{tag: "div", cls: "x-layout-tools-button-inner " + className, html: " "}]}, true); + btn.addClassOnOver("x-layout-tools-button-over"); + return btn; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutStateManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutStateManager.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/LayoutStateManager.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,76 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* + * Private internal class for reading and applying state + */ +Ext.LayoutStateManager = function(layout){ + // default empty state + this.state = { + north: {}, + south: {}, + east: {}, + west: {} + }; +}; + +Ext.LayoutStateManager.prototype = { + init : function(layout, provider){ + this.provider = provider; + var state = provider.get(layout.id+"-layout-state"); + if(state){ + var wasUpdating = layout.isUpdating(); + if(!wasUpdating){ + layout.beginUpdate(); + } + for(var key in state){ + if(typeof state[key] != "function"){ + var rstate = state[key]; + var r = layout.getRegion(key); + if(r && rstate){ + if(rstate.size){ + r.resizeTo(rstate.size); + } + if(rstate.collapsed == true){ + r.collapse(true); + }else{ + r.expand(null, true); + } + } + } + } + if(!wasUpdating){ + layout.endUpdate(); + } + this.state = state; + } + this.layout = layout; + layout.on("regionresized", this.onRegionResized, this); + layout.on("regioncollapsed", this.onRegionCollapsed, this); + layout.on("regionexpanded", this.onRegionExpanded, this); + }, + + storeState : function(){ + this.provider.set(this.layout.id+"-layout-state", this.state); + }, + + onRegionResized : function(region, newSize){ + this.state[region.getPosition()].size = newSize; + this.storeState(); + }, + + onRegionCollapsed : function(region){ + this.state[region.getPosition()].collapsed = true; + this.storeState(); + }, + + onRegionExpanded : function(region){ + this.state[region.getPosition()].collapsed = false; + this.storeState(); + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/ReaderLayout.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/ReaderLayout.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/ReaderLayout.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,105 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.ReaderLayout + * @extends Ext.BorderLayout + * This is a pre-built layout that represents a classic, 5-pane application. It consists of a header, a primary + * center region containing two nested regions (a top one for a list view and one for item preview below), + * and regions on either side that can be used for navigation, application commands, informational displays, etc. + * The setup and configuration work exactly the same as it does for a {@link Ext.BorderLayout} - this class simply + * expedites the setup of the overall layout and regions for this common application style. + * Example: +
        
        +var reader = new Ext.ReaderLayout();
        +var CP = Ext.ContentPanel;  // shortcut for adding
        +
        +reader.beginUpdate();
        +reader.add("north", new CP("north", "North"));
        +reader.add("west", new CP("west", {title: "West"}));
        +reader.add("east", new CP("east", {title: "East"}));
        +
        +reader.regions.listView.add(new CP("listView", "List"));
        +reader.regions.preview.add(new CP("preview", "Preview"));
        +reader.endUpdate();
        +
        +* @constructor +* Create a new ReaderLayout +* @param {Object} config Configuration options +* @param {Mixed} container (optional) The container this layout is bound to (defaults to +* document.body if omitted) +*/ +Ext.ReaderLayout = function(config, renderTo){ + var c = config || {size:{}}; + Ext.ReaderLayout.superclass.constructor.call(this, renderTo || document.body, { + north: c.north !== false ? Ext.apply({ + split:false, + initialSize: 32, + titlebar: false + }, c.north) : false, + west: c.west !== false ? Ext.apply({ + split:true, + initialSize: 200, + minSize: 175, + maxSize: 400, + titlebar: true, + collapsible: true, + animate: true, + margins:{left:5,right:0,bottom:5,top:5}, + cmargins:{left:5,right:5,bottom:5,top:5} + }, c.west) : false, + east: c.east !== false ? Ext.apply({ + split:true, + initialSize: 200, + minSize: 175, + maxSize: 400, + titlebar: true, + collapsible: true, + animate: true, + margins:{left:0,right:5,bottom:5,top:5}, + cmargins:{left:5,right:5,bottom:5,top:5} + }, c.east) : false, + center: Ext.apply({ + tabPosition: 'top', + autoScroll:false, + closeOnTab: true, + titlebar:false, + margins:{left:c.west!==false ? 0 : 5,right:c.east!==false ? 0 : 5,bottom:5,top:2} + }, c.center) + }); + + this.el.addClass('x-reader'); + + this.beginUpdate(); + + var inner = new Ext.BorderLayout(Ext.getBody().createChild(), { + south: c.preview !== false ? Ext.apply({ + split:true, + initialSize: 200, + minSize: 100, + autoScroll:true, + collapsible:true, + titlebar: true, + cmargins:{top:5,left:0, right:0, bottom:0} + }, c.preview) : false, + center: Ext.apply({ + autoScroll:false, + titlebar:false, + minHeight:200 + }, c.listView) + }); + this.add('center', new Ext.NestedLayoutPanel(inner, + Ext.apply({title: c.mainTitle || '',tabTip:''},c.innerPanelCfg))); + + this.endUpdate(); + + this.regions.preview = inner.getRegion('south'); + this.regions.listView = inner.getRegion('center'); +}; + +Ext.extend(Ext.ReaderLayout, Ext.BorderLayout); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/SplitLayoutRegion.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/SplitLayoutRegion.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/legacy/layout/SplitLayoutRegion.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,333 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.SplitLayoutRegion + * @extends Ext.LayoutRegion + * Adds a splitbar and other (private) useful functionality to a {@link Ext.LayoutRegion}. + */ +Ext.SplitLayoutRegion = function(mgr, config, pos, cursor){ + this.cursor = cursor; + Ext.SplitLayoutRegion.superclass.constructor.call(this, mgr, config, pos); +}; + +Ext.extend(Ext.SplitLayoutRegion, Ext.LayoutRegion, { + splitTip : "Drag to resize.", + collapsibleSplitTip : "Drag to resize. Double click to hide.", + useSplitTips : false, + + applyConfig : function(config){ + Ext.SplitLayoutRegion.superclass.applyConfig.call(this, config); + if(config.split){ + if(!this.split){ + var splitEl = Ext.DomHelper.append(this.mgr.el.dom, + {tag: "div", id: this.el.id + "-split", cls: "x-layout-split x-layout-split-"+this.position, html: " "}); + /** The SplitBar for this region @type Ext.SplitBar */ + this.split = new Ext.SplitBar(splitEl, this.el, this.orientation); + this.split.on("moved", this.onSplitMove, this); + this.split.useShim = config.useShim === true; + this.split.getMaximumSize = this[this.position == 'north' || this.position == 'south' ? 'getVMaxSize' : 'getHMaxSize'].createDelegate(this); + if(this.useSplitTips){ + this.split.el.dom.title = config.collapsible ? this.collapsibleSplitTip : this.splitTip; + } + if(config.collapsible){ + this.split.el.on("dblclick", this.collapse, this); + } + } + if(typeof config.minSize != "undefined"){ + this.split.minSize = config.minSize; + } + if(typeof config.maxSize != "undefined"){ + this.split.maxSize = config.maxSize; + } + if(config.hideWhenEmpty || config.hidden){ + this.hideSplitter(); + } + } + }, + + getHMaxSize : function(){ + var cmax = this.config.maxSize || 10000; + var center = this.mgr.getRegion("center"); + return Math.min(cmax, (this.el.getWidth()+center.getEl().getWidth())-center.getMinWidth()); + }, + + getVMaxSize : function(){ + var cmax = this.config.maxSize || 10000; + var center = this.mgr.getRegion("center"); + return Math.min(cmax, (this.el.getHeight()+center.getEl().getHeight())-center.getMinHeight()); + }, + + onSplitMove : function(split, newSize){ + this.fireEvent("resized", this, newSize); + }, + + /** + * Returns the {@link Ext.SplitBar} for this region. + * @return {Ext.SplitBar} + */ + getSplitBar : function(){ + return this.split; + }, + + hide : function(){ + this.hideSplitter(); + Ext.SplitLayoutRegion.superclass.hide.call(this); + }, + + hideSplitter : function(){ + if(this.split){ + this.split.el.setLocation(-2000,-2000); + this.split.el.hide(); + } + }, + + show : function(){ + if(this.split){ + this.split.el.show(); + } + Ext.SplitLayoutRegion.superclass.show.call(this); + }, + + beforeSlide: function(){ + if(Ext.isGecko){// firefox overflow auto bug workaround + this.bodyEl.clip(); + if(this.tabs) this.tabs.bodyEl.clip(); + if(this.activePanel){ + this.activePanel.getEl().clip(); + + if(this.activePanel.beforeSlide){ + this.activePanel.beforeSlide(); + } + } + } + }, + + afterSlide : function(){ + if(Ext.isGecko){// firefox overflow auto bug workaround + this.bodyEl.unclip(); + if(this.tabs) this.tabs.bodyEl.unclip(); + if(this.activePanel){ + this.activePanel.getEl().unclip(); + if(this.activePanel.afterSlide){ + this.activePanel.afterSlide(); + } + } + } + }, + + initAutoHide : function(){ + if(this.autoHide !== false){ + if(!this.autoHideHd){ + var st = new Ext.util.DelayedTask(this.slideIn, this); + this.autoHideHd = { + "mouseout": function(e){ + if(!e.within(this.el, true)){ + st.delay(500); + } + }, + "mouseover" : function(e){ + st.cancel(); + }, + scope : this + }; + } + this.el.on(this.autoHideHd); + } + }, + + clearAutoHide : function(){ + if(this.autoHide !== false){ + this.el.un("mouseout", this.autoHideHd.mouseout); + this.el.un("mouseover", this.autoHideHd.mouseover); + } + }, + + clearMonitor : function(){ + Ext.getDoc().un("click", this.slideInIf, this); + }, + + // these names are backwards but not changed for compat + slideOut : function(){ + if(this.isSlid || this.el.hasActiveFx()){ + return; + } + this.isSlid = true; + if(this.collapseBtn){ + this.collapseBtn.hide(); + } + this.closeBtnState = this.closeBtn.getStyle('display'); + this.closeBtn.hide(); + if(this.stickBtn){ + this.stickBtn.show(); + } + this.el.show(); + this.el.alignTo(this.collapsedEl, this.getCollapseAnchor()); + this.beforeSlide(); + this.el.setStyle("z-index", 10001); + this.el.slideIn(this.getSlideAnchor(), { + callback: function(){ + this.afterSlide(); + this.initAutoHide(); + Ext.getDoc().on("click", this.slideInIf, this); + this.fireEvent("slideshow", this); + }, + scope: this, + block: true + }); + }, + + afterSlideIn : function(){ + this.clearAutoHide(); + this.isSlid = false; + this.clearMonitor(); + this.el.setStyle("z-index", ""); + if(this.collapseBtn){ + this.collapseBtn.show(); + } + this.closeBtn.setStyle('display', this.closeBtnState); + if(this.stickBtn){ + this.stickBtn.hide(); + } + this.fireEvent("slidehide", this); + }, + + slideIn : function(cb){ + if(!this.isSlid || this.el.hasActiveFx()){ + Ext.callback(cb); + return; + } + this.isSlid = false; + this.beforeSlide(); + this.el.slideOut(this.getSlideAnchor(), { + callback: function(){ + this.el.setLeftTop(-10000, -10000); + this.afterSlide(); + this.afterSlideIn(); + Ext.callback(cb); + }, + scope: this, + block: true + }); + }, + + slideInIf : function(e){ + if(!e.within(this.el)){ + this.slideIn(); + } + }, + + animateCollapse : function(){ + this.beforeSlide(); + this.el.setStyle("z-index", 20000); + var anchor = this.getSlideAnchor(); + this.el.slideOut(anchor, { + callback : function(){ + this.el.setStyle("z-index", ""); + this.collapsedEl.slideIn(anchor, {duration:.3}); + this.afterSlide(); + this.el.setLocation(-10000,-10000); + this.el.hide(); + this.fireEvent("collapsed", this); + }, + scope: this, + block: true + }); + }, + + animateExpand : function(){ + this.beforeSlide(); + this.el.alignTo(this.collapsedEl, this.getCollapseAnchor(), this.getExpandAdj()); + this.el.setStyle("z-index", 20000); + this.collapsedEl.hide({ + duration:.1 + }); + this.el.slideIn(this.getSlideAnchor(), { + callback : function(){ + this.el.setStyle("z-index", ""); + this.afterSlide(); + if(this.split){ + this.split.el.show(); + } + this.fireEvent("invalidated", this); + this.fireEvent("expanded", this); + }, + scope: this, + block: true + }); + }, + + anchors : { + "west" : "left", + "east" : "right", + "north" : "top", + "south" : "bottom" + }, + + sanchors : { + "west" : "l", + "east" : "r", + "north" : "t", + "south" : "b" + }, + + canchors : { + "west" : "tl-tr", + "east" : "tr-tl", + "north" : "tl-bl", + "south" : "bl-tl" + }, + + getAnchor : function(){ + return this.anchors[this.position]; + }, + + getCollapseAnchor : function(){ + return this.canchors[this.position]; + }, + + getSlideAnchor : function(){ + return this.sanchors[this.position]; + }, + + getAlignAdj : function(){ + var cm = this.cmargins; + switch(this.position){ + case "west": + return [0, 0]; + break; + case "east": + return [0, 0]; + break; + case "north": + return [0, 0]; + break; + case "south": + return [0, 0]; + break; + } + }, + + getExpandAdj : function(){ + var c = this.collapsedEl, cm = this.cmargins; + switch(this.position){ + case "west": + return [-(cm.right+c.getWidth()+cm.left), 0]; + break; + case "east": + return [cm.right+c.getWidth()+cm.left, 0]; + break; + case "north": + return [0, -(cm.top+cm.bottom+c.getHeight())]; + break; + case "south": + return [0, cm.top+cm.bottom+c.getHeight()]; + break; + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-af.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-af.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-af.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,179 @@ +/* + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * Afrikaans Translations + * by Thys Meintjes (20 July 2007) + */ + +/* Ext Core translations */ +Ext.UpdateManager.defaults.indicatorText = '
        Besig om te laai...
        '; + +/* Ext single string translations */ +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} geselekteerde ry(e)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Maak die oortjie toe"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Die waarde in hierdie veld is foutief"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Besig om te laai..."; +} + +/* Javascript month and days translations */ +Date.monthNames = [ + "Januarie", + "Februarie", + "Maart", + "April", + "Mei", + "Junie", + "Julie", + "Augustus", + "September", + "Oktober", + "November", + "Desember" +]; + +Date.dayNames = [ + "Sondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrydag", + "Saterdag" +]; + +/* Ext components translations */ +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Kanselleer", + yes : "Ja", + no : "Nee" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d-m-y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Vandag", + minText : "Hierdie datum is vroër as die minimum datum", + maxText : "Hierdie dataum is later as die maximum datum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Volgende Maand (Beheer+Regs)', + prevText : 'Vorige Maand (Beheer+Links)', + monthYearText : "Kies 'n maand (Beheer+Op/Af volgende/vorige jaar)", + todayTip : "{0} (Spasie)", + format : "d-m-y", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Bladsy", + afterPageText : "van {0}", + firstText : "Eerste Bladsy", + prevText : "Vorige Bladsy", + nextText : "Volgende Bladsy", + lastText : "Laatste Bladsy", + refreshText : "Verfris", + displayMsg : "Wys {0} - {1} van {2}", + emptyMsg : 'Geen data om te wys nie' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Die minimum lengte van die veld is {0}", + maxLengthText : "Die maximum lengte van die veld is {0}", + blankText : "Die veld is verpligtend", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Die minimum waarde vir die veld is {0}", + maxText : "Die maximum waarde vir die veld is {0}", + nanText : "{0} is nie 'n geldige waarde nie" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Afgeskakel", + disabledDatesText : "Afgeskakel", + minText : "Die datum in hierdie veld moet na {0} wees", + maxText : "Die datum in hierdie veld moet voor {0} wees", + invalidText : "{0} is nie 'n geldige datum nie - datumformaat is {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Besig om te laai...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : "Hierdie veld moet 'n e-pos adres wees met die formaat 'gebruiker@domein.za'", + urlText : "Hierdie veld moet 'n URL wees me die formaat 'http:/'+'/www.domein.za'", + alphaText : 'Die veld mag alleenlik letters en _ bevat', + alphanumText : 'Die veld mag alleenlik letters, syfers en _ bevat' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sorteer Oplopend", + sortDescText : "Sorteer Aflopend", + lockText : "Vries Kolom", + unlockText : "Ontvries Kolom", + columnsText : "Kolomme" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Naam", + valueText : "Waarde", + dateFormat : "Y-m-j" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Trek om grootte aan te pas.", + collapsibleSplitTip : "Trek om grootte aan te pas. Dubbel-klik om weg te steek." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-bg.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-bg.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-bg.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,271 @@ +/** + * Bulgarian Translation + * + * By Георги Костадинов, Калгари, Канада + * 10 October 2007 + * By Nedko Penev + * 26 October 2007 + * (utf-8 encoding) + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Зареждане...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} избрани колони"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Затвори таб"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Невалидна стойност на полето"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Зареждане..."; +} + +Date.monthNames = [ + "Януари", + "Февруари", + "Март", + "Април", + "Май", + "Юни", + "Юли", + "Август", + "Септември", + "Октомври", + "Ноември", + "Декември" +]; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.dayNames = [ + "Неделя", + "Понеделник", + "Вторник", + "Сряда", + "Четвъртък", + "Петък", + "Събота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Отмени", + yes : "Да", + no : "Не" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Днес", + minText : "Тази дата е преди минималната", + maxText : "Тази дата е след максималната", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Следващ месец (Control+Right)', + prevText : 'Предишен месец (Control+Left)', + monthYearText : 'Избери месец (Control+Up/Down за преместване по години)', + todayTip : "{0} (Spacebar)", + format : "d.m.y", + okText : " OK ", + cancelText : "Отмени", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Страница", + afterPageText : "от {0}", + firstText : "Първа страница", + prevText : "Предишна страница", + nextText : "Следваща страница", + lastText : "Последна страница", + refreshText : "Презареди", + displayMsg : "Показвайки {0} - {1} от {2}", + emptyMsg : 'Няма данни за показване' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Минималната дължина на това поле е {0}", + maxLengthText : "Максималната дължина на това поле е {0}", + blankText : "Това поле е задължително", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Минималната стойност за това поле е {0}", + maxText : "Максималната стойност за това поле е {0}", + nanText : "{0} не е валидно число" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Недостъпен", + disabledDatesText : "Недостъпен", + minText : "Датата в това поле трябва да е след {0}", + maxText : "Датата в това поле трябва да е преди {0}", + invalidText : "{0} не е валидна дата - трябва да бъде във формат {1}", + format : "d.m.y", + altFormats : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Зареждане...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Това поле трябва да бъде емейл във формат "user@domain.com"', + urlText : 'Това поле трябва да бъде URL във формат "http:/'+'/www.domain.com"', + alphaText : 'Това поле трябва да съдържа само букви и _', + alphanumText : 'Това поле трябва да съдържа само букви, цифри и _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Моля, въведете URL за връзката:', + buttonTips : { + bold : { + title: 'Bold (Ctrl+B)', + text: 'Удебелява избрания текст.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italic (Ctrl+I)', + text: 'Прави избрания текст курсив.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Underline (Ctrl+U)', + text: 'Подчертава избрания текст.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Уголеми текста', + text: 'Уголемява размера на шрифта.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Намали текста', + text: 'Намалява размера на шрифта.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Цвят на маркирания текст', + text: 'Променя фоновия цвят на избрания текст.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Цвят на шрифта', + text: 'Променя цвета на избрания текст.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Ляво подравняване', + text: 'Подравнява текста на ляво.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Центриране', + text: 'Центрира текста.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Дясно подравняване', + text: 'Подравнява текста на дясно.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Неномериран списък', + text: 'Започва неномериран списък.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Номериран списък', + text: 'Започва номериран списък.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Хипервръзка', + text: 'Превръща избрания текст в хипервръзка.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Редактиране на кода', + text: 'Преминаване в режим на редактиране на кода.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Подреди в нарастващ ред", + sortDescText : "Подреди в намаляващ ред", + lockText : "Заключи колона", + unlockText : "Отключи колона", + columnsText : "Колони" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Име", + valueText : "Стойност", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Влачете с мишката за да промените размера.", + collapsibleSplitTip : "Влачете с мишката за да промените размера. Чукнете два пъти за да скриете." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-cs.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-cs.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-cs.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,170 @@ +/** + * Czech Translations / Český překlad + * Translated by Tomáš Korčák (72) + * 2007/05/01 21:29, Ext-1.0.1a + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Prosím čekejte...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} vybraných řádků"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zavřít záložku"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je neplatná"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Prosím čekejte..."; +} + +Date.monthNames = [ + "Leden", + "Únor", + "Březen", + "Duben", + "Květen", + "Červen", + "Červenec", + "Srpen", + "Září", + "Říjen", + "Listopad", + "Prosinec" +]; + +Date.dayNames = [ + "Neděle", + "Pondělí", + "Úterý", + "Středa", + "Čtvrtek", + "Pátek", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Storno", + yes : "Ano", + no : "Ne" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m.d.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Dnes", + minText : "Datum nesmí být starší než je minimální", + maxText : "Datum nesmí být dřívější než je maximální", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Následující měsíc (Control+Right)', + prevText : 'Předcházející měsíc (Control+Left)', + monthYearText : 'Zvolte měsíc (ke změně let použijte Control+Up/Down)', + todayTip : "{0} (Spacebar)", + format : "m.d.y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Strana", + afterPageText : "z {0}", + firstText : "První strana", + prevText : "Přecházející strana", + nextText : "Následující strana", + lastText : "Poslední strana", + refreshText : "Aktualizovat", + displayMsg : "Zobrazeno {0} - {1} z celkových {2}", + emptyMsg : 'Žádné záznamy nebyly nalezeny' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Pole nesmí mít méně {0} znaků", + maxLengthText : "Pole nesmí být delší než {0} znaků", + blankText : "This field is required", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Hodnota v tomto poli nesmí být menší než {0}", + maxText : "Hodnota v tomto poli nesmí být větší než {0}", + nanText : "{0} není platné číslo" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Neaktivní", + disabledDatesText : "Neaktivní", + minText : "Datum v tomto poli nesmí být starší než {0}", + maxText : "Datum v tomto poli nesmí být novější než {0}", + invalidText : "{0} není platným datem - zkontrolujte zda-li je ve formátu {1}", + format : "m.d.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Prosím čekejte...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'V tomto poli může být vyplněna pouze emailová adresa ve formátu "uživatel@doména.cz"', + urlText : 'V tomto poli může být vyplněna pouze URL (adresa internetové stránky) ve formátu "http:/'+'/www.doména.cz"', + alphaText : 'Toto pole může obsahovat pouze písmena abecedy a znak _', + alphanumText : 'Toto pole může obsahovat pouze písmena abecedy, čísla a znak _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Řadit vzestupně", + sortDescText : "Řadit sestupně", + lockText : "Ukotvit sloupec", + unlockText : "Uvolnit sloupec", + columnsText : "Sloupce" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Název", + valueText : "Hodnota", + dateFormat : "m.j.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Tahem změnit velikost.", + collapsibleSplitTip : "Tahem změnit velikost. Dvojklikem skrýt." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-da.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-da.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-da.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,172 @@ +/* + * Danish translation + * By JohnF + * 04-09-2007, 05:28 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Henter...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} markerede rækker"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Luk denne fane"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Værdien i dette felt er ikke tilladt"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Henter..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "Marts", + "April", + "Maj", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "December" +]; + +Date.dayNames = [ + "Søndag", + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Fortryd", + yes : "Ja", + no : "Nej" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "I dag", + minText : "Denne dato er før den tidligst tilladte", + maxText : "Denne dato er senere end den senest tilladte", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Næste måned (Ctrl + højre piltast)', + prevText : 'Forrige måned (Ctrl + venstre piltast)', + monthYearText : 'Vælg en måned (Ctrl + op/ned pil for at ændre årstal)', + todayTip : "{0} (mellemrum)", + format : "d/m/y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Side", + afterPageText : "af {0}", + firstText : "Første side", + prevText : "Forrige side", + nextText : "Næste side", + lastText : "Sidste side", + refreshText : "Opfrisk", + displayMsg : "Viser {0} - {1} af {2}", + emptyMsg : 'Der er ingen data at vise' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimum længden for dette felt er {0}", + maxLengthText : "Maksimum længden for dette felt er {0}", + blankText : "Dette felt skal udfyldes", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Mindste-værdien for dette felt er {0}", + maxText : "Maksimum-værdien for dette felt er {0}", + nanText : "{0} er ikke et tilladt nummer" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Inaktiveret", + disabledDatesText : "Inaktiveret", + minText : "Datoen i dette felt skal være efter {0}", + maxText : "Datoen i dette felt skal være før {0}", + invalidText : "{0} er ikke en tilladt dato - datoer skal angives i formatet {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Henter...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dette felt skal være en email adresse i formatet "navn@domæne.dk"', + urlText : 'Dette felt skal være et link (URL) i formatet "http:/'+'/www.domæne.dk"', + alphaText : 'Dette felt kan kun indeholde bogstaver og "_" (understregning)', + alphanumText : 'Dette felt kan kun indeholde bogstaver, tal og "_" (understregning)' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortér stigende", + sortDescText : "Sortér faldende", + lockText : "Lås kolonne", + unlockText : "Fjern lås fra kolonne", + columnsText : "Kolonner" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Navn", + valueText : "Værdi", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Træk for at ændre størrelsen.", + collapsibleSplitTip : "Træk for at ændre størrelsen. Dobbelt-klik for at skjule." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-de.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-de.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,289 @@ +/* + * German translation + * By schmidetzki and humpdi + * 04-07-2007 + * Updated by wm003 10-31-2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Übertrage Daten ...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} Zeile(n) ausgewählt"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Diesen Tab schließen"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Der Wert des Feldes ist nicht korrekt"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Übertrage Daten..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "März", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember" +]; + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +}; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +}; + +Date.dayNames = [ + "Sonntag", + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag" +]; + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +}; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Abbrechen", + yes : "Ja", + no : "Nein" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Heute", + minText : "Dieses Datum liegt von dem erstmöglichen Datum", + maxText : "Dieses Datum liegt nach dem letztmöglichen Datum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : "Nächster Monat (Strg/Control + Rechts)", + prevText : "Vorheriger Monat (Strg/Control + Links)", + monthYearText : "Monat auswählen (Strg/Control + Hoch/Runter, um ein Jahr auszuwählen)", + todayTip : "Heute ({0}) (Leertaste)", + format : "d.m.Y", + okText : " OK ", + cancelText : "Abbrechen", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Seite", + afterPageText : "von {0}", + firstText : "Erste Seite", + prevText : "vorherige Seite", + nextText : "nächste Seite", + lastText : "letzte Seite", + refreshText : "Aktualisieren", + displayMsg : "Anzeige Eintrag {0} - {1} von {2}", + emptyMsg : "Keine Daten vorhanden" + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Bitte geben Sie mindestens {0} Zeichen ein", + maxLengthText : "Bitte geben Sie maximal {0} Zeichen ein", + blankText : "Dieses Feld darf nicht leer sein", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Der Mindestwert für dieses Feld ist {0}", + maxText : "Der Maximalwert für dieses Feld ist {0}", + nanText : "{0} ist keine Zahl" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "nicht erlaubt", + disabledDatesText : "nicht erlaubt", + minText : "Das Datum in diesem Feld muß nach dem {0} liegen", + maxText : "Das Datum in diesem Feld muß vor dem {0} liegen", + invalidText : "{0} ist kein valides Datum - es muß im Format {1} eingegeben werden", + format : "d.m.Y", + altFormats : "d.m.Y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Lade Daten ...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dieses Feld sollte eine E-Mail-Adresse enthalten. Format: "user@domain.com"', + urlText : 'Dieses Feld sollte eine URL enthalten. Format: "http:/'+'/www.domain.com"', + alphaText : 'Dieses Feld darf nur Buchstaben enthalten und _', + alphanumText : 'Dieses Feld darf nur Buchstaben und Zahlen enthalten und _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Bitte geben Sie die URL für den Link ein:', + buttonTips : { + bold : { + title: 'Fett (Ctrl+B)', + text: 'Erstellt den ausgewählten Text in Fettschrift.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Kursiv (Ctrl+I)', + text: 'Erstellt den ausgewählten Text in Schrägschrift.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Unterstrichen (Ctrl+U)', + text: 'Unterstreicht den ausgewählten Text.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Text vergößern', + text: 'Erhöht die Schriftgröße.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Text verkleinern', + text: 'Verringert die Schriftgröße.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Text farblich hervorheben', + text: 'Hintergrundfarbe des ausgewählten Textes ändern.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Schriftfarbe', + text: 'Farbe des ausgewählten Textes ändern.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Linksbündig', + text: 'Setzt den Text linksbündig.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Zentrieren', + text: 'Zentriert den Text in Editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Align Text Right', + text: 'Align text to the right.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Aufzählungsliste', + text: 'Beginnt eine Aufzählungsliste mit Spiegelstrichen.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Numerierte Liste', + text: 'Beginnt eine numerierte Liste.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Erstellt einen Hyperlink aus dem ausgewählten text.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Source bearbeiten', + text: 'Zur Bearbeitung des Quelltextes wechseln.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Aufsteigend sortieren", + sortDescText : "Absteigend sortieren", + lockText : "Spalte sperren", + unlockText : "Spalte freigeben (entsperren)", + columnsText : "Spalten" + }); +} + +if(Ext.grid.GroupingView){ + Ext.apply(Ext.grid.GroupingView.prototype, { + emptyGroupText : '(Keine)', + groupByText : 'Dieses Feld gruppieren', + showGroupsText : 'In Gruppen anzeigen' + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Name", + valueText : "Wert", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Ziehen, um Größe zu ändern.", + collapsibleSplitTip : "Ziehen, um Größe zu ändern. Doppelklick um Panel auszublenden." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-el_GR.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-el_GR.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-el_GR.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,254 @@ +/** + * Greek translation + * By thesilentman (utf8 encoding) + * 22 Sep 2007 + * + * Changes since previous (first) Version: + * - HTMLEditor Translation + * - some minor corrections + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Μεταφόρτωση δεδομένων...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} Επιλεγμένες σειρές"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Κλείστε το tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Το περιεχόμενο του πεδίου δεν είναι αποδεκτό"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Μεταφόρτωση δεδομένων..."; +} + +Date.monthNames = [ + "Ιανουάριος", + "Φεβρουάριος", + "Μάρτιος", + "Απρίλιος", + "Μάιος", + "Ιούνιος", + "Ιούλιος", + "Αύγουστος", + "Σεπτέμβριος", + "Οκτώβριος", + "Νοέμβριος", + "Δεκέμβριος" +]; + +Date.dayNames = [ + "Κυριακή", + "Δευτέρα", + "Τρίτη", + "Τετάρτη", + "Πέμπτη", + "Παρασκευή", + "Σάββατο" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Άκυρο", + yes : "Ναι", + no : "Όχι" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Σήμερα", + minText : "Η Ημερομηνία είναι προγενέστερη από την παλαιότερη αποδεκτή", + maxText : "Η Ημερομηνία είναι μεταγενέστερη από την νεότερη αποδεκτή", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Επόμενος Μήνας (Control+Δεξί Βέλος)', + prevText : 'Προηγούμενος Μήνας (Control + Αριστερό Βέλος)', + monthYearText : 'Επιλογή Μηνός (Control + Επάνω/Κάτω Βέλος για μεταβολή ετών)', + todayTip : "{0} (ΠΛήκτρο Διαστήματος)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Σελίδα", + afterPageText : "από {0}", + firstText : "Πρώτη Σελίδα", + prevText : "Προηγούμενη Σελίδα", + nextText : "Επόμενη Σελίδα", + lastText : "Τελευταία Σελίδα", + refreshText : "Ανανέωση", + displayMsg : "Εμφάνιση {0} - {1} από {2}", + emptyMsg : 'Δεν υπάρχουν δεδομένα' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Το μικρότερο αποδεκτό μήκος για το πεδίο είναι {0}", + maxLengthText : "Το μεγαλύτερο αποδεκτό μήκος για το πεδίο είναι {0}", + blankText : "Το πεδίο είναι υποχρεωτικό", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Η μικρότερη τιμή του πεδίου είναι {0}", + maxText : "Η μεγαλύτερη τιμή του πεδίου είναι {0}", + nanText : "{0} δεν είναι αποδεκτός αριθμός" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Ανενεργό", + disabledDatesText : "Ανενεργό", + minText : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι μετά την {0}", + maxText : "Η ημερομηνία αυτού του πεδίου πρέπει να είναι πριν την {0}", + invalidText : "{0} δεν είναι έγκυρη ημερομηνία - πρέπει να είναι στη μορφή {1}", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Μεταφόρτωση δεδομένων...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Το πεδίο δέχεται μόνο διευθύνσεις Email σε μορφή "user@domain.com"', + urlText : 'Το πεδίο δέχεται μόνο URL σε μορφή "http:/'+'/www.domain.com"', + alphaText : 'Το πεδίο δέχεται μόνο χαρακτήρες και _', + alphanumText : 'Το πεδίο δέχεται μόνο χαρακτήρες, αριθμούς και _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Δώστε τη διεύθυνση (URL) για το σύνδεσμο (link):', + buttonTips : { + bold : { + title: 'Έντονα (Ctrl+B)', + text: 'Κάνετε το προεπιλεγμένο κείμενο έντονο.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Πλάγια (Ctrl+I)', + text: 'Κάνετε το προεπιλεγμένο κείμενο πλάγιο.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Υπογράμμιση (Ctrl+U)', + text: 'Υπογραμμίζετε το προεπιλεγμένο κείμενο.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Μεγέθυνση κειμένου', + text: 'Μεγαλώνετε τη γραμματοσειρά.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Σμίκρυνση κειμένου', + text: 'Μικραίνετε τη γραμματοσειρά.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Χρώμα Φόντου Κειμένου', + text: 'Αλλάζετε το χρώμα στο φόντο του προεπιλεγμένου κειμένου.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Χρώμα Γραμματοσειράς', + text: 'Αλλάζετε το χρώμα στη γραμματοσειρά του προεπιλεγμένου κειμένου.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Αριστερή Στοίχιση Κειμένου', + text: 'Στοιχίζετε το κείμενο στα αριστερά.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Κεντράρισμα Κειμένου', + text: 'Στοιχίζετε το κείμενο στο κέντρο.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Δεξιά Στοίχιση Κειμένου', + text: 'Στοιχίζετε το κείμενο στα δεξιά.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Εισαγωγή Λίστας Κουκίδων', + text: 'Ξεκινήστε μια λίστα με κουκίδες.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Εισαγωγή Λίστας Αρίθμησης', + text: 'Ξεκινήστε μια λίστα με αρίθμηση.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Μετατρέπετε το προεπιλεγμένο κείμενο σε Link.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Επεξεργασία Κώδικα', + text: 'Μεταβαίνετε στη λειτουργία επεξεργασίας κώδικα.', + cls: 'x-html-editor-tip' + } + } + }); +} + + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Αύξουσα ταξινόμηση", + sortDescText : "Φθίνουσα ταξινόμηση", + lockText : "Κλείδωμα στήλης", + unlockText : "Ξεκλείδωμα στήλης", + columnsText : "Στήλες" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Όνομα", + valueText : "Περιεχόμενο", + dateFormat : "m/d/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Σύρετε για αλλαγή μεγέθους.", + collapsibleSplitTip : "Σύρετε για αλλαγή μεγέθους. Διπλό κλικ για απόκρυψη." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-en.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-en.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-en.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,288 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * English Translations + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Loading...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} selected row(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Close this tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "The value in this field is invalid"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Loading..."; +} + +Date.monthNames = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +}; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +}; + +Date.dayNames = [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" +]; + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +}; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Cancel", + yes : "Yes", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m/d/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Today", + minText : "This date is before the minimum date", + maxText : "This date is after the maximum date", + disabledDaysText : "", + disabledDatesText : "", + 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)', + todayTip : "{0} (Spacebar)", + format : "m/d/y", + okText : " OK ", + cancelText : "Cancel", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "of {0}", + firstText : "First Page", + prevText : "Previous Page", + nextText : "Next Page", + lastText : "Last Page", + refreshText : "Refresh", + displayMsg : "Displaying {0} - {1} of {2}", + emptyMsg : 'No data to display' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "The minimum length for this field is {0}", + maxLengthText : "The maximum length for this field is {0}", + blankText : "This field is required", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + 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" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Disabled", + disabledDatesText : "Disabled", + minText : "The date in this field must be after {0}", + maxText : "The date in this field must be before {0}", + invalidText : "{0} is not a valid date - it must be in the format {1}", + format : "m/d/y", + altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Loading...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'This field should be an e-mail address in the format "user@domain.com"', + urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + alphaText : 'This field should only contain letters and _', + alphanumText : 'This field should only contain letters, numbers and _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Please enter the URL for the link:', + buttonTips : { + bold : { + title: 'Bold (Ctrl+B)', + text: 'Make the selected text bold.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italic (Ctrl+I)', + text: 'Make the selected text italic.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Underline (Ctrl+U)', + text: 'Underline the selected text.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Grow Text', + text: 'Increase the font size.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Shrink Text', + text: 'Decrease the font size.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Text Highlight Color', + text: 'Change the background color of the selected text.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Font Color', + text: 'Change the color of the selected text.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Align Text Left', + text: 'Align text to the left.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Center Text', + text: 'Center text in the editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Align Text Right', + text: 'Align text to the right.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Bullet List', + text: 'Start a bulleted list.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Numbered List', + text: 'Start a numbered list.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Make the selected text a hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Source Edit', + text: 'Switch to source editing mode.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sort Ascending", + sortDescText : "Sort Descending", + lockText : "Lock Column", + unlockText : "Unlock Column", + columnsText : "Columns" + }); +} + +if(Ext.grid.GroupingView){ + Ext.apply(Ext.grid.GroupingView.prototype, { + emptyGroupText : '(None)', + groupByText : 'Group By This Field', + showGroupsText : 'Show in Groups' + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Name", + valueText : "Value", + dateFormat : "m/j/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Drag to resize.", + collapsibleSplitTip : "Drag to resize. Double click to hide." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-en_UK.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-en_UK.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-en_UK.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,173 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * English (UK) Translations + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Loading...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} selected row(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Close this tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "The value in this field is invalid"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Loading..."; +} + +Date.monthNames = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" +]; + +Date.dayNames = [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Cancel", + yes : "Yes", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Today", + minText : "This date is before the minimum date", + maxText : "This date is after the maximum date", + disabledDaysText : "", + disabledDatesText : "", + 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)', + todayTip : "{0} (Spacebar)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "of {0}", + firstText : "First Page", + prevText : "Previous Page", + nextText : "Next Page", + lastText : "Last Page", + refreshText : "Refresh", + displayMsg : "Displaying {0} - {1} of {2}", + emptyMsg : 'No data to display' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "The minimum length for this field is {0}", + maxLengthText : "The maximum length for this field is {0}", + blankText : "This field is required", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + 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" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Disabled", + disabledDatesText : "Disabled", + minText : "The date in this field must be after {0}", + maxText : "The date in this field must be before {0}", + invalidText : "{0} is not a valid date - it must be in the format {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Loading...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'This field should be an e-mail address in the format "user@domain.com"', + urlText : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + alphaText : 'This field should only contain letters and _', + alphanumText : 'This field should only contain letters, numbers and _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sort Ascending", + sortDescText : "Sort Descending", + lockText : "Lock Column", + unlockText : "Unlock Column", + columnsText : "Columns" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Name", + valueText : "Value", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Drag to resize.", + collapsibleSplitTip : "Drag to resize. Double click to hide." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fa.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fa.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fa.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,266 @@ +/* + * Farsi (Persian) translation + * By Mohaqa + * 03-10-2007, 06:23 PM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        در حال بارگذاری ...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} رکورد انتخاب شده"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "بستن"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "مقدار فیلد صحیح نیست"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "در حال بارگذاری ..."; +} + +Date.monthNames = [ + "ژانویه", + "فوریه", + "مارس", + "آپریل", + "می", + "ژوئن", + "جولای", + "آگوست", + "سپتامبر", + "اکتبر", + "نوامبر", + "دسامبر" +]; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.dayNames = [ + "یکشنبه", + "دوشنبه", + "سه شنبه", + "چهارشنبه", + "پنجشنبه", + "جمعه", + "شنبه" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "تایید", + cancel : "بازگشت", + yes : "بله", + no : "خیر" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y/m/d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "امروز", + minText : "این تاریخ قبل از محدوده مجاز است", + maxText : "این تاریخ پس از محدوده مجاز است", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'ماه بعد (Control + Right)', + prevText : 'ماه قبل (Control+Left)', + monthYearText : 'یک ماه را انتخاب کنید (Control+Up/Down برای انتقال در سال)', + todayTip : "{0} (Spacebar)", + format : "y/m/d", + okText : " OK ", + cancelText : "Cancel", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "صفحه", + afterPageText : "از {0}", + firstText : "صفحه اول", + prevText : "صفحه قبل", + nextText : "صفحه بعد", + lastText : "صفحه آخر", + refreshText : "بازخوانی", + displayMsg : "نمایش {0} - {1} of {2}", + emptyMsg : 'داده ای برای نمایش وجود ندارد' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "حداقل طول این فیلد برابر است با {0}", + maxLengthText : "حداکثر طول این فیلد برابر است با {0}", + blankText : "این فیلد باید مقداری داشته باشد", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "حداقل مقدار این فیلد برابر است با {0}", + maxText : "حداکثر مقدار این فیلد برابر است با {0}", + nanText : "{0} یک عدد نیست" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "غیرفعال", + disabledDatesText : "غیرفعال", + minText : "تاریخ باید پس از {0} باشد", + maxText : "تاریخ باید پس از {0} باشد", + invalidText : "{0} تاریخ صحیحی نیست - فرمت صحیح {1}", + format : "y/m/d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "در حال بارگذاری ...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'مقدار این فیلد باید یک ایمیل با این فرمت باشد "user@domain.com"', + urlText : 'مقدار این آدرس باید یک آدرس سایت با این فرمت باشد "http:/'+'/www.domain.com"', + alphaText : 'مقدار این فیلد باید فقط از حروف الفبا و _ تشکیل شده باشد ', + alphanumText : 'مقدار این فیلد باید فقط از حروف الفبا، اعداد و _ تشکیل شده باشد' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'لطفا آدرس لینک را وارد کنید:', + buttonTips : { + bold : { + title: 'تیره (Ctrl+B)', + text: 'متن انتخاب شده را تیره می کند.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'ایتالیک (Ctrl+I)', + text: 'متن انتخاب شده را ایتالیک می کند.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'زیرخط (Ctrl+U)', + text: 'زیر هر نوشته یک خط نمایش می دهد.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'افزایش اندازه', + text: 'اندازه فونت را افزایش می دهد.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'کاهش اندازه', + text: 'اندازه متن را کاهش می دهد.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'رنگ زمینه متن', + text: 'برای تغییر رنگ زمینه متن استفاده می شود.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'رنگ قلم', + text: 'رنگ قلم متن را تغییر می دهد.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'چیدن متن از سمت چپ', + text: 'متن از سمت چپ چیده شده می شود.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'متن در وسط ', + text: 'نمایش متن در قسمت وسط صفحه و رعابت سمت چپ و راست.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'چیدن متن از سمت راست', + text: 'متن از سمت راست پیده خواهد شد.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'لیست همراه با علامت', + text: 'یک لیست جدید ایجاد می کند.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'لیست عددی', + text: 'یک لیست عددی ایجاد می کند. ', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'لینک', + text: 'متن انتخاب شده را به لینک تبدیل کنید.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'ویرایش سورس', + text: 'رفتن به حالت ویرایش سورس.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "مرتب سازی افزایشی", + sortDescText : "مرتب سازی کاهشی", + lockText : "قفل ستون ها", + unlockText : "بازکردن ستون ها", + columnsText : "ستون ها" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "نام", + valueText : "مقدار", + dateFormat : "Y/m/d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "درگ برای تغییر اندازه.", + collapsibleSplitTip : "برای تغییر اندازه درگ کنید." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fr.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,252 @@ +/* + * France (France) translation + * By Perrich + * 06-08-2007, 09:07 PM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        En cours de chargement...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} ligne(s) sélectionné(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fermer cet onglet"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "En cours de chargement..."; +} + +Date.monthNames = [ + "Janvier", + "Février", + "Mars", + "Avril", + "Mai", + "Juin", + "Juillet", + "Août", + "Septembre", + "Octobre", + "Novembre", + "Décembre" +]; + +Date.dayNames = [ + "Dimanche", + "Lundi", + "Mardi", + "Mercredi", + "Jeudi", + "Vendredi", + "Samedi" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annuler", + yes : "Oui", + no : "Non" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Aujourd'hui", + minText : "Cette date est plus petite que la date minimum", + maxText : "Cette date est plus grande que la date maximum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Prochain mois (CTRL+Fléche droite)', + prevText : "Mois précédent (CTRL+Fléche gauche)", + monthYearText : "Choisissez un mois (CTRL+Fléche haut ou bas pour changer d\'année.)", + todayTip : "{0} (Barre d'espace)", + okText : " OK ", + cancelText : "Annuler", + format : "d/m/y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "sur {0}", + firstText : "Première page", + prevText : "Page précédente", + nextText : "Page suivante", + lastText : "Dernière page", + refreshText : "Actualiser la page", + displayMsg : "Page courante {0} - {1} sur {2}", + emptyMsg : 'Aucune donnée à afficher' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "La longueur minimum de ce champ est de {0} caractères", + maxLengthText : "La longueur maximum de ce champ est de {0} caractères", + blankText : "Ce champ est obligatoire", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "La valeur minimum de ce champ doit être de {0}", + maxText : "La valeur maximum de ce champ doit être de {0}", + nanText : "{0} n'est pas un nombre valide" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Désactivé", + disabledDatesText : "Désactivé", + minText : "La date de ce champ doit être avant le {0}", + maxText : "La date de ce champ doit être après le {0}", + invalidText : "{0} n'est pas une date valide - elle doit être au format suivant: {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "En cours de chargement...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ce champ doit contenir une adresse email au format: "usager@domaine.com"', + urlText : 'Ce champ doit contenir une URL au format suivant: "http:/'+'/www.domaine.com"', + alphaText : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', + alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : "Veuillez entrer l'URL pour ce lien:", + buttonTips : { + bold : { + title: 'Gras (Ctrl+B)', + text: 'Met le texte sélectionné en gras.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italique (Ctrl+I)', + text: 'Met le texte sélectionné en italique.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Souligné (Ctrl+U)', + text: 'Souligne le texte sélectionné.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Agrandir la police', + text: 'Augmente la taille de la police.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Réduire la police', + text: 'Réduit la taille de la police.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Couleur de surbrillance', + text: 'Modifie la couleur de fond du texte sélectionné.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Couleur de police', + text: 'Modifie la couleur du texte sélectionné.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Aligner à gauche', + text: 'Aligne le texte à gauche.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centrer', + text: 'Centre le texte.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Aligner à droite', + text: 'Aligner le texte à droite.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Liste à puce', + text: 'Démarre une liste à puce.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Liste numérotée', + text: 'Démarre une liste numérotée.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Lien hypertexte', + text: 'Transforme en lien hypertexte.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Code source', + text: 'Basculer en mode édition du code source.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Tri croissant", + sortDescText : "Tri décroissant", + lockText : "Verrouiller la colonne", + unlockText : "Déverrouiller la colonne", + columnsText : "Colonnes" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Propriété", + valueText : "Valeur", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Cliquer et glisser pour redimensionner le panneau.", + collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour le cacher." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fr_CA.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fr_CA.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-fr_CA.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,170 @@ +/* + * France (Canadian) translation + * By BernardChhun + * 04-08-2007, 03:07 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        En cours de chargement...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} ligne(s) sélectionné(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fermer cette onglet"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "En cours de chargement..."; +} + +Date.monthNames = [ + "Janvier", + "Février", + "Mars", + "Avril", + "Mai", + "Juin", + "Juillet", + "Août", + "Septembre", + "Octobre", + "Novembre", + "Décembre" +]; + +Date.dayNames = [ + "Dimanche", + "Lundi", + "Mardi", + "Mercredi", + "Jeudi", + "Vendredi", + "Samedi" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annuler", + yes : "Oui", + no : "Non" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Aujourd'hui", + minText : "Cette date est plus petite que la date minimum", + maxText : "Cette date est plus grande que la date maximum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Prochain mois (CTRL+Fléche droite)', + prevText : 'Mois précédent (CTRL+Fléche gauche)', + monthYearText : 'Choissisez un mois (CTRL+Fléche haut ou bas pour changer d\'année.)', + todayTip : "{0} (Barre d'espace)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Page", + afterPageText : "de {0}", + firstText : "Première page", + prevText : "Page précédente", + nextText : "Prochaine page", + lastText : "Dernière page", + refreshText : "Recharger la page", + displayMsg : "Page courante {0} - {1} de {2}", + emptyMsg : 'Aucune donnée à afficher' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "La longueur minimum de ce champ est de {0} caractères", + maxLengthText : "La longueur maximum de ce champ est de {0} caractères", + blankText : "Ce champ est obligatoire", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "La valeur minimum de ce champ doit être de {0}", + maxText : "La valeur maximum de ce champ doit être de {0}", + nanText : "{0} n'est pas un nombre valide" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Désactivé", + disabledDatesText : "Désactivé", + minText : "La date de ce champ doit être avant le {0}", + maxText : "La date de ce champ doit être après le {0}", + invalidText : "{0} n'est pas une date valide - il doit être au format suivant: {1}", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "En cours de chargement...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ce champ doit contenir un courriel et doit être sous ce format: "usager@domaine.com"', + urlText : 'Ce champ doit contenir une URL sous le format suivant: "http:/'+'/www.domaine.com"', + alphaText : 'Ce champ ne peut contenir que des lettres et le caractère souligné (_)', + alphanumText : 'Ce champ ne peut contenir que des caractères alphanumériques ainsi que le caractère souligné (_)' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Tri ascendant", + sortDescText : "Tri descendant", + lockText : "Verrouillé la colonne", + unlockText : "Déverrouillé la colonne", + columnsText : "Colonnes" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Propriété", + valueText : "Valeur", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Cliquer et glisser pour redimensionner le panneau.", + collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour cacher le panneau." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-gr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-gr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-gr.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,169 @@ +/** + * Greek Translations by Vagelis + * 03-June-2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Öüñôùóç...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} åðéëåãìÝíç(åò) ãñáììÞ(Ýò)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Êëåßóôå áõôÞ ôçí êáñôÝëá"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Ç ôéìÞ óôï ðåäßï äåí åßíáé Ýãêõñç"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Öüñôùóç..."; +} + +Date.monthNames = [ + "ÉáíïõÜñéïò", + "ÖåâñïõÜñéïò", + "ÌÜñôéïò", + "Áðñßëéïò", + "ÌÜéïò", + "Éïýíéïò", + "Éïýëéïò", + "Áýãïõóôïò", + "ÓåðôÝìâñéïò", + "Ïêôþâñéïò", + "ÍïÝìâñéïò", + "ÄåêÝìâñéïò" +]; + +Date.dayNames = [ + "ÊõñéáêÞ", + "ÄåõôÝñá", + "Ôñßôç", + "ÔåôÜñôç", + "ÐÝìðôç", + "ÐáñáóêåõÞ", + "ÓÜââáôï" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "ÅíôÜîåé", + cancel : "Áêýñùóç", + yes : "Íáé", + no : "¼÷é" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "ì/ç/Å"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "ÓÞìåñá", + minText : "Ç çìåñïìçíßá áõôÞ åßíáé ðñéí ôçí ìéêñüôåñç çìåñïìçíßá", + maxText : "Ç çìåñïìçíßá áõôÞ åßíáé ìåôÜ ôçí ìåãáëýôåñç çìåñïìçíßá", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Åðüìåíïò ÌÞíáò (Control+Right)', + prevText : 'Ðñïçãïýìåíïò ÌÞíáò (Control+Left)', + monthYearText : 'ÅðéëÝîôå ÌÞíá (Control+Up/Down ãéá ìåôáêßíçóç óôá Ýôç)', + todayTip : "{0} (Spacebar)", + format : "ì/ç/Å" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Óåëßäá", + afterPageText : "áðü {0}", + firstText : "Ðñþôç óåëßäá", + prevText : "Ðñïçãïýìåíç óåëßäá", + nextText : "Åðüìåíç óåëßäá", + lastText : "Ôåëåõôáßá óåëßäá", + refreshText : "ÁíáíÝùóç", + displayMsg : "ÅìöÜíéóç {0} - {1} áðü {2}", + emptyMsg : 'Äåí âñÝèçêáí åããñáöÝò ãéá åìöÜíéóç' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Ôï åëÜ÷éóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", + maxLengthText : "Ôï ìÝãéóôï ìÝãåèïò ãéá áõôü ôï ðåäßï åßíáé {0}", + blankText : "Ôï ðåäßï áõôü åßíáé õðï÷ñåùôïêü", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Ç åëÜ÷éóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", + maxText : "Ç ìÝãéóôç ôéìÞ ãéá áõôü ôï ðåäßï åßíáé {0}", + nanText : "{0} äåí åßíáé Ýãêõñïò áñéèìüò" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "ÁðåíåñãïðïéçìÝíï", + disabledDatesText : "ÁðåíåñãïðïéçìÝíï", + minText : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìåôÜ áðü {0}", + maxText : "Ç çìåñïìçíßá ó' áõôü ôï ðåäßï ðñÝðåé íá åßíáé ðñéí áðü {0}", + invalidText : "{0} äåí åßíáé Ýãêõñç çìåñïìçíßá - ðñÝðåé íá åßíáé ôçò ìïñöÞò {1}", + format : "ì/ç/Å" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Öüñôùóç...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé e-mail address ôçò ìïñöÞò "user@domain.com"', + urlText : 'Áõôü ôï ðåäßï ðñÝðåé íá åßíáé ìéá äéåýèõíóç URL ôçò ìïñöÞò "http:/'+'/www.domain.com"', + alphaText : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá êáé _', + alphanumText : 'Áõôü ôï ðåäßï ðñÝðåé íá ðåñéÝ÷åé ãñÜììáôá, áñéèìïýò êáé _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Áýîïõóá Ôáîéíüìçóç", + sortDescText : "Öèßíïõóá Ôáîéíüìçóç", + lockText : "Êëåßäùìá óôÞëçò", + unlockText : "Îåêëåßäùìá óôÞëçò", + columnsText : "ÓôÞëåò" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "¼íïìá", + valueText : "ÔéìÞ", + dateFormat : "ì/ç/Å" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò.", + collapsibleSplitTip : "Óýñåôå ãéá áëëáãÞ ìåãÝèïõò. Double click ãéá áðüêñõøç." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-hr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-hr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-hr.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,171 @@ +/* + * Croatian translation + * By Ylodi (utf8 encoding) + * 8 May 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Učitavanje...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} odabranih redova"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zatvori ovaj tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Unesena vrijednost u ovom polju je neispravna"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Učitavanje..."; +} + +Date.monthNames = [ + "Siječanj", + "Veljača", + "Ožujak", + "Travanj", + "Svibanj", + "Lipanj", + "Srpanj", + "Kolovoz", + "Rujan", + "Listopad", + "Studeni", + "Prosinac" +]; + +Date.dayNames = [ + "Nedjelja", + "Ponedjeljak", + "Utorak", + "Srijeda", + "Četvrtak", + "Petak", + "Subota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "U redu", + cancel : "Odustani", + yes : "Da", + no : "Ne" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Danas", + minText : "Taj datum je prije najmanjeg datuma", + maxText : "Taj datum je poslije najvećeg datuma", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Slijedeći mjesec (Control+Desno)', + prevText : 'Prethodni mjesec (Control+Lijevo)', + monthYearText : 'Odaberite mjesec (Control+Gore/Dolje za promjenu godine)', + todayTip : "{0} (Razmaknica)", + format : "d.m.y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Stranica", + afterPageText : "od {0}", + firstText : "Prva stranica", + prevText : "Prethodna stranica", + nextText : "Slijedeća stranica", + lastText : "Posljednja stranica", + refreshText : "Obnovi", + displayMsg : "Prikazujem {0} - {1} od {2}", + emptyMsg : 'Nema podataka za prikaz' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimalna dužina za ovo polje je {0}", + maxLengthText : "Maksimalna dužina za ovo polje je {0}", + blankText : "Ovo polje je obavezno", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimalna vrijednost za ovo polje je {0}", + maxText : "Maksimalna vrijednost za ovo polje je {0}", + nanText : "{0} nije ispravan broj" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Neaktivno", + disabledDatesText : "Neaktivno", + minText : "Datum u ovom polje mora biti poslije {0}", + maxText : "Datum u ovom polju mora biti prije {0}", + invalidText : "{0} nije ispravan datum - mora biti u obliku {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Učitavanje...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ovdje možete unijeti samo e-mail adresu u obliku "korisnik@domena.com"', + urlText : 'Ovdje možete unijeti samo URL u obliku "http:/'+'/www.domena.com"', + alphaText : 'Ovo polje može sadržavati samo slova i znak _', + alphanumText : 'Ovo polje može sadržavati samo slova, brojeve i znak _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortiraj rastućim redoslijedom", + sortDescText : "Sortiraj padajućim redoslijedom", + lockText : "Zaključaj stupac", + unlockText : "Otključaj stupac", + columnsText : "Stupci" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Naziv", + valueText : "Vrijednost", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Povuci za promjenu veličine.", + collapsibleSplitTip : "Povuci za promjenu veličine. Dvostruki klik za skrivanje." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-hu.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-hu.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-hu.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,176 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + +/* + * Hungarian translation + * By amon (utf-8 encoded) + * 14 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Betöltés...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} kiválasztott sor"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fül bezárása"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "A mező tartalma érvénytelen"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Betöltés..."; +} + +Date.monthNames = [ + "Január", + "Február", + "Március", + "Április", + "Május", + "Június", + "Július", + "Augusztus", + "Szeptember", + "Október", + "November", + "December" +]; + +Date.dayNames = [ + "Vasárnap", + "Hétfő", + "Kedd", + "Szerda", + "Csütörtök", + "Péntek", + "Szombat" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Mégsem", + yes : "Igen", + no : "Nem" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "y.m.d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Ma", + minText : "Ez a dátum korábbi a megengedettnél", + maxText : "Ez a dátum későbbi a megengedettnél", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Következő hónap (Control+Jobbra)', + prevText : 'Előző hónap (Control+Balra)', + monthYearText : 'Hónaőválasztás (Control+Fel/Le: év választás)', + todayTip : "{0} (Szóköz)", + format : "y.m.d", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Oldal", + afterPageText : "a {0}-ból/ből", + firstText : "Első oldal", + prevText : "Előző oldal", + nextText : "Következő", + lastText : "Utolsó oldal", + refreshText : "Frissít", + displayMsg : "{0} - {1} a {2}-ból/ből", + emptyMsg : 'Nincs megjeleníthető adat' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "A mező hossza minimum {0}", + maxLengthText : "A mező hossza maximum {0}", + blankText : "Kötelező mező", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "A mező minimum értéke {0} lehet", + maxText : "A mező maximum értéke {0} lehet", + nanText : "{0} nem értelmezhető számként" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Letiltva", + disabledDatesText : "Letiltva", + minText : "A dátum későbbi kell legyen {0}-nál/nél", + maxText : "A dátum korábbi kell legyen {0}-nál/nél", + invalidText : "{0} nem valódi dátum - a mező formátuma: {1}", + format : "y.m.d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Betöltés...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'A mező tartalma e-mail cím lehet, formátum: "user@domain.com"', + urlText : 'A mező tartalma webcím lehet, formátum: "http:/'+'/www.domain.com"', + alphaText : 'A mező csak betűket (a-z) és aláhúzás (_) karaktert tartalmazhat.', + alphanumText : 'A mező csak betűket (a-z), számokat (0-9) és aláhúzás (_) karaktert tartalmazhat' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Növekvő rendezés", + sortDescText : "Csökkenő rendezés", + lockText : "Oszlop lezárás", + unlockText : "Oszlop felengedés", + columnsText : "Oszlopok" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Név", + valueText : "Érték", + dateFormat : "Y m j" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Húzás: átméretezés", + collapsibleSplitTip : "Húzás: átméretezés, duplaklikk: eltüntetés." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-it.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-it.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-it.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,173 @@ +/* + * Italian translation + * By eric_void + * 04-10-2007, 11:25 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Caricamento in corso...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} righe selezionate"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Chiudi pannello"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Valore del campo non valido"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Caricamento in corso..."; +} + +Date.monthNames = [ + "Gennaio", + "Febbraio", + "Marzo", + "Aprile", + "Maggio", + "Giugno", + "Luglio", + "Agosto", + "Settembre", + "Ottobre", + "Novembre", + "Dicembre" +]; + +Date.dayNames = [ + "Domenica", + "Lunedi", + "Martedi", + "Mercoledi", + "Giovedi", + "Venerdi", + "Sabato" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annulla", + yes : "Si", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Oggi", + minText : "Data precedente alla data minima", + maxText : "Data successiva alla data massima", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Mese successivo (Ctrl+Destra)', + prevText : 'Mese precedente (Ctrl+Sinistra)', + monthYearText : 'Scegli un mese (Ctrl+Su/Giu per cambiare anno)', + todayTip : "{0} (Barra spaziatrice)", + format : "d/m/y", + cancelText : "Annulla" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Pagina", + afterPageText : "di {0}", + firstText : "Prima pagina", + prevText : "Pagina precedente", + nextText : "Pagina successiva", + lastText : "Ultima pagina", + refreshText : "Aggiorna", + displayMsg : "Vista {0} - {1} di {2}", + emptyMsg : 'Nessun dato da mostrare' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "La lunghezza minima del campo risulta {0}", + maxLengthText : "La lunghezza massima del campo risulta {0}", + blankText : "Campo obbligatorio", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Il valore minimo del campo risulta {0}", + maxText : "Il valore massimo del campo risulta {0}", + nanText : "{0} non ` un numero corretto" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Disabilitato", + disabledDatesText : "Disabilitato", + minText : "La data del campo deve essere successiva a {0}", + maxText : "La data del campo deve essere precedente a {0}", + invalidText : "{0} non ` una data valida. Deve essere nel formato {1}", + format : "d/m/y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Caricamento in corso...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Il campo deve essere un indirizzo e-mail nel formato "user@domain.com"', + urlText : 'Il campo deve essere un indirizzo web nel formato "http:/'+'/www.domain.com"', + alphaText : 'Il campo deve contenere solo lettere e _', + alphanumText : 'Il campo deve contenere solo lettere, numeri e _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Ordinamento crescente", + sortDescText : "Ordinamento decrescente", + lockText : "Blocca colonna", + unlockText : "Sblocca colonna", + columnsText : "Colonne" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nome", + valueText : "Valore", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Trascina per cambiare dimensioni.", + collapsibleSplitTip : "Trascina per cambiare dimensioni. Doppio click per nascondere." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ja.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ja.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ja.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,156 @@ +/* + * Japanese translation + * By tyama + * 04-08-2007, 05:49 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        読み込み中...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} 行選択"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "このタブを閉じる"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "フィールドの値が不正です。"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "読み込み中..."; +} + +Date.monthNames = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月','11月','12月']; + +Date.dayNames = [ + "日", + "月", + "火", + "水", + "木", + "金", + "土"]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "キャンセル", + yes : "はい", + no : "いいえ" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y/m/d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "今日", + minText : "選択した日付は最小値以下です。", + maxText : "選択した日付は最大値以上です。", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : '次月へ (コントロール+右)', + prevText : '前月へ (コントロール+左)', + monthYearText : '月選択 (コントロール+上/下で年移動)', + todayTip : "{0} (スペースキー)", + format : "Y/m/d" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "ページ", + afterPageText : "/ {0}", + firstText : "最初のページ", + prevText : "前のページ", + nextText : "次のページ", + lastText : "最後のページ", + refreshText : "更新", + displayMsg : "{2} 件中 {0} - {1} を表示", + emptyMsg : '表示するデータがありません。' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "このフィールドの最小値は {0} です。", + maxLengthText : "このフィールドの最大値は {0} です。", + blankText : "必須項目です。", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "このフィールドの最小値は {0} です。", + maxText : "このフィールドの最大値は {0} です。", + nanText : "{0} は数値ではありません。" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "無効", + disabledDatesText : "無効", + minText : "このフィールドの日付は、 {0} 以降の日付に設定してください。", + maxText : "このフィールドの日付は、 {0} 以前の日付に設定してください。", + invalidText : "{0} は間違った日付入力です。 - 入力形式は「{1}」です。", + format : "Y/m/d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "読み込み中...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'メールアドレスを"user@domain.com"の形式で入力してください。', + urlText : 'URLを"http:/'+'/www.domain.com"の形式で入力してください。', + alphaText : '半角英字と"_"のみです。', + alphanumText : '半角英数と"_"のみです。' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "昇順", + sortDescText : "降順", + lockText : "カラムロック", + unlockText : "カラムロック解除", + columnsText : "Columns" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "名称", + valueText : "値", + dateFormat : "Y/m/d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "ドラッグするとリサイズできます。", + collapsibleSplitTip : "ドラッグでリサイズ。 ダブルクリックで隠す。" + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ko.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ko.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ko.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,252 @@ +/** + * Korean Translations + * By nicetip + * 05 September 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        로딩...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} 개가 선택되었습니다."; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "닫기"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "올바른 값이 아닙니다."; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "로딩..."; +} + +Date.monthNames = [ + "1월", + "2월", + "3월", + "4월", + "5월", + "6월", + "7월", + "8월", + "9월", + "10월", + "11월", + "12월" +]; + +Date.dayNames = [ + "일", + "월", + "화", + "수", + "목", + "금", + "토" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "확인", + cancel : "취소", + yes : "예", + no : "아니오" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m/d/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "오늘", + minText : "최소 날짜범위를 넘었습니다.", + maxText : "최대 날짜범위를 넘었습니다.", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : '다음달(컨트롤키+오른쪽 화살표)', + prevText : '이전달 (컨트롤키+왼족 화살표)', + monthYearText : '월을 선택해주세요. (컨트롤키+위/아래 화살표)', + todayTip : "{0} (스페이스바)", + format : "m/d/y", + okText : "확인", + cancelText : "취소", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "페이지", + afterPageText : "/ {0}", + firstText : "첫 페이지", + prevText : "이전 페이지", + nextText : "다음 페이지", + lastText : "마지막 페이지", + refreshText : "새로고침", + displayMsg : "전체 {2} 중 {0} - {1}", + emptyMsg : '표시할 데이터가 없습니다.' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "최소길이는 {0}입니다.", + maxLengthText : "최대길이는 {0}입니다.", + blankText : "값을 입력해주세요.", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "최소값은 {0}입니다.", + maxText : "최대값은 {0}입니다.", + nanText : "{0}는 올바른 숫자가 아닙니다." + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "비활성", + disabledDatesText : "비활성", + minText : "{0}일 이후여야 합니다.", + maxText : "{0}일 이전이어야 합니다.", + invalidText : "{0}는 올바른 날짜형식이 아닙니다. - 다음과 같은 형식이어야 합니다. {1}", + format : "m/d/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "로딩...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : '이메일 주소 형식에 맞게 입력해야합니다. (예: "user@domain.com")', + urlText : 'URL 형식에 맞게 입력해야합니다. (예: "http:/'+'/www.domain.com")', + alphaText : '영문, 밑줄(_)만 입력할 수 있습니다.', + alphanumText : '영문, 숫자, 밑줄(_)만 입력할 수 있습니다.' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'URL을 입력해주세요:', + buttonTips : { + bold : { + title: '굵게 (Ctrl+B)', + text: '선택한 텍스트를 굵게 표시합니다.', + cls: 'x-html-editor-tip' + }, + italic : { + title: '기울임꼴 (Ctrl+I)', + text: '선택한 텍스트를 기울임꼴로 표시합니다.', + cls: 'x-html-editor-tip' + }, + underline : { + title: '밑줄 (Ctrl+U)', + text: '선택한 텍스트에 밑줄을 표시합니다.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: '글꼴크기 늘림', + text: '글꼴 크기를 크게 합니다.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: '글꼴크기 줄임', + text: '글꼴 크기를 작게 합니다.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: '텍스트 강조 색', + text: '선택한 텍스트의 배경색을 변경합니다.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: '글꼴색', + text: '선택한 텍스트의 색을 변경합니다.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: '텍스트 왼쪽 맞춤', + text: '왼쪽에 텍스트를 맞춥니다.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: '가운데 맞춤', + text: '가운데에 텍스트를 맞춥니다.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: '텍스트 오른쪽 맞춤', + text: '오른쪽에 텍스트를 맞춥니다.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: '글머리 기호', + text: '글머리 기호 목록을 시작합니다.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: '번호 매기기', + text: '번호 매기기 목록을 시작합니다.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: '하이퍼링크', + text: '선택한 텍스트에 하이퍼링크를 만듭니다.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: '소스편집', + text: '소스편집 모드로 변환합니다.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "오름차순 정렬", + sortDescText : "내림차순 정렬", + lockText : "칼럼 잠금", + unlockText : "칼럼 잠금해제", + columnsText : "칼럼 목록" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "항목", + valueText : "값", + dateFormat : "m/j/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "크기변경을 위해 드래그하세요.", + collapsibleSplitTip : "크기변경을 위해 드래그, 숨기기 위해 더블클릭 하세요." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-lv.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-lv.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-lv.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,170 @@ +/** + * Latvian Translations + * By salix 17 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Notiek ielāde...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} iezīmētu rindu"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Aizver šo zīmni"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Vērtība šajā laukā nav pareiza"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Ielādē..."; +} + +Date.monthNames = [ + "Janvāris", + "Februāris", + "Marts", + "Aprīlis", + "Maijs", + "Jūnijs", + "Jūlijs", + "Augusts", + "Septembris", + "Oktobris", + "Novembris", + "Decembris" +]; + +Date.dayNames = [ + "Svētdiena", + "Pirmdiena", + "Otrdiena", + "Trešdiena", + "Ceturtdiena", + "Piektdiena", + "Sestdiena" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Labi", + cancel : "Atcelt", + yes : "Jā", + no : "Nē" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Šodiena", + minText : "Norādītais datums ir mazāks par minimālo datumu", + maxText : "Norādītais datums ir lielāks par maksimālo datumu", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Nākamais mēnesis (Control+pa labi)', + prevText : 'Iepriekšējais mēnesis (Control+pa kreisi)', + monthYearText : 'Mēneša izvēle (Control+uz augšu/uz leju lai pārslēgtu gadus)', + todayTip : "{0} (Tukšumzīme)", + format : "d.m.Y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Lapa", + afterPageText : "no {0}", + firstText : "Pirmā lapa", + prevText : "iepriekšējā lapa", + nextText : "Nākamā lapa", + lastText : "Pēdējā lapa", + refreshText : "Atsvaidzināt", + displayMsg : "Rāda no {0} līdz {1} ierakstiem, kopā {2}", + emptyMsg : 'Nav datu, ko parādīt' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimālais garums šim laukam ir {0}", + maxLengthText : "Maksimālais garums šim laukam ir {0}", + blankText : "Šis ir obligāts lauks", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimālais garums šim laukam ir {0}", + maxText : "Maksimālais garums šim laukam ir {0}", + nanText : "{0} nav pareizs skaitlis" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Atspējots", + disabledDatesText : "Atspējots", + minText : "Datumam šajā laukā jābūt lielākam kā {0}", + maxText : "Datumam šajā laukā jābūt mazākam kā {0}", + invalidText : "{0} nav pareizs datums - tam jābūt šādā formātā: {1}", + format : "d.m.Y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Ielādē...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Šajā laukā jāieraksta e-pasta adrese formātā "lietotās@domēns.lv"', + urlText : 'Šajā laukā jāieraksta URL formātā "http:/'+'/www.domēns.lv"', + alphaText : 'Šis lauks drīkst saturēt tikai burtus un _ zīmi', + alphanumText : 'Šis lauks drīkst saturēt tikai burtus, ciparus un _ zīmi' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Kārtot pieaugošā secībā", + sortDescText : "Kārtot dilstošā secībā", + lockText : "Noslēgt kolonnu", + unlockText : "Atslēgt kolonnu", + columnsText : "Kolonnas" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nosaukums", + valueText : "Vērtība", + dateFormat : "j.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Velc, lai mainītu izmēru.", + collapsibleSplitTip : "Velc, lai mainītu izmēru. Dubultklikšķis noslēpj apgabalu." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-mk.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-mk.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-mk.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,170 @@ +/* + * Macedonia translation + * By PetarD petar.dimitrijevic@vorteksed.com.mk (utf8 encoding) + * 23 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Вчитувам...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} избрани редици"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Затвори tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Вредноста во ова поле е невалидна"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Вчитувам..."; +} + +Date.monthNames = [ + "Јануари", + "Февруари", + "Март", + "Април", + "Мај", + "Јуни", + "Јули", + "Август", + "Септември", + "Октомври", + "Ноември", + "Декември" +]; + +Date.dayNames = [ + "Недела", + "Понеделник", + "Вторник", + "Среда", + "Четврток", + "Петок", + "Сабота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Потврди", + cancel : "Поништи", + yes : "Да", + no : "Не" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Денеска", + minText : "Овој датум е пред најмалиот датум", + maxText : "Овој датум е пред најголемиот датум", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Следен месец (Control+Стрелка десно)', + prevText : 'Претходен месец (Control+Стрелка лево)', + monthYearText : 'Изберете месец (Control+Стрелка горе/Стрелка десно за менување година)', + todayTip : "{0} (Spacebar)", + format : "d.m.y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Страница", + afterPageText : "од {0}", + firstText : "Прва Страница", + prevText : "Претходна Страница", + nextText : "Следна Страница", + lastText : "Последна Страница", + refreshText : "Освежи", + displayMsg : "Прикажувам {0} - {1} од {2}", + emptyMsg : 'Нема податоци за приказ' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Минималната должина за ова поле е {0}", + maxLengthText : "Максималната должина за ова поле е {0}", + blankText : "Податоците во ова поле се потребни", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Минималната вредност за ова поле е {0}", + maxText : "Максималната вредност за ова поле е {0}", + nanText : "{0} не е валиден број" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Неактивно", + disabledDatesText : "Неактивно", + minText : "Датумот во ова поле мора да биде пред {0}", + maxText : "Датумот во ова поле мора да биде по {0}", + invalidText : "{0} не е валиден датум - мора да биде во формат {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Вчитувам...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ова поле треба да биде e-mail адреса во формат "user@domain.com"', + urlText : 'Ова поле треба да биде URL во формат "http:/'+'/www.domain.com"', + alphaText : 'Ова поле треба да содржи само букви и _', + alphanumText : 'Ова поле треба да содржи само букви, бројки и _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Сортирај Растечки", + sortDescText : "Сортирај Опаѓачки", + lockText : "Заклучи Колона", + unlockText : "Отклучи колона", + columnsText : "Колони" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Име", + valueText : "Вредност", + dateFormat : "m.d.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Повлечете за менување на големината.", + collapsibleSplitTip : "Повлечете за менување на големината. Дупли клик за криење." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-nl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-nl.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-nl.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,292 @@ +/* + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + * + * Dutch Translations + * by Ido Sebastiaan Bas van Oostveen (12 Oct 2007) + */ + +/* Ext Core translations */ +Ext.UpdateManager.defaults.indicatorText = '
        Bezig met laden...
        '; + +/* Ext single string translations */ +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} geselecteerde rij(en)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Sluit dit tabblad"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "De waarde in dit veld is onjuist"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Bezig met laden..."; +} + +/* Javascript month and days translations */ +Date.monthNames = [ + "Januari", + "Februari", + "Maart", + "April", + "Mei", + "Juni", + "Juli", + "Augustus", + "September", + "Oktober", + "November", + "December" +]; + +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +}; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Maa : 2, + Apr : 3, + Mei : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Okt : 9, + Nov : 10, + Dec : 11 +}; + +Date.getMonthNumber = function(name) { + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +}; + +Date.dayNames = [ + "Zondag", + "Maandag", + "Dinsdag", + "Woensdag", + "Donderdag", + "Vrijdag", + "Zaterdag" +]; + +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +}; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Annuleren", + yes : "Ja", + no : "Nee" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d-m-y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Vandaag", + minText : "Deze datum is eerder dan de minimum datum", + maxText : "Deze datum is later dan de maximum datum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Volgende Maand (Control+Rechts)', + prevText : 'Vorige Maand (Control+Links)', + monthYearText : 'Kies een maand (Control+Omhoog/Beneden volgend/vorige jaar)', + todayTip : "{0} (Spatie)", + format : "d-m-y", + okText : " OK ", + cancelText : "Annuleren", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Pagina", + afterPageText : "van {0}", + firstText : "Eerste Pagina", + prevText : "Vorige Pagina", + nextText : "Volgende Pagina", + lastText : "Laatste Pagina", + refreshText : "Ververs", + displayMsg : "Getoond {0} - {1} van {2}", + emptyMsg : 'Geen gegeven om weer te geven' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "De minimale lengte voor dit veld is {0}", + maxLengthText : "De maximale lengte voor dit veld is {0}", + blankText : "Dit veld is verplicht", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "De minimale waarde voor dit veld is {0}", + maxText : "De maximale waarde voor dit veld is {0}", + nanText : "{0} is geen geldig getal" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Uitgeschakeld", + disabledDatesText : "Uitgeschakeld", + minText : "De datum in dit veld moet na {0} liggen", + maxText : "De datum in dit veld moet voor {0} liggen", + invalidText : "{0} is geen geldige datum - formaat voor datum is {1}", + format : "d-m-y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Bezig met laden...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dit veld moet een e-mail adres zijn in het formaat "gebruiker@domein.nl"', + urlText : 'Dit veld moet een URL zijn in het formaat "http:/'+'/www.domein.nl"', + alphaText : 'Dit veld mag alleen letters en _ bevatten', + alphanumText : 'Dit veld mag alleen letters, cijfers en _ bevatten' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Vul hier het Internet adres voor de link in:', + buttonTips : { + bold : { + title: 'Vet (Ctrl+B)', + text: 'Maak de geselecteerde tekst vet gedrukt.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Cursief (Ctrl+I)', + text: 'Maak de geselecteerde tekst cursief.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Onderstrepen (Ctrl+U)', + text: 'Onderstreep de geselecteerde tekst.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Tekst Vergroten', + text: 'Vergroot het lettertype.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Tekst Verkleinen', + text: 'Verklein het lettertype.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Tekst Achtergrond Kleur', + text: 'Verander de achtergrond kleur van de geselecteerde tekst.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Lettertype Kleur', + text: 'Verander de kleur van de geselecteerde tekst.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Tekst Links Uitlijnen', + text: 'Lijn de tekst links uit.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Tekst Centreren', + text: 'Centreer de tekst in de editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Tekst Richts Uitlijnen', + text: 'Lijn de tekst rechts uit.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Punten Lijst', + text: 'Begin een ongenummerde lijst.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Genummerde Lijst', + text: 'Begin een genummerde lijst.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Maak van de geselecteerde tekst een hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Bron Aanpassen', + text: 'Schakel modus over naar bron aanpassen.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sorteer Oplopend", + sortDescText : "Sorteer Aflopend", + lockText : "Kolom Vastzetten", + unlockText : "Kolom Vrijgeven", + columnsText : "Kolommen" + }); +} + +if(Ext.grid.GroupingView){ + Ext.apply(Ext.grid.GroupingView.prototype, { + emptyGroupText : '(Geen)', + groupByText : 'Dit veld groeperen', + showGroupsText : 'Zien als groepen' + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Naam", + valueText : "Waarde", + dateFormat : "Y-m-j" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Sleep om grootte aan te passen.", + collapsibleSplitTip : "Sleep om grootte aan te passen. Dubbel klikken om te verbergen." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-no.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-no.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-no.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,165 @@ +/* + * Norwegian translation + * By grEvenX 16-April-2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Laster...
        '; + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} markerte rader"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Lukk denne fanen"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Verdien i dette felter er ugyldig"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Laster..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "Mars", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Desember" +]; + +Date.dayNames = [ + "Søndag", + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Avbryt", + yes : "Ja", + no : "Nei" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "I dag", + minText : "Denne datoen er tidligere enn den tidligste tillatte", + maxText : "Denne datoen er senere enn den seneste tillatte", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Neste måned (Control+Pil Høyre)', + prevText : 'Forrige måned (Control+Pil Venstre)', + monthYearText : 'Velg en måned (Control+Pil Opp/Ned for å skifte år)', + todayTip : "{0} (mellomrom)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Side", + afterPageText : "av {0}", + firstText : "Første side", + prevText : "Forrige side", + nextText : "Neste side", + lastText : "Siste side", + refreshText : "Oppdater", + displayMsg : "Viser {0} - {1} of {2}", + emptyMsg : 'Ingen data å vise' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Den minste lengden for dette feltet er {0}", + maxLengthText : "Den største lengden for dette feltet er {0}", + blankText : "Dette feltet er påkrevd", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Den minste verdien for dette feltet er {0}", + maxText : "Den største verdien for dette feltet er {0}", + nanText : "{0} er ikke et gyldig nummer" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Deaktivert", + disabledDatesText : "Deaktivert", + minText : "Datoen i dette feltet må være etter {0}", + maxText : "Datoen i dette feltet må være før {0}", + invalidText : "{0} is not a valid date - it must be in the format {1}", + format : "m/d/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Laster...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Dette feltet skal være en epost adresse i formatet "user@domain.com"', + urlText : 'Dette feltet skal være en link (URL) i formatet "http:/'+'/www.domain.com"', + alphaText : 'Dette feltet skal kun inneholde bokstaver og _', + alphanumText : 'Dette feltet skal kun inneholde bokstaver, tall og _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sorter stigende", + sortDescText : "Sorter synkende", + lockText : "Lås kolonne", + unlockText : "Lås opp kolonne", + columnsText : "Kolonner" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Navn", + valueText : "Verdi", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Dra for å endre størrelse.", + collapsibleSplitTip : "Dra for å endre størrelse, dobbelklikk for å skjule." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pl.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pl.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,171 @@ +/** + * Polish Translations + * By vbert 17-April-2007 + * Encoding: utf-8 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Wczytywanie danych...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} wybrano wiersze(y)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zamknij zakładkę"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Wartość tego pola jest niewłaściwa"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Wczytywanie danych..."; +} + +Date.monthNames = [ + "Styczeń", + "Luty", + "Marzec", + "Kwiecień", + "Maj", + "Czerwiec", + "Lipiec", + "Sierpień", + "Wrzesień", + "Październik", + "Listopad", + "Grudzień" +]; + +Date.dayNames = [ + "Niedziela", + "Poniedziałek", + "Wtorek", + "Środa", + "Czwartek", + "Piątek", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Anuluj", + yes : "Tak", + no : "Nie" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y-m-d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + startDay : 1, + todayText : "Dzisiaj", + minText : "Data jest wcześniejsza od daty minimalnej", + maxText : "Data jest późniejsza od daty maksymalnej", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : "Następny miesiąc (Control+StrzałkaWPrawo)", + prevText : "Poprzedni miesiąc (Control+StrzałkaWLewo)", + monthYearText : "Wybierz miesiąc (Control+Up/Down aby zmienić rok)", + todayTip : "{0} (Spacja)", + format : "Y-m-d" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Strona", + afterPageText : "z {0}", + firstText : "Pierwsza strona", + prevText : "Poprzednia strona", + nextText : "Następna strona", + lastText : "Ostatnia strona", + refreshText : "Odśwież", + displayMsg : "Wyświetlono {0} - {1} z {2}", + emptyMsg : "Brak danych do wyświetlenia" + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimalna ilość znaków dla tego pola to {0}", + maxLengthText : "Maksymalna ilość znaków dla tego pola to {0}", + blankText : "To pole jest wymagane", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimalna wartość dla tego pola to {0}", + maxText : "Maksymalna wartość dla tego pola to {0}", + nanText : "{0} to nie jest właściwa wartość" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Wyłączony", + disabledDatesText : "Wyłączony", + minText : "Data w tym polu musi być późniejsza od {0}", + maxText : "Data w tym polu musi być wcześniejsza od {0}", + invalidText : "{0} to nie jest prawidłowa data - prawidłowy format daty {1}", + format : "Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Wczytuję...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'To pole wymaga podania adresu e-mail w formacie: "nazwa@domena.pl"', + urlText : 'To pole wymaga podania adresu strony www w formacie: "http:/'+'/www.domena.pl"', + alphaText : 'To pole wymaga podania tylko liter i _', + alphanumText : 'To pole wymaga podania tylko liter, cyfr i _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortuj rosnąco", + sortDescText : "Sortuj malejąco", + lockText : "Zablokuj kolumnę", + unlockText : "Odblokuj kolumnę", + columnsText : "Kolumny" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nazwa", + valueText : "Wartość", + dateFormat : "Y-m-d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Przeciągnij aby zmienić rozmiar.", + collapsibleSplitTip : "Przeciągnij aby zmienić rozmiar. Kliknij dwukrotnie aby ukryć." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pt_BR.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pt_BR.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pt_BR.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,252 @@ +/* + * Portuguese/Brazil Translation by Weber Souza + * 08 April 2007 + * Updated by Allan Brazute Alves (EthraZa) + * 06 September 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Carregando...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} linha(s) selecionada(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fechar"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "O valor para este campo é inválido"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Carregando..."; +} + +Date.monthNames = [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" +]; + +Date.dayNames = [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Cancelar", + yes : "Sim", + no : "Não" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Hoje", + minText : "Esta data é anterior a menor data", + maxText : "Esta data é posterior a maior data", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Próximo Mês (Control+Direita)', + prevText : 'Mês Anterior (Control+Esquerda)', + monthYearText : 'Escolha um Mês (Control+Cima/Baixo para mover entre os anos)', + todayTip : "{0} (Espaço)", + format : "d/m/Y", + okText : " OK ", + cancelText : "Cancelar", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Página", + afterPageText : "de {0}", + firstText : "Primeira Página", + prevText : "Página Anterior", + nextText : "Próxima Página", + lastText : "Última Página", + refreshText : "Atualizar", + displayMsg : "{0} à {1} de {2} registro(s)", + emptyMsg : 'Sem registros para exibir' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "O tamanho mínimo para este campo é {0}", + maxLengthText : "O tamanho máximo para este campo é {0}", + blankText : "Este campo é obrigatório.", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "O valor mínimo para este campo é {0}", + maxText : "O valor máximo para este campo é {0}", + nanText : "{0} não é um número válido" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Desabilitado", + disabledDatesText : "Desabilitado", + minText : "A data deste campo deve ser posterior a {0}", + maxText : "A data deste campo deve ser anterior a {0}", + invalidText : "{0} não é uma data válida - deve ser informado no formato {1}", + format : "d/m/Y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Carregando...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Este campo deve ser um endereço de e-mail válido, no formado "usuario@dominio.com.br"', + urlText : 'Este campo deve ser uma URL no formato "http:/'+'/www.dominio.com.br"', + alphaText : 'Este campo deve conter apenas letras e _', + alphanumText : 'Este campo deve conter apenas letras, números e _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Porfavor, entre com a URL do link:', + buttonTips : { + bold : { + title: 'Negrito (Ctrl+B)', + text: 'Deixa o texto selecionado em negrito.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italico (Ctrl+I)', + text: 'Deixa o texto selecionado em italico.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Sublinhado (Ctrl+U)', + text: 'Sublinha o texto selecionado.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Aumentar Texto', + text: 'Aumenta o tamanho da fonte.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Diminuir Texto', + text: 'Diminui o tamanho da fonte.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Cor de Fundo', + text: 'Muda a cor do fundo do texto selecionado.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Cor da Fonte', + text: 'Muda a cor do texto selecionado.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Alinhar à Esquerda', + text: 'Alinha o texto à esquerda.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centralizar Texto', + text: 'Centraliza o texto no editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Alinhar à Direita', + text: 'Alinha o texto à direita.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Lista com Marcadores', + text: 'Inicia uma lista com marcadores.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Lista Numerada', + text: 'Inicia uma lista numerada.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperligação', + text: 'Transforma o texto selecionado em um hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Editar Fonte', + text: 'Troca para o modo de edição de código fonte.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Ordem Ascendente", + sortDescText : "Ordem Descendente", + lockText : "Bloquear Coluna", + unlockText : "Desbloquear Coluna", + columnsText : "Colunas" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nome", + valueText : "Valor", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Arraste para redimencionar.", + collapsibleSplitTip : "Arraste para redimencionar. Duplo clique para esconder." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pt_br.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pt_br.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-pt_br.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,260 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* + * Portuguese/Brazil Translation by Weber Souza + * 08 April 2007 + * Updated by Allan Brazute Alves (EthraZa) + * 06 September 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Carregando...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} linha(s) selecionada(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Fechar"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "O valor para este campo é inválido"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Carregando..."; +} + +Date.monthNames = [ + "Janeiro", + "Fevereiro", + "Março", + "Abril", + "Maio", + "Junho", + "Julho", + "Agosto", + "Setembro", + "Outubro", + "Novembro", + "Dezembro" +]; + +Date.dayNames = [ + "Domingo", + "Segunda", + "Terça", + "Quarta", + "Quinta", + "Sexta", + "Sábado" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Cancelar", + yes : "Sim", + no : "Não" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Hoje", + minText : "Esta data é anterior a menor data", + maxText : "Esta data é posterior a maior data", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Próximo Mês (Control+Direita)', + prevText : 'Mês Anterior (Control+Esquerda)', + monthYearText : 'Escolha um Mês (Control+Cima/Baixo para mover entre os anos)', + todayTip : "{0} (Espaço)", + format : "d/m/Y", + okText : " OK ", + cancelText : "Cancelar", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Página", + afterPageText : "de {0}", + firstText : "Primeira Página", + prevText : "Página Anterior", + nextText : "Próxima Página", + lastText : "Última Página", + refreshText : "Atualizar", + displayMsg : "{0} à {1} de {2} registro(s)", + emptyMsg : 'Sem registros para exibir' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "O tamanho mínimo para este campo é {0}", + maxLengthText : "O tamanho máximo para este campo é {0}", + blankText : "Este campo é obrigatório.", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "O valor mínimo para este campo é {0}", + maxText : "O valor máximo para este campo é {0}", + nanText : "{0} não é um número válido" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Desabilitado", + disabledDatesText : "Desabilitado", + minText : "A data deste campo deve ser posterior a {0}", + maxText : "A data deste campo deve ser anterior a {0}", + invalidText : "{0} não é uma data válida - deve ser informado no formato {1}", + format : "d/m/Y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Carregando...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Este campo deve ser um endereço de e-mail válido, no formado "usuario@dominio.com.br"', + urlText : 'Este campo deve ser uma URL no formato "http:/'+'/www.dominio.com.br"', + alphaText : 'Este campo deve conter apenas letras e _', + alphanumText : 'Este campo deve conter apenas letras, números e _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Porfavor, entre com a URL do link:', + buttonTips : { + bold : { + title: 'Negrito (Ctrl+B)', + text: 'Deixa o texto selecionado em negrito.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italico (Ctrl+I)', + text: 'Deixa o texto selecionado em italico.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Sublinhado (Ctrl+U)', + text: 'Sublinha o texto selecionado.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Aumentar Texto', + text: 'Aumenta o tamanho da fonte.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Diminuir Texto', + text: 'Diminui o tamanho da fonte.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Cor de Fundo', + text: 'Muda a cor do fundo do texto selecionado.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Cor da Fonte', + text: 'Muda a cor do texto selecionado.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Alinhar à Esquerda', + text: 'Alinha o texto à esquerda.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centralizar Texto', + text: 'Centraliza o texto no editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Alinhar à Direita', + text: 'Alinha o texto à direita.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Lista com Marcadores', + text: 'Inicia uma lista com marcadores.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Lista Numerada', + text: 'Inicia uma lista numerada.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperligação', + text: 'Transforma o texto selecionado em um hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Editar Fonte', + text: 'Troca para o modo de edição de código fonte.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Ordem Ascendente", + sortDescText : "Ordem Descendente", + lockText : "Bloquear Coluna", + unlockText : "Desbloquear Coluna", + columnsText : "Colunas" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nome", + valueText : "Valor", + dateFormat : "d/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Arraste para redimencionar.", + collapsibleSplitTip : "Arraste para redimencionar. Duplo clique para esconder." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ro.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ro.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ro.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,169 @@ +/** + * Translation by Lucian Lature 04-24-2007 + * Romanian Translations + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Încărcare...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} rând(uri) selectate"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Închide acest tab"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Valoarea acestui câmp este invalidă"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Încărcare..."; +} + +Date.monthNames = [ + "Ianuarie", + "Februarie", + "Martie", + "Aprilie", + "Mai", + "Iunie", + "Iulie", + "August", + "Septembrie", + "Octombrie", + "Noiembrie", + "Decembrie" +]; + +Date.dayNames = [ + "Duminică", + "Luni", + "Marţi", + "Miercuri", + "Joi", + "Vineri", + "Sâmbătă" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Renunţă", + yes : "Da", + no : "Nu" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d-m-Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Astăzi", + minText : "Această zi este înaintea datei de început", + maxText : "Această zi este după ultimul termen", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Următoarea lună (Control+Right)', + prevText : 'Luna anterioară (Control+Left)', + monthYearText : 'Alege o lună (Control+Up/Down pentru a parcurge anii)', + todayTip : "{0} (Spacebar)", + format : "d-m-y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Pagina", + afterPageText : "din {0}", + firstText : "Prima pagină", + prevText : "Pagina precedentă", + nextText : "Următoarea pagină", + lastText : "Ultima pagină", + refreshText : "Reîmprospătare", + displayMsg : "Afişează {0} - {1} din {2}", + emptyMsg : 'Nu sunt date de afişat' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Lungimea minimă pentru acest câmp este de {0}", + maxLengthText : "Lungimea maximă pentru acest câmp este {0}", + blankText : "Acest câmp este obligatoriu", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Valoarea minimă permisă a acestui câmp este {0}", + maxText : "Valaorea maximă permisă a acestui câmp este {0}", + nanText : "{0} nu este un număr valid" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Inactiv", + disabledDatesText : "Inactiv", + minText : "Data acestui câmp trebuie să fie după {0}", + maxText : "Data acestui câmp trebuie sa fie înainte de {0}", + invalidText : "{0} nu este o dată validă - trebuie să fie în formatul {1}", + format : "d-m-y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Încărcare...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Acest câmp trebuie să conţină o adresă de e-mail în formatul "user@domain.com"', + urlText : 'Acest câmp trebuie să conţină o adresă URL în formatul "http:/'+'/www.domain.com"', + alphaText : 'Acest câmp trebuie să conţină doar litere şi _', + alphanumText : 'Acest câmp trebuie să conţină doar litere, cifre şi _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortare ascendentă", + sortDescText : "Sortare descendentă", + lockText : "Blochează coloana", + unlockText : "Deblochează coloana", + columnsText : "Coloane" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nume", + valueText : "Valoare", + dateFormat : "m/j/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Trage pentru redimensionare.", + collapsibleSplitTip : "Trage pentru redimensionare. Dublu-click pentru ascundere." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ru.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ru.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ru.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,267 @@ +/* + * Russian translation + * By ZooKeeper (utf-8 encoding) + * 12 October 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Идет загрузка...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} выбранных строк"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Закрыть эту вкладку"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Значение в этом поле неверное"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Загрузка..."; +} + +Date.monthNames = [ + "Январь", + "Февраль", + "Март", + "Апрель", + "Май", + "Июнь", + "Июль", + "Август", + "Сентябрь", + "Октябрь", + "Ноябрь", + "Декабрь" +]; + +Date.monthNumbers = { + Jan : 0, + Feb : 1, + Mar : 2, + Apr : 3, + May : 4, + Jun : 5, + Jul : 6, + Aug : 7, + Sep : 8, + Oct : 9, + Nov : 10, + Dec : 11 +}; + +Date.dayNames = [ + "Воскресенье", + "Понедельник", + "Вторник", + "Среда", + "Четверг", + "Пятница", + "Суббота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Отмена", + yes : "Да", + no : "Нет" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Сегодня", + minText : "Эта дата раньше минимальной даты", + maxText : "Эта дата позже максимальной даты", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Следующий месяц (Control+Вправо)', + prevText : 'Предыдущий месяц (Control+Влево)', + monthYearText : 'Выбор месяца (Control+Вверх/Вниз для выбора года)', + todayTip : "{0} (Пробел)", + format : "d.m.y", + okText : " OK ", + cancelText : "Отмена", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Страница", + afterPageText : "из {0}", + firstText : "Первая страница", + prevText : "Предыдущая страница", + nextText : "Следующая страница", + lastText : "Последняя страница", + refreshText : "Обновить", + displayMsg : "Отображаются записи с {0} по {1}, всего {2}", + emptyMsg : 'Нет данных для отображения' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Минимальная длина этого поля {0}", + maxLengthText : "Максимальная длина этого поля {0}", + blankText : "Это поле обязательно для заполнения", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Значение этого поля не может быть меньше {0}", + maxText : "Значение этого поля не может быть больше {0}", + nanText : "{0} не является числом" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Не доступно", + disabledDatesText : "Не доступно", + minText : "Дата в этом поле должна быть позде {0}", + maxText : "Дата в этом поле должна быть раньше {0}", + invalidText : "{0} не является правильной датой - дата должна быть указана в формате {1}", + format : "d.m.y", + altFormats : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Загрузка...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Это поле должно содержать адрес электронной почты в формате "user@domain.com"', + urlText : 'Это поле должно содержать URL в формате "http:/'+'/www.domain.com"', + alphaText : 'Это поле должно содержать только латинские буквы и символ подчеркивания "_"', + alphanumText : 'Это поле должно содержать только латинские буквы, цифры и символ подчеркивания "_"' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Пожалуйста введите адрес:', + buttonTips : { + bold : { + title: 'Полужирный (Ctrl+B)', + text: 'Применение полужирного начертания к выделенному тексту.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Курсив (Ctrl+I)', + text: 'Применение курсивного начертания к выделенному тексту.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Подчёркнутый (Ctrl+U)', + text: 'Подчёркивание выделенного текста.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Увеличить размер', + text: 'Увеличение размера шрифта.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Уменьшить размер', + text: 'Уменьшение размера шрифта.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Заливка', + text: 'Изменение цвета фона для выделенного текста или абзаца.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Цвет текста', + text: 'Измение цвета текста.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Выровнять текст по левому краю', + text: 'Выровнивание текста по левому краю.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'По центру', + text: 'Выровнивание текста по центру.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Выровнять текст по правому краю', + text: 'Выровнивание текста по правому краю.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Маркеры', + text: 'Начать маркированный список.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Нумерация', + text: 'Начать нумернованный список.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Вставить гиперссылку', + text: 'Создание ссылки из выделенного текста.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Исходный код', + text: 'Переключиться на исходный код.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Сортировать по возрастанию", + sortDescText : "Сортировать по убыванию", + lockText : "Закрепить столбец", + unlockText : "Снять закрепление столбца", + columnsText : "Столбцы" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Название", + valueText : "Значение", + dateFormat : "j.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Тяните для изменения размера.", + collapsibleSplitTip : "Тяните для изменения размера. Двойной щелчок спрячет панель." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sk.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sk.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sk.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,176 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + + /* Slovak Translation by Michal Thomka + * 14 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Nahrávam...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} oznaèených riadkov"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zavrie túto záložku"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Hodnota v tomto poli je nesprávna"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Nahrávam..."; +} + +Date.monthNames = [ + "Január", + "Február", + "Marec", + "Apríl", + "Máj", + "Jún", + "Júl", + "August", + "September", + "Október", + "November", + "December" +]; + +Date.dayNames = [ + "NedeŸa", + "Pondelok", + "Utorok", + "Streda", + "Štvrtok", + "Piatok", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Zruši", + yes : "Áno", + no : "Nie" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m/d/R"); + }; +} + + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Dnes", + minText : "Tento dátum je menší ako minimálny možný dátum", + maxText : "Tento dátum je väèší ako maximálny možný dátum", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Ïalší Mesiac (Control+Doprava)', + prevText : 'Predch. Mesiac (Control+DoŸava)', + monthYearText : 'Vyberte Mesiac (Control+Hore/Dole pre posun rokov)', + todayTip : "{0} (Medzerník)", + format : "m/d/r" + }); +} + + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Strana", + afterPageText : "z {0}", + firstText : "Prvá Strana", + prevText : "Predch. Strana", + nextText : "Ïalšia Strana", + lastText : "Posledná strana", + refreshText : "Obnovi", + displayMsg : "Zobrazujem {0} - {1} z {2}", + emptyMsg : 'Žiadne dáta' + }); +} + + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimálna dåžka pre toto pole je {0}", + maxLengthText : "Maximálna dåžka pre toto pole je {0}", + blankText : "Toto pole je povinné", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimálna hodnota pre toto pole je {0}", + maxText : "Maximálna hodnota pre toto pole je {0}", + nanText : "{0} je nesprávne èíslo" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Zablokované", + disabledDatesText : "Zablokované", + minText : "Dátum v tomto poli musí by až po {0}", + maxText : "Dátum v tomto poli musí by pred {0}", + invalidText : "{0} nie je správny dátum - musí by vo formáte {1}", + format : "m/d/r" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Nahrávam...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Toto pole musí by e-mailová adresa vo formáte "user@domain.com"', + urlText : 'Toto pole musí by URL vo formáte "http:/'+'/www.domain.com"', + alphaText : 'Toto poŸe može obsahova iba písmená a znak _', + alphanumText : 'Toto poŸe može obsahova iba písmená,èísla a znak _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Zoradi vzostupne", + sortDescText : "Zoradi zostupne", + lockText : "Zamknú ståpec", + unlockText : "Odomknú stŸpec", + columnsText : "Ståpce" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Názov", + valueText : "Hodnota", + dateFormat : "m/j/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Potiahnite pre zmenu rozmeru", + collapsibleSplitTip : "Potiahnite pre zmenu rozmeru. Dvojklikom schováte." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sl.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sl.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sl.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,170 @@ +/** + * Slovenian translation by Matjaž (UTF-8 encoding) + * 25 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Nalagam...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} izbranih vrstic"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zapri zavihek"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Neveljavna vrednost"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Nalagam..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "Marec", + "April", + "Maj", + "Junij", + "Julij", + "Avgust", + "September", + "Oktober", + "November", + "December" +]; + +Date.dayNames = [ + "Nedelja", + "Ponedeljek", + "Torek", + "Sreda", + "Četrtek", + "Petek", + "Sobota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "V redu", + cancel : "Prekliči", + yes : "Da", + no : "Ne" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Danes", + minText : "Navedeni datum je pred spodnjim datumom", + maxText : "Navedeni datum je za zgornjim datumom", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Naslednji mesec (Control+Desno)', + prevText : 'Prejšnji mesec (Control+Levo)', + monthYearText : 'Izberite mesec (Control+Gor/Dol za premik let)', + todayTip : "{0} (Preslednica)", + format : "d.m.y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Stran", + afterPageText : "od {0}", + firstText : "Prva stran", + prevText : "Prejšnja stran", + nextText : "Naslednja stran", + lastText : "Zadnja stran", + refreshText : "Osveži", + displayMsg : "Prikazujem {0} - {1} od {2}", + emptyMsg : 'Ni podatkov za prikaz' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimalna dolžina tega polja je {0}", + maxLengthText : "Maksimalna dolžina tega polja je {0}", + blankText : "To polje je obvezno", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimalna vrednost tega polja je {0}", + maxText : "Maksimalna vrednost tega polja je {0}", + nanText : "{0} ni veljavna številka" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Onemogočen", + disabledDatesText : "Onemogočen", + minText : "Datum mora biti po {0}", + maxText : "Datum mora biti pred {0}", + invalidText : "{0} ni veljaven datum - mora biti v tem formatu {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Nalagam...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'To polje je e-mail naslov formata "ime@domena.si"', + urlText : 'To polje je URL naslov formata "http:/'+'/www.domena.si"', + alphaText : 'To polje lahko vsebuje samo črke in _', + alphanumText : 'To polje lahko vsebuje samo črke, številke in _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortiraj naraščajoče", + sortDescText : "Sortiraj padajoče", + lockText : "Zakleni stolpec", + unlockText : "Odkleni stolpec", + columnsText : "Stolpci" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Ime", + valueText : "Vrednost", + dateFormat : "j.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Potegni za razširitev.", + collapsibleSplitTip : "Potegni za razširitev. Dvojni klik, če želite skriti." + }); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sp.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sp.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sp.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,332 @@ +/* + * Spanish/Latin American Translation by genius551v 04-08-2007 + * Revised by efege, 2007-04-15. + * Revised by Rafaga2k 10-01-2007 (mm/dd/yyyy) + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Cargando...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} fila(s) seleccionada(s)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Cerrar esta pestaña"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "El valor en este campo es inválido"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Cargando..."; +} + +Date.monthNames = [ + "Enero", + "Febrero", + "Marzo", + "Abril", + "Mayo", + "Junio", + "Julio", + "Agosto", + "Septiembre", + "Octubre", + "Noviembre", + "Diciembre" +]; + +Date.dayNames = [ + "Domingo", + "Lunes", + "Martes", + "Miércoles", + "Jueves", + "Viernes", + "Sábado" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Aceptar", + cancel : "Cancelar", + yes : "Sí", + no : "No" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Hoy", + minText : "Esta fecha es anterior a la fecha mínima", + maxText : "Esta fecha es posterior a la fecha máxima", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Mes Siguiente (Control+Right)', + prevText : 'Mes Anterior (Control+Left)', + monthYearText : 'Seleccione un mes (Control+Up/Down para desplazar el año)', + todayTip : "{0} (Barra espaciadora)", + format : "d/m/Y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Página", + afterPageText : "de {0}", + firstText : "Primera página", + prevText : "Página anterior", + nextText : "Página siguiente", + lastText : "Última página", + refreshText : "Actualizar", + displayMsg : "Mostrando {0} - {1} de {2}", + emptyMsg : 'Sin datos para mostrar' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "El tamaño mínimo para este campo es de {0}", + maxLengthText : "El tamaño máximo para este campo es de {0}", + blankText : "Este campo es obligatorio", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "El valor mínimo para este campo es de {0}", + maxText : "El valor máximo para este campo es de {0}", + nanText : "{0} no es un número válido" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Deshabilitado", + disabledDatesText : "Deshabilitado", + minText : "La fecha para este campo debe ser posterior a {0}", + maxText : "La fecha para este campo debe ser anterior a {0}", + invalidText : "{0} no es una fecha válida - debe tener el formato {1}", + format : "d/m/Y", + altFormats : "d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Cargando...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Este campo debe ser una dirección de correo electrónico con el formato "usuario@dominio.com"', + urlText : 'Este campo debe ser una URL con el formato "http:/'+'/www.dominio.com"', + alphaText : 'Este campo solo debe contener letras y _', + alphanumText : 'Este campo solo debe contener letras, números y _' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Por favor, ingrese la direccion URL para el enlace:', + buttonTips : { + insertimage:{ + title:'Imagen', + text:'Inserta una imagen en la posición actual', + cls:'x-html-editor-tip' + }, + bold : { + title: 'Negrita (Ctrl+B)', + text: 'Pone el texto seleccionado en negrita.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italica (Ctrl+I)', + text: 'Pone el texto seleccionado ent italica.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Linea Baja (Ctrl+U)', + text: 'Pone un linea bajo el texto seleccionado.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Incrementar Texto', + text: 'Incrementa el tamaño de la fuente.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Decrementar Texto', + text: 'Decrementa el tamaño de la fuente.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Color de fondo', + text: 'Cambia el color de fondo del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Color de la fuente', + text: 'Cambia el color de la fuente del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Alinear a la izquierda', + text: 'Alinea el texto a la izquierda.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centrar el texto', + text: 'Centra el texto en el editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Alinear a la derecha', + text: 'Alinea el texto a la derecha.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Lista tachada', + text: 'Comienza una lista tachada.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Lista numerada', + text: 'Comienza una lista numerada.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Enlace', + text: 'Convierte el texto seleccionado en un enlace.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Editar codigo', + text: 'Cambia al modo de edición de codigo fuente.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Ordenar en forma ascendente", + sortDescText : "Ordenar en forma descendente", + lockText : "Bloquear Columna", + unlockText : "Desbloquear Columna", + columnsText : "Columnas" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Nombre", + valueText : "Valor", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Arrastre para redimensionar.", + collapsibleSplitTip : "Arrastre para redimensionar. Doble clic para ocultar." + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : "Por favor proporcione el URL para el enlace:", + buttonTips : { + bold : { + title: 'Negritas (Ctrl+B)', + text: 'Transforma el texto seleccionado en Negritas.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italica (Ctrl+I)', + text: 'Transforma el texto seleccionado en Italicas.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Subrayado (Ctrl+U)', + text: 'Subraya el texto seleccionado.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Aumentar la fuente', + text: 'Aumenta el tamaño de la fuente', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Reducir la fuente', + text: 'Reduce el tamaño de la fuente.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Color de fondo', + text: 'Modifica el color de fondo del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Color de la fuente', + text: 'Modifica el color del texto seleccionado.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Alinear a la izquierda', + text: 'Alinea el texto a la izquierda.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Centrar', + text: 'Centrar el texto.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Alinear a la derecha', + text: 'Alinea el texto a la derecha.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Lista de viñetas', + text: 'Inicia una lista con viñetas.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Lista numerada', + text: 'Inicia una lista numerada.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Enlace', + text: 'Inserta un enlace de hipertexto.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Codigo Fuente', + text: 'Pasar al modo de edicion de codigo fuente.', + cls: 'x-html-editor-tip' + } + } + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sr.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,173 @@ +/* + * Serbian Latin Translation + * by Atila Hajnal (latin, utf8 encoding) + * sr + * 14 Sep 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Učitavam...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} izabranih redova"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Zatvori оvu »karticu«"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Unešena vrednost nije pravilna"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Učitavam..."; +} + +Date.monthNames = [ + "Januar", + "Februar", + "Mart", + "April", + "Мај", + "Jun", + "Јul", + "Avgust", + "Septembar", + "Oktobar", + "Novembar", + "Decembar" +]; + +Date.dayNames = [ + "Nedelja", + "Ponedeljak", + "Utorak", + "Sreda", + "Četvrtak", + "Petak", + "Subota" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "U redu", + cancel : "Odustani", + yes : "Da", + no : "Ne" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Danas", + minText : "Datum је ispred najmanjeg dozvoljenog datuma", + maxText : "Datum је nakon najvećeg dozvoljenog datuma", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Sledeći mesec (Control+Desno)', + prevText : 'Prethodni mesec (Control+Levo)', + monthYearText : 'Izaberite mesec (Control+Gore/Dole za izbor godine)', + todayTip : "{0} (Razmaknica)", + format : "d.m.y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Strana", + afterPageText : "od {0}", + firstText : "Prva strana", + prevText : "Prethodna strana", + nextText : "Sledeća strana", + lastText : "Poslednja strana", + refreshText : "Osveži", + displayMsg : "Prikazana {0} - {1} od {2}", + emptyMsg : 'Nemam šta prikazati' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minimalna dužina ovog polja је {0}", + maxLengthText : "Maksimalna dužina ovog polja је {0}", + blankText : "Polje је obavezno", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minimalna vrednost u polju је {0}", + maxText : "Maksimalna vrednost u polju је {0}", + nanText : "{0} nije pravilan broj" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Pasivno", + disabledDatesText : "Pasivno", + minText : "Datum u ovom polju mora biti nakon {0}", + maxText : "Datum u ovom polju mora biti pre {0}", + invalidText : "{0} nije pravilan datum - zahtevani oblik je {1}", + format : "d.m.y", + altFormats : "d.m.y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Učitavam...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ovo polje prihavata e-mail adresu isključivo u obliku "korisnik@domen.com"', + urlText : 'Ovo polje prihavata URL adresu isključivo u obliku "http:/'+'/www.domen.com"', + alphaText : 'Ovo polje može sadržati isključivo slova i znak _', + alphanumText : 'Ovo polje može sadržati само slova, brojeve i znak _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Rastući redosled", + sortDescText : "Opadajući redosled", + lockText : "Zaključaj kolonu", + unlockText : "Otključaj kolonu", + columnsText : "Kolone" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Naziv", + valueText : "Vrednost", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Povući za izmenu veličine.", + collapsibleSplitTip : "Povući za izmenu veličine. Dvostruku klik za skivanje." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sr_RS.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sr_RS.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sr_RS.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,172 @@ +/* + * Serbian Cyrillic Translation + * by Čolovic Vladan (cyrillic, utf8 encoding) + * sr_RS (ex: sr_CS, sr_YU) + * 12 May 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Учитавам...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} изабраних редова"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Затвори ову »картицу«"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Унешена вредност није правилна"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Учитавам..."; +} + +Date.monthNames = [ + "Јануар", + "Фебруар", + "Март", + "Април", + "Мај", + "Јун", + "Јул", + "Август", + "Септембар", + "Октобар", + "Новембар", + "Децембар" +]; + +Date.dayNames = [ + "Недеља", + "Понедељак", + "Уторак", + "Среда", + "Четвртак", + "Петак", + "Субота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "У реду", + cancel : "Одустани", + yes : "Да", + no : "Не" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Данас", + minText : "Датум је испред најмањег дозвољеног датума", + maxText : "Датум је након највећег дозвољеног датума", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Следећи месец (Control+Десно)', + prevText : 'Претходни месец (Control+Лево)', + monthYearText : 'Изаберите месец (Control+Горе/Доле за избор године)', + todayTip : "{0} (Размакница)", + format : "d.m.y", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Страна", + afterPageText : "од {0}", + firstText : "Прва страна", + prevText : "Претходна страна", + nextText : "Следећа страна", + lastText : "Последња страна", + refreshText : "Освежи", + displayMsg : "Приказана {0} - {1} од {2}", + emptyMsg : 'Немам шта приказати' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Минимална дужина овог поља је {0}", + maxLengthText : "Максимална дужина овог поља је {0}", + blankText : "Поље је обавезно", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Минимална вредност у пољу је {0}", + maxText : "Максимална вредност у пољу је {0}", + nanText : "{0} није правилан број" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Пасивно", + disabledDatesText : "Пасивно", + minText : "Датум у овом пољу мора бити након {0}", + maxText : "Датум у овом пољу мора бити пре {0}", + invalidText : "{0} није правилан датум - захтевани облик је {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Учитавам...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Ово поље прихвата e-mail адресу искључиво у облику "korisnik@domen.com"', + urlText : 'Ово поље прихвата URL адресу искључиво у облику "http:/'+'/www.domen.com"', + alphaText : 'Ово поље може садржати искључиво слова и знак _', + alphanumText : 'Ово поље може садржати само слова, бројеве и знак _' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Растући редослед", + sortDescText : "Опадајући редослед", + lockText : "Закључај колону", + unlockText : "Откључај колону", + columnsText : "Колоне" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Назив", + valueText : "Вредност", + dateFormat : "d.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Повући за измену величине.", + collapsibleSplitTip : "Повући за измену величине. Двоструки клик за сакривање." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sv_SE.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sv_SE.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sv_SE.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,172 @@ +/** + * Swedish translation (utf8-encoding) + * By Erik Andersson, Monator Technologies + * 24 April 2007 + * Changed by Cariad, 29 July 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Laddar...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} markerade rad(er)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Stäng denna flik"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Värdet i detta fält är inte tillåtet"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Laddar..."; +} + +Date.monthNames = [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" +]; + +Date.dayNames = [ + "söndag", + "måndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "lördag" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Avbryt", + yes : "Ja", + no : "Nej" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y-m-d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Idag", + minText : "Detta datum inträffar före det tidigast tillåtna", + maxText : "Detta datum inträffar efter det senast tillåtna", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Nästa månad (Ctrl + högerpil)', + prevText : 'Föregående månad (Ctrl + vänsterpil)', + monthYearText : 'Välj en månad (Ctrl + uppåtpil/neråtpil för att ändra årtal)', + todayTip : "{0} (mellanslag)", + format : "Y-m-d", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Sida", + afterPageText : "av {0}", + firstText : "Första sidan", + prevText : "Föregående sida", + nextText : "Nästa sida", + lastText : "Sista sidan", + refreshText : "Uppdatera", + displayMsg : "Visar {0} - {1} av {2}", + emptyMsg : 'Det finns ingen data att visa' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minsta tillåtna längd för detta fält är {0}", + maxLengthText : "Största tillåtna längd för detta fält är {0}", + blankText : "Detta fält är obligatoriskt", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minsta tillåtna värde för detta fält är {0}", + maxText : "Största tillåtna värde för detta fält är {0}", + nanText : "{0} är inte ett tillåtet nummer" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Inaktiverad", + disabledDatesText : "Inaktiverad", + minText : "Datumet i detta fält måste inträffa efter {0}", + maxText : "Datumet i detta fält måste inträffa före {0}", + invalidText : "{0} är inte ett tillåtet datum - datum ska anges i formatet {1}", + format : "Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Laddar...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Detta fält ska innehålla en e-post adress i formatet "användare@domän.se"', + urlText : 'Detta fält ska innehålla en länk (URL) i formatet "http:/'+'/www.domän.se"', + alphaText : 'Detta fält får bara innehålla bokstäver och "_"', + alphanumText : 'Detta fält får bara innehålla bokstäver, nummer och "_"' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortera stigande", + sortDescText : "Sortera fallande", + lockText : "Lås kolumn", + unlockText : "Lås upp kolumn", + columnsText : "Kolumner" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Namn", + valueText : "Värde", + dateFormat : "Y-m-d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Dra för att ändra storleken.", + collapsibleSplitTip : "Dra för att ändra storleken. Dubbelklicka för att gömma." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sv_se.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sv_se.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-sv_se.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,180 @@ +/* + * Ext JS Library 2.0 RC 1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * Swedish translation (utf8-encoding) + * By Erik Andersson, Monator Technologies + * 24 April 2007 + * Changed by Cariad, 29 July 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Laddar...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} markerade rad(er)"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Stäng denna flik"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Värdet i detta fält är inte tillåtet"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Laddar..."; +} + +Date.monthNames = [ + "januari", + "februari", + "mars", + "april", + "maj", + "juni", + "juli", + "augusti", + "september", + "oktober", + "november", + "december" +]; + +Date.dayNames = [ + "söndag", + "måndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "lördag" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Avbryt", + yes : "Ja", + no : "Nej" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y-m-d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Idag", + minText : "Detta datum inträffar före det tidigast tillåtna", + maxText : "Detta datum inträffar efter det senast tillåtna", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Nästa månad (Ctrl + högerpil)', + prevText : 'Föregående månad (Ctrl + vänsterpil)', + monthYearText : 'Välj en månad (Ctrl + uppåtpil/neråtpil för att ändra årtal)', + todayTip : "{0} (mellanslag)", + format : "Y-m-d", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Sida", + afterPageText : "av {0}", + firstText : "Första sidan", + prevText : "Föregående sida", + nextText : "Nästa sida", + lastText : "Sista sidan", + refreshText : "Uppdatera", + displayMsg : "Visar {0} - {1} av {2}", + emptyMsg : 'Det finns ingen data att visa' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Minsta tillåtna längd för detta fält är {0}", + maxLengthText : "Största tillåtna längd för detta fält är {0}", + blankText : "Detta fält är obligatoriskt", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Minsta tillåtna värde för detta fält är {0}", + maxText : "Största tillåtna värde för detta fält är {0}", + nanText : "{0} är inte ett tillåtet nummer" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Inaktiverad", + disabledDatesText : "Inaktiverad", + minText : "Datumet i detta fält måste inträffa efter {0}", + maxText : "Datumet i detta fält måste inträffa före {0}", + invalidText : "{0} är inte ett tillåtet datum - datum ska anges i formatet {1}", + format : "Y-m-d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Laddar...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Detta fält ska innehålla en e-post adress i formatet "användare@domän.se"', + urlText : 'Detta fält ska innehålla en länk (URL) i formatet "http:/'+'/www.domän.se"', + alphaText : 'Detta fält får bara innehålla bokstäver och "_"', + alphanumText : 'Detta fält får bara innehålla bokstäver, nummer och "_"' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Sortera stigande", + sortDescText : "Sortera fallande", + lockText : "Lås kolumn", + unlockText : "Lås upp kolumn", + columnsText : "Kolumner" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Namn", + valueText : "Värde", + dateFormat : "Y-m-d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Dra för att ändra storleken.", + collapsibleSplitTip : "Dra för att ändra storleken. Dubbelklicka för att gömma." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-tr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-tr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-tr.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,255 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + +/** + * Turkish translation by Hüseyin Tüfekçilerli + * 04-11-2007, 09:52 AM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Yükleniyor...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} seçili satır"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Bu sekmeyi kapat"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Bu alandaki değer geçersiz"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Yükleniyor..."; +} + +Date.monthNames = [ + "Ocak", + "Şubat", + "Mart", + "Nisan", + "Mayıs", + "Haziran", + "Temmuz", + "Ağustos", + "Eylül", + "Ekim", + "Kasım", + "Aralık" +]; + +Date.dayNames = [ + "Pazar", + "Pazartesi", + "Salı", + "Çarşamba", + "Perşembe", + "Cuma", + "Cumartesi" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Tamam", + cancel : "İptal", + yes : "Evet", + no : "Hayır" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "m/d/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Bugün", + minText : "Bu tarih minimum tarihten önce", + maxText : "Bu tarih maximum tarihten önce", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Sonraki ay (Ctrl+Sag)', + prevText : 'Önceki ay (Ctrl+Sol)', + monthYearText : 'Bir ay seçin (Yillari değiştirmek için Ctrl+Yukarı/Aşağı)', + todayTip : "{0} (Bosluk)", + format : "d/m/y", + okText : "Tamam", + cancelText : "  İptal   ", + startDay : 0 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Sayfa", + afterPageText : " / {0}", + firstText : "İlk Sayfa", + prevText : "Önceki Sayfa", + nextText : "Sonraki Sayfa", + lastText : "Son Sayfa", + refreshText : "Yenile", + displayMsg : "{2} satırdan {0} - {1} arası gösteriliyor", + emptyMsg : 'Gösterilecek veri yok' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Bu alan için minimum uzunluk {0}", + maxLengthText : "Bu alan için maximum uzunluk {0}", + blankText : "Bu alan gerekli", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Bu alan için minimum değer {0}", + maxText : "Bu alan için maximum değer {0}", + nanText : "{0} geçerli bir sayı değil" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Pasif", + disabledDatesText : "Pasif", + minText : "Bu alana {0} tarihinden sonraki bir tarih girilmeli", + maxText : "Bu alana {0} tarihinden önceki bir tarih girilmeli", + invalidText : "{0} geçerli bir tarih değil - {1} biçiminde olmalı", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Yükleniyor...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Bu alan bir e-mail adresi biçiminde olmalı "kullanici@alanadi.com"', + urlText : 'Bu alan bir URL biçiminde olmalu "http:/'+'/www.alanadi.com"', + alphaText : 'Bu alan sadece harf ve _ içermeli', + alphanumText : 'Bu alan sadece harf, sayı ve _ içermeli' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Lütfen link için URL giriniz:', + buttonTips : { + bold : { + title: 'Kalın (Ctrl+B)', + text: 'Seçilen metni kalın yap.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Yatık (Ctrl+I)', + text: 'Seçilen metni yatık yap.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Altçizgi (Ctrl+U)', + text: 'Seçilen metnin altını çiz.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Metni büyüt', + text: 'Yazi tipini büyüt.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Metni küçült', + text: 'Yazi tipini küçült.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Metin arkaplan rengi', + text: 'Seçilen metnin arkaplan rengini değiştir.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Metin rengi', + text: 'Seçilen metnin rengini değiştir.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Metni sola yasla', + text: 'Metni sola yasla', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Metni ortala', + text: 'Metni ortala', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Metni sağa yasla', + text: 'Metni sağa yasla', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Sırasız liste', + text: 'Sırasız liste başlat.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Sıralı liste', + text: 'Sıralı liste başlat', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Bağlanti', + text: 'Seçilen yazıya bağlantı ver.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Kaynağı düzenle', + text: 'Kaynak düzenle görünümüne geç.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Artan sıra", + sortDescText : "Azalan sıra", + lockText : "Sütunu kilitle", + unlockText : "Sütunun kilidini kaldır", + columnsText : "Sütunlar" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Ad", + valueText : "Değer", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Boyutlandırmak için sürükleyin.", + collapsibleSplitTip : "Boyutlandırmak için sürükleyin. Gizlemek için çift tıklayın." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ukr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ukr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-ukr.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,252 @@ +/* + * Ukrainian translation + * By zlatko (utf-8 encoding) + * 3 October 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Триває завантаження...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} вибраних стрічок"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Закрити цю вкладку"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Значення у цьому полі невірне"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Завантаження..."; +} + +Date.monthNames = [ + "Січень", + "Лютий", + "Березень", + "Квітень", + "Травень", + "Червень", + "Липень", + "Серпень", + "Вересень", + "Жовтень", + "Листопад", + "Грудень" +]; + +Date.dayNames = [ + "Неділя", + "Понеділок", + "Вівторок", + "Середа", + "Четвер", + "Пятниця", + "Субота" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "OK", + cancel : "Відміна", + yes : "Так", + no : "Ні" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d.m.Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Сьогодні", + minText : "Ця дата менше мінімальної дати", + maxText : "Ця дата більше максимальної дати", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Наступний місяць (Control+Вправо)', + prevText : 'Попередній місяць (Control+Вліво)', + monthYearText : 'Вибір місяця (Control+Вверх/Вниз для вибору року)', + todayTip : "{0} (Пробіл)", + format : "d.m.y", + okText : " OK ", + cancelText : "Відміна", + startDay : 1 + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Сторінка", + afterPageText : "з {0}", + firstText : "Перша сторінка", + prevText : "Попередня сторінка", + nextText : "Наступна сторінка", + lastText : "Остання сторінка", + refreshText : "Обновити", + displayMsg : "Відображаються записи з {0} по {1}, всього {2}", + emptyMsg : 'Дані для відображення відсутні' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Мінімальна довжина цього поля {0}", + maxLengthText : "Максимальна довжина цього поля {0}", + blankText : "Це поле є обов’язковим для заповнення", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Значення цього поля не може бути менше {0}", + maxText : "Значення цього поля не може бути більше {0}", + nanText : "{0} не являється числом" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Не доступно", + disabledDatesText : "Не доступно", + minText : "Дата в цьому полі повинна бути більше {0}", + maxText : "Дата в цьому полі повинна бути менше {0}", + invalidText : "{0} неправильна дата - дата повинна бути вказана у форматі {1}", + format : "d.m.y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Завантаження...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Це поле повинно містити адресу електронної почти у форматі "user@domain.com"', + urlText : 'Це поле повинно містити URL у форматі "http:/'+'/www.domain.com"', + alphaText : 'Це поле повинно містити виключно латинські літери та символ підкреслення "_"', + alphanumText : 'Це поле повинно містити виключно латинські літери, цифри та символ підкреслення "_"' + }); +} + +if(Ext.form.HtmlEditor){ + Ext.apply(Ext.form.HtmlEditor.prototype, { + createLinkText : 'Будь-ласка введіть адресу:', + buttonTips : { + bold : { + title: 'Напівжирний (Ctrl+B)', + text: 'Застосування напівжирного до виділеного тексту.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Курсив (Ctrl+I)', + text: ' Застосування курсиву до виділеного тексту.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Підкреслений (Ctrl+U)', + text: ' Застосування підкреслення до виділенного тексту.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Збільшити розмір', + text: 'Збільшення розміру шрифта.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Зменшити розмір', + text: 'Зменшення розміру шрифта.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Заливка', + text: 'Зміна кольору фону для виділеного тексту або абзацу.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Колір тексту', + text: 'Зміна кольору тексту.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Вирівняти текст по лівій границі', + text: 'Вирівнювання тексту по лівій границі.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Вирівняти текст по центру', + text: 'Вирівнювання тексту по центру.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Вирівняти текст по правій границі', + text: 'Вирівнювання тексту по правій границі.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Маркери', + text: 'Почати маркований список.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Нумерація', + text: 'Почати нумернований список.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Вставити гіперпосилання', + text: 'Створення посилання із виділеного тексту.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Вихідний код', + text: 'Переключитись на вихідний код.', + cls: 'x-html-editor-tip' + } + } + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Сортувати по зростанню", + sortDescText : "Сортувати по спаданню", + lockText : "Закріпити колонку", + unlockText : "Зняти закріплення колонки", + columnsText : "Колонки" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Назва", + valueText : "Значення", + dateFormat : "j.m.Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Тягніть для зміни розміру.", + collapsibleSplitTip : "Тягніть для зміни розміру. Подвійний клік сховає панель." + }); +} + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-vn.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-vn.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-vn.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,175 @@ +/** + * List compiled by mystix on the extjs.com forums. + * Thank you Mystix! + */ + +/** + * Vietnamese translation + * By bpmtri + * 12-April-2007 04:06PM + */ + +Ext.UpdateManager.defaults.indicatorText = '
        Đang tải...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} dòng được chọn"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "Đóng thẻ này"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "Giá trị của ô này không hợp lệ."; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "Đang tải..."; +} + +Date.monthNames = [ + "Tháng 1", + "Tháng 2", + "Tháng 3", + "Tháng 4", + "Tháng 5", + "Tháng 6", + "Tháng 7", + "Tháng 8", + "Tháng 9", + "Tháng 10", + "Tháng 11", + "Tháng 12" +]; + +Date.dayNames = [ + "Chủ nhật", + "Thứ hai", + "Thứ ba", + "Thứ tư", + "Thứ năm", + "Thứ sáu", + "Thứ bảy" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "Đồng ý", + cancel : "Hủy bỏ", + yes : "Có", + no : "Không" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "d/m/Y"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "Hôm nay", + minText : "Ngày này nhỏ hơn ngày nhỏ nhất", + maxText : "Ngày này lớn hơn ngày lớn nhất", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : 'Tháng sau (Control+Right)', + prevText : 'Tháng trước (Control+Left)', + monthYearText : 'Chọn một tháng (Control+Up/Down để thay đổi năm)', + todayTip : "{0} (Spacebar - Phím trắng)", + format : "d/m/y" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "Trang", + afterPageText : "of {0}", + firstText : "Trang đầu", + prevText : "Trang trước", + nextText : "Trang sau", + lastText : "Trang cuối", + refreshText : "Tải lại", + displayMsg : "Hiển thị {0} - {1} của {2}", + emptyMsg : 'Không có dữ liệu để hiển thị' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "Chiều dài tối thiểu của ô này là {0}", + maxLengthText : "Chiều dài tối đa của ô này là {0}", + blankText : "Ô này cần phải nhập giá trị", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "Giá trị nhỏ nhất của ô này là {0}", + maxText : "Giá trị lớn nhất của ô này là {0}", + nanText : "{0} hông phải là một số hợp lệ" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "Vô hiệu", + disabledDatesText : "Vô hiệu", + minText : "Ngày nhập trong ô này phải sau ngày {0}", + maxText : "Ngày nhập trong ô này phải trước ngày {0}", + invalidText : "{0} không phải là một ngày hợp lệ - phải có dạng {1}", + format : "d/m/y" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "Đang tải...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : 'Giá trị của ô này phải là một địa chỉ email có dạng như "ten@abc.com"', + urlText : 'Giá trị của ô này phải là một địa chỉ web(URL) hợp lệ, có dạng như "http:/'+'/www.domain.com"', + alphaText : 'Ô này chỉ được nhập các kí tự và gạch dưới(_)', + alphanumText : 'Ô này chỉ được nhập các kí tự, số và gạch dưới(_)' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "Tăng dần", + sortDescText : "Giảm dần", + lockText : "Khóa cột", + unlockText : "Bỏ khóa cột", + columnsText : "Các cột" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "Tên", + valueText : "Giá trị", + dateFormat : "j/m/Y" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "Kéo giữ chuột để thay đổi kích thước.", + collapsibleSplitTip : "Kéo giữ chuột để thay đổi kích thước. Nhấp đúp để ẩn đi." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-zh_CN.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-zh_CN.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-zh_CN.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,166 @@ +/* + * Simplified Chinese translation + * By DavidHu + * 09 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        加载中...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "{0} 选择行"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "关闭"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "输入值非法"; +} + +Date.monthNames = [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" +]; + +Date.dayNames = [ + "日", + "一", + "二", + "三", + "四", + "五", + "六" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "确定", + cancel : "取消", + yes : "是", + no : "否" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "y年m月d日"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "今天", + minText : "日期在最小日期之前", + maxText : "日期在最大日期之后", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : '下月 (Control+Right)', + prevText : '上月 (Control+Left)', + monthYearText : '选择一个月 (Control+Up/Down 来改变年)', + todayTip : "{0} (空格键选择)", + format : "y年m月d日" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "页", + afterPageText : "页共 {0} 页", + firstText : "第一页", + prevText : "前一页", + nextText : "下一页", + lastText : "最后页", + refreshText : "刷新", + displayMsg : "显示 {0} - {1},共 {2} 条", + emptyMsg : '没有数据需要显示' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "该输入项的最小长度是 {0}", + maxLengthText : "该输入项的最大长度是 {0}", + blankText : "该输入项为必输项", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "该输入项的最小值是 {0}", + maxText : "该输入项的最大值是 {0}", + nanText : "{0} 不是有效数值" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "禁用", + disabledDatesText : "禁用", + minText : "该输入项的日期必须在 {0} 之后", + maxText : "该输入项的日期必须在 {0} 之前", + invalidText : "{0} 是无效的日期 - 必须符合格式: {1}", + format : "y年m月d日" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "加载...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : '该输入项必须是电子邮件地址,格式如: "user@domain.com"', + urlText : '该输入项必须是URL地址,格式如: "http:/'+'/www.domain.com"', + alphaText : '该输入项只能包含字符和_', + alphanumText : '该输入项只能包含字符,数字和_' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "正序", + sortDescText : "逆序", + lockText : "锁列", + unlockText : "解锁列", + columnsText : "列" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "名称", + valueText : "值", + dateFormat : "y年m月d日" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "拖动来改变尺寸.", + collapsibleSplitTip : "拖动来改变尺寸. 双击隐藏." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-zh_TW.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-zh_TW.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/locale/ext-lang-zh_TW.js 4 Dec 2007 02:48:56 -0000 1.1 @@ -0,0 +1,170 @@ +/* + * Traditional Chinese translation + * By hata1234 + * 09 April 2007 + */ + +Ext.UpdateManager.defaults.indicatorText = '
        讀取中...
        '; + +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.Grid){ + Ext.grid.Grid.prototype.ddText = "選擇了 {0} 行"; +} + +if(Ext.TabPanelItem){ + Ext.TabPanelItem.prototype.closeText = "關閉此標籤"; +} + +if(Ext.form.Field){ + Ext.form.Field.prototype.invalidText = "數值不符合欄位規定"; +} + +if(Ext.LoadMask){ + Ext.LoadMask.prototype.msg = "讀取中..."; +} + +Date.monthNames = [ + "一月", + "二月", + "三月", + "四月", + "五月", + "六月", + "七月", + "八月", + "九月", + "十月", + "十一月", + "十二月" +]; + +Date.dayNames = [ + "日", + "一", + "二", + "三", + "四", + "五", + "六" +]; + +if(Ext.MessageBox){ + Ext.MessageBox.buttonText = { + ok : "確定", + cancel : "取消", + yes : "是", + no : "否" + }; +} + +if(Ext.util.Format){ + Ext.util.Format.date = function(v, format){ + if(!v) return ""; + if(!(v instanceof Date)) v = new Date(Date.parse(v)); + return v.dateFormat(format || "Y/m/d"); + }; +} + +if(Ext.DatePicker){ + Ext.apply(Ext.DatePicker.prototype, { + todayText : "今天", + minText : "日期必須大於最小容許日期", + maxText : "日期必須小於最大容許日期", + disabledDaysText : "", + disabledDatesText : "", + monthNames : Date.monthNames, + dayNames : Date.dayNames, + nextText : "下個月 (Ctrl+右方向鍵)", + prevText : "上個月 (Ctrl+左方向鍵)", + monthYearText : "選擇月份 (Ctrl+上/下方向鍵選擇年份)", + todayTip : "{0} (空白鍵)", + format : "y/m/d" + }); +} + +if(Ext.PagingToolbar){ + Ext.apply(Ext.PagingToolbar.prototype, { + beforePageText : "第", + afterPageText : "頁,共{0}頁", + firstText : "第一頁", + prevText : "上一頁", + nextText : "下一頁", + lastText : "最後頁", + refreshText : "重新整理", + displayMsg : "顯示{0} - {1}頁,共{2}頁", + emptyMsg : '沒有任何資料' + }); +} + +if(Ext.form.TextField){ + Ext.apply(Ext.form.TextField.prototype, { + minLengthText : "此欄位最少要輸入 {0} 個字", + maxLengthText : "此欄位最多輸入 {0} 個字", + blankText : "此欄位為必填", + regexText : "", + emptyText : null + }); +} + +if(Ext.form.NumberField){ + Ext.apply(Ext.form.NumberField.prototype, { + minText : "此欄位之數值必須大於 {0}", + maxText : "此欄位之數值必須小於 {0}", + nanText : "{0} 不是合法的數字" + }); +} + +if(Ext.form.DateField){ + Ext.apply(Ext.form.DateField.prototype, { + disabledDaysText : "無法使用", + disabledDatesText : "無法使用", + minText : "此欄位之日期必須在 {0} 之後", + maxText : "此欄位之日期必須在 {0} 之前", + invalidText : "{0} 不是正確的日期格式 - 必須像是 「 {1} 」 這樣的格式", + format : "Y/m/d" + }); +} + +if(Ext.form.ComboBox){ + Ext.apply(Ext.form.ComboBox.prototype, { + loadingText : "讀取中 ...", + valueNotFoundText : undefined + }); +} + +if(Ext.form.VTypes){ + Ext.apply(Ext.form.VTypes, { + emailText : '此欄位必須輸入像 "user@domain.com" 之E-Mail格式', + urlText : '此欄位必須輸入像 "http:/'+'/www.domain.com" 之網址格式', + alphaText : '此欄位僅能輸入半形英文字母及底線( _ )符號', + alphanumText : '此欄位僅能輸入半形英文字母、數字及底線( _ )符號' + }); +} + +if(Ext.grid.GridView){ + Ext.apply(Ext.grid.GridView.prototype, { + sortAscText : "正向排序", + sortDescText : "反向排序", + lockText : "鎖定欄位", + unlockText : "解開欄位鎖定", + columnsText : "欄位" + }); +} + +if(Ext.grid.PropertyColumnModel){ + Ext.apply(Ext.grid.PropertyColumnModel.prototype, { + nameText : "名稱", + valueText : "數值", + dateFormat : "Y/m/d" + }); +} + +if(Ext.layout.BorderLayout.SplitRegion){ + Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { + splitTip : "拖曳縮放大小.", + collapsibleSplitTip : "拖曳縮放大小. 滑鼠雙擊隱藏." + }); +} Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/CookieProvider.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/CookieProvider.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/CookieProvider.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,93 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + + +/** + * @class Ext.state.CookieProvider + * @extends Ext.state.Provider + * The default Provider implementation which saves state via cookies. + *
        Usage: +
        
        +   var cp = new Ext.state.CookieProvider({
        +       path: "/cgi-bin/",
        +       expires: new Date(new Date().getTime()+(1000*60*60*24*30)), //30 days
        +       domain: "extjs.com"
        +   });
        +   Ext.state.Manager.setProvider(cp);
        + 
        + * @cfg {String} path The path for which the cookie is active (defaults to root '/' which makes it active for all pages in the site) + * @cfg {Date} expires The cookie expiration date (defaults to 7 days from now) + * @cfg {String} domain The domain to save the cookie for. Note that you cannot specify a different domain than + * your page is on, but you can specify a sub-domain, or simply the domain itself like 'extjs.com' to include + * all sub-domains if you need to access cookies across different sub-domains (defaults to null which uses the same + * domain the page is running on including the 'www' like 'www.extjs.com') + * @cfg {Boolean} secure True if the site is using SSL (defaults to false) + * @constructor + * Create a new CookieProvider + * @param {Object} config The configuration object + */ +Ext.state.CookieProvider = function(config){ + Ext.state.CookieProvider.superclass.constructor.call(this); + this.path = "/"; + this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days + this.domain = null; + this.secure = false; + Ext.apply(this, config); + this.state = this.readCookies(); +}; + +Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, { + // private + set : function(name, value){ + if(typeof value == "undefined" || value === null){ + this.clear(name); + return; + } + this.setCookie(name, value); + Ext.state.CookieProvider.superclass.set.call(this, name, value); + }, + + // private + clear : function(name){ + this.clearCookie(name); + Ext.state.CookieProvider.superclass.clear.call(this, name); + }, + + // private + readCookies : function(){ + var cookies = {}; + var c = document.cookie + ";"; + var re = /\s?(.*?)=(.*?);/g; + var matches; + while((matches = re.exec(c)) != null){ + var name = matches[1]; + var value = matches[2]; + if(name && name.substring(0,3) == "ys-"){ + cookies[name.substr(3)] = this.decodeValue(value); + } + } + return cookies; + }, + + // private + setCookie : function(name, value){ + document.cookie = "ys-"+ name + "=" + this.encodeValue(value) + + ((this.expires == null) ? "" : ("; expires=" + this.expires.toGMTString())) + + ((this.path == null) ? "" : ("; path=" + this.path)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((this.secure == true) ? "; secure" : ""); + }, + + // private + clearCookie : function(name){ + document.cookie = "ys-" + name + "=null; expires=Thu, 01-Jan-70 00:00:01 GMT" + + ((this.path == null) ? "" : ("; path=" + this.path)) + + ((this.domain == null) ? "" : ("; domain=" + this.domain)) + + ((this.secure == true) ? "; secure" : ""); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/Provider.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/Provider.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/Provider.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,130 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.state.Provider + * Abstract base class for state provider implementations. This class provides methods + * for encoding and decoding typed variables including dates and defines the + * Provider interface. + */ +Ext.state.Provider = function(){ + /** + * @event statechange + * Fires when a state change occurs. + * @param {Provider} this This state provider + * @param {String} key The state key which was changed + * @param {String} value The encoded value for the state + */ + this.addEvents("statechange"); + this.state = {}; + Ext.state.Provider.superclass.constructor.call(this); +}; +Ext.extend(Ext.state.Provider, Ext.util.Observable, { + /** + * Returns the current value for a key + * @param {String} name The key name + * @param {Mixed} defaultValue A default value to return if the key's value is not found + * @return {Mixed} The state data + */ + get : function(name, defaultValue){ + return typeof this.state[name] == "undefined" ? + defaultValue : this.state[name]; + }, + + /** + * Clears a value from the state + * @param {String} name The key name + */ + clear : function(name){ + delete this.state[name]; + this.fireEvent("statechange", this, name, null); + }, + + /** + * Sets the value for a key + * @param {String} name The key name + * @param {Mixed} value The value to set + */ + set : function(name, value){ + this.state[name] = value; + //console.log(value); + this.fireEvent("statechange", this, name, value); + }, + + /** + * Decodes a string previously encoded with {@link #encodeValue}. + * @param {String} value The value to decode + * @return {Mixed} The decoded value + */ + decodeValue : function(cookie){ + var re = /^(a|n|d|b|s|o)\:(.*)$/; + var matches = re.exec(unescape(cookie)); + if(!matches || !matches[1]) return; // non state cookie + var type = matches[1]; + var v = matches[2]; + switch(type){ + case "n": + return parseFloat(v); + case "d": + return new Date(Date.parse(v)); + case "b": + return (v == "1"); + case "a": + var all = []; + var values = v.split("^"); + for(var i = 0, len = values.length; i < len; i++){ + all.push(this.decodeValue(values[i])); + } + return all; + case "o": + var all = {}; + var values = v.split("^"); + for(var i = 0, len = values.length; i < len; i++){ + var kv = values[i].split("="); + all[kv[0]] = this.decodeValue(kv[1]); + } + return all; + default: + return v; + } + }, + + /** + * Encodes a value including type information. Decode with {@link #decodeValue}. + * @param {Mixed} value The value to encode + * @return {String} The encoded value + */ + encodeValue : function(v){ + var enc; + if(typeof v == "number"){ + enc = "n:" + v; + }else if(typeof v == "boolean"){ + enc = "b:" + (v ? "1" : "0"); + }else if(v instanceof Date){ + enc = "d:" + v.toGMTString(); + }else if(v instanceof Array){ + var flat = ""; + for(var i = 0, len = v.length; i < len; i++){ + flat += this.encodeValue(v[i]); + if(i != len-1) flat += "^"; + } + enc = "a:" + flat; + }else if(typeof v == "object"){ + var flat = ""; + for(var key in v){ + if(typeof v[key] != "function" && v[key] !== undefined){ + flat += key + "=" + this.encodeValue(v[key]) + "^"; + } + } + enc = "o:" + flat.substring(0, flat.length-1); + }else{ + enc = "s:" + v; + } + return escape(enc); + } +}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/StateManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/StateManager.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/state/StateManager.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,75 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.state.Manager + * This is the global state manager. By default all components that are "state aware" check this class + * for state information if you don't pass them a custom state provider. In order for this class + * to be useful, it must be initialized with a provider when your application initializes. +
        
        +// in your initialization function
        +init : function(){
        +   Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
        +   ...
        +   // supposed you have a {@link Ext.BorderLayout}
        +   var layout = new Ext.BorderLayout(...);
        +   layout.restoreState();
        +   // or a {Ext.BasicDialog}
        +   var dialog = new Ext.BasicDialog(...);
        +   dialog.restoreState();
        + 
        + * @singleton + */ +Ext.state.Manager = function(){ + var provider = new Ext.state.Provider(); + + return { + /** + * Configures the default state provider for your application + * @param {Provider} stateProvider The state provider to set + */ + setProvider : function(stateProvider){ + provider = stateProvider; + }, + + /** + * Returns the current value for a key + * @param {String} name The key name + * @param {Mixed} defaultValue The default value to return if the key lookup does not match + * @return {Mixed} The state data + */ + get : function(key, defaultValue){ + return provider.get(key, defaultValue); + }, + + /** + * Sets the value for a key + * @param {String} name The key name + * @param {Mixed} value The state data + */ + set : function(key, value){ + provider.set(key, value); + }, + + /** + * Clears a value from the state + * @param {String} name The key name + */ + clear : function(key){ + provider.clear(key); + }, + + /** + * Gets the currently configured state provider + * @return {Provider} The state provider + */ + getProvider : function(){ + return provider; + } + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/CSS.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/CSS.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/CSS.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,163 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.CSS + * Utility class for manipulating CSS rules + * @singleton + */ +Ext.util.CSS = function(){ + var rules = null; + var doc = document; + + var camelRe = /(-[a-z])/gi; + var camelFn = function(m, a){ return a.charAt(1).toUpperCase(); }; + + return { + /** + * Creates a stylesheet from a text blob of rules. + * These rules will be wrapped in a STYLE tag and appended to the HEAD of the document. + * @param {String} cssText The text containing the css rules + * @param {String} id An id to add to the stylesheet for later removal + * @return {StyleSheet} + */ + createStyleSheet : function(cssText, id){ + var ss; + var head = doc.getElementsByTagName("head")[0]; + var rules = doc.createElement("style"); + rules.setAttribute("type", "text/css"); + if(id){ + rules.setAttribute("id", id); + } + if(Ext.isIE){ + head.appendChild(rules); + ss = rules.styleSheet; + ss.cssText = cssText; + }else{ + try{ + rules.appendChild(doc.createTextNode(cssText)); + }catch(e){ + rules.cssText = cssText; + } + head.appendChild(rules); + ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]); + } + this.cacheStyleSheet(ss); + return ss; + }, + + /** + * Removes a style or link tag by id + * @param {String} id The id of the tag + */ + removeStyleSheet : function(id){ + var existing = doc.getElementById(id); + if(existing){ + existing.parentNode.removeChild(existing); + } + }, + + /** + * Dynamically swaps an existing stylesheet reference for a new one + * @param {String} id The id of an existing link tag to remove + * @param {String} url The href of the new stylesheet to include + */ + swapStyleSheet : function(id, url){ + this.removeStyleSheet(id); + var ss = doc.createElement("link"); + ss.setAttribute("rel", "stylesheet"); + ss.setAttribute("type", "text/css"); + ss.setAttribute("id", id); + ss.setAttribute("href", url); + doc.getElementsByTagName("head")[0].appendChild(ss); + }, + + /** + * Refresh the rule cache if you have dynamically added stylesheets + * @return {Object} An object (hash) of rules indexed by selector + */ + refreshCache : function(){ + return this.getRules(true); + }, + + // private + cacheStyleSheet : function(ss){ + if(!rules){ + rules = {}; + } + try{// try catch for cross domain access issue + var ssRules = ss.cssRules || ss.rules; + for(var j = ssRules.length-1; j >= 0; --j){ + rules[ssRules[j].selectorText] = ssRules[j]; + } + }catch(e){} + }, + + /** + * Gets all css rules for the document + * @param {Boolean} refreshCache true to refresh the internal cache + * @return {Object} An object (hash) of rules indexed by selector + */ + getRules : function(refreshCache){ + if(rules == null || refreshCache){ + rules = {}; + var ds = doc.styleSheets; + for(var i =0, len = ds.length; i < len; i++){ + try{ + this.cacheStyleSheet(ds[i]); + }catch(e){} + } + } + return rules; + }, + + /** + * Gets an an individual CSS rule by selector(s) + * @param {String/Array} selector The CSS selector or an array of selectors to try. The first selector that is found is returned. + * @param {Boolean} refreshCache true to refresh the internal cache if you have recently updated any rules or added styles dynamically + * @return {CSSRule} The CSS rule or null if one is not found + */ + getRule : function(selector, refreshCache){ + var rs = this.getRules(refreshCache); + if(!(selector instanceof Array)){ + return rs[selector]; + } + for(var i = 0; i < selector.length; i++){ + if(rs[selector[i]]){ + return rs[selector[i]]; + } + } + return null; + }, + + + /** + * Updates a rule property + * @param {String/Array} selector If it's an array it tries each selector until it finds one. Stops immediately once one is found. + * @param {String} property The css property + * @param {String} value The new value for the property + * @return {Boolean} true If a rule was found and updated + */ + updateRule : function(selector, property, value){ + if(!(selector instanceof Array)){ + var rule = this.getRule(selector); + if(rule){ + rule.style[property.replace(camelRe, camelFn)] = value; + return true; + } + }else{ + for(var i = 0; i < selector.length; i++){ + if(this.updateRule(selector[i], property, value)){ + return true; + } + } + } + return false; + } + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/ClickRepeater.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/ClickRepeater.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/ClickRepeater.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,157 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + @class Ext.util.ClickRepeater + @extends Ext.util.Observable + + A wrapper class which can be applied to any element. Fires a "click" event while the + mouse is pressed. The interval between firings may be specified in the config but + defaults to 20 milliseconds. + + Optionally, a CSS class may be applied to the element during the time it is pressed. + + @cfg {Mixed} el The element to act as a button. + @cfg {Number} delay The initial delay before the repeating event begins firing. + Similar to an autorepeat key delay. + @cfg {Number} interval The interval between firings of the "click" event. Default 20 ms. + @cfg {String} pressClass A CSS class name to be applied to the element while pressed. + @cfg {Boolean} accelerate True if autorepeating should start slowly and accelerate. + "interval" and "delay" are ignored. + @cfg {Boolean} preventDefault True to prevent the default click event + @cfg {Boolean} stopDefault True to stop the default click event + + @history + 2007-02-02 jvs Original code contributed by Nige "Animal" White + 2007-02-02 jvs Renamed to ClickRepeater + 2007-02-03 jvs Modifications for FF Mac and Safari + + @constructor + @param {Mixed} el The element to listen on + @param {Object} config + */ +Ext.util.ClickRepeater = function(el, config) +{ + this.el = Ext.get(el); + this.el.unselectable(); + + Ext.apply(this, config); + + this.addEvents( + /** + * @event mousedown + * Fires when the mouse button is depressed. + * @param {Ext.util.ClickRepeater} this + */ + "mousedown", + /** + * @event click + * Fires on a specified interval during the time the element is pressed. + * @param {Ext.util.ClickRepeater} this + */ + "click", + /** + * @event mouseup + * Fires when the mouse key is released. + * @param {Ext.util.ClickRepeater} this + */ + "mouseup" + ); + + this.el.on("mousedown", this.handleMouseDown, this); + if(this.preventDefault || this.stopDefault){ + this.el.on("click", function(e){ + if(this.preventDefault){ + e.preventDefault(); + } + if(this.stopDefault){ + e.stopEvent(); + } + }, this); + } + + // allow inline handler + if(this.handler){ + this.on("click", this.handler, this.scope || this); + } + + Ext.util.ClickRepeater.superclass.constructor.call(this); +}; + +Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { + interval : 20, + delay: 250, + preventDefault : true, + stopDefault : false, + timer : 0, + + // private + handleMouseDown : function(){ + clearTimeout(this.timer); + this.el.blur(); + if(this.pressClass){ + this.el.addClass(this.pressClass); + } + this.mousedownTime = new Date(); + + Ext.getDoc().on("mouseup", this.handleMouseUp, this); + this.el.on("mouseout", this.handleMouseOut, this); + + this.fireEvent("mousedown", this); + this.fireEvent("click", this); + +// Do not honor delay or interval if acceleration wanted. + if (this.accelerate) { + this.delay = 400; + } + this.timer = this.click.defer(this.delay || this.interval, this); + }, + + // private + click : function(){ + this.fireEvent("click", this); + this.timer = this.click.defer(this.accelerate ? + this.easeOutExpo(this.mousedownTime.getElapsed(), + 400, + -390, + 12000) : + this.interval, this); + }, + + easeOutExpo : function (t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + + // private + handleMouseOut : function(){ + clearTimeout(this.timer); + if(this.pressClass){ + this.el.removeClass(this.pressClass); + } + this.el.on("mouseover", this.handleMouseReturn, this); + }, + + // private + handleMouseReturn : function(){ + this.el.un("mouseover", this.handleMouseReturn); + if(this.pressClass){ + this.el.addClass(this.pressClass); + } + this.click(); + }, + + // private + handleMouseUp : function(){ + clearTimeout(this.timer); + this.el.un("mouseover", this.handleMouseReturn); + this.el.un("mouseout", this.handleMouseOut); + Ext.getDoc().un("mouseup", this.handleMouseUp); + this.el.removeClass(this.pressClass); + this.fireEvent("mouseup", this); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Date.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Date.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Date.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,886 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Date + * + * The date parsing and format syntax is a subset of + * PHP's date() function, and the formats that are + * supported will provide results equivalent to their PHP versions. + * + * The following is a list of all currently supported formats: + *
        +Format  Description                                                               Example returned values
        +------  -----------------------------------------------------------------------   -----------------------
        +  d     Day of the month, 2 digits with leading zeros                             01 to 31
        +  D     A short textual representation of the day of the week                     Mon to Sun
        +  j     Day of the month without leading zeros                                    1 to 31
        +  l     A full textual representation of the day of the week                      Sunday to Saturday
        +  N     ISO-8601 numeric representation of the day of the week                    1 (for Monday) through 7 (for Sunday)
        +  S     English ordinal suffix for the day of the month, 2 characters             st, nd, rd or th. Works well with j
        +  w     Numeric representation of the day of the week                             0 (for Sunday) to 6 (for Saturday)
        +  z     The day of the year (starting from 0)                                     0 to 364 (365 in leap years)
        +  W     ISO-8601 week number of year, weeks starting on Monday                    01 to 53
        +  F     A full textual representation of a month, such as January or March        January to December
        +  m     Numeric representation of a month, with leading zeros                     01 to 12
        +  M     A short textual representation of a month                                 Jan to Dec
        +  n     Numeric representation of a month, without leading zeros                  1 to 12
        +  t     Number of days in the given month                                         28 to 31
        +  L     Whether it's a leap year                                                  1 if it is a leap year, 0 otherwise.
        +  o     ISO-8601 year number (identical to (Y), but if the ISO week number (W)    Examples: 1998 or 2004
        +        belongs to the previous or next year, that year is used instead)
        +  Y     A full numeric representation of a year, 4 digits                         Examples: 1999 or 2003
        +  y     A two digit representation of a year                                      Examples: 99 or 03
        +  a     Lowercase Ante meridiem and Post meridiem                                 am or pm
        +  A     Uppercase Ante meridiem and Post meridiem                                 AM or PM
        +  g     12-hour format of an hour without leading zeros                           1 to 12
        +  G     24-hour format of an hour without leading zeros                           0 to 23
        +  h     12-hour format of an hour with leading zeros                              01 to 12
        +  H     24-hour format of an hour with leading zeros                              00 to 23
        +  i     Minutes, with leading zeros                                               00 to 59
        +  s     Seconds, with leading zeros                                               00 to 59
        +  u     Milliseconds, with leading zeros                                          001 to 999
        +  O     Difference to Greenwich time (GMT) in hours and minutes                   Example: +1030
        +  P     Difference to Greenwich time (GMT) with colon between hours and minutes   Example: -08:00
        +  T     Timezone abbreviation of the machine running the code                     Examples: EST, MDT, PDT ...
        +  Z     Timezone offset in seconds (negative if west of UTC, positive if east)    -43200 to 50400
        +  c     ISO 8601 date                                                             2007-04-17T15:19:21+08:00
        +  U     Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT)                1193432466 or -2138434463
        +
        + * + * Example usage (note that you must escape format specifiers with '\\' to render them as character literals): + *
        
        +// Sample date:
        +// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
        +
        +var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
        +document.write(dt.format('Y-m-d'));                         // 2007-01-10
        +document.write(dt.format('F j, Y, g:i a'));                 // January 10, 2007, 3:05 pm
        +document.write(dt.format('l, \\t\\he jS of F Y h:i:s A'));  // Wednesday, the 10th of January 2007 03:05:01 PM
        + 
        + * + * Here are some standard date/time patterns that you might find helpful. They + * are not part of the source of Date.js, but to use them you can simply copy this + * block of code into any script that is included after Date.js and they will also become + * globally available on the Date object. Feel free to add or remove patterns as needed in your code. + *
        
        +Date.patterns = {
        +    ISO8601Long:"Y-m-d H:i:s",
        +    ISO8601Short:"Y-m-d",
        +    ShortDate: "n/j/Y",
        +    LongDate: "l, F d, Y",
        +    FullDateTime: "l, F d, Y g:i:s A",
        +    MonthDay: "F d",
        +    ShortTime: "g:i A",
        +    LongTime: "g:i:s A",
        +    SortableDateTime: "Y-m-d\\TH:i:s",
        +    UniversalSortableDateTime: "Y-m-d H:i:sO",
        +    YearMonth: "F, Y"
        +};
        +
        + * + * Example usage: + *
        
        +var dt = new Date();
        +document.write(dt.format(Date.patterns.ShortDate));
        + 
        + */ + +/* + * Most of the date-formatting functions below are the excellent work of Baron Schwartz. + * They generate precompiled functions from date formats instead of parsing and + * processing the pattern every time you format a date. These functions are available + * on every Date object (any javascript function). + * + * The original article and download are here: + * http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/ + * + */ + +// private +Date.parseFunctions = {count:0}; +// private +Date.parseRegexes = []; +// private +Date.formatFunctions = {count:0}; + +// private +Date.prototype.dateFormat = function(format) { + if (Date.formatFunctions[format] == null) { + Date.createNewFormat(format); + } + var func = Date.formatFunctions[format]; + return this[func](); +}; + + +/** + * Formats a date given the supplied format string. + * @param {String} format The format string. + * @return {String} The formatted date. + * @method + */ +Date.prototype.format = Date.prototype.dateFormat; + +// private +Date.createNewFormat = function(format) { + var funcName = "format" + Date.formatFunctions.count++; + Date.formatFunctions[format] = funcName; + var code = "Date.prototype." + funcName + " = function(){return "; + var special = false; + var ch = ''; + for (var i = 0; i < format.length; ++i) { + ch = format.charAt(i); + if (!special && ch == "\\") { + special = true; + } + else if (special) { + special = false; + code += "'" + String.escape(ch) + "' + "; + } + else { + code += Date.getFormatCode(ch); + } + } + eval(code.substring(0, code.length - 3) + ";}"); +}; + +// private +Date.getFormatCode = function(character) { + switch (character) { + case "d": + return "String.leftPad(this.getDate(), 2, '0') + "; + case "D": + return "Date.getShortDayName(this.getDay()) + "; // get L10n short day name + case "j": + return "this.getDate() + "; + case "l": + return "Date.dayNames[this.getDay()] + "; + case "N": + return "(this.getDay() ? this.getDay() : 7) + "; + case "S": + return "this.getSuffix() + "; + case "w": + return "this.getDay() + "; + case "z": + return "this.getDayOfYear() + "; + case "W": + return "String.leftPad(this.getWeekOfYear(), 2, '0') + "; + case "F": + return "Date.monthNames[this.getMonth()] + "; + case "m": + return "String.leftPad(this.getMonth() + 1, 2, '0') + "; + case "M": + return "Date.getShortMonthName(this.getMonth()) + "; // get L10n short month name + case "n": + return "(this.getMonth() + 1) + "; + case "t": + return "this.getDaysInMonth() + "; + case "L": + return "(this.isLeapYear() ? 1 : 0) + "; + case "o": + return "(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0))) + "; + case "Y": + return "this.getFullYear() + "; + case "y": + return "('' + this.getFullYear()).substring(2, 4) + "; + case "a": + return "(this.getHours() < 12 ? 'am' : 'pm') + "; + case "A": + return "(this.getHours() < 12 ? 'AM' : 'PM') + "; + case "g": + return "((this.getHours() % 12) ? this.getHours() % 12 : 12) + "; + case "G": + return "this.getHours() + "; + case "h": + return "String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0') + "; + case "H": + return "String.leftPad(this.getHours(), 2, '0') + "; + case "i": + return "String.leftPad(this.getMinutes(), 2, '0') + "; + case "s": + return "String.leftPad(this.getSeconds(), 2, '0') + "; + case "u": + return "String.leftPad(this.getMilliseconds(), 3, '0') + "; + case "O": + return "this.getGMTOffset() + "; + case "P": + return "this.getGMTOffset(true) + "; + case "T": + return "this.getTimezone() + "; + case "Z": + return "(this.getTimezoneOffset() * -60) + "; + case "c": + for (var df = Date.getFormatCode, c = "Y-m-dTH:i:sP", code = "", i = 0, l = c.length; i < l; ++i) { + var e = c.charAt(i); + code += e == "T" ? "'T' + " : df(e); // treat T as a literal + } + return code; + case "U": + return "Math.round(this.getTime() / 1000) + "; + default: + return "'" + String.escape(character) + "' + "; + } +}; + +/** + * Parses the passed string using the specified format. Note that this function expects dates in normal calendar + * format, meaning that months are 1-based (1 = January) and not zero-based like in JavaScript dates. Any part of + * the date format that is not specified will default to the current date value for that part. Time parts can also + * be specified, but default to 0. Keep in mind that the input date string must precisely match the specified format + * string or the parse operation will fail. + * Example Usage: +
        
        +//dt = Fri May 25 2007 (current date)
        +var dt = new Date();
        +
        +//dt = Thu May 25 2006 (today's month/day in 2006)
        +dt = Date.parseDate("2006", "Y");
        +
        +//dt = Sun Jan 15 2006 (all date parts specified)
        +dt = Date.parseDate("2006-01-15", "Y-m-d");
        +
        +//dt = Sun Jan 15 2006 15:20:01 GMT-0600 (CST)
        +dt = Date.parseDate("2006-01-15 3:20:01 PM", "Y-m-d h:i:s A" );
        +
        + * @param {String} input The unparsed date as a string. + * @param {String} format The format the date is in. + * @return {Date} The parsed date. + * @static + */ +Date.parseDate = function(input, format) { + if (Date.parseFunctions[format] == null) { + Date.createParser(format); + } + var func = Date.parseFunctions[format]; + return Date[func](input); +}; + +// private +Date.createParser = function(format) { + var funcName = "parse" + Date.parseFunctions.count++; + var regexNum = Date.parseRegexes.length; + var currentGroup = 1; + Date.parseFunctions[format] = funcName; + + var code = "Date." + funcName + " = function(input){\n" + + "var y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, ms = -1, o, z, u, v;\n" + + "var d = new Date();\n" + + "y = d.getFullYear();\n" + + "m = d.getMonth();\n" + + "d = d.getDate();\n" + + "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n" + + "if (results && results.length > 0) {"; + var regex = ""; + + var special = false; + var ch = ''; + for (var i = 0; i < format.length; ++i) { + ch = format.charAt(i); + if (!special && ch == "\\") { + special = true; + } + else if (special) { + special = false; + regex += String.escape(ch); + } + else { + var obj = Date.formatCodeToRegex(ch, currentGroup); + currentGroup += obj.g; + regex += obj.s; + if (obj.g && obj.c) { + code += obj.c; + } + } + } + + code += "if (u)\n" + + "{v = new Date(u * 1000);}" // give top priority to UNIX time + + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0)\n" + + "{v = new Date(y, m, d, h, i, s, ms);}\n" + + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n" + + "{v = new Date(y, m, d, h, i, s);}\n" + + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n" + + "{v = new Date(y, m, d, h, i);}\n" + + "else if (y >= 0 && m >= 0 && d > 0 && h >= 0)\n" + + "{v = new Date(y, m, d, h);}\n" + + "else if (y >= 0 && m >= 0 && d > 0)\n" + + "{v = new Date(y, m, d);}\n" + + "else if (y >= 0 && m >= 0)\n" + + "{v = new Date(y, m);}\n" + + "else if (y >= 0)\n" + + "{v = new Date(y);}\n" + + "}return (v && (z || o))?\n" // favour UTC offset over GMT offset + + " (z ? v.add(Date.SECOND, (v.getTimezoneOffset() * 60) + (z*1)) :\n" // reset to UTC, then add offset + + " v.add(Date.HOUR, (v.getGMTOffset() / 100) + (o / -100))) : v\n" // reset to GMT, then add offset + + ";}"; + + Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i"); + eval(code); +}; + +// private +Date.formatCodeToRegex = function(character, currentGroup) { + /* + * currentGroup = position in regex result array + * g = calculation group (0 or 1. only group 1 contributes to date calculations.) + * c = calculation method (required for group 1. null for group 0.) + * s = regex string + */ + switch (character) { + case "d": + return {g:1, + c:"d = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; // day of month with leading zeroes (01 - 31) + case "D": + for (var a = [], i = 0; i < 7; a.push(Date.getShortDayName(i)), ++i); // get L10n short day names + return {g:0, + c:null, + s:"(?:" + a.join("|") +")"}; + case "j": + return {g:1, + c:"d = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{1,2})"}; // day of month without leading zeroes (1 - 31) + case "l": + return {g:0, + c:null, + s:"(?:" + Date.dayNames.join("|") + ")"}; + case "N": + return {g:0, + c:null, + s:"[1-7]"}; // ISO-8601 day number (1 (monday) - 7 (sunday)) + case "S": + return {g:0, + c:null, + s:"(?:st|nd|rd|th)"}; + case "w": + return {g:0, + c:null, + s:"[0-6]"}; // javascript day number (0 (sunday) - 6 (saturday)) + case "z": + return {g:0, + c:null, + s:"(?:\\d{1,3}"}; // day of the year (0 - 364 (365 in leap years)) + case "W": + return {g:0, + c:null, + s:"(?:\\d{2})"}; // ISO-8601 week number (with leading zero) + case "F": + return {g:1, + c:"m = parseInt(Date.getMonthNumber(results[" + currentGroup + "]), 10);\n", // get L10n month number + s:"(" + Date.monthNames.join("|") + ")"}; + case "m": + return {g:1, + c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n", + s:"(\\d{2})"}; // month number with leading zeros (01 - 12) + case "M": + for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); // get L10n short month names + return {g:1, + c:"m = parseInt(Date.getMonthNumber(results[" + currentGroup + "]), 10);\n", // get L10n month number + s:"(" + a.join("|") + ")"}; + case "n": + return {g:1, + c:"m = parseInt(results[" + currentGroup + "], 10) - 1;\n", + s:"(\\d{1,2})"}; // month number without leading zeros (1 - 12) + case "t": + return {g:0, + c:null, + s:"(?:\\d{2})"}; // no. of days in the month (28 - 31) + case "L": + return {g:0, + c:null, + s:"(?:1|0)"}; + case "o": + case "Y": + return {g:1, + c:"y = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{4})"}; // 4-digit year + case "y": + return {g:1, + c:"var ty = parseInt(results[" + currentGroup + "], 10);\n" + + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", + s:"(\\d{1,2})"}; // 2-digit year + case "a": + return {g:1, + c:"if (results[" + currentGroup + "] == 'am') {\n" + + "if (h == 12) { h = 0; }\n" + + "} else { if (h < 12) { h += 12; }}", + s:"(am|pm)"}; + case "A": + return {g:1, + c:"if (results[" + currentGroup + "] == 'AM') {\n" + + "if (h == 12) { h = 0; }\n" + + "} else { if (h < 12) { h += 12; }}", + s:"(AM|PM)"}; + case "g": + case "G": + return {g:1, + c:"h = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{1,2})"}; // 24-hr format of an hour without leading zeroes (0 - 23) + case "h": + case "H": + return {g:1, + c:"h = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; // 24-hr format of an hour with leading zeroes (00 - 23) + case "i": + return {g:1, + c:"i = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; // minutes with leading zeros (00 - 59) + case "s": + return {g:1, + c:"s = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{2})"}; // seconds with leading zeros (00 - 59) + case "u": + return {g:1, + c:"ms = parseInt(results[" + currentGroup + "], 10);\n", + s:"(\\d{3})"}; // milliseconds with leading zeros (000 - 999) + case "O": + return {g:1, + c:[ + "o = results[", currentGroup, "];\n", + "var sn = o.substring(0,1);\n", // get + / - sign + "var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);\n", // get hours (performs minutes-to-hour conversion also, just in case) + "var mn = o.substring(3,5) % 60;\n", // get minutes + "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n", // -12hrs <= GMT offset <= 14hrs + " (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n" + ].join(""), + s: "([+\-]\\d{4})"}; // GMT offset in hrs and mins + case "P": + return {g:1, + c:[ + "o = results[", currentGroup, "];\n", + "var sn = o.substring(0,1);\n", // get + / - sign + "var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);\n", // get hours (performs minutes-to-hour conversion also, just in case) + "var mn = o.substring(4,6) % 60;\n", // get minutes + "o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))?\n", // -12hrs <= GMT offset <= 14hrs + " (sn + String.leftPad(hr, 2, 0) + String.leftPad(mn, 2, 0)) : null;\n" + ].join(""), + s: "([+\-]\\d{2}:\\d{2})"}; // GMT offset in hrs and mins (with colon separator) + case "T": + return {g:0, + c:null, + s:"[A-Z]{1,4}"}; // timezone abbrev. may be between 1 - 4 chars + case "Z": + return {g:1, + c:"z = results[" + currentGroup + "] * 1;\n" // -43200 <= UTC offset <= 50400 + + "z = (-43200 <= z && z <= 50400)? z : null;\n", + s:"([+\-]?\\d{1,5})"}; // leading '+' sign is optional for UTC offset + case "c": + var df = Date.formatCodeToRegex, calc = []; + var arr = [df("Y", 1), df("m", 2), df("d", 3), df("h", 4), df("i", 5), df("s", 6), df("P", 7)]; + for (var i = 0, l = arr.length; i < l; ++i) { + calc.push(arr[i].c); + } + return {g:1, + c:calc.join(""), + s:arr[0].s + "-" + arr[1].s + "-" + arr[2].s + "T" + arr[3].s + ":" + arr[4].s + ":" + arr[5].s + arr[6].s}; + case "U": + return {g:1, + c:"u = parseInt(results[" + currentGroup + "], 10);\n", + s:"(-?\\d+)"}; // leading minus sign indicates seconds before UNIX epoch + default: + return {g:0, + c:null, + s:Ext.escapeRe(character)}; + } +}; + +/** + * Get the timezone abbreviation of the current date (equivalent to the format specifier 'T'). + * + * Note: The date string returned by the javascript Date object's toString() method varies + * between browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America). + * For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)", + * getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses + * (which may or may not be present), failing which it proceeds to get the timezone abbreviation + * from the GMT offset portion of the date string. + * @return {String} The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...). + */ +Date.prototype.getTimezone = function() { + // the following list shows the differences between date strings from different browsers on a WinXP SP2 machine from an Asian locale: + // + // Opera : "Thu, 25 Oct 2007 22:53:45 GMT+0800" -- shortest (weirdest) date string of the lot + // Safari : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone (same as FF) + // FF : "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)" -- value in parentheses always gives the correct timezone + // IE : "Thu Oct 25 22:54:35 UTC+0800 2007" -- (Asian system setting) look for 3-4 letter timezone abbrev + // IE : "Thu Oct 25 17:06:37 PDT 2007" -- (American system setting) look for 3-4 letter timezone abbrev + // + // this crazy regex attempts to guess the correct timezone abbreviation despite these differences. + // step 1: (?:\((.*)\) -- find timezone in parentheses + // step 2: ([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?) -- if nothing was found in step 1, find timezone from timezone offset portion of date string + // step 3: remove all non uppercase characters found in step 1 and 2 + return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/, "$1$2").replace(/[^A-Z]/g, ""); +}; + +/** + * Get the offset from GMT of the current date (equivalent to the format specifier 'O'). + * @param {Boolean} colon true to separate the hours and minutes with a colon (defaults to false). + * @return {String} The 4-character offset string prefixed with + or - (e.g. '-0600'). + */ +Date.prototype.getGMTOffset = function(colon) { + return (this.getTimezoneOffset() > 0 ? "-" : "+") + + String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset() / 60)), 2, "0") + + (colon ? ":" : "") + + String.leftPad(this.getTimezoneOffset() % 60, 2, "0"); +}; + +/** + * Get the numeric day number of the year, adjusted for leap year. + * @return {Number} 0 to 364 (365 in leap years). + */ +Date.prototype.getDayOfYear = function() { + var num = 0; + Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; + for (var i = 0; i < this.getMonth(); ++i) { + num += Date.daysInMonth[i]; + } + return num + this.getDate() - 1; +}; + +/** + * Get the numeric ISO-8601 week number of the year. + * (equivalent to the format specifier 'W', but without a leading zero). + * @return {Number} 1 to 53 + */ +Date.prototype.getWeekOfYear = function() { + // adapted from http://www.merlyn.demon.co.uk/weekcalc.htm + var ms1d = 864e5; // milliseconds in a day + var ms7d = 7 * ms1d; // milliseconds in a week + var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d; // an Absolute Day Number + var AWN = Math.floor(DC3 / 7); // an Absolute Week Number + var Wyr = new Date(AWN * ms7d).getUTCFullYear(); + return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1; +}; + +/** + * Whether or not the current date is in a leap year. + * @return {Boolean} True if the current date is in a leap year, else false. + */ +Date.prototype.isLeapYear = function() { + var year = this.getFullYear(); + return ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year))); +}; + +/** + * Get the first day of the current month, adjusted for leap year. The returned value + * is the numeric day index within the week (0-6) which can be used in conjunction with + * the {@link #monthNames} array to retrieve the textual day name. + * Example: + *
        
        +var dt = new Date('1/10/2007');
        +document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'
        +
        + * @return {Number} The day number (0-6). + */ +Date.prototype.getFirstDayOfMonth = function() { + var day = (this.getDay() - (this.getDate() - 1)) % 7; + return (day < 0) ? (day + 7) : day; +}; + +/** + * Get the last day of the current month, adjusted for leap year. The returned value + * is the numeric day index within the week (0-6) which can be used in conjunction with + * the {@link #monthNames} array to retrieve the textual day name. + * Example: + *
        
        +var dt = new Date('1/10/2007');
        +document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'
        +
        + * @return {Number} The day number (0-6). + */ +Date.prototype.getLastDayOfMonth = function() { + var day = (this.getDay() + (Date.daysInMonth[this.getMonth()] - this.getDate())) % 7; + return (day < 0) ? (day + 7) : day; +}; + + +/** + * Get the date of the first day of the month in which this date resides. + * @return {Date} + */ +Date.prototype.getFirstDateOfMonth = function() { + return new Date(this.getFullYear(), this.getMonth(), 1); +}; + +/** + * Get the date of the last day of the month in which this date resides. + * @return {Date} + */ +Date.prototype.getLastDateOfMonth = function() { + return new Date(this.getFullYear(), this.getMonth(), this.getDaysInMonth()); +}; +/** + * Get the number of days in the current month, adjusted for leap year. + * @return {Number} The number of days in the month. + */ +Date.prototype.getDaysInMonth = function() { + Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; + return Date.daysInMonth[this.getMonth()]; +}; + +/** + * Get the English ordinal suffix of the current day (equivalent to the format specifier 'S'). + * @return {String} 'st, 'nd', 'rd' or 'th'. + */ +Date.prototype.getSuffix = function() { + switch (this.getDate()) { + case 1: + case 21: + case 31: + return "st"; + case 2: + case 22: + return "nd"; + case 3: + case 23: + return "rd"; + default: + return "th"; + } +}; + +// private +Date.daysInMonth = [31,28,31,30,31,30,31,31,30,31,30,31]; + +/** + * An array of textual month names. + * Override these values for international dates, for example... + * Date.monthNames = ['JanInYourLang', 'FebInYourLang', ...]; + * @type Array + * @static + */ +Date.monthNames = + ["January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"]; + +/** + * Get the short month name for the given month number. + * Override this function for international dates. + * @param {Number} month A zero-based javascript month number. + * @return {String} The short month name. + * @static + */ +Date.getShortMonthName = function(month) { + return Date.monthNames[month].substring(0, 3); +} + +/** + * An array of textual day names. + * Override these values for international dates, for example... + * Date.dayNames = ['SundayInYourLang', 'MondayInYourLang', ...]; + * @type Array + * @static + */ +Date.dayNames = + ["Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday"]; + +/** + * Get the short day name for the given day number. + * Override this function for international dates. + * @param {Number} day A zero-based javascript day number. + * @return {String} The short day name. + * @static + */ +Date.getShortDayName = function(day) { + return Date.dayNames[day].substring(0, 3); +} + +// private +Date.y2kYear = 50; + +/** + * An object hash of zero-based javascript month numbers (with short month names as keys. note: keys are case-sensitive). + * Override these values for international dates, for example... + * Date.monthNumbers = {'ShortJanNameInYourLang':0, 'ShortFebNameInYourLang':1, ...}; + * @type Object + * @static + */ +Date.monthNumbers = { + Jan:0, + Feb:1, + Mar:2, + Apr:3, + May:4, + Jun:5, + Jul:6, + Aug:7, + Sep:8, + Oct:9, + Nov:10, + Dec:11}; + +/** + * Get the zero-based javascript month number for the given short/full month name. + * Override this function for international dates. + * @param {String} name The short/full month name. + * @return {Number} The zero-based javascript month number. + * @static + */ +Date.getMonthNumber = function(name) { + // handle camel casing for english month names (since the keys for the Date.monthNumbers hash are case sensitive) + return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; +} + +/** + * Creates and returns a new Date instance with the exact same date value as the called instance. + * Dates are copied and passed by reference, so if a copied date variable is modified later, the original + * variable will also be changed. When the intention is to create a new variable that will not + * modify the original instance, you should create a clone. + * + * Example of correctly cloning a date: + *
        
        +//wrong way:
        +var orig = new Date('10/1/2006');
        +var copy = orig;
        +copy.setDate(5);
        +document.write(orig);  //returns 'Thu Oct 05 2006'!
        +
        +//correct way:
        +var orig = new Date('10/1/2006');
        +var copy = orig.clone();
        +copy.setDate(5);
        +document.write(orig);  //returns 'Thu Oct 01 2006'
        +
        + * @return {Date} The new Date instance. + */ +Date.prototype.clone = function() { + return new Date(this.getTime()); +}; + +/** + * Clears any time information from this date. + @param {Boolean} clone true to create a clone of this date, clear the time and return it (defaults to false). + @return {Date} this or the clone. + */ +Date.prototype.clearTime = function(clone){ + if(clone){ + return this.clone().clearTime(); + } + this.setHours(0); + this.setMinutes(0); + this.setSeconds(0); + this.setMilliseconds(0); + return this; +}; + +// private +// safari setMonth is broken +if(Ext.isSafari){ + Date.brokenSetMonth = Date.prototype.setMonth; + Date.prototype.setMonth = function(num){ + if(num <= -1){ + var n = Math.ceil(-num); + var back_year = Math.ceil(n/12); + var month = (n % 12) ? 12 - n % 12 : 0 ; + this.setFullYear(this.getFullYear() - back_year); + return Date.brokenSetMonth.call(this, month); + } else { + return Date.brokenSetMonth.apply(this, arguments); + } + }; +} + +/** Date interval constant @static @type String */ +Date.MILLI = "ms"; +/** Date interval constant @static @type String */ +Date.SECOND = "s"; +/** Date interval constant @static @type String */ +Date.MINUTE = "mi"; +/** Date interval constant @static @type String */ +Date.HOUR = "h"; +/** Date interval constant @static @type String */ +Date.DAY = "d"; +/** Date interval constant @static @type String */ +Date.MONTH = "mo"; +/** Date interval constant @static @type String */ +Date.YEAR = "y"; + +/** + * Provides a convenient method of performing basic date arithmetic. This method + * does not modify the Date instance being called - it creates and returns + * a new Date instance containing the resulting date value. + * + * Examples: + *
        
        +//Basic usage:
        +var dt = new Date('10/29/2006').add(Date.DAY, 5);
        +document.write(dt); //returns 'Fri Oct 06 2006 00:00:00'
        +
        +//Negative values will subtract correctly:
        +var dt2 = new Date('10/1/2006').add(Date.DAY, -5);
        +document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00'
        +
        +//You can even chain several calls together in one line!
        +var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30);
        +document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'
        + 
        + * + * @param {String} interval A valid date interval enum value. + * @param {Number} value The amount to add to the current date. + * @return {Date} The new Date instance. + */ +Date.prototype.add = function(interval, value){ + var d = this.clone(); + if (!interval || value === 0) return d; + switch(interval.toLowerCase()){ + case Date.MILLI: + d.setMilliseconds(this.getMilliseconds() + value); + break; + case Date.SECOND: + d.setSeconds(this.getSeconds() + value); + break; + case Date.MINUTE: + d.setMinutes(this.getMinutes() + value); + break; + case Date.HOUR: + d.setHours(this.getHours() + value); + break; + case Date.DAY: + d.setDate(this.getDate() + value); + break; + case Date.MONTH: + var day = this.getDate(); + if(day > 28){ + day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate()); + } + d.setDate(day); + d.setMonth(this.getMonth() + value); + break; + case Date.YEAR: + d.setFullYear(this.getFullYear() + value); + break; + } + return d; +}; + +/** + * Checks if this date falls on or between the given start and end dates. + * @param {Date} start Start date + * @param {Date} end End date + * @return {Boolean} true if this date falls on or between the given start and end dates. + */ +Date.prototype.between = function(start, end){ + var t = this.getTime(); + return start.getTime() <= t && t <= end.getTime(); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/DelayedTask.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/DelayedTask.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/DelayedTask.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,62 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.DelayedTask + * Provides a convenient method of performing setTimeout where a new + * timeout cancels the old timeout. An example would be performing validation on a keypress. + * You can use this class to buffer + * the keypress events for a certain number of milliseconds, and perform only if they stop + * for that amount of time. + * @constructor The parameters to this constructor serve as defaults and are not required. + * @param {Function} fn (optional) The default function to timeout + * @param {Object} scope (optional) The default scope of that timeout + * @param {Array} args (optional) The default Array of arguments + */ +Ext.util.DelayedTask = function(fn, scope, args){ + var id = null, d, t; + + var call = function(){ + var now = new Date().getTime(); + if(now - t >= d){ + clearInterval(id); + id = null; + fn.apply(scope, args || []); + } + }; + /** + * Cancels any pending timeout and queues a new one + * @param {Number} delay The milliseconds to delay + * @param {Function} newFn (optional) Overrides function passed to constructor + * @param {Object} newScope (optional) Overrides scope passed to constructor + * @param {Array} newArgs (optional) Overrides args passed to constructor + */ + this.delay = function(delay, newFn, newScope, newArgs){ + if(id && delay != d){ + this.cancel(); + } + d = delay; + t = new Date().getTime(); + fn = newFn || fn; + scope = newScope || scope; + args = newArgs || args; + if(!id){ + id = setInterval(call, d); + } + }; + + /** + * Cancel the last queued timeout + */ + this.cancel = function(){ + if(id){ + clearInterval(id); + id = null; + } + }; +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Format.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Format.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Format.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,223 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.Format + * Reusable data formatting functions + * @singleton + */ +Ext.util.Format = function(){ + var trimRe = /^\s+|\s+$/g; + return { + /** + * Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length + * @param {String} value The string to truncate + * @param {Number} length The maximum length to allow before truncating + * @return {String} The converted text + */ + ellipsis : function(value, len){ + if(value && value.length > len){ + return value.substr(0, len-3)+"..."; + } + return value; + }, + + /** + * Checks a reference and converts it to empty string if it is undefined + * @param {Mixed} value Reference to check + * @return {Mixed} Empty string if converted, otherwise the original value + */ + undef : function(value){ + return value !== undefined ? value : ""; + }, + + /** + * Checks a reference and converts it to the default value if it's empty + * @param {Mixed} value Reference to check + * @param {String} defaultValue The value to insert of it's undefined (defaults to "") + * @return {String} + */ + defaultValue : function(value, defaultValue){ + return value !== undefined && value !== '' ? value : defaultValue; + }, + + /** + * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages. + * @param {String} value The string to encode + * @return {String} The encoded text + */ + htmlEncode : function(value){ + return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/, and ') from their HTML character equivalents. + * @param {String} value The string to decode + * @return {String} The decoded text + */ + htmlDecode : function(value){ + return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/</g, "<").replace(/"/g, '"'); + }, + + /** + * Trims any whitespace from either side of a string + * @param {String} value The text to trim + * @return {String} The trimmed text + */ + trim : function(value){ + return String(value).replace(trimRe, ""); + }, + + /** + * Returns a substring from within an original string + * @param {String} value The original text + * @param {Number} start The start index of the substring + * @param {Number} length The length of the substring + * @return {String} The substring + */ + substr : function(value, start, length){ + return String(value).substr(start, length); + }, + + /** + * Converts a string to all lower case letters + * @param {String} value The text to convert + * @return {String} The converted text + */ + lowercase : function(value){ + return String(value).toLowerCase(); + }, + + /** + * Converts a string to all upper case letters + * @param {String} value The text to convert + * @return {String} The converted text + */ + uppercase : function(value){ + return String(value).toUpperCase(); + }, + + /** + * Converts the first character only of a string to upper case + * @param {String} value The text to convert + * @return {String} The converted text + */ + capitalize : function(value){ + return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase(); + }, + + // private + call : function(value, fn){ + if(arguments.length > 2){ + var args = Array.prototype.slice.call(arguments, 2); + args.unshift(value); + return eval(fn).apply(window, args); + }else{ + return eval(fn).call(window, value); + } + }, + + /** + * Format a number as US currency + * @param {Number/String} value The numeric value to format + * @return {String} The formatted currency string + */ + usMoney : function(v){ + v = (Math.round((v-0)*100))/100; + v = (v == Math.floor(v)) ? v + ".00" : ((v*10 == Math.floor(v*10)) ? v + "0" : v); + v = String(v); + var ps = v.split('.'); + var whole = ps[0]; + var sub = ps[1] ? '.'+ ps[1] : '.00'; + var r = /(\d+)(\d{3})/; + while (r.test(whole)) { + whole = whole.replace(r, '$1' + ',' + '$2'); + } + v = whole + sub; + if(v.charAt(0) == '-'){ + return '-$' + v.substr(1); + } + return "$" + v; + }, + + /** + * Parse a value into a formatted date using the specified format pattern. + * @param {Mixed} value The value to format + * @param {String} format (optional) Any valid date format string (defaults to 'm/d/Y') + * @return {String} The formatted date string + */ + date : function(v, format){ + if(!v){ + return ""; + } + if(!(v instanceof Date)){ + v = new Date(Date.parse(v)); + } + return v.dateFormat(format || "m/d/Y"); + }, + + /** + * Returns a date rendering function that can be reused to apply a date format multiple times efficiently + * @param {String} format Any valid date format string + * @return {Function} The date formatting function + */ + dateRenderer : function(format){ + return function(v){ + return Ext.util.Format.date(v, format); + }; + }, + + // private + stripTagsRE : /<\/?[^>]+>/gi, + + /** + * Strips all HTML tags + * @param {Mixed} value The text from which to strip tags + * @return {String} The stripped text + */ + stripTags : function(v){ + return !v ? v : String(v).replace(this.stripTagsRE, ""); + }, + + stripScriptsRe : /(?:)((\n|\r|.)*?)(?:<\/script>)/ig, + + /** + * Strips all script tags + * @param {Mixed} value The text from which to strip script tags + * @return {String} The stripped text + */ + stripScripts : function(v){ + return !v ? v : String(v).replace(this.stripScriptsRe, ""); + }, + + /** + * Simple format for a file size (xxx bytes, xxx KB, xxx MB) + * @param {Number/String} size The numeric value to format + * @return {String} The formatted file size + */ + fileSize : function(size){ + if(size < 1024) { + return size + " bytes"; + } else if(size < 1048576) { + return (Math.round(((size*10) / 1024))/10) + " KB"; + } else { + return (Math.round(((size*10) / 1048576))/10) + " MB"; + } + }, + + math : function(){ + var fns = {}; + return function(v, a){ + if(!fns[a]){ + fns[a] = new Function('v', 'return v ' + a + ';'); + } + return fns[a](v); + } + }() + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/JSON.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/JSON.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/JSON.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,143 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.JSON + * Modified version of Douglas Crockford"s json.js that doesn"t + * mess with the Object prototype + * http://www.json.org/js.html + * @singleton + */ +Ext.util.JSON = new (function(){ + var useHasOwn = {}.hasOwnProperty ? true : false; + + // crashes Safari in some instances + //var validRE = /^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/; + + var pad = function(n) { + return n < 10 ? "0" + n : n; + }; + + var m = { + "\b": '\\b', + "\t": '\\t', + "\n": '\\n', + "\f": '\\f', + "\r": '\\r', + '"' : '\\"', + "\\": '\\\\' + }; + + var 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 + '"'; + }; + + var encodeArray = function(o){ + var a = ["["], b, i, l = o.length, v; + for (i = 0; i < l; i += 1) { + v = o[i]; + switch (typeof v) { + case "undefined": + case "function": + case "unknown": + break; + default: + if (b) { + a.push(','); + } + a.push(v === null ? "null" : Ext.util.JSON.encode(v)); + b = true; + } + } + a.push("]"); + return a.join(""); + }; + + var encodeDate = function(o){ + return '"' + o.getFullYear() + "-" + + pad(o.getMonth() + 1) + "-" + + pad(o.getDate()) + "T" + + pad(o.getHours()) + ":" + + pad(o.getMinutes()) + ":" + + pad(o.getSeconds()) + '"'; + }; + + /** + * Encodes an Object, Array or other value + * @param {Mixed} o The variable to encode + * @return {String} The JSON string + */ + this.encode = function(o){ + if(typeof o == "undefined" || o === null){ + return "null"; + }else if(o instanceof Array){ + return encodeArray(o); + }else if(o instanceof Date){ + return encodeDate(o); + }else if(typeof o == "string"){ + return encodeString(o); + }else if(typeof o == "number"){ + return isFinite(o) ? String(o) : "null"; + }else if(typeof o == "boolean"){ + return String(o); + }else { + var a = ["{"], b, i, v; + for (i in o) { + 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(this.encode(i), ":", + v === null ? "null" : this.encode(v)); + b = true; + } + } + } + a.push("}"); + return a.join(""); + } + }; + + /** + * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError. + * @param {String} json The JSON string + * @return {Object} The resulting object + */ + this.decode = function(json){ + return eval("(" + json + ')'); + }; +})(); +/** + * Shorthand for {@link Ext.util.JSON#encode} + * @member Ext encode + * @method */ +Ext.encode = Ext.util.JSON.encode; +/** + * Shorthand for {@link Ext.util.JSON#decode} + * @member Ext decode + * @method */ +Ext.decode = Ext.util.JSON.decode; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/KeyMap.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/KeyMap.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/KeyMap.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,221 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.KeyMap + * Handles mapping keys to actions for an element. One key map can be used for multiple actions. + * The constructor accepts the same config object as defined by {@link #addBinding}. + * If you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key + * combination it will call the function with this signature (if the match is a multi-key + * combination the callback will still be called only once): (String key, Ext.EventObject e) + * A KeyMap can also handle a string representation of keys.
        + * Usage: +
        
        +// map one key by key code
        +var map = new Ext.KeyMap("my-element", {
        +    key: 13, // or Ext.EventObject.ENTER
        +    fn: myHandler,
        +    scope: myObject
        +});
        +
        +// map multiple keys to one action by string
        +var map = new Ext.KeyMap("my-element", {
        +    key: "a\r\n\t",
        +    fn: myHandler,
        +    scope: myObject
        +});
        +
        +// map multiple keys to multiple actions by strings and array of codes
        +var map = new Ext.KeyMap("my-element", [
        +    {
        +        key: [10,13],
        +        fn: function(){ alert("Return was pressed"); }
        +    }, {
        +        key: "abc",
        +        fn: function(){ alert('a, b or c was pressed'); }
        +    }, {
        +        key: "\t",
        +        ctrl:true,
        +        shift:true,
        +        fn: function(){ alert('Control + shift + tab was pressed.'); }
        +    }
        +]);
        +
        + * Note: A KeyMap starts enabled + * @constructor + * @param {Mixed} el The element to bind to + * @param {Object} config The config (see {@link #addBinding}) + * @param {String} eventName (optional) The event to bind to (defaults to "keydown") + */ +Ext.KeyMap = function(el, config, eventName){ + this.el = Ext.get(el); + this.eventName = eventName || "keydown"; + this.bindings = []; + if(config){ + this.addBinding(config); + } + this.enable(); +}; + +Ext.KeyMap.prototype = { + /** + * True to stop the event from bubbling and prevent the default browser action if the + * key was handled by the KeyMap (defaults to false) + * @type Boolean + */ + stopEvent : false, + + /** + * Add a new binding to this KeyMap. The following config object properties are supported: + *
        +Property    Type             Description
        +----------  ---------------  ----------------------------------------------------------------------
        +key         String/Array     A single keycode or an array of keycodes to handle
        +shift       Boolean          True to handle key only when shift is pressed (defaults to false)
        +ctrl        Boolean          True to handle key only when ctrl is pressed (defaults to false)
        +alt         Boolean          True to handle key only when alt is pressed (defaults to false)
        +handler     Function         The function to call when KeyMap finds the expected key combination
        +fn          Function         Alias of handler (for backwards-compatibility)
        +scope       Object           The scope of the callback function
        +
        + * + * Usage: + *
        
        +// Create a KeyMap
        +var map = new Ext.KeyMap(document, {
        +    key: Ext.EventObject.ENTER,
        +    fn: handleKey,
        +    scope: this
        +});
        +
        +//Add a new binding to the existing KeyMap later
        +map.addBinding({
        +    key: 'abc',
        +    shift: true,
        +    fn: handleKey,
        +    scope: this
        +});
        +
        + * @param {Object/Array} config A single KeyMap config or an array of configs + */ + addBinding : function(config){ + if(config instanceof Array){ + for(var i = 0, len = config.length; i < len; i++){ + this.addBinding(config[i]); + } + return; + } + var keyCode = config.key, + shift = config.shift, + ctrl = config.ctrl, + alt = config.alt, + fn = config.fn || config.handler, + scope = config.scope; + + if(typeof keyCode == "string"){ + var ks = []; + var keyString = keyCode.toUpperCase(); + for(var j = 0, len = keyString.length; j < len; j++){ + ks.push(keyString.charCodeAt(j)); + } + keyCode = ks; + } + var keyArray = keyCode instanceof Array; + + var handler = function(e){ + if((!shift || e.shiftKey) && (!ctrl || e.ctrlKey) && (!alt || e.altKey)){ + var k = e.getKey(); + if(keyArray){ + for(var i = 0, len = keyCode.length; i < len; i++){ + if(keyCode[i] == k){ + if(this.stopEvent){ + e.stopEvent(); + } + fn.call(scope || window, k, e); + return; + } + } + }else{ + if(k == keyCode){ + if(this.stopEvent){ + e.stopEvent(); + } + fn.call(scope || window, k, e); + } + } + } + }; + this.bindings.push(handler); + }, + + /** + * Shorthand for adding a single key listener + * @param {Number/Array/Object} key Either the numeric key code, array of key codes or an object with the + * following options: + * {key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)} + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function + */ + on : function(key, fn, scope){ + var keyCode, shift, ctrl, alt; + if(typeof key == "object" && !(key instanceof Array)){ + keyCode = key.key; + shift = key.shift; + ctrl = key.ctrl; + alt = key.alt; + }else{ + keyCode = key; + } + this.addBinding({ + key: keyCode, + shift: shift, + ctrl: ctrl, + alt: alt, + fn: fn, + scope: scope + }) + }, + + // private + handleKeyDown : function(e){ + if(this.enabled){ //just in case + var b = this.bindings; + for(var i = 0, len = b.length; i < len; i++){ + b[i].call(this, e); + } + } + }, + + /** + * Returns true if this KeyMap is enabled + * @return {Boolean} + */ + isEnabled : function(){ + return this.enabled; + }, + + /** + * Enables this KeyMap + */ + enable: function(){ + if(!this.enabled){ + this.el.on(this.eventName, this.handleKeyDown, this); + this.enabled = true; + } + }, + + /** + * Disable this KeyMap + */ + disable: function(){ + if(this.enabled){ + this.el.removeListener(this.eventName, this.handleKeyDown, this); + this.enabled = false; + } + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/KeyNav.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/KeyNav.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/KeyNav.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,153 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.KeyNav + *

        Provides a convenient wrapper for normalized keyboard navigation. KeyNav allows you to bind + * navigation keys to function calls that will get called when the keys are pressed, providing an easy + * way to implement custom navigation schemes for any UI component.

        + *

        The following are all of the possible keys that can be implemented: enter, left, right, up, down, tab, esc, + * pageUp, pageDown, del, home, end. Usage:

        +
        
        +var nav = new Ext.KeyNav("my-element", {
        +    "left" : function(e){
        +        this.moveLeft(e.ctrlKey);
        +    },
        +    "right" : function(e){
        +        this.moveRight(e.ctrlKey);
        +    },
        +    "enter" : function(e){
        +        this.save();
        +    },
        +    scope : this
        +});
        +
        + * @constructor + * @param {Mixed} el The element to bind to + * @param {Object} config The config + */ +Ext.KeyNav = function(el, config){ + this.el = Ext.get(el); + Ext.apply(this, config); + if(!this.disabled){ + this.disabled = true; + this.enable(); + } +}; + +Ext.KeyNav.prototype = { + /** + * @cfg {Boolean} disabled + * True to disable this KeyNav instance (defaults to false) + */ + disabled : false, + /** + * @cfg {String} defaultEventAction + * The method to call on the {@link Ext.EventObject} after this KeyNav intercepts a key. Valid values are + * {@link Ext.EventObject#stopEvent}, {@link Ext.EventObject#preventDefault} and + * {@link Ext.EventObject#stopPropagation} (defaults to 'stopEvent') + */ + defaultEventAction: "stopEvent", + /** + * @cfg {Boolean} forceKeyDown + * Handle the keydown event instead of keypress (defaults to false). KeyNav automatically does this for IE since + * IE does not propagate special keys on keypress, but setting this to true will force other browsers to also + * handle keydown instead of keypress. + */ + forceKeyDown : false, + + // private + prepareEvent : function(e){ + var k = e.getKey(); + var h = this.keyToHandler[k]; + //if(h && this[h]){ + // e.stopPropagation(); + //} + if(Ext.isSafari && h && k >= 37 && k <= 40){ + e.stopEvent(); + } + }, + + // private + relay : function(e){ + var k = e.getKey(); + var h = this.keyToHandler[k]; + if(h && this[h]){ + if(this.doRelay(e, this[h], h) !== true){ + e[this.defaultEventAction](); + } + } + }, + + // private + doRelay : function(e, h, hname){ + return h.call(this.scope || this, e); + }, + + // possible handlers + enter : false, + left : false, + right : false, + up : false, + down : false, + tab : false, + esc : false, + pageUp : false, + pageDown : false, + del : false, + home : false, + end : false, + + // quick lookup hash + keyToHandler : { + 37 : "left", + 39 : "right", + 38 : "up", + 40 : "down", + 33 : "pageUp", + 34 : "pageDown", + 46 : "del", + 36 : "home", + 35 : "end", + 13 : "enter", + 27 : "esc", + 9 : "tab" + }, + + /** + * Enable this KeyNav + */ + enable: function(){ + if(this.disabled){ + // ie won't do special keys on keypress, no one else will repeat keys with keydown + // the EventObject will normalize Safari automatically + if(this.forceKeyDown || Ext.isIE || Ext.isAir){ + this.el.on("keydown", this.relay, this); + }else{ + this.el.on("keydown", this.prepareEvent, this); + this.el.on("keypress", this.relay, this); + } + this.disabled = false; + } + }, + + /** + * Disable this KeyNav + */ + disable: function(){ + if(!this.disabled){ + if(this.forceKeyDown || Ext.isIE || Ext.isAir){ + this.el.un("keydown", this.relay); + }else{ + this.el.un("keydown", this.prepareEvent); + this.el.un("keypress", this.relay); + } + this.disabled = true; + } + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/MixedCollection.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/MixedCollection.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/MixedCollection.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,568 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.MixedCollection + * @extends Ext.util.Observable + * A Collection class that maintains both numeric indexes and keys and exposes events. + * @constructor + * @param {Boolean} allowFunctions True if the addAll function should add function references to the + * collection (defaults to false) + * @param {Function} keyFn A function that can accept an item of the type(s) stored in this MixedCollection + * and return the key value for that item. This is used when available to look up the key on items that + * were passed without an explicit key parameter to a MixedCollection method. Passing this parameter is + * equivalent to providing an implementation for the {@link #getKey} method. + */ +Ext.util.MixedCollection = function(allowFunctions, keyFn){ + this.items = []; + this.map = {}; + this.keys = []; + this.length = 0; + this.addEvents( + /** + * @event clear + * Fires when the collection is cleared. + */ + "clear", + /** + * @event add + * Fires when an item is added to the collection. + * @param {Number} index The index at which the item was added. + * @param {Object} o The item added. + * @param {String} key The key associated with the added item. + */ + "add", + /** + * @event replace + * Fires when an item is replaced in the collection. + * @param {String} key he key associated with the new added. + * @param {Object} old The item being replaced. + * @param {Object} new The new item. + */ + "replace", + /** + * @event remove + * Fires when an item is removed from the collection. + * @param {Object} o The item being removed. + * @param {String} key (optional) The key associated with the removed item. + */ + "remove", + "sort" + ); + this.allowFunctions = allowFunctions === true; + if(keyFn){ + this.getKey = keyFn; + } + Ext.util.MixedCollection.superclass.constructor.call(this); +}; + +Ext.extend(Ext.util.MixedCollection, Ext.util.Observable, { + allowFunctions : false, + +/** + * Adds an item to the collection. Fires the {@link #add} event when complete. + * @param {String} key The key to associate with the item + * @param {Object} o The item to add. + * @return {Object} The item added. + */ + add : function(key, o){ + if(arguments.length == 1){ + o = arguments[0]; + key = this.getKey(o); + } + if(typeof key == "undefined" || key === null){ + this.length++; + this.items.push(o); + this.keys.push(null); + }else{ + var old = this.map[key]; + if(old){ + return this.replace(key, o); + } + this.length++; + this.items.push(o); + this.map[key] = o; + this.keys.push(key); + } + this.fireEvent("add", this.length-1, o, key); + return o; + }, + +/** + * MixedCollection has a generic way to fetch keys if you implement getKey. The default implementation + * simply returns item.id but you can provide your own implementation + * to return a different value as in the following examples: +
        
        +// normal way
        +var mc = new Ext.util.MixedCollection();
        +mc.add(someEl.dom.id, someEl);
        +mc.add(otherEl.dom.id, otherEl);
        +//and so on
        +
        +// using getKey
        +var mc = new Ext.util.MixedCollection();
        +mc.getKey = function(el){
        +   return el.dom.id;
        +};
        +mc.add(someEl);
        +mc.add(otherEl);
        +
        +// or via the constructor
        +var mc = new Ext.util.MixedCollection(false, function(el){
        +   return el.dom.id;
        +});
        +mc.add(someEl);
        +mc.add(otherEl);
        +
        + * @param {Object} item The item for which to find the key. + * @return {Object} The key for the passed item. + */ + getKey : function(o){ + return o.id; + }, + +/** + * Replaces an item in the collection. Fires the {@link #replace} event when complete. + * @param {String} key The key associated with the item to replace, or the item to replace. + * @param o {Object} o (optional) If the first parameter passed was a key, the item to associate with that key. + * @return {Object} The new item. + */ + replace : function(key, o){ + if(arguments.length == 1){ + o = arguments[0]; + key = this.getKey(o); + } + var old = this.item(key); + if(typeof key == "undefined" || key === null || typeof old == "undefined"){ + return this.add(key, o); + } + var index = this.indexOfKey(key); + this.items[index] = o; + this.map[key] = o; + this.fireEvent("replace", key, old, o); + return o; + }, + +/** + * Adds all elements of an Array or an Object to the collection. + * @param {Object/Array} objs An Object containing properties which will be added to the collection, or + * an Array of values, each of which are added to the collection. + */ + addAll : function(objs){ + if(arguments.length > 1 || objs instanceof Array){ + var args = arguments.length > 1 ? arguments : objs; + for(var i = 0, len = args.length; i < len; i++){ + this.add(args[i]); + } + }else{ + for(var key in objs){ + if(this.allowFunctions || typeof objs[key] != "function"){ + this.add(key, objs[key]); + } + } + } + }, + +/** + * Executes the specified function once for every item in the collection, passing the following arguments: + *
          + *
        • item : Mixed

          The collection item

        • + *
        • index : Number

          The item's index

        • + *
        • length : Number

          The total number of items in the collection

        • + *
        + * The function should return a boolean value. Returning false from the function will stop the iteration. + * @param {Function} fn The function to execute for each item. + * @param {Object} scope (optional) The scope in which to execute the function. + */ + each : function(fn, scope){ + var items = [].concat(this.items); // each safe for removal + for(var i = 0, len = items.length; i < len; i++){ + if(fn.call(scope || items[i], items[i], i, len) === false){ + break; + } + } + }, + +/** + * Executes the specified function once for every key in the collection, passing each + * key, and its associated item as the first two parameters. + * @param {Function} fn The function to execute for each item. + * @param {Object} scope (optional) The scope in which to execute the function. + */ + 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); + } + }, + + /** + * Returns the first item in the collection which elicits a true return value from the + * passed selection function. + * @param {Function} fn The selection function to execute for each item. + * @param {Object} scope (optional) The scope in which to execute the function. + * @return {Object} The first item in the collection which returned true from the selection function. + */ + 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])){ + return this.items[i]; + } + } + return null; + }, + +/** + * Inserts an item at the specified index in the collection. Fires the {@link #add} event when complete. + * @param {Number} index The index to insert the item at. + * @param {String} key The key to associate with the new item, or the item itself. + * @param {Object} o (optional) If the second parameter was a key, the new item. + * @return {Object} The item inserted. + */ + insert : function(index, key, o){ + if(arguments.length == 2){ + o = arguments[1]; + key = this.getKey(o); + } + if(index >= this.length){ + return this.add(key, o); + } + this.length++; + this.items.splice(index, 0, o); + if(typeof key != "undefined" && key != null){ + this.map[key] = o; + } + this.keys.splice(index, 0, key); + this.fireEvent("add", index, o, key); + return o; + }, + +/** + * Removed an item from the collection. + * @param {Object} o The item to remove. + * @return {Object} The item removed or false if no item was removed. + */ + remove : function(o){ + return this.removeAt(this.indexOf(o)); + }, + +/** + * Remove an item from a specified index in the collection. Fires the {@link #remove} event when complete. + * @param {Number} index The index within the collection of the item to remove. + * @return {Object} The item removed or false if no item was removed. + */ + removeAt : function(index){ + if(index < this.length && index >= 0){ + this.length--; + var o = this.items[index]; + this.items.splice(index, 1); + var key = this.keys[index]; + if(typeof key != "undefined"){ + delete this.map[key]; + } + this.keys.splice(index, 1); + this.fireEvent("remove", o, key); + return o; + } + return false; + }, + +/** + * Removed an item associated with the passed key fom the collection. + * @param {String} key The key of the item to remove. + * @return {Object} The item removed or false if no item was removed. + */ + removeKey : function(key){ + return this.removeAt(this.indexOfKey(key)); + }, + +/** + * Returns the number of items in the collection. + * @return {Number} the number of items in the collection. + */ + getCount : function(){ + return this.length; + }, + +/** + * Returns index within the collection of the passed Object. + * @param {Object} o The item to find the index of. + * @return {Number} index of the item. + */ + indexOf : function(o){ + return this.items.indexOf(o); + }, + +/** + * Returns index within the collection of the passed key. + * @param {String} key The key to find the index of. + * @return {Number} index of the key. + */ + indexOfKey : function(key){ + return this.keys.indexOf(key); + }, + +/** + * Returns the item associated with the passed key OR index. Key has priority over index. This is the equivalent + * of calling {@link #key} first, then if nothing matched calling {@link #itemAt}. + * @param {String/Number} key The key or index of the item. + * @return {Object} The item associated with the passed key. + */ + item : function(key){ + var item = typeof this.map[key] != "undefined" ? this.map[key] : this.items[key]; + return typeof item != 'function' || this.allowFunctions ? item : null; // for prototype! + }, + +/** + * Returns the item at the specified index. + * @param {Number} index The index of the item. + * @return {Object} The item at the specified index. + */ + itemAt : function(index){ + return this.items[index]; + }, + +/** + * Returns the item associated with the passed key. + * @param {String/Number} key The key of the item. + * @return {Object} The item associated with the passed key. + */ + key : function(key){ + return this.map[key]; + }, + +/** + * Returns true if the collection contains the passed Object as an item. + * @param {Object} o The Object to look for in the collection. + * @return {Boolean} True if the collection contains the Object as an item. + */ + contains : function(o){ + return this.indexOf(o) != -1; + }, + +/** + * Returns true if the collection contains the passed Object as a key. + * @param {String} key The key to look for in the collection. + * @return {Boolean} True if the collection contains the Object as a key. + */ + containsKey : function(key){ + return typeof this.map[key] != "undefined"; + }, + +/** + * Removes all items from the collection. Fires the {@link #clear} event when complete. + */ + clear : function(){ + this.length = 0; + this.items = []; + this.keys = []; + this.map = {}; + this.fireEvent("clear"); + }, + +/** + * Returns the first item in the collection. + * @return {Object} the first item in the collection.. + */ + first : function(){ + return this.items[0]; + }, + +/** + * Returns the last item in the collection. + * @return {Object} the last item in the collection.. + */ + last : function(){ + return this.items[this.length-1]; + }, + + // private + _sort : function(property, dir, fn){ + var dsc = String(dir).toUpperCase() == "DESC" ? -1 : 1; + fn = fn || function(a, b){ + return a-b; + }; + var c = [], k = this.keys, items = this.items; + for(var i = 0, len = items.length; i < len; i++){ + c[c.length] = {key: k[i], value: items[i], index: i}; + } + c.sort(function(a, b){ + var v = fn(a[property], b[property]) * dsc; + if(v == 0){ + v = (a.index < b.index ? -1 : 1); + } + return v; + }); + for(var i = 0, len = c.length; i < len; i++){ + items[i] = c[i].value; + k[i] = c[i].key; + } + this.fireEvent("sort", this); + }, + + /** + * Sorts this collection with the passed comparison function + * @param {String} direction (optional) "ASC" or "DESC" + * @param {Function} fn (optional) comparison function + */ + sort : function(dir, fn){ + this._sort("value", dir, fn); + }, + + /** + * Sorts this collection by keys + * @param {String} direction (optional) "ASC" or "DESC" + * @param {Function} fn (optional) a comparison function (defaults to case insensitive string) + */ + keySort : function(dir, fn){ + this._sort("key", dir, fn || function(a, b){ + return String(a).toUpperCase()-String(b).toUpperCase(); + }); + }, + + /** + * Returns a range of items in this collection + * @param {Number} startIndex (optional) defaults to 0 + * @param {Number} endIndex (optional) default to the last item + * @return {Array} An array of items + */ + getRange : function(start, end){ + var items = this.items; + if(items.length < 1){ + return []; + } + start = start || 0; + end = Math.min(typeof end == "undefined" ? this.length-1 : end, this.length-1); + var r = []; + if(start <= end){ + for(var i = start; i <= end; i++) { + r[r.length] = items[i]; + } + }else{ + for(var i = start; i >= end; i--) { + r[r.length] = items[i]; + } + } + return r; + }, + + /** + * Filter the objects in this collection by a specific property. + * Returns a new collection that has been filtered. + * @param {String} property A property on your objects + * @param {String/RegExp} value Either string that the property values + * should start with or a RegExp to test against the property + * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning + * @param {Boolean} caseSensitive (optional) True for case sensitive comparison (defaults to False). + * @return {MixedCollection} The new filtered collection + */ + filter : function(property, value, anyMatch, caseSensitive){ + if(Ext.isEmpty(value, false)){ + return this.clone(); + } + value = this.createValueMatcher(value, anyMatch, caseSensitive); + return this.filterBy(function(o){ + return o && value.test(o[property]); + }); + }, + + /** + * Filter by a function. Returns a new collection that has been filtered. + * The passed function will be called with each object in the collection. + * If the function returns true, the value is included otherwise it is filtered. + * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key) + * @param {Object} scope (optional) The scope of the function (defaults to this) + * @return {MixedCollection} The new filtered collection + */ + filterBy : function(fn, scope){ + var r = new Ext.util.MixedCollection(); + r.getKey = this.getKey; + var k = this.keys, it = this.items; + for(var i = 0, len = it.length; i < len; i++){ + if(fn.call(scope||this, it[i], k[i])){ + r.add(k[i], it[i]); + } + } + return r; + }, + + /** + * Finds the index of the first matching object in this collection by a specific property/value. + * Returns a new collection that has been filtered. + * @param {String} property The name of a property on your objects. + * @param {String/RegExp} value A string that the property values + * should start with or a RegExp to test against the property. + * @param {Number} start (optional) The index to start searching at (defaults to 0). + * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning. + * @param {Boolean} caseSensitive (optional) True for case sensitive comparison. + * @return {Number} The matched index or -1 + */ + findIndex : function(property, value, start, anyMatch, caseSensitive){ + if(Ext.isEmpty(value, false)){ + return -1; + } + value = this.createValueMatcher(value, anyMatch, caseSensitive); + return this.findIndexBy(function(o){ + return o && value.test(o[property]); + }, null, start); + }, + + /** + * Find the index of the first matching object in this collection by a function. + * If the function returns true it is considered a match. + * @param {Function} fn The function to be called, it will receive the args o (the object), k (the key). + * @param {Object} scope (optional) The scope of the function (defaults to this). + * @param {Number} start (optional) The index to start searching at (defaults to 0). + * @return {Number} The matched index or -1 + */ + findIndexBy : function(fn, scope, start){ + var k = this.keys, it = this.items; + for(var i = (start||0), len = it.length; i < len; i++){ + if(fn.call(scope||this, it[i], k[i])){ + return i; + } + } + if(typeof start == 'number' && start > 0){ + for(var i = 0; i < start; i++){ + if(fn.call(scope||this, it[i], k[i])){ + return i; + } + } + } + return -1; + }, + + // private + createValueMatcher : function(value, anyMatch, caseSensitive){ + if(!value.exec){ // not a regex + value = String(value); + value = new RegExp((anyMatch === true ? '' : '^') + Ext.escapeRe(value), caseSensitive ? '' : 'i'); + } + return value; + }, + + /** + * Creates a duplicate of this collection + * @return {MixedCollection} + */ + clone : function(){ + var r = new Ext.util.MixedCollection(); + var k = this.keys, it = this.items; + for(var i = 0, len = it.length; i < len; i++){ + r.add(k[i], it[i]); + } + r.getKey = this.getKey; + return r; + } +}); +/** + * Returns the item associated with the passed key or index. + * @method + * @param {String/Number} key The key or index of the item. + * @return {Object} The item associated with the passed key. + */ +Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Observable.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Observable.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/Observable.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,470 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.Observable + * Abstract base class that provides a common interface for publishing events. Subclasses are expected to + * to have a property "events" with all the events defined.
        + * For example: + *
        
        + Employee = function(name){
        +    this.name = name;
        +    this.addEvents({
        +        "fired" : true,
        +        "quit" : true
        +    });
        + }
        + Ext.extend(Employee, Ext.util.Observable);
        +
        + */ +Ext.util.Observable = function(){ + /** + * @cfg {Object} listeners A config object containing one or more event handlers to be added to this + * object during initialization. This should be a valid listeners config object as specified in the + * {@link #addListener} example for attaching multiple handlers at once. + */ + if(this.listeners){ + this.on(this.listeners); + delete this.listeners; + } +}; +Ext.util.Observable.prototype = { + /** + * Fires the specified event with the passed parameters (minus the event name). + * @param {String} eventName + * @param {Object...} args Variable number of parameters are passed to handlers + * @return {Boolean} returns false if any of the handlers return false otherwise it returns true + */ + fireEvent : function(){ + if(this.eventsSuspended !== true){ + var ce = this.events[arguments[0].toLowerCase()]; + if(typeof ce == "object"){ + return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); + } + } + return true; + }, + + // private + filterOptRe : /^(?:scope|delay|buffer|single)$/, + + /** + * Appends an event handler to this component + * @param {String} eventName The type of event to listen for + * @param {Function} handler The method the event invokes + * @param {Object} scope (optional) The scope in which to execute the handler + * function. The handler function's "this" context. + * @param {Object} options (optional) An object containing handler configuration + * properties. This may contain any of the following properties:
          + *
        • scope : Object

          The scope in which to execute the handler function. The handler function's "this" context.

        • + *
        • delay : Number

          The number of milliseconds to delay the invocation of the handler after the event fires.

        • + *
        • single : Boolean

          True to add a handler to handle just the next firing of the event, and then remove itself.

        • + *
        • buffer {Number} Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed + * by the specified number of milliseconds. If the event fires again within that time, the original + * handler is not invoked, but the new handler is scheduled in its place.
        • + *

        + *

        + * Combining Options
        + * Using the options argument, it is possible to combine different types of listeners:
        + *
        + * A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId) + *

        
        +el.on('click', this.onClick, this, {
        +    single: true,
        +    delay: 100,
        +    forumId: 4
        +});
        + *

        + * Attaching multiple handlers in 1 call
        + * The method also allows for a single argument to be passed which is a config object containing properties + * which specify multiple handlers. + *

        + *

        
        +foo.on({
        +    'click' : {
        +        fn: this.onClick,
        +        scope: this,
        +        delay: 100
        +    },
        +    'mouseover' : {
        +        fn: this.onMouseOver,
        +        scope: this
        +    },
        +    'mouseout' : {
        +        fn: this.onMouseOut,
        +        scope: this
        +    }
        +});
        + *

        + * Or a shorthand syntax:
        + *

        
        +foo.on({
        +    'click' : this.onClick,
        +    'mouseover' : this.onMouseOver,
        +    'mouseout' : this.onMouseOut,
        +     scope: this
        +});
        + */ + addListener : function(eventName, fn, scope, o){ + if(typeof eventName == "object"){ + o = eventName; + for(var e in o){ + if(this.filterOptRe.test(e)){ + continue; + } + if(typeof o[e] == "function"){ + // shared options + this.addListener(e, o[e], o.scope, o); + }else{ + // individual options + this.addListener(e, o[e].fn, o[e].scope, o[e]); + } + } + return; + } + o = (!o || typeof o == "boolean") ? {} : o; + eventName = eventName.toLowerCase(); + var ce = this.events[eventName] || true; + if(typeof ce == "boolean"){ + ce = new Ext.util.Event(this, eventName); + this.events[eventName] = ce; + } + ce.addListener(fn, scope, o); + }, + + /** + * Removes a listener + * @param {String} eventName The type of event to listen for + * @param {Function} handler The handler to remove + * @param {Object} scope (optional) The scope (this object) for the handler + */ + removeListener : function(eventName, fn, scope){ + var ce = this.events[eventName.toLowerCase()]; + if(typeof ce == "object"){ + ce.removeListener(fn, scope); + } + }, + + /** + * Removes all listeners for this object + */ + purgeListeners : function(){ + for(var evt in this.events){ + if(typeof this.events[evt] == "object"){ + this.events[evt].clearListeners(); + } + } + }, + + relayEvents : function(o, events){ + var createHandler = function(ename){ + return function(){ + return this.fireEvent.apply(this, Ext.combine(ename, Array.prototype.slice.call(arguments, 0))); + }; + }; + for(var i = 0, len = events.length; i < len; i++){ + var ename = events[i]; + if(!this.events[ename]){ this.events[ename] = true; }; + o.on(ename, createHandler(ename), this); + } + }, + + /** + * Used to define events on this Observable + * @param {Object} object The object with the events defined + */ + addEvents : function(o){ + if(!this.events){ + this.events = {}; + } + if(typeof o == 'string'){ + for(var i = 0, a = arguments, v; v = a[i]; i++){ + if(!this.events[a[i]]){ + o[a[i]] = true; + } + } + }else{ + Ext.applyIf(this.events, o); + } + }, + + /** + * Checks to see if this object has any listeners for a specified event + * @param {String} eventName The name of the event to check for + * @return {Boolean} True if the event is being listened for, else false + */ + hasListener : function(eventName){ + var e = this.events[eventName]; + return typeof e == "object" && e.listeners.length > 0; + }, + + /** + * Suspend the firing of all events. (see {@link #resumeEvents}) + */ + suspendEvents : function(){ + this.eventsSuspended = true; + }, + + /** + * Resume firing events. (see {@link #suspendEvents}) + */ + resumeEvents : function(){ + this.eventsSuspended = false; + }, + + // these are considered experimental + // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call + // private + getMethodEvent : function(method){ + if(!this.methodEvents){ + this.methodEvents = {}; + } + var e = this.methodEvents[method]; + if(!e){ + e = {}; + this.methodEvents[method] = e; + + e.originalFn = this[method]; + e.methodName = method; + e.before = []; + e.after = []; + + + var returnValue, v, cancel; + var obj = this; + + var makeCall = function(fn, scope, args){ + if((v = fn.apply(scope || obj, args)) !== undefined){ + if(typeof v === 'object'){ + if(v.returnValue !== undefined){ + returnValue = v.returnValue; + }else{ + returnValue = v; + } + if(v.cancel === true){ + cancel = true; + } + }else if(v === false){ + cancel = true; + }else { + returnValue = v; + } + } + } + + this[method] = function(){ + returnValue = v = undefined; cancel = false; + var args = Array.prototype.slice.call(arguments, 0); + for(var i = 0, len = e.before.length; i < len; i++){ + makeCall(e.before[i].fn, e.before[i].scope, args); + if(cancel){ + return returnValue; + } + } + + if((v = e.originalFn.apply(obj, args)) !== undefined){ + returnValue = v; + } + + for(var i = 0, len = e.after.length; i < len; i++){ + makeCall(e.after[i].fn, e.after[i].scope, args); + if(cancel){ + return returnValue; + } + } + return returnValue; + }; + } + return e; + }, + + // adds an "interceptor" called before the original method + beforeMethod : function(method, fn, scope){ + var e = this.getMethodEvent(method); + e.before.push({fn: fn, scope: scope}); + }, + + // adds a "sequence" called after the original method + afterMethod : function(method, fn, scope){ + var e = this.getMethodEvent(method); + e.after.push({fn: fn, scope: scope}); + }, + + removeMethodListener : function(method, fn, scope){ + var e = this.getMethodEvent(method); + for(var i = 0, len = e.before.length; i < len; i++){ + if(e.before[i].fn == fn && e.before[i].scope == scope){ + e.before.splice(i, 1); + return; + } + } + for(var i = 0, len = e.after.length; i < len; i++){ + if(e.after[i].fn == fn && e.after[i].scope == scope){ + e.after.splice(i, 1); + return; + } + } + } +}; +/** + * Appends an event handler to this element (shorthand for addListener) + * @param {String} eventName The type of event to listen for + * @param {Function} handler The method the event invokes + * @param {Object} scope (optional) The scope in which to execute the handler + * function. The handler function's "this" context. + * @param {Object} options (optional) + * @method + */ +Ext.util.Observable.prototype.on = Ext.util.Observable.prototype.addListener; +/** + * Removes a listener (shorthand for removeListener) + * @param {String} eventName The type of event to listen for + * @param {Function} handler The handler to remove + * @param {Object} scope (optional) The scope (this object) for the handler + * @method + */ +Ext.util.Observable.prototype.un = Ext.util.Observable.prototype.removeListener; + +/** + * Starts capture on the specified Observable. All events will be passed + * to the supplied function with the event name + standard signature of the event + * before the event is fired. If the supplied function returns false, + * the event will not fire. + * @param {Observable} o The Observable to capture + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope (this object) for the fn + * @static + */ +Ext.util.Observable.capture = function(o, fn, scope){ + o.fireEvent = o.fireEvent.createInterceptor(fn, scope); +}; + +/** + * Removes all added captures from the Observable. + * @param {Observable} o The Observable to release + * @static + */ +Ext.util.Observable.releaseCapture = function(o){ + o.fireEvent = Ext.util.Observable.prototype.fireEvent; +}; + +(function(){ + + var createBuffered = function(h, o, scope){ + var task = new Ext.util.DelayedTask(); + return function(){ + task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0)); + }; + }; + + var createSingle = function(h, e, fn, scope){ + return function(){ + e.removeListener(fn, scope); + return h.apply(scope, arguments); + }; + }; + + var createDelayed = function(h, o, scope){ + return function(){ + var args = Array.prototype.slice.call(arguments, 0); + setTimeout(function(){ + h.apply(scope, args); + }, o.delay || 10); + }; + }; + + Ext.util.Event = function(obj, name){ + this.name = name; + this.obj = obj; + this.listeners = []; + }; + + Ext.util.Event.prototype = { + addListener : function(fn, scope, options){ + scope = scope || this.obj; + if(!this.isListening(fn, scope)){ + var l = this.createListener(fn, scope, options); + if(!this.firing){ + this.listeners.push(l); + }else{ // if we are currently firing this event, don't disturb the listener loop + this.listeners = this.listeners.slice(0); + this.listeners.push(l); + } + } + }, + + createListener : function(fn, scope, o){ + o = o || {}; + scope = scope || this.obj; + var l = {fn: fn, scope: scope, options: o}; + var h = fn; + if(o.delay){ + h = createDelayed(h, o, scope); + } + if(o.single){ + h = createSingle(h, this, fn, scope); + } + if(o.buffer){ + h = createBuffered(h, o, scope); + } + l.fireFn = h; + return l; + }, + + findListener : function(fn, scope){ + scope = scope || this.obj; + var ls = this.listeners; + for(var i = 0, len = ls.length; i < len; i++){ + var l = ls[i]; + if(l.fn == fn && l.scope == scope){ + return i; + } + } + return -1; + }, + + isListening : function(fn, scope){ + return this.findListener(fn, scope) != -1; + }, + + removeListener : function(fn, scope){ + var index; + if((index = this.findListener(fn, scope)) != -1){ + if(!this.firing){ + this.listeners.splice(index, 1); + }else{ + this.listeners = this.listeners.slice(0); + this.listeners.splice(index, 1); + } + return true; + } + return false; + }, + + clearListeners : function(){ + this.listeners = []; + }, + + fire : function(){ + var ls = this.listeners, scope, len = ls.length; + if(len > 0){ + this.firing = true; + var args = Array.prototype.slice.call(arguments, 0); + for(var i = 0; i < len; i++){ + var l = ls[i]; + if(l.fireFn.apply(l.scope||this.obj||window, arguments) === false){ + this.firing = false; + return false; + } + } + this.firing = false; + } + return true; + } + }; +})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/TaskMgr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/TaskMgr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/TaskMgr.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,157 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.TaskRunner + * Provides the ability to execute one or more arbitrary tasks in a multithreaded manner. Generally, you can use + * the singleton {@link Ext.TaskMgr} instead, but if needed, you can create separate instances of TaskRunner. Any + * number of separate tasks can be started at any time and will run independently of each other. Example usage: + *
        
        +// Start a simple clock task that updates a div once per second
        +var task = {
        +    run: function(){
        +        Ext.fly('clock').update(new Date().format('g:i:s A'));
        +    },
        +    interval: 1000 //1 second
        +}
        +var runner = new Ext.util.TaskRunner();
        +runner.start(task);
        +
        + * @constructor + * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance + * (defaults to 10) + */ +Ext.util.TaskRunner = function(interval){ + interval = interval || 10; + var tasks = [], removeQueue = []; + var id = 0; + var running = false; + + // private + var stopThread = function(){ + running = false; + clearInterval(id); + id = 0; + }; + + // private + var startThread = function(){ + if(!running){ + running = true; + id = setInterval(runTasks, interval); + } + }; + + // private + var removeTask = function(t){ + removeQueue.push(t); + if(t.onStop){ + t.onStop.apply(t.scope || t); + } + }; + + // private + var runTasks = function(){ + if(removeQueue.length > 0){ + for(var i = 0, len = removeQueue.length; i < len; i++){ + tasks.remove(removeQueue[i]); + } + removeQueue = []; + if(tasks.length < 1){ + stopThread(); + return; + } + } + var now = new Date().getTime(); + for(var i = 0, len = tasks.length; i < len; ++i){ + var t = tasks[i]; + var itime = now - t.taskRunTime; + if(t.interval <= itime){ + var rt = t.run.apply(t.scope || t, t.args || [++t.taskRunCount]); + t.taskRunTime = now; + if(rt === false || t.taskRunCount === t.repeat){ + removeTask(t); + return; + } + } + if(t.duration && t.duration <= (now - t.taskStartTime)){ + removeTask(t); + } + } + }; + + /** + * Starts a new task. + * @param {Object} task A config object that supports the following properties:
          + *
        • run : Function
          The function to execute each time the task is run. The + * function will be called at each interval and passed the args argument if specified. If a + * particular scope is required, be sure to specify it using the scope argument.
        • + *
        • interval : Number
          The frequency in milliseconds with which the task + * should be executed.
        • + *
        • args : Array
          (optional) An array of arguments to be passed to the function + * specified by run.
        • + *
        • scope : Object
          (optional) The scope in which to execute the + * run function.
        • + *
        • duration : Number
          (optional) The length of time in milliseconds to execute + * the task before stopping automatically (defaults to indefinite).
        • + *
        • repeat : Number
          (optional) The number of times to execute the task before + * stopping automatically (defaults to indefinite).
        • + *
        + * @return {Object} The task + */ + this.start = function(task){ + tasks.push(task); + task.taskStartTime = new Date().getTime(); + task.taskRunTime = 0; + task.taskRunCount = 0; + startThread(); + return task; + }; + + /** + * Stops an existing running task. + * @param {Object} task The task to stop + * @return {Object} The task + */ + this.stop = function(task){ + removeTask(task); + return task; + }; + + /** + * Stops all tasks that are currently running. + */ + this.stopAll = function(){ + stopThread(); + for(var i = 0, len = tasks.length; i < len; i++){ + if(tasks[i].onStop){ + tasks[i].onStop(); + } + } + tasks = []; + removeQueue = []; + }; +}; + +/** + * @class Ext.TaskMgr + * A static {@link Ext.util.TaskRunner} instance that can be used to start and stop arbitrary tasks. See + * {@link Ext.util.TaskRunner} for supported methods and task config properties. + *
        
        +// Start a simple clock task that updates a div once per second
        +var task = {
        +    run: function(){
        +        Ext.fly('clock').update(new Date().format('g:i:s A'));
        +    },
        +    interval: 1000 //1 second
        +}
        +Ext.TaskMgr.start(task);
        +
        + * @singleton + */ +Ext.TaskMgr = new Ext.util.TaskRunner(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/TextMetrics.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/TextMetrics.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/TextMetrics.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,121 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.util.TextMetrics + * Provides precise pixel measurements for blocks of text so that you can determine exactly how high and + * wide, in pixels, a given block of text will be. + * @singleton + */ +Ext.util.TextMetrics = function(){ + var shared; + return { + /** + * Measures the size of the specified text + * @param {String/HTMLElement} el The element, dom node or id from which to copy existing CSS styles + * that can affect the size of the rendered text + * @param {String} text The text to measure + * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width + * in order to accurately measure the text height + * @return {Object} An object containing the text's size {width: (width), height: (height)} + */ + measure : function(el, text, fixedWidth){ + if(!shared){ + shared = Ext.util.TextMetrics.Instance(el, fixedWidth); + } + shared.bind(el); + shared.setFixedWidth(fixedWidth || 'auto'); + return shared.getSize(text); + }, + + /** + * Return a unique TextMetrics instance that can be bound directly to an element and reused. This reduces + * the overhead of multiple calls to initialize the style properties on each measurement. + * @param {String/HTMLElement} el The element, dom node or id that the instance will be bound to + * @param {Number} fixedWidth (optional) If the text will be multiline, you have to set a fixed width + * in order to accurately measure the text height + * @return {Ext.util.TextMetrics.Instance} instance The new instance + */ + createInstance : function(el, fixedWidth){ + return Ext.util.TextMetrics.Instance(el, fixedWidth); + } + }; +}(); + +Ext.util.TextMetrics.Instance = function(bindTo, fixedWidth){ + var ml = new Ext.Element(document.createElement('div')); + document.body.appendChild(ml.dom); + ml.position('absolute'); + ml.setLeftTop(-1000, -1000); + ml.hide(); + + if(fixedWidth){ + ml.setWidth(fixedWidth); + } + + var instance = { + /** + * Returns the size of the specified text based on the internal element's style and width properties + * @param {String} text The text to measure + * @return {Object} An object containing the text's size {width: (width), height: (height)} + */ + getSize : function(text){ + ml.update(text); + var s = ml.getSize(); + ml.update(''); + return s; + }, + + /** + * Binds this TextMetrics instance to an element from which to copy existing CSS styles + * that can affect the size of the rendered text + * @param {String/HTMLElement} el The element, dom node or id + */ + bind : function(el){ + ml.setStyle( + Ext.fly(el).getStyles('font-size','font-style', 'font-weight', 'font-family','line-height') + ); + }, + + /** + * Sets a fixed width on the internal measurement element. If the text will be multiline, you have + * to set a fixed width in order to accurately measure the text height. + * @param {Number} width The width to set on the element + */ + setFixedWidth : function(width){ + ml.setWidth(width); + }, + + /** + * Returns the measured width of the specified text + * @param {String} text The text to measure + * @return {Number} width The width in pixels + */ + getWidth : function(text){ + ml.dom.style.width = 'auto'; + return this.getSize(text).width; + }, + + /** + * Returns the measured height of the specified text. For multiline text, be sure to call + * {@link #setFixedWidth} if necessary. + * @param {String} text The text to measure + * @return {Number} height The height in pixels + */ + getHeight : function(text){ + return this.getSize(text).height; + } + }; + + instance.bind(bindTo); + + return instance; +}; + +// backwards compat +Ext.Element.measureText = Ext.util.TextMetrics.measure; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/XTemplate.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/XTemplate.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/util/XTemplate.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,354 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** +* @class Ext.XTemplate +* @extends Ext.Template +*

        A template class that supports advanced functionality like autofilling arrays, conditional processing with +* basic comparison operators, sub-templates, basic math function support, special built-in template variables, +* inline code execution and more. XTemplate also provides the templating mechanism built into {@link Ext.DataView}.

        +*

        XTemplate supports many special tags and built-in operators that aren't defined as part of the API, but are +* supported in the templates that can be created. The following examples demonstrate all of the supported features. +* This is the data object used for reference in each code example:

        +*
        
        +var data = {
        +    name: 'Jack Slocum',
        +    title: 'Lead Developer',
        +    company: 'Ext JS, LLC',
        +    email: 'jack@extjs.com',
        +    address: '4 Red Bulls Drive',
        +    city: 'Cleveland',
        +    state: 'Ohio',
        +    zip: '44102',
        +    drinks: ['Red Bull', 'Coffee', 'Water'],
        +    kids: [{
        +        name: 'Sara Grace',
        +        age:3
        +    },{
        +        name: 'Zachary',
        +        age:2
        +    },{
        +        name: 'John James',
        +        age:0
        +    }]
        +};
        +
        +*

        Auto filling of arrays and scope switching
        Using the tpl tag and the for operator, +* you can switch to the scope of the object specified by for and access its members to populate the teamplte. +* If the variable in for is an array, it will auto-fill, repeating the template block inside the tpl +* tag for each item in the array:

        +*
        
        +var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Title: {title}</p>',
        +    '<p>Company: {company}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<p>{name}</p>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +
        +*

        Access to parent object from within sub-template scope
        When processing a sub-template, for example while +* looping through a child array, you can access the parent object's members via the parent object:

        +*
        
        +var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="age > 1">',
        +            '<p>{name}</p>',
        +            '<p>Dad: {parent.name}</p>',
        +        '</tpl>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +
        +*

        Array item index and basic math support
        While processing an array, the special variable {#} +* will provide the current array index + 1 (starts at 1, not 0). Templates also support the basic math operators +* + - * and / that can be applied directly on numeric data values:

        +*
        
        +var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="age > 1">',
        +            '<p>{#}: {name}</p>',  // <-- Auto-number each item
        +            '<p>In 5 Years: {age+5}</p>',  // <-- Basic math
        +            '<p>Dad: {parent.name}</p>',
        +        '</tpl>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +
        +*

        Auto-rendering of flat arrays
        Flat arrays that contain values (and not objects) can be auto-rendered +* using the special {.} variable inside a loop. This variable will represent the value of +* the array at the current index:

        +*
        
        +var tpl = new Ext.XTemplate(
        +    '<p>{name}\'s favorite beverages:</p>',
        +    '<tpl for="drinks">',
        +       '<div> - {.}</div>',
        +    '</tpl>'
        +);
        +tpl.overwrite(panel.body, data);
        +
        +*

        Basic conditional logic
        Using the tpl tag and the if +* operator you can provide conditional checks for deciding whether or not to render specific parts of the template. +* Note that there is no else operator — if needed, you should use two opposite if statements. +* Properly-encoded attributes are required as seen in the following example:

        +*
        
        +var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="age &gt; 1">',  // <-- Note that the > is encoded
        +            '<p>{name}</p>',
        +        '</tpl>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +
        +*

        Ability to execute arbitrary inline code
        In an XTemplate, anything between {[ ... ]} is considered +* code to be executed in the scope of the template. There are some special variables available in that code: +*

          +*
        • values: The values in the current scope. If you are using scope changing sub-templates, you +* can change what values is.
        • +*
        • parent: The scope (values) of the ancestor template.
        • +*
        • xindex: If you are in a looping template, the index of the loop you are in (1-based).
        • +*
        • xcount: If you are in a looping template, the total length of the array you are looping.
        • +*
        • fm: An alias for Ext.util.Format.
        • +*
        +* This example demonstrates basic row striping using an inline code block and the xindex variable:

        +*
        
        +var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Company: {[company.toUpperCase() + ', ' + title]}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +       '<div class="{[xindex % 2 === 0 ? "even" : "odd"]}">,
        +        '{name}',
        +        '</div>',
        +    '</tpl></p>'
        +);
        +tpl.overwrite(panel.body, data);
        +
        +*

        Template member functions
        One or more member functions can be defined directly on the config +* object passed into the XTemplate constructor for more complex processing:

        +*
        
        +var tpl = new Ext.XTemplate(
        +    '<p>Name: {name}</p>',
        +    '<p>Kids: ',
        +    '<tpl for="kids">',
        +        '<tpl if="this.isGirl(name)">',
        +            '<p>Girl: {name} - {age}</p>',
        +        '</tpl>',
        +        '<tpl if="this.isGirl(name) == false">',
        +            '<p>Boy: {name} - {age}</p>',
        +        '</tpl>',
        +        '<tpl if="this.isBaby(age)">',
        +            '<p>{name} is a baby!</p>',
        +        '</tpl>',
        +    '</tpl></p>', {
        +     isGirl: function(name){
        +         return name == 'Sara Grace';
        +     },
        +     isBaby: function(age){
        +        return age < 1;
        +     }
        +});
        +tpl.overwrite(panel.body, data);
        +
        +* @constructor +* @param {String/Array/Object} parts The HTML fragment or an array of fragments to join(""), or multiple arguments +* to join("") that can also include a config object +*/ +Ext.XTemplate = function(){ + Ext.XTemplate.superclass.constructor.apply(this, arguments); + var s = this.html; + + s = ['', s, ''].join(''); + + var re = /]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/; + + var nameRe = /^]*?for="(.*?)"/; + var ifRe = /^]*?if="(.*?)"/; + var execRe = /^]*?exec="(.*?)"/; + var m, id = 0; + var tpls = []; + + while(m = s.match(re)){ + var m2 = m[0].match(nameRe); + var m3 = m[0].match(ifRe); + var m4 = m[0].match(execRe); + var exp = null, fn = null, exec = null; + var name = m2 && m2[1] ? m2[1] : ''; + if(m3){ + exp = m3 && m3[1] ? m3[1] : null; + if(exp){ + fn = new Function('values', 'parent', 'xindex', 'xcount', 'with(values){ return '+(Ext.util.Format.htmlDecode(exp))+'; }'); + } + } + if(m4){ + exp = m4 && m4[1] ? m4[1] : null; + if(exp){ + exec = new Function('values', 'parent', 'xindex', 'xcount', 'with(values){ '+(Ext.util.Format.htmlDecode(exp))+'; }'); + } + } + if(name){ + switch(name){ + case '.': name = new Function('values', 'parent', 'with(values){ return values; }'); break; + case '..': name = new Function('values', 'parent', 'with(values){ return parent; }'); break; + default: name = new Function('values', 'parent', 'with(values){ return '+name+'; }'); + } + } + tpls.push({ + id: id, + target: name, + exec: exec, + test: fn, + body: m[1]||'' + }); + s = s.replace(m[0], '{xtpl'+ id + '}'); + ++id; + } + for(var i = tpls.length-1; i >= 0; --i){ + this.compileTpl(tpls[i]); + } + this.master = tpls[tpls.length-1]; + this.tpls = tpls; +}; +Ext.extend(Ext.XTemplate, Ext.Template, { + // private + re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g, + // private + codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g, + + // private + applySubTemplate : function(id, values, parent, xindex, xcount){ + var t = this.tpls[id]; + if(t.test && !t.test.call(this, values, parent, xindex, xcount)){ + return ''; + } + if(t.exec && t.exec.call(this, values, parent, xindex, xcount)){ + return ''; + } + var vs = t.target ? t.target.call(this, values, parent) : values; + parent = t.target ? values : parent; + if(t.target && vs instanceof Array){ + var buf = []; + for(var i = 0, len = vs.length; i < len; i++){ + buf[buf.length] = t.compiled.call(this, vs[i], parent, i+1, len); + } + return buf.join(''); + } + return t.compiled.call(this, vs, parent, xindex, xcount); + }, + + // private + compileTpl : function(tpl){ + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + var sep = Ext.isGecko ? "+" : ","; + var fn = function(m, name, format, args, math){ + if(name.substr(0, 4) == 'xtpl'){ + return "'"+ sep +'this.applySubTemplate('+name.substr(4)+', values, parent, xindex, xcount)'+sep+"'"; + } + var v; + if(name === '.'){ + v = 'values'; + }else if(name === '#'){ + v = 'xindex'; + }else if(name.indexOf('.') != -1){ + v = name; + }else{ + v = "values['" + name + "']"; + } + if(math){ + v = '(' + v + math + ')'; + } + if(format && useF){ + args = args ? ',' + args : ""; + if(format.substr(0, 5) != "this."){ + format = "fm." + format + '('; + }else{ + format = 'this.call("'+ format.substr(5) + '", '; + args = ", values"; + } + }else{ + args= ''; format = "("+v+" === undefined ? '' : "; + } + return "'"+ sep + format + v + args + ")"+sep+"'"; + }; + var codeFn = function(m, code){ + return "'"+ sep +'('+code+')'+sep+"'"; + }; + + var body; + // branched to use + in gecko and [].join() in others + 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) + + "';};"; + }else{ + body = ["tpl.compiled = function(values, parent, xindex, xcount){ return ['"]; + body.push(tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return this; + }, + + /** + * Alias of {@link #applyTemplate}. + */ + apply : function(values){ + return this.master.compiled.call(this, values, {}, 1, 1); + }, + + /** + * Returns an HTML fragment of this template with the specified values applied. + * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) + * @return {String} The HTML fragment + */ + applyTemplate : function(values){ + return this.master.compiled.call(this, values, {}, 1, 1); + }, + + /** + * Compile the template to a function for optimized performance. Recommended if the template will be used frequently. + * @return {Function} The compiled function + */ + compile : function(){return this;} + + /** + * @property re + * @hide + */ + /** + * @property disableFormats + * @hide + */ + /** + * @method set + * @hide + */ + +}); + +/** + * Creates a template from the passed element's value (display:none textarea, preferred) or innerHTML. + * @param {String/HTMLElement} el A DOM element or its id + * @return {Ext.Template} The created template + * @static + */ +Ext.XTemplate.from = function(el){ + el = Ext.getDom(el); + return new Ext.XTemplate(el.value || el.innerHTML); +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Action.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Action.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Action.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,222 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Action + *

        An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it + * can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI + * updates across any components that support the Action interface (primarily {@link Ext.Toolbar}, {@link Ext.Button} + * and {@link Ext.menu.Menu} components).

        + *

        Aside from supporting the config object interface, any component that needs to use Actions must also support + * the following method list, as these will be called as needed by the Action class: setText(string), setIconCls(string), + * setDisabled(boolean), setVisible(boolean) and setHandler(function).

        + * Example usage:
        + *
        
        +// Define the shared action.  Each component below will have the same
        +// display text and icon, and will display the same message on click.
        +var action = new Ext.Action({
        +    text: 'Do something',
        +    handler: function(){
        +        Ext.Msg.alert('Click', 'You did something.');
        +    },
        +    iconCls: 'do-something'
        +});
        +
        +var panel = new Ext.Panel({
        +    title: 'Actions',
        +    width:500,
        +    height:300,
        +    tbar: [
        +        // Add the action directly to a toolbar as a menu button
        +        action, {
        +            text: 'Action Menu',
        +            // Add the action to a menu as a text item
        +            menu: [action]
        +        }
        +    ],
        +    items: [
        +        // Add the action to the panel body as a standard button
        +        new Ext.Button(action)
        +    ],
        +    renderTo: Ext.getBody()
        +});
        +
        +// Change the text for all components using the action
        +action.setText('Something else');
        +
        + * @constructor + * @param {Object} config The configuration options + */ +Ext.Action = function(config){ + this.initialConfig = config; + this.items = []; +} + +Ext.Action.prototype = { + /** + * @cfg {String} text The text to set for all components using this action (defaults to ''). + */ + /** + * @cfg {String} iconCls The icon CSS class for all components using this action (defaults to ''). + * The class should supply a background image that will be used as the icon image. + */ + /** + * @cfg {Boolean} disabled True to disable all components using this action, false to enable them (defaults to false). + */ + /** + * @cfg {Boolean} hidden True to hide all components using this action, false to show them (defaults to false). + */ + /** + * @cfg {Function} handler The function that will be invoked by each component tied to this action + * when the component's primary event is triggered (defaults to undefined). + */ + /** + * @cfg {Object} scope The scope in which the {@link #handler} function will execute. + */ + + // private + isAction : true, + + /** + * Sets the text to be displayed by all components using this action. + * @param {String} text The text to display + */ + setText : function(text){ + this.initialConfig.text = text; + this.callEach('setText', [text]); + }, + + /** + * Gets the text currently displayed by all components using this action. + */ + getText : function(){ + return this.initialConfig.text; + }, + + /** + * Sets the icon CSS class for all components using this action. The class should supply + * a background image that will be used as the icon image. + * @param {String} cls The CSS class supplying the icon image + */ + setIconClass : function(cls){ + this.initialConfig.iconCls = cls; + this.callEach('setIconClass', [cls]); + }, + + /** + * Gets the icon CSS class currently used by all components using this action. + */ + getIconClass : function(){ + return this.initialConfig.iconCls; + }, + + /** + * Sets the disabled state of all components using this action. Shortcut method + * for {@link #enable} and {@link #disable}. + * @param {Boolean} disabled True to disable the component, false to enable it + */ + setDisabled : function(v){ + this.initialConfig.disabled = v; + this.callEach('setDisabled', [v]); + }, + + /** + * Enables all components using this action. + */ + enable : function(){ + this.setDisabled(false); + }, + + /** + * Disables all components using this action. + */ + disable : function(){ + this.setDisabled(true); + }, + + /** + * Returns true if the components using this action are currently disabled, else returns false. Read-only. + * @property + */ + isDisabled : function(){ + return this.initialConfig.disabled; + }, + + /** + * Sets the hidden state of all components using this action. Shortcut method + * for {@link #hide} and {@link #show}. + * @param {Boolean} hidden True to hide the component, false to show it + */ + setHidden : function(v){ + this.initialConfig.hidden = v; + this.callEach('setVisible', [!v]); + }, + + /** + * Shows all components using this action. + */ + show : function(){ + this.setHidden(false); + }, + + /** + * Hides all components using this action. + */ + hide : function(){ + this.setHidden(true); + }, + + /** + * Returns true if the components using this action are currently hidden, else returns false. Read-only. + * @property + */ + isHidden : function(){ + return this.initialConfig.hidden; + }, + + /** + * Sets the function that will be called by each component using this action when its primary event is triggered. + * @param {Function} fn The function that will be invoked by the action's components. The function + * will be called with no arguments. + * @param {Object} scope The scope in which the function will execute + */ + setHandler : function(fn, scope){ + this.initialConfig.handler = fn; + this.initialConfig.scope = scope; + this.callEach('setHandler', [fn, scope]); + }, + + /** + * Executes the specified function once for each component currently tied to this action. The function passed + * in should accept a single argument that will be an object that supports the basic Action config/method interface. + * @param {Function} fn The function to execute for each component + * @param {Object} scope The scope in which the function will execute + */ + each : function(fn, scope){ + Ext.each(this.items, fn, scope); + }, + + // private + callEach : function(fnName, args){ + var cs = this.items; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i][fnName].apply(cs[i], args); + } + }, + + // private + addComponent : function(comp){ + this.items.push(comp); + comp.on('destroy', this.removeComponent, this); + }, + + // private + removeComponent : function(comp){ + this.items.remove(comp); + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/BoxComponent.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/BoxComponent.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/BoxComponent.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,321 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.BoxComponent + * @extends Ext.Component + * Base class for any visual {@link Ext.Component} that uses a box container. BoxComponent provides automatic box + * model adjustments for sizing and positioning and will work correctly withnin the Component rendering model. All + * container classes should subclass BoxComponent so that they will work consistently when nested within other Ext + * layout containers. + * @constructor + * @param {Ext.Element/String/Object} config The configuration options. + */ +Ext.BoxComponent = Ext.extend(Ext.Component, { + /** + * @cfg {Number} height + * The height of this component in pixels (defaults to auto). + */ + /** + * @cfg {Number} width + * The width of this component in pixels (defaults to auto). + */ + /** + * @cfg {Boolean} autoHeight + * True to use height:'auto', false to use fixed height (defaults to false). + */ + /** + * @cfg {Boolean} autoWidth + * True to use width:'auto', false to use fixed width (defaults to false). + */ + /** + * @cfg {Boolean} deferHeight + * True to defer height calculations to an external component, false to allow this component to set its own + * height (defaults to false). + */ + + initComponent : function(){ + Ext.BoxComponent.superclass.initComponent.call(this); + this.addEvents( + /** + * @event resize + * Fires after the component is resized. + * @param {Ext.Component} this + * @param {Number} adjWidth The box-adjusted width that was set + * @param {Number} adjHeight The box-adjusted height that was set + * @param {Number} rawWidth The width that was originally specified + * @param {Number} rawHeight The height that was originally specified + */ + 'resize', + /** + * @event move + * Fires after the component is moved. + * @param {Ext.Component} this + * @param {Number} x The new x position + * @param {Number} y The new y position + */ + 'move' + ); + }, + + // private, set in afterRender to signify that the component has been rendered + boxReady : false, + // private, used to defer height settings to subclasses + deferHeight: false, + + /** + * Sets the width and height of the component. This method fires the resize event. This method can accept + * either width and height as separate numeric arguments, or you can pass a size object like {width:10, height:20}. + * @param {Number/Object} width The new width to set, or a size object in the format {width, height} + * @param {Number} height The new height to set (not required if a size object is passed as the first arg) + * @return {Ext.BoxComponent} this + */ + setSize : function(w, h){ + // support for standard size objects + if(typeof w == 'object'){ + h = w.height; + w = w.width; + } + // not rendered + if(!this.boxReady){ + this.width = w; + this.height = h; + return this; + } + + // prevent recalcs when not needed + if(this.lastSize && this.lastSize.width == w && this.lastSize.height == h){ + return this; + } + this.lastSize = {width: w, height: h}; + var adj = this.adjustSize(w, h); + var aw = adj.width, ah = adj.height; + if(aw !== undefined || ah !== undefined){ // this code is nasty but performs better with floaters + var rz = this.getResizeEl(); + if(!this.deferHeight && aw !== undefined && ah !== undefined){ + rz.setSize(aw, ah); + }else if(!this.deferHeight && ah !== undefined){ + rz.setHeight(ah); + }else if(aw !== undefined){ + rz.setWidth(aw); + } + this.onResize(aw, ah, w, h); + this.fireEvent('resize', this, aw, ah, w, h); + } + return this; + }, + + /** + * Sets the width of the component. This method fires the resize event. + * @param {Number} width The new width to set + * @return {Ext.BoxComponent} this + */ + setWidth : function(width){ + return this.setSize(width); + }, + + /** + * Sets the height of the component. This method fires the resize event. + * @param {Number} height The new height to set + * @return {Ext.BoxComponent} this + */ + setHeight : function(height){ + return this.setSize(undefined, height); + }, + + /** + * Gets the current size of the component's underlying element. + * @return {Object} An object containing the element's size {width: (element width), height: (element height)} + */ + getSize : function(){ + return this.el.getSize(); + }, + + /** + * Gets the current XY position of the component's underlying element. + * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false) + * @return {Array} The XY position of the element (e.g., [100, 200]) + */ + getPosition : function(local){ + if(local === true){ + return [this.el.getLeft(true), this.el.getTop(true)]; + } + return this.xy || this.el.getXY(); + }, + + /** + * Gets the current box measurements of the component's underlying element. + * @param {Boolean} local (optional) If true the element's left and top are returned instead of page XY (defaults to false) + * @return {Object} box An object in the format {x, y, width, height} + */ + getBox : function(local){ + var s = this.el.getSize(); + if(local === true){ + s.x = this.el.getLeft(true); + s.y = this.el.getTop(true); + }else{ + var xy = this.xy || this.el.getXY(); + s.x = xy[0]; + s.y = xy[1]; + } + return s; + }, + + /** + * Sets the current box measurements of the component's underlying element. + * @param {Object} box An object in the format {x, y, width, height} + * @return {Ext.BoxComponent} this + */ + updateBox : function(box){ + this.setSize(box.width, box.height); + this.setPagePosition(box.x, box.y); + return this; + }, + + // protected + getResizeEl : function(){ + return this.resizeEl || this.el; + }, + + // protected + getPositionEl : function(){ + return this.positionEl || this.el; + }, + + /** + * Sets the left and top of the component. To set the page XY position instead, use {@link #setPagePosition}. + * This method fires the move event. + * @param {Number} left The new left + * @param {Number} top The new top + * @return {Ext.BoxComponent} this + */ + setPosition : function(x, y){ + if(x && typeof x[1] == 'number'){ + y = x[1]; + x = x[0]; + } + this.x = x; + this.y = y; + if(!this.boxReady){ + return this; + } + var adj = this.adjustPosition(x, y); + var ax = adj.x, ay = adj.y; + + var el = this.getPositionEl(); + if(ax !== undefined || ay !== undefined){ + if(ax !== undefined && ay !== undefined){ + el.setLeftTop(ax, ay); + }else if(ax !== undefined){ + el.setLeft(ax); + }else if(ay !== undefined){ + el.setTop(ay); + } + this.onPosition(ax, ay); + this.fireEvent('move', this, ax, ay); + } + return this; + }, + + /** + * Sets the page XY position of the component. To set the left and top instead, use {@link #setPosition}. + * This method fires the move event. + * @param {Number} x The new x position + * @param {Number} y The new y position + * @return {Ext.BoxComponent} this + */ + setPagePosition : function(x, y){ + if(x && typeof x[1] == 'number'){ + y = x[1]; + x = x[0]; + } + this.pageX = x; + this.pageY = y; + if(!this.boxReady){ + return; + } + if(x === undefined || y === undefined){ // cannot translate undefined points + return; + } + var p = this.el.translatePoints(x, y); + this.setPosition(p.left, p.top); + return this; + }, + + // private + onRender : function(ct, position){ + Ext.BoxComponent.superclass.onRender.call(this, ct, position); + if(this.resizeEl){ + this.resizeEl = Ext.get(this.resizeEl); + } + if(this.positionEl){ + this.positionEl = Ext.get(this.positionEl); + } + }, + + // private + afterRender : function(){ + Ext.BoxComponent.superclass.afterRender.call(this); + this.boxReady = true; + this.setSize(this.width, this.height); + if(this.x || this.y){ + this.setPosition(this.x, this.y); + }else if(this.pageX || this.pageY){ + this.setPagePosition(this.pageX, this.pageY); + } + }, + + /** + * Force the component's size to recalculate based on the underlying element's current height and width. + * @return {Ext.BoxComponent} this + */ + syncSize : function(){ + delete this.lastSize; + this.setSize(this.autoWidth ? undefined : this.el.getWidth(), this.autoHeight ? undefined : this.el.getHeight()); + return this; + }, + + /* // protected + * Called after the component is resized, this method is empty by default but can be implemented by any + * subclass that needs to perform custom logic after a resize occurs. + * @param {Number} adjWidth The box-adjusted width that was set + * @param {Number} adjHeight The box-adjusted height that was set + * @param {Number} rawWidth The width that was originally specified + * @param {Number} rawHeight The height that was originally specified + */ + onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ + + }, + + /* // protected + * Called after the component is moved, this method is empty by default but can be implemented by any + * subclass that needs to perform custom logic after a move occurs. + * @param {Number} x The new x position + * @param {Number} y The new y position + */ + onPosition : function(x, y){ + + }, + + // private + adjustSize : function(w, h){ + if(this.autoWidth){ + w = 'auto'; + } + if(this.autoHeight){ + h = 'auto'; + } + return {width : w, height: h}; + }, + + // private + adjustPosition : function(x, y){ + return {x : x, y: y}; + } +}); +Ext.reg('box', Ext.BoxComponent); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Button.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Button.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Button.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,593 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Button + * @extends Ext.Component + * Simple Button class + * @cfg {String} text The button text + * @cfg {String} icon The path to an image to display in the button (the image will be set as the background-image + * CSS property of the button by default, so if you want a mixed icon/text button, set cls:"x-btn-text-icon") + * @cfg {Function} handler A function called when the button is clicked (can be used instead of click event) + * @cfg {Object} scope The scope of the handler + * @cfg {Number} minWidth The minimum width for this button (used to give a set of buttons a common width) + * @cfg {String/Object} tooltip The tooltip for the button - can be a string or QuickTips config object + * @cfg {Boolean} hidden True to start hidden (defaults to false) + * @cfg {Boolean} disabled True to start disabled (defaults to false) + * @cfg {Boolean} pressed True to start pressed (only if enableToggle = true) + * @cfg {String} toggleGroup The group this toggle button is a member of (only 1 per group can be pressed, only + * applies if enableToggle = true) + * @cfg {Boolean/Object} repeat True to repeat fire the click event while the mouse is down. This can also be + an {@link Ext.util.ClickRepeater} config object (defaults to false). + * @constructor + * Create a new button + * @param {Object} config The config object + */ +Ext.Button = Ext.extend(Ext.Component, { + /** + * Read-only. True if this button is hidden + * @type Boolean + */ + hidden : false, + /** + * Read-only. True if this button is disabled + * @type Boolean + */ + disabled : false, + /** + * Read-only. True if this button is pressed (only if enableToggle = true) + * @type Boolean + */ + pressed : false, + + /** + * @cfg {Number} tabIndex Set a DOM tabIndex for this button (defaults to undefined) + */ + + /** + * @cfg {Boolean} enableToggle + * True to enable pressed/not pressed toggling (defaults to false) + */ + enableToggle: false, + /** + * @cfg {Mixed} menu + * Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob (defaults to undefined). + */ + /** + * @cfg {String} menuAlign + * The position to align the menu to (see {@link Ext.Element#alignTo} for more details, defaults to 'tl-bl?'). + */ + menuAlign : "tl-bl?", + + /** + * @cfg {String} iconCls + * A css class which sets a background image to be used as the icon for this button + */ + /** + * @cfg {String} type + * submit, reset or button - defaults to 'button' + */ + type : 'button', + + // private + menuClassTarget: 'tr', + + /** + * @cfg {String} clickEvent + * The type of event to map to the button's event handler (defaults to 'click') + */ + clickEvent : 'click', + + /** + * @cfg {Boolean} handleMouseEvents + * False to disable visual cues on mouseover, mouseout and mousedown (defaults to true) + */ + handleMouseEvents : true, + + /** + * @cfg {String} tooltipType + * The type of tooltip to use. Either "qtip" (default) for QuickTips or "title" for title attribute. + */ + tooltipType : 'qtip', + + buttonSelector : "button:first", + + /** + * @cfg {String} cls + * A CSS class string to apply to the button's main element. + */ + + /** + * @cfg {Ext.Template} template (Optional) + * An {@link Ext.Template} with which to create the Button's main element. This Template must + * contain numeric substitution parameter 0 if it is to display the text property. Changing the template could + * require code modifications if required elements (e.g. a button) aren't present. + */ + initComponent : function(){ + Ext.Button.superclass.initComponent.call(this); + + this.addEvents( + /** + * @event click + * Fires when this button is clicked + * @param {Button} this + * @param {EventObject} e The click event + */ + "click", + /** + * @event toggle + * Fires when the "pressed" state of this button changes (only if enableToggle = true) + * @param {Button} this + * @param {Boolean} pressed + */ + "toggle", + /** + * @event mouseover + * Fires when the mouse hovers over the button + * @param {Button} this + * @param {Event} e The event object + */ + 'mouseover', + /** + * @event mouseout + * Fires when the mouse exits the button + * @param {Button} this + * @param {Event} e The event object + */ + 'mouseout', + /** + * @event menushow + * If this button has a menu, this event fires when it is shown + * @param {Button} this + * @param {Menu} menu + */ + 'menushow', + /** + * @event menuhide + * If this button has a menu, this event fires when it is hidden + * @param {Button} this + * @param {Menu} menu + */ + 'menuhide', + /** + * @event menutriggerover + * If this button has a menu, this event fires when the mouse enters the menu triggering element + * @param {Button} this + * @param {Menu} menu + * @param {EventObject} e + */ + 'menutriggerover', + /** + * @event menutriggerout + * If this button has a menu, this event fires when the mouse leaves the menu triggering element + * @param {Button} this + * @param {Menu} menu + * @param {EventObject} e + */ + 'menutriggerout' + ); + if(this.menu){ + this.menu = Ext.menu.MenuMgr.get(this.menu); + } + if(typeof this.toggleGroup === 'string'){ + this.enableToggle = true; + } + }, + + // private + onRender : function(ct, position){ + if(!this.template){ + if(!Ext.Button.buttonTemplate){ + // hideous table template + Ext.Button.buttonTemplate = new Ext.Template( + '', + '', + "
          
        "); + } + this.template = Ext.Button.buttonTemplate; + } + var btn, targs = [this.text || ' ', this.type]; + + if(position){ + btn = this.template.insertBefore(position, targs, true); + }else{ + btn = this.template.append(ct, targs, true); + } + var btnEl = btn.child(this.buttonSelector); + btnEl.on('focus', this.onFocus, this); + btnEl.on('blur', this.onBlur, this); + + this.initButtonEl(btn, btnEl); + + if(this.menu){ + this.el.child(this.menuClassTarget).addClass("x-btn-with-menu"); + } + Ext.ButtonToggleMgr.register(this); + }, + + // private + initButtonEl : function(btn, btnEl){ + + this.el = btn; + btn.addClass("x-btn"); + + if(this.icon){ + btnEl.setStyle('background-image', 'url(' +this.icon +')'); + } + if(this.iconCls){ + btnEl.addClass(this.iconCls); + if(!this.cls){ + btn.addClass(this.text ? 'x-btn-text-icon' : 'x-btn-icon'); + } + } + if(this.tabIndex !== undefined){ + btnEl.dom.tabIndex = this.tabIndex; + } + if(this.tooltip){ + if(typeof this.tooltip == 'object'){ + Ext.QuickTips.register(Ext.apply({ + target: btnEl.id + }, this.tooltip)); + } else { + btnEl.dom[this.tooltipType] = this.tooltip; + } + } + + if(this.pressed){ + this.el.addClass("x-btn-pressed"); + } + + if(this.handleMouseEvents){ + btn.on("mouseover", this.onMouseOver, this); + // new functionality for monitoring on the document level + //btn.on("mouseout", this.onMouseOut, this); + btn.on("mousedown", this.onMouseDown, this); + } + + if(this.menu){ + this.menu.on("show", this.onMenuShow, this); + this.menu.on("hide", this.onMenuHide, this); + } + + if(this.id){ + this.el.dom.id = this.el.id = this.id; + } + + if(this.repeat){ + var repeater = new Ext.util.ClickRepeater(btn, + typeof this.repeat == "object" ? this.repeat : {} + ); + repeater.on("click", this.onClick, this); + } + + btn.on(this.clickEvent, this.onClick, this); + }, + + // private + afterRender : function(){ + Ext.Button.superclass.afterRender.call(this); + if(Ext.isIE6){ + this.autoWidth.defer(1, this); + }else{ + this.autoWidth(); + } + }, + + /** + * Sets the CSS class that provides a background image to use as the button's icon. This method also changes + * the value of the {@link iconCls} config internally. + * @param {String} cls The CSS class providing the icon image + */ + setIconClass : function(cls){ + if(this.el){ + this.el.child(this.buttonSelector).replaceClass(this.iconCls, cls); + } + this.iconCls = cls; + }, + + // private + beforeDestroy: function(){ + var btn = this.el.child(this.buttonSelector); + if(btn){ + btn.removeAllListeners(); + } + if(this.menu){ + Ext.destroy(this.menu); + } + }, + + // private + onDestroy : function(){ + if(this.rendered){ + Ext.ButtonToggleMgr.unregister(this); + } + }, + + // private + autoWidth : function(){ + if(this.el){ + this.el.setWidth("auto"); + if(Ext.isIE7 && Ext.isStrict){ + var ib = this.el.child(this.buttonSelector); + if(ib && ib.getWidth() > 20){ + ib.clip(); + ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr')); + } + } + if(this.minWidth){ + if(this.el.getWidth() < this.minWidth){ + this.el.setWidth(this.minWidth); + } + } + } + }, + + /** + * Assigns this button's click handler + * @param {Function} handler The function to call when the button is clicked + * @param {Object} scope (optional) Scope for the function passed in + */ + setHandler : function(handler, scope){ + this.handler = handler; + this.scope = scope; + }, + + /** + * Sets this button's text + * @param {String} text The button text + */ + setText : function(text){ + this.text = text; + if(this.el){ + this.el.child("td.x-btn-center " + this.buttonSelector).update(text); + } + this.autoWidth(); + }, + + /** + * Gets the text for this button + * @return {String} The button text + */ + getText : function(){ + return this.text; + }, + + /** + * If a state it passed, it becomes the pressed state otherwise the current state is toggled. + * @param {Boolean} state (optional) Force a particular state + */ + toggle : function(state){ + state = state === undefined ? !this.pressed : state; + if(state != this.pressed){ + if(state){ + this.el.addClass("x-btn-pressed"); + this.pressed = true; + this.fireEvent("toggle", this, true); + }else{ + this.el.removeClass("x-btn-pressed"); + this.pressed = false; + this.fireEvent("toggle", this, false); + } + if(this.toggleHandler){ + this.toggleHandler.call(this.scope || this, this, state); + } + } + }, + + /** + * Focus the button + */ + focus : function(){ + this.el.child(this.buttonSelector).focus(); + }, + + // private + onDisable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.addClass("x-item-disabled"); + } + this.el.dom.disabled = true; + } + this.disabled = true; + }, + + // private + onEnable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.removeClass("x-item-disabled"); + } + this.el.dom.disabled = false; + } + this.disabled = false; + }, + + /** + * Show this button's menu (if it has one) + */ + showMenu : function(){ + if(this.menu){ + this.menu.show(this.el, this.menuAlign); + } + return this; + }, + + /** + * Hide this button's menu (if it has one) + */ + hideMenu : function(){ + if(this.menu){ + this.menu.hide(); + } + return this; + }, + + /** + * Returns true if the button has a menu and it is visible + * @return {Boolean} + */ + hasVisibleMenu : function(){ + return this.menu && this.menu.isVisible(); + }, + + // private + onClick : function(e){ + if(e){ + e.preventDefault(); + } + if(e.button != 0){ + return; + } + if(!this.disabled){ + if(this.enableToggle && (this.allowDepress !== false || !this.pressed)){ + this.toggle(); + } + if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ + this.showMenu(); + } + this.fireEvent("click", this, e); + if(this.handler){ + //this.el.removeClass("x-btn-over"); + this.handler.call(this.scope || this, this, e); + } + } + }, + + // private + isMenuTriggerOver : function(e, internal){ + return this.menu && !internal; + }, + + // private + isMenuTriggerOut : function(e, internal){ + return this.menu && !internal; + }, + + // private + onMouseOver : function(e){ + if(!this.disabled){ + var internal = e.within(this.el, true); + if(!internal){ + this.el.addClass("x-btn-over"); + Ext.getDoc().on('mouseover', this.monitorMouseOver, this); + this.fireEvent('mouseover', this, e); + } + if(this.isMenuTriggerOver(e, internal)){ + this.fireEvent('menutriggerover', this, this.menu, e); + } + } + }, + + // private + monitorMouseOver : function(e){ + if(e.target != this.el.dom && !e.within(this.el)){ + Ext.getDoc().un('mouseover', this.monitorMouseOver, this); + this.onMouseOut(e); + } + }, + + // private + onMouseOut : function(e){ + var internal = e.within(this.el) && e.target != this.el.dom; + this.el.removeClass("x-btn-over"); + this.fireEvent('mouseout', this, e); + if(this.isMenuTriggerOut(e), internal){ + this.fireEvent('menutriggerout', this, this.menu, e); + } + }, + // private + onFocus : function(e){ + if(!this.disabled){ + this.el.addClass("x-btn-focus"); + } + }, + // private + onBlur : function(e){ + this.el.removeClass("x-btn-focus"); + }, + + // private + getClickEl : function(e, isUp){ + return this.el; + }, + + // private + onMouseDown : function(e){ + if(!this.disabled && e.button == 0){ + this.getClickEl(e).addClass("x-btn-click"); + Ext.getDoc().on('mouseup', this.onMouseUp, this); + } + }, + // private + onMouseUp : function(e){ + if(e.button == 0){ + this.getClickEl(e, true).removeClass("x-btn-click"); + Ext.getDoc().un('mouseup', this.onMouseUp, this); + } + }, + // private + onMenuShow : function(e){ + this.ignoreNextClick = 0; + this.el.addClass("x-btn-menu-active"); + this.fireEvent('menushow', this, this.menu); + }, + // private + onMenuHide : function(e){ + this.el.removeClass("x-btn-menu-active"); + this.ignoreNextClick = this.restoreClick.defer(250, this); + this.fireEvent('menuhide', this, this.menu); + }, + + // private + restoreClick : function(){ + this.ignoreNextClick = 0; + } +}); +Ext.reg('button', Ext.Button); + +// Private utility class used by Button +Ext.ButtonToggleMgr = function(){ + var groups = {}; + + function toggleGroup(btn, state){ + if(state){ + var g = groups[btn.toggleGroup]; + for(var i = 0, l = g.length; i < l; i++){ + if(g[i] != btn){ + g[i].toggle(false); + } + } + } + } + + return { + register : function(btn){ + if(!btn.toggleGroup){ + return; + } + var g = groups[btn.toggleGroup]; + if(!g){ + g = groups[btn.toggleGroup] = []; + } + g.push(btn); + btn.on("toggle", toggleGroup); + }, + + unregister : function(btn){ + if(!btn.toggleGroup){ + return; + } + var g = groups[btn.toggleGroup]; + if(g){ + g.remove(btn); + btn.un("toggle", toggleGroup); + } + } + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ColorPalette.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ColorPalette.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ColorPalette.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,141 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.ColorPalette + * @extends Ext.Component + * Simple color palette class for choosing colors. The palette can be rendered to any container.
        + * Here's an example of typical usage: + *
        
        +var cp = new Ext.ColorPalette({value:'993300'});  // initial selected color
        +cp.render('my-div');
        +
        +cp.on('select', function(palette, selColor){
        +    // do something with selColor
        +});
        +
        + * @constructor + * Create a new ColorPalette + * @param {Object} config The config object + */ +Ext.ColorPalette = function(config){ + Ext.ColorPalette.superclass.constructor.call(this, config); + this.addEvents( + /** + * @event select + * Fires when a color is selected + * @param {ColorPalette} this + * @param {String} color The 6-digit color hex code (without the # symbol) + */ + 'select' + ); + + if(this.handler){ + this.on("select", this.handler, this.scope, true); + } +}; +Ext.extend(Ext.ColorPalette, Ext.Component, { + /** + * @cfg {String} itemCls + * The CSS class to apply to the containing element (defaults to "x-color-palette") + */ + itemCls : "x-color-palette", + /** + * @cfg {String} value + * The initial color to highlight (should be a valid 6-digit color hex code without the # symbol). Note that + * the hex codes are case-sensitive. + */ + value : null, + clickEvent:'click', + // private + ctype: "Ext.ColorPalette", + + /** + * @cfg {Boolean} allowReselect If set to true then reselecting a color that is already selected fires the selection event + */ + allowReselect : false, + + /** + *

        An array of 6-digit color hex code strings (without the # symbol). This array can contain any number + * of colors, and each hex code should be unique. The width of the palette is controlled via CSS by adjusting + * the width property of the 'x-color-palette' class (or assigning a custom class), so you can balance the number + * of colors with the width setting until the box is symmetrical.

        + *

        You can override individual colors if needed:

        + *
        
        +var cp = new Ext.ColorPalette();
        +cp.colors[0] = "FF0000";  // change the first box to red
        +
        + +Or you can provide a custom array of your own for complete control: +
        
        +var cp = new Ext.ColorPalette();
        +cp.colors = ["000000", "993300", "333300"];
        +
        + * @type Array + */ + colors : [ + "000000", "993300", "333300", "003300", "003366", "000080", "333399", "333333", + "800000", "FF6600", "808000", "008000", "008080", "0000FF", "666699", "808080", + "FF0000", "FF9900", "99CC00", "339966", "33CCCC", "3366FF", "800080", "969696", + "FF00FF", "FFCC00", "FFFF00", "00FF00", "00FFFF", "00CCFF", "993366", "C0C0C0", + "FF99CC", "FFCC99", "FFFF99", "CCFFCC", "CCFFFF", "99CCFF", "CC99FF", "FFFFFF" + ], + + // private + onRender : function(container, position){ + var t = new Ext.XTemplate( + ' ' + ); + var el = document.createElement("div"); + el.className = this.itemCls; + t.overwrite(el, this.colors); + container.dom.insertBefore(el, position); + this.el = Ext.get(el); + this.el.on(this.clickEvent, this.handleClick, this, {delegate: "a"}); + if(this.clickEvent != 'click'){ + this.el.on('click', Ext.emptyFn, this, {delegate: "a", preventDefault:true}); + } + }, + + // private + afterRender : function(){ + Ext.ColorPalette.superclass.afterRender.call(this); + if(this.value){ + var s = this.value; + this.value = null; + this.select(s); + } + }, + + // private + handleClick : function(e, t){ + e.preventDefault(); + if(!this.disabled){ + var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1]; + this.select(c.toUpperCase()); + } + }, + + /** + * Selects the specified color in the palette (fires the select event) + * @param {String} color A valid 6-digit color hex code (# will be stripped if included) + */ + select : function(color){ + color = color.replace("#", ""); + if(color != this.value || this.allowReselect){ + var el = this.el; + if(this.value){ + el.child("a.color-"+this.value).removeClass("x-color-palette-sel"); + } + el.child("a.color-"+color).addClass("x-color-palette-sel"); + this.value = color; + this.fireEvent("select", this, color); + } + } +}); +Ext.reg('colorpalette', Ext.ColorPalette); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Component.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Component.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Component.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,821 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Component + * @extends Ext.util.Observable + *

        Base class for all Ext components. All subclasses of Component can automatically participate in the standard + * Ext component lifecycle of creation, rendering and destruction. They also have automatic support for basic hide/show + * and enable/disable behavior. Component allows any subclass to be lazy-rendered into any {@link Ext.Container} and + * to be automatically registered with the {@link Ext.ComponentMgr} so that it can be referenced at any time via + * {@link Ext#getCmp}. All visual widgets that require rendering into a layout should subclass Component (or + * {@link Ext.BoxComponent} if managed box model handling is required).

        + *

        Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the + * xtype like {@link #getXType} and {@link #isXType}. This is the list of all valid xtypes:

        + *
        +xtype            Class
        +-------------    ------------------
        +box              Ext.BoxComponent
        +button           Ext.Button
        +colorpalette     Ext.ColorPalette
        +component        Ext.Component
        +container        Ext.Container
        +cycle            Ext.CycleButton
        +dataview         Ext.DataView
        +datepicker       Ext.DatePicker
        +editor           Ext.Editor
        +editorgrid       Ext.grid.EditorGridPanel
        +grid             Ext.grid.GridPanel
        +paging           Ext.PagingToolbar
        +panel            Ext.Panel
        +progress         Ext.ProgressBar
        +splitbutton      Ext.SplitButton
        +tabpanel         Ext.TabPanel
        +treepanel        Ext.tree.TreePanel
        +viewport         Ext.ViewPort
        +window           Ext.Window
        +
        +Toolbar components
        +---------------------------------------
        +toolbar          Ext.Toolbar
        +tbbutton         Ext.Toolbar.Button
        +tbfill           Ext.Toolbar.Fill
        +tbitem           Ext.Toolbar.Item
        +tbseparator      Ext.Toolbar.Separator
        +tbspacer         Ext.Toolbar.Spacer
        +tbsplit          Ext.Toolbar.SplitButton
        +tbtext           Ext.Toolbar.TextItem
        +
        +Form components
        +---------------------------------------
        +form             Ext.FormPanel
        +checkbox         Ext.form.Checkbox
        +combo            Ext.form.ComboBox
        +datefield        Ext.form.DateField
        +field            Ext.form.Field
        +fieldset         Ext.form.FieldSet
        +hidden           Ext.form.Hidden
        +htmleditor       Ext.form.HtmlEditor
        +numberfield      Ext.form.NumberField
        +radio            Ext.form.Radio
        +textarea         Ext.form.TextArea
        +textfield        Ext.form.TextField
        +timefield        Ext.form.TimeField
        +trigger          Ext.form.TriggerField
        +
        + * @constructor + * @param {Ext.Element/String/Object} config The configuration options. If an element is passed, it is set as the internal + * element and its id used as the component id. If a string is passed, it is assumed to be the id of an existing element + * and is used as the component id. Otherwise, it is assumed to be a standard config object and is applied to the component. + */ +Ext.Component = function(config){ + config = config || {}; + if(config.initialConfig){ + if(config.isAction){ // actions + this.baseAction = config; + } + config = config.initialConfig; // component cloning / action set up + }else if(config.tagName || config.dom || typeof config == "string"){ // element object + config = {applyTo: config, id: config.id || config}; + } + + /** + * This Component's initial configuration specification. Read-only. + * @type Object + * @property initialConfig + */ + this.initialConfig = config; + + Ext.apply(this, config); + this.addEvents( + /** + * @event disable + * Fires after the component is disabled. + * @param {Ext.Component} this + */ + 'disable', + /** + * @event enable + * Fires after the component is enabled. + * @param {Ext.Component} this + */ + 'enable', + /** + * @event beforeshow + * Fires before the component is shown. Return false to stop the show. + * @param {Ext.Component} this + */ + 'beforeshow', + /** + * @event show + * Fires after the component is shown. + * @param {Ext.Component} this + */ + 'show', + /** + * @event beforehide + * Fires before the component is hidden. Return false to stop the hide. + * @param {Ext.Component} this + */ + 'beforehide', + /** + * @event hide + * Fires after the component is hidden. + * @param {Ext.Component} this + */ + 'hide', + /** + * @event beforerender + * Fires before the component is rendered. Return false to stop the render. + * @param {Ext.Component} this + */ + 'beforerender', + /** + * @event render + * Fires after the component is rendered. + * @param {Ext.Component} this + */ + 'render', + /** + * @event beforedestroy + * Fires before the component is destroyed. Return false to stop the destroy. + * @param {Ext.Component} this + */ + 'beforedestroy', + /** + * @event destroy + * Fires after the component is destroyed. + * @param {Ext.Component} this + */ + 'destroy', + /** + * @event beforestaterestore + * Fires before the state of the component is restored. Return false to stop the restore. + * @param {Ext.Component} this + * @param {Object} state The hash of state values + */ + 'beforestaterestore', + /** + * @event staterestore + * Fires after the state of the component is restored. + * @param {Ext.Component} this + * @param {Object} state The hash of state values + */ + 'staterestore', + /** + * @event beforestatesave + * Fires before the state of the component is saved to the configured state provider. Return false to stop the save. + * @param {Ext.Component} this + * @param {Object} state The hash of state values + */ + 'beforestatesave', + /** + * @event statesave + * Fires after the state of the component is saved to the configured state provider. + * @param {Ext.Component} this + * @param {Object} state The hash of state values + */ + 'statesave' + ); + this.getId(); + Ext.ComponentMgr.register(this); + Ext.Component.superclass.constructor.call(this); + + if(this.baseAction){ + this.baseAction.addComponent(this); + } + + this.initComponent(); + + if(this.plugins){ + if(this.plugins instanceof Array){ + for(var i = 0, len = this.plugins.length; i < len; i++){ + this.plugins[i].init(this); + } + }else{ + this.plugins.init(this); + } + } + + if(this.stateful !== false){ + this.initState(config); + } + + if(this.applyTo){ + this.applyToMarkup(this.applyTo); + delete this.applyTo; + }else if(this.renderTo){ + this.render(this.renderTo); + delete this.renderTo; + } +}; + +// private +Ext.Component.AUTO_ID = 1000; + +Ext.extend(Ext.Component, Ext.util.Observable, { + /** + * @cfg {String} id + * The unique id of this component (defaults to an auto-assigned id). + */ + /** + * @cfg {String} xtype + * The registered xtype to create. This config option is not used when passing + * a config object into a constructor. This config option is used only when + * lazy instantiation is being used, and a child item of a Container is being + * specified not as a fully instantiated Component, but as a Component config + * object. The xtype will be looked up at render time up to determine what + * type of child Component to create.

        + * The predefined xtypes are listed {@link Ext.Component here}. + *

        + * If you subclass Components to create your own Components, you may register + * them using {@link Ext.ComponentMgr#registerType} in order to be able to + * take advantage of lazy instantiation and rendering. + */ + /** + * @cfg {String} cls + * An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be + * useful for adding customized styles to the component or any of its children using standard CSS rules. + */ + /** + * @cfg {String} style + * A custom style specification to be applied to this component's Element. Should be a valid argument to + * {@link Ext.Element#applyStyles}. + */ + /** + * @cfg {String} ctCls + * An optional extra CSS class that will be added to this component's container (defaults to ''). This can be + * useful for adding customized styles to the container or any of its children using standard CSS rules. + */ + /** + * @cfg {Object/Array} plugins + * An object or array of objects that will provide custom functionality for this component. The only + * requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. + * When a component is created, if any plugins are available, the component will call the init method on each + * plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the + * component as needed to provide its functionality. + */ + /** + * @cfg {Mixed} applyTo + * The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in + * the document that specifies some structural markup for this component. When applyTo is used, constituent parts of + * the component can also be specified by id or CSS class name within the main element, and the component being created + * may attempt to create its subcomponents from that markup if applicable. Using this config, a call to render() is + * not required. If applyTo is specified, any value passed for {@link #renderTo} will be ignored and the target + * element's parent node will automatically be used as the component's container. + */ + /** + * @cfg {Mixed} renderTo + * The id of the node, a DOM node or an existing Element that will be the container to render this component into. + * Using this config, a call to render() is not required. + */ + + /* //internal - to be set by subclasses + * @cfg {String} stateId + * The unique id for this component to use for state management purposes (defaults to the component id). + */ + /* //internal - to be set by subclasses + * @cfg {Array} stateEvents + * An array of events that, when fired, should trigger this component to save its state (defaults to none). + * These can be any types of events supported by this component, including browser or custom events (e.g., + * ['click', 'customerchange']). + */ + + /** + * @cfg {String} disabledClass + * CSS class added to the component when it is disabled (defaults to "x-item-disabled"). + */ + disabledClass : "x-item-disabled", + /** + * @cfg {Boolean} allowDomMove + * Whether the component can move the Dom node when rendering (defaults to true). + */ + allowDomMove : true, + /** + * @cfg {Boolean} autoShow + * True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove + * them on render (defaults to false). + */ + autoShow : false, + /** + * @cfg {String} hideMode + * How this component should hidden. Supported values are "visibility" (css visibility), "offsets" (negative + * offset position) and "display" (css display) - defaults to "display". + */ + hideMode: 'display', + /** + * @cfg {Boolean} hideParent + * True to hide and show the component's container when hide/show is called on the component, false to hide + * and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide + * button on a window by setting hide:true on the button when adding it to its parent container. + */ + hideParent: false, + + /** + * The component's owner {@link Ext.Container} (defaults to undefined, and is set automatically when + * the component is added to a container). Read-only. + * @type Ext.Container + * @property ownerCt + */ + /** + * True if this component is hidden. Read-only. + * @type Boolean + * @property + */ + hidden : false, + /** + * True if this component is disabled. Read-only. + * @type Boolean + * @property + */ + disabled : false, + /** + * True if this component has been rendered. Read-only. + * @type Boolean + * @property + */ + rendered : false, + + // private + ctype : "Ext.Component", + + // private + actionMode : "el", + + // private + getActionEl : function(){ + return this[this.actionMode]; + }, + + /* // protected + * Function to be implemented by Component subclasses to be part of standard component initialization flow (it is empty by default). + *
        
        +// Traditional constructor:
        +Ext.Foo = function(config){
        +	// call superclass constructor:
        +    Ext.Foo.superclass.constructor.call(this, config);
        +
        +    this.addEvents({
        +		// add events
        +    });
        +};
        +Ext.extend(Ext.Foo, Ext.Bar, {
        +   // class body
        +}
        +
        +// initComponent replaces the constructor:
        +Ext.Foo = Ext.extend(Ext.Bar, {
        +    initComponent : function(){
        +		// call superclass initComponent
        +        Ext.Container.superclass.initComponent.call(this);
        +
        +        this.addEvents({
        +            // add events
        +        });
        +    }
        +}
        +
        + */ + initComponent : Ext.emptyFn, + + /** + * If this is a lazy rendering component, render it to its container element. + * @param {Mixed} container (optional) The element this component should be rendered into. If it is being + * applied to existing markup, this should be left off. + * @param {String/Number} position (optional) The element ID or DOM node index within the container before + * which this component will be inserted (defaults to appending to the end of the container) + */ + render : function(container, position){ + if(!this.rendered && this.fireEvent("beforerender", this) !== false){ + if(!container && this.el){ + this.el = Ext.get(this.el); + container = this.el.dom.parentNode; + this.allowDomMove = false; + } + this.container = Ext.get(container); + if(this.ctCls){ + this.container.addClass(this.ctCls); + } + this.rendered = true; + if(position !== undefined){ + if(typeof position == 'number'){ + position = this.container.dom.childNodes[position]; + }else{ + position = Ext.getDom(position); + } + } + this.onRender(this.container, position || null); + if(this.autoShow){ + this.el.removeClass(['x-hidden','x-hide-' + this.hideMode]); + } + if(this.cls){ + this.el.addClass(this.cls); + delete this.cls; + } + if(this.style){ + this.el.applyStyles(this.style); + delete this.style; + } + this.fireEvent("render", this); + this.afterRender(this.container); + if(this.hidden){ + this.hide(); + } + if(this.disabled){ + this.disable(); + } + + this.initStateEvents(); + } + return this; + }, + + // private + initState : function(config){ + if(Ext.state.Manager){ + var state = Ext.state.Manager.get(this.stateId || this.id); + if(state){ + if(this.fireEvent('beforestaterestore', this, state) !== false){ + this.applyState(state); + this.fireEvent('staterestore', this, state); + } + } + } + }, + + // private + initStateEvents : function(){ + if(this.stateEvents){ + for(var i = 0, e; e = this.stateEvents[i]; i++){ + this.on(e, this.saveState, this, {delay:100}); + } + } + }, + + // private + applyState : function(state, config){ + if(state){ + Ext.apply(this, state); + } + }, + + // private + getState : function(){ + return null; + }, + + // private + saveState : function(){ + if(Ext.state.Manager){ + var state = this.getState(); + if(this.fireEvent('beforestatesave', this, state) !== false){ + Ext.state.Manager.set(this.stateId || this.id, state); + this.fireEvent('statesave', this, state); + } + } + }, + + /** + * Apply this component to existing markup that is valid. With this function, no call to render() is required. + * @param {String/HTMLElement} el + */ + applyToMarkup : function(el){ + this.allowDomMove = false; + this.el = Ext.get(el); + this.render(this.el.dom.parentNode); + }, + + /** + * Adds a CSS class to the component's underlying element. + * @param {string} cls The CSS class name to add + */ + addClass : function(cls){ + if(this.el){ + this.el.addClass(cls); + }else{ + this.cls = this.cls ? this.cls + ' ' + cls : cls; + } + }, + + /** + * Removes a CSS class from the component's underlying element. + * @param {string} cls The CSS class name to remove + */ + removeClass : function(cls){ + if(this.el){ + this.el.removeClass(cls); + }else if(this.cls){ + this.cls = this.cls.split(' ').remove(cls).join(' '); + } + }, + + // private + // default function is not really useful + onRender : function(ct, position){ + if(this.autoEl){ + if(typeof this.autoEl == 'string'){ + this.el = document.createElement(this.autoEl); + }else{ + var div = document.createElement('div'); + Ext.DomHelper.overwrite(div, this.autoEl); + this.el = div.firstChild; + } + } + if(this.el){ + this.el = Ext.get(this.el); + if(this.allowDomMove !== false){ + ct.dom.insertBefore(this.el.dom, position); + } + } + }, + + // private + getAutoCreate : function(){ + var cfg = typeof this.autoCreate == "object" ? + this.autoCreate : Ext.apply({}, this.defaultAutoCreate); + if(this.id && !cfg.id){ + cfg.id = this.id; + } + return cfg; + }, + + // private + afterRender : Ext.emptyFn, + + /** + * Destroys this component by purging any event listeners, removing the component's element from the DOM, + * removing the component from its {@link Ext.Container} (if applicable) and unregistering it from + * {@link Ext.ComponentMgr}. Destruction is generally handled automatically by the framework and this method + * should usually not need to be called directly. + */ + destroy : function(){ + if(this.fireEvent("beforedestroy", this) !== false){ + this.beforeDestroy(); + if(this.rendered){ + this.el.removeAllListeners(); + this.el.remove(); + if(this.actionMode == "container"){ + this.container.remove(); + } + } + this.onDestroy(); + Ext.ComponentMgr.unregister(this); + this.fireEvent("destroy", this); + this.purgeListeners(); + } + }, + + // private + beforeDestroy : Ext.emptyFn, + + // private + onDestroy : Ext.emptyFn, + + /** + * Returns the underlying {@link Ext.Element}. + * @return {Ext.Element} The element + */ + getEl : function(){ + return this.el; + }, + + /** + * Returns the id of this component. + * @return {String} + */ + getId : function(){ + return this.id || (this.id = "ext-comp-" + (++Ext.Component.AUTO_ID)); + }, + + /** + * Returns the item id of this component. + * @return {String} + */ + getItemId : function(){ + return this.itemId || this.getId(); + }, + + /** + * Try to focus this component. + * @param {Boolean} selectText (optional) If applicable, true to also select the text in this component + * @param {Boolean/Number} delay (optional) Delay the focus this number of milliseconds (true for 10 milliseconds) + * @return {Ext.Component} this + */ + focus : function(selectText, delay){ + if(delay){ + this.focus.defer(typeof delay == 'number' ? delay : 10, this, [selectText, false]); + return; + } + if(this.rendered){ + this.el.focus(); + if(selectText === true){ + this.el.dom.select(); + } + } + return this; + }, + + // private + blur : function(){ + if(this.rendered){ + this.el.blur(); + } + return this; + }, + + /** + * Disable this component. + * @return {Ext.Component} this + */ + disable : function(){ + if(this.rendered){ + this.onDisable(); + } + this.disabled = true; + this.fireEvent("disable", this); + return this; + }, + + // private + onDisable : function(){ + this.getActionEl().addClass(this.disabledClass); + this.el.dom.disabled = true; + }, + + /** + * Enable this component. + * @return {Ext.Component} this + */ + enable : function(){ + if(this.rendered){ + this.onEnable(); + } + this.disabled = false; + this.fireEvent("enable", this); + return this; + }, + + // private + onEnable : function(){ + this.getActionEl().removeClass(this.disabledClass); + this.el.dom.disabled = false; + }, + + /** + * Convenience function for setting disabled/enabled by boolean. + * @param {Boolean} disabled + */ + setDisabled : function(disabled){ + this[disabled ? "disable" : "enable"](); + }, + + /** + * Show this component. + * @return {Ext.Component} this + */ + show: function(){ + if(this.fireEvent("beforeshow", this) !== false){ + this.hidden = false; + if(this.autoRender){ + this.render(typeof this.autoRender == 'boolean' ? Ext.getBody() : this.autoRender); + } + if(this.rendered){ + this.onShow(); + } + this.fireEvent("show", this); + } + return this; + }, + + // private + onShow : function(){ + if(this.hideParent){ + this.container.removeClass('x-hide-' + this.hideMode); + }else{ + this.getActionEl().removeClass('x-hide-' + this.hideMode); + } + + }, + + /** + * Hide this component. + * @return {Ext.Component} this + */ + hide: function(){ + if(this.fireEvent("beforehide", this) !== false){ + this.hidden = true; + if(this.rendered){ + this.onHide(); + } + this.fireEvent("hide", this); + } + return this; + }, + + // private + onHide : function(){ + if(this.hideParent){ + this.container.addClass('x-hide-' + this.hideMode); + }else{ + this.getActionEl().addClass('x-hide-' + this.hideMode); + } + }, + + /** + * Convenience function to hide or show this component by boolean. + * @param {Boolean} visible True to show, false to hide + * @return {Ext.Component} this + */ + setVisible: function(visible){ + if(visible) { + this.show(); + }else{ + this.hide(); + } + return this; + }, + + /** + * Returns true if this component is visible. + */ + isVisible : function(){ + return this.rendered && this.getActionEl().isVisible(); + }, + + /** + * Clone the current component using the original config values passed into this instance by default. + * @param {Object} overrides A new config containing any properties to override in the cloned version. + * An id property can be passed on this object, otherwise one will be generated to avoid duplicates. + * @return {Ext.Component} clone The cloned copy of this component + */ + cloneConfig : function(overrides){ + overrides = overrides || {}; + var id = overrides.id || Ext.id(); + var cfg = Ext.applyIf(overrides, this.initialConfig); + cfg.id = id; // prevent dup id + return new this.constructor(cfg); + }, + + /** + * Gets the xtype for this component as registered with {@link Ext.ComponentMgr}. For a list of all + * available xtypes, see the {@link Ext.Component} header. Example usage: + *
        
        +var t = new Ext.form.TextField();
        +alert(t.getXType());  // alerts 'textfield'
        +
        + * @return {String} The xtype + */ + getXType : function(){ + return this.constructor.xtype; + }, + + /** + * Tests whether or not this component is of a specific xtype. This can test whether this component is descended + * from the xtype (default) or whether it is directly of the xtype specified (shallow = true). For a list of all + * available xtypes, see the {@link Ext.Component} header. Example usage: + *
        
        +var t = new Ext.form.TextField();
        +var isText = t.isXType('textfield');        // true
        +var isBoxSubclass = t.isXType('box');       // true, descended from BoxComponent
        +var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance
        +
        + * @param {String} xtype The xtype to check for this component + * @param {Boolean} shallow (optional) False to check whether this component is descended from the xtype (this is + * the default), or true to check whether this component is directly of the specified xtype. + */ + isXType : function(xtype, shallow){ + return !shallow ? + ('/' + this.getXTypes() + '/').indexOf('/' + xtype + '/') != -1 : + this.constructor.xtype == xtype; + }, + + /** + * Returns this component's xtype hierarchy as a slash-delimited string. For a list of all + * available xtypes, see the {@link Ext.Component} header. Example usage: + *
        
        +var t = new Ext.form.TextField();
        +alert(t.getXTypes());  // alerts 'component/box/field/textfield'
        +
        + * @return {String} The xtype hierarchy string + */ + getXTypes : function(){ + var tc = this.constructor; + if(!tc.xtypes){ + var c = [], sc = this; + while(sc && sc.constructor.xtype){ + c.unshift(sc.constructor.xtype); + sc = sc.constructor.superclass; + } + tc.xtypeChain = c; + tc.xtypes = c.join('/'); + } + return tc.xtypes; + } +}); + +Ext.reg('component', Ext.Component); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ComponentMgr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ComponentMgr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ComponentMgr.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,101 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.ComponentMgr + *

        Provides a registry of all Components (specifically subclasses of + * {@link Ext.Component}) on a page so that they can be easily accessed by + * component id (see {@link Ext.getCmp}).

        + *

        This object also provides a registry of available Component classes + * indexed by a mnemonic code known as the Component's {@link Ext.Component#xtype}. + * The xtype provides a way to avoid instantiating child Components + * when creating a full, nested config object for a complete Ext page.

        + *

        + * A child Component may be specified simply as a config object + * as long as the correct xtype is specified so that if and when the Component + * needs rendering, the correct type can be looked up for lazy instantiation.

        + *

        For a list of all available xtypes, see {@link Ext.Component}.

        + * @singleton + */ +Ext.ComponentMgr = function(){ + var all = new Ext.util.MixedCollection(); + var types = {}; + + return { + /** + * Registers a component. + * @param {Ext.Component} c The component + */ + register : function(c){ + all.add(c); + }, + + /** + * Unregisters a component. + * @param {Ext.Component} c The component + */ + unregister : function(c){ + all.remove(c); + }, + + /** + * Returns a component by id + * @param {String} id The component id + * @return Ext.Component + */ + get : function(id){ + return all.get(id); + }, + + /** + * Registers a function that will be called when a specified component is added to ComponentMgr + * @param {String} id The component id + * @param {Function} fn The callback function + * @param {Object} scope The scope of the callback + */ + onAvailable : function(id, fn, scope){ + all.on("add", function(index, o){ + if(o.id == id){ + fn.call(scope || o, o); + all.un("add", fn, scope); + } + }); + }, + + /** + * The MixedCollection used internally for the component cache. An example usage may be subscribing to + * events on the MixedCollection to monitor addition or removal. Read-only. + * @type {MixedCollection} + */ + all : all, + + /** + * Registers a new Component constructor, keyed by a new + * {@link Ext.Component#xtype}.

        + * Use this method to register new subclasses of {@link Ext.Component} so + * that lazy instantiation may be used when specifying child Components. + * see {@link Ext.Container#items} + * @param {String} xtype The mnemonic string by which the Component class + * may be looked up. + * @param {Constructor} cls The new Component class. + */ + registerType : function(xtype, cls){ + types[xtype] = cls; + cls.xtype = xtype; + }, + + // private + create : function(config, defaultType){ + return new types[config.xtype || defaultType](config); + } + }; +}(); + +// this will be called a lot internally, +// shorthand to keep the bytes down +Ext.reg = Ext.ComponentMgr.registerType; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Container.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Container.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Container.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,514 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Container + * @extends Ext.BoxComponent + * Base class for any {@link Ext.BoxComponent} that can contain other components. Containers handle the basic + * behavior of containing items, namely adding, inserting and removing them. The specific layout logic required + * to visually render contained items is delegated to any one of the different {@link #layout} classes available. + * This class is intended to be extended and should generally not need to be created directly via the new keyword. + */ +Ext.Container = Ext.extend(Ext.BoxComponent, { + /** @cfg {Boolean} monitorResize + * True to automatically monitor window resize events to handle anything that is sensitive to the current size + * of the viewport. This value is typically managed by the chosen {@link #layout} and should not need to be set manually. + */ + /** + * @cfg {String} layout + * The layout type to be used in this container. If not specified, a default {@link Ext.layout.ContainerLayout} + * will be created and used. Valid values are: accordion, anchor, border, card, column, fit, form and table. + * Specific config values for the chosen layout type can be specified using {@link #layoutConfig}. + */ + /** + * @cfg {Object} layoutConfig + * This is a config object containing properties specific to the chosen layout (to be used in conjunction with + * the {@link #layout} config value). For complete details regarding the valid config options for each layout + * type, see the layout class corresponding to the type specified:
          + *
        • {@link Ext.layout.Accordion}
        • + *
        • {@link Ext.layout.AnchorLayout}
        • + *
        • {@link Ext.layout.BorderLayout}
        • + *
        • {@link Ext.layout.CardLayout}
        • + *
        • {@link Ext.layout.ColumnLayout}
        • + *
        • {@link Ext.layout.FitLayout}
        • + *
        • {@link Ext.layout.FormLayout}
        • + *
        • {@link Ext.layout.TableLayout}
        + */ + /** + * @cfg {Boolean/Number} bufferResize + * When set to true (100 milliseconds) or a number of milliseconds, the layout assigned for this container will buffer + * the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers + * with a large amount of sub components that frequent calls to layout are expensive. + */ + /** + * @cfg {String/Number} activeItem + * A string component id or the numeric index of the component that should be initially activated within the + * container's layout on render. For example, activeItem: 'item-1' or activeItem: 0 (index 0 = the first + * item in the container's collection). activeItem only applies to layout styles that can display + * items one at a time (like {@link Ext.layout.Accordion}, {@link Ext.layout.CardLayout} and + * {@link Ext.layout.FitLayout}). Related to {@link Ext.layout.ContainerLayout#activeItem}. + */ + /** + * @cfg {Mixed} items + * A single item, or an array of child Components to be added to this container. + * Each item can be any type of object based on {@link Ext.Component}.

        + * Component config objects may also be specified in order to avoid the overhead + * of constructing a real Component object if lazy rendering might mean that the + * added Component will not be rendered immediately. To take advantage of this + * "lazy instantiation", set the {@link Ext.Component#xtype} config property to + * the registered type of the Component wanted.

        + * For a list of all available xtypes, see {@link Ext.Component}. + * If a single item is being passed, it should be passed directly as an object + * reference (e.g., items: {...}). Multiple items should be passed as an array + * of objects (e.g., items: [{...}, {...}]). + */ + /** + * @cfg {Object} defaults + * A config object that will be applied to all components added to this container either via the {@link #items} + * config or via the {@link #add} or {@link #insert} methods. The defaults config can contain any number of + * name/value property pairs to be added to each item, and should be valid for the types of items + * being added to the container. For example, to automatically apply padding to the body of each of a set of + * contained {@link Ext.Panel} items, you could pass: defaults: {bodyStyle:'padding:15px'}. + */ + + /** @cfg {Boolean} autoDestroy + * If true the container will automatically destroy any contained component that is removed from it, else + * destruction must be handled manually (defaults to true). + */ + autoDestroy: true, + /** @cfg {Boolean} hideBorders + * True to hide the borders of each contained component, false to defer to the component's existing + * border settings (defaults to false). + */ + /** @cfg {String} defaultType + * The default type of container represented by this object as registered in {@link Ext.ComponentMgr} + * (defaults to 'panel'). + */ + defaultType: 'panel', + + // private + initComponent : function(){ + Ext.Container.superclass.initComponent.call(this); + + this.addEvents( + /** + * @event afterlayout + * Fires when the components in this container are arranged by the associated layout manager. + * @param {Ext.Container} this + * @param {ContainerLayout} layout The ContainerLayout implementation for this container + */ + 'afterlayout', + /** + * @event beforeadd + * Fires before any {@link Ext.Component} is added or inserted into the container. + * A handler can return false to cancel the add. + * @param {Ext.Container} this + * @param {Ext.Component} component The component being added + * @param {Number} index The index at which the component will be added to the container's items collection + */ + 'beforeadd', + /** + * @event beforeremove + * Fires before any {@link Ext.Component} is removed from the container. A handler can return + * false to cancel the remove. + * @param {Ext.Container} this + * @param {Ext.Component} component The component being removed + */ + 'beforeremove', + /** + * @event add + * Fires after any {@link Ext.Component} is added or inserted into the container. + * @param {Ext.Container} this + * @param {Ext.Component} component The component that was added + * @param {Number} index The index at which the component was added to the container's items collection + */ + 'add', + /** + * @event remove + * Fires after any {@link Ext.Component} is removed from the container. + * @param {Ext.Container} this + * @param {Ext.Component} component The component that was removed + */ + 'remove' + ); + + /** + * The collection of components in this container as a {@link Ext.util.MixedCollection} + * @type MixedCollection + * @property items + */ + var items = this.items; + if(items){ + delete this.items; + if(items instanceof Array){ + this.add.apply(this, items); + }else{ + this.add(items); + } + } + }, + + // private + initItems : function(){ + if(!this.items){ + this.items = new Ext.util.MixedCollection(false, this.getComponentId); + this.getLayout(); // initialize the layout + } + }, + + // private + setLayout : function(layout){ + if(this.layout && this.layout != layout){ + this.layout.setContainer(null); + } + this.initItems(); + this.layout = layout; + layout.setContainer(this); + }, + + // private + render : function(){ + Ext.Container.superclass.render.apply(this, arguments); + if(this.layout){ + if(typeof this.layout == 'string'){ + this.layout = new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig); + } + this.setLayout(this.layout); + + if(this.activeItem !== undefined){ + var item = this.activeItem; + delete this.activeItem; + this.layout.setActiveItem(item); + return; + } + } + if(!this.ownerCt){ + this.doLayout(); + } + if(this.monitorResize === true){ + Ext.EventManager.onWindowResize(this.doLayout, this); + } + }, + + // protected - should only be called by layouts + getLayoutTarget : function(){ + return this.el; + }, + + // private - used as the key lookup function for the items collection + getComponentId : function(comp){ + return comp.itemId || comp.id; + }, + + /** + * Adds a Component to this Container. Fires the beforeadd event before adding, + * then fires the add event after the component has been added. + * @param {Ext.Component/Object} component The component to add.

        + * Ext uses lazy rendering, and will only render the added Component should + * it become necessary.

        + * A Component config object may be passed in order to avoid the overhead of + * constructing a real Component object if lazy rendering might mean that the + * added Component will not be rendered immediately. To take advantage of this + * "lazy instantiation", set the {@link Ext.Component#xtype} config property to + * the registered type of the Component wanted.

        + * For a list of all available xtypes, see {@link Ext.Component}. + * @return {Ext.Component} component The Component (or config object) that was + * added with the Container's default config values applied. + */ + add : function(comp){ + if(!this.items){ + this.initItems(); + } + var a = arguments, len = a.length; + if(len > 1){ + for(var i = 0; i < len; i++) { + this.add(a[i]); + } + return; + } + var c = this.lookupComponent(this.applyDefaults(comp)); + var pos = this.items.length; + if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){ + this.items.add(c); + c.ownerCt = this; + this.fireEvent('add', this, c, pos); + } + return c; + }, + + /** + * Inserts a Component into this Container at a specified index. Fires the + * beforeadd event before inserting, then fires the add event after the + * Component has been inserted. + * @param {Number} index The index at which the Component will be inserted + * into the Container's items collection + * @param {Ext.Component} component The child Component to insert.

        + * Ext uses lazy rendering, and will only render the inserted Component should + * it become necessary.

        + * A Component config object may be passed in order to avoid the overhead of + * constructing a real Component object if lazy rendering might mean that the + * inserted Component will not be rendered immediately. To take advantage of + * this "lazy instantiation", set the {@link Ext.Component#xtype} config + * property to the registered type of the Component wanted.

        + * For a list of all available xtypes, see {@link Ext.Component}. + * @return {Ext.Component} component The Component (or config object) that was + * inserted with the Container's default config values applied. + */ + insert : function(index, comp){ + if(!this.items){ + this.initItems(); + } + var a = arguments, len = a.length; + if(len > 2){ + for(var i = len-1; i >= 1; --i) { + this.insert(index, a[i]); + } + return; + } + var c = this.lookupComponent(this.applyDefaults(comp)); + + if(c.ownerCt == this && this.items.indexOf(c) < index){ + --index; + } + + if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){ + this.items.insert(index, c); + c.ownerCt = this; + this.fireEvent('add', this, c, index); + } + return c; + }, + + // private + applyDefaults : function(c){ + if(this.defaults){ + if(typeof c == 'string'){ + c = Ext.ComponentMgr.get(c); + Ext.apply(c, this.defaults); + }else if(!c.events){ + Ext.applyIf(c, this.defaults); + }else{ + Ext.apply(c, this.defaults); + } + } + return c; + }, + + // private + onBeforeAdd : function(item){ + if(item.ownerCt){ + item.ownerCt.remove(item, false); + } + if(this.hideBorders === true){ + item.border = (item.border === true); + } + }, + + /** + * Removes a component from this container. Fires the beforeremove event before removing, then fires + * the remove event after the component has been removed. + * @param {Component/String} component The component reference or id to remove + * @param {Boolean} autoDestroy (optional) True to automatically invoke the component's {@link Ext.Component#destroy} function + */ + remove : function(comp, autoDestroy){ + var c = this.getComponent(comp); + if(c && this.fireEvent('beforeremove', this, c) !== false){ + this.items.remove(c); + delete c.ownerCt; + if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){ + c.destroy(); + } + if(this.layout && this.layout.activeItem == c){ + delete this.layout.activeItem; + } + this.fireEvent('remove', this, c); + } + return c; + }, + + /** + * Gets a direct child Component by id, or by index. + * @param {String/Number} id or index of child Component to return. + * @return Ext.Component + */ + getComponent : function(comp){ + if(typeof comp == 'object'){ + return comp; + } + return this.items.get(comp); + }, + + // private + lookupComponent : function(comp){ + if(typeof comp == 'string'){ + return Ext.ComponentMgr.get(comp); + }else if(!comp.events){ + return this.createComponent(comp); + } + return comp; + }, + + // private + createComponent : function(config){ + return Ext.ComponentMgr.create(config, this.defaultType); + }, + + /** + * Force this container's layout to be recalculated. A call to this function is required after adding a new component + * to an already rendered container. If you are not dynamically adding and removing components after render, this + * function will generally not need to be called. + */ + doLayout : function(){ + if(this.rendered && this.layout){ + this.layout.layout(); + } + if(this.items){ + var cs = this.items.items; + for(var i = 0, len = cs.length; i < len; i++) { + var c = cs[i]; + if(c.doLayout){ + c.doLayout(); + } + } + } + }, + + /** + * Returns the layout currently in use by the container. If the container does not currently have a layout + * set, a default {@link Ext.layout.ContainerLayout} will be created and set as the container's layout. + * @return {ContainerLayout} layout The container's layout + */ + getLayout : function(){ + if(!this.layout){ + var layout = new Ext.layout.ContainerLayout(this.layoutConfig); + this.setLayout(layout); + } + return this.layout; + }, + + // private + onDestroy : function(){ + if(this.items){ + var cs = this.items.items; + for(var i = 0, len = cs.length; i < len; i++) { + Ext.destroy(cs[i]); + } + } + if(this.monitorResize){ + Ext.EventManager.removeResizeListener(this.doLayout, this); + } + Ext.Container.superclass.onDestroy.call(this); + }, + + /** + * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of + * function call will be the scope provided or the current component. The arguments to the function + * will be the args provided or the current component. If the function returns false at any point, + * the bubble is stopped. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function (defaults to current node) + * @param {Array} args (optional) The args to call the function with (default to passing the current component) + */ + bubble : function(fn, scope, args){ + var p = this; + while(p){ + if(fn.apply(scope || p, args || [p]) === false){ + break; + } + p = p.ownerCt; + } + }, + + /** + * Cascades down the component/container heirarchy from this component (called first), calling the specified function with + * each component. The scope (this) of + * function call will be the scope provided or the current component. The arguments to the function + * will be the args provided or the current component. If the function returns false at any point, + * the cascade is stopped on that branch. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function (defaults to current component) + * @param {Array} args (optional) The args to call the function with (defaults to passing the current component) + */ + cascade : function(fn, scope, args){ + if(fn.apply(scope || this, args || [this]) !== false){ + if(this.items){ + var cs = this.items.items; + for(var i = 0, len = cs.length; i < len; i++){ + if(cs[i].cascade){ + cs[i].cascade(fn, scope, args); + }else{ + fn.apply(scope || this, args || [cs[i]]); + } + } + } + } + }, + + /** + * Find a component under this container at any level by id + * @param {String} id + * @return Ext.Component + */ + findById : function(id){ + var m, ct = this; + this.cascade(function(c){ + if(ct != c && c.id === id){ + m = c; + return false; + } + }); + return m || null; + }, + + /** + * Find a component under this container at any level by xtype or class + * @param {String/Class} xtype The xtype string for a component, or the class of the component directly + * @return {Array} Array of Ext.Components + */ + findByType : function(xtype){ + return typeof xtype == 'function' ? + this.findBy(function(c){ + return c.constructor === xtype; + }) : + this.findBy(function(c){ + return c.constructor.xtype === xtype; + }); + }, + + /** + * Find a component under this container at any level by property + * @param {String} prop + * @param {String} value + * @return {Array} Array of Ext.Components + */ + find : function(prop, value){ + return this.findBy(function(c){ + return c[prop] === value; + }); + }, + + /** + * Find a component under this container at any level by a custom function. If the passed function returns + * true, the component will be included in the results. The passed function is called with the arguments (component, this container). + * @param {Function} fcn + * @param {Object} scope (optional) + * @return {Array} Array of Ext.Components + */ + findBy : function(fn, scope){ + var m = [], ct = this; + this.cascade(function(c){ + if(ct != c && fn.call(scope || c, c, ct) === true){ + m.push(c); + } + }); + return m; + } +}); + +Ext.Container.LAYOUTS = {}; +Ext.reg('container', Ext.Container); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/CycleButton.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/CycleButton.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/CycleButton.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,170 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.CycleButton + * @extends Ext.SplitButton + * A specialized SplitButton that contains a menu of {@link Ext.menu.CheckItem} elements. The button automatically + * cycles through each menu item on click, raising the button's {@link #change} event (or calling the button's + * {@link #changeHandler} function, if supplied) for the active menu item. Clicking on the arrow section of the + * button displays the dropdown menu just like a normal SplitButton. Example usage: + *
        
        +var btn = new Ext.CycleButton({
        +    showText: true,
        +    prependText: 'View as ',
        +    items: [{
        +        text:'text only',
        +        iconCls:'view-text',
        +        checked:true
        +    },{
        +        text:'HTML',
        +        iconCls:'view-html'
        +    }],
        +    changeHandler:function(btn, item){
        +        Ext.Msg.alert('Change View', item.text);
        +    }
        +});
        +
        + * @constructor + * Create a new split button + * @param {Object} config The config object + */ +Ext.CycleButton = Ext.extend(Ext.SplitButton, { + /** + * @cfg {Array} items An array of {@link Ext.menu.CheckItem} config objects to be used when creating the + * button's menu items (e.g., {text:'Foo', iconCls:'foo-icon'}) + */ + /** + * @cfg {Boolean} showText True to display the active item's text as the button text (defaults to false) + */ + /** + * @cfg {String} prependText A static string to prepend before the active item's text when displayed as the + * button's text (only applies when showText = true, defaults to '') + */ + /** + * @cfg {Function} changeHandler A callback function that will be invoked each time the active menu + * item in the button's menu has changed. If this callback is not supplied, the SplitButton will instead + * fire the {@link #change} event on active item change. The changeHandler function will be called with the + * following argument list: (SplitButton this, Ext.menu.CheckItem item) + */ + + // private + getItemText : function(item){ + if(item && this.showText === true){ + var text = ''; + if(this.prependText){ + text += this.prependText; + } + text += item.text; + return text; + } + return undefined; + }, + + /** + * Sets the button's active menu item. + * @param {Ext.menu.CheckItem} item The item to activate + * @param {Boolean} suppressEvent True to prevent the button's change event from firing (defaults to false) + */ + setActiveItem : function(item, suppressEvent){ + if(item){ + if(!this.rendered){ + this.text = this.getItemText(item); + this.iconCls = item.iconCls; + }else{ + var t = this.getItemText(item); + if(t){ + this.setText(t); + } + this.setIconClass(item.iconCls); + } + this.activeItem = item; + if(!suppressEvent){ + this.fireEvent('change', this, item); + } + } + }, + + /** + * Gets the currently active menu item. + * @return {Ext.menu.CheckItem} The active item + */ + getActiveItem : function(){ + return this.activeItem; + }, + + // private + initComponent : function(){ + this.addEvents( + /** + * @event change + * Fires after the button's active menu item has changed. Note that if a {@link #changeHandler} function + * is set on this CycleButton, it will be called instead on active item change and this change event will + * not be fired. + * @param {Ext.CycleButton} this + * @param {Ext.menu.CheckItem} item The menu item that was selected + */ + "change" + ); + + if(this.changeHandler){ + this.on('change', this.changeHandler, this.scope||this); + delete this.changeHandler; + } + + this.itemCount = this.items.length; + + this.menu = {cls:'x-cycle-menu', items:[]}; + var checked; + for(var i = 0, len = this.itemCount; i < len; i++){ + var item = this.items[i]; + item.group = item.group || this.id; + item.itemIndex = i; + item.checkHandler = this.checkHandler; + item.scope = this; + item.checked = item.checked || false; + this.menu.items.push(item); + if(item.checked){ + checked = item; + } + } + this.setActiveItem(checked, true); + Ext.CycleButton.superclass.initComponent.call(this); + + this.on('click', this.toggleSelected, this); + }, + + // private + checkHandler : function(item, pressed){ + if(pressed){ + this.setActiveItem(item); + } + }, + + /** + * This is normally called internally on button click, but can be called externally to advance the button's + * active item programmatically to the next one in the menu. If the current item is the last one in the menu + * the active item will be set to the first item in the menu. + */ + toggleSelected : function(){ + this.menu.render(); + + var nextIdx, checkItem; + for (var i = 1; i < this.itemCount; i++) { + nextIdx = (this.activeItem.itemIndex + i) % this.itemCount; + // check the potential item + checkItem = this.menu.items.itemAt(nextIdx); + // if its not disabled then check it. + if (!checkItem.disabled) { + checkItem.setChecked(true); + break; + } + } + } +}); +Ext.reg('cycle', Ext.CycleButton); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/DataView.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/DataView.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/DataView.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,660 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.DataView + * @extends Ext.BoxComponent + * A mechanism for displaying data using custom layout templates and formatting. DataView uses an {@link Ext.XTemplate} + * as its internal templating mechanisma, and is bound to an {@link Ext.data.Store} + * so that as the data in the store changes the view is automatically updated to reflect the changes. The view also + * provides built-in behavior for many common events that can occur for its contained items including click, doubleclick, + * mouseover, mouseout, etc. as well as a built-in selection model. In order to use these features, an itemSelector + * config must be provided for the DataView to determine what nodes it will be working with. + * + *

        The example below binds a DataView to a {@link Ext.data.Store} and renders it into an {@link Ext.Panel}.

        + *
        
        +var store = new Ext.data.JsonStore({
        +    url: 'get-images.php',
        +    root: 'images',
        +    fields: [
        +        'name', 'url',
        +        {name:'size', type: 'float'},
        +        {name:'lastmod', type:'date', dateFormat:'timestamp'}
        +    ]
        +});
        +store.load();
        +
        +var tpl = new Ext.XTemplate(
        +    '<tpl for=".">',
        +        '<div class="thumb-wrap" id="{name}">',
        +        '<div class="thumb"><img src="{url}" title="{name}"></div>',
        +        '<span class="x-editable">{shortName}</span></div>',
        +    '</tpl>',
        +    '<div class="x-clear"></div>'
        +);
        +
        +var panel = new Ext.Panel({
        +    id:'images-view',
        +    frame:true,
        +    width:535,
        +    autoHeight:true,
        +    collapsible:true,
        +    layout:'fit',
        +    title:'Simple DataView',
        +
        +    items: new Ext.DataView({
        +        store: store,
        +        tpl: tpl,
        +        autoHeight:true,
        +        multiSelect: true,
        +        overClass:'x-view-over',
        +        itemSelector:'div.thumb-wrap',
        +        emptyText: 'No images to display'
        +    })
        +});
        +panel.render(document.body);
        +
        + * @constructor + * Create a new DataView + * @param {Object} config The config object + */ +Ext.DataView = Ext.extend(Ext.BoxComponent, { + /** + * @cfg {String/Array} tpl + * The HTML fragment or an array of fragments that will make up the template used by this DataView. This should + * be specified in the same format expected by the constructor of {@link Ext.XTemplate}. + */ + /** + * @cfg {Ext.data.Store} store + * The {@link Ext.data.Store} to bind this DataView to. + */ + /** + * @cfg {String} itemSelector + * This is a required setting. A CSS selector in any format supported by {@link Ext.DomQuery} that will be used to determine what nodes this DataView will be working with. + */ + /** + * @cfg {Boolean} multiSelect + * True to allow selection of more than one item at a time, false to allow selection of only a single item + * at a time or no selection at all, depending on the value of {@link #singleSelect} (defaults to false). + */ + /** + * @cfg {Boolean} singleSelect + * True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false). + * Note that if {@link #multiSelect} = true, this value will be ignored. + */ + /** + * @cfg {Boolean} simpleSelect + * True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl, + * false to force the user to hold Ctrl or Shift to select more than on item (defaults to false). + */ + /** + * @cfg {String} overClass + * A CSS class to apply to each item in the view on mouseover (defaults to undefined). + */ + /** + * @cfg {String} loadingText + * A string to display during data load operations (defaults to undefined). If specified, this text will be + * displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's + * contents will continue to display normally until the new data is loaded and the contents are replaced. + */ + /** + * @cfg {String} selectedClass + * A CSS class to apply to each selected item in the view (defaults to 'x-view-selected'). + */ + selectedClass : "x-view-selected", + /** + * @cfg {String} emptyText + * The text to display in the view when there is no data to display (defaults to ''). + */ + emptyText : "", + + //private + last: false, + + // private + initComponent : function(){ + Ext.DataView.superclass.initComponent.call(this); + if(typeof this.tpl == "string"){ + this.tpl = new Ext.XTemplate(this.tpl); + } + + this.addEvents( + /** + * @event beforeclick + * Fires before a click is processed. Returns false to cancel the default action. + * @param {Ext.DataView} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "beforeclick", + /** + * @event click + * Fires when a template node is clicked. + * @param {Ext.DataView} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "click", + /** + * @event containerclick + * Fires when a click occurs and it is not on a template node. + * @param {Ext.DataView} this + * @param {Ext.EventObject} e The raw event object + */ + "containerclick", + /** + * @event dblclick + * Fires when a template node is double clicked. + * @param {Ext.DataView} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "dblclick", + /** + * @event contextmenu + * Fires when a template node is right clicked. + * @param {Ext.DataView} this + * @param {Number} index The index of the target node + * @param {HTMLElement} node The target node + * @param {Ext.EventObject} e The raw event object + */ + "contextmenu", + /** + * @event selectionchange + * Fires when the selected nodes change. + * @param {Ext.DataView} this + * @param {Array} selections Array of the selected nodes + */ + "selectionchange", + + /** + * @event beforeselect + * Fires before a selection is made. If any handlers return false, the selection is cancelled. + * @param {Ext.DataView} this + * @param {HTMLElement} node The node to be selected + * @param {Array} selections Array of currently selected nodes + */ + "beforeselect" + ); + + this.all = new Ext.CompositeElementLite(); + this.selected = new Ext.CompositeElementLite(); + }, + + // private + onRender : function(){ + if(!this.el){ + this.el = document.createElement('div'); + } + Ext.DataView.superclass.onRender.apply(this, arguments); + }, + + // private + afterRender : function(){ + Ext.DataView.superclass.afterRender.call(this); + + this.el.on({ + "click": this.onClick, + "dblclick": this.onDblClick, + "contextmenu": this.onContextMenu, + scope:this + }); + + if(this.overClass){ + this.el.on({ + "mouseover": this.onMouseOver, + "mouseout": this.onMouseOut, + scope:this + }); + } + + if(this.store){ + this.setStore(this.store, true); + } + }, + + /** + * Refreshes the view by reloading the data from the store and re-rendering the template. + */ + refresh : function(){ + this.clearSelections(false, true); + this.el.update(""); + var html = []; + var records = this.store.getRange(); + if(records.length < 1){ + this.el.update(this.emptyText); + this.all.clear(); + return; + } + this.tpl.overwrite(this.el, this.collectData(records, 0)); + this.all.fill(Ext.query(this.itemSelector, this.el.dom)); + this.updateIndexes(0); + }, + + /** + * Function that can be overridden to provide custom formatting for the data that is sent to the template for each node. + * @param {Array/Object} data The raw data (array of colData for a data model bound view or + * a JSON object for an Updater bound view). + */ + prepareData : function(data){ + return data; + }, + + // private + collectData : function(records, startIndex){ + var r = []; + for(var i = 0, len = records.length; i < len; i++){ + r[r.length] = this.prepareData(records[i].data, startIndex+i, records[i]); + } + return r; + }, + + // private + bufferRender : function(records){ + var div = document.createElement('div'); + this.tpl.overwrite(div, this.collectData(records)); + return Ext.query(this.itemSelector, div); + }, + + // private + onUpdate : function(ds, record){ + var index = this.store.indexOf(record); + var sel = this.isSelected(index); + var original = this.all.elements[index]; + var node = this.bufferRender([record], index)[0]; + + this.all.replaceElement(index, node, true); + if(sel){ + this.selected.replaceElement(original, node); + this.all.item(index).addClass(this.selectedClass); + } + this.updateIndexes(index, index); + }, + + // private + onAdd : function(ds, records, index){ + if(this.all.getCount() == 0){ + this.refresh(); + return; + } + var nodes = this.bufferRender(records, index), n; + if(index < this.all.getCount()){ + n = this.all.item(index).insertSibling(nodes, 'before', true); + this.all.elements.splice(index, 0, n); + }else{ + n = this.all.last().insertSibling(nodes, 'after', true); + this.all.elements.push(n); + } + this.updateIndexes(index); + }, + + // private + onRemove : function(ds, record, index){ + this.deselect(index); + this.all.removeElement(index, true); + this.updateIndexes(index); + }, + + /** + * Refreshes an individual node's data from the store. + * @param {Number} index The item's data index in the store + */ + refreshNode : function(index){ + this.onUpdate(this.store, this.store.getAt(index)); + }, + + // private + updateIndexes : function(startIndex, endIndex){ + var ns = this.all.elements; + startIndex = startIndex || 0; + endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1)); + for(var i = startIndex; i <= endIndex; i++){ + ns[i].viewIndex = i; + } + }, + + /** + * Changes the data store bound to this view and refreshes it. + * @param {Store} store The store to bind to this view + */ + setStore : function(store, initial){ + if(!initial && this.store){ + this.store.un("beforeload", this.onBeforeLoad, this); + this.store.un("datachanged", this.refresh, this); + this.store.un("add", this.onAdd, this); + this.store.un("remove", this.onRemove, this); + this.store.un("update", this.onUpdate, this); + this.store.un("clear", this.refresh, this); + } + if(store){ + store = Ext.StoreMgr.lookup(store); + store.on("beforeload", this.onBeforeLoad, this); + store.on("datachanged", this.refresh, this); + store.on("add", this.onAdd, this); + store.on("remove", this.onRemove, this); + store.on("update", this.onUpdate, this); + store.on("clear", this.refresh, this); + } + this.store = store; + if(store){ + this.refresh(); + } + }, + + /** + * Returns the template node the passed child belongs to, or null if it doesn't belong to one. + * @param {HTMLElement} node + * @return {HTMLElement} The template node + */ + findItemFromChild : function(node){ + return Ext.fly(node).findParent(this.itemSelector, this.el); + }, + + // private + onClick : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item){ + var index = this.indexOf(item); + if(this.onItemClick(item, index, e) !== false){ + this.fireEvent("click", this, index, item, e); + } + }else{ + if(this.fireEvent("containerclick", this, e) !== false){ + this.clearSelections(); + } + } + }, + + // private + onContextMenu : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item){ + this.fireEvent("contextmenu", this, this.indexOf(item), item, e); + } + }, + + // private + onDblClick : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item){ + this.fireEvent("dblclick", this, this.indexOf(item), item, e); + } + }, + + // private + onMouseOver : function(e){ + var item = e.getTarget(this.itemSelector, this.el); + if(item && item !== this.lastItem){ + this.lastItem = item; + Ext.fly(item).addClass(this.overClass); + } + }, + + // private + onMouseOut : function(e){ + if(this.lastItem){ + if(!e.within(this.lastItem, true)){ + Ext.fly(this.lastItem).removeClass(this.overClass); + delete this.lastItem; + } + } + }, + + // private + onItemClick : function(item, index, e){ + if(this.fireEvent("beforeclick", this, index, item, e) === false){ + return false; + } + if(this.multiSelect){ + this.doMultiSelection(item, index, e); + e.preventDefault(); + }else if(this.singleSelect){ + this.doSingleSelection(item, index, e); + e.preventDefault(); + } + return true; + }, + + // private + doSingleSelection : function(item, index, e){ + if(e.ctrlKey && this.isSelected(index)){ + this.deselect(index); + }else{ + this.select(index, false); + } + }, + + // private + doMultiSelection : function(item, index, e){ + if(e.shiftKey && this.last !== false){ + var last = this.last; + this.selectRange(last, index, e.ctrlKey); + this.last = last; // reset the last + }else{ + if((e.ctrlKey||this.simpleSelect) && this.isSelected(index)){ + this.deselect(index); + }else{ + this.select(index, e.ctrlKey || e.shiftKey || this.simpleSelect); + } + } + }, + + /** + * Gets the number of selected nodes. + * @return {Number} The node count + */ + getSelectionCount : function(){ + return this.selected.getCount() + }, + + /** + * Gets the currently selected nodes. + * @return {Array} An array of HTMLElements + */ + getSelectedNodes : function(){ + return this.selected.elements; + }, + + /** + * Gets the indexes of the selected nodes. + * @return {Array} An array of numeric indexes + */ + getSelectedIndexes : function(){ + var indexes = [], s = this.selected.elements; + for(var i = 0, len = s.length; i < len; i++){ + indexes.push(s[i].viewIndex); + } + return indexes; + }, + + /** + * Gets an array of the selected records + * @return {Array} An array of {@link Ext.data.Record} objects + */ + getSelectedRecords : function(){ + var r = [], s = this.selected.elements; + for(var i = 0, len = s.length; i < len; i++){ + r[r.length] = this.store.getAt(s[i].viewIndex); + } + return r; + }, + + /** + * Gets an array of the records from an array of nodes + * @param {Array} nodes The nodes to evaluate + * @return {Array} records The {@link Ext.data.Record} objects + */ + getRecords : function(nodes){ + var r = [], s = nodes; + for(var i = 0, len = s.length; i < len; i++){ + r[r.length] = this.store.getAt(s[i].viewIndex); + } + return r; + }, + + /** + * Gets a record from a node + * @param {HTMLElement} node The node to evaluate + * @return {Record} record The {@link Ext.data.Record} object + */ + getRecord : function(node){ + return this.store.getAt(node.viewIndex); + }, + + /** + * Clears all selections. + * @param {Boolean} suppressEvent (optional) True to skip firing of the selectionchange event + */ + clearSelections : function(suppressEvent, skipUpdate){ + if(this.multiSelect || this.singleSelect){ + if(!skipUpdate){ + this.selected.removeClass(this.selectedClass); + } + this.selected.clear(); + this.last = false; + if(!suppressEvent){ + this.fireEvent("selectionchange", this, this.selected.elements); + } + } + }, + + /** + * Returns true if the passed node is selected, else false. + * @param {HTMLElement/Number} node The node or node index to check + * @return {Boolean} True if selected, else false + */ + isSelected : function(node){ + return this.selected.contains(this.getNode(node)); + }, + + /** + * Deselects a node. + * @param {HTMLElement/Number} node The node to deselect + */ + deselect : function(node){ + if(this.isSelected(node)){ + var node = this.getNode(node); + this.selected.removeElement(node); + if(this.last == node.viewIndex){ + this.last = false; + } + Ext.fly(node).removeClass(this.selectedClass); + this.fireEvent("selectionchange", this, this.selected.elements); + } + }, + + /** + * Selects a set of nodes. + * @param {Array/HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node, + * id of a template node or an array of any of those to select + * @param {Boolean} keepExisting (optional) true to keep existing selections + * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent + */ + select : function(nodeInfo, keepExisting, suppressEvent){ + if(nodeInfo instanceof Array){ + if(!keepExisting){ + this.clearSelections(true); + } + for(var i = 0, len = nodeInfo.length; i < len; i++){ + this.select(nodeInfo[i], true, true); + } + } else{ + var node = this.getNode(nodeInfo); + if(!keepExisting){ + this.clearSelections(true); + } + if(node && !this.isSelected(node)){ + if(this.fireEvent("beforeselect", this, node, this.selected.elements) !== false){ + Ext.fly(node).addClass(this.selectedClass); + this.selected.add(node); + this.last = node.viewIndex; + if(!suppressEvent){ + this.fireEvent("selectionchange", this, this.selected.elements); + } + } + } + } + }, + + /** + * Selects a range of nodes. All nodes between start and end are selected. + * @param {Number} start The index of the first node in the range + * @param {Number} end The index of the last node in the range + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectRange : function(start, end, keepExisting){ + if(!keepExisting){ + this.clearSelections(true); + } + this.select(this.getNodes(start, end), true); + }, + + /** + * Gets a template node. + * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node + * @return {HTMLElement} The node or null if it wasn't found + */ + getNode : function(nodeInfo){ + if(typeof nodeInfo == "string"){ + return document.getElementById(nodeInfo); + }else if(typeof nodeInfo == "number"){ + return this.all.elements[nodeInfo]; + } + return nodeInfo; + }, + + /** + * Gets a range nodes. + * @param {Number} start The index of the first node in the range + * @param {Number} end The index of the last node in the range + * @return {Array} An array of nodes + */ + getNodes : function(start, end){ + var ns = this.all.elements; + start = start || 0; + end = typeof end == "undefined" ? ns.length - 1 : end; + var nodes = [], i; + if(start <= end){ + for(i = start; i <= end; i++){ + nodes.push(ns[i]); + } + } else{ + for(i = start; i >= end; i--){ + nodes.push(ns[i]); + } + } + return nodes; + }, + + /** + * Finds the index of the passed node. + * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node + * @return {Number} The index of the node or -1 + */ + indexOf : function(node){ + node = this.getNode(node); + if(typeof node.viewIndex == "number"){ + return node.viewIndex; + } + return this.all.indexOf(node); + }, + + // private + onBeforeLoad : function(){ + if(this.loadingText){ + this.clearSelections(false, true); + this.el.update('
        '+this.loadingText+'
        '); + this.all.clear(); + } + } +}); + +Ext.reg('dataview', Ext.DataView); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/DatePicker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/DatePicker.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/DatePicker.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,616 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.DatePicker + * @extends Ext.Component + * Simple date picker class. + * @constructor + * Create a new DatePicker + * @param {Object} config The config object + */ +Ext.DatePicker = Ext.extend(Ext.Component, { + /** + * @cfg {String} todayText + * The text to display on the button that selects the current date (defaults to "Today") + */ + todayText : "Today", + /** + * @cfg {String} okText + * The text to display on the ok button + */ + okText : " OK ", //   to give the user extra clicking room + /** + * @cfg {String} cancelText + * The text to display on the cancel button + */ + cancelText : "Cancel", + /** + * @cfg {String} todayTip + * The tooltip to display for the button that selects the current date (defaults to "{current date} (Spacebar)") + */ + todayTip : "{0} (Spacebar)", + /** + * @cfg {Date} minDate + * Minimum allowable date (JavaScript date object, defaults to null) + */ + minDate : null, + /** + * @cfg {Date} maxDate + * Maximum allowable date (JavaScript date object, defaults to null) + */ + maxDate : null, + /** + * @cfg {String} minText + * The error text to display if the minDate validation fails (defaults to "This date is before the minimum date") + */ + minText : "This date is before the minimum date", + /** + * @cfg {String} maxText + * The error text to display if the maxDate validation fails (defaults to "This date is after the maximum date") + */ + maxText : "This date is after the maximum date", + /** + * @cfg {String} format + * The default date format string which can be overriden for localization support. The format must be + * valid according to {@link Date#parseDate} (defaults to 'm/d/y'). + */ + format : "m/d/y", + /** + * @cfg {Array} disabledDays + * An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null). + */ + disabledDays : null, + /** + * @cfg {String} disabledDaysText + * The tooltip to display when the date falls on a disabled day (defaults to "") + */ + disabledDaysText : "", + /** + * @cfg {RegExp} disabledDatesRE + * JavaScript regular expression used to disable a pattern of dates (defaults to null) + */ + disabledDatesRE : null, + /** + * @cfg {String} disabledDatesText + * The tooltip text to display when the date falls on a disabled date (defaults to "") + */ + disabledDatesText : "", + /** + * @cfg {Boolean} constrainToViewport + * True to constrain the date picker to the viewport (defaults to true) + */ + constrainToViewport : true, + /** + * @cfg {Array} monthNames + * An array of textual month names which can be overriden for localization support (defaults to Date.monthNames) + */ + monthNames : Date.monthNames, + /** + * @cfg {Array} dayNames + * An array of textual day names which can be overriden for localization support (defaults to Date.dayNames) + */ + dayNames : Date.dayNames, + /** + * @cfg {String} nextText + * The next month navigation button tooltip (defaults to 'Next Month (Control+Right)') + */ + nextText: 'Next Month (Control+Right)', + /** + * @cfg {String} prevText + * The previous month navigation button tooltip (defaults to 'Previous Month (Control+Left)') + */ + prevText: 'Previous Month (Control+Left)', + /** + * @cfg {String} monthYearText + * The header month selector tooltip (defaults to 'Choose a month (Control+Up/Down to move years)') + */ + monthYearText: 'Choose a month (Control+Up/Down to move years)', + /** + * @cfg {Number} startDay + * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday) + */ + startDay : 0, + + initComponent : function(){ + Ext.DatePicker.superclass.initComponent.call(this); + + this.value = this.value ? + this.value.clearTime() : new Date().clearTime(); + + this.addEvents( + /** + * @event select + * Fires when a date is selected + * @param {DatePicker} this + * @param {Date} date The selected date + */ + 'select' + ); + + if(this.handler){ + this.on("select", this.handler, this.scope || this); + } + + this.initDisabledDays(); + }, + + // private + initDisabledDays : function(){ + if(!this.disabledDatesRE && this.disabledDates){ + var dd = this.disabledDates; + var re = "(?:"; + for(var i = 0; i < dd.length; i++){ + re += dd[i]; + if(i != dd.length-1) re += "|"; + } + this.disabledDatesRE = new RegExp(re + ")"); + } + }, + + /** + * Sets the value of the date field + * @param {Date} value The date to set + */ + setValue : function(value){ + var old = this.value; + this.value = value.clearTime(true); + if(this.el){ + this.update(this.value); + } + }, + + /** + * Gets the current selected value of the date field + * @return {Date} The selected date + */ + getValue : function(){ + return this.value; + }, + + // private + focus : function(){ + if(this.el){ + this.update(this.activeDate); + } + }, + + // private + onRender : function(container, position){ + var m = [ + '', + '', + '
          
        ']; + var dn = this.dayNames; + for(var i = 0; i < 7; i++){ + var d = this.startDay+i; + if(d > 6){ + d = d-7; + } + m.push(""); + } + m[m.length] = ""; + for(var i = 0; i < 42; i++) { + if(i % 7 == 0 && i != 0){ + m[m.length] = ""; + } + m[m.length] = ''; + } + m[m.length] = '
        ", dn[d].substr(0,1), "
        '; + + var el = document.createElement("div"); + el.className = "x-date-picker"; + el.innerHTML = m.join(""); + + container.dom.insertBefore(el, position); + + this.el = Ext.get(el); + this.eventEl = Ext.get(el.firstChild); + + new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"), { + handler: this.showPrevMonth, + scope: this, + preventDefault:true, + stopDefault:true + }); + + new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"), { + handler: this.showNextMonth, + scope: this, + preventDefault:true, + stopDefault:true + }); + + this.eventEl.on("mousewheel", this.handleMouseWheel, this); + + this.monthPicker = this.el.down('div.x-date-mp'); + this.monthPicker.enableDisplayMode('block'); + + var kn = new Ext.KeyNav(this.eventEl, { + "left" : function(e){ + e.ctrlKey ? + this.showPrevMonth() : + this.update(this.activeDate.add("d", -1)); + }, + + "right" : function(e){ + e.ctrlKey ? + this.showNextMonth() : + this.update(this.activeDate.add("d", 1)); + }, + + "up" : function(e){ + e.ctrlKey ? + this.showNextYear() : + this.update(this.activeDate.add("d", -7)); + }, + + "down" : function(e){ + e.ctrlKey ? + this.showPrevYear() : + this.update(this.activeDate.add("d", 7)); + }, + + "pageUp" : function(e){ + this.showNextMonth(); + }, + + "pageDown" : function(e){ + this.showPrevMonth(); + }, + + "enter" : function(e){ + e.stopPropagation(); + return true; + }, + + scope : this + }); + + this.eventEl.on("click", this.handleDateClick, this, {delegate: "a.x-date-date"}); + + this.eventEl.addKeyListener(Ext.EventObject.SPACE, this.selectToday, this); + + this.el.unselectable(); + + this.cells = this.el.select("table.x-date-inner tbody td"); + this.textNodes = this.el.query("table.x-date-inner tbody span"); + + this.mbtn = new Ext.Button({ + text: " ", + tooltip: this.monthYearText, + renderTo: this.el.child("td.x-date-middle", true) + }); + + this.mbtn.on('click', this.showMonthPicker, this); + this.mbtn.el.child(this.mbtn.menuClassTarget).addClass("x-btn-with-menu"); + + + var today = (new Date()).dateFormat(this.format); + var todayBtn = new Ext.Button({ + renderTo: this.el.child("td.x-date-bottom", true), + text: String.format(this.todayText, today), + tooltip: String.format(this.todayTip, today), + handler: this.selectToday, + scope: this + }); + + if(Ext.isIE){ + this.el.repaint(); + } + this.update(this.value); + }, + + createMonthPicker : function(){ + if(!this.monthPicker.dom.firstChild){ + var buf = ['']; + for(var i = 0; i < 6; i++){ + buf.push( + '', + '', + i == 0 ? + '' : + '' + ); + } + buf.push( + '', + '
        ', this.monthNames[i].substr(0, 3), '', this.monthNames[i+6].substr(0, 3), '
        ' + ); + this.monthPicker.update(buf.join('')); + this.monthPicker.on('click', this.onMonthClick, this); + this.monthPicker.on('dblclick', this.onMonthDblClick, this); + + this.mpMonths = this.monthPicker.select('td.x-date-mp-month'); + this.mpYears = this.monthPicker.select('td.x-date-mp-year'); + + this.mpMonths.each(function(m, a, i){ + i += 1; + if((i%2) == 0){ + m.dom.xmonth = 5 + Math.round(i * .5); + }else{ + m.dom.xmonth = Math.round((i-1) * .5); + } + }); + } + }, + + showMonthPicker : function(){ + this.createMonthPicker(); + var size = this.el.getSize(); + this.monthPicker.setSize(size); + this.monthPicker.child('table').setSize(size); + + this.mpSelMonth = (this.activeDate || this.value).getMonth(); + this.updateMPMonth(this.mpSelMonth); + this.mpSelYear = (this.activeDate || this.value).getFullYear(); + this.updateMPYear(this.mpSelYear); + + this.monthPicker.slideIn('t', {duration:.2}); + }, + + updateMPYear : function(y){ + this.mpyear = y; + var ys = this.mpYears.elements; + for(var i = 1; i <= 10; i++){ + var td = ys[i-1], y2; + if((i%2) == 0){ + y2 = y + Math.round(i * .5); + td.firstChild.innerHTML = y2; + td.xyear = y2; + }else{ + y2 = y - (5-Math.round(i * .5)); + td.firstChild.innerHTML = y2; + td.xyear = y2; + } + this.mpYears.item(i-1)[y2 == this.mpSelYear ? 'addClass' : 'removeClass']('x-date-mp-sel'); + } + }, + + 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; + if(el.is('button.x-date-mp-cancel')){ + this.hideMonthPicker(); + } + else if(el.is('button.x-date-mp-ok')){ + this.update(new Date(this.mpSelYear, this.mpSelMonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + else if(pn = el.up('td.x-date-mp-month', 2)){ + this.mpMonths.removeClass('x-date-mp-sel'); + pn.addClass('x-date-mp-sel'); + this.mpSelMonth = pn.dom.xmonth; + } + else if(pn = el.up('td.x-date-mp-year', 2)){ + this.mpYears.removeClass('x-date-mp-sel'); + pn.addClass('x-date-mp-sel'); + this.mpSelYear = pn.dom.xyear; + } + else if(el.is('a.x-date-mp-prev')){ + this.updateMPYear(this.mpyear-10); + } + else if(el.is('a.x-date-mp-next')){ + this.updateMPYear(this.mpyear+10); + } + }, + + onMonthDblClick : function(e, t){ + e.stopEvent(); + var el = new Ext.Element(t), pn; + if(pn = el.up('td.x-date-mp-month', 2)){ + this.update(new Date(this.mpSelYear, pn.dom.xmonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + else if(pn = el.up('td.x-date-mp-year', 2)){ + this.update(new Date(pn.dom.xyear, this.mpSelMonth, (this.activeDate || this.value).getDate())); + this.hideMonthPicker(); + } + }, + + hideMonthPicker : function(disableAnim){ + if(this.monthPicker){ + if(disableAnim === true){ + this.monthPicker.hide(); + }else{ + this.monthPicker.slideOut('t', {duration:.2}); + } + } + }, + + // private + showPrevMonth : function(e){ + this.update(this.activeDate.add("mo", -1)); + }, + + // private + showNextMonth : function(e){ + this.update(this.activeDate.add("mo", 1)); + }, + + // private + showPrevYear : function(){ + this.update(this.activeDate.add("y", -1)); + }, + + // private + showNextYear : function(){ + this.update(this.activeDate.add("y", 1)); + }, + + // private + handleMouseWheel : function(e){ + var delta = e.getWheelDelta(); + if(delta > 0){ + this.showPrevMonth(); + e.stopEvent(); + } else if(delta < 0){ + this.showNextMonth(); + e.stopEvent(); + } + }, + + // private + handleDateClick : function(e, t){ + e.stopEvent(); + if(t.dateValue && !Ext.fly(t.parentNode).hasClass("x-date-disabled")){ + this.setValue(new Date(t.dateValue)); + this.fireEvent("select", this, this.value); + } + }, + + // private + selectToday : function(){ + this.setValue(new Date().clearTime()); + this.fireEvent("select", this, this.value); + }, + + // private + update : function(date){ + var vd = this.activeDate; + this.activeDate = date; + if(vd && this.el){ + var t = date.getTime(); + if(vd.getMonth() == date.getMonth() && vd.getFullYear() == date.getFullYear()){ + this.cells.removeClass("x-date-selected"); + this.cells.each(function(c){ + if(c.dom.firstChild.dateValue == t){ + c.addClass("x-date-selected"); + setTimeout(function(){ + try{c.dom.firstChild.focus();}catch(e){} + }, 50); + return false; + } + }); + return; + } + } + var days = date.getDaysInMonth(); + var firstOfMonth = date.getFirstDateOfMonth(); + var startingPos = firstOfMonth.getDay()-this.startDay; + + if(startingPos <= this.startDay){ + startingPos += 7; + } + + var pm = date.add("mo", -1); + var prevStart = pm.getDaysInMonth()-startingPos; + + var cells = this.cells.elements; + var textEls = this.textNodes; + days += startingPos; + + // convert everything to numbers so it's fast + var day = 86400000; + var d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime(); + var today = new Date().clearTime().getTime(); + var sel = date.clearTime().getTime(); + var min = this.minDate ? this.minDate.clearTime() : Number.NEGATIVE_INFINITY; + var max = this.maxDate ? this.maxDate.clearTime() : Number.POSITIVE_INFINITY; + var ddMatch = this.disabledDatesRE; + var ddText = this.disabledDatesText; + var ddays = this.disabledDays ? this.disabledDays.join("") : false; + var ddaysText = this.disabledDaysText; + var format = this.format; + + var setCellClass = function(cal, cell){ + cell.title = ""; + var t = d.getTime(); + cell.firstChild.dateValue = t; + if(t == today){ + cell.className += " x-date-today"; + cell.title = cal.todayText; + } + if(t == sel){ + cell.className += " x-date-selected"; + setTimeout(function(){ + try{cell.firstChild.focus();}catch(e){} + }, 50); + } + // disabling + if(t < min) { + cell.className = " x-date-disabled"; + cell.title = cal.minText; + return; + } + if(t > max) { + cell.className = " x-date-disabled"; + cell.title = cal.maxText; + return; + } + if(ddays){ + if(ddays.indexOf(d.getDay()) != -1){ + cell.title = ddaysText; + cell.className = " x-date-disabled"; + } + } + if(ddMatch && format){ + var fvalue = d.dateFormat(format); + if(ddMatch.test(fvalue)){ + cell.title = ddText.replace("%0", fvalue); + cell.className = " x-date-disabled"; + } + } + }; + + var i = 0; + for(; i < startingPos; i++) { + textEls[i].innerHTML = (++prevStart); + d.setDate(d.getDate()+1); + cells[i].className = "x-date-prevday"; + setCellClass(this, cells[i]); + } + for(; i < days; i++){ + intDay = i - startingPos + 1; + textEls[i].innerHTML = (intDay); + d.setDate(d.getDate()+1); + cells[i].className = "x-date-active"; + setCellClass(this, cells[i]); + } + var extraDays = 0; + for(; i < 42; i++) { + textEls[i].innerHTML = (++extraDays); + d.setDate(d.getDate()+1); + cells[i].className = "x-date-nextday"; + setCellClass(this, cells[i]); + } + + this.mbtn.setText(this.monthNames[date.getMonth()] + " " + date.getFullYear()); + + if(!this.internalRender){ + var main = this.el.dom.firstChild; + var w = main.offsetWidth; + this.el.setWidth(w + this.el.getBorderWidth("lr")); + Ext.fly(main).setWidth(w); + this.internalRender = true; + // opera does not respect the auto grow header center column + // then, after it gets a width opera refuses to recalculate + // without a second pass + 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; + this.update.defer(10, this, [date]); + } + } + } +}); +Ext.reg('datepicker', Ext.DatePicker); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Editor.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Editor.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Editor.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,339 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Editor + * @extends Ext.Component + * A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic. + * @constructor + * Create a new Editor + * @param {Ext.form.Field} field The Field object (or descendant) + * @param {Object} config The config object + */ +Ext.Editor = function(field, config){ + this.field = field; + Ext.Editor.superclass.constructor.call(this, config); +}; + +Ext.extend(Ext.Editor, Ext.Component, { + /** + * @cfg {Boolean/String} autosize + * True for the editor to automatically adopt the size of the underlying field, "width" to adopt the width only, + * or "height" to adopt the height only (defaults to false) + */ + /** + * @cfg {Boolean} revertInvalid + * True to automatically revert the field value and cancel the edit when the user completes an edit and the field + * validation fails (defaults to true) + */ + /** + * @cfg {Boolean} ignoreNoChange + * True to skip the the edit completion process (no save, no events fired) if the user completes an edit and + * the value has not changed (defaults to false). Applies only to string values - edits for other data types + * will never be ignored. + */ + /** + * @cfg {Boolean} hideEl + * False to keep the bound element visible while the editor is displayed (defaults to true) + */ + /** + * @cfg {Mixed} value + * The data value of the underlying field (defaults to "") + */ + value : "", + /** + * @cfg {String} alignment + * The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to "c-c?"). + */ + alignment: "c-c?", + /** + * @cfg {Boolean/String} shadow "sides" for sides/bottom only, "frame" for 4-way shadow, and "drop" + * for bottom-right shadow (defaults to "frame") + */ + shadow : "frame", + /** + * @cfg {Boolean} constrain True to constrain the editor to the viewport + */ + constrain : false, + /** + * @cfg {Boolean} swallowKeys Handle the keydown/keypress events so they don't propagate (defaults to true) + */ + swallowKeys : true, + /** + * @cfg {Boolean} completeOnEnter True to complete the edit when the enter key is pressed (defaults to false) + */ + completeOnEnter : false, + /** + * @cfg {Boolean} cancelOnEsc True to cancel the edit when the escape key is pressed (defaults to false) + */ + cancelOnEsc : false, + /** + * @cfg {Boolean} updateEl True to update the innerHTML of the bound element when the update completes (defaults to false) + */ + updateEl : false, + + initComponent : function(){ + Ext.Editor.superclass.initComponent.call(this); + + this.addEvents( + /** + * @event beforestartedit + * Fires when editing is initiated, but before the value changes. Editing can be canceled by returning + * false from the handler of this event. + * @param {Editor} this + * @param {Ext.Element} boundEl The underlying element bound to this editor + * @param {Mixed} value The field value being set + */ + "beforestartedit", + /** + * @event startedit + * Fires when this editor is displayed + * @param {Ext.Element} boundEl The underlying element bound to this editor + * @param {Mixed} value The starting field value + */ + "startedit", + /** + * @event beforecomplete + * Fires after a change has been made to the field, but before the change is reflected in the underlying + * field. Saving the change to the field can be canceled by returning false from the handler of this event. + * Note that if the value has not changed and ignoreNoChange = true, the editing will still end but this + * event will not fire since no edit actually occurred. + * @param {Editor} this + * @param {Mixed} value The current field value + * @param {Mixed} startValue The original field value + */ + "beforecomplete", + /** + * @event complete + * Fires after editing is complete and any changed value has been written to the underlying field. + * @param {Editor} this + * @param {Mixed} value The current field value + * @param {Mixed} startValue The original field value + */ + "complete", + /** + * @event specialkey + * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. You can check + * {@link Ext.EventObject#getKey} to determine which key was pressed. + * @param {Ext.form.Field} this + * @param {Ext.EventObject} e The event object + */ + "specialkey" + ); + }, + + // private + onRender : function(ct, position){ + this.el = new Ext.Layer({ + shadow: this.shadow, + cls: "x-editor", + parentEl : ct, + shim : this.shim, + shadowOffset:4, + id: this.id, + constrain: this.constrain + }); + this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); + if(this.field.msgTarget != 'title'){ + this.field.msgTarget = 'qtip'; + } + this.field.render(this.el); + if(Ext.isGecko){ + this.field.el.dom.setAttribute('autocomplete', 'off'); + } + this.field.on("specialkey", this.onSpecialKey, this); + if(this.swallowKeys){ + this.field.el.swallowEvent(['keydown','keypress']); + } + this.field.show(); + this.field.on("blur", this.onBlur, this); + if(this.field.grow){ + this.field.on("autosize", this.el.sync, this.el, {delay:1}); + } + }, + + onSpecialKey : function(field, e){ + if(this.completeOnEnter && e.getKey() == e.ENTER){ + e.stopEvent(); + this.completeEdit(); + }else if(this.cancelOnEsc && e.getKey() == e.ESC){ + this.cancelEdit(); + }else{ + this.fireEvent('specialkey', field, e); + } + }, + + /** + * Starts the editing process and shows the editor. + * @param {Mixed} el The element to edit + * @param {String} value (optional) A value to initialize the editor with. If a value is not provided, it defaults + * to the innerHTML of el. + */ + startEdit : function(el, value){ + if(this.editing){ + this.completeEdit(); + } + this.boundEl = Ext.get(el); + var v = value !== undefined ? value : this.boundEl.dom.innerHTML; + if(!this.rendered){ + this.render(this.parentEl || document.body); + } + if(this.fireEvent("beforestartedit", this, this.boundEl, v) === false){ + return; + } + this.startValue = v; + this.field.setValue(v); + if(this.autoSize){ + var sz = this.boundEl.getSize(); + switch(this.autoSize){ + case "width": + this.setSize(sz.width, ""); + break; + case "height": + this.setSize("", sz.height); + break; + default: + this.setSize(sz.width, sz.height); + } + } + this.el.alignTo(this.boundEl, this.alignment); + this.editing = true; + this.show(); + }, + + /** + * Sets the height and width of this editor. + * @param {Number} width The new width + * @param {Number} height The new height + */ + setSize : function(w, h){ + this.field.setSize(w, h); + if(this.el){ + this.el.sync(); + } + }, + + /** + * Realigns the editor to the bound field based on the current alignment config value. + */ + realign : function(){ + this.el.alignTo(this.boundEl, this.alignment); + }, + + /** + * Ends the editing process, persists the changed value to the underlying field, and hides the editor. + * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after edit (defaults to false) + */ + completeEdit : function(remainVisible){ + if(!this.editing){ + return; + } + var v = this.getValue(); + if(this.revertInvalid !== false && !this.field.isValid()){ + v = this.startValue; + this.cancelEdit(true); + } + if(String(v) === String(this.startValue) && this.ignoreNoChange){ + this.editing = false; + this.hide(); + return; + } + if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false){ + this.editing = false; + if(this.updateEl && this.boundEl){ + this.boundEl.update(v); + } + if(remainVisible !== true){ + this.hide(); + } + this.fireEvent("complete", this, v, this.startValue); + } + }, + + // private + onShow : function(){ + this.el.show(); + if(this.hideEl !== false){ + this.boundEl.hide(); + } + this.field.show(); + if(Ext.isIE && !this.fixIEFocus){ // IE has problems with focusing the first time + this.fixIEFocus = true; + this.deferredFocus.defer(50, this); + }else{ + this.field.focus(); + } + this.fireEvent("startedit", this.boundEl, this.startValue); + }, + + deferredFocus : function(){ + if(this.editing){ + this.field.focus(); + } + }, + + /** + * Cancels the editing process and hides the editor without persisting any changes. The field value will be + * reverted to the original starting value. + * @param {Boolean} remainVisible Override the default behavior and keep the editor visible after + * cancel (defaults to false) + */ + cancelEdit : function(remainVisible){ + if(this.editing){ + this.setValue(this.startValue); + if(remainVisible !== true){ + this.hide(); + } + } + }, + + // private + onBlur : function(){ + if(this.allowBlur !== true && this.editing){ + this.completeEdit(); + } + }, + + // private + onHide : function(){ + if(this.editing){ + this.completeEdit(); + return; + } + this.field.blur(); + if(this.field.collapse){ + this.field.collapse(); + } + this.el.hide(); + if(this.hideEl !== false){ + this.boundEl.show(); + } + }, + + /** + * Sets the data value of the editor + * @param {Mixed} value Any valid value supported by the underlying field + */ + setValue : function(v){ + this.field.setValue(v); + }, + + /** + * Gets the data value of the editor + * @return {Mixed} The data value + */ + getValue : function(){ + return this.field.getValue(); + }, + + beforeDestroy : function(){ + this.field.destroy(); + this.field = null; + } +}); +Ext.reg('editor', Ext.Editor); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Layer.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Layer.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Layer.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,452 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Layer + * @extends Ext.Element + * An extended {@link Ext.Element} object that supports a shadow and shim, constrain to viewport and + * automatic maintaining of shadow/shim positions. + * @cfg {Boolean} shim False to disable the iframe shim in browsers which need one (defaults to true) + * @cfg {String/Boolean} shadow True to create a shadow element with default class "x-layer-shadow", or + * you can pass a string with a CSS class name. False turns off the shadow. + * @cfg {Object} dh DomHelper object config to create element with (defaults to {tag: "div", cls: "x-layer"}). + * @cfg {Boolean} constrain False to disable constrain to viewport (defaults to true) + * @cfg {String} cls CSS class to add to the element + * @cfg {Number} zindex Starting z-index (defaults to 11000) + * @cfg {Number} shadowOffset Number of pixels to offset the shadow (defaults to 3) + * @constructor + * @param {Object} config An object with config options. + * @param {String/HTMLElement} existingEl (optional) Uses an existing DOM element. If the element is not found it creates it. + */ +(function(){ +Ext.Layer = function(config, existingEl){ + config = config || {}; + var dh = Ext.DomHelper; + var cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body; + if(existingEl){ + this.dom = Ext.getDom(existingEl); + } + if(!this.dom){ + var o = config.dh || {tag: "div", cls: "x-layer"}; + this.dom = dh.append(pel, o); + } + if(config.cls){ + this.addClass(config.cls); + } + this.constrain = config.constrain !== false; + this.visibilityMode = Ext.Element.VISIBILITY; + if(config.id){ + this.id = this.dom.id = config.id; + }else{ + this.id = Ext.id(this.dom); + } + this.zindex = config.zindex || this.getZIndex(); + this.position("absolute", this.zindex); + if(config.shadow){ + this.shadowOffset = config.shadowOffset || 4; + this.shadow = new Ext.Shadow({ + offset : this.shadowOffset, + mode : config.shadow + }); + }else{ + this.shadowOffset = 0; + } + this.useShim = config.shim !== false && Ext.useShims; + this.useDisplay = config.useDisplay; + this.hide(); +}; + +var supr = Ext.Element.prototype; + +// shims are shared among layer to keep from having 100 iframes +var shims = []; + +Ext.extend(Ext.Layer, Ext.Element, { + + getZIndex : function(){ + return this.zindex || parseInt(this.getStyle("z-index"), 10) || 11000; + }, + + getShim : function(){ + if(!this.useShim){ + return null; + } + if(this.shim){ + return this.shim; + } + var shim = shims.shift(); + if(!shim){ + shim = this.createShim(); + shim.enableDisplayMode('block'); + shim.dom.style.display = 'none'; + shim.dom.style.visibility = 'visible'; + } + var pn = this.dom.parentNode; + if(shim.dom.parentNode != pn){ + pn.insertBefore(shim.dom, this.dom); + } + shim.setStyle('z-index', this.getZIndex()-2); + this.shim = shim; + return shim; + }, + + hideShim : function(){ + if(this.shim){ + this.shim.setDisplayed(false); + shims.push(this.shim); + delete this.shim; + } + }, + + disableShadow : function(){ + if(this.shadow){ + this.shadowDisabled = true; + this.shadow.hide(); + this.lastShadowOffset = this.shadowOffset; + this.shadowOffset = 0; + } + }, + + enableShadow : function(show){ + if(this.shadow){ + this.shadowDisabled = false; + this.shadowOffset = this.lastShadowOffset; + delete this.lastShadowOffset; + if(show){ + this.sync(true); + } + } + }, + + // private + // this code can execute repeatedly in milliseconds (i.e. during a drag) so + // code size was sacrificed for effeciency (e.g. no getBox/setBox, no XY calls) + sync : function(doShow){ + var sw = this.shadow; + if(!this.updating && this.isVisible() && (sw || this.useShim)){ + var sh = this.getShim(); + + var w = this.getWidth(), + h = this.getHeight(); + + var l = this.getLeft(true), + t = this.getTop(true); + + if(sw && !this.shadowDisabled){ + if(doShow && !sw.isVisible()){ + sw.show(this); + }else{ + sw.realign(l, t, w, h); + } + if(sh){ + if(doShow){ + sh.show(); + } + // fit the shim behind the shadow, so it is shimmed too + var a = sw.adjusts, s = sh.dom.style; + s.left = (Math.min(l, l+a.l))+"px"; + s.top = (Math.min(t, t+a.t))+"px"; + s.width = (w+a.w)+"px"; + s.height = (h+a.h)+"px"; + } + }else if(sh){ + if(doShow){ + sh.show(); + } + sh.setSize(w, h); + sh.setLeftTop(l, t); + } + + } + }, + + // private + destroy : function(){ + this.hideShim(); + if(this.shadow){ + this.shadow.hide(); + } + this.removeAllListeners(); + Ext.removeNode(this.dom); + Ext.Element.uncache(this.id); + }, + + remove : function(){ + this.destroy(); + }, + + // private + beginUpdate : function(){ + this.updating = true; + }, + + // private + endUpdate : function(){ + this.updating = false; + this.sync(true); + }, + + // private + hideUnders : function(negOffset){ + if(this.shadow){ + this.shadow.hide(); + } + this.hideShim(); + }, + + // private + constrainXY : function(){ + if(this.constrain){ + var vw = Ext.lib.Dom.getViewWidth(), + vh = Ext.lib.Dom.getViewHeight(); + var s = Ext.getDoc().getScroll(); + + var xy = this.getXY(); + var x = xy[0], y = xy[1]; + var w = this.dom.offsetWidth+this.shadowOffset, h = this.dom.offsetHeight+this.shadowOffset; + // only move it if it needs it + var moved = false; + // first validate right/bottom + if((x + w) > vw+s.left){ + x = vw - w - this.shadowOffset; + moved = true; + } + if((y + h) > vh+s.top){ + y = vh - h - this.shadowOffset; + moved = true; + } + // then make sure top/left isn't negative + if(x < s.left){ + x = s.left; + moved = true; + } + if(y < s.top){ + y = s.top; + moved = true; + } + if(moved){ + if(this.avoidY){ + var ay = this.avoidY; + if(y <= ay && (y+h) >= ay){ + y = ay-h-5; + } + } + xy = [x, y]; + this.storeXY(xy); + supr.setXY.call(this, xy); + this.sync(); + } + } + }, + + isVisible : function(){ + return this.visible; + }, + + // private + showAction : function(){ + this.visible = true; // track visibility to prevent getStyle calls + if(this.useDisplay === true){ + this.setDisplayed(""); + }else if(this.lastXY){ + supr.setXY.call(this, this.lastXY); + }else if(this.lastLT){ + supr.setLeftTop.call(this, this.lastLT[0], this.lastLT[1]); + } + }, + + // private + hideAction : function(){ + this.visible = false; + if(this.useDisplay === true){ + this.setDisplayed(false); + }else{ + this.setLeftTop(-10000,-10000); + } + }, + + // overridden Element method + setVisible : function(v, a, d, c, e){ + if(v){ + this.showAction(); + } + if(a && v){ + var cb = function(){ + this.sync(true); + if(c){ + c(); + } + }.createDelegate(this); + supr.setVisible.call(this, true, true, d, cb, e); + }else{ + if(!v){ + this.hideUnders(true); + } + var cb = c; + if(a){ + cb = function(){ + this.hideAction(); + if(c){ + c(); + } + }.createDelegate(this); + } + supr.setVisible.call(this, v, a, d, cb, e); + if(v){ + this.sync(true); + }else if(!a){ + this.hideAction(); + } + } + }, + + storeXY : function(xy){ + delete this.lastLT; + this.lastXY = xy; + }, + + storeLeftTop : function(left, top){ + delete this.lastXY; + this.lastLT = [left, top]; + }, + + // private + beforeFx : function(){ + this.beforeAction(); + return Ext.Layer.superclass.beforeFx.apply(this, arguments); + }, + + // private + afterFx : function(){ + Ext.Layer.superclass.afterFx.apply(this, arguments); + this.sync(this.isVisible()); + }, + + // private + beforeAction : function(){ + if(!this.updating && this.shadow){ + this.shadow.hide(); + } + }, + + // overridden Element method + setLeft : function(left){ + this.storeLeftTop(left, this.getTop(true)); + supr.setLeft.apply(this, arguments); + this.sync(); + }, + + setTop : function(top){ + this.storeLeftTop(this.getLeft(true), top); + supr.setTop.apply(this, arguments); + this.sync(); + }, + + setLeftTop : function(left, top){ + this.storeLeftTop(left, top); + supr.setLeftTop.apply(this, arguments); + this.sync(); + }, + + setXY : function(xy, a, d, c, e){ + this.fixDisplay(); + this.beforeAction(); + this.storeXY(xy); + var cb = this.createCB(c); + supr.setXY.call(this, xy, a, d, cb, e); + if(!a){ + cb(); + } + }, + + // private + createCB : function(c){ + var el = this; + return function(){ + el.constrainXY(); + el.sync(true); + if(c){ + c(); + } + }; + }, + + // overridden Element method + setX : function(x, a, d, c, e){ + this.setXY([x, this.getY()], a, d, c, e); + }, + + // overridden Element method + setY : function(y, a, d, c, e){ + this.setXY([this.getX(), y], a, d, c, e); + }, + + // overridden Element method + setSize : function(w, h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setSize.call(this, w, h, a, d, cb, e); + if(!a){ + cb(); + } + }, + + // overridden Element method + setWidth : function(w, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setWidth.call(this, w, a, d, cb, e); + if(!a){ + cb(); + } + }, + + // overridden Element method + setHeight : function(h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + supr.setHeight.call(this, h, a, d, cb, e); + if(!a){ + cb(); + } + }, + + // overridden Element method + setBounds : function(x, y, w, h, a, d, c, e){ + this.beforeAction(); + var cb = this.createCB(c); + if(!a){ + this.storeXY([x, y]); + supr.setXY.call(this, [x, y]); + supr.setSize.call(this, w, h, a, d, cb, e); + cb(); + }else{ + supr.setBounds.call(this, x, y, w, h, a, d, cb, e); + } + return this; + }, + + /** + * Sets the z-index of this layer and adjusts any shadow and shim z-indexes. The layer z-index is automatically + * incremented by two more than the value passed in so that it always shows above any shadow or shim (the shadow + * element, if any, will be assigned z-index + 1, and the shim element, if any, will be assigned the unmodified z-index). + * @param {Number} zindex The new z-index to set + * @return {this} The Layer + */ + setZIndex : function(zindex){ + this.zindex = zindex; + this.setStyle("z-index", zindex + 2); + if(this.shadow){ + this.shadow.setZIndex(zindex + 1); + } + if(this.shim){ + this.shim.setStyle("z-index", zindex); + } + } +}); +})(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/LoadMask.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/LoadMask.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/LoadMask.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,108 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.LoadMask + * A simple utility class for generically masking elements while loading data. If the element being masked has + * an underlying {@link Ext.data.Store}, the masking will be automatically synchronized with the store's loading + * process and the mask element will be cached for reuse. For all other elements, this mask will replace the + * element's Updater load indicator and will be destroyed after the initial load. + * @constructor + * Create a new LoadMask + * @param {Mixed} el The element or DOM node, or its id + * @param {Object} config The config object + */ +Ext.LoadMask = function(el, config){ + this.el = Ext.get(el); + Ext.apply(this, config); + if(this.store){ + this.store.on('beforeload', this.onBeforeLoad, this); + this.store.on('load', this.onLoad, this); + this.store.on('loadexception', this.onLoad, this); + this.removeMask = Ext.value(this.removeMask, false); + }else{ + var um = this.el.getUpdater(); + um.showLoadIndicator = false; // disable the default indicator + um.on('beforeupdate', this.onBeforeLoad, this); + um.on('update', this.onLoad, this); + um.on('failure', this.onLoad, this); + this.removeMask = Ext.value(this.removeMask, true); + } +}; + +Ext.LoadMask.prototype = { + /** + * @cfg {Boolean} removeMask + * True to create a single-use mask that is automatically destroyed after loading (useful for page loads), + * False to persist the mask element reference for multiple uses (e.g., for paged data widgets). Defaults to false. + */ + /** + * @cfg {String} msg + * The text to display in a centered loading message box (defaults to 'Loading...') + */ + msg : 'Loading...', + /** + * @cfg {String} msgCls + * The CSS class to apply to the loading message element (defaults to "x-mask-loading") + */ + msgCls : 'x-mask-loading', + + /** + * Read-only. True if the mask is currently disabled so that it will not be displayed (defaults to false) + * @type Boolean + */ + disabled: false, + + /** + * Disables the mask to prevent it from being displayed + */ + disable : function(){ + this.disabled = true; + }, + + /** + * Enables the mask so that it can be displayed + */ + enable : function(){ + this.disabled = false; + }, + + // private + onLoad : function(){ + this.el.unmask(this.removeMask); + }, + + // private + onBeforeLoad : function(){ + if(!this.disabled){ + this.el.mask(this.msg, this.msgCls); + } + }, + + show: function(){ + this.onBeforeLoad(); + }, + + hide: function(){ + this.onLoad(); + }, + + // private + destroy : function(){ + if(this.store){ + this.store.un('beforeload', this.onBeforeLoad, this); + this.store.un('load', this.onLoad, this); + this.store.un('loadexception', this.onLoad, this); + }else{ + var um = this.el.getUpdater(); + um.un('beforeupdate', this.onBeforeLoad, this); + um.un('update', this.onLoad, this); + um.un('failure', this.onLoad, this); + } + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/MessageBox.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/MessageBox.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/MessageBox.js 4 Dec 2007 02:48:57 -0000 1.1 @@ -0,0 +1,600 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.MessageBox + *

        Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.

        + *

        Note that the MessageBox is asynchronous. Unlike a regular JavaScript alert (which will halt + * browser execution), showing a MessageBox will not cause the code to stop. For this reason, if you have code + * that should only run after some user feedback from the MessageBox, you must use a callback function + * (see the function parameter for {@link #show} for more details).

        + *

        Example usage:

        + *
        
        +// Basic alert:
        +Ext.Msg.alert('Status', 'Changes saved successfully.');
        +
        +// Prompt for user data and process the result using a callback:
        +Ext.Msg.prompt('Name', 'Please enter your name:', function(btn, text){
        +    if (btn == 'ok'){
        +        // process text value and close...
        +    }
        +});
        +
        +// Show a dialog using config options:
        +Ext.Msg.show({
        +   title:'Save Changes?',
        +   msg: 'Your are closing a tab that has unsaved changes. Would you like to save your changes?',
        +   buttons: Ext.Msg.YESNOCANCEL,
        +   fn: processResult,
        +   animEl: 'elId',
        +   icon: Ext.MessageBox.QUESTION
        +});
        +
        + * @singleton + */ +Ext.MessageBox = function(){ + var dlg, opt, mask, waitTimer; + var bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl; + var buttons, activeTextEl, bwidth, iconCls = ''; + + // private + var handleButton = function(button){ + dlg.hide(); + Ext.callback(opt.fn, opt.scope||window, [button, activeTextEl.dom.value], 1); + }; + + // private + var handleHide = function(){ + if(opt && opt.cls){ + dlg.el.removeClass(opt.cls); + } + progressBar.reset(); + }; + + // private + var handleEsc = function(d, k, e){ + if(opt && opt.closable !== false){ + dlg.hide(); + } + if(e){ + e.stopEvent(); + } + }; + + // private + var updateButtons = function(b){ + var width = 0; + if(!b){ + buttons["ok"].hide(); + buttons["cancel"].hide(); + buttons["yes"].hide(); + buttons["no"].hide(); + return width; + } + dlg.footer.dom.style.display = ''; + for(var k in buttons){ + if(typeof buttons[k] != "function"){ + if(b[k]){ + buttons[k].show(); + buttons[k].setText(typeof b[k] == "string" ? b[k] : Ext.MessageBox.buttonText[k]); + width += buttons[k].el.getWidth()+15; + }else{ + buttons[k].hide(); + } + } + } + return width; + }; + + return { + /** + * Returns a reference to the underlying {@link Ext.Window} element + * @return {Ext.Window} The window + */ + getDialog : function(titleText){ + if(!dlg){ + dlg = new Ext.Window({ + autoCreate : true, + title:titleText, + resizable:false, + constrain:true, + constrainHeader:true, + minimizable : false, + maximizable : false, + stateful: false, + modal: true, + shim:true, + buttonAlign:"center", + width:400, + height:100, + minHeight: 80, + plain:true, + footer:true, + closable:true, + close : function(){ + if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ + handleButton("no"); + }else{ + handleButton("cancel"); + } + } + }); + buttons = {}; + var bt = this.buttonText; + //TODO: refactor this block into a buttons config to pass into the Window constructor + buttons["ok"] = dlg.addButton(bt["ok"], handleButton.createCallback("ok")); + buttons["yes"] = dlg.addButton(bt["yes"], handleButton.createCallback("yes")); + buttons["no"] = dlg.addButton(bt["no"], handleButton.createCallback("no")); + buttons["cancel"] = dlg.addButton(bt["cancel"], handleButton.createCallback("cancel")); + buttons["ok"].hideMode = buttons["yes"].hideMode = buttons["no"].hideMode = buttons["cancel"].hideMode = 'offsets'; + dlg.render(document.body); + dlg.getEl().addClass('x-window-dlg'); + mask = dlg.mask; + bodyEl = dlg.body.createChild({ + html:'

        ' + }); + iconEl = Ext.get(bodyEl.dom.firstChild); + var contentEl = bodyEl.dom.childNodes[1]; + msgEl = Ext.get(contentEl.firstChild); + textboxEl = Ext.get(contentEl.childNodes[2]); + textboxEl.enableDisplayMode(); + textboxEl.addKeyListener([10,13], function(){ + if(dlg.isVisible() && opt && opt.buttons){ + if(opt.buttons.ok){ + handleButton("ok"); + }else if(opt.buttons.yes){ + handleButton("yes"); + } + } + }); + textareaEl = Ext.get(contentEl.childNodes[3]); + textareaEl.enableDisplayMode(); + progressBar = new Ext.ProgressBar({ + renderTo:bodyEl + }); + bodyEl.createChild({cls:'x-clear'}); + } + return dlg; + }, + + /** + * Updates the message box body text + * @param {String} text (optional) Replaces the message box element's innerHTML with the specified string (defaults to + * the XHTML-compliant non-breaking space character '&#160;') + * @return {Ext.MessageBox} this + */ + updateText : function(text){ + if(!dlg.isVisible() && !opt.width){ + dlg.setSize(this.maxWidth, 100); // resize first so content is never clipped from previous shows + } + msgEl.update(text || ' '); + + var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0; + var mw = msgEl.getWidth() + msgEl.getMargins('lr'); + var fw = dlg.getFrameWidth('lr'); + var bw = dlg.body.getFrameWidth('lr'); + if (Ext.isIE && iw > 0){ + //3 pixels get subtracted in the icon CSS for an IE margin issue, + //so we have to add it back here for the overall width to be consistent + iw += 3; + } + var w = Math.max(Math.min(opt.width || iw+mw+fw+bw, this.maxWidth), + Math.max(opt.minWidth || this.minWidth, bwidth || 0)); + + if(opt.prompt === true){ + activeTextEl.setWidth(w-iw-fw-bw); + } + if(opt.progress === true || opt.wait === true){ + progressBar.setSize(w-iw-fw-bw); + } + dlg.setSize(w, 'auto').center(); + return this; + }, + + /** + * Updates a progress-style message box's text and progress bar. Only relevant on message boxes + * initiated via {@link Ext.MessageBox#progress} or by calling {@link Ext.MessageBox#show} with progress: true. + * @param {Number} value Any number between 0 and 1 (e.g., .5, defaults to 0) + * @param {String} progressText The progress text to display inside the progress bar (defaults to '') + * @param {String} msg The message box's body text is replaced with the specified string (defaults to undefined + * so that any existing body text will not get overwritten by default unless a new value is passed in) + * @return {Ext.MessageBox} this + */ + updateProgress : function(value, progressText, msg){ + progressBar.updateProgress(value, progressText); + if(msg){ + this.updateText(msg); + } + return this; + }, + + /** + * Returns true if the message box is currently displayed + * @return {Boolean} True if the message box is visible, else false + */ + isVisible : function(){ + return dlg && dlg.isVisible(); + }, + + /** + * Hides the message box if it is displayed + * @return {Ext.MessageBox} this + */ + hide : function(){ + if(this.isVisible()){ + dlg.hide(); + handleHide(); + } + return this; + }, + + /** + * Displays a new message box, or reinitializes an existing message box, based on the config options + * passed in. All display functions (e.g. prompt, alert, etc.) on MessageBox call this function internally, + * although those calls are basic shortcuts and do not support all of the config options allowed here. + * The following config object properties are supported: + *
        +Property          Type             Description
        +----------------  ---------------  -----------------------------------------------------------------------------
        +animEl            String/Element   An id or Element from which the message box should animate as it opens and
        +                                   closes (defaults to undefined)
        +buttons           Object/Boolean   A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo',
        +                                   cancel:'Bar'}), or false to not show any buttons (defaults to false)
        +closable          Boolean          False to hide the top-right close button (defaults to true).  Note that
        +                                   progress and wait dialogs will ignore this property and always hide the
        +                                   close button as they can only be closed programmatically.
        +cls               String           A custom CSS class to apply to the message box element
        +defaultTextHeight Number           The default height in pixels of the message box's multiline textarea if
        +                                   displayed (defaults to 75)
        +fn                Function         A callback function to execute after closing the dialog.  The arguments to the
        +                                   function will be btn (the name of the button that was clicked, if applicable,
        +                                   e.g. "ok"), and text (the value of the active text field, if applicable).
        +                                   Progress and wait dialogs will ignore this option since they do not respond to
        +                                   user actions and can only be closed programmatically, so any required function
        +                                   should be called by the same code after it closes the dialog.
        +icon              String           A CSS class that provides a background image to be used as an icon for
        +                                   the dialog (e.g., Ext.MessageBox.WARNING or 'custom-class', defaults to '')
        +maxWidth          Number           The maximum width in pixels of the message box (defaults to 600)
        +minWidth          Number           The minimum width in pixels of the message box (defaults to 100)
        +modal             Boolean          False to allow user interaction with the page while the message box is
        +                                   displayed (defaults to true)
        +msg               String           A string that will replace the existing message box body text (defaults
        +                                   to the XHTML-compliant non-breaking space character ' ')
        +multiline         Boolean          True to prompt the user to enter multi-line text (defaults to false)
        +progress          Boolean          True to display a progress bar (defaults to false)
        +progressText      String           The text to display inside the progress bar if progress = true (defaults to '')
        +prompt            Boolean          True to prompt the user to enter single-line text (defaults to false)
        +proxyDrag         Boolean          True to display a lightweight proxy while dragging (defaults to false)
        +title             String           The title text
        +value             String           The string value to set into the active textbox element if displayed
        +wait              Boolean          True to display a progress bar (defaults to false)
        +waitConfig        Object           A {@link Ext.ProgressBar#waitConfig} object (applies only if wait = true)
        +width             Number           The width of the dialog in pixels
        +
        + * + * Example usage: + *
        
        +Ext.Msg.show({
        +   title: 'Address',
        +   msg: 'Please enter your address:',
        +   width: 300,
        +   buttons: Ext.MessageBox.OKCANCEL,
        +   multiline: true,
        +   fn: saveAddress,
        +   animEl: 'addAddressBtn',
        +   icon: Ext.MessagBox.INFO
        +});
        +
        + * @param {Object} config Configuration options + * @return {Ext.MessageBox} this + */ + show : function(options){ + if(this.isVisible()){ + this.hide(); + } + opt = options; + var d = this.getDialog(opt.title || " "); + + d.setTitle(opt.title || " "); + var allowClose = (opt.closable !== false && opt.progress !== true && opt.wait !== true); + d.tools.close.setDisplayed(allowClose); + activeTextEl = textboxEl; + opt.prompt = opt.prompt || (opt.multiline ? true : false); + if(opt.prompt){ + if(opt.multiline){ + textboxEl.hide(); + textareaEl.show(); + textareaEl.setHeight(typeof opt.multiline == "number" ? + opt.multiline : this.defaultTextHeight); + activeTextEl = textareaEl; + }else{ + textboxEl.show(); + textareaEl.hide(); + } + }else{ + textboxEl.hide(); + textareaEl.hide(); + } + activeTextEl.dom.value = opt.value || ""; + if(opt.prompt){ + d.focusEl = activeTextEl; + }else{ + var bs = opt.buttons; + var db = null; + if(bs && bs.ok){ + db = buttons["ok"]; + }else if(bs && bs.yes){ + db = buttons["yes"]; + } + if (db){ + d.focusEl = db; + } + } + this.setIcon(opt.icon); + bwidth = updateButtons(opt.buttons); + progressBar.setVisible(opt.progress === true || opt.wait === true); + this.updateProgress(0, opt.progressText); + this.updateText(opt.msg); + if(opt.cls){ + d.el.addClass(opt.cls); + } + d.proxyDrag = opt.proxyDrag === true; + d.modal = opt.modal !== false; + d.mask = opt.modal !== false ? mask : false; + if(!d.isVisible()){ + // force it to the end of the z-index stack so it gets a cursor in FF + document.body.appendChild(dlg.el.dom); + d.setAnimateTarget(opt.animEl); + d.show(opt.animEl); + } + + //workaround for window internally enabling keymap in afterShow + d.on('show', function(){ + if(allowClose === true){ + d.keyMap.enable(); + }else{ + d.keyMap.disable(); + } + }); + + if(opt.wait === true){ + progressBar.wait(opt.waitConfig); + } + return this; + }, + + /** + * Adds the specified icon to the dialog. By default, the class 'ext-mb-icon' is applied for default + * styling, and the class passed in is expected to supply the background image url. Pass in empty string ('') + * to clear any existing icon. The following built-in icon classes are supported, but you can also pass + * in a custom class name: + *
        +Ext.MessageBox.INFO
        +Ext.MessageBox.WARNING
        +Ext.MessageBox.QUESTION
        +Ext.MessageBox.ERROR
        +         *
        + * @param {String} icon A CSS classname specifying the icon's background image url, or empty string to clear the icon + * @return {Ext.MessageBox} this + */ + setIcon : function(icon){ + if(icon && icon != ''){ + iconEl.removeClass('x-hidden'); + iconEl.replaceClass(iconCls, icon); + iconCls = icon; + }else{ + iconEl.replaceClass(iconCls, 'x-hidden'); + iconCls = ''; + } + return this; + }, + + /** + * Displays a message box with a progress bar. This message box has no buttons and is not closeable by + * the user. You are responsible for updating the progress bar as needed via {@link Ext.MessageBox#updateProgress} + * and closing the message box when the process is complete. + * @param {String} title The title bar text + * @param {String} msg The message box body text + * @param {String} progressText The text to display inside the progress bar (defaults to '') + * @return {Ext.MessageBox} this + */ + progress : function(title, msg, progressText){ + this.show({ + title : title, + msg : msg, + buttons: false, + progress:true, + closable:false, + minWidth: this.minProgressWidth, + progressText: progressText + }); + return this; + }, + + /** + * Displays a message box with an infinitely auto-updating progress bar. This can be used to block user + * interaction while waiting for a long-running process to complete that does not have defined intervals. + * You are responsible for closing the message box when the process is complete. + * @param {String} msg The message box body text + * @param {String} title (optional) The title bar text + * @param {Object} config (optional) A {@link Ext.ProgressBar#waitConfig} object + * @return {Ext.MessageBox} this + */ + wait : function(msg, title, config){ + this.show({ + title : title, + msg : msg, + buttons: false, + closable:false, + wait:true, + modal:true, + minWidth: this.minProgressWidth, + waitConfig: config + }); + return this; + }, + + /** + * Displays a standard read-only message box with an OK button (comparable to the basic JavaScript alert prompt). + * If a callback function is passed it will be called after the user clicks the button, and the + * id of the button that was clicked will be passed as the only parameter to the callback + * (could also be the top-right close button). + * @param {String} title The title bar text + * @param {String} msg The message box body text + * @param {Function} fn (optional) The callback function invoked after the message box is closed + * @param {Object} scope (optional) The scope of the callback function + * @return {Ext.MessageBox} this + */ + alert : function(title, msg, fn, scope){ + this.show({ + title : title, + msg : msg, + buttons: this.OK, + fn: fn, + scope : scope + }); + return this; + }, + + /** + * Displays a confirmation message box with Yes and No buttons (comparable to JavaScript's confirm). + * If a callback function is passed it will be called after the user clicks either button, + * and the id of the button that was clicked will be passed as the only parameter to the callback + * (could also be the top-right close button). + * @param {String} title The title bar text + * @param {String} msg The message box body text + * @param {Function} fn (optional) The callback function invoked after the message box is closed + * @param {Object} scope (optional) The scope of the callback function + * @return {Ext.MessageBox} this + */ + confirm : function(title, msg, fn, scope){ + this.show({ + title : title, + msg : msg, + buttons: this.YESNO, + fn: fn, + scope : scope, + icon: this.QUESTION + }); + return this; + }, + + /** + * Displays a message box with OK and Cancel buttons prompting the user to enter some text (comparable to JavaScript's prompt). + * The prompt can be a single-line or multi-line textbox. If a callback function is passed it will be called after the user + * clicks either button, and the id of the button that was clicked (could also be the top-right + * close button) and the text that was entered will be passed as the two parameters to the callback. + * @param {String} title The title bar text + * @param {String} msg The message box body text + * @param {Function} fn (optional) The callback function invoked after the message box is closed + * @param {Object} scope (optional) The scope of the callback function + * @param {Boolean/Number} multiline (optional) True to create a multiline textbox using the defaultTextHeight + * property, or the height in pixels to create the textbox (defaults to false / single-line) + * @return {Ext.MessageBox} this + */ + prompt : function(title, msg, fn, scope, multiline){ + this.show({ + title : title, + msg : msg, + buttons: this.OKCANCEL, + fn: fn, + minWidth:250, + scope : scope, + prompt:true, + multiline: multiline + }); + return this; + }, + + /** + * Button config that displays a single OK button + * @type Object + */ + OK : {ok:true}, + /** + * Button config that displays a single Cancel button + * @type Object + */ + CANCEL : {cancel:true}, + /** + * Button config that displays OK and Cancel buttons + * @type Object + */ + OKCANCEL : {ok:true, cancel:true}, + /** + * Button config that displays Yes and No buttons + * @type Object + */ + YESNO : {yes:true, no:true}, + /** + * Button config that displays Yes, No and Cancel buttons + * @type Object + */ + YESNOCANCEL : {yes:true, no:true, cancel:true}, + /** + * The CSS class that provides the INFO icon image + * @type String + */ + INFO : 'ext-mb-info', + /** + * The CSS class that provides the WARNING icon image + * @type String + */ + WARNING : 'ext-mb-warning', + /** + * The CSS class that provides the QUESTION icon image + * @type String + */ + QUESTION : 'ext-mb-question', + /** + * The CSS class that provides the ERROR icon image + * @type String + */ + ERROR : 'ext-mb-error', + + /** + * The default height in pixels of the message box's multiline textarea if displayed (defaults to 75) + * @type Number + */ + defaultTextHeight : 75, + /** + * The maximum width in pixels of the message box (defaults to 600) + * @type Number + */ + maxWidth : 600, + /** + * The minimum width in pixels of the message box (defaults to 100) + * @type Number + */ + minWidth : 100, + /** + * The minimum width in pixels of the message box if it is a progress-style dialog. This is useful + * for setting a different minimum width than text-only dialogs may need (defaults to 250) + * @type Number + */ + minProgressWidth : 250, + /** + * An object containing the default button text strings that can be overriden for localized language support. + * Supported properties are: ok, cancel, yes and no. Generally you should include a locale-specific + * resource file for handling language support across the framework. + * Customize the default text like so: Ext.MessageBox.buttonText.yes = "oui"; //french + * @type Object + */ + buttonText : { + ok : "OK", + cancel : "Cancel", + yes : "Yes", + no : "No" + } + }; +}(); + +/** + * Shorthand for {@link Ext.MessageBox} + */ +Ext.Msg = Ext.MessageBox; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/PagingToolbar.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/PagingToolbar.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/PagingToolbar.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,296 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.PagingToolbar + * @extends Ext.Toolbar + * A specialized toolbar that is bound to a {@link Ext.data.Store} and provides automatic paging controls. + * @constructor + * Create a new PagingToolbar + * @param {Object} config The config object + */ +Ext.PagingToolbar = Ext.extend(Ext.Toolbar, { + /** + * @cfg {Ext.data.Store} store The {@link Ext.data.Store} the paging toolbar should use as its data source (required). + */ + /** + * @cfg {Boolean} displayInfo + * True to display the displayMsg (defaults to false) + */ + /** + * @cfg {Number} pageSize + * The number of records to display per page (defaults to 20) + */ + pageSize: 20, + /** + * @cfg {String} displayMsg + * The paging status message to display (defaults to "Displaying {0} - {1} of {2}"). Note that this string is + * formatted using the braced numbers 0-2 as tokens that are replaced by the values for start, end and total + * respectively. These tokens should be preserved when overriding this string if showing those values is desired. + */ + displayMsg : 'Displaying {0} - {1} of {2}', + /** + * @cfg {String} emptyMsg + * The message to display when no records are found (defaults to "No data to display") + */ + emptyMsg : 'No data to display', + /** + * Customizable piece of the default paging text (defaults to "Page") + * @type String + */ + beforePageText : "Page", + /** + * Customizable piece of the default paging text (defaults to "of %0") + * @type String + */ + afterPageText : "of {0}", + /** + * Customizable piece of the default paging text (defaults to "First Page") + * @type String + */ + firstText : "First Page", + /** + * Customizable piece of the default paging text (defaults to "Previous Page") + * @type String + */ + prevText : "Previous Page", + /** + * Customizable piece of the default paging text (defaults to "Next Page") + * @type String + */ + nextText : "Next Page", + /** + * Customizable piece of the default paging text (defaults to "Last Page") + * @type String + */ + lastText : "Last Page", + /** + * Customizable piece of the default paging text (defaults to "Refresh") + * @type String + */ + refreshText : "Refresh", + + /** + * Object mapping of parameter names for load calls (defaults to {start: 'start', limit: 'limit'}) + */ + paramNames : {start: 'start', limit: 'limit'}, + + initComponent : function(){ + Ext.PagingToolbar.superclass.initComponent.call(this); + this.cursor = 0; + this.bind(this.store); + }, + + // private + onRender : function(ct, position){ + Ext.PagingToolbar.superclass.onRender.call(this, ct, position); + this.first = this.addButton({ + tooltip: this.firstText, + iconCls: "x-tbar-page-first", + disabled: true, + handler: this.onClick.createDelegate(this, ["first"]) + }); + this.prev = this.addButton({ + tooltip: this.prevText, + iconCls: "x-tbar-page-prev", + disabled: true, + handler: this.onClick.createDelegate(this, ["prev"]) + }); + this.addSeparator(); + this.add(this.beforePageText); + this.field = Ext.get(this.addDom({ + tag: "input", + type: "text", + size: "3", + value: "1", + cls: "x-tbar-page-number" + }).el); + this.field.on("keydown", this.onPagingKeydown, this); + this.field.on("focus", function(){this.dom.select();}); + this.afterTextEl = this.addText(String.format(this.afterPageText, 1)); + this.field.setHeight(18); + this.addSeparator(); + this.next = this.addButton({ + tooltip: this.nextText, + iconCls: "x-tbar-page-next", + disabled: true, + handler: this.onClick.createDelegate(this, ["next"]) + }); + this.last = this.addButton({ + tooltip: this.lastText, + iconCls: "x-tbar-page-last", + disabled: true, + handler: this.onClick.createDelegate(this, ["last"]) + }); + this.addSeparator(); + this.loading = this.addButton({ + tooltip: this.refreshText, + iconCls: "x-tbar-loading", + handler: this.onClick.createDelegate(this, ["refresh"]) + }); + + if(this.displayInfo){ + this.displayEl = Ext.fly(this.el.dom).createChild({cls:'x-paging-info'}); + } + if(this.dsLoaded){ + this.onLoad.apply(this, this.dsLoaded); + } + }, + + // private + updateInfo : function(){ + if(this.displayEl){ + var count = this.store.getCount(); + var msg = count == 0 ? + this.emptyMsg : + String.format( + this.displayMsg, + this.cursor+1, this.cursor+count, this.store.getTotalCount() + ); + this.displayEl.update(msg); + } + }, + + // private + onLoad : function(store, r, o){ + if(!this.rendered){ + this.dsLoaded = [store, r, o]; + return; + } + this.cursor = o.params ? o.params[this.paramNames.start] : 0; + var d = this.getPageData(), ap = d.activePage, ps = d.pages; + + this.afterTextEl.el.innerHTML = String.format(this.afterPageText, d.pages); + this.field.dom.value = ap; + this.first.setDisabled(ap == 1); + this.prev.setDisabled(ap == 1); + this.next.setDisabled(ap == ps); + this.last.setDisabled(ap == ps); + this.loading.enable(); + this.updateInfo(); + }, + + // private + getPageData : function(){ + var total = this.store.getTotalCount(); + return { + total : total, + activePage : Math.ceil((this.cursor+this.pageSize)/this.pageSize), + pages : total < this.pageSize ? 1 : Math.ceil(total/this.pageSize) + }; + }, + + // private + onLoadError : function(){ + if(!this.rendered){ + return; + } + this.loading.enable(); + }, + + readPage : function(d){ + var v = this.field.dom.value, pageNum; + if (!v || isNaN(pageNum = parseInt(v, 10))) { + this.field.dom.value = d.activePage; + return false; + } + return pageNum; + }, + + // private + onPagingKeydown : function(e){ + var k = e.getKey(), d = this.getPageData(), pageNum; + if (k == e.RETURN) { + e.stopEvent(); + if(pageNum = this.readPage(d)){ + pageNum = Math.min(Math.max(1, pageNum), d.pages) - 1; + this.doLoad(pageNum * this.pageSize); + } + }else if (k == e.HOME || k == e.END){ + e.stopEvent(); + pageNum = k == e.HOME ? 1 : d.pages; + this.field.dom.value = pageNum; + }else if (k == e.UP || k == e.PAGEUP || k == e.DOWN || k == e.PAGEDOWN){ + e.stopEvent(); + if(pageNum = this.readPage(d)){ + var increment = e.shiftKey ? 10 : 1; + if(k == e.DOWN || k == e.PAGEDOWN){ + increment *= -1; + } + pageNum += increment; + if(pageNum >= 1 & pageNum <= d.pages){ + this.field.dom.value = pageNum; + } + } + } + }, + + // private + beforeLoad : function(){ + if(this.rendered && this.loading){ + this.loading.disable(); + } + }, + + doLoad : function(start){ + var o = {}, pn = this.paramNames; + o[pn.start] = start; + o[pn.limit] = this.pageSize; + this.store.load({params:o}); + }, + + // private + onClick : function(which){ + var store = this.store; + switch(which){ + case "first": + this.doLoad(0); + break; + case "prev": + this.doLoad(Math.max(0, this.cursor-this.pageSize)); + break; + case "next": + this.doLoad(this.cursor+this.pageSize); + break; + case "last": + var total = store.getTotalCount(); + var extra = total % this.pageSize; + var lastStart = extra ? (total - extra) : total-this.pageSize; + this.doLoad(lastStart); + break; + case "refresh": + this.doLoad(this.cursor); + break; + } + }, + + /** + * Unbinds the paging toolbar from the specified {@link Ext.data.Store} + * @param {Ext.data.Store} store The data store to unbind + */ + unbind : function(store){ + store = Ext.StoreMgr.lookup(store); + store.un("beforeload", this.beforeLoad, this); + store.un("load", this.onLoad, this); + store.un("loadexception", this.onLoadError, this); + this.store = undefined; + }, + + /** + * Binds the paging toolbar to the specified {@link Ext.data.Store} + * @param {Ext.data.Store} store The data store to bind + */ + bind : function(store){ + store = Ext.StoreMgr.lookup(store); + store.on("beforeload", this.beforeLoad, this); + store.on("load", this.onLoad, this); + store.on("loadexception", this.onLoadError, this); + this.store = store; + } +}); +Ext.reg('paging', Ext.PagingToolbar); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Panel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Panel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Panel.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,1232 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Panel + * @extends Ext.Container + * Panel is a container that has specific functionality and structural components that make it the perfect building + * block for application-oriented user interfaces. The Panel contains bottom and top toolbars, along with separate + * header, footer and body sections. It also provides built-in expandable and collapsible behavior, along with a + * variety of prebuilt tool buttons that can be wired up to provide other customized behavior. Panels can be easily + * dropped into any Container or layout, and the layout and rendering pipeline is completely managed by the framework. + * @constructor + * @param {Object} config The config object + */ +Ext.Panel = Ext.extend(Ext.Container, { + /** + * The Panel's header {@link Ext.Element Element}. Read-only. + *

        This Element is used to house the {@link #title} and {@link #tools}

        + * @type Ext.Element + * @property header + */ + /** + * The Panel's body {@link Ext.Element Element} which may be used to contain HTML content. + * The content may be specified in the {@link #html} config, or it may be loaded using the + * {@link autoLoad} config, or through the Panel's {@link #getUpdater Updater}. Read-only. + *

        If this is used to load visible HTML elements in either way, then + * the Panel may not be used as a Layout for hosting nested Panels.

        + *

        If this Panel is intended to be used as the host of a Layout (See {@link #layout} + * then the body Element must not be loaded or changed - it is under the control + * of the Panel's Layout. + * @type Ext.Element + * @property body + */ + /** + * The Panel's footer {@link Ext.Element Element}. Read-only. + *

        This Element is used to house the Panel's {@link #buttons}.

        + * @type Ext.Element + * @property footer + */ + /** + * @cfg {Mixed} applyTo + * The id of the node, a DOM node or an existing Element corresponding to a DIV that is already present in + * the document that specifies some panel-specific structural markup. When applyTo is used, constituent parts of + * the panel can be specified by CSS class name within the main element, and the panel will automatically create those + * components from that markup. Any required components not specified in the markup will be autogenerated if necessary. + * The following class names are supported (baseCls will be replaced by {@link #baseCls}): + *
        • baseCls + '-header'
        • + *
        • baseCls + '-header-text'
        • + *
        • baseCls + '-bwrap'
        • + *
        • baseCls + '-tbar'
        • + *
        • baseCls + '-body'
        • + *
        • baseCls + '-bbar'
        • + *
        • baseCls + '-footer'
        + * Using this config, a call to render() is not required. If applyTo is specified, any value passed for + * {@link #renderTo} will be ignored and the target element's parent node will automatically be used as the panel's container. + */ + /** + * @cfg {Object/Array} tbar + * The top toolbar of the panel. This can be either an {@link Ext.Toolbar} object or an array of + * buttons/button configs to be added to the toolbar. Note that this is not available as a property after render. + * To access the top toolbar after render, use {@link #getTopToolbar}. + */ + /** + * @cfg {Object/Array} bbar + * The bottom toolbar of the panel. This can be a {@link Ext.Toolbar} object, a toolbar config, or an array of + * buttons/button configs to be added to the toolbar. Note that this is not available as a property after render. + * To access the bottom toolbar after render, use {@link #getBottomToolbar}. + */ + /** + * @cfg {Boolean} header + * True to create the header element explicitly, false to skip creating it. By default, when header is not + * specified, if a {@link #title} is set the header will be created automatically, otherwise it will not. If + * a title is set but header is explicitly set to false, the header will not be rendered. + */ + /** + * @cfg {Boolean} footer + * True to create the footer element explicitly, false to skip creating it. By default, when footer is not + * specified, if one or more buttons have been added to the panel the footer will be created automatically, + * otherwise it will not. + */ + /** + * @cfg {String} title + * The title text to display in the panel header (defaults to ''). When a title is specified the header + * element will automatically be created and displayed unless {@link #header} is explicitly set to false. If + * you don't want to specify a title at config time, but you may want one later, you must either specify a + * non-empty title (a blank space ' ' will do) or header:true so that the container element will get created. + */ + /** + * @cfg {Array} buttons + * An array of {@link Ext.Button} configs used to add buttons to the footer of this panel. + */ + /** + * @cfg {Object/String/Function} autoLoad + * A valid url spec according to the Updater {@link Ext.Updater#update} method. + * If autoLoad is not null, the panel will attempt to load its contents + * immediately upon render.

        + * The URL will become the default URL for this panel's {@link #body} element, + * so it may be {@link Ext.Element#refresh refresh}ed at any time.

        + */ + /** + * @cfg {Boolean} frame + * True to render the panel with custom rounded borders, false to render with plain 1px square borders (defaults to false). + */ + /** + * @cfg {Boolean} border + * True to display the borders of the panel's body element, false to hide them (defaults to true). By default, + * the border is a 2px wide inset border, but this can be further altered by setting {@link #bodyBorder} to false. + */ + /** + * @cfg {Boolean} bodyBorder + * True to display an interior border on the body element of the panel, false to hide it (defaults to true). + * This only applies when {@link #border} == true. If border == true and bodyBorder == false, the border will display + * as a 1px wide inset border, giving the entire body element an inset appearance. + */ + /** + * @cfg {String/Object/Function} bodyStyle + * Custom CSS styles to be applied to the body element in the format expected by {@link Ext.Element#applyStyles} + * (defaults to null). + */ + /** + * @cfg {String} iconCls + * A CSS class that will provide a background image to be used as the panel header icon (defaults to ''). + */ + /** + * @cfg {Boolean} collapsible + * True to make the panel collapsible and have the expand/collapse toggle button automatically rendered into + * the header tool button area, false to keep the panel statically sized with no button (defaults to false). + */ + /** + * @cfg {Array} tools + * An array of tool button configs to be added to the header tool area. + * Each tool config may contain the following properties: + *
          + *
        • id : String

          Required. The type + * of tool to create. Values may be

            + *
          • toggle (Created by default when {@link #collapsible} is true)
          • + *
          • close
          • + *
          • minimize
          • + *
          • maximize
          • + *
          • restore
          • + *
          • gear
          • + *
          • pin
          • + *
          • unpin
          • + *
          • right
          • + *
          • left
          • + *
          • up
          • + *
          • down
          • + *
          • refresh
          • + *
          • minus
          • + *
          • plus
          • + *
          • help
          • + *
          • search
          • + *
          • save
          • + *

        + *
      • handler : Function

        Required. The function to + * call when clicked. Arguments passed are:

          + *
        • event : Ext.EventObject

          The click event.

        • + *
        • toolEl : Ext.Element

          The tool Element.

        • + *
        • Panel : Ext.Panel

          The host Panel

        • + *

      • + *
      • scope : Object

        The scope in which to call the handler.

      • + *
      • qtip : String/Object

        A tip string, or + * a config argument to {@link Ext.QuickTip#register}

      • + *
      • hidden : Boolean

        True to initially render hidden.

      • + *
      • on : Object

        A listener config object specifiying + * event listeners in the format of an argument to {@link #addListener}

      • + * + * Example usage: + *
        
        +tools:[{
        +    id:'refresh',
        +    // hidden:true,
        +    handler: function(event, toolEl, panel){
        +        // refresh logic
        +    }
        +}]
        +
        + * Note that apart from the toggle tool which is provided when a panel is + * collapsible, these tools only provide the visual button. Any required + * functionality must be provided by adding handlers that implement the + * necessary behavior. + */ + /** + * @cfg {Boolean} hideCollapseTool + * True to hide the expand/collapse toggle button when {@link #collapsible} = true, false to display it (defaults to false). + */ + /** + * @cfg {Boolean} titleCollapse + * True to allow expanding and collapsing the panel (when {@link #collapsible} = true) by clicking anywhere in the + * header bar, false to allow it only by clicking to tool button (defaults to false). + */ + /** + * @cfg {Boolean} autoScroll + * True to use overflow:'auto' on the panel's body element and show scroll bars automatically when necessary, + * false to clip any overflowing content (defaults to false). + */ + /** + * @cfg {Boolean} floating + * True to float the panel (absolute position it with automatic shimming and shadow), false to display it + * inline where it is rendered (defaults to false). Note that by default, setting floating to true will cause the + * panel to display at negative offsets so that it is hidden -- because the panel is absolute positioned, the + * position must be set explicitly after render (e.g., myPanel.setPosition(100,100);). Also, when floating a + * panel you should always assign a fixed width, otherwise it will be auto width and will expand to fill to the + * right edge of the viewport. + */ + /** + * @cfg {Boolean/String} shadow + * True (or a valid Ext.Shadow {@link Ext.Shadow#mode} value) to display a shadow behind the panel, false to + * display no shadow (defaults to 'sides'). Note that this option only applies when floating = true. + */ + /** + * @cfg {Number} shadowOffset + * The number of pixels to offset the shadow if displayed (defaults to 4). Note that this option only applies + * when floating = true. + */ + /** + * @cfg {Boolean} shim + * False to disable the iframe shim in browsers which need one (defaults to true). Note that this option + * only applies when floating = true. + */ + /** + * @cfg {String/Object} html + * An HTML fragment, or a {@link Ext.DomHelper DomHelper} specification to use + * as the panel's body content (defaults to ''). + */ + /** + * @cfg {String} contentEl + * The id of an existing HTML node to use as the panel's body content (defaults to ''). + */ + /** + * @cfg {Object/Array} keys + * A KeyMap config object (in the format expected by {@link Ext.KeyMap#addBinding} used to assign custom key + * handling to this panel (defaults to null). + */ + /** + * @cfg {Boolean} draggable + * True to enable dragging of this Panel (defaults to false). For custom drag/drop implementations, an Ext.Panel.DD + * config could also be passed in this config instead of true, although Ext.Panel.DD is an internal, undocumented class. + */ + + /** + * @cfg {String} baseCls + * The base CSS class to apply to this panel's element (defaults to 'x-panel'). + */ + baseCls : 'x-panel', + /** + * @cfg {String} collapsedCls + * A CSS class to add to the panel's element after it has been collapsed (defaults to 'x-panel-collapsed'). + */ + collapsedCls : 'x-panel-collapsed', + /** + * @cfg {Boolean} maskDisabled + * True to mask the panel when it is disabled, false to not mask it (defaults to true). Either way, the panel + * will always tell its contained elements to disable themselves when it is disabled, but masking the panel + * can provide an additional visual cue that the panel is disabled. + */ + maskDisabled: true, + /** + * @cfg {Boolean} animCollapse + * True to animate the transition when the panel is collapsed, false to skip the animation (defaults to true + * if the {@link Ext.Fx} class is available, otherwise false). + */ + animCollapse: Ext.enableFx, + /** + * @cfg {Boolean} headerAsText + * True to display the panel title in the header, false to hide it (defaults to true). + */ + headerAsText: true, + /** + * @cfg {String} buttonAlign + * The alignment of any buttons added to this panel. Valid values are 'right,' 'left' and 'center' (defaults to 'right'). + */ + buttonAlign: 'right', + /** + * @cfg {Boolean} collapsed + * True to render the panel collapsed, false to render it expanded (defaults to false). + */ + collapsed : false, + /** + * @cfg {Boolean} collapseFirst + * True to make sure the collapse/expand toggle button always renders first (to the left of) any other tools + * in the panel's title bar, false to render it last (defaults to true). + */ + collapseFirst: true, + /** + * @cfg {Number} minButtonWidth + * Minimum width in pixels of all buttons in this panel (defaults to 75) + */ + minButtonWidth:75, + /** + * @cfg {String} elements + * A comma-delimited list of panel elements to initialize when the panel is rendered. Normally, this list will be + * generated automatically based on the items added to the panel at config time, but sometimes it might be useful to + * make sure a structural element is rendered even if not specified at config time (for example, you may want + * to add a button or toolbar dynamically after the panel has been rendered). Adding those elements to this + * list will allocate the required placeholders in the panel when it is rendered. Valid values are
          + *
        • header
        • + *
        • tbar (top bar)
        • + *
        • body
        • + *
        • bbar (bottom bar)
        • + *
        • footer
        • + *
        + * Defaults to 'body'. + */ + elements : 'body', + + // protected - these could be used to customize the behavior of the window, + // but changing them would not be useful without further mofifications and + // could lead to unexpected or undesirable results. + toolTarget : 'header', + collapseEl : 'bwrap', + slideAnchor : 't', + + // private, notify box this class will handle heights + deferHeight: true, + // private + expandDefaults: { + duration:.25 + }, + // private + collapseDefaults: { + duration:.25 + }, + + // private + initComponent : function(){ + Ext.Panel.superclass.initComponent.call(this); + + this.addEvents( + /** + * @event bodyresize + * Fires after the Panel has been resized. + * @param {Ext.Panel} p the Panel which has been resized. + * @param {Number} width The Panel's new width. + * @param {Number} height The Panel's new height. + */ + 'bodyresize', + /** + * @event titlechange + * Fires after the Panel title has been set or changed. + * @param {Ext.Panel} p the Panel which has had its title changed. + * @param {String} The new title. + */ + 'titlechange', + /** + * @event collapse + * Fires after the Panel has been collapsed. + * @param {Ext.Panel} p the Panel that has been collapsed. + */ + 'collapse', + /** + * @event expand + * Fires after the Panel has been expanded. + * @param {Ext.Panel} p The Panel that has been expanded. + */ + 'expand', + /** + * @event beforecollapse + * Fires before the Panel is collapsed. A handler can return false to cancel the collapse. + * @param {Ext.Panel} p the Panel being collapsed. + * @param {Boolean} animate True if the collapse is animated, else false. + */ + 'beforecollapse', + /** + * @event beforeexpand + * Fires before the Panel is expanded. A handler can return false to cancel the expand. + * @param {Ext.Panel} p The Panel being expanded. + * @param {Boolean} animate True if the expand is animated, else false. + */ + 'beforeexpand', + /** + * @event beforeclose + * Fires before the Panel is closed. Note that Panels do not directly support being closed, but some + * Panel subclasses do (like {@link Ext.Window}). This event only applies to such subclasses. + * A handler can return false to cancel the close. + * @param {Ext.Panel} p The Panel being closed. + */ + 'beforeclose', + /** + * @event close + * Fires after the Panel is closed. Note that Panels do not directly support being closed, but some + * Panel subclasses do (like {@link Ext.Window}). + * @param {Ext.Panel} p The Panel that has been closed. + */ + 'close', + /** + * @event activate + * Fires after the Panel has been visually activated. + * Note that Panels do not directly support being activated, but some Panel subclasses + * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the + * activate and deactivate events under the control of the TabPanel. + * @param {Ext.Panel} p The Panel that has been activated. + */ + 'activate', + /** + * @event deactivate + * Fires after the Panel has been visually deactivated. + * Note that Panels do not directly support being deactivated, but some Panel subclasses + * do (like {@link Ext.Window}). Panels which are child Components of a TabPanel fire the + * activate and deactivate events under the control of the TabPanel. + * @param {Ext.Panel} p The Panel that has been deactivated. + */ + 'deactivate' + ); + + // shortcuts + if(this.tbar){ + this.elements += ',tbar'; + if(typeof this.tbar == 'object'){ + this.topToolbar = this.tbar; + } + delete this.tbar; + } + if(this.bbar){ + this.elements += ',bbar'; + if(typeof this.bbar == 'object'){ + this.bottomToolbar = this.bbar; + } + delete this.bbar; + } + + if(this.header === true){ + this.elements += ',header'; + delete this.header; + }else if(this.title && this.header !== false){ + this.elements += ',header'; + } + + if(this.footer === true){ + this.elements += ',footer'; + delete this.footer; + } + + if(this.buttons){ + var btns = this.buttons; + /** + * This Panel's Array of buttons as created from the buttons + * config property. Read only. + * @type Array + * @property buttons + */ + this.buttons = []; + for(var i = 0, len = btns.length; i < len; i++) { + if(btns[i].render){ // button instance + this.buttons.push(btns[i]); + }else{ + this.addButton(btns[i]); + } + } + } + if(this.autoLoad){ + this.on('render', this.doAutoLoad, this, {delay:10}); + } + }, + + // private + createElement : function(name, pnode){ + if(this[name]){ + pnode.appendChild(this[name].dom); + return; + } + + if(name === 'bwrap' || this.elements.indexOf(name) != -1){ + if(this[name+'Cfg']){ + this[name] = Ext.fly(pnode).createChild(this[name+'Cfg']); + }else{ + var el = document.createElement('div'); + el.className = this[name+'Cls']; + this[name] = Ext.get(pnode.appendChild(el)); + } + } + }, + + // private + onRender : function(ct, position){ + Ext.Panel.superclass.onRender.call(this, ct, position); + + this.createClasses(); + + if(this.el){ // existing markup + this.el.addClass(this.baseCls); + this.header = this.el.down('.'+this.headerCls); + this.bwrap = this.el.down('.'+this.bwrapCls); + var cp = this.bwrap ? this.bwrap : this.el; + this.tbar = cp.down('.'+this.tbarCls); + this.body = cp.down('.'+this.bodyCls); + this.bbar = cp.down('.'+this.bbarCls); + this.footer = cp.down('.'+this.footerCls); + this.fromMarkup = true; + }else{ + this.el = ct.createChild({ + id: this.id, + cls: this.baseCls + }, position); + } + var el = this.el, d = el.dom; + + if(this.cls){ + this.el.addClass(this.cls); + } + + if(this.buttons){ + this.elements += ',footer'; + } + + // This block allows for maximum flexibility and performance when using existing markup + + // framing requires special markup + if(this.frame){ + el.insertHtml('afterBegin', String.format(Ext.Element.boxMarkup, this.baseCls)); + + this.createElement('header', d.firstChild.firstChild.firstChild); + this.createElement('bwrap', d); + + // append the mid and bottom frame to the bwrap + var bw = this.bwrap.dom; + var ml = d.childNodes[1], bl = d.childNodes[2]; + bw.appendChild(ml); + bw.appendChild(bl); + + var mc = bw.firstChild.firstChild.firstChild; + this.createElement('tbar', mc); + this.createElement('body', mc); + this.createElement('bbar', mc); + this.createElement('footer', bw.lastChild.firstChild.firstChild); + + if(!this.footer){ + this.bwrap.dom.lastChild.className += ' x-panel-nofooter'; + } + }else{ + this.createElement('header', d); + this.createElement('bwrap', d); + + // append the mid and bottom frame to the bwrap + var bw = this.bwrap.dom; + this.createElement('tbar', bw); + this.createElement('body', bw); + this.createElement('bbar', bw); + this.createElement('footer', bw); + + if(!this.header){ + this.body.addClass(this.bodyCls + '-noheader'); + if(this.tbar){ + this.tbar.addClass(this.tbarCls + '-noheader'); + } + } + } + + if(this.border === false){ + this.el.addClass(this.baseCls + '-noborder'); + this.body.addClass(this.bodyCls + '-noborder'); + if(this.header){ + this.header.addClass(this.headerCls + '-noborder'); + } + if(this.footer){ + this.footer.addClass(this.footerCls + '-noborder'); + } + if(this.tbar){ + this.tbar.addClass(this.tbarCls + '-noborder'); + } + if(this.bbar){ + this.bbar.addClass(this.bbarCls + '-noborder'); + } + } + + if(this.bodyBorder === false){ + this.body.addClass(this.bodyCls + '-noborder'); + } + + if(this.bodyStyle){ + this.body.applyStyles(this.bodyStyle); + } + + this.bwrap.enableDisplayMode('block'); + + if(this.header){ + this.header.unselectable(); + + // for tools, we need to wrap any existing header markup + if(this.headerAsText){ + this.header.dom.innerHTML = + ''+this.header.dom.innerHTML+''; + + if(this.iconCls){ + this.setIconClass(this.iconCls); + } + } + } + + if(this.floating){ + this.makeFloating(this.floating); + } + + if(this.collapsible){ + this.tools = this.tools ? this.tools.slice(0) : []; + if(!this.hideCollapseTool){ + this.tools[this.collapseFirst?'unshift':'push']({ + id: 'toggle', + handler : this.toggleCollapse, + scope: this + }); + } + if(this.titleCollapse && this.header){ + this.header.on('click', this.toggleCollapse, this); + this.header.setStyle('cursor', 'pointer'); + } + } + if(this.tools){ + var ts = this.tools; + this.tools = {}; + this.addTool.apply(this, ts); + }else{ + this.tools = {}; + } + + if(this.buttons && this.buttons.length > 0){ + // tables are required to maintain order and for correct IE layout + var tb = this.footer.createChild({cls:'x-panel-btns-ct', cn: { + cls:"x-panel-btns x-panel-btns-"+this.buttonAlign, + html:'
        ' + }}, null, true); + var tr = tb.getElementsByTagName('tr')[0]; + for(var i = 0, len = this.buttons.length; i < len; i++) { + var b = this.buttons[i]; + var td = document.createElement('td'); + td.className = 'x-panel-btn-td'; + b.render(tr.appendChild(td)); + } + } + + if(this.tbar && this.topToolbar){ + if(this.topToolbar instanceof Array){ + this.topToolbar = new Ext.Toolbar(this.topToolbar); + } + this.topToolbar.render(this.tbar); + } + if(this.bbar && this.bottomToolbar){ + if(this.bottomToolbar instanceof Array){ + this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar); + } + this.bottomToolbar.render(this.bbar); + } + }, + + /** + * Sets the CSS class that provides the icon image for this panel. This method will replace any existing + * icon class if one has already been set. + * @param {String} cls The new CSS class name + */ + setIconClass : function(cls){ + var old = this.iconCls; + this.iconCls = cls; + if(this.rendered){ + if(this.frame){ + this.header.addClass('x-panel-icon'); + this.header.replaceClass(old, this.iconCls); + }else{ + var hd = this.header.dom; + var img = hd.firstChild && String(hd.firstChild.tagName).toLowerCase() == 'img' ? hd.firstChild : null; + if(img){ + Ext.fly(img).replaceClass(old, this.iconCls); + }else{ + Ext.DomHelper.insertBefore(hd.firstChild, { + tag:'img', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls + }); + } + } + } + }, + + // private + makeFloating : function(cfg){ + this.floating = true; + this.el = new Ext.Layer( + typeof cfg == 'object' ? cfg : { + shadow: this.shadow !== undefined ? this.shadow : 'sides', + shadowOffset: this.shadowOffset, + constrain:false, + shim: this.shim === false ? false : undefined + }, this.el + ); + }, + + /** + * Returns the toolbar from the top (tbar) section of the panel. + * @return {Ext.Toolbar} The toolbar + */ + getTopToolbar : function(){ + return this.topToolbar; + }, + + /** + * Returns the toolbar from the bottom (bbar) section of the panel. + * @return {Ext.Toolbar} The toolbar + */ + getBottomToolbar : function(){ + return this.bottomToolbar; + }, + + /** + * Adds a button to this panel. Note that this method must be called prior to rendering. The preferred + * approach is to add buttons via the {@link #buttons} config. + * @param {String/Object} config A valid {@link Ext.Button} config. A string will become the text for a default + * button config, an object will be treated as a button config object. + * @param {Function} handler The function to be called on button {@link Ext.Button#click} + * @param {Object} scope The scope to use for the button handler function + * @return {Ext.Button} The button that was added + */ + addButton : function(config, handler, scope){ + var bc = { + handler: handler, + scope: scope, + minWidth: this.minButtonWidth, + hideParent:true + }; + if(typeof config == "string"){ + bc.text = config; + }else{ + Ext.apply(bc, config); + } + var btn = new Ext.Button(bc); + if(!this.buttons){ + this.buttons = []; + } + this.buttons.push(btn); + return btn; + }, + + // private + addTool : function(){ + if(!this[this.toolTarget]) { // no where to render tools! + return; + } + if(!this.toolTemplate){ + // initialize the global tool template on first use + var tt = new Ext.Template( + '
         
        ' + ); + tt.disableFormats = true; + tt.compile(); + Ext.Panel.prototype.toolTemplate = tt; + } + for(var i = 0, a = arguments, len = a.length; i < len; i++) { + var tc = a[i], overCls = 'x-tool-'+tc.id+'-over'; + var t = this.toolTemplate.insertFirst(this[this.toolTarget], tc, true); + this.tools[tc.id] = t; + t.enableDisplayMode('block'); + t.on('click', this.createToolHandler(t, tc, overCls, this)); + if(tc.on){ + t.on(tc.on); + } + if(tc.hidden){ + t.hide(); + } + if(tc.qtip){ + if(typeof tc.qtip == 'object'){ + Ext.QuickTips.register(Ext.apply({ + target: t.id + }, tc.qtip)); + } else { + t.dom.qtip = tc.qtip; + } + } + t.addClassOnOver(overCls); + } + }, + + // private + onShow : function(){ + if(this.floating){ + return this.el.show(); + } + Ext.Panel.superclass.onShow.call(this); + }, + + // private + onHide : function(){ + if(this.floating){ + return this.el.hide(); + } + Ext.Panel.superclass.onHide.call(this); + }, + + // private + createToolHandler : function(t, tc, overCls, panel){ + return function(e){ + t.removeClass(overCls); + e.stopEvent(); + if(tc.handler){ + tc.handler.call(tc.scope || t, e, t, panel); + } + }; + }, + + // private + afterRender : function(){ + if(this.fromMarkup && this.height === undefined && !this.autoHeight){ + this.height = this.el.getHeight(); + } + if(this.floating && !this.hidden && !this.initHidden){ + this.el.show(); + } + if(this.title){ + this.setTitle(this.title); + } + if(this.autoScroll){ + this.body.dom.style.overflow = 'auto'; + } + if(this.html){ + this.body.update(typeof this.html == 'object' ? + Ext.DomHelper.markup(this.html) : + this.html); + delete this.html; + } + if(this.contentEl){ + var ce = Ext.getDom(this.contentEl); + Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']); + this.body.dom.appendChild(ce); + } + if(this.collapsed){ + this.collapsed = false; + this.collapse(false); + } + Ext.Panel.superclass.afterRender.call(this); // do sizing calcs last + this.initEvents(); + }, + + // private + getKeyMap : function(){ + if(!this.keyMap){ + this.keyMap = new Ext.KeyMap(this.el, this.keys); + } + return this.keyMap; + }, + + // private + initEvents : function(){ + if(this.keys){ + this.getKeyMap(); + } + if(this.draggable){ + this.initDraggable(); + } + }, + + // private + initDraggable : function(){ + this.dd = new Ext.Panel.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); + }, + + // private + beforeEffect : function(){ + if(this.floating){ + this.el.beforeAction(); + } + this.el.addClass('x-panel-animated'); + }, + + // private + afterEffect : function(){ + this.syncShadow(); + this.el.removeClass('x-panel-animated'); + }, + + // private - wraps up an animation param with internal callbacks + createEffect : function(a, cb, scope){ + var o = { + scope:scope, + block:true + }; + if(a === true){ + o.callback = cb; + return o; + }else if(!a.callback){ + o.callback = cb; + }else { // wrap it up + o.callback = function(){ + cb.call(scope); + Ext.callback(a.callback, a.scope); + }; + } + return Ext.applyIf(o, a); + }, + + /** + * Collapses the panel body so that it becomes hidden. Fires the {@link #beforecollapse} event which will + * cancel the collapse action if it returns false. + * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the + * {@link #animCollapse} panel config) + * @return {Ext.Panel} this + */ + collapse : function(animate){ + if(this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforecollapse', this, animate) === false){ + return; + } + var doAnim = animate === true || (animate !== false && this.animCollapse); + this.beforeEffect(); + this.onCollapse(doAnim, animate); + return this; + }, + + // private + onCollapse : function(doAnim, animArg){ + if(doAnim){ + this[this.collapseEl].slideOut(this.slideAnchor, + Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this), + this.collapseDefaults)); + }else{ + this[this.collapseEl].hide(); + this.afterCollapse(); + } + }, + + // private + afterCollapse : function(){ + this.collapsed = true; + this.el.addClass(this.collapsedCls); + this.afterEffect(); + this.fireEvent('collapse', this); + }, + + /** + * Expands the panel body so that it becomes visible. Fires the {@link #beforeexpand} event which will + * cancel the expand action if it returns false. + * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the + * {@link #animCollapse} panel config) + * @return {Ext.Panel} this + */ + expand : function(animate){ + if(!this.collapsed || this.el.hasFxBlock() || this.fireEvent('beforeexpand', this, animate) === false){ + return; + } + var doAnim = animate === true || (animate !== false && this.animCollapse); + this.el.removeClass(this.collapsedCls); + this.beforeEffect(); + this.onExpand(doAnim, animate); + return this; + }, + + // private + onExpand : function(doAnim, animArg){ + if(doAnim){ + this[this.collapseEl].slideIn(this.slideAnchor, + Ext.apply(this.createEffect(animArg||true, this.afterExpand, this), + this.expandDefaults)); + }else{ + this[this.collapseEl].show(); + this.afterExpand(); + } + }, + + // private + afterExpand : function(){ + this.collapsed = false; + this.afterEffect(); + this.fireEvent('expand', this); + }, + + /** + * Shortcut for performing an {@link #expand} or {@link #collapse} based on the current state of the panel. + * @param {Boolean} animate True to animate the transition, else false (defaults to the value of the + * {@link #animCollapse} panel config) + * @return {Ext.Panel} this + */ + toggleCollapse : function(animate){ + this[this.collapsed ? 'expand' : 'collapse'](animate); + return this; + }, + + // private + onDisable : function(){ + if(this.rendered && this.maskDisabled){ + this.el.mask(); + } + Ext.Panel.superclass.onDisable.call(this); + }, + + // private + onEnable : function(){ + if(this.rendered && this.maskDisabled){ + this.el.unmask(); + } + Ext.Panel.superclass.onEnable.call(this); + }, + + // private + onResize : function(w, h){ + if(w !== undefined || h !== undefined){ + if(!this.collapsed){ + if(typeof w == 'number'){ + this.body.setWidth( + this.adjustBodyWidth(w - this.getFrameWidth())); + }else if(w == 'auto'){ + this.body.setWidth(w); + } + + if(typeof h == 'number'){ + this.body.setHeight( + this.adjustBodyHeight(h - this.getFrameHeight())); + }else if(h == 'auto'){ + this.body.setHeight(h); + } + }else{ + this.queuedBodySize = {width: w, height: h}; + if(!this.queuedExpand && this.allowQueuedExpand !== false){ + this.queuedExpand = true; + this.on('expand', function(){ + delete this.queuedExpand; + this.onResize(this.queuedBodySize.width, this.queuedBodySize.height); + this.doLayout(); + }, this, {single:true}); + } + } + this.fireEvent('bodyresize', this, w, h); + } + this.syncShadow(); + }, + + // private + adjustBodyHeight : function(h){ + return h; + }, + + // private + adjustBodyWidth : function(w){ + return w; + }, + + // private + onPosition : function(){ + this.syncShadow(); + }, + + // private + onDestroy : function(){ + if(this.tools){ + for(var k in this.tools){ + Ext.destroy(this.tools[k]); + } + } + if(this.buttons){ + for(var b in this.buttons){ + Ext.destroy(this.buttons[b]); + } + } + Ext.destroy( + this.topToolbar, + this.bottomToolbar + ); + Ext.Panel.superclass.onDestroy.call(this); + }, + + /** + * Returns the width in pixels of the framing elements of this panel (not including the body width). To + * retrieve the body width see {@link #getInnerWidth}. + * @return {Number} The frame width + */ + getFrameWidth : function(){ + var w = this.el.getFrameWidth('lr'); + + if(this.frame){ + var l = this.bwrap.dom.firstChild; + w += (Ext.fly(l).getFrameWidth('l') + Ext.fly(l.firstChild).getFrameWidth('r')); + var mc = this.bwrap.dom.firstChild.firstChild.firstChild; + w += Ext.fly(mc).getFrameWidth('lr'); + } + return w; + }, + + /** + * Returns the height in pixels of the framing elements of this panel (including any top and bottom bars and + * header and footer elements, but not including the body height). To retrieve the body height see {@link #getInnerHeight}. + * @return {Number} The frame height + */ + getFrameHeight : function(){ + var h = this.el.getFrameWidth('tb'); + h += (this.tbar ? this.tbar.getHeight() : 0) + + (this.bbar ? this.bbar.getHeight() : 0); + + if(this.frame){ + var hd = this.el.dom.firstChild; + var ft = this.bwrap.dom.lastChild; + h += (hd.offsetHeight + ft.offsetHeight); + var mc = this.bwrap.dom.firstChild.firstChild.firstChild; + h += Ext.fly(mc).getFrameWidth('tb'); + }else{ + h += (this.header ? this.header.getHeight() : 0) + + (this.footer ? this.footer.getHeight() : 0); + } + return h; + }, + + /** + * Returns the width in pixels of the body element (not including the width of any framing elements). + * For the frame width see {@link #getFrameWidth}. + * @return {Number} The body width + */ + getInnerWidth : function(){ + return this.getSize().width - this.getFrameWidth(); + }, + + /** + * Returns the height in pixels of the body element (not including the height of any framing elements). + * For the frame height see {@link #getFrameHeight}. + * @return {Number} The body height + */ + getInnerHeight : function(){ + return this.getSize().height - this.getFrameHeight(); + }, + + // private + syncShadow : function(){ + if(this.floating){ + this.el.sync(true); + } + }, + + // private + getLayoutTarget : function(){ + return this.body; + }, + + /** + * Sets the title text for the panel and optionally the icon class. + * @param {String} title The title text to set + * @param {String} (optional) iconCls A custon, user-defined CSS class that provides the icon image for this panel + */ + setTitle : function(title, iconCls){ + this.title = title; + if(this.header && this.headerAsText){ + this.header.child('span').update(title); + } + if(iconCls){ + this.setIconClass(iconCls); + } + this.fireEvent('titlechange', this, title); + return this; + }, + + /** + * Get the {@link Ext.Updater} for this panel. Enables you to perform Ajax updates of this panel's body. + * @return {Ext.Updater} The Updater + */ + getUpdater : function(){ + return this.body.getUpdater(); + }, + + /** + * Loads this content panel immediately with content returned from an XHR call. + * @param {Object/String/Function} config A config object containing any of the following options: +
        
        +panel.load({
        +    url: "your-url.php",
        +    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
        +    callback: yourFunction,
        +    scope: yourObject, // optional scope for the callback
        +    discardUrl: false,
        +    nocache: false,
        +    text: "Loading...",
        +    timeout: 30,
        +    scripts: false
        +});
        +
        + * The only required property is url. The optional properties nocache, text and scripts + * are shorthand for disableCaching, indicatorText and loadScripts and are used to set their + * associated property on this panel Updater instance. + * @return {Ext.Panel} this + */ + load : function(){ + var um = this.body.getUpdater(); + um.update.apply(um, arguments); + return this; + }, + + // private + beforeDestroy : function(){ + Ext.Element.uncache( + this.header, + this.tbar, + this.bbar, + this.footer, + this.body + ); + }, + + // private + createClasses : function(){ + this.headerCls = this.baseCls + '-header'; + this.headerTextCls = this.baseCls + '-header-text'; + this.bwrapCls = this.baseCls + '-bwrap'; + this.tbarCls = this.baseCls + '-tbar'; + this.bodyCls = this.baseCls + '-body'; + this.bbarCls = this.baseCls + '-bbar'; + this.footerCls = this.baseCls + '-footer'; + }, + + // private + createGhost : function(cls, useShim, appendTo){ + var el = document.createElement('div'); + el.className = 'x-panel-ghost ' + (cls ? cls : ''); + if(this.header){ + el.appendChild(this.el.dom.firstChild.cloneNode(true)); + } + Ext.fly(el.appendChild(document.createElement('ul'))).setHeight(this.bwrap.getHeight()); + el.style.width = this.el.dom.offsetWidth + 'px';; + if(!appendTo){ + this.container.dom.appendChild(el); + }else{ + Ext.getDom(appendTo).appendChild(el); + } + if(useShim !== false && this.el.useShim !== false){ + var layer = new Ext.Layer({shadow:false, useDisplay:true, constrain:false}, el); + layer.show(); + return layer; + }else{ + return new Ext.Element(el); + } + }, + + // private + doAutoLoad : function(){ + this.body.load( + typeof this.autoLoad == 'object' ? + this.autoLoad : {url: this.autoLoad}); + } +}); +Ext.reg('panel', Ext.Panel); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/PanelDD.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/PanelDD.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/PanelDD.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,153 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* // Internal developer documentation -- will not show up in API docs + * @class Ext.dd.PanelProxy + * A custom drag proxy implementation specific to {@link Ext.Panel}s. This class is primarily used internally + * for the Panel's drag drop implementation, and should never need to be created directly. + * @constructor + * @param panel The {@link Ext.Panel} to proxy for + * @param config Configuration options + */ +Ext.dd.PanelProxy = function(panel, config){ + this.panel = panel; + this.id = this.panel.id +'-ddproxy'; + Ext.apply(this, config); +}; + +Ext.dd.PanelProxy.prototype = { + /** + * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel, + * false to drag with no proxy (defaults to true). + */ + insertProxy : true, + + // private overrides + setStatus : Ext.emptyFn, + reset : Ext.emptyFn, + update : Ext.emptyFn, + stop : Ext.emptyFn, + sync: Ext.emptyFn, + + /** + * Gets the proxy's element + * @return {Element} The proxy's element + */ + getEl : function(){ + return this.ghost; + }, + + /** + * Gets the proxy's ghost element + * @return {Element} The proxy's ghost element + */ + getGhost : function(){ + return this.ghost; + }, + + /** + * Gets the proxy's element + * @return {Element} The proxy's element + */ + getProxy : function(){ + return this.proxy; + }, + + /** + * Hides the proxy + */ + hide : function(){ + if(this.ghost){ + if(this.proxy){ + this.proxy.remove(); + delete this.proxy; + } + this.panel.el.dom.style.display = ''; + this.ghost.remove(); + delete this.ghost; + } + }, + + /** + * Shows the proxy + */ + show : function(){ + if(!this.ghost){ + this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody()); + this.ghost.setXY(this.panel.el.getXY()) + if(this.insertProxy){ + this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'}); + this.proxy.setSize(this.panel.getSize()); + } + this.panel.el.dom.style.display = 'none'; + } + }, + + // private + repair : function(xy, callback, scope){ + this.hide(); + if(typeof callback == "function"){ + callback.call(scope || this); + } + }, + + /** + * Moves the proxy to a different position in the DOM. This is typically called while dragging the Panel + * to keep the proxy sync'd to the Panel's location. + * @param {HTMLElement} parentNode The proxy's parent DOM node + * @param {HTMLElement} before (optional) The sibling node before which the proxy should be inserted (defaults + * to the parent's last child if not specified) + */ + moveProxy : function(parentNode, before){ + if(this.proxy){ + parentNode.insertBefore(this.proxy.dom, before); + } + } +}; + +// private - DD implementation for Panels +Ext.Panel.DD = function(panel, cfg){ + this.panel = panel; + this.dragData = {panel: panel}; + this.proxy = new Ext.dd.PanelProxy(panel, cfg); + Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); + this.setHandleElId(panel.header.id); + panel.header.setStyle('cursor', 'move'); + this.scroll = false; +}; + +Ext.extend(Ext.Panel.DD, Ext.dd.DragSource, { + showFrame: Ext.emptyFn, + startDrag: Ext.emptyFn, + b4StartDrag: function(x, y) { + this.proxy.show(); + }, + b4MouseDown: function(e) { + var x = e.getPageX(); + var y = e.getPageY(); + this.autoOffset(x, y); + }, + onInitDrag : function(x, y){ + this.onStartDrag(x, y); + return true; + }, + createFrame : Ext.emptyFn, + getDragEl : function(e){ + return this.proxy.ghost.dom; + }, + endDrag : function(e){ + this.proxy.hide(); + this.panel.saveState(); + }, + + autoOffset : function(x, y) { + x -= this.startPageX; + y -= this.startPageY; + this.setDelta(x, y); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ProgressBar.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ProgressBar.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/ProgressBar.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,259 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.ProgressBar + * @extends Ext.BoxComponent + *

        An updateable progress bar component. The progress bar supports two different modes: manual and automatic.

        + *

        In manual mode, you are responsible for showing, updating (via {@link #updateProgress}) and clearing the + * progress bar as needed from your own code. This method is most appropriate when you want to show progress + * throughout an operation that has predictable points of interest at which you can update the control.

        + *

        In automatic mode, you simply call {@link #wait} and let the progress bar run indefinitely, only clearing it + * once the operation is complete. You can optionally have the progress bar wait for a specific amount of time + * and then clear itself. Automatic mode is most appropriate for timed operations or asymchronous operations in + * which you have no need for indicating intermediate progress.

        + * @cfg {Float} value A floating point value between 0 and 1 (e.g., .5, defaults to 0) + * @cfg {String} text The progress bar text (defaults to '') + * @cfg {Mixed} textEl The element to render the progress text to (defaults to the progress + * bar's internal text element) + * @cfg {String} id The progress bar element's id (defaults to an auto-generated id) + */ +Ext.ProgressBar = Ext.extend(Ext.BoxComponent, { + /** + * @cfg {String} baseCls + * The base CSS class to apply to the progress bar's wrapper element (defaults to 'x-progress') + */ + baseCls : 'x-progress', + + // private + waitTimer : null, + + // private + initComponent : function(){ + Ext.ProgressBar.superclass.initComponent.call(this); + this.addEvents( + /** + * @event update + * Fires after each update interval + * @param {Ext.ProgressBar} this + * @param {Number} The current progress value + * @param {String} The current progress text + */ + "update" + ); + }, + + // private + onRender : function(ct, position){ + Ext.ProgressBar.superclass.onRender.call(this, ct, position); + + var tpl = new Ext.Template( + '
        ', + '
        ', + '
        ', + '
        ', + '
         
        ', + '
        ', + '
        ', + '
        ', + '
         
        ', + '
        ', + '
        ', + '
        ' + ); + + if(position){ + this.el = tpl.insertBefore(position, {cls: this.baseCls}, true); + }else{ + this.el = tpl.append(ct, {cls: this.baseCls}, true); + } + if(this.id){ + this.el.dom.id = this.id; + } + var inner = this.el.dom.firstChild; + this.progressBar = Ext.get(inner.firstChild); + + if(this.textEl){ + //use an external text el + this.textEl = Ext.get(this.textEl); + delete this.textTopEl; + }else{ + //setup our internal layered text els + this.textTopEl = Ext.get(this.progressBar.dom.firstChild); + var textBackEl = Ext.get(inner.childNodes[1]); + this.textTopEl.setStyle("z-index", 99).addClass('x-hidden'); + this.textEl = new Ext.CompositeElement([this.textTopEl.dom.firstChild, textBackEl.dom.firstChild]); + this.textEl.setWidth(inner.offsetWidth); + } + if(this.value){ + this.updateProgress(this.value, this.text); + }else{ + this.updateText(this.text); + } + this.setSize(this.width || 'auto', 'auto'); + this.progressBar.setHeight(inner.offsetHeight); + }, + + /** + * Updates the progress bar value, and optionally its text. If the text argument is not specified, + * any existing text value will be unchanged. To blank out existing text, pass ''. Note that even + * if the progress bar value exceeds 1, it will never automatically reset -- you are responsible for + * determining when the progress is complete and calling {@link #reset} to clear and/or hide the control. + * @param {Float} value (optional) A floating point value between 0 and 1 (e.g., .5, defaults to 0) + * @param {String} text (optional) The string to display in the progress text element (defaults to '') + * @return {Ext.ProgressBar} this + */ + updateProgress : function(value, text){ + this.value = value || 0; + if(text){ + this.updateText(text); + } + var w = Math.floor(value*this.el.dom.firstChild.offsetWidth); + this.progressBar.setWidth(w); + if(this.textTopEl){ + //textTopEl should be the same width as the bar so overflow will clip as the bar moves + this.textTopEl.removeClass('x-hidden').setWidth(w); + } + this.fireEvent('update', this, value, text); + return this; + }, + + /** + * Initiates an auto-updating progress bar. A duration can be specified, in which case the progress + * bar will automatically reset after a fixed amount of time and optionally call a callback function + * if specified. If no duration is passed in, then the progress bar will run indefinitely and must + * be manually cleared by calling {@link #reset}. The wait method accepts a config object with + * the following properties: + *
        +Property   Type          Description
        +---------- ------------  ----------------------------------------------------------------------
        +duration   Number        The length of time in milliseconds that the progress bar should
        +                         run before resetting itself (defaults to undefined, in which case it
        +                         will run indefinitely until reset is called)
        +interval   Number        The length of time in milliseconds between each progress update
        +                         (defaults to 1000 ms)
        +increment  Number        The number of progress update segments to display within the progress
        +                         bar (defaults to 10).  If the bar reaches the end and is still
        +                         updating, it will automatically wrap back to the beginning.
        +fn         Function      A callback function to execute after the progress bar finishes auto-
        +                         updating.  The function will be called with no arguments.  This function
        +                         will be ignored if duration is not specified since in that case the
        +                         progress bar can only be stopped programmatically, so any required function
        +                         should be called by the same code after it resets the progress bar.
        +scope      Object        The scope that is passed to the callback function (only applies when
        +                         duration and fn are both passed).
        +
        + * + * Example usage: + *
        
        +var p = new Ext.ProgressBar({
        +   renderTo: 'my-el'
        +});
        +
        +//Wait for 5 seconds, then update the status el (progress bar will auto-reset)
        +p.wait({
        +   interval: 100, //bar will move fast!
        +   duration: 5000,
        +   increment: 15,
        +   scope: this,
        +   fn: function(){
        +      Ext.fly('status').update('Done!');
        +   }
        +});
        +
        +//Or update indefinitely until some async action completes, then reset manually
        +p.wait();
        +myAction.on('complete', function(){
        +    p.reset();
        +    Ext.fly('status').update('Done!');
        +});
        +
        + * @param {Object} config (optional) Configuration options + * @return {Ext.ProgressBar} this + */ + wait : function(o){ + if(!this.waitTimer){ + var scope = this; + o = o || {}; + this.waitTimer = Ext.TaskMgr.start({ + run: function(i){ + var inc = o.increment || 10; + this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*.01); + }, + interval: o.interval || 1000, + duration: o.duration, + onStop: function(){ + if(o.fn){ + o.fn.apply(o.scope || this); + } + this.reset(); + }, + scope: scope + }); + } + return this; + }, + + /** + * Returns true if the progress bar is currently in a {@link #wait} operation + * @return {Boolean} True if waiting, else false + */ + isWaiting : function(){ + return this.waitTimer != null; + }, + + /** + * Updates the progress bar text. If specified, textEl will be updated, otherwise the progress + * bar itself will display the updated text. + * @param {String} text (optional) The string to display in the progress text element (defaults to '') + * @return {Ext.ProgressBar} this + */ + updateText : function(text){ + this.text = text || ' '; + this.textEl.update(this.text); + return this; + }, + + /** + * Sets the size of the progress bar. + * @param {Number} width The new width in pixels + * @param {Number} height The new height in pixels + * @return {Ext.ProgressBar} this + */ + setSize : function(w, h){ + Ext.ProgressBar.superclass.setSize.call(this, w, h); + if(this.textTopEl){ + var inner = this.el.dom.firstChild; + this.textEl.setSize(inner.offsetWidth, inner.offsetHeight); + } + return this; + }, + + /** + * Resets the progress bar value to 0 and text to empty string. If hide = true, the progress + * bar will also be hidden (using the {@link #hideMode} property internally). + * @param {Boolean} hide (optional) True to hide the progress bar (defaults to false) + * @return {Ext.ProgressBar} this + */ + reset : function(hide){ + this.updateProgress(0); + if(this.textTopEl){ + this.textTopEl.addClass('x-hidden'); + } + if(this.waitTimer){ + this.waitTimer.onStop = null; //prevent recursion + Ext.TaskMgr.stop(this.waitTimer); + this.waitTimer = null; + } + if(hide === true){ + this.hide(); + } + return this; + } +}); +Ext.reg('progress', Ext.ProgressBar); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Resizable.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Resizable.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Resizable.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,644 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Resizable + * @extends Ext.util.Observable + *

        Applies drag handles to an element to make it resizable. The drag handles are inserted into the element + * and positioned absolute. Some elements, such as a textarea or image, don't support this. To overcome that, you can wrap + * the textarea in a div and set "resizeChild" to true (or to the id of the element), or set wrap:true in your config and + * the element will be wrapped for you automatically.

        + *

        Here is the list of valid resize handles:

        + *
        +Value   Description
        +------  -------------------
        + 'n'     north
        + 's'     south
        + 'e'     east
        + 'w'     west
        + 'nw'    northwest
        + 'sw'    southwest
        + 'se'    southeast
        + 'ne'    northeast
        + 'all'   all
        +
        + *

        Here's an example showing the creation of a typical Resizable:

        + *
        
        +var resizer = new Ext.Resizable("element-id", {
        +    handles: 'all',
        +    minWidth: 200,
        +    minHeight: 100,
        +    maxWidth: 500,
        +    maxHeight: 400,
        +    pinned: true
        +});
        +resizer.on("resize", myHandler);
        +
        + *

        To hide a particular handle, set its display to none in CSS, or through script:
        + * resizer.east.setDisplayed(false);

        + * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or id/element to resize (defaults to false) + * @cfg {Array/String} adjustments String "auto" or an array [width, height] with values to be added to the + * resize operation's new size (defaults to [0, 0]) + * @cfg {Number} minWidth The minimum width for the element (defaults to 5) + * @cfg {Number} minHeight The minimum height for the element (defaults to 5) + * @cfg {Number} maxWidth The maximum width for the element (defaults to 10000) + * @cfg {Number} maxHeight The maximum height for the element (defaults to 10000) + * @cfg {Boolean} enabled False to disable resizing (defaults to true) + * @cfg {Boolean} wrap True to wrap an element with a div if needed (required for textareas and images, defaults to false) + * @cfg {Number} width The width of the element in pixels (defaults to null) + * @cfg {Number} height The height of the element in pixels (defaults to null) + * @cfg {Boolean} animate True to animate the resize (not compatible with dynamic sizing, defaults to false) + * @cfg {Number} duration Animation duration if animate = true (defaults to .35) + * @cfg {Boolean} dynamic True to resize the element while dragging instead of using a proxy (defaults to false) + * @cfg {String} handles String consisting of the resize handles to display (defaults to undefined) + * @cfg {Boolean} multiDirectional Deprecated. The old style of adding multi-direction resize handles, deprecated + * in favor of the handles config option (defaults to false) + * @cfg {Boolean} disableTrackOver True to disable mouse tracking. This is only applied at config time. (defaults to false) + * @cfg {String} easing Animation easing if animate = true (defaults to 'easingOutStrong') + * @cfg {Number} widthIncrement The increment to snap the width resize in pixels (dynamic must be true, defaults to 0) + * @cfg {Number} heightIncrement The increment to snap the height resize in pixels (dynamic must be true, defaults to 0) + * @cfg {Boolean} pinned True to ensure that the resize handles are always visible, false to display them only when the + * user mouses over the resizable borders. This is only applied at config time. (defaults to false) + * @cfg {Boolean} preserveRatio True to preserve the original ratio between height and width during resize (defaults to false) + * @cfg {Boolean} transparent True for transparent handles. This is only applied at config time. (defaults to false) + * @cfg {Number} minX The minimum allowed page X for the element (only used for west resizing, defaults to 0) + * @cfg {Number} minY The minimum allowed page Y for the element (only used for north resizing, defaults to 0) + * @cfg {Boolean} draggable Convenience to initialize drag drop (defaults to false) + * @constructor + * Create a new resizable component + * @param {Mixed} el The id or element to resize + * @param {Object} config configuration options + */ +Ext.Resizable = function(el, config){ + this.el = Ext.get(el); + + if(config && config.wrap){ + config.resizeChild = this.el; + this.el = this.el.wrap(typeof config.wrap == "object" ? config.wrap : {cls:"xresizable-wrap"}); + this.el.id = this.el.dom.id = config.resizeChild.id + "-rzwrap"; + this.el.setStyle("overflow", "hidden"); + this.el.setPositioning(config.resizeChild.getPositioning()); + config.resizeChild.clearPositioning(); + if(!config.width || !config.height){ + var csize = config.resizeChild.getSize(); + this.el.setSize(csize.width, csize.height); + } + if(config.pinned && !config.adjustments){ + config.adjustments = "auto"; + } + } + + this.proxy = this.el.createProxy({tag: "div", cls: "x-resizable-proxy", id: this.el.id + "-rzproxy"}); + this.proxy.unselectable(); + this.proxy.enableDisplayMode('block'); + + Ext.apply(this, config); + + if(this.pinned){ + this.disableTrackOver = true; + this.el.addClass("x-resizable-pinned"); + } + // if the element isn't positioned, make it relative + var position = this.el.getStyle("position"); + if(position != "absolute" && position != "fixed"){ + this.el.setStyle("position", "relative"); + } + if(!this.handles){ // no handles passed, must be legacy style + this.handles = 's,e,se'; + if(this.multiDirectional){ + this.handles += ',n,w'; + } + } + if(this.handles == "all"){ + this.handles = "n s e w ne nw se sw"; + } + var hs = this.handles.split(/\s*?[,;]\s*?| /); + var ps = Ext.Resizable.positions; + for(var i = 0, len = hs.length; i < len; i++){ + if(hs[i] && ps[hs[i]]){ + var pos = ps[hs[i]]; + this[pos] = new Ext.Resizable.Handle(this, pos, this.disableTrackOver, this.transparent); + } + } + // legacy + this.corner = this.southeast; + + if(this.handles.indexOf("n") != -1 || this.handles.indexOf("w") != -1){ + this.updateBox = true; + } + + this.activeHandle = null; + + if(this.resizeChild){ + if(typeof this.resizeChild == "boolean"){ + this.resizeChild = Ext.get(this.el.dom.firstChild, true); + }else{ + this.resizeChild = Ext.get(this.resizeChild, true); + } + } + + if(this.adjustments == "auto"){ + var rc = this.resizeChild; + var hw = this.west, he = this.east, hn = this.north, hs = this.south; + if(rc && (hw || hn)){ + rc.position("relative"); + rc.setLeft(hw ? hw.el.getWidth() : 0); + rc.setTop(hn ? hn.el.getHeight() : 0); + } + this.adjustments = [ + (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0), + (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 + ]; + } + + if(this.draggable){ + this.dd = this.dynamic ? + this.el.initDD(null) : this.el.initDDProxy(null, {dragElId: this.proxy.id}); + this.dd.setHandleElId(this.resizeChild ? this.resizeChild.id : this.el.id); + } + + // public events + this.addEvents( + "beforeresize", + "resize" + ); + + if(this.width !== null && this.height !== null){ + this.resizeTo(this.width, this.height); + }else{ + this.updateChildSize(); + } + if(Ext.isIE){ + this.el.dom.style.zoom = 1; + } + Ext.Resizable.superclass.constructor.call(this); +}; + +Ext.extend(Ext.Resizable, Ext.util.Observable, { + resizeChild : false, + adjustments : [0, 0], + minWidth : 5, + minHeight : 5, + maxWidth : 10000, + maxHeight : 10000, + enabled : true, + animate : false, + duration : .35, + dynamic : false, + handles : false, + multiDirectional : false, + disableTrackOver : false, + easing : 'easeOutStrong', + widthIncrement : 0, + heightIncrement : 0, + pinned : false, + width : null, + height : null, + preserveRatio : false, + transparent: false, + minX: 0, + minY: 0, + draggable: false, + + /** + * @cfg {Mixed} constrainTo Constrain the resize to a particular element + */ + /** + * @cfg {Ext.lib.Region} resizeRegion Constrain the resize to a particular region + */ + + /** + * @event beforeresize + * Fired before resize is allowed. Set enabled to false to cancel resize. + * @param {Ext.Resizable} this + * @param {Ext.EventObject} e The mousedown event + */ + /** + * @event resize + * Fired after a resize. + * @param {Ext.Resizable} this + * @param {Number} width The new width + * @param {Number} height The new height + * @param {Ext.EventObject} e The mouseup event + */ + + /** + * Perform a manual resize + * @param {Number} width + * @param {Number} height + */ + resizeTo : function(width, height){ + this.el.setSize(width, height); + this.updateChildSize(); + this.fireEvent("resize", this, width, height, null); + }, + + // private + startSizing : function(e, handle){ + this.fireEvent("beforeresize", this, e); + if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler + + if(!this.overlay){ + this.overlay = this.el.createProxy({tag: "div", cls: "x-resizable-overlay", html: " "}, Ext.getBody()); + this.overlay.unselectable(); + this.overlay.enableDisplayMode("block"); + this.overlay.on("mousemove", this.onMouseMove, this); + this.overlay.on("mouseup", this.onMouseUp, this); + } + this.overlay.setStyle("cursor", handle.el.getStyle("cursor")); + + this.resizing = true; + this.startBox = this.el.getBox(); + this.startPoint = e.getXY(); + this.offsets = [(this.startBox.x + this.startBox.width) - this.startPoint[0], + (this.startBox.y + this.startBox.height) - this.startPoint[1]]; + + this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.overlay.show(); + + if(this.constrainTo) { + var ct = Ext.get(this.constrainTo); + this.resizeRegion = ct.getRegion().adjust( + ct.getFrameWidth('t'), + ct.getFrameWidth('l'), + -ct.getFrameWidth('b'), + -ct.getFrameWidth('r') + ); + } + + this.proxy.setStyle('visibility', 'hidden'); // workaround display none + this.proxy.show(); + this.proxy.setBox(this.startBox); + if(!this.dynamic){ + this.proxy.setStyle('visibility', 'visible'); + } + } + }, + + // private + onMouseDown : function(handle, e){ + if(this.enabled){ + e.stopEvent(); + this.activeHandle = handle; + this.startSizing(e, handle); + } + }, + + // private + onMouseUp : function(e){ + var size = this.resizeElement(); + this.resizing = false; + this.handleOut(); + this.overlay.hide(); + this.proxy.hide(); + this.fireEvent("resize", this, size.width, size.height, e); + }, + + // private + updateChildSize : function(){ + if(this.resizeChild){ + var el = this.el; + var child = this.resizeChild; + var adj = this.adjustments; + if(el.dom.offsetWidth){ + var b = el.getSize(true); + child.setSize(b.width+adj[0], b.height+adj[1]); + } + // Second call here for IE + // The first call enables instant resizing and + // the second call corrects scroll bars if they + // exist + if(Ext.isIE){ + setTimeout(function(){ + if(el.dom.offsetWidth){ + var b = el.getSize(true); + child.setSize(b.width+adj[0], b.height+adj[1]); + } + }, 10); + } + } + }, + + // private + snap : function(value, inc, min){ + if(!inc || !value) return value; + var newValue = value; + var m = value % inc; + if(m > 0){ + if(m > (inc/2)){ + newValue = value + (inc-m); + }else{ + newValue = value - m; + } + } + return Math.max(min, newValue); + }, + + // private + resizeElement : function(){ + var box = this.proxy.getBox(); + if(this.updateBox){ + this.el.setBox(box, false, this.animate, this.duration, null, this.easing); + }else{ + this.el.setSize(box.width, box.height, this.animate, this.duration, null, this.easing); + } + this.updateChildSize(); + if(!this.dynamic){ + this.proxy.hide(); + } + return box; + }, + + // private + constrain : function(v, diff, m, mx){ + if(v - diff < m){ + diff = v - m; + }else if(v - diff > mx){ + diff = mx - v; + } + return diff; + }, + + // private + onMouseMove : function(e){ + if(this.enabled){ + try{// try catch so if something goes wrong the user doesn't get hung + + if(this.resizeRegion && !this.resizeRegion.contains(e.getPoint())) { + return; + } + + //var curXY = this.startPoint; + var curSize = this.curSize || this.startBox; + var x = this.startBox.x, y = this.startBox.y; + var ox = x, oy = y; + var w = curSize.width, h = curSize.height; + var ow = w, oh = h; + var mw = this.minWidth, mh = this.minHeight; + var mxw = this.maxWidth, mxh = this.maxHeight; + var wi = this.widthIncrement; + var hi = this.heightIncrement; + + var eventXY = e.getXY(); + var diffX = -(this.startPoint[0] - Math.max(this.minX, eventXY[0])); + var diffY = -(this.startPoint[1] - Math.max(this.minY, eventXY[1])); + + var pos = this.activeHandle.position; + + switch(pos){ + case "east": + w += diffX; + w = Math.min(Math.max(mw, w), mxw); + break; + case "south": + h += diffY; + h = Math.min(Math.max(mh, h), mxh); + break; + case "southeast": + w += diffX; + h += diffY; + w = Math.min(Math.max(mw, w), mxw); + h = Math.min(Math.max(mh, h), mxh); + break; + case "north": + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + break; + case "west": + diffX = this.constrain(w, diffX, mw, mxw); + x += diffX; + w -= diffX; + break; + case "northeast": + w += diffX; + w = Math.min(Math.max(mw, w), mxw); + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + break; + case "northwest": + diffX = this.constrain(w, diffX, mw, mxw); + diffY = this.constrain(h, diffY, mh, mxh); + y += diffY; + h -= diffY; + x += diffX; + w -= diffX; + break; + case "southwest": + diffX = this.constrain(w, diffX, mw, mxw); + h += diffY; + h = Math.min(Math.max(mh, h), mxh); + x += diffX; + w -= diffX; + break; + } + + var sw = this.snap(w, wi, mw); + var sh = this.snap(h, hi, mh); + if(sw != w || sh != h){ + switch(pos){ + case "northeast": + y -= sh - h; + break; + case "north": + y -= sh - h; + break; + case "southwest": + x -= sw - w; + break; + case "west": + x -= sw - w; + break; + case "northwest": + x -= sw - w; + y -= sh - h; + break; + } + w = sw; + h = sh; + } + + if(this.preserveRatio){ + switch(pos){ + case "southeast": + case "east": + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + w = ow * (h/oh); + break; + case "south": + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + break; + case "northeast": + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + break; + case "north": + var tw = w; + w = ow * (h/oh); + w = Math.min(Math.max(mw, w), mxw); + h = oh * (w/ow); + x += (tw - w) / 2; + break; + case "southwest": + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + var tw = w; + w = ow * (h/oh); + x += tw - w; + break; + case "west": + var th = h; + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + y += (th - h) / 2; + var tw = w; + w = ow * (h/oh); + x += tw - w; + break; + case "northwest": + var tw = w; + var th = h; + h = oh * (w/ow); + h = Math.min(Math.max(mh, h), mxh); + w = ow * (h/oh); + y += th - h; + x += tw - w; + break; + + } + } + this.proxy.setBounds(x, y, w, h); + if(this.dynamic){ + this.resizeElement(); + } + }catch(e){} + } + }, + + // private + handleOver : function(){ + if(this.enabled){ + this.el.addClass("x-resizable-over"); + } + }, + + // private + handleOut : function(){ + if(!this.resizing){ + this.el.removeClass("x-resizable-over"); + } + }, + + /** + * Returns the element this component is bound to. + * @return {Ext.Element} + */ + getEl : function(){ + return this.el; + }, + + /** + * Returns the resizeChild element (or null). + * @return {Ext.Element} + */ + getResizeChild : function(){ + return this.resizeChild; + }, + + /** + * Destroys this resizable. If the element was wrapped and + * removeEl is not true then the element remains. + * @param {Boolean} removeEl (optional) true to remove the element from the DOM + */ + destroy : function(removeEl){ + this.proxy.remove(); + if(this.overlay){ + this.overlay.removeAllListeners(); + this.overlay.remove(); + } + var ps = Ext.Resizable.positions; + for(var k in ps){ + if(typeof ps[k] != "function" && this[ps[k]]){ + var h = this[ps[k]]; + h.el.removeAllListeners(); + h.el.remove(); + } + } + if(removeEl){ + this.el.update(""); + this.el.remove(); + } + }, + + syncHandleHeight : function(){ + var h = this.el.getHeight(true); + if(this.west){ + this.west.el.setHeight(h); + } + if(this.east){ + this.east.el.setHeight(h); + } + } +}); + +// private +// hash to map config positions to true positions +Ext.Resizable.positions = { + n: "north", s: "south", e: "east", w: "west", se: "southeast", sw: "southwest", nw: "northwest", ne: "northeast" +}; + +// private +Ext.Resizable.Handle = function(rz, pos, disableTrackOver, transparent){ + if(!this.tpl){ + // only initialize the template if resizable is used + var tpl = Ext.DomHelper.createTemplate( + {tag: "div", cls: "x-resizable-handle x-resizable-handle-{0}"} + ); + tpl.compile(); + Ext.Resizable.Handle.prototype.tpl = tpl; + } + this.position = pos; + this.rz = rz; + this.el = this.tpl.append(rz.el.dom, [this.position], true); + this.el.unselectable(); + if(transparent){ + this.el.setOpacity(0); + } + this.el.on("mousedown", this.onMouseDown, this); + if(!disableTrackOver){ + this.el.on("mouseover", this.onMouseOver, this); + this.el.on("mouseout", this.onMouseOut, this); + } +}; + +// private +Ext.Resizable.Handle.prototype = { + afterResize : function(rz){ + // do nothing + }, + // private + onMouseDown : function(e){ + this.rz.onMouseDown(this, e); + }, + // private + onMouseOver : function(e){ + this.rz.handleOver(this, e); + }, + // private + onMouseOut : function(e){ + this.rz.handleOut(this, e); + } +}; + + + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Shadow.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Shadow.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Shadow.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,193 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Shadow + * Simple class that can provide a shadow effect for any element. Note that the element MUST be absolutely positioned, + * and the shadow does not provide any shimming. This should be used only in simple cases -- for more advanced + * functionality that can also provide the same shadow effect, see the {@link Ext.Layer} class. + * @constructor + * Create a new Shadow + * @param {Object} config The config object + */ +Ext.Shadow = function(config){ + Ext.apply(this, config); + if(typeof this.mode != "string"){ + this.mode = this.defaultMode; + } + var o = this.offset, a = {h: 0}; + var rad = Math.floor(this.offset/2); + switch(this.mode.toLowerCase()){ // all this hideous nonsense calculates the various offsets for shadows + case "drop": + a.w = 0; + a.l = a.t = o; + a.t -= 1; + if(Ext.isIE){ + a.l -= this.offset + rad; + a.t -= this.offset + rad; + a.w -= rad; + a.h -= rad; + a.t += 1; + } + break; + case "sides": + a.w = (o*2); + a.l = -o; + a.t = o-1; + if(Ext.isIE){ + a.l -= (this.offset - rad); + a.t -= this.offset + rad; + a.l += 1; + a.w -= (this.offset - rad)*2; + a.w -= rad + 1; + a.h -= 1; + } + break; + case "frame": + a.w = a.h = (o*2); + a.l = a.t = -o; + a.t += 1; + a.h -= 2; + if(Ext.isIE){ + a.l -= (this.offset - rad); + a.t -= (this.offset - rad); + a.l += 1; + a.w -= (this.offset + rad + 1); + a.h -= (this.offset + rad); + a.h += 1; + } + break; + }; + + this.adjusts = a; +}; + +Ext.Shadow.prototype = { + /** + * @cfg {String} mode + * The shadow display mode. Supports the following options:
        + * sides: Shadow displays on both sides and bottom only
        + * frame: Shadow displays equally on all four sides
        + * drop: Traditional bottom-right drop shadow (default) + */ + /** + * @cfg {String} offset + * The number of pixels to offset the shadow from the element (defaults to 4) + */ + offset: 4, + + // private + defaultMode: "drop", + + /** + * Displays the shadow under the target element + * @param {Mixed} targetEl The id or element under which the shadow should display + */ + show : function(target){ + target = Ext.get(target); + if(!this.el){ + this.el = Ext.Shadow.Pool.pull(); + if(this.el.dom.nextSibling != target.dom){ + this.el.insertBefore(target); + } + } + this.el.setStyle("z-index", this.zIndex || parseInt(target.getStyle("z-index"), 10)-1); + if(Ext.isIE){ + this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"; + } + this.realign( + target.getLeft(true), + target.getTop(true), + target.getWidth(), + target.getHeight() + ); + this.el.dom.style.display = "block"; + }, + + /** + * Returns true if the shadow is visible, else false + */ + isVisible : function(){ + return this.el ? true : false; + }, + + /** + * Direct alignment when values are already available. Show must be called at least once before + * calling this method to ensure it is initialized. + * @param {Number} left The target element left position + * @param {Number} top The target element top position + * @param {Number} width The target element width + * @param {Number} height The target element height + */ + realign : function(l, t, w, h){ + if(!this.el){ + return; + } + var a = this.adjusts, d = this.el.dom, s = d.style; + var iea = 0; + s.left = (l+a.l)+"px"; + s.top = (t+a.t)+"px"; + var sw = (w+a.w), sh = (h+a.h), sws = sw +"px", shs = sh + "px"; + if(s.width != sws || s.height != shs){ + s.width = sws; + s.height = shs; + if(!Ext.isIE){ + var cn = d.childNodes; + var sww = Math.max(0, (sw-12))+"px"; + cn[0].childNodes[1].style.width = sww; + cn[1].childNodes[1].style.width = sww; + cn[2].childNodes[1].style.width = sww; + cn[1].style.height = Math.max(0, (sh-12))+"px"; + } + } + }, + + /** + * Hides this shadow + */ + hide : function(){ + if(this.el){ + this.el.dom.style.display = "none"; + Ext.Shadow.Pool.push(this.el); + delete this.el; + } + }, + + /** + * Adjust the z-index of this shadow + * @param {Number} zindex The new z-index + */ + setZIndex : function(z){ + this.zIndex = z; + if(this.el){ + this.el.setStyle("z-index", z); + } + } +}; + +// Private utility class that manages the internal Shadow cache +Ext.Shadow.Pool = function(){ + var p = []; + var markup = Ext.isIE ? + '
        ' : + '
        '; + return { + pull : function(){ + var sh = p.shift(); + if(!sh){ + sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup)); + sh.autoBoxAdjust = false; + } + return sh; + }, + + push : function(sh){ + p.push(sh); + } + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/SplitBar.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/SplitBar.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/SplitBar.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,433 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.SplitBar + * @extends Ext.util.Observable + * Creates draggable splitter bar functionality from two elements (element to be dragged and element to be resized). + *

        + * Usage: + *
        
        +var split = new Ext.SplitBar("elementToDrag", "elementToSize",
        +                   Ext.SplitBar.HORIZONTAL, Ext.SplitBar.LEFT);
        +split.setAdapter(new Ext.SplitBar.AbsoluteLayoutAdapter("container"));
        +split.minSize = 100;
        +split.maxSize = 600;
        +split.animate = true;
        +split.on('moved', splitterMoved);
        +
        + * @constructor + * Create a new SplitBar + * @param {Mixed} dragElement The element to be dragged and act as the SplitBar. + * @param {Mixed} resizingElement The element to be resized based on where the SplitBar element is dragged + * @param {Number} orientation (optional) Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL) + * @param {Number} placement (optional) Either Ext.SplitBar.LEFT or Ext.SplitBar.RIGHT for horizontal or + Ext.SplitBar.TOP or Ext.SplitBar.BOTTOM for vertical. (By default, this is determined automatically by the initial + position of the SplitBar). + */ +Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){ + + /** @private */ + this.el = Ext.get(dragElement, true); + this.el.dom.unselectable = "on"; + /** @private */ + this.resizingEl = Ext.get(resizingElement, true); + + /** + * @private + * The orientation of the split. Either Ext.SplitBar.HORIZONTAL or Ext.SplitBar.VERTICAL. (Defaults to HORIZONTAL) + * Note: If this is changed after creating the SplitBar, the placement property must be manually updated + * @type Number + */ + this.orientation = orientation || Ext.SplitBar.HORIZONTAL; + + /** + * The minimum size of the resizing element. (Defaults to 0) + * @type Number + */ + this.minSize = 0; + + /** + * The maximum size of the resizing element. (Defaults to 2000) + * @type Number + */ + this.maxSize = 2000; + + /** + * Whether to animate the transition to the new size + * @type Boolean + */ + this.animate = false; + + /** + * Whether to create a transparent shim that overlays the page when dragging, enables dragging across iframes. + * @type Boolean + */ + this.useShim = false; + + /** @private */ + this.shim = null; + + if(!existingProxy){ + /** @private */ + this.proxy = Ext.SplitBar.createProxy(this.orientation); + }else{ + this.proxy = Ext.get(existingProxy).dom; + } + /** @private */ + this.dd = new Ext.dd.DDProxy(this.el.dom.id, "XSplitBars", {dragElId : this.proxy.id}); + + /** @private */ + this.dd.b4StartDrag = this.onStartProxyDrag.createDelegate(this); + + /** @private */ + this.dd.endDrag = this.onEndProxyDrag.createDelegate(this); + + /** @private */ + this.dragSpecs = {}; + + /** + * @private The adapter to use to positon and resize elements + */ + this.adapter = new Ext.SplitBar.BasicLayoutAdapter(); + this.adapter.init(this); + + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + /** @private */ + this.placement = placement || (this.el.getX() > this.resizingEl.getX() ? Ext.SplitBar.LEFT : Ext.SplitBar.RIGHT); + this.el.addClass("x-splitbar-h"); + }else{ + /** @private */ + this.placement = placement || (this.el.getY() > this.resizingEl.getY() ? Ext.SplitBar.TOP : Ext.SplitBar.BOTTOM); + this.el.addClass("x-splitbar-v"); + } + + this.addEvents( + /** + * @event resize + * Fires when the splitter is moved (alias for {@link #event-moved}) + * @param {Ext.SplitBar} this + * @param {Number} newSize the new width or height + */ + "resize", + /** + * @event moved + * Fires when the splitter is moved + * @param {Ext.SplitBar} this + * @param {Number} newSize the new width or height + */ + "moved", + /** + * @event beforeresize + * Fires before the splitter is dragged + * @param {Ext.SplitBar} this + */ + "beforeresize", + + "beforeapply" + ); + + Ext.SplitBar.superclass.constructor.call(this); +}; + +Ext.extend(Ext.SplitBar, Ext.util.Observable, { + onStartProxyDrag : function(x, y){ + this.fireEvent("beforeresize", this); + this.overlay = Ext.DomHelper.append(document.body, {cls: "x-drag-overlay", html: " "}, true); + this.overlay.unselectable(); + this.overlay.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.overlay.show(); + Ext.get(this.proxy).setDisplayed("block"); + var size = this.adapter.getElementSize(this); + this.activeMinSize = this.getMinimumSize();; + this.activeMaxSize = this.getMaximumSize();; + var c1 = size - this.activeMinSize; + var c2 = Math.max(this.activeMaxSize - size, 0); + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + this.dd.resetConstraints(); + this.dd.setXConstraint( + this.placement == Ext.SplitBar.LEFT ? c1 : c2, + this.placement == Ext.SplitBar.LEFT ? c2 : c1 + ); + this.dd.setYConstraint(0, 0); + }else{ + this.dd.resetConstraints(); + this.dd.setXConstraint(0, 0); + this.dd.setYConstraint( + this.placement == Ext.SplitBar.TOP ? c1 : c2, + this.placement == Ext.SplitBar.TOP ? c2 : c1 + ); + } + this.dragSpecs.startSize = size; + this.dragSpecs.startPoint = [x, y]; + Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd, x, y); + }, + + /** + * @private Called after the drag operation by the DDProxy + */ + onEndProxyDrag : function(e){ + Ext.get(this.proxy).setDisplayed(false); + var endPoint = Ext.lib.Event.getXY(e); + if(this.overlay){ + this.overlay.remove(); + delete this.overlay; + } + var newSize; + if(this.orientation == Ext.SplitBar.HORIZONTAL){ + newSize = this.dragSpecs.startSize + + (this.placement == Ext.SplitBar.LEFT ? + endPoint[0] - this.dragSpecs.startPoint[0] : + this.dragSpecs.startPoint[0] - endPoint[0] + ); + }else{ + newSize = this.dragSpecs.startSize + + (this.placement == Ext.SplitBar.TOP ? + endPoint[1] - this.dragSpecs.startPoint[1] : + this.dragSpecs.startPoint[1] - endPoint[1] + ); + } + newSize = Math.min(Math.max(newSize, this.activeMinSize), this.activeMaxSize); + if(newSize != this.dragSpecs.startSize){ + if(this.fireEvent('beforeapply', this, newSize) !== false){ + this.adapter.setElementSize(this, newSize); + this.fireEvent("moved", this, newSize); + this.fireEvent("resize", this, newSize); + } + } + }, + + /** + * Get the adapter this SplitBar uses + * @return The adapter object + */ + getAdapter : function(){ + return this.adapter; + }, + + /** + * Set the adapter this SplitBar uses + * @param {Object} adapter A SplitBar adapter object + */ + setAdapter : function(adapter){ + this.adapter = adapter; + this.adapter.init(this); + }, + + /** + * Gets the minimum size for the resizing element + * @return {Number} The minimum size + */ + getMinimumSize : function(){ + return this.minSize; + }, + + /** + * Sets the minimum size for the resizing element + * @param {Number} minSize The minimum size + */ + setMinimumSize : function(minSize){ + this.minSize = minSize; + }, + + /** + * Gets the maximum size for the resizing element + * @return {Number} The maximum size + */ + getMaximumSize : function(){ + return this.maxSize; + }, + + /** + * Sets the maximum size for the resizing element + * @param {Number} maxSize The maximum size + */ + setMaximumSize : function(maxSize){ + this.maxSize = maxSize; + }, + + /** + * Sets the initialize size for the resizing element + * @param {Number} size The initial size + */ + setCurrentSize : function(size){ + var oldAnimate = this.animate; + this.animate = false; + this.adapter.setElementSize(this, size); + this.animate = oldAnimate; + }, + + /** + * Destroy this splitbar. + * @param {Boolean} removeEl True to remove the element + */ + destroy : function(removeEl){ + if(this.shim){ + this.shim.remove(); + } + this.dd.unreg(); + Ext.removeNode(this.proxy); + if(removeEl){ + this.el.remove(); + } + } +}); + +/** + * @private static Create our own proxy element element. So it will be the same same size on all browsers, we won't use borders. Instead we use a background color. + */ +Ext.SplitBar.createProxy = function(dir){ + var proxy = new Ext.Element(document.createElement("div")); + proxy.unselectable(); + var cls = 'x-splitbar-proxy'; + proxy.addClass(cls + ' ' + (dir == Ext.SplitBar.HORIZONTAL ? cls +'-h' : cls + '-v')); + document.body.appendChild(proxy.dom); + return proxy.dom; +}; + +/** + * @class Ext.SplitBar.BasicLayoutAdapter + * Default Adapter. It assumes the splitter and resizing element are not positioned + * elements and only gets/sets the width of the element. Generally used for table based layouts. + */ +Ext.SplitBar.BasicLayoutAdapter = function(){ +}; + +Ext.SplitBar.BasicLayoutAdapter.prototype = { + // do nothing for now + init : function(s){ + + }, + /** + * Called before drag operations to get the current size of the resizing element. + * @param {Ext.SplitBar} s The SplitBar using this adapter + */ + getElementSize : function(s){ + if(s.orientation == Ext.SplitBar.HORIZONTAL){ + return s.resizingEl.getWidth(); + }else{ + return s.resizingEl.getHeight(); + } + }, + + /** + * Called after drag operations to set the size of the resizing element. + * @param {Ext.SplitBar} s The SplitBar using this adapter + * @param {Number} newSize The new size to set + * @param {Function} onComplete A function to be invoked when resizing is complete + */ + setElementSize : function(s, newSize, onComplete){ + if(s.orientation == Ext.SplitBar.HORIZONTAL){ + if(!s.animate){ + s.resizingEl.setWidth(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setWidth(newSize, true, .1, onComplete, 'easeOut'); + } + }else{ + + if(!s.animate){ + s.resizingEl.setHeight(newSize); + if(onComplete){ + onComplete(s, newSize); + } + }else{ + s.resizingEl.setHeight(newSize, true, .1, onComplete, 'easeOut'); + } + } + } +}; + +/** + *@class Ext.SplitBar.AbsoluteLayoutAdapter + * @extends Ext.SplitBar.BasicLayoutAdapter + * Adapter that moves the splitter element to align with the resized sizing element. + * Used with an absolute positioned SplitBar. + * @param {Mixed} container The container that wraps around the absolute positioned content. If it's + * document.body, make sure you assign an id to the body element. + */ +Ext.SplitBar.AbsoluteLayoutAdapter = function(container){ + this.basic = new Ext.SplitBar.BasicLayoutAdapter(); + this.container = Ext.get(container); +}; + +Ext.SplitBar.AbsoluteLayoutAdapter.prototype = { + init : function(s){ + this.basic.init(s); + }, + + getElementSize : function(s){ + return this.basic.getElementSize(s); + }, + + setElementSize : function(s, newSize, onComplete){ + this.basic.setElementSize(s, newSize, this.moveSplitter.createDelegate(this, [s])); + }, + + moveSplitter : function(s){ + var yes = Ext.SplitBar; + switch(s.placement){ + case yes.LEFT: + s.el.setX(s.resizingEl.getRight()); + break; + case yes.RIGHT: + s.el.setStyle("right", (this.container.getWidth() - s.resizingEl.getLeft()) + "px"); + break; + case yes.TOP: + s.el.setY(s.resizingEl.getBottom()); + break; + case yes.BOTTOM: + s.el.setY(s.resizingEl.getTop() - s.el.getHeight()); + break; + } + } +}; + +/** + * Orientation constant - Create a vertical SplitBar + * @static + * @type Number + */ +Ext.SplitBar.VERTICAL = 1; + +/** + * Orientation constant - Create a horizontal SplitBar + * @static + * @type Number + */ +Ext.SplitBar.HORIZONTAL = 2; + +/** + * Placement constant - The resizing element is to the left of the splitter element + * @static + * @type Number + */ +Ext.SplitBar.LEFT = 1; + +/** + * Placement constant - The resizing element is to the right of the splitter element + * @static + * @type Number + */ +Ext.SplitBar.RIGHT = 2; + +/** + * Placement constant - The resizing element is positioned above the splitter element + * @static + * @type Number + */ +Ext.SplitBar.TOP = 3; + +/** + * Placement constant - The resizing element is positioned under splitter element + * @static + * @type Number + */ +Ext.SplitBar.BOTTOM = 4; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/SplitButton.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/SplitButton.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/SplitButton.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,165 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.SplitButton + * @extends Ext.Button + * A split button that provides a built-in dropdown arrow that can fire an event separately from the default + * click event of the button. Typically this would be used to display a dropdown menu that provides additional + * options to the primary button action, but any custom handler can provide the arrowclick implementation. + * @cfg {Function} arrowHandler A function called when the arrow button is clicked (can be used instead of click event) + * @cfg {String} arrowTooltip The title attribute of the arrow + * @constructor + * Create a new menu button + * @param {Object} config The config object + */ +Ext.SplitButton = Ext.extend(Ext.Button, { + arrowSelector : 'button:last', + + initComponent : function(){ + Ext.SplitButton.superclass.initComponent.call(this); + /** + * @event arrowclick + * Fires when this button's arrow is clicked + * @param {MenuButton} this + * @param {EventObject} e The click event + */ + this.addEvents("arrowclick"); + }, + + onRender : function(ct, position){ + // this is one sweet looking template! + var tpl = new Ext.Template( + '
        ', + '', + '', + "
         
        ", + '', + '', + "
         
        " + ); + var btn, targs = [this.text || ' ', this.type]; + if(position){ + btn = tpl.insertBefore(position, targs, true); + }else{ + btn = tpl.append(ct, targs, true); + } + var btnEl = btn.child(this.buttonSelector); + + this.initButtonEl(btn, btnEl); + this.arrowBtnTable = btn.child("table:last"); + if(this.arrowTooltip){ + btn.child(this.arrowSelector).dom[this.tooltipType] = this.arrowTooltip; + } + }, + + // private + autoWidth : function(){ + if(this.el){ + var tbl = this.el.child("table:first"); + var tbl2 = this.el.child("table:last"); + this.el.setWidth("auto"); + tbl.setWidth("auto"); + if(Ext.isIE7 && Ext.isStrict){ + var ib = this.el.child(this.buttonSelector); + if(ib && ib.getWidth() > 20){ + ib.clip(); + ib.setWidth(Ext.util.TextMetrics.measure(ib, this.text).width+ib.getFrameWidth('lr')); + } + } + if(this.minWidth){ + if((tbl.getWidth()+tbl2.getWidth()) < this.minWidth){ + tbl.setWidth(this.minWidth-tbl2.getWidth()); + } + } + this.el.setWidth(tbl.getWidth()+tbl2.getWidth()); + } + }, + + /** + * Sets this button's arrow click handler + * @param {Function} handler The function to call when the arrow is clicked + * @param {Object} scope (optional) Scope for the function passed above + */ + setArrowHandler : function(handler, scope){ + this.arrowHandler = handler; + this.scope = scope; + }, + + // private + onClick : function(e){ + e.preventDefault(); + if(!this.disabled){ + if(e.getTarget(".x-btn-menu-arrow-wrap")){ + if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ + this.showMenu(); + } + this.fireEvent("arrowclick", this, e); + if(this.arrowHandler){ + this.arrowHandler.call(this.scope || this, this, e); + } + }else{ + if(this.enableToggle){ + this.toggle(); + } + this.fireEvent("click", this, e); + if(this.handler){ + this.handler.call(this.scope || this, this, e); + } + } + } + }, + + getClickEl : function(e, isUp){ + if(!isUp){ + return (this.lastClickEl = e.getTarget("table", 10, true)); + } + return this.lastClickEl; + }, + + onDisable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.addClass("x-item-disabled"); + } + this.el.child(this.buttonSelector).dom.disabled = true; + this.el.child(this.arrowSelector).dom.disabled = true; + } + this.disabled = true; + }, + + onEnable : function(){ + if(this.el){ + if(!Ext.isIE6){ + this.el.removeClass("x-item-disabled"); + } + this.el.child(this.buttonSelector).dom.disabled = false; + this.el.child(this.arrowSelector).dom.disabled = false; + } + this.disabled = false; + }, + + isMenuTriggerOver : function(e){ + return this.menu && e.within(this.arrowBtnTable) && !e.within(this.arrowBtnTable, true); + }, + + isMenuTriggerOut : function(e, internal){ + return this.menu && !e.within(this.arrowBtnTable); + }, + + onDestroy : function(){ + Ext.destroy(this.arrowBtnTable); + Ext.SplitButton.superclass.onDestroy.call(this); + } +}); + +// backwards compat +Ext.MenuButton = Ext.SplitButton; + + +Ext.reg('splitbutton', Ext.SplitButton); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/TabPanel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/TabPanel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/TabPanel.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,876 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.TabPanel + *

        A basic tab container. Tab panels can be used exactly like a standard {@link Ext.Panel} for layout + * purposes, but also have special support for containing child Panels that get automatically converted into tabs.

        + *

        There is no actual tab class — each tab is simply an {@link Ext.Panel}. However, when rendered in a + * TabPanel, each child Panel can fire additional events that only exist for tabs and are not available to other + * Panels. These are:

        + *
          + *
        • activate: Fires when this Panel becomes the active tab. + *
          + * Listeners will be called with the following arguments: + *
          • tab : Panel
            The tab that was activated
          + *
        • + *
        • deactivate: Fires when this Panel that was the active tab becomes deactivated. + *
          + * Listeners will be called with the following arguments: + *
          • tab : Panel
            The tab that was deactivated
          + *
        • + *
        + *

        There are several methods available for creating TabPanels. The output of the following examples should be + * exactly the same. The tabs can be created and rendered completely in code, as in this example:

        + *
        
        +var tabs = new Ext.TabPanel({
        +    renderTo: Ext.getBody(),
        +    activeTab: 0,
        +    items: [{
        +        title: 'Tab 1',
        +        html: 'A simple tab'
        +    },{
        +        title: 'Tab 2',
        +        html: 'Another one'
        +    }]
        +});
        +
        + *

        TabPanels can also be rendered from markup in a couple of ways. See the {@link #autoTabs} example for + * rendering entirely from markup that is already structured correctly as a TabPanel (a container div with + * one or more nested tab divs with class 'x-tab'). You can also render from markup that is not strictly + * structured by simply specifying by id which elements should be the container and the tabs. Using this method, + * tab content can be pulled from different elements within the page by id regardless of page structure. Note + * that the tab divs in this example contain the class 'x-hide-display' so that they can be rendered deferred + * without displaying outside the tabs. You could alternately set {@link #deferredRender} to false to render all + * content tabs on page load. For example: + *

        
        +var tabs = new Ext.TabPanel({
        +    renderTo: 'my-tabs',
        +    activeTab: 0,
        +    items:[
        +        {contentEl:'tab1', title:'Tab 1'},
        +        {contentEl:'tab2', title:'Tab 2'}
        +    ]
        +});
        +
        +// Note that the tabs do not have to be nested within the container (although they can be)
        +<div id="my-tabs"></div>
        +<div id="tab1" class="x-hide-display">A simple tab</div>
        +<div id="tab2" class="x-hide-display">Another one</div>
        +
        + * @extends Ext.Panel + * @constructor + * @param {Object} config The configuration options + */ +Ext.TabPanel = Ext.extend(Ext.Panel, { + /** + * @cfg {Boolean} layoutOnTabChange Set to true to do a layout of tab items as tabs are changed. + */ + /** + * @cfg {Boolean} monitorResize True to automatically monitor window resize events and rerender the layout on + * browser resize (defaults to true). + */ + monitorResize : true, + /** + * @cfg {Boolean} deferredRender Internally, the TabPanel uses a {@link Ext.layout.CardLayout} to manage its tabs. + * This property will be passed on to the layout as its {@link Ext.layout.CardLayout#deferredRender} config value, + * determining whether or not each tab is rendered only when first accessed (defaults to true). + */ + deferredRender : true, + /** + * @cfg {Number} tabWidth The initial width in pixels of each new tab (defaults to 120). + */ + tabWidth: 120, + /** + * @cfg {Number} minTabWidth The minimum width in pixels for each tab when {@link #resizeTabs} = true (defaults to 30). + */ + minTabWidth: 30, + /** + * @cfg {Boolean} resizeTabs True to automatically resize each tab so that the tabs will completely fill the + * tab strip (defaults to false). Setting this to true may cause specific widths that might be set per tab to + * be overridden in order to fit them all into view (although {@link #minTabWidth} will always be honored). + */ + resizeTabs:false, + /** + * @cfg {Number} enableTabScroll True to enable scrolling to tabs that may be invisible due to overflowing the + * overall TabPanel width. Only available with tabs on top. (defaults to false). + */ + enableTabScroll: false, + /** + * @cfg {Number} scrollIncrement The number of pixels to scroll each time a tab scroll button is pressed (defaults + * to 100, or if {@link #resizeTabs} = true, the calculated tab width). Only applies when {@link #enableTabScroll} = true. + */ + scrollIncrement : 0, + /** + * @cfg {Number} scrollRepeatInterval Number of milliseconds between each scroll while a tab scroll button is + * continuously pressed (defaults to 400). + */ + scrollRepeatInterval : 400, + /** + * @cfg {Float} scrollDuration The number of milliseconds that each scroll animation should last (defaults to .35). + * Only applies when {@link #animScroll} = true. + */ + scrollDuration : .35, + /** + * @cfg {Boolean} animScroll True to animate tab scrolling so that hidden tabs slide smoothly into view (defaults + * to true). Only applies when {@link #enableTabScroll} = true. + */ + animScroll : true, + /** + * @cfg {String} tabPosition The position where the tab strip should be rendered (defaults to 'top'). The only + * other supported value is 'bottom'. Note that tab scrolling is only supported for position 'top'. + */ + tabPosition: 'top', + /** + * @cfg {String} baseCls The base CSS class applied to the panel (defaults to 'x-tab-panel'). + */ + baseCls: 'x-tab-panel', + /** + * @cfg {Boolean} autoTabs + *

        True to query the DOM for any divs with a class of 'x-tab' to be automatically converted + * to tabs and added to this panel (defaults to false). Note that the query will be executed within the scope of + * the container element only (so that multiple tab panels from markup can be supported via this method).

        + *

        This method is only possible when the markup is structured correctly as a container with nested + * divs containing the class 'x-tab'. To create TabPanels without these limitations, or to pull tab content from + * other elements on the page, see the example at the top of the class for generating tabs from markup.

        + *

        There are a couple of things to note when using this method:

          + *
        • When using the autoTabs config (as opposed to passing individual tab configs in the TabPanel's + * {@link #items} collection), you must use {@link #applyTo} to correctly use the specified id as the tab container. + * The autoTabs method replaces existing content with the TabPanel components.
        • + *
        • Make sure that you set {@link #deferredRender} to false so that the content elements for each tab will be + * rendered into the TabPanel immediately upon page load, otherwise they will not be transformed until each tab + * is activated and will be visible outside the TabPanel.
        • + *
        Example usage:

        + *
        
        +var tabs = new Ext.TabPanel({
        +    applyTo: 'my-tabs',
        +    activeTab: 0,
        +    deferredRender: false,
        +    autoTabs: true
        +});
        +
        +// This markup will be converted to a TabPanel from the code above
        +<div id="my-tabs">
        +    <div class="x-tab" title="Tab 1">A simple tab</div>
        +    <div class="x-tab" title="Tab 2">Another one</div>
        +</div>
        +
        + */ + autoTabs : false, + /** + * @cfg {String} autoTabSelector The CSS selector used to search for tabs in existing markup when {@link #autoTabs} + * = true (defaults to 'div.x-tab'). This can be any valid selector supported by {@link Ext.DomQuery#select}. + * Note that the query will be executed within the scope of this tab panel only (so that multiple tab panels from + * markup can be supported on a page). + */ + autoTabSelector:'div.x-tab', + // private + itemCls : 'x-tab-item', + /** + * @cfg {String/Number} activeTab A string id or the numeric index of the tab that should be initially + * activated on render (defaults to none). + */ + activeTab : null, + /** + * @cfg {Number} tabMargin The number of pixels of space to calculate into the sizing and scrolling of tabs. If you + * change the margin in CSS, you will need to update this value so calculations are correct with either resizeTabs + * or scrolling tabs. (defaults to 2) + */ + tabMargin : 2, + /** + * @cfg {Boolean} plain True to render the tab strip without a background container image (defaults to false). + */ + plain: false, + + /** + * @cfg {Number} wheelIncrement For scrolling tabs, the number of pixels to increment on mouse wheel scrolling (defaults to 20). + */ + wheelIncrement : 20, + + // private config overrides + elements: 'body', + headerAsText: false, + frame: false, + hideBorders:true, + + // private + initComponent : function(){ + this.frame = false; + Ext.TabPanel.superclass.initComponent.call(this); + this.addEvents( + /** + * @event beforetabchange + * Fires before the active tab changes. Handlers can return false to cancel the tab change. + * @param {TabPanel} this + * @param {Panel} newTab The tab being activated + * @param {Panel} currentTab The current active tab + */ + 'beforetabchange', + /** + * @event tabchange + * Fires after the active tab has changed. + * @param {TabPanel} this + * @param {Panel} tab The new active tab + */ + 'tabchange', + /** + * @event contextmenu + * Fires when the original browser contextmenu event originated from a tab element. + * @param {TabPanel} this + * @param {Panel} tab The target tab + * @param {EventObject} e + */ + 'contextmenu' + ); + this.setLayout(new Ext.layout.CardLayout({ + deferredRender: this.deferredRender + })); + if(this.tabPosition == 'top'){ + this.elements += ',header'; + this.stripTarget = 'header'; + }else { + this.elements += ',footer'; + this.stripTarget = 'footer'; + } + if(!this.stack){ + this.stack = Ext.TabPanel.AccessStack(); + } + this.initItems(); + }, + + // private + render : function(){ + Ext.TabPanel.superclass.render.apply(this, arguments); + if(this.activeTab !== undefined){ + var item = this.activeTab; + delete this.activeTab; + this.setActiveTab(item); + } + }, + + // private + onRender : function(ct, position){ + Ext.TabPanel.superclass.onRender.call(this, ct, position); + + if(this.plain){ + var pos = this.tabPosition == 'top' ? 'header' : 'footer'; + this[pos].addClass('x-tab-panel-'+pos+'-plain'); + } + + var st = this[this.stripTarget]; + + this.stripWrap = st.createChild({cls:'x-tab-strip-wrap', cn:{ + tag:'ul', cls:'x-tab-strip x-tab-strip-'+this.tabPosition}}); + this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}); + this.strip = new Ext.Element(this.stripWrap.dom.firstChild); + + this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge'}); + this.strip.createChild({cls:'x-clear'}); + + this.body.addClass('x-tab-panel-body-'+this.tabPosition); + + if(!this.itemTpl){ + var tt = new Ext.Template( + '
      • ', + '', + '{text}', + '
      • ' + ); + tt.disableFormats = true; + tt.compile(); + Ext.TabPanel.prototype.itemTpl = tt; + } + + this.items.each(this.initTab, this); + }, + + // private + afterRender : function(){ + Ext.TabPanel.superclass.afterRender.call(this); + if(this.autoTabs){ + this.readTabs(false); + } + }, + + // private + initEvents : function(){ + Ext.TabPanel.superclass.initEvents.call(this); + this.on('add', this.onAdd, this); + this.on('remove', this.onRemove, this); + + this.strip.on('mousedown', this.onStripMouseDown, this); + this.strip.on('click', this.onStripClick, this); + this.strip.on('contextmenu', this.onStripContextMenu, this); + if(this.enableTabScroll){ + this.strip.on('mousewheel', this.onWheel, this); + } + }, + + // private + findTargets : function(e){ + var item = null; + var itemEl = e.getTarget('li', this.strip); + if(itemEl){ + item = this.getComponent(itemEl.id.split('__')[1]); + if(item.disabled){ + return { + close : null, + item : null, + el : null + }; + } + } + return { + close : e.getTarget('.x-tab-strip-close', this.strip), + item : item, + el : itemEl + }; + }, + + // private + onStripMouseDown : function(e){ + e.preventDefault(); + if(e.button != 0){ + return; + } + var t = this.findTargets(e); + if(t.close){ + this.remove(t.item); + return; + } + if(t.item && t.item != this.activeTab){ + this.setActiveTab(t.item); + } + }, + + // private + onStripClick : function(e){ + var t = this.findTargets(e); + if(!t.close && t.item && t.item != this.activeTab){ + this.setActiveTab(t.item); + } + }, + + // private + onStripContextMenu : function(e){ + e.preventDefault(); + var t = this.findTargets(e); + if(t.item){ + this.fireEvent('contextmenu', this, t.item, e); + } + }, + + /** + * True to scan the markup in this tab panel for autoTabs using the autoTabSelector + * @param {Boolean} removeExisting True to remove existing tabs + */ + readTabs : function(removeExisting){ + if(removeExisting === true){ + this.items.each(function(item){ + this.remove(item); + }, this); + } + var tabs = this.el.query(this.autoTabSelector); + for(var i = 0, len = tabs.length; i < len; i++){ + var tab = tabs[i]; + var title = tab.getAttribute('title'); + tab.removeAttribute('title'); + this.add({ + title: title, + el: tab + }); + } + }, + + // private + initTab : function(item, index){ + var before = this.strip.dom.childNodes[index]; + var cls = item.closable ? 'x-tab-strip-closable' : ''; + if(item.disabled){ + cls += ' x-item-disabled'; + } + if(item.iconCls){ + cls += ' x-tab-with-icon'; + } + var p = { + id: this.id + '__' + item.getItemId(), + text: item.title, + cls: cls, + iconCls: item.iconCls || '' + }; + var el = before ? + this.itemTpl.insertBefore(before, p) : + this.itemTpl.append(this.strip, p); + + Ext.fly(el).addClassOnOver('x-tab-strip-over'); + + if(item.tabTip){ + Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip; + } + item.on('disable', this.onItemDisabled, this); + item.on('enable', this.onItemEnabled, this); + item.on('titlechange', this.onItemTitleChanged, this); + item.on('beforeshow', this.onBeforeShowItem, this); + }, + + // private + onAdd : function(tp, item, index){ + this.initTab(item, index); + if(this.items.getCount() == 1){ + this.syncSize(); + } + this.delegateUpdates(); + }, + + // private + onBeforeAdd : function(item){ + var existing = item.events ? (this.items.containsKey(item.getItemId()) ? item : null) : this.items.get(item); + if(existing){ + this.setActiveTab(item); + return false; + } + Ext.TabPanel.superclass.onBeforeAdd.apply(this, arguments); + var es = item.elements; + item.elements = es ? es.replace(',header', '') : es; + item.border = (item.border === true); + }, + + // private + onRemove : function(tp, item){ + Ext.removeNode(this.getTabEl(item)); + this.stack.remove(item); + if(item == this.activeTab){ + var next = this.stack.next(); + if(next){ + this.setActiveTab(next); + }else{ + this.setActiveTab(0); + } + } + this.delegateUpdates(); + }, + + // private + onBeforeShowItem : function(item){ + if(item != this.activeTab){ + this.setActiveTab(item); + return false; + } + }, + + // private + onItemDisabled : function(item){ + var el = this.getTabEl(item); + if(el){ + Ext.fly(el).addClass('x-item-disabled'); + } + this.stack.remove(item); + }, + + // private + onItemEnabled : function(item){ + var el = this.getTabEl(item); + if(el){ + Ext.fly(el).removeClass('x-item-disabled'); + } + }, + + // private + onItemTitleChanged : function(item){ + var el = this.getTabEl(item); + if(el){ + Ext.fly(el).child('span.x-tab-strip-text', true).innerHTML = item.title; + } + }, + + /** + * Gets the DOM element for tab strip item which activates the + * child panel with the specified ID. Access this to change the visual treatment of the + * item, for example by changing the CSS class name. + * @param {Panel} tab The tab + * @return {HTMLElement} The DOM node + */ + getTabEl : function(item){ + return document.getElementById(this.id+'__'+item.getItemId()); + }, + + // private + onResize : function(){ + Ext.TabPanel.superclass.onResize.apply(this, arguments); + this.delegateUpdates(); + }, + + /** + * Suspends any internal calculations or scrolling while doing a bulk operation. See {@link #endUpdate} + */ + beginUpdate : function(){ + this.suspendUpdates = true; + }, + + /** + * Resumes calculations and scrolling at the end of a bulk operation. See {@link #beginUpdate} + */ + endUpdate : function(){ + this.suspendUpdates = false; + this.delegateUpdates(); + }, + + /** + * Hides the tab strip item for the passed tab + * @param {Number/String/Panel} item The tab index, id or item + */ + hideTabStripItem : function(item){ + item = this.getComponent(item); + var el = this.getTabEl(item); + if(el){ + el.style.display = 'none'; + this.delegateUpdates(); + } + }, + + /** + * Unhides the tab strip item for the passed tab + * @param {Number/String/Panel} item The tab index, id or item + */ + unhideTabStripItem : function(item){ + item = this.getComponent(item); + var el = this.getTabEl(item); + if(el){ + el.style.display = ''; + this.delegateUpdates(); + } + }, + + // private + delegateUpdates : function(){ + if(this.suspendUpdates){ + return; + } + if(this.resizeTabs && this.rendered){ + this.autoSizeTabs(); + } + if(this.enableTabScroll && this.rendered){ + this.autoScrollTabs(); + } + }, + + // private + autoSizeTabs : function(){ + var count = this.items.length; + var ce = this.tabPosition != 'bottom' ? 'header' : 'footer'; + var ow = this[ce].dom.offsetWidth; + var aw = this[ce].dom.clientWidth; + + if(!this.resizeTabs || count < 1 || !aw){ // !aw for display:none + return; + } + + var each = Math.max(Math.min(Math.floor((aw-4) / count) - this.tabMargin, this.tabWidth), this.minTabWidth); // -4 for float errors in IE + this.lastTabWidth = each; + var lis = this.stripWrap.dom.getElementsByTagName('li'); + for(var i = 0, len = lis.length-1; i < len; i++) { // -1 for the "edge" li + var li = lis[i]; + var inner = li.childNodes[1].firstChild.firstChild; + var tw = li.offsetWidth; + var iw = inner.offsetWidth; + inner.style.width = (each - (tw-iw)) + 'px'; + } + }, + + // private + adjustBodyWidth : function(w){ + if(this.header){ + this.header.setWidth(w); + } + if(this.footer){ + this.footer.setWidth(w); + } + return w; + }, + + /** + * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which + * can return false to cancel the tab change. + * @param {String/Panel} tab The id or tab Panel to activate + */ + setActiveTab : function(item){ + item = this.getComponent(item); + if(!item || this.fireEvent('beforetabchange', this, item, this.activeTab) === false){ + return; + } + if(!this.rendered){ + this.activeTab = item; + return; + } + if(this.activeTab != item){ + if(this.activeTab){ + var oldEl = this.getTabEl(this.activeTab); + if(oldEl){ + Ext.fly(oldEl).removeClass('x-tab-strip-active'); + } + this.activeTab.fireEvent('deactivate', this.activeTab); + } + var el = this.getTabEl(item); + Ext.fly(el).addClass('x-tab-strip-active'); + this.activeTab = item; + this.stack.add(item); + + this.layout.setActiveItem(item); + if(this.layoutOnTabChange && item.doLayout){ + item.doLayout(); + } + if(this.scrolling){ + this.scrollToTab(item, this.animScroll); + } + + item.fireEvent('activate', item); + this.fireEvent('tabchange', this, item); + } + }, + + /** + * Gets the currently active tab. + * @return {Panel} The active tab + */ + getActiveTab : function(){ + return this.activeTab || null; + }, + + /** + * Gets the specified tab by id. + * @param {String} id The tab id + * @return {Panel} The tab + */ + getItem : function(item){ + return this.getComponent(item); + }, + + // private + autoScrollTabs : function(){ + var count = this.items.length; + var ow = this.header.dom.offsetWidth; + var tw = this.header.dom.clientWidth; + + var wrap = this.stripWrap; + var cw = wrap.dom.offsetWidth; + var pos = this.getScrollPos(); + var l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos; + + if(!this.enableTabScroll || count < 1 || cw < 20){ // 20 to prevent display:none issues + return; + } + if(l <= tw){ + wrap.dom.scrollLeft = 0; + wrap.setWidth(tw); + if(this.scrolling){ + this.scrolling = false; + this.header.removeClass('x-tab-scrolling'); + this.scrollLeft.hide(); + this.scrollRight.hide(); + } + }else{ + if(!this.scrolling){ + this.header.addClass('x-tab-scrolling'); + } + tw -= wrap.getMargins('lr'); + wrap.setWidth(tw > 20 ? tw : 20); + if(!this.scrolling){ + if(!this.scrollLeft){ + this.createScrollers(); + }else{ + this.scrollLeft.show(); + this.scrollRight.show(); + } + } + this.scrolling = true; + if(pos > (l-tw)){ // ensure it stays within bounds + wrap.dom.scrollLeft = l-tw; + }else{ // otherwise, make sure the active tab is still visible + this.scrollToTab(this.activeTab, false); + } + this.updateScrollButtons(); + } + }, + + // private + createScrollers : function(){ + var h = this.stripWrap.dom.offsetHeight; + + // left + var sl = this.header.insertFirst({ + cls:'x-tab-scroller-left' + }); + sl.setHeight(h); + sl.addClassOnOver('x-tab-scroller-left-over'); + this.leftRepeater = new Ext.util.ClickRepeater(sl, { + interval : this.scrollRepeatInterval, + handler: this.onScrollLeft, + scope: this + }); + this.scrollLeft = sl; + + // right + var sr = this.header.insertFirst({ + cls:'x-tab-scroller-right' + }); + sr.setHeight(h); + sr.addClassOnOver('x-tab-scroller-right-over'); + this.rightRepeater = new Ext.util.ClickRepeater(sr, { + interval : this.scrollRepeatInterval, + handler: this.onScrollRight, + scope: this + }); + this.scrollRight = sr; + }, + + // private + getScrollWidth : function(){ + return this.edge.getOffsetsTo(this.stripWrap)[0] + this.getScrollPos(); + }, + + // private + getScrollPos : function(){ + return parseInt(this.stripWrap.dom.scrollLeft, 10) || 0; + }, + + // private + getScrollArea : function(){ + return parseInt(this.stripWrap.dom.clientWidth, 10) || 0; + }, + + // private + getScrollAnim : function(){ + return {duration:this.scrollDuration, callback: this.updateScrollButtons, scope: this}; + }, + + // private + getScrollIncrement : function(){ + return this.scrollIncrement || (this.resizeTabs ? this.lastTabWidth+2 : 100); + }, + + /** + * Scrolls to a particular tab if tab scrolling is enabled + * @param {Panel} item The item to scroll to + * @param {Boolean} animate True to enable animations + */ + + scrollToTab : function(item, animate){ + if(!item){ return; } + var el = this.getTabEl(item); + var pos = this.getScrollPos(), area = this.getScrollArea(); + var left = Ext.fly(el).getOffsetsTo(this.stripWrap)[0] + pos; + var right = left + el.offsetWidth; + if(left < pos){ + this.scrollTo(left, animate); + }else if(right > (pos + area)){ + this.scrollTo(right - area, animate); + } + }, + + // private + scrollTo : function(pos, animate){ + this.stripWrap.scrollTo('left', pos, animate ? this.getScrollAnim() : false); + if(!animate){ + this.updateScrollButtons(); + } + }, + + onWheel : function(e){ + var d = e.getWheelDelta()*this.wheelIncrement*-1; + e.stopEvent(); + + var pos = this.getScrollPos(); + var newpos = pos + d; + var sw = this.getScrollWidth()-this.getScrollArea(); + + var s = Math.max(0, Math.min(sw, newpos)); + if(s != pos){ + this.scrollTo(s, false); + } + }, + + // private + onScrollRight : function(){ + var sw = this.getScrollWidth()-this.getScrollArea(); + var pos = this.getScrollPos(); + var s = Math.min(sw, pos + this.getScrollIncrement()); + if(s != pos){ + this.scrollTo(s, this.animScroll); + } + }, + + // private + onScrollLeft : function(){ + var pos = this.getScrollPos(); + var s = Math.max(0, pos - this.getScrollIncrement()); + if(s != pos){ + this.scrollTo(s, this.animScroll); + } + }, + + // private + 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'); + } + + /** + * @cfg {Boolean} collapsible + * @hide + */ + /** + * @cfg {String} header + * @hide + */ + /** + * @cfg {Boolean} headerAsText + * @hide + */ + /** + * @property header + * @hide + */ +}); +Ext.reg('tabpanel', Ext.TabPanel); + +/** + * Sets the specified tab as the active tab. This method fires the {@link #beforetabchange} event which + * can return false to cancel the tab change. + * @param {String/Panel} tab The id or tab Panel to activate + * @method activate + */ +Ext.TabPanel.prototype.activate = Ext.TabPanel.prototype.setActiveTab; + +// private utility class used by TabPanel +Ext.TabPanel.AccessStack = function(){ + var items = []; + return { + add : function(item){ + items.push(item); + if(items.length > 10){ + items.shift(); + } + }, + + remove : function(item){ + var s = []; + for(var i = 0, len = items.length; i < len; i++) { + if(items[i] != item){ + s.push(items[i]); + } + } + items = s; + }, + + next : function(){ + return items.pop(); + } + }; +}; + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Toolbar.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Toolbar.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Toolbar.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,532 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Toolbar + * @extends Ext.BoxComponent + * Basic Toolbar class. + * @constructor + * Creates a new Toolbar + * @param {Object/Array} config A config object or an array of buttons to add + */ + Ext.Toolbar = function(config){ + if(config instanceof Array){ + config = {buttons:config}; + } + Ext.Toolbar.superclass.constructor.call(this, config); +}; + +(function(){ + +var T = Ext.Toolbar; + +Ext.extend(T, Ext.BoxComponent, { + + trackMenus : true, + + // private + initComponent : function(){ + T.superclass.initComponent.call(this); + + if(this.items){ + this.buttons = this.items; + } + this.items = new Ext.util.MixedCollection(false, function(o){ + return o.itemId || o.id || Ext.id(); + }); + }, + + // private + autoCreate: { + cls:'x-toolbar x-small-editor', + html:'
        ' + }, + + // private + onRender : function(ct, position){ + this.el = ct.createChild(this.autoCreate, position); + this.tr = this.el.child("tr", true); + }, + + // private + afterRender : function(){ + T.superclass.afterRender.call(this); + if(this.buttons){ + this.add.apply(this, this.buttons); + delete this.buttons; + } + }, + + /** + * Adds element(s) to the toolbar -- this function takes a variable number of + * arguments of mixed type and adds them to the toolbar. + * @param {Mixed} arg1 The following types of arguments are all valid:
        + *
          + *
        • {@link Ext.Toolbar.Button} config: A valid button config object (equivalent to {@link #addButton})
        • + *
        • HtmlElement: Any standard HTML element (equivalent to {@link #addElement})
        • + *
        • Field: Any form field (equivalent to {@link #addField})
        • + *
        • Item: Any subclass of {@link Ext.Toolbar.Item} (equivalent to {@link #addItem})
        • + *
        • String: Any generic string (gets wrapped in a {@link Ext.Toolbar.TextItem}, equivalent to {@link #addText}). + * Note that there are a few special strings that are treated differently as explained next.
        • + *
        • 'separator' or '-': Creates a separator element (equivalent to {@link #addSeparator})
        • + *
        • ' ': Creates a spacer element (equivalent to {@link #addSpacer})
        • + *
        • '->': Creates a fill element (equivalent to {@link #addFill})
        • + *
        + * @param {Mixed} arg2 + * @param {Mixed} etc. + */ + add : function(){ + var a = arguments, l = a.length; + for(var i = 0; i < l; i++){ + var el = a[i]; + if(el.isFormField){ // some kind of form field + this.addField(el); + }else if(el.render){ // some kind of Toolbar.Item + this.addItem(el); + }else if(typeof el == "string"){ // string + if(el == "separator" || el == "-"){ + this.addSeparator(); + }else if(el == " "){ + this.addSpacer(); + }else if(el == "->"){ + this.addFill(); + }else{ + this.addText(el); + } + }else if(el.tagName){ // element + this.addElement(el); + }else if(typeof el == "object"){ // must be button config? + if(el.xtype){ + this.addField(Ext.ComponentMgr.create(el, 'button')); + }else{ + this.addButton(el); + } + } + } + }, + + /** + * Adds a separator + * @return {Ext.Toolbar.Item} The separator item + */ + addSeparator : function(){ + return this.addItem(new T.Separator()); + }, + + /** + * Adds a spacer element + * @return {Ext.Toolbar.Spacer} The spacer item + */ + addSpacer : function(){ + return this.addItem(new T.Spacer()); + }, + + /** + * Adds a fill element that forces subsequent additions to the right side of the toolbar + * @return {Ext.Toolbar.Fill} The fill item + */ + addFill : function(){ + return this.addItem(new T.Fill()); + }, + + /** + * Adds any standard HTML element to the toolbar + * @param {Mixed} el The element or id of the element to add + * @return {Ext.Toolbar.Item} The element's item + */ + addElement : function(el){ + return this.addItem(new T.Item(el)); + }, + + /** + * Adds any Toolbar.Item or subclass + * @param {Ext.Toolbar.Item} item + * @return {Ext.Toolbar.Item} The item + */ + addItem : function(item){ + var td = this.nextBlock(); + this.initMenuTracking(item); + item.render(td); + this.items.add(item); + return item; + }, + + /** + * Adds a button (or buttons). See {@link Ext.Toolbar.Button} for more info on the config. + * @param {Object/Array} config A button config or array of configs + * @return {Ext.Toolbar.Button/Array} + */ + addButton : function(config){ + if(config instanceof Array){ + var buttons = []; + for(var i = 0, len = config.length; i < len; i++) { + buttons.push(this.addButton(config[i])); + } + return buttons; + } + var b = config; + if(!(config instanceof T.Button)){ + b = config.split ? + new T.SplitButton(config) : + new T.Button(config); + } + var td = this.nextBlock(); + this.initMenuTracking(b); + b.render(td); + this.items.add(b); + return b; + }, + + // private + initMenuTracking : function(item){ + if(this.trackMenus && item.menu){ + item.on({ + 'menutriggerover' : this.onButtonTriggerOver, + 'menushow' : this.onButtonMenuShow, + 'menuhide' : this.onButtonMenuHide, + scope: this + }) + } + }, + + /** + * Adds text to the toolbar + * @param {String} text The text to add + * @return {Ext.Toolbar.Item} The element's item + */ + addText : function(text){ + return this.addItem(new T.TextItem(text)); + }, + + /** + * Inserts any {@link Ext.Toolbar.Item}/{@link Ext.Toolbar.Button} at the specified index. + * @param {Number} index The index where the item is to be inserted + * @param {Object/Ext.Toolbar.Item/Ext.Toolbar.Button/Array} item The button, or button config object to be + * inserted, or an array of buttons/configs. + * @return {Ext.Toolbar.Button/Item} + */ + insertButton : function(index, item){ + if(item instanceof Array){ + var buttons = []; + for(var i = 0, len = item.length; i < len; i++) { + buttons.push(this.insertButton(index + i, item[i])); + } + return buttons; + } + if (!(item instanceof T.Button)){ + item = new T.Button(item); + } + var td = document.createElement("td"); + this.tr.insertBefore(td, this.tr.childNodes[index]); + this.initMenuTracking(item); + item.render(td); + this.items.insert(index, item); + return item; + }, + + /** + * Adds a new element to the toolbar from the passed {@link Ext.DomHelper} config + * @param {Object} config + * @return {Ext.Toolbar.Item} The element's item + */ + addDom : function(config, returnEl){ + var td = this.nextBlock(); + Ext.DomHelper.overwrite(td, config); + var ti = new T.Item(td.firstChild); + ti.render(td); + this.items.add(ti); + return ti; + }, + + /** + * Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have + * been rendered yet. For a field that has already been rendered, use {@link #addElement}. + * @param {Ext.form.Field} field + * @return {Ext.ToolbarItem} + */ + addField : function(field){ + var td = this.nextBlock(); + field.render(td); + var ti = new T.Item(td.firstChild); + ti.render(td); + this.items.add(ti); + return ti; + }, + + // private + nextBlock : function(){ + var td = document.createElement("td"); + this.tr.appendChild(td); + return td; + }, + + // private + onDestroy : function(){ + Ext.Toolbar.superclass.onDestroy.call(this); + if(this.rendered){ + if(this.items){ // rendered? + Ext.destroy.apply(Ext, this.items.items); + } + Ext.Element.uncache(this.tr); + } + }, + + // private + onDisable : function(){ + this.items.each(function(item){ + if(item.disable){ + item.disable(); + } + }); + }, + + // private + onEnable : function(){ + this.items.each(function(item){ + if(item.enable){ + item.enable(); + } + }); + }, + + // private + onButtonTriggerOver : function(btn){ + if(this.activeMenuBtn && this.activeMenuBtn != btn){ + this.activeMenuBtn.hideMenu(); + btn.showMenu(); + this.activeMenuBtn = btn; + } + }, + + // private + onButtonMenuShow : function(btn){ + this.activeMenuBtn = btn; + }, + + // private + onButtonMenuHide : function(btn){ + delete this.activeMenuBtn; + } +}); +Ext.reg('toolbar', Ext.Toolbar); + +/** + * @class Ext.Toolbar.Item + * The base class that other classes should extend in order to get some basic common toolbar item functionality. + * @constructor + * Creates a new Item + * @param {HTMLElement} el + */ +T.Item = function(el){ + this.el = Ext.getDom(el); + this.id = Ext.id(this.el); + this.hidden = false; +}; + +T.Item.prototype = { + + /** + * Get this item's HTML Element + * @return {HTMLElement} + */ + getEl : function(){ + return this.el; + }, + + // private + render : function(td){ + this.td = td; + td.appendChild(this.el); + }, + + /** + * Removes and destroys this item. + */ + destroy : function(){ + if(this.td && this.td.parentNode){ + this.td.parentNode.removeChild(this.td); + } + }, + + /** + * Shows this item. + */ + show: function(){ + this.hidden = false; + this.td.style.display = ""; + }, + + /** + * Hides this item. + */ + hide: function(){ + this.hidden = true; + this.td.style.display = "none"; + }, + + /** + * Convenience function for boolean show/hide. + * @param {Boolean} visible true to show/false to hide + */ + setVisible: function(visible){ + if(visible) { + this.show(); + }else{ + this.hide(); + } + }, + + /** + * Try to focus this item + */ + focus : function(){ + Ext.fly(this.el).focus(); + }, + + /** + * Disables this item. + */ + disable : function(){ + Ext.fly(this.td).addClass("x-item-disabled"); + this.disabled = true; + this.el.disabled = true; + }, + + /** + * Enables this item. + */ + enable : function(){ + Ext.fly(this.td).removeClass("x-item-disabled"); + this.disabled = false; + this.el.disabled = false; + } +}; +Ext.reg('tbitem', T.Item); + + +/** + * @class Ext.Toolbar.Separator + * @extends Ext.Toolbar.Item + * A simple toolbar separator class + * @constructor + * Creates a new Separator + */ +T.Separator = function(){ + var s = document.createElement("span"); + s.className = "ytb-sep"; + T.Separator.superclass.constructor.call(this, s); +}; +Ext.extend(T.Separator, T.Item, { + enable:Ext.emptyFn, + disable:Ext.emptyFn, + focus:Ext.emptyFn +}); +Ext.reg('tbseparator', T.Separator); + +/** + * @class Ext.Toolbar.Spacer + * @extends Ext.Toolbar.Item + * A simple element that adds extra horizontal space to a toolbar. + * @constructor + * Creates a new Spacer + */ +T.Spacer = function(){ + var s = document.createElement("div"); + s.className = "ytb-spacer"; + T.Spacer.superclass.constructor.call(this, s); +}; +Ext.extend(T.Spacer, T.Item, { + enable:Ext.emptyFn, + disable:Ext.emptyFn, + focus:Ext.emptyFn +}); + +Ext.reg('tbspacer', T.Spacer); + +/** + * @class Ext.Toolbar.Fill + * @extends Ext.Toolbar.Spacer + * A simple element that adds a greedy (100% width) horizontal space to a toolbar. + * @constructor + * Creates a new Spacer + */ +T.Fill = Ext.extend(T.Spacer, { + // private + render : function(td){ + td.style.width = '100%'; + T.Fill.superclass.render.call(this, td); + } +}); +Ext.reg('tbfill', T.Fill); + +/** + * @class Ext.Toolbar.TextItem + * @extends Ext.Toolbar.Item + * A simple class that renders text directly into a toolbar. + * @constructor + * Creates a new TextItem + * @param {String} text + */ +T.TextItem = function(text){ + var s = document.createElement("span"); + s.className = "ytb-text"; + s.innerHTML = text; + T.TextItem.superclass.constructor.call(this, s); +}; +Ext.extend(T.TextItem, T.Item, { + enable:Ext.emptyFn, + disable:Ext.emptyFn, + focus:Ext.emptyFn +}); +Ext.reg('tbtext', T.TextItem); + + +/** + * @class Ext.Toolbar.Button + * @extends Ext.Button + * A button that renders into a toolbar. + * @constructor + * Creates a new Button + * @param {Object} config A standard {@link Ext.Button} config object + */ +T.Button = Ext.extend(Ext.Button, { + hideParent : true, + + onDestroy : function(){ + T.Button.superclass.onDestroy.call(this); + if(this.container){ + this.container.remove(); + } + } +}); +Ext.reg('tbbutton', T.Button); + +/** + * @class Ext.Toolbar.SplitButton + * @extends Ext.SplitButton + * A menu button that renders into a toolbar. + * @constructor + * Creates a new SplitButton + * @param {Object} config A standard {@link Ext.SplitButton} config object + */ +T.SplitButton = Ext.extend(Ext.SplitButton, { + hideParent : true, + + onDestroy : function(){ + T.SplitButton.superclass.onDestroy.call(this); + if(this.container){ + this.container.remove(); + } + } +}); + +Ext.reg('tbsplit', T.SplitButton); +// backwards compat +T.MenuButton = T.SplitButton; + +})(); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Viewport.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Viewport.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Viewport.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,140 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Viewport + * @extends Ext.Container + * A specialized container representing the viewable application area (the browser viewport). + *

        The Viewport renders itself to the document body, and automatically sizes itself to the size of + * the browser viewport and manages window resizing. There may only be one Viewport created + * in a page. Inner layouts are available by virtue of the fact that all {@link Ext.Panel Panel}s + * added to the Viewport, either through its {@link #items}, or through the items, or the {@link #add} + * method of any of its child Panels may themselves have a layout.

        + *

        The Viewport does not provide scrolling, so child Panels within the Viewport should provide + * for scrolling if needed using the {@link #autoScroll} config.

        + * Example showing a classic application border layout :
        
        +new Ext.Viewport({
        +    layout: 'border',
        +    defaults: {
        +        activeItem: 0,
        +    },
        +    items: [{
        +        region: 'north',
        +        html: '

        Page Title

        ', + autoHeight: true, + border: false, + margins: '0 0 5 0' + }, { + region: 'west', + collapsible: true, + title: 'Navigation', + xtype: 'treepanel', + width: 200, + autoScroll: true, + split: true, + loader: new Ext.tree.TreeLoader(), + root: new Ext.tree.AsyncTreeNode({ + expanded: true, + children: [{ + text: 'Menu Option 1', + leaf: true + }, { + text: 'Menu Option 2', + leaf: true + }, { + text: 'Menu Option 3', + leaf: true + }] + }), + rootVisible: false, + listeners: { + click: function(n) { + Ext.Msg.alert('Navigation Tree Click', 'You clicked: "' + n.attributes.text + '"'); + } + } + }, { + region: 'center', + xtype: 'tabpanel', + items: { + title: 'Default Tab', + html: 'The first tab\'s content. Others may be added dynamically' + } + }, { + region: 'south', + title: 'Information', + collapsible: true, + html: 'Information goes here', + split: true, + height: 100, + minHeight: 100 + }] +}); +
        + * @constructor + * Create a new Viewport + * @param {Object} config The config object + */ +Ext.Viewport = Ext.extend(Ext.Container, { + /* + * Privatize config options which, if used, would interfere with the + * correct operation of the Viewport as the sole manager of the + * layout of the document body. + */ + /** + * @cfg {Mixed} applyTo @hide + */ + /** + * @cfg {Boolean} allowDomMove @hide + */ + /** + * @cfg {Boolean} hideParent @hide + */ + /** + * @cfg {Mixed} renderTo @hide + */ + /** + * @cfg {Boolean} hideParent @hide + */ + /** + * @cfg {Number} height @hide + */ + /** + * @cfg {Number} width @hide + */ + /** + * @cfg {Boolean} autoHeight @hide + */ + /** + * @cfg {Boolean} autoWidth @hide + */ + /** + * @cfg {Boolean} deferHeight @hide + */ + /** + * @cfg {Boolean} monitorResize @hide + */ + initComponent : function() { + Ext.Viewport.superclass.initComponent.call(this); + document.getElementsByTagName('html')[0].className += ' x-viewport'; + this.el = Ext.getBody(); + this.el.setHeight = Ext.emptyFn; + this.el.setWidth = Ext.emptyFn; + this.el.setSize = Ext.emptyFn; + this.el.dom.scroll = 'no'; + this.allowDomMove = false; + this.autoWidth = true; + this.autoHeight = true; + Ext.EventManager.onWindowResize(this.fireResize, this); + this.renderTo = this.el; + }, + + fireResize : function(w, h){ + this.fireEvent('resize', this, w, h, w, h); + } +}); +Ext.reg('viewport', Ext.Viewport); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Window.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Window.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/Window.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,830 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Window + * @extends Ext.Panel + * A specialized panel intended for use as an application window. Windows are floated and draggable by default, and + * also provide specific behavior like the ability to maximize and restore (with an event for minimizing, since the + * minimize behavior is application-specific). Windows can also be linked to a {@link Ext.WindowGroup} or managed + * by the {@link Ext.WindowManager} to provide grouping, activation, to front/back and other application-specific behavior. + * @constructor + * @param {Object} config The config object + */ +Ext.Window = Ext.extend(Ext.Panel, { + /** + * @cfg {Boolean} modal + * True to make the window modal and mask everything behind it when displayed, false to display it without + * restricting access to other UI elements (defaults to false). + */ + /** + * @cfg {String/Element} animateTarget + * Id or element from which the window should animate while opening (defaults to null with no animation). + */ + /** + * @cfg {String} resizeHandles + * A valid {@link Ext.Resizable} handles config string (defaults to 'all'). Only applies when resizable = true. + */ + /** + * @cfg {Ext.WindowGroup} manager + * A reference to the WindowGroup that should manage this window (defaults to {@link Ext.WindowMgr}). + */ + /** + * @cfg {String/Number/Button} defaultButton + * The id / index of a button or a button instance to focus when this window received the focus. + */ + /** + * @cfg {Function} onEsc + * Allows override of the built-in processing for the escape key. Default action + * is to close the Window (performing whatever action is specified in {@link #closeAction}. + * To prevent the Window closing when the escape key is pressed, specify this as + * Ext.emptyFn (See {@link Ext#emptyFn}). + */ + /** + * @cfg {String} baseCls + * The base CSS class to apply to this panel's element (defaults to 'x-window'). + */ + baseCls : 'x-window', + /** + * @cfg {Boolean} resizable + * True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true). + */ + resizable:true, + /** + * @cfg {Boolean} draggable + * True to allow the window to be dragged by the header bar, false to disable dragging (defaults to true). Note + * that by default the window will be centered in the viewport, so if dragging is disabled the window may need + * to be positioned programmatically after render (e.g., myWindow.setPosition(100, 100);). + */ + draggable:true, + /** + * @cfg {Boolean} closable + * True to display the 'close' tool button and allow the user to close the window, false to hide the button and + * disallow closing the window (default to true). + */ + closable : true, + /** + * @cfg {Boolean} constrain + * True to constrain the window to the viewport, false to allow it to fall outside of the viewport + * (defaults to false). Optionally the header only can be constrained using {@link #constrainHeader}. + */ + constrain:false, + /** + * @cfg {Boolean} constrainHeader + * True to constrain the window header to the viewport, allowing the window body to fall outside of the viewport, + * false to allow the header to fall outside the viewport (defaults to false). Optionally the entire window + * can be constrained using {@link #constrain}. + */ + constrainHeader:false, + /** + * @cfg {Boolean} plain + * True to render the window body with a transparent background so that it will blend into the framing + * elements, false to add a lighter background color to visually highlight the body element and separate it + * more distinctly from the surrounding frame (defaults to false). + */ + plain:false, + /** + * @cfg {Boolean} minimizable + * True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button + * and disallow minimizing the window (defaults to false). Note that this button provides no implementation -- + * the behavior of minimizing a window is implementation-specific, so the minimize event must be handled and a + * custom minimize behavior implemented for this option to be useful. + */ + minimizable : false, + /** + * @cfg {Boolean} maximizable + * True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button + * and disallow maximizing the window (defaults to false). Note that when a window is maximized, the tool button + * will automatically change to a 'restore' button with the appropriate behavior already built-in that will + * restore the window to its previous size. + */ + maximizable : false, + /** + * @cfg {Number} minHeight + * The minimum height in pixels allowed for this window (defaults to 100). Only applies when resizable = true. + */ + minHeight: 100, + /** + * @cfg {Number} minWidth + * The minimum width in pixels allowed for this window (defaults to 200). Only applies when resizable = true. + */ + minWidth: 200, + /** + * @cfg {Boolean} expandOnShow + * True to always expand the window when it is displayed, false to keep it in its current state (which may be + * collapsed) when displayed (defaults to true). + */ + expandOnShow: true, + /** + * @cfg {String} closeAction + * The action to take when the close button is clicked. The default action is 'close' which will actually remove + * the window from the DOM and destroy it. The other valid option is 'hide' which will simply hide the window + * by setting visibility to hidden and applying negative offsets, keeping the window available to be redisplayed + * via the {@link #show} method. + */ + closeAction: 'close', + + // inherited docs, same default + collapsible:false, + + // private + initHidden : true, + /** + * @cfg {Boolean} monitorResize @hide + * This is automatically managed based on the value of constrain and constrainToHeader + */ + monitorResize : true, + + // The following configs are set to provide the basic functionality of a window. + // Changing them would require additional code to handle correctly and should + // usually only be done in subclasses that can provide custom behavior. Changing them + // may have unexpected or undesirable results. + /** @cfg {String} elements @hide */ + elements: 'header,body', + /** @cfg {Boolean} frame @hide */ + frame:true, + /** @cfg {Boolean} floating @hide */ + floating:true, + + // private + initComponent : function(){ + Ext.Window.superclass.initComponent.call(this); + this.addEvents( + /** + * @event activate + * Fires after the window has been visually activated via {@link setActive}. + * @param {Ext.Window} this + */ + /** + * @event deactivate + * Fires after the window has been visually deactivated via {@link setActive}. + * @param {Ext.Window} this + */ + /** + * @event resize + * Fires after the window has been resized. + * @param {Ext.Window} this + * @param {Number} width The window's new width + * @param {Number} height The window's new height + */ + 'resize', + /** + * @event maximize + * Fires after the window has been maximized. + * @param {Ext.Window} this + */ + 'maximize', + /** + * @event minimize + * Fires after the window has been minimized. + * @param {Ext.Window} this + */ + 'minimize', + /** + * @event restore + * Fires after the window has been restored to its original size after being maximized. + * @param {Ext.Window} this + */ + 'restore' + ); + }, + + // private + getState : function(){ + return Ext.apply(Ext.Window.superclass.getState.call(this) || {}, this.getBox()); + }, + + // private + onRender : function(ct, position){ + Ext.Window.superclass.onRender.call(this, ct, position); + + if(this.plain){ + this.el.addClass('x-window-plain'); + } + + // this element allows the Window to be focused for keyboard events + this.focusEl = this.el.createChild({ + tag: "a", href:"#", cls:"x-dlg-focus", + tabIndex:"-1", html: " "}); + this.focusEl.swallowEvent('click', true); + + this.proxy = this.el.createProxy("x-window-proxy"); + this.proxy.enableDisplayMode('block'); + + if(this.modal){ + this.mask = this.container.createChild({cls:"ext-el-mask"}, this.el.dom); + this.mask.enableDisplayMode("block"); + this.mask.hide(); + } + }, + + // private + initEvents : function(){ + Ext.Window.superclass.initEvents.call(this); + if(this.animateTarget){ + this.setAnimateTarget(this.animateTarget); + } + + if(this.resizable){ + this.resizer = new Ext.Resizable(this.el, { + minWidth: this.minWidth, + minHeight:this.minHeight, + handles: this.resizeHandles || "all", + pinned: true, + resizeElement : this.resizerAction + }); + this.resizer.window = this; + this.resizer.on("beforeresize", this.beforeResize, this); + } + + if(this.draggable){ + this.header.addClass("x-window-draggable"); + } + this.initTools(); + + this.el.on("mousedown", this.toFront, this); + this.manager = this.manager || Ext.WindowMgr; + this.manager.register(this); + this.hidden = true; + if(this.maximized){ + this.maximized = false; + this.maximize(); + } + if(this.closable){ + var km = this.getKeyMap(); + km.on(27, this.onEsc, this); + km.disable(); + } + }, + + initDraggable : function(){ + this.dd = new Ext.Window.DD(this); + }, + + // private + onEsc : function(){ + this[this.closeAction](); + }, + + // private + beforeDestroy : function(){ + Ext.destroy( + this.resizer, + this.dd, + this.proxy + ); + Ext.Window.superclass.beforeDestroy.call(this); + }, + + // private + onDestroy : function(){ + if(this.manager){ + this.manager.unregister(this); + } + Ext.Window.superclass.onDestroy.call(this); + }, + + // private + initTools : function(){ + if(this.minimizable){ + this.addTool({ + id: 'minimize', + handler: this.minimize.createDelegate(this, []) + }); + } + if(this.maximizable){ + this.addTool({ + id: 'maximize', + handler: this.maximize.createDelegate(this, []) + }); + this.addTool({ + id: 'restore', + handler: this.restore.createDelegate(this, []), + hidden:true + }); + this.header.on('dblclick', this.toggleMaximize, this); + } + if(this.closable){ + this.addTool({ + id: 'close', + handler: this[this.closeAction].createDelegate(this, []) + }); + } + }, + + // private + resizerAction : function(){ + var box = this.proxy.getBox(); + this.proxy.hide(); + this.window.handleResize(box); + return box; + }, + + // private + beforeResize : function(){ + this.resizer.minHeight = Math.max(this.minHeight, this.getFrameHeight() + 40); // 40 is a magic minimum content size? + this.resizer.minWidth = Math.max(this.minWidth, this.getFrameWidth() + 40); + this.resizeBox = this.el.getBox(); + }, + + // private + updateHandles : function(){ + if(Ext.isIE && this.resizer){ + this.resizer.syncHandleHeight(); + this.el.repaint(); + } + }, + + // private + handleResize : function(box){ + var rz = this.resizeBox; + if(rz.x != box.x || rz.y != box.y){ + this.updateBox(box); + }else{ + this.setSize(box); + } + this.focus(); + this.updateHandles(); + this.saveState(); + this.fireEvent("resize", this, box.width, box.height); + }, + + /** + * Focuses the window. If a defaultButton is set, it will receive focus, otherwise the + * window itself will receive focus. + */ + focus : function(){ + var f = this.focusEl, db = this.defaultButton, t = typeof db; + if(t != 'undefined'){ + if(t == 'number'){ + f = this.buttons[db]; + }else if(t == 'string'){ + f = Ext.getCmp(db); + }else{ + f = db; + } + } + f.focus.defer(10, f); + }, + + /** + * Sets the target element from which the window should animate while opening. + * @param {String/Element} el The target element or id + */ + setAnimateTarget : function(el){ + el = Ext.get(el); + this.animateTarget = el; + }, + + // private + beforeShow : function(){ + delete this.el.lastXY; + delete this.el.lastLT; + if(this.x === undefined || this.y === undefined){ + var xy = this.el.getAlignToXY(this.container, 'c-c'); + var pos = this.el.translatePoints(xy[0], xy[1]); + this.x = this.x === undefined? pos.left : this.x; + this.y = this.y === undefined? pos.top : this.y; + } + this.el.setLeftTop(this.x, this.y); + + if(this.expandOnShow){ + this.expand(false); + } + + if(this.modal){ + Ext.getBody().addClass("x-body-masked"); + this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + this.mask.show(); + } + }, + + /** + * Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden. + * @param {String/Element} animateTarget (optional) The target element or id from which the window should + * animate while opening (defaults to null with no animation) + * @param {Function} callback (optional) A callback function to call after the window is displayed + * @param {Object} scope (optional) The scope in which to execute the callback + */ + show : function(animateTarget, cb, scope){ + if(!this.rendered){ + this.render(Ext.getBody()); + } + if(this.hidden === false){ + this.toFront(); + return; + } + if(this.fireEvent("beforeshow", this) === false){ + return; + } + if(cb){ + this.on('show', cb, scope, {single:true}); + } + this.hidden = false; + if(animateTarget !== undefined){ + this.setAnimateTarget(animateTarget); + } + this.beforeShow(); + if(this.animateTarget){ + this.animShow(); + }else{ + this.afterShow(); + } + }, + + // private + afterShow : function(){ + this.proxy.hide(); + this.el.setStyle('display', 'block'); + this.el.show(); + if(this.maximized){ + this.fitContainer(); + } + + if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ + Ext.EventManager.onWindowResize(this.onWindowResize, this); + } + this.doConstrain(); + if(this.layout){ + this.doLayout(); + } + if(this.keyMap){ + this.keyMap.enable(); + } + this.toFront(); + this.updateHandles(); + this.fireEvent("show", this); + }, + + // private + animShow : function(){ + this.proxy.show(); + this.proxy.setBox(this.animateTarget.getBox()); + this.proxy.setOpacity(0); + var b = this.getBox(false); + b.callback = this.afterShow; + b.scope = this; + b.duration = .25; + b.easing = 'easeNone'; + b.opacity = .5; + b.block = true; + this.el.setStyle('display', 'none'); + this.proxy.shift(b); + }, + + /** + * Hides the window, setting it to invisible and applying negative offsets. + * @param {String/Element} animateTarget (optional) The target element or id to which the window should + * animate while hiding (defaults to null with no animation) + * @param {Function} callback (optional) A callback function to call after the window is hidden + * @param {Object} scope (optional) The scope in which to execute the callback + */ + hide : function(animateTarget, cb, scope){ + if(this.hidden || this.fireEvent("beforehide", this) === false){ + return; + } + if(cb){ + this.on('hide', cb, scope, {single:true}); + } + this.hidden = true; + if(animateTarget !== undefined){ + this.setAnimateTarget(animateTarget); + } + if(this.animateTarget){ + this.animHide(); + }else{ + this.el.hide(); + this.afterHide(); + } + }, + + // private + afterHide : function(){ + this.proxy.hide(); + if(this.monitorResize || this.modal || this.constrain || this.constrainHeader){ + Ext.EventManager.removeResizeListener(this.onWindowResize, this); + } + if(this.modal){ + this.mask.hide(); + Ext.getBody().removeClass("x-body-masked"); + } + if(this.keyMap){ + this.keyMap.disable(); + } + this.fireEvent("hide", this); + }, + + // private + animHide : function(){ + this.proxy.setOpacity(.5); + this.proxy.show(); + var tb = this.getBox(false); + this.proxy.setBox(tb); + this.el.hide(); + var b = this.animateTarget.getBox(); + b.callback = this.afterHide; + b.scope = this; + b.duration = .25; + b.easing = 'easeNone'; + b.block = true; + b.opacity = 0; + this.proxy.shift(b); + }, + + // private + onWindowResize : function(){ + if(this.maximized){ + this.fitContainer(); + } + if(this.modal){ + this.mask.setSize('100%', '100%'); + var force = this.mask.dom.offsetHeight; + this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true)); + } + this.doConstrain(); + }, + + // private + doConstrain : function(){ + if(this.constrain || this.constrainHeader){ + var offsets; + if(this.constrain){ + offsets = { + right:this.el.shadowOffset, + left:this.el.shadowOffset, + bottom:this.el.shadowOffset + }; + }else { + var s = this.getSize(); + offsets = { + right:-(s.width - 100), + bottom:-(s.height - 25) + }; + } + + var xy = this.el.getConstrainToXY(this.container, true, offsets); + if(xy){ + this.setPosition(xy[0], xy[1]); + } + } + }, + + // private - used for dragging + ghost : function(cls){ + var ghost = this.createGhost(cls); + var box = this.getBox(true); + ghost.setLeftTop(box.x, box.y); + ghost.setWidth(box.width); + this.el.hide(); + this.activeGhost = ghost; + return ghost; + }, + + // private + unghost : function(show, matchPosition){ + if(show !== false){ + this.el.show(); + this.focus(); + } + if(matchPosition !== false){ + this.setPosition(this.activeGhost.getLeft(true), this.activeGhost.getTop(true)); + } + this.activeGhost.hide(); + this.activeGhost.remove(); + delete this.activeGhost; + }, + + /** + * Placeholder method for minimizing the window. By default, this method simply fires the minimize event + * since the behavior of minimizing a window is application-specific. To implement custom minimize behavior, + * either the minimize event can be handled or this method can be overridden. + */ + minimize : function(){ + this.fireEvent('minimize', this); + }, + + /** + * Closes the window, removes it from the DOM and destroys the window object. The beforeclose event is fired + * before the close happens and will cancel the close action if it returns false. + */ + close : function(){ + if(this.fireEvent("beforeclose", this) !== false){ + this.hide(null, function(){ + this.fireEvent('close', this); + this.destroy(); + }, this); + } + }, + + /** + * Fits the window within its current container and automatically replaces the 'maximize' tool button with + * the 'restore' tool button. + */ + maximize : function(){ + if(!this.maximized){ + this.expand(false); + this.restoreSize = this.getSize(); + this.restorePos = this.getPosition(true); + this.tools.maximize.hide(); + this.tools.restore.show(); + this.maximized = true; + this.el.disableShadow(); + + if(this.dd){ + this.dd.lock(); + } + if(this.collapsible){ + this.tools.toggle.hide(); + } + this.el.addClass('x-window-maximized'); + this.container.addClass('x-window-maximized-ct'); + + this.setPosition(0, 0); + this.fitContainer(); + this.fireEvent('maximize', this); + } + }, + + /** + * Restores a maximized window back to its original size and position prior to being maximized and also replaces + * the 'restore' tool button with the 'maximize' tool button. + */ + restore : function(){ + if(this.maximized){ + this.el.removeClass('x-window-maximized'); + this.tools.restore.hide(); + this.tools.maximize.show(); + this.setPosition(this.restorePos[0], this.restorePos[1]); + this.setSize(this.restoreSize.width, this.restoreSize.height); + delete this.restorePos; + delete this.restoreSize; + this.maximized = false; + this.el.enableShadow(true); + + if(this.dd){ + this.dd.unlock(); + } + if(this.collapsible){ + this.tools.toggle.show(); + } + this.container.removeClass('x-window-maximized-ct'); + + this.doConstrain(); + this.fireEvent('restore', this); + } + }, + + /** + * A shortcut method for toggling between {@link #maximize} and {@link #restore} based on the current maximized + * state of the window. + */ + toggleMaximize : function(){ + this[this.maximized ? 'restore' : 'maximize'](); + }, + + // private + fitContainer : function(){ + var vs = this.container.getViewSize(); + this.setSize(vs.width, vs.height); + }, + + // private + // z-index is managed by the WindowManager and may be overwritten at any time + setZIndex : function(index){ + if(this.modal){ + this.mask.setStyle("z-index", index); + } + this.el.setZIndex(++index); + index += 5; + + if(this.resizer){ + this.resizer.proxy.setStyle("z-index", ++index); + } + + this.lastZIndex = index; + }, + + /** + * Aligns the window to the specified element + * @param {Mixed} element The element to align to. + * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details). + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @return {Ext.Window} this + */ + alignTo : function(element, position, offsets){ + var xy = this.el.getAlignToXY(element, position, offsets); + this.setPagePosition(xy[0], xy[1]); + return this; + }, + + /** + * Anchors this window to another element and realigns it when the window is resized or scrolled. + * @param {Mixed} element The element to align to. + * @param {String} position The position to align to (see {@link Ext.Element#alignTo} for more details) + * @param {Array} offsets (optional) Offset the positioning by [x, y] + * @param {Boolean/Number} monitorScroll (optional) true to monitor body scroll and reposition. If this parameter + * is a number, it is used as the buffer delay (defaults to 50ms). + * @return {Ext.Window} this + */ + anchorTo : function(el, alignment, offsets, monitorScroll, _pname){ + var action = function(){ + this.alignTo(el, alignment, offsets); + }; + Ext.EventManager.onWindowResize(action, this); + var tm = typeof monitorScroll; + if(tm != 'undefined'){ + Ext.EventManager.on(window, 'scroll', action, this, + {buffer: tm == 'number' ? monitorScroll : 50}); + } + action.call(this); + this[_pname] = action; + return this; + }, + + /** + * Brings this window to the front of any other visible windows + * @return {Ext.Window} this + */ + toFront : function(){ + if(this.manager.bringToFront(this)){ + this.focus(); + } + return this; + }, + + /** + * Makes this the active window by showing its shadow, or deactivates it by hiding its shadow. This method also + * fires the activate or deactivate event depending on which action occurred. + * @param {Boolean} active True to activate the window, false to deactivate it (defaults to false) + */ + setActive : function(active){ + if(active){ + if(!this.maximized){ + this.el.enableShadow(true); + } + this.fireEvent('activate', this); + }else{ + this.el.disableShadow(); + this.fireEvent('deactivate', this); + } + }, + + /** + * Sends this window to the back of (lower z-index than) any other visible windows + * @return {Ext.Window} this + */ + toBack : function(){ + this.manager.sendToBack(this); + return this; + }, + + /** + * Centers this window in the viewport + * @return {Ext.Window} 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); + +// private - custom Window DD implementation +Ext.Window.DD = 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; +}; + +Ext.extend(Ext.Window.DD, Ext.dd.DD, { + moveOnly:true, + headerOffsets:[100, 25], + startDrag : function(){ + var w = this.win; + this.proxy = w.ghost(); + if(w.constrain !== false){ + var so = w.el.shadowOffset; + this.constrainTo(w.container, {right: so, left: so, bottom: so}); + }else if(w.constrainHeader !== false){ + var s = this.proxy.getSize(); + this.constrainTo(w.container, {right: -(s.width-this.headerOffsets[0]), bottom: -(s.height-this.headerOffsets[1])}); + } + }, + b4Drag : Ext.emptyFn, + + onDrag : function(e){ + this.alignElWithMouse(this.proxy, e.getPageX(), e.getPageY()); + }, + + endDrag : function(e){ + this.win.unghost(); + this.win.saveState(); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/WindowManager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/WindowManager.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/WindowManager.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,189 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.WindowGroup + * An object that represents a group of {@link Ext.Window} instances and provides z-order management + * and window activation behavior. + * @constructor + */ +Ext.WindowGroup = function(){ + var list = {}; + var accessList = []; + var front = null; + + // private + var sortWindows = function(d1, d2){ + return (!d1._lastAccess || d1._lastAccess < d2._lastAccess) ? -1 : 1; + }; + + // private + var orderWindows = function(){ + var a = accessList, len = a.length; + if(len > 0){ + a.sort(sortWindows); + var seed = a[0].manager.zseed; + for(var i = 0; i < len; i++){ + var win = a[i]; + if(win && !win.hidden){ + win.setZIndex(seed + (i*10)); + } + } + } + activateLast(); + }; + + // private + var setActiveWin = function(win){ + if(win != front){ + if(front){ + front.setActive(false); + } + front = win; + if(win){ + win.setActive(true); + } + } + }; + + // private + var activateLast = function(){ + for(var i = accessList.length-1; i >=0; --i) { + if(!accessList[i].hidden){ + setActiveWin(accessList[i]); + return; + } + } + // none to activate + setActiveWin(null); + }; + + return { + /** + * The starting z-index for windows (defaults to 9000) + * @type Number The z-index value + */ + zseed : 9000, + + // private + register : function(win){ + list[win.id] = win; + accessList.push(win); + win.on('hide', activateLast); + }, + + // private + unregister : function(win){ + delete list[win.id]; + win.un('hide', activateLast); + accessList.remove(win); + }, + + /** + * Gets a registered window by id. + * @param {String/Object} id The id of the window or a {@link Ext.Window} instance + * @return {Ext.Window} + */ + get : function(id){ + return typeof id == "object" ? id : list[id]; + }, + + /** + * Brings the specified window to the front of any other active windows. + * @param {String/Object} win The id of the window or a {@link Ext.Window} instance + * @return {Boolean} True if the dialog was brought to the front, else false + * if it was already in front + */ + bringToFront : function(win){ + win = this.get(win); + if(win != front){ + win._lastAccess = new Date().getTime(); + orderWindows(); + return true; + } + return false; + }, + + /** + * Sends the specified window to the back of other active windows. + * @param {String/Object} win The id of the window or a {@link Ext.Window} instance + * @return {Ext.Window} The window + */ + sendToBack : function(win){ + win = this.get(win); + win._lastAccess = -(new Date().getTime()); + orderWindows(); + return win; + }, + + /** + * Hides all windows in the group. + */ + hideAll : function(){ + for(var id in list){ + if(list[id] && typeof list[id] != "function" && list[id].isVisible()){ + list[id].hide(); + } + } + }, + + /** + * Gets the currently-active window in the group. + * @return {Ext.Window} The active window + */ + getActive : function(){ + return front; + }, + + /** + * Returns zero or more windows in the group using the custom search function passed to this method. + * The function should accept a single {@link Ext.Window} reference as its only argument and should + * return true if the window matches the search criteria, otherwise it should return false. + * @param {Function} fn The search function + * @param {Object} scope (optional) The scope in which to execute the function (defaults to the window + * that gets passed to the function if not specified) + * @return {Array} An array of zero or more matching windows + */ + getBy : function(fn, scope){ + var r = []; + for(var i = accessList.length-1; i >=0; --i) { + var win = accessList[i]; + if(fn.call(scope||win, win) !== false){ + r.push(win); + } + } + return r; + }, + + /** + * Executes the specified function once for every window in the group, passing each + * window as the only parameter. Returning false from the function will stop the iteration. + * @param {Function} fn The function to execute for each item + * @param {Object} scope (optional) The scope in which to execute the function + */ + each : function(fn, scope){ + for(var id in list){ + if(list[id] && typeof list[id] != "function"){ + if(fn.call(scope || list[id], list[id]) === false){ + return; + } + } + } + } + }; +}; + + +/** + * @class Ext.WindowMgr + * @extends Ext.WindowGroup + * The default global window group that is available automatically. To have more than one group of windows + * with separate z-order stacks, create additional instances of {@link Ext.WindowGroup} as needed. + * @singleton + */ +Ext.WindowMgr = new Ext.WindowGroup(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Action.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Action.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Action.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,379 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.Action + * The subclasses of this class provide actions to perform upon {@link Ext.form.BasicForm Form}s. + *

        + * Instances of this class are only created by a {@link Ext.form.BasicForm Form} when + * the Form needs to perform an action such as submit or load. The Configuration options + * listed for this class are set through the Form's action methods: {@link Ext.form.BasicForm#submit submit}, + * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}. + *

        + * The instance of Action which performed the action is passed to the success + * and failure callbacks of the Form's action methods ({@link Ext.form.BasicForm#submit submit}, + * {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}), + * and to the {@link Ext.form.BasicForm#actioncomplete actioncomplete} and + * {@link Ext.form.BasicForm#actionfailed actionfailed} event handlers. + */ +Ext.form.Action = function(form, options){ + this.form = form; + this.options = options || {}; +}; + +/** + * Failure type returned when client side validation of the Form fails + * thus aborting a submit action. + * @type {String} + * @static + */ +Ext.form.Action.CLIENT_INVALID = 'client'; +/** + * Failure type returned when server side validation of the Form fails + * indicating that field-specific error messages have been returned in the + * response's errors property. + * @type {String} + * @static + */ +Ext.form.Action.SERVER_INVALID = 'server'; +/** + * Failure type returned when a communication error happens when attempting + * to send a request to the remote server. + * @type {String} + * @static + */ +Ext.form.Action.CONNECT_FAILURE = 'connect'; +/** + * Failure type returned when no field values are returned in the response's + * data property. + * @type {String} + * @static + */ +Ext.form.Action.LOAD_FAILURE = 'load'; + +Ext.form.Action.prototype = { +/** + * @cfg {String} url The URL that the Action is to invoke. + */ +/** + * @cfg {String} method The HTTP method to use to access the requested URL. Defaults to the + * {@link Ext.form.BasicForm}'s method, or if that is not specified, the underlying DOM form's method. + */ +/** + * @cfg {Mixed} params Extra parameter values to pass. These are added to the Form's + * {@link Ext.form.BasicForm#baseParams} and passed to the specified URL along with the Form's + * input fields. + */ +/** + * @cfg {Function} success The function to call when a valid success return packet is recieved. + * The function is passed the following parameters:
          + *
        • form : Ext.form.BasicForm
          The form that requested the action
        • + *
        • action : Ext.form.Action
          The Action class. The {@link #result} + * property of this object may be examined to perform custom postprocessing.
        • + *
        + */ +/** + * @cfg {Function} failure The function to call when a failure packet was recieved, or when an + * error ocurred in the Ajax communication. + * The function is passed the following parameters:
          + *
        • form : Ext.form.BasicForm
          The form that requested the action
        • + *
        • action : Ext.form.Action
          The Action class. If an Ajax + * error ocurred, the failure type will be in {@link #failureType}. The {@link #result} + * property of this object may be examined to perform custom postprocessing.
        • + *
        +*/ +/** + * @cfg {Object} scope The scope in which to call the callback functions (The this reference + * for the callback functions). + */ +/** + * @cfg {String} waitMsg The message to be displayed by a call to {@link Ext.MessageBox#wait} + * during the time the action is being processed. + */ +/** + * @cfg {String} waitTitle The title to be displayed by a call to {@link Ext.MessageBox#wait} + * during the time the action is being processed. + */ + +/** + * The type of action this Action instance performs. + * Currently only "submit" and "load" are supported. + * @type {String} + */ + type : 'default', +/** + * The type of failure detected. See {@link #Ext.form.Action-Action.CLIENT_INVALID CLIENT_INVALID}, {@link #Ext.form.Action-Action.SERVER_INVALID SERVER_INVALID}, + * {@link #Ext.form.Action-Action.CONNECT_FAILURE CONNECT_FAILURE}, {@link #Ext.form.Action-Action.LOAD_FAILURE LOAD_FAILURE} + * @property failureType + * @type {String} + *//** + * The XMLHttpRequest object used to perform the action. + * @property response + * @type {Object} + *//** + * The decoded response object containing a boolean success property and + * other, action-specific properties. + * @property result + * @type {Object} + */ + + // interface method + run : function(options){ + + }, + + // interface method + success : function(response){ + + }, + + // interface method + handleResponse : function(response){ + + }, + + // default connection failure + failure : function(response){ + this.response = response; + this.failureType = Ext.form.Action.CONNECT_FAILURE; + this.form.afterAction(this, false); + }, + + // private + processResponse : function(response){ + this.response = response; + if(!response.responseText){ + return true; + } + this.result = this.handleResponse(response); + return this.result; + }, + + // utility functions used internally + getUrl : function(appendParams){ + var url = this.options.url || this.form.url || this.form.el.dom.action; + if(appendParams){ + var p = this.getParams(); + if(p){ + url += (url.indexOf('?') != -1 ? '&' : '?') + p; + } + } + return url; + }, + + // private + getMethod : function(){ + return (this.options.method || this.form.method || this.form.el.dom.method || 'POST').toUpperCase(); + }, + + // private + getParams : function(){ + var bp = this.form.baseParams; + var p = this.options.params; + if(p){ + if(typeof p == "object"){ + p = Ext.urlEncode(Ext.applyIf(p, bp)); + }else if(typeof p == 'string' && bp){ + p += '&' + Ext.urlEncode(bp); + } + }else if(bp){ + p = Ext.urlEncode(bp); + } + return p; + }, + + // private + createCallback : function(opts){ + var opts = opts || {}; + return { + success: this.success, + failure: this.failure, + scope: this, + timeout: (opts.timeout*1000) || (this.form.timeout*1000), + upload: this.form.fileUpload ? this.success : undefined + }; + } +}; + +/** + * @class Ext.form.Action.Submit + * @extends Ext.form.Action + * A class which handles submission of data from {@link Ext.form.BasicForm Form}s + * and processes the returned response. + *

        + * Instances of this class are only created by a {@link Ext.form.BasicForm Form} when + * submitting. + *

        + * A response packet must contain a boolean success property, and, optionally + * an errors property. The errors property contains error + * messages for invalid fields. + *

        + * By default, response packets are assumed to be JSON, so a typical response + * packet may look like this: + *

        
        +{
        +    success: false,
        +    errors: {
        +        clientCode: "Client not found",
        +        portOfLoading: "This field must not be null"
        +    }
        +}
        + *

        + * Other data may be placed into the response for processing the the {@link Ext.form.BasicForm}'s callback + * or event handler methods. The object decoded from this JSON is available in the {@link #result} property. + */ +Ext.form.Action.Submit = function(form, options){ + Ext.form.Action.Submit.superclass.constructor.call(this, form, options); +}; + +Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { + /** + * @cfg {boolean} clientValidation Determines whether a Form's fields are validated + * in a final call to {@link Ext.form.BasicForm#isValid isValid} prior to submission. + * Pass false in the Form's submit options to prevent this. If not defined, pre-submission field validation + * is performed. + */ + type : 'submit', + + // private + run : function(){ + var o = this.options; + var method = this.getMethod(); + var isPost = method == 'POST'; + if(o.clientValidation === false || this.form.isValid()){ + Ext.Ajax.request(Ext.apply(this.createCallback(o), { + form:this.form.el.dom, + url:this.getUrl(!isPost), + method: method, + params:isPost ? this.getParams() : null, + isUpload: this.form.fileUpload + })); + + }else if (o.clientValidation !== false){ // client validation failed + this.failureType = Ext.form.Action.CLIENT_INVALID; + this.form.afterAction(this, false); + } + }, + + // private + success : function(response){ + var result = this.processResponse(response); + if(result === true || result.success){ + this.form.afterAction(this, true); + return; + } + if(result.errors){ + this.form.markInvalid(result.errors); + this.failureType = Ext.form.Action.SERVER_INVALID; + } + this.form.afterAction(this, false); + }, + + // private + handleResponse : function(response){ + if(this.form.errorReader){ + var rs = this.form.errorReader.read(response); + var errors = []; + if(rs.records){ + for(var i = 0, len = rs.records.length; i < len; i++) { + var r = rs.records[i]; + errors[i] = r.data; + } + } + if(errors.length < 1){ + errors = null; + } + return { + success : rs.success, + errors : errors + }; + } + return Ext.decode(response.responseText); + } +}); + + +/** + * @class Ext.form.Action.Load + * @extends Ext.form.Action + * A class which handles loading of data from a server into the Fields of + * an {@link Ext.form.BasicForm}. + *

        + * Instances of this class are only created by a {@link Ext.form.BasicForm Form} when + * submitting. + *

        + * A response packet must contain a boolean success property, and + * a data property. The data property contains the + * values of Fields to load. The individual value object for each Field + * is passed to the Field's {@link Ext.form.Field#setValue setValue} method. + *

        + * By default, response packets are assumed to be JSON, so a typical response + * packet may look like this: + *

        
        +{
        +    success: true,
        +    data: {
        +        clientName: "Fred. Olsen Lines",
        +        portOfLoading: "FXT",
        +        portOfDischarge: "OSL"
        +    }
        +}
        + *

        + * Other data may be placed into the response for processing the the {@link Ext.form.BasicForm Form}'s callback + * or event handler methods. The object decoded from this JSON is available in the {@link #result} property. + */ +Ext.form.Action.Load = function(form, options){ + Ext.form.Action.Load.superclass.constructor.call(this, form, options); + this.reader = this.form.reader; +}; + +Ext.extend(Ext.form.Action.Load, Ext.form.Action, { + // private + type : 'load', + + // private + run : function(){ + Ext.Ajax.request(Ext.apply( + this.createCallback(this.options), { + method:this.getMethod(), + url:this.getUrl(false), + params:this.getParams() + })); + }, + + // private + success : function(response){ + var result = this.processResponse(response); + if(result === true || !result.success || !result.data){ + this.failureType = Ext.form.Action.LOAD_FAILURE; + this.form.afterAction(this, false); + return; + } + this.form.clearInvalid(); + this.form.setValues(result.data); + this.form.afterAction(this, true); + }, + + // private + handleResponse : function(response){ + if(this.form.reader){ + var rs = this.form.reader.read(response); + var data = rs.records && rs.records[0] ? rs.records[0].data : null; + return { + success : rs.success, + data : data + }; + } + return Ext.decode(response.responseText); + } +}); + +Ext.form.Action.ACTION_TYPES = { + 'load' : Ext.form.Action.Load, + 'submit' : Ext.form.Action.Submit +}; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/BasicForm.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/BasicForm.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/BasicForm.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,498 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.BasicForm + * @extends Ext.util.Observable + * Supplies the functionality to do "actions" on forms and initialize Ext.form.Field types on existing markup. + *

        + * By default, Ext Forms are submitted through Ajax, using {@link Ext.form.Action}. + * To enable normal browser submission of an Ext Form, override the Form's onSubmit, + * and submit methods:

        
        +    var myForm = new Ext.form.BasicForm("form-el-id", {
        +        onSubmit: Ext.emptyFn,
        +        submit: function() {
        +            this.getEl().dom.submit();
        +        }
        +    });

        + * @constructor + * @param {Mixed} el The form element or its id + * @param {Object} config Configuration options + */ +Ext.form.BasicForm = function(el, config){ + Ext.apply(this, config); + /* + * The Ext.form.Field items in this form. + * @type MixedCollection + */ + this.items = new Ext.util.MixedCollection(false, function(o){ + return o.id || (o.id = Ext.id()); + }); + this.addEvents( + /** + * @event beforeaction + * Fires before any action is performed. Return false to cancel the action. + * @param {Form} this + * @param {Action} action The {@link Ext.form.Action} to be performed + */ + 'beforeaction', + /** + * @event actionfailed + * Fires when an action fails. + * @param {Form} this + * @param {Action} action The {@link Ext.form.Action} that failed + */ + 'actionfailed', + /** + * @event actioncomplete + * Fires when an action is completed. + * @param {Form} this + * @param {Action} action The {@link Ext.form.Action} that completed + */ + 'actioncomplete' + ); + + if(el){ + this.initEl(el); + } + Ext.form.BasicForm.superclass.constructor.call(this); +}; + +Ext.extend(Ext.form.BasicForm, Ext.util.Observable, { + /** + * @cfg {String} method + * The request method to use (GET or POST) for form actions if one isn't supplied in the action options. + */ + /** + * @cfg {DataReader} reader + * An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to read data when executing "load" actions. + * This is optional as there is built-in support for processing JSON. + */ + /** + * @cfg {DataReader} errorReader + * An Ext.data.DataReader (e.g. {@link Ext.data.XmlReader}) to be used to read data when reading validation errors on "submit" actions. + * This is completely optional as there is built-in support for processing JSON. + */ + /** + * @cfg {String} url + * The URL to use for form actions if one isn't supplied in the action options. + */ + /** + * @cfg {Boolean} fileUpload + * Set to true if this form is a file upload. + */ + /** + * @cfg {Object} baseParams + * Parameters to pass with all requests. e.g. baseParams: {id: '123', foo: 'bar'}. + */ + /** + * @cfg {Number} timeout Timeout for form actions in seconds (default is 30 seconds). + */ + timeout: 30, + + // private + activeAction : null, + + /** + * @cfg {Boolean} trackResetOnLoad If set to true, form.reset() resets to the last loaded + * or setValues() data instead of when the form was first created. + */ + trackResetOnLoad : false, + + /** + * By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific + * element by passing it or its id or mask the form itself by passing in true. + * @type Mixed + * @property waitMsgTarget + */ + + // private + initEl : function(el){ + this.el = Ext.get(el); + this.id = this.el.id || Ext.id(); + this.el.on('submit', this.onSubmit, this); + this.el.addClass('x-form'); + }, + + /** + * Get the HTML form Element + * @return Ext.Element + */ + getEl: function(){ + return this.el; + }, + + // private + onSubmit : function(e){ + e.stopEvent(); + }, + + // private + destroy: function() { + this.items.each(function(f){ + Ext.destroy(f); + }); + this.el.removeAllListeners(); + this.el.remove(); + this.purgeListeners(); + }, + + /** + * Returns true if client-side validation on the form is successful. + * @return Boolean + */ + isValid : function(){ + var valid = true; + this.items.each(function(f){ + if(!f.validate()){ + valid = false; + } + }); + return valid; + }, + + /** + * Returns true if any fields in this form have changed since their original load. + * @return Boolean + */ + isDirty : function(){ + var dirty = false; + this.items.each(function(f){ + if(f.isDirty()){ + dirty = true; + return false; + } + }); + return dirty; + }, + + /** + * Performs a predefined action ({@link Ext.form.Action.Submit} or + * {@link Ext.form.Action.Load}) or a custom extension of {@link Ext.form.Action} + * to perform application-specific processing. + * @param {String/Object} actionName The name of the predefined action type, + * or instance of {@link Ext.form.Action} to perform. + * @param {Object} options (optional) The options to pass to the {@link Ext.form.Action}. + * All of the config options listed below are supported by both the submit + * and load actions unless otherwise noted (custom actions could also accept + * other config options):
          + *
        • url : String

          The url for the action (defaults + * to the form's url.)

        • + *
        • method : String

          The form method to use (defaults + * to the form's method, or POST if not defined)

        • + *
        • params : String/Object

          The params to pass + * (defaults to the form's baseParams, or none if not defined)

        • + *
        • success : Function

          The callback that will + * be invoked after a successful response. Note that this is HTTP success + * (the transaction was sent and received correctly), but the resulting response data + * can still contain data errors. The function is passed the following parameters:

            + *
          • form : Ext.form.BasicForm
            The form that requested the action
          • + *
          • action : Ext.form.Action
            The Action class. The {@link Ext.form.Action#result result} + * property of this object may be examined to perform custom postprocessing.
          • + *

        • + *
        • failure : Function

          The callback that will + * be invoked after a failed transaction attempt. Note that this is HTTP failure, + * which means a non-successful HTTP code was returned from the server. The function + * is passed the following parameters:

            + *
          • form : Ext.form.BasicForm
            The form that requested the action
          • + *
          • action : Ext.form.Action
            The Action class. If an Ajax + * error ocurred, the failure type will be in {@link Ext.form.Action#failureType failureType}. The {@link Ext.form.Action#result result} + * property of this object may be examined to perform custom postprocessing.
          • + *

        • + *
        • scope : Object

          The scope in which to call the + * callback functions (The this reference for the callback functions).

        • + *
        • clientValidation : Boolean

          Submit Action only. + * Determines whether a Form's fields are validated in a final call to + * {@link Ext.form.BasicForm#isValid isValid} prior to submission. Pass false + * in the to prevent this. If not defined, pre-submission field validation is performed.

        + * @return {BasicForm} this + */ + doAction : function(action, options){ + if(typeof action == 'string'){ + action = new Ext.form.Action.ACTION_TYPES[action](this, options); + } + if(this.fireEvent('beforeaction', this, action) !== false){ + this.beforeAction(action); + action.run.defer(100, action); + } + return this; + }, + + /** + * Shortcut to do a submit action. + * @param {Object} options The options to pass to the action (see {@link #doAction} for details) + * @return {BasicForm} this + */ + submit : function(options){ + this.doAction('submit', options); + return this; + }, + + /** + * Shortcut to do a load action. + * @param {Object} options The options to pass to the action (see {@link #doAction} for details) + * @return {BasicForm} this + */ + load : function(options){ + this.doAction('load', options); + return this; + }, + + /** + * Persists the values in this form into the passed Ext.data.Record object in a beginEdit/endEdit block. + * @param {Record} record The record to edit + * @return {BasicForm} this + */ + updateRecord : function(record){ + record.beginEdit(); + var fs = record.fields; + fs.each(function(f){ + var field = this.findField(f.name); + if(field){ + record.set(f.name, field.getValue()); + } + }, this); + record.endEdit(); + return this; + }, + + /** + * Loads an Ext.data.Record into this form. + * @param {Record} record The record to load + * @return {BasicForm} this + */ + loadRecord : function(record){ + this.setValues(record.data); + return this; + }, + + // private + beforeAction : function(action){ + var o = action.options; + if(o.waitMsg){ + if(this.waitMsgTarget === true){ + this.el.mask(o.waitMsg, 'x-mask-loading'); + }else if(this.waitMsgTarget){ + this.waitMsgTarget = Ext.get(this.waitMsgTarget); + this.waitMsgTarget.mask(o.waitMsg, 'x-mask-loading'); + }else{ + Ext.MessageBox.wait(o.waitMsg, o.waitTitle || this.waitTitle || 'Please Wait...'); + } + } + }, + + // private + afterAction : function(action, success){ + this.activeAction = null; + var o = action.options; + if(o.waitMsg){ + if(this.waitMsgTarget === true){ + this.el.unmask(); + }else if(this.waitMsgTarget){ + this.waitMsgTarget.unmask(); + }else{ + Ext.MessageBox.updateProgress(1); + Ext.MessageBox.hide(); + } + } + if(success){ + if(o.reset){ + this.reset(); + } + Ext.callback(o.success, o.scope, [this, action]); + this.fireEvent('actioncomplete', this, action); + }else{ + Ext.callback(o.failure, o.scope, [this, action]); + this.fireEvent('actionfailed', this, action); + } + }, + + /** + * Find a Ext.form.Field in this form by id, dataIndex, name or hiddenName. + * @param {String} id The value to search for + * @return Field + */ + findField : function(id){ + var field = this.items.get(id); + if(!field){ + this.items.each(function(f){ + if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id)){ + field = f; + return false; + } + }); + } + return field || null; + }, + + + /** + * Mark fields in this form invalid in bulk. + * @param {Array/Object} errors Either an array in the form [{id:'fieldId', msg:'The message'},...] or an object hash of {id: msg, id2: msg2} + * @return {BasicForm} this + */ + markInvalid : function(errors){ + if(errors instanceof Array){ + for(var i = 0, len = errors.length; i < len; i++){ + var fieldError = errors[i]; + var f = this.findField(fieldError.id); + if(f){ + f.markInvalid(fieldError.msg); + } + } + }else{ + var field, id; + for(id in errors){ + if(typeof errors[id] != 'function' && (field = this.findField(id))){ + field.markInvalid(errors[id]); + } + } + } + return this; + }, + + /** + * Set values for fields in this form in bulk. + * @param {Array/Object} values Either an array in the form:

        +[{id:'clientName', value:'Fred. Olsen Lines'},
        + {id:'portOfLoading', value:'FXT'},
        + {id:'portOfDischarge', value:'OSL'} ]


        + * or an object hash of the form:

        +{
        +    clientName: 'Fred. Olsen Lines',
        +    portOfLoading: 'FXT',
        +    portOfDischarge: 'OSL'
        +}

        + * @return {BasicForm} this + */ + setValues : function(values){ + if(values instanceof Array){ // array of objects + for(var i = 0, len = values.length; i < len; i++){ + var v = values[i]; + var f = this.findField(v.id); + if(f){ + f.setValue(v.value); + if(this.trackResetOnLoad){ + f.originalValue = f.getValue(); + } + } + } + }else{ // object hash + var field, id; + for(id in values){ + if(typeof values[id] != 'function' && (field = this.findField(id))){ + field.setValue(values[id]); + if(this.trackResetOnLoad){ + field.originalValue = field.getValue(); + } + } + } + } + return this; + }, + + /** + * Returns the fields in this form as an object with key/value pairs as they would be submitted using a standard form submit. + * If multiple fields exist with the same name they are returned as an array. + * @param {Boolean} asString (optional) false to return the the values as an object (defaults to returning as a string) + * @return {String/Object} + */ + getValues : function(asString){ + var fs = Ext.lib.Ajax.serializeForm(this.el.dom); + if(asString === true){ + return fs; + } + return Ext.urlDecode(fs); + }, + + /** + * Clears all invalid messages in this form. + * @return {BasicForm} this + */ + clearInvalid : function(){ + this.items.each(function(f){ + f.clearInvalid(); + }); + return this; + }, + + /** + * Resets this form. + * @return {BasicForm} this + */ + reset : function(){ + this.items.each(function(f){ + f.reset(); + }); + return this; + }, + + /** + * Add Ext.form components to this form. + * @param {Field} field1 + * @param {Field} field2 (optional) + * @param {Field} etc (optional) + * @return {BasicForm} this + */ + add : function(){ + this.items.addAll(Array.prototype.slice.call(arguments, 0)); + return this; + }, + + + /** + * Removes a field from the items collection (does NOT remove its markup). + * @param {Field} field + * @return {BasicForm} this + */ + remove : function(field){ + this.items.remove(field); + return this; + }, + + /** + * Looks at the fields in this form, checks them for an id attribute, + * and calls applyTo on the existing dom element with that id. + * @return {BasicForm} this + */ + render : function(){ + this.items.each(function(f){ + if(f.isFormField && !f.rendered && document.getElementById(f.id)){ // if the element exists + f.applyToMarkup(f.id); + } + }); + return this; + }, + + /** + * Calls {@link Ext#apply} for all fields in this form with the passed object. + * @param {Object} values + * @return {BasicForm} this + */ + applyToFields : function(o){ + this.items.each(function(f){ + Ext.apply(f, o); + }); + return this; + }, + + /** + * Calls {@link Ext#applyIf} for all field in this form with the passed object. + * @param {Object} values + * @return {BasicForm} this + */ + applyIfToFields : function(o){ + this.items.each(function(f){ + Ext.applyIf(f, o); + }); + return this; + } +}); + +// back compat +Ext.BasicForm = Ext.form.BasicForm; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Checkbox.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Checkbox.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Checkbox.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,151 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.Checkbox + * @extends Ext.form.Field + * Single checkbox field. Can be used as a direct replacement for traditional checkbox fields. + * @constructor + * Creates a new Checkbox + * @param {Object} config Configuration options + */ +Ext.form.Checkbox = Ext.extend(Ext.form.Field, { + /** + * @cfg {String} focusClass The CSS class to use when the checkbox receives focus (defaults to undefined) + */ + focusClass : undefined, + /** + * @cfg {String} fieldClass The default CSS class for the checkbox (defaults to "x-form-field") + */ + fieldClass: "x-form-field", + /** + * @cfg {Boolean} checked True if the the checkbox should render already checked (defaults to false) + */ + checked: false, + /** + * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to + * {tag: "input", type: "checkbox", autocomplete: "off"}) + */ + defaultAutoCreate : { tag: "input", type: 'checkbox', autocomplete: "off"}, + /** + * @cfg {String} boxLabel The text that appears beside the checkbox + */ + /** + * @cfg {String} inputValue The value that should go into the generated input element's value attribute + */ + + // private + initComponent : function(){ + Ext.form.Checkbox.superclass.initComponent.call(this); + this.addEvents( + /** + * @event check + * Fires when the checkbox is checked or unchecked. + * @param {Ext.form.Checkbox} this This checkbox + * @param {Boolean} checked The new checked value + */ + 'check' + ); + }, + + // private + onResize : function(){ + Ext.form.Checkbox.superclass.onResize.apply(this, arguments); + if(!this.boxLabel){ + this.el.alignTo(this.wrap, 'c-c'); + } + }, + + // private + initEvents : function(){ + Ext.form.Checkbox.superclass.initEvents.call(this); + this.el.on("click", this.onClick, this); + this.el.on("change", this.onClick, this); + }, + + // private + getResizeEl : function(){ + return this.wrap; + }, + + // private + getPositionEl : function(){ + return this.wrap; + }, + + /** + * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide + * @method + */ + markInvalid : Ext.emptyFn, + /** + * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide + * @method + */ + clearInvalid : Ext.emptyFn, + + // private + onRender : function(ct, position){ + Ext.form.Checkbox.superclass.onRender.call(this, ct, position); + if(this.inputValue !== undefined){ + this.el.dom.value = this.inputValue; + } + this.wrap = this.el.wrap({cls: "x-form-check-wrap"}); + if(this.boxLabel){ + this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel}); + } + if(this.checked){ + this.setValue(true); + }else{ + this.checked = this.el.dom.checked; + } + }, + + // private + onDestroy : function(){ + if(this.wrap){ + this.wrap.remove(); + } + Ext.form.Checkbox.superclass.onDestroy.call(this); + }, + + // private + initValue : Ext.emptyFn, + + /** + * Returns the checked state of the checkbox. + * @return {Boolean} True if checked, else false + */ + getValue : function(){ + if(this.rendered){ + return this.el.dom.checked; + } + return false; + }, + + // private + onClick : function(){ + if(this.el.dom.checked != this.checked){ + this.setValue(this.el.dom.checked); + } + }, + + /** + * Sets the checked state of the checkbox. + * @param {Boolean/String} checked True, 'true', '1', or 'on' to check the checkbox, any other value will uncheck it. + */ + setValue : function(v){ + this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on'); + if(this.el && this.el.dom){ + this.el.dom.checked = this.checked; + this.el.dom.defaultChecked = this.checked; + } + this.fireEvent("check", this, this.checked); + } +}); +Ext.reg('checkbox', Ext.form.Checkbox); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Combo.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Combo.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Combo.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,910 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.ComboBox + * @extends Ext.form.TriggerField + * A combobox control with support for autocomplete, remote-loading, paging and many other features. + * @constructor + * Create a new ComboBox. + * @param {Object} config Configuration options + */ +Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { + /** + * @cfg {Mixed} transform The id, DOM node or element of an existing select to convert to a ComboBox + */ + /** + * @cfg {Boolean} lazyRender True to prevent the ComboBox from rendering until requested (should always be used when + * rendering into an Ext.Editor, defaults to false) + */ + /** + * @cfg {Boolean/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to: + * {tag: "input", type: "text", size: "24", autocomplete: "off"}) + */ + /** + * @cfg {Ext.data.Store} store The data store to which this combo is bound (defaults to undefined) + */ + /** + * @cfg {String} title If supplied, a header element is created containing this text and added into the top of + * the dropdown list (defaults to undefined, with no header element) + */ + + // private + defaultAutoCreate : {tag: "input", type: "text", size: "24", autocomplete: "off"}, + /** + * @cfg {Number} listWidth The width in pixels of the dropdown list (defaults to the width of the ComboBox field) + */ + /** + * @cfg {String} displayField The underlying data field name to bind to this ComboBox (defaults to undefined if + * mode = 'remote' or 'text' if transforming a select) + */ + /** + * @cfg {String} valueField The underlying data value name to bind to this ComboBox (defaults to undefined if + * mode = 'remote' or 'value' if transforming a select) Note: use of a valueField requires the user to make a selection + * in order for a value to be mapped. + */ + /** + * @cfg {String} hiddenName If specified, a hidden form field with this name is dynamically generated to store the + * field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically + * post during a form submission. + */ + /** + * @cfg {String} listClass CSS class to apply to the dropdown list element (defaults to '') + */ + listClass: '', + /** + * @cfg {String} selectedClass CSS class to apply to the selected item in the dropdown list (defaults to 'x-combo-selected') + */ + selectedClass: 'x-combo-selected', + /** + * @cfg {String} triggerClass An additional CSS class used to style the trigger button. The trigger will always get the + * class 'x-form-trigger' and triggerClass will be appended if specified (defaults to 'x-form-arrow-trigger' + * which displays a downward arrow icon). + */ + triggerClass : 'x-form-arrow-trigger', + /** + * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right + */ + shadow:'sides', + /** + * @cfg {String} listAlign A valid anchor position value. See {@link Ext.Element#alignTo} for details on supported + * anchor positions (defaults to 'tl-bl') + */ + listAlign: 'tl-bl?', + /** + * @cfg {Number} maxHeight The maximum height in pixels of the dropdown list before scrollbars are shown (defaults to 300) + */ + maxHeight: 300, + /** + * @cfg {String} triggerAction The action to execute when the trigger field is activated. Use 'all' to run the + * query specified by the allQuery config option (defaults to 'query') + */ + triggerAction: 'query', + /** + * @cfg {Number} minChars The minimum number of characters the user must type before autocomplete and typeahead activate + * (defaults to 4 if remote or 0 if local, does not apply if editable = false) + */ + minChars : 4, + /** + * @cfg {Boolean} typeAhead True to populate and autoselect the remainder of the text being typed after a configurable + * delay (typeAheadDelay) if it matches a known value (defaults to false) + */ + typeAhead: false, + /** + * @cfg {Number} queryDelay The length of time in milliseconds to delay between the start of typing and sending the + * query to filter the dropdown list (defaults to 500 if mode = 'remote' or 10 if mode = 'local') + */ + queryDelay: 500, + /** + * @cfg {Number} pageSize If greater than 0, a paging toolbar is displayed in the footer of the dropdown list and the + * filter queries will execute with page start and limit parameters. Only applies when mode = 'remote' (defaults to 0) + */ + pageSize: 0, + /** + * @cfg {Boolean} selectOnFocus True to select any existing text in the field immediately on focus. Only applies + * when editable = true (defaults to false) + */ + selectOnFocus:false, + /** + * @cfg {String} queryParam Name of the query as it will be passed on the querystring (defaults to 'query') + */ + queryParam: 'query', + /** + * @cfg {String} loadingText The text to display in the dropdown list while data is loading. Only applies + * when mode = 'remote' (defaults to 'Loading...') + */ + loadingText: 'Loading...', + /** + * @cfg {Boolean} resizable True to add a resize handle to the bottom of the dropdown list (defaults to false) + */ + resizable: false, + /** + * @cfg {Number} handleHeight The height in pixels of the dropdown list resize handle if resizable = true (defaults to 8) + */ + handleHeight : 8, + /** + * @cfg {Boolean} editable False to prevent the user from typing text directly into the field, just like a + * traditional select (defaults to true) + */ + editable: true, + /** + * @cfg {String} allQuery The text query to send to the server to return all records for the list with no filtering (defaults to '') + */ + allQuery: '', + /** + * @cfg {String} mode Set to 'local' if the ComboBox loads local data (defaults to 'remote' which loads from the server) + */ + mode: 'remote', + /** + * @cfg {Number} minListWidth The minimum width of the dropdown list in pixels (defaults to 70, will be ignored if + * listWidth has a higher value) + */ + minListWidth : 70, + /** + * @cfg {Boolean} forceSelection True to restrict the selected value to one of the values in the list, false to + * allow the user to set arbitrary text into the field (defaults to false) + */ + forceSelection:false, + /** + * @cfg {Number} typeAheadDelay The length of time in milliseconds to wait until the typeahead text is displayed + * if typeAhead = true (defaults to 250) + */ + typeAheadDelay : 250, + /** + * @cfg {String} valueNotFoundText When using a name/value combo, if the value passed to setValue is not found in + * the store, valueNotFoundText will be displayed as the field text if defined (defaults to undefined) + */ + + /** + * @cfg {Boolean} lazyInit True to not initialize the list for this combo until the field is focused. (defaults to true) + */ + lazyInit : true, + + initComponent : function(){ + Ext.form.ComboBox.superclass.initComponent.call(this); + this.addEvents( + /** + * @event expand + * Fires when the dropdown list is expanded + * @param {Ext.form.ComboBox} combo This combo box + */ + 'expand', + /** + * @event collapse + * Fires when the dropdown list is collapsed + * @param {Ext.form.ComboBox} combo This combo box + */ + 'collapse', + /** + * @event beforeselect + * Fires before a list item is selected. Return false to cancel the selection. + * @param {Ext.form.ComboBox} combo This combo box + * @param {Ext.data.Record} record The data record returned from the underlying store + * @param {Number} index The index of the selected item in the dropdown list + */ + 'beforeselect', + /** + * @event select + * Fires when a list item is selected + * @param {Ext.form.ComboBox} combo This combo box + * @param {Ext.data.Record} record The data record returned from the underlying store + * @param {Number} index The index of the selected item in the dropdown list + */ + 'select', + /** + * @event beforequery + * Fires before all queries are processed. Return false to cancel the query or set the queryEvent's + * cancel property to true. + * @param {Object} queryEvent An object that has these properties:
          + *
        • combo : Ext.form.ComboBox
          This combo box
        • + *
        • query : String
          The query
        • + *
        • forceAll : Boolean
          True to force "all" query
        • + *
        • cancel : Boolean
          Set to true to cancel the query
        • + *
        + */ + 'beforequery' + ); + if(this.transform){ + this.allowDomMove = false; + var s = Ext.getDom(this.transform); + if(!this.hiddenName){ + this.hiddenName = s.name; + } + if(!this.store){ + this.mode = 'local'; + var d = [], opts = s.options; + for(var i = 0, len = opts.length;i < len; i++){ + var o = opts[i]; + var value = (Ext.isIE ? o.getAttributeNode('value').specified : o.hasAttribute('value')) ? o.value : o.text; + if(o.selected) { + this.value = value; + } + d.push([value, o.text]); + } + this.store = new Ext.data.SimpleStore({ + 'id': 0, + fields: ['value', 'text'], + data : d + }); + this.valueField = 'value'; + this.displayField = 'text'; + } + s.name = Ext.id(); // wipe out the name in case somewhere else they have a reference + if(!this.lazyRender){ + this.target = true; + this.el = Ext.DomHelper.insertBefore(s, this.autoCreate || this.defaultAutoCreate); + Ext.removeNode(s); // remove it + this.render(this.el.parentNode); + }else{ + Ext.removeNode(s); // remove it + } + + } + this.selectedIndex = -1; + if(this.mode == 'local'){ + if(this.initialConfig.queryDelay === undefined){ + this.queryDelay = 10; + } + if(this.initialConfig.minChars === undefined){ + this.minChars = 0; + } + } + }, + + // private + onRender : function(ct, position){ + Ext.form.ComboBox.superclass.onRender.call(this, ct, position); + if(this.hiddenName){ + this.hiddenField = this.el.insertSibling({tag:'input', type:'hidden', name: this.hiddenName, id: (this.hiddenId||this.hiddenName)}, + 'before', true); + this.hiddenField.value = + this.hiddenValue !== undefined ? this.hiddenValue : + this.value !== undefined ? this.value : ''; + + // prevent input submission + this.el.dom.removeAttribute('name'); + } + if(Ext.isGecko){ + this.el.dom.setAttribute('autocomplete', 'off'); + } + + if(!this.lazyInit){ + this.initList(); + }else{ + this.on('focus', this.initList, this, {single: true}); + } + + if(!this.editable){ + this.editable = true; + this.setEditable(false); + } + }, + + initList : function(){ + if(!this.list){ + var cls = 'x-combo-list'; + + this.list = new Ext.Layer({ + shadow: this.shadow, cls: [cls, this.listClass].join(' '), constrain:false + }); + + var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth); + this.list.setWidth(lw); + this.list.swallowEvent('mousewheel'); + this.assetHeight = 0; + + if(this.title){ + this.header = this.list.createChild({cls:cls+'-hd', html: this.title}); + this.assetHeight += this.header.getHeight(); + } + + this.innerList = this.list.createChild({cls:cls+'-inner'}); + this.innerList.on('mouseover', this.onViewOver, this); + this.innerList.on('mousemove', this.onViewMove, this); + this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); + + if(this.pageSize){ + this.footer = this.list.createChild({cls:cls+'-ft'}); + this.pageTb = new Ext.PagingToolbar({ + store:this.store, + pageSize: this.pageSize, + renderTo:this.footer + }); + this.assetHeight += this.footer.getHeight(); + } + + if(!this.tpl){ + /** + * @cfg {String/Ext.XTemplate} tpl The template string, or {@link Ext.XTemplate} + * instance to use to display each item in the dropdown list. Use + * this to create custom UI layouts for items in the list. + *

        + * If you wish to preserve the default visual look of list items, add the CSS + * class name

        x-combo-list-item
        to the template's container element. + *

        + * The template must contain one or more substitution parameters using field + * names from the Combo's {@link #store Store}. An example of a custom template + * would be adding an

        ext:qtip
        attribute which might display other fields + * from the Store. + *

        + * The dropdown list is displayed in a DataView. See {@link Ext.DataView} for details. + */ + this.tpl = '

        {' + this.displayField + '}
        '; + } + + /** + * The {@link Ext.DataView DataView} used to display the ComboBox's options. + * @type Ext.DataView + */ + this.view = new Ext.DataView({ + applyTo: this.innerList, + tpl: this.tpl, + singleSelect: true, + selectedClass: this.selectedClass, + itemSelector: this.itemSelector || '.' + cls + '-item' + }); + + this.view.on('click', this.onViewClick, this); + + this.bindStore(this.store, true); + + if(this.resizable){ + this.resizer = new Ext.Resizable(this.list, { + pinned:true, handles:'se' + }); + this.resizer.on('resize', function(r, w, h){ + this.maxHeight = h-this.handleHeight-this.list.getFrameWidth('tb')-this.assetHeight; + this.listWidth = w; + this.innerList.setWidth(w - this.list.getFrameWidth('lr')); + this.restrictHeight(); + }, this); + this[this.pageSize?'footer':'innerList'].setStyle('margin-bottom', this.handleHeight+'px'); + } + } + }, + + + // private + bindStore : function(store, initial){ + if(this.store && !initial){ + this.store.un('beforeload', this.onBeforeLoad, this); + this.store.un('load', this.onLoad, this); + this.store.un('loadexception', this.collapse, this); + if(!store){ + this.store = null; + if(this.view){ + this.view.setStore(null); + } + } + } + if(store){ + this.store = Ext.StoreMgr.lookup(store); + + this.store.on('beforeload', this.onBeforeLoad, this); + this.store.on('load', this.onLoad, this); + this.store.on('loadexception', this.collapse, this); + + if(this.view){ + this.view.setStore(store); + } + } + }, + + // private + initEvents : function(){ + Ext.form.ComboBox.superclass.initEvents.call(this); + + this.keyNav = new Ext.KeyNav(this.el, { + "up" : function(e){ + this.inKeyMode = true; + this.selectPrev(); + }, + + "down" : function(e){ + if(!this.isExpanded()){ + this.onTriggerClick(); + }else{ + this.inKeyMode = true; + this.selectNext(); + } + }, + + "enter" : function(e){ + this.onViewClick(); + //return true; + }, + + "esc" : function(e){ + this.collapse(); + }, + + "tab" : function(e){ + this.onViewClick(false); + return true; + }, + + scope : this, + + doRelay : function(foo, bar, hname){ + if(hname == 'down' || this.scope.isExpanded()){ + return Ext.KeyNav.prototype.doRelay.apply(this, arguments); + } + return true; + }, + + forceKeyDown : true + }); + this.queryDelay = Math.max(this.queryDelay || 10, + this.mode == 'local' ? 10 : 250); + this.dqTask = new Ext.util.DelayedTask(this.initQuery, this); + if(this.typeAhead){ + this.taTask = new Ext.util.DelayedTask(this.onTypeAhead, this); + } + if(this.editable !== false){ + this.el.on("keyup", this.onKeyUp, this); + } + if(this.forceSelection){ + this.on('blur', this.doForce, this); + } + }, + + onDestroy : function(){ + if(this.view){ + this.view.el.removeAllListeners(); + this.view.el.remove(); + this.view.purgeListeners(); + } + if(this.list){ + this.list.destroy(); + } + this.bindStore(null); + Ext.form.ComboBox.superclass.onDestroy.call(this); + }, + + // private + fireKey : function(e){ + if(e.isNavKeyPress() && !this.list.isVisible()){ + this.fireEvent("specialkey", this, e); + } + }, + + // private + onResize: function(w, h){ + Ext.form.ComboBox.superclass.onResize.apply(this, arguments); + if(this.list && this.listWidth === undefined){ + var lw = Math.max(w, this.minListWidth); + this.list.setWidth(lw); + this.innerList.setWidth(lw - this.list.getFrameWidth('lr')); + } + }, + + // private + onDisable: function(){ + Ext.form.ComboBox.superclass.onDisable.apply(this, arguments); + if(this.hiddenField){ + this.hiddenField.disabled = this.disabled; + } + }, + + /** + * Allow or prevent the user from directly editing the field text. If false is passed, + * the user will only be able to select from the items defined in the dropdown list. This method + * is the runtime equivalent of setting the 'editable' config option at config time. + * @param {Boolean} value True to allow the user to directly edit the field text + */ + setEditable : function(value){ + if(value == this.editable){ + return; + } + this.editable = value; + if(!value){ + this.el.dom.setAttribute('readOnly', true); + this.el.on('mousedown', this.onTriggerClick, this); + this.el.addClass('x-combo-noedit'); + }else{ + this.el.dom.setAttribute('readOnly', false); + this.el.un('mousedown', this.onTriggerClick, this); + this.el.removeClass('x-combo-noedit'); + } + }, + + // private + onBeforeLoad : function(){ + if(!this.hasFocus){ + return; + } + this.innerList.update(this.loadingText ? + '
        '+this.loadingText+'
        ' : ''); + this.restrictHeight(); + this.selectedIndex = -1; + }, + + // private + onLoad : function(){ + if(!this.hasFocus){ + return; + } + if(this.store.getCount() > 0){ + this.expand(); + this.restrictHeight(); + if(this.lastQuery == this.allQuery){ + if(this.editable){ + this.el.dom.select(); + } + if(!this.selectByValue(this.value, true)){ + this.select(0, true); + } + }else{ + this.selectNext(); + if(this.typeAhead && this.lastKey != Ext.EventObject.BACKSPACE && this.lastKey != Ext.EventObject.DELETE){ + this.taTask.delay(this.typeAheadDelay); + } + } + }else{ + this.onEmptyResults(); + } + //this.el.focus(); + }, + + // private + onTypeAhead : function(){ + if(this.store.getCount() > 0){ + var r = this.store.getAt(0); + var newValue = r.data[this.displayField]; + var len = newValue.length; + var selStart = this.getRawValue().length; + if(selStart != len){ + this.setRawValue(newValue); + this.selectText(selStart, newValue.length); + } + } + }, + + // private + onSelect : function(record, index){ + if(this.fireEvent('beforeselect', this, record, index) !== false){ + this.setValue(record.data[this.valueField || this.displayField]); + this.collapse(); + this.fireEvent('select', this, record, index); + } + }, + + /** + * Returns the currently selected field value or empty string if no value is set. + * @return {String} value The selected value + */ + getValue : function(){ + if(this.valueField){ + return typeof this.value != 'undefined' ? this.value : ''; + }else{ + return Ext.form.ComboBox.superclass.getValue.call(this); + } + }, + + /** + * Clears any text/value currently set in the field + */ + clearValue : function(){ + if(this.hiddenField){ + this.hiddenField.value = ''; + } + this.setRawValue(''); + this.lastSelectionText = ''; + this.applyEmptyText(); + }, + + /** + * Sets the specified value into the field. If the value finds a match, the corresponding record text + * will be displayed in the field. If the value does not match the data value of an existing item, + * and the valueNotFoundText config option is defined, it will be displayed as the default field text. + * Otherwise the field will be blank (although the value will still be set). + * @param {String} value The value to match + */ + setValue : function(v){ + var text = v; + if(this.valueField){ + var r = this.findRecord(this.valueField, v); + if(r){ + text = r.data[this.displayField]; + }else if(this.valueNotFoundText !== undefined){ + text = this.valueNotFoundText; + } + } + this.lastSelectionText = text; + if(this.hiddenField){ + this.hiddenField.value = v; + } + Ext.form.ComboBox.superclass.setValue.call(this, text); + this.value = v; + }, + + // private + findRecord : function(prop, value){ + var record; + if(this.store.getCount() > 0){ + this.store.each(function(r){ + if(r.data[prop] == value){ + record = r; + return false; + } + }); + } + return record; + }, + + // private + onViewMove : function(e, t){ + this.inKeyMode = false; + }, + + // private + onViewOver : function(e, t){ + if(this.inKeyMode){ // prevent key nav and mouse over conflicts + return; + } + var item = this.view.findItemFromChild(t); + if(item){ + var index = this.view.indexOf(item); + this.select(index, false); + } + }, + + // private + onViewClick : function(doFocus){ + var index = this.view.getSelectedIndexes()[0]; + var r = this.store.getAt(index); + if(r){ + this.onSelect(r, index); + } + if(doFocus !== false){ + this.el.focus(); + } + }, + + // private + restrictHeight : function(){ + this.innerList.dom.style.height = ''; + var inner = this.innerList.dom; + var fw = this.list.getFrameWidth('tb'); + var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight); + this.innerList.setHeight(h < this.maxHeight ? 'auto' : this.maxHeight); + this.list.beginUpdate(); + this.list.setHeight(this.innerList.getHeight()+fw+(this.resizable?this.handleHeight:0)+this.assetHeight); + this.list.alignTo(this.el, this.listAlign); + this.list.endUpdate(); + }, + + // private + onEmptyResults : function(){ + this.collapse(); + }, + + /** + * Returns true if the dropdown list is expanded, else false. + */ + isExpanded : function(){ + return this.list && this.list.isVisible(); + }, + + /** + * Select an item in the dropdown list by its data value. This function does NOT cause the select event to fire. + * The store must be loaded and the list expanded for this function to work, otherwise use setValue. + * @param {String} value The data value of the item to select + * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the + * selected item if it is not currently in view (defaults to true) + * @return {Boolean} True if the value matched an item in the list, else false + */ + selectByValue : function(v, scrollIntoView){ + if(v !== undefined && v !== null){ + var r = this.findRecord(this.valueField || this.displayField, v); + if(r){ + this.select(this.store.indexOf(r), scrollIntoView); + return true; + } + } + return false; + }, + + /** + * Select an item in the dropdown list by its numeric index in the list. This function does NOT cause the select event to fire. + * The store must be loaded and the list expanded for this function to work, otherwise use setValue. + * @param {Number} index The zero-based index of the list item to select + * @param {Boolean} scrollIntoView False to prevent the dropdown list from autoscrolling to display the + * selected item if it is not currently in view (defaults to true) + */ + select : function(index, scrollIntoView){ + this.selectedIndex = index; + this.view.select(index); + if(scrollIntoView !== false){ + var el = this.view.getNode(index); + if(el){ + this.innerList.scrollChildIntoView(el, false); + } + } + }, + + // private + selectNext : function(){ + var ct = this.store.getCount(); + if(ct > 0){ + if(this.selectedIndex == -1){ + this.select(0); + }else if(this.selectedIndex < ct-1){ + this.select(this.selectedIndex+1); + } + } + }, + + // private + selectPrev : function(){ + var ct = this.store.getCount(); + if(ct > 0){ + if(this.selectedIndex == -1){ + this.select(0); + }else if(this.selectedIndex != 0){ + this.select(this.selectedIndex-1); + } + } + }, + + // private + onKeyUp : function(e){ + if(this.editable !== false && !e.isSpecialKey()){ + this.lastKey = e.getKey(); + this.dqTask.delay(this.queryDelay); + } + }, + + // private + validateBlur : function(){ + return !this.list || !this.list.isVisible(); + }, + + // private + initQuery : function(){ + this.doQuery(this.getRawValue()); + }, + + // private + doForce : function(){ + if(this.el.dom.value.length > 0){ + this.el.dom.value = + this.lastSelectionText === undefined ? '' : this.lastSelectionText; + this.applyEmptyText(); + } + }, + + /** + * Execute a query to filter the dropdown list. Fires the beforequery event prior to performing the + * query allowing the query action to be canceled if needed. + * @param {String} query The SQL query to execute + * @param {Boolean} forceAll True to force the query to execute even if there are currently fewer characters + * in the field than the minimum specified by the minChars config option. It also clears any filter previously + * saved in the current store (defaults to false) + */ + doQuery : function(q, forceAll){ + if(q === undefined || q === null){ + q = ''; + } + var qe = { + query: q, + forceAll: forceAll, + combo: this, + cancel:false + }; + if(this.fireEvent('beforequery', qe)===false || qe.cancel){ + return false; + } + q = qe.query; + forceAll = qe.forceAll; + if(forceAll === true || (q.length >= this.minChars)){ + if(this.lastQuery !== q){ + this.lastQuery = q; + if(this.mode == 'local'){ + this.selectedIndex = -1; + if(forceAll){ + this.store.clearFilter(); + }else{ + this.store.filter(this.displayField, q); + } + this.onLoad(); + }else{ + this.store.baseParams[this.queryParam] = q; + this.store.load({ + params: this.getParams(q) + }); + this.expand(); + } + }else{ + this.selectedIndex = -1; + this.onLoad(); + } + } + }, + + // private + getParams : function(q){ + var p = {}; + //p[this.queryParam] = q; + if(this.pageSize){ + p.start = 0; + p.limit = this.pageSize; + } + return p; + }, + + /** + * Hides the dropdown list if it is currently expanded. Fires the 'collapse' event on completion. + */ + collapse : function(){ + if(!this.isExpanded()){ + return; + } + this.list.hide(); + Ext.getDoc().un('mousewheel', this.collapseIf, this); + Ext.getDoc().un('mousedown', this.collapseIf, this); + this.fireEvent('collapse', this); + }, + + // private + collapseIf : function(e){ + if(!e.within(this.wrap) && !e.within(this.list)){ + this.collapse(); + } + }, + + /** + * Expands the dropdown list if it is currently hidden. Fires the 'expand' event on completion. + */ + expand : function(){ + if(this.isExpanded() || !this.hasFocus){ + return; + } + this.list.alignTo(this.wrap, this.listAlign); + this.list.show(); + Ext.getDoc().on('mousewheel', this.collapseIf, this); + Ext.getDoc().on('mousedown', this.collapseIf, this); + this.fireEvent('expand', this); + }, + + // private + // Implements the default empty TriggerField.onTriggerClick function + onTriggerClick : function(){ + if(this.disabled){ + return; + } + if(this.isExpanded()){ + this.collapse(); + this.el.focus(); + }else { + this.onFocus({}); + if(this.triggerAction == 'all') { + this.doQuery(this.allQuery, true); + } else { + this.doQuery(this.getRawValue()); + } + this.el.focus(); + } + } + + /** + * @hide + * @method autoSize + */ + /** + * @cfg {Boolean} grow @hide + */ + /** + * @cfg {Number} growMin @hide + */ + /** + * @cfg {Number} growMax @hide + */ + +}); +Ext.reg('combo', Ext.form.ComboBox); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/DateField.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/DateField.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/DateField.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,302 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.DateField + * @extends Ext.form.TriggerField + * Provides a date input field with a {@link Ext.DatePicker} dropdown and automatic date validation. +* @constructor +* Create a new DateField +* @param {Object} config + */ +Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { + /** + * @cfg {String} format + * The default date format string which can be overriden for localization support. The format must be + * valid according to {@link Date#parseDate} (defaults to 'm/d/y'). + */ + format : "m/d/y", + /** + * @cfg {String} altFormats + * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined + * format (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d'). + */ + altFormats : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d", + /** + * @cfg {Array} disabledDays + * An array of days to disable, 0 based. For example, [0, 6] disables Sunday and Saturday (defaults to null). + */ + disabledDays : null, + /** + * @cfg {String} disabledDaysText + * The tooltip to display when the date falls on a disabled day (defaults to 'Disabled') + */ + disabledDaysText : "Disabled", + /** + * @cfg {Array} disabledDates + * An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular + * expression so they are very powerful. Some examples: + *
          + *
        • ["03/08/2003", "09/16/2003"] would disable those exact dates
        • + *
        • ["03/08", "09/16"] would disable those days for every year
        • + *
        • ["^03/08"] would only match the beginning (useful if you are using short years)
        • + *
        • ["03/../2006"] would disable every day in March 2006
        • + *
        • ["^03"] would disable every day in every March
        • + *
        + * In order to support regular expressions, if you are using a date format that has "." in it, you will have to + * escape the dot when restricting dates. For example: ["03\\.08\\.03"]. + */ + disabledDates : null, + /** + * @cfg {String} disabledDatesText + * The tooltip text to display when the date falls on a disabled date (defaults to 'Disabled') + */ + disabledDatesText : "Disabled", + /** + * @cfg {Date/String} minValue + * The minimum allowed date. Can be either a Javascript date object or a string date in a + * valid format (defaults to null). + */ + minValue : null, + /** + * @cfg {Date/String} maxValue + * The maximum allowed date. Can be either a Javascript date object or a string date in a + * valid format (defaults to null). + */ + maxValue : null, + /** + * @cfg {String} minText + * The error text to display when the date in the cell is before minValue (defaults to + * 'The date in this field must be after {minValue}'). + */ + minText : "The date in this field must be equal to or after {0}", + /** + * @cfg {String} maxText + * The error text to display when the date in the cell is after maxValue (defaults to + * 'The date in this field must be before {maxValue}'). + */ + maxText : "The date in this field must be equal to or before {0}", + /** + * @cfg {String} invalidText + * The error text to display when the date in the field is invalid (defaults to + * '{value} is not a valid date - it must be in the format {format}'). + */ + invalidText : "{0} is not a valid date - it must be in the format {1}", + /** + * @cfg {String} triggerClass + * An additional CSS class used to style the trigger button. The trigger will always get the + * class 'x-form-trigger' and triggerClass will be appended if specified (defaults to 'x-form-date-trigger' + * which displays a calendar icon). + */ + triggerClass : 'x-form-date-trigger', + /** + * @cfg {String/Object} autoCreate + * A DomHelper element spec, or true for a default element spec (defaults to + * {tag: "input", type: "text", size: "10", autocomplete: "off"}) + */ + + // private + defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"}, + + initComponent : function(){ + Ext.form.DateField.superclass.initComponent.call(this); + if(typeof this.minValue == "string"){ + this.minValue = this.parseDate(this.minValue); + } + if(typeof this.maxValue == "string"){ + this.maxValue = this.parseDate(this.maxValue); + } + this.ddMatch = null; + if(this.disabledDates){ + var dd = this.disabledDates; + var re = "(?:"; + for(var i = 0; i < dd.length; i++){ + re += dd[i]; + if(i != dd.length-1) re += "|"; + } + this.ddMatch = new RegExp(re + ")"); + } + }, + + // private + validateValue : function(value){ + value = this.formatDate(value); + if(!Ext.form.DateField.superclass.validateValue.call(this, value)){ + return false; + } + if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid + return true; + } + var svalue = value; + value = this.parseDate(value); + if(!value){ + this.markInvalid(String.format(this.invalidText, svalue, this.format)); + return false; + } + var time = value.getTime(); + if(this.minValue && time < this.minValue.getTime()){ + this.markInvalid(String.format(this.minText, this.formatDate(this.minValue))); + return false; + } + if(this.maxValue && time > this.maxValue.getTime()){ + this.markInvalid(String.format(this.maxText, this.formatDate(this.maxValue))); + return false; + } + if(this.disabledDays){ + var day = value.getDay(); + for(var i = 0; i < this.disabledDays.length; i++) { + if(day === this.disabledDays[i]){ + this.markInvalid(this.disabledDaysText); + return false; + } + } + } + var fvalue = this.formatDate(value); + if(this.ddMatch && this.ddMatch.test(fvalue)){ + this.markInvalid(String.format(this.disabledDatesText, fvalue)); + return false; + } + return true; + }, + + // private + // Provides logic to override the default TriggerField.validateBlur which just returns true + validateBlur : function(){ + return !this.menu || !this.menu.isVisible(); + }, + + /** + * Returns the current date value of the date field. + * @return {Date} The date value + */ + getValue : function(){ + return this.parseDate(Ext.form.DateField.superclass.getValue.call(this)) || ""; + }, + + /** + * Sets the value of the date field. You can pass a date object or any string that can be parsed into a valid + * date, using DateField.format as the date format, according to the same rules as {@link Date#parseDate} + * (the default format used is "m/d/y"). + *
        Usage: + *
        
        +//All of these calls set the same date value (May 4, 2006)
        +
        +//Pass a date object:
        +var dt = new Date('5/4/06');
        +dateField.setValue(dt);
        +
        +//Pass a date string (default format):
        +dateField.setValue('5/4/06');
        +
        +//Pass a date string (custom format):
        +dateField.format = 'Y-m-d';
        +dateField.setValue('2006-5-4');
        +
        + * @param {String/Date} date The date or valid date string + */ + setValue : function(date){ + Ext.form.DateField.superclass.setValue.call(this, this.formatDate(this.parseDate(date))); + }, + + // private + parseDate : function(value){ + if(!value || value instanceof Date){ + return value; + } + var v = Date.parseDate(value, this.format); + if(!v && this.altFormats){ + if(!this.altFormatsArray){ + this.altFormatsArray = this.altFormats.split("|"); + } + for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){ + v = Date.parseDate(value, this.altFormatsArray[i]); + } + } + return v; + }, + + // private + onDestroy : function(){ + if(this.wrap){ + this.wrap.remove(); + } + Ext.form.DateField.superclass.onDestroy.call(this); + }, + + // private + formatDate : function(date){ + return (!date || !(date instanceof Date)) ? + date : date.dateFormat(this.format); + }, + + // private + menuListeners : { + select: function(m, d){ + this.setValue(d); + }, + show : function(){ // retain focus styling + this.onFocus(); + }, + hide : function(){ + this.focus.defer(10, this); + var ml = this.menuListeners; + this.menu.un("select", ml.select, this); + this.menu.un("show", ml.show, this); + this.menu.un("hide", ml.hide, this); + } + }, + + // private + // Implements the default empty TriggerField.onTriggerClick function to display the DatePicker + onTriggerClick : function(){ + if(this.disabled){ + return; + } + if(this.menu == null){ + this.menu = new Ext.menu.DateMenu(); + } + Ext.apply(this.menu.picker, { + minDate : this.minValue, + maxDate : this.maxValue, + disabledDatesRE : this.ddMatch, + disabledDatesText : this.disabledDatesText, + disabledDays : this.disabledDays, + disabledDaysText : this.disabledDaysText, + format : this.format, + minText : String.format(this.minText, this.formatDate(this.minValue)), + maxText : String.format(this.maxText, this.formatDate(this.maxValue)) + }); + this.menu.on(Ext.apply({}, this.menuListeners, { + scope:this + })); + this.menu.picker.setValue(this.getValue() || new Date()); + this.menu.show(this.el, "tl-bl?"); + }, + + beforeBlur : function(){ + var v = this.parseDate(this.getRawValue()); + if(v){ + this.setValue(v); + } + } + + /** + * @cfg {Boolean} grow @hide + */ + /** + * @cfg {Number} growMin @hide + */ + /** + * @cfg {Number} growMax @hide + */ + /** + * @hide + * @method autoSize + */ +}); +Ext.reg('datefield', Ext.form.DateField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Field.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Field.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Field.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,545 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.Field + * @extends Ext.BoxComponent + * Base class for form fields that provides default event handling, sizing, value handling and other functionality. + * @constructor + * Creates a new Field + * @param {Object} config Configuration options + */ +Ext.form.Field = Ext.extend(Ext.BoxComponent, { + /** + * @cfg {String} fieldLabel The label text to display next to this field (defaults to '') + */ + /** + * @cfg {String} labelStyle A CSS style specification to apply directly to this field's label (defaults to the + * container's labelStyle value if set, or ''). For example, labelStyle: 'font-weight:bold;'. + */ + /** + * @cfg {String} labelSeparator The standard separator to display after the text of each form label (defaults + * to the value of {@link Ext.layout.FormLayout#labelSeparator}, which is a colon ':' by default). To display + * no separator for this field's label specify empty string ''. + */ + /** + * @cfg {Boolean} hideLabel True to completely hide the label element (defaults to false) + */ + /** + * @cfg {String} clearCls The CSS class used to provide field clearing (defaults to 'x-form-clear-left') + */ + /** + * @cfg {String} itemCls An additional CSS class to apply to this field (defaults to the container's itemCls + * value if set, or '') + */ + + /** + * @cfg {String} invalidClass The CSS class to use when marking a field invalid (defaults to "x-form-invalid") + */ + invalidClass : "x-form-invalid", + /** + * @cfg {String} invalidText The error text to use when marking a field invalid and no message is provided + * (defaults to "The value in this field is invalid") + */ + invalidText : "The value in this field is invalid", + /** + * @cfg {String} focusClass The CSS class to use when the field receives focus (defaults to "x-form-focus") + */ + focusClass : "x-form-focus", + /** + * @cfg {String/Boolean} validationEvent The event that should initiate field validation. Set to false to disable + automatic validation (defaults to "keyup"). + */ + validationEvent : "keyup", + /** + * @cfg {Boolean} validateOnBlur Whether the field should validate when it loses focus (defaults to true). + */ + validateOnBlur : true, + /** + * @cfg {Number} validationDelay The length of time in milliseconds after user input begins until validation + * is initiated (defaults to 250) + */ + validationDelay : 250, + /** + * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to + * {tag: "input", type: "text", size: "20", autocomplete: "off"}) + */ + defaultAutoCreate : {tag: "input", type: "text", size: "20", autocomplete: "off"}, + /** + * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field") + */ + fieldClass : "x-form-field", + /** + * @cfg {String} msgTarget The location where error text should display. Should be one of the following values + * (defaults to 'qtip'): + *
        +Value         Description
        +-----------   ----------------------------------------------------------------------
        +qtip          Display a quick tip when the user hovers over the field
        +title         Display a default browser title attribute popup
        +under         Add a block div beneath the field containing the error text
        +side          Add an error icon to the right of the field with a popup on hover
        +[element id]  Add the error text directly to the innerHTML of the specified element
        +
        + */ + msgTarget : 'qtip', + /** + * @cfg {String} msgFx Experimental The effect used when displaying a validation message under the field + * (defaults to 'normal'). + */ + msgFx : 'normal', + + /** + * @cfg {Boolean} readOnly True to mark the field as readOnly in HTML (defaults to false) -- Note: this only + * sets the element's readOnly DOM attribute. + */ + readOnly : false, + + /** + * @cfg {Boolean} disabled True to disable the field (defaults to false). + */ + disabled : false, + + /** + * @cfg {String} inputType The type attribute for input fields -- e.g. radio, text, password (defaults to "text"). + */ + + /** + * @cfg {Number} tabIndex The tabIndex for this field. Note this only applies to fields that are rendered, + * not those which are built via applyTo (defaults to undefined). + */ + + // private + isFormField : true, + + // private + hasFocus : false, + + /** + * @cfg {Mixed} value A value to initialize this field with. + */ + + /** + * @cfg {String} name The field's HTML name attribute. + */ + /** + * @cfg {String} cls A CSS class to apply to the field's underlying element. + */ + + // private ?? + initComponent : function(){ + Ext.form.Field.superclass.initComponent.call(this); + this.addEvents( + /** + * @event focus + * Fires when this field receives input focus. + * @param {Ext.form.Field} this + */ + 'focus', + /** + * @event blur + * Fires when this field loses input focus. + * @param {Ext.form.Field} this + */ + 'blur', + /** + * @event specialkey + * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. You can check + * {@link Ext.EventObject#getKey} to determine which key was pressed. + * @param {Ext.form.Field} this + * @param {Ext.EventObject} e The event object + */ + 'specialkey', + /** + * @event change + * Fires just before the field blurs if the field value has changed. + * @param {Ext.form.Field} this + * @param {Mixed} newValue The new value + * @param {Mixed} oldValue The original value + */ + 'change', + /** + * @event invalid + * Fires after the field has been marked as invalid. + * @param {Ext.form.Field} this + * @param {String} msg The validation message + */ + 'invalid', + /** + * @event valid + * Fires after the field has been validated with no errors. + * @param {Ext.form.Field} this + */ + 'valid' + ); + }, + + /** + * Returns the name attribute of the field if available + * @return {String} name The field name + */ + getName: function(){ + return this.rendered && this.el.dom.name ? this.el.dom.name : (this.hiddenName || ''); + }, + + // private + onRender : function(ct, position){ + Ext.form.Field.superclass.onRender.call(this, ct, position); + if(!this.el){ + var cfg = this.getAutoCreate(); + if(!cfg.name){ + cfg.name = this.name || this.id; + } + if(this.inputType){ + cfg.type = this.inputType; + } + this.el = ct.createChild(cfg, position); + } + var type = this.el.dom.type; + if(type){ + if(type == 'password'){ + type = 'text'; + } + this.el.addClass('x-form-'+type); + } + if(this.readOnly){ + this.el.dom.readOnly = true; + } + if(this.tabIndex !== undefined){ + this.el.dom.setAttribute('tabIndex', this.tabIndex); + } + + this.el.addClass([this.fieldClass, this.cls]); + this.initValue(); + }, + + // private + initValue : function(){ + if(this.value !== undefined){ + this.setValue(this.value); + }else if(this.el.dom.value.length > 0){ + this.setValue(this.el.dom.value); + } + }, + + /** + * Returns true if this field has been changed since it was originally loaded and is not disabled. + */ + isDirty : function() { + if(this.disabled) { + return false; + } + return String(this.getValue()) !== String(this.originalValue); + }, + + // private + afterRender : function(){ + Ext.form.Field.superclass.afterRender.call(this); + this.initEvents(); + }, + + // private + fireKey : function(e){ + if(e.isSpecialKey()){ + this.fireEvent("specialkey", this, e); + } + }, + + /** + * Resets the current field value to the originally loaded value and clears any validation messages + */ + reset : function(){ + this.setValue(this.originalValue); + this.clearInvalid(); + }, + + // private + initEvents : function(){ + this.el.on(Ext.isIE ? "keydown" : "keypress", this.fireKey, this); + this.el.on("focus", this.onFocus, this); + this.el.on("blur", this.onBlur, this); + + // reference to original value for reset + this.originalValue = this.getValue(); + }, + + // private + onFocus : function(){ + if(!Ext.isOpera && this.focusClass){ // don't touch in Opera + this.el.addClass(this.focusClass); + } + if(!this.hasFocus){ + this.hasFocus = true; + this.startValue = this.getValue(); + this.fireEvent("focus", this); + } + }, + + beforeBlur : Ext.emptyFn, + + // private + onBlur : function(){ + this.beforeBlur(); + if(!Ext.isOpera && this.focusClass){ // don't touch in Opera + this.el.removeClass(this.focusClass); + } + this.hasFocus = false; + if(this.validationEvent !== false && this.validateOnBlur && this.validationEvent != "blur"){ + this.validate(); + } + var v = this.getValue(); + if(String(v) !== String(this.startValue)){ + this.fireEvent('change', this, v, this.startValue); + } + this.fireEvent("blur", this); + }, + + /** + * Returns whether or not the field value is currently valid + * @param {Boolean} preventMark True to disable marking the field invalid + * @return {Boolean} True if the value is valid, else false + */ + isValid : function(preventMark){ + if(this.disabled){ + return true; + } + var restore = this.preventMark; + this.preventMark = preventMark === true; + var v = this.validateValue(this.processValue(this.getRawValue())); + this.preventMark = restore; + return v; + }, + + /** + * Validates the field value + * @return {Boolean} True if the value is valid, else false + */ + validate : function(){ + if(this.disabled || this.validateValue(this.processValue(this.getRawValue()))){ + this.clearInvalid(); + return true; + } + return false; + }, + + processValue : function(value){ + return value; + }, + + // private + // Subclasses should provide the validation implementation by overriding this + validateValue : function(value){ + return true; + }, + + /** + * Mark this field as invalid + * @param {String} msg The validation message + */ + markInvalid : function(msg){ + if(!this.rendered || this.preventMark){ // not rendered + return; + } + this.el.addClass(this.invalidClass); + msg = msg || this.invalidText; + switch(this.msgTarget){ + case 'qtip': + this.el.dom.qtip = msg; + this.el.dom.qclass = 'x-form-invalid-tip'; + if(Ext.QuickTips){ // fix for floating editors interacting with DND + Ext.QuickTips.enable(); + } + break; + case 'title': + this.el.dom.title = msg; + break; + case 'under': + if(!this.errorEl){ + var elp = this.el.findParent('.x-form-element', 5, true); + this.errorEl = elp.createChild({cls:'x-form-invalid-msg'}); + this.errorEl.setWidth(elp.getWidth(true)-20); + } + this.errorEl.update(msg); + Ext.form.Field.msgFx[this.msgFx].show(this.errorEl, this); + break; + case 'side': + if(!this.errorIcon){ + var elp = this.el.findParent('.x-form-element', 5, true); + this.errorIcon = elp.createChild({cls:'x-form-invalid-icon'}); + } + this.alignErrorIcon(); + this.errorIcon.dom.qtip = msg; + this.errorIcon.dom.qclass = 'x-form-invalid-tip'; + this.errorIcon.show(); + this.on('resize', this.alignErrorIcon, this); + break; + default: + var t = Ext.getDom(this.msgTarget); + t.innerHTML = msg; + t.style.display = this.msgDisplay; + break; + } + this.fireEvent('invalid', this, msg); + }, + + // private + alignErrorIcon : function(){ + this.errorIcon.alignTo(this.el, 'tl-tr', [2, 0]); + }, + + /** + * Clear any invalid styles/messages for this field + */ + clearInvalid : function(){ + if(!this.rendered || this.preventMark){ // not rendered + return; + } + this.el.removeClass(this.invalidClass); + switch(this.msgTarget){ + case 'qtip': + this.el.dom.qtip = ''; + break; + case 'title': + this.el.dom.title = ''; + break; + case 'under': + if(this.errorEl){ + Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl, this); + } + break; + case 'side': + if(this.errorIcon){ + this.errorIcon.dom.qtip = ''; + this.errorIcon.hide(); + this.un('resize', this.alignErrorIcon, this); + } + break; + default: + var t = Ext.getDom(this.msgTarget); + t.innerHTML = ''; + t.style.display = 'none'; + break; + } + this.fireEvent('valid', this); + }, + + /** + * Returns the raw data value which may or may not be a valid, defined value. To return a normalized value see {@link #getValue}. + * @return {Mixed} value The field value + */ + getRawValue : function(){ + var v = this.rendered ? this.el.getValue() : Ext.value(this.value, ''); + if(v === this.emptyText){ + v = ''; + } + return v; + }, + + /** + * Returns the normalized data value (undefined or emptyText will be returned as ''). To return the raw value see {@link #getRawValue}. + * @return {Mixed} value The field value + */ + getValue : function(){ + if(!this.rendered) { + return this.value; + } + var v = this.el.getValue(); + if(v === this.emptyText || v === undefined){ + v = ''; + } + return v; + }, + + /** + * Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation see {@link #setValue}. + * @param {Mixed} value The value to set + */ + setRawValue : function(v){ + return this.el.dom.value = (v === null || v === undefined ? '' : v); + }, + + /** + * Sets a data value into the field and validates it. To set the value directly without validation see {@link #setRawValue}. + * @param {Mixed} value The value to set + */ + setValue : function(v){ + this.value = v; + if(this.rendered){ + this.el.dom.value = (v === null || v === undefined ? '' : v); + this.validate(); + } + }, + + adjustSize : function(w, h){ + var s = Ext.form.Field.superclass.adjustSize.call(this, w, h); + s.width = this.adjustWidth(this.el.dom.tagName, s.width); + return s; + }, + + adjustWidth : function(tag, w){ + tag = tag.toLowerCase(); + if(typeof w == 'number' && !Ext.isSafari){ + if(Ext.isIE && (tag == 'input' || tag == 'textarea')){ + if(tag == 'input' && !Ext.isStrict){ + return w - 3; + } + if(tag == 'input' && Ext.isStrict){ + return w - (Ext.isIE6 ? 4 : 1); + } + if(tag = 'textarea' && Ext.isStrict){ + return w-2; + } + }else if(Ext.isOpera && Ext.isStrict){ + if(tag == 'input'){ + return w + 2; + } + if(tag = 'textarea'){ + return w-2; + } + } + } + return w; + } +}); + + +// anything other than normal should be considered experimental +Ext.form.Field.msgFx = { + normal : { + show: function(msgEl, f){ + msgEl.setDisplayed('block'); + }, + + hide : function(msgEl, f){ + msgEl.setDisplayed(false).update(''); + } + }, + + slide : { + show: function(msgEl, f){ + msgEl.slideIn('t', {stopFx:true}); + }, + + hide : function(msgEl, f){ + msgEl.slideOut('t', {stopFx:true,useDisplay:true}); + } + }, + + slideRight : { + show: function(msgEl, f){ + msgEl.fixDisplay(); + msgEl.alignTo(f.el, 'tl-tr'); + msgEl.slideIn('l', {stopFx:true}); + }, + + hide : function(msgEl, f){ + msgEl.slideOut('l', {stopFx:true,useDisplay:true}); + } + } +}; +Ext.reg('field', Ext.form.Field); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/FieldSet.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/FieldSet.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/FieldSet.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,125 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.FieldSet + * @extends Ext.Panel + * Standard container used for grouping form fields. + * @constructor + * @param {Object} config Configuration options + */ +Ext.form.FieldSet = Ext.extend(Ext.Panel, { + /** + * @cfg {Boolean} checkboxToggle True to render a checkbox into the fieldset frame just in front of the legend + * (defaults to false). The fieldset will be expanded or collapsed when the checkbox is toggled. + */ + /** + * @cfg {String} checkboxName The name to assign to the fieldset's checkbox if {@link #checkboxToggle} = true + * (defaults to '[checkbox id]-checkbox'). + */ + /** + * @cfg {Number} labelWidth The width of labels. This property cascades to child containers. + */ + /** + * @cfg {String} itemCls A css class to apply to the x-form-item of fields. This property cascades to child containers. + */ + /** + * @cfg {String} baseCls The base CSS class applied to the fieldset (defaults to 'x-fieldset'). + */ + baseCls:'x-fieldset', + /** + * @cfg {String} layout The {@link Ext.Container#layout} to use inside the fieldset (defaults to 'form'). + */ + layout: 'form', + + // private + onRender : function(ct, position){ + if(!this.el){ + this.el = document.createElement('fieldset'); + this.el.id = this.id; + this.el.appendChild(document.createElement('legend')).className = 'x-fieldset-header'; + } + + Ext.form.FieldSet.superclass.onRender.call(this, ct, position); + + if(this.checkboxToggle){ + var o = typeof this.checkboxToggle == 'object' ? + this.checkboxToggle : + {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}; + this.checkbox = this.header.insertFirst(o); + this.checkbox.dom.checked = !this.collapsed; + this.checkbox.on('click', this.onCheckClick, this); + } + }, + + // private + onCollapse : function(doAnim, animArg){ + if(this.checkbox){ + this.checkbox.dom.checked = false; + } + this.afterCollapse(); + + }, + + // private + onExpand : function(doAnim, animArg){ + if(this.checkbox){ + this.checkbox.dom.checked = true; + } + this.afterExpand(); + }, + + /* //protected + * This function is called by the fieldset's checkbox when it is toggled (only applies when + * checkboxToggle = true). This method should never be called externally, but can be + * overridden to provide custom behavior when the checkbox is toggled if needed. + */ + onCheckClick : function(){ + this[this.checkbox.dom.checked ? 'expand' : 'collapse'](); + } + + /** @cfg {String/Number} activeItem @hide */ + /** @cfg {Mixed} applyTo @hide */ + /** @cfg {Object/Array} bbar @hide */ + /** @cfg {Boolean} bodyBorder @hide */ + /** @cfg {Boolean} border @hide */ + /** @cfg {Boolean/Number} bufferResize @hide */ + /** @cfg {String} buttonAlign @hide */ + /** @cfg {Array} buttons @hide */ + /** @cfg {Boolean} collapseFirst @hide */ + /** @cfg {String} defaultType @hide */ + /** @cfg {String} disabledClass @hide */ + /** @cfg {String} elements @hide */ + /** @cfg {Boolean} floating @hide */ + /** @cfg {Boolean} footer @hide */ + /** @cfg {Boolean} frame @hide */ + /** @cfg {Boolean} header @hide */ + /** @cfg {Boolean} headerAsText @hide */ + /** @cfg {Boolean} hideCollapseTool @hide */ + /** @cfg {String} iconCls @hide */ + /** @cfg {Boolean/String} shadow @hide */ + /** @cfg {Number} shadowOffset @hide */ + /** @cfg {Boolean} shim @hide */ + /** @cfg {Object/Array} tbar @hide */ + /** @cfg {Boolean} titleCollapse @hide */ + /** @cfg {Array} tools @hide */ + /** @cfg {String} xtype @hide */ + /** @property header @hide */ + /** @property footer @hide */ + /** @method focus @hide */ + /** @method getBottomToolbar @hide */ + /** @method getTopToolbar @hide */ + /** @method setIconClass @hide */ + /** @event activate @hide */ + /** @event beforeclose @hide */ + /** @event bodyresize @hide */ + /** @event close @hide */ + /** @event deactivate @hide */ +}); +Ext.reg('fieldset', Ext.form.FieldSet); + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Form.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Form.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Form.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,237 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.FormPanel + * @extends Ext.Panel + * Standard form container. + *

        Although they are not listed, this class also accepts all the config options required to configure its internal {@link Ext.form.BasicForm}

        + *

        + * FormPanel uses a {@link Ext.layout.FormLayout} internally, and that is required for fields and labels to work correctly + * within the FormPanel's layout. To nest additional layout styles within a FormPanel, you should nest additional Panels + * or other containers that can provide additional layout functionality. You should not override FormPanel's layout. + *

        + * By default, Ext Forms are submitted through Ajax, using {@link Ext.form.Action}. + * To enable normal browser submission of the Ext Form contained in this FormPanel, + * override the Form's onSubmit, and submit methods:

        
        +    var myForm = new Ext.form.FormPanel({
        +        onSubmit: Ext.emptyFn,
        +        submit: function() {
        +            this.getForm().getEl().dom.submit();
        +        }
        +    });

        + * @constructor + * @param {Object} config Configuration options + */ +Ext.FormPanel = Ext.extend(Ext.Panel, { + /** + * @cfg {Number} labelWidth The width of labels. This property cascades to child containers. + */ + /** + * @cfg {String} itemCls A css class to apply to the x-form-item of fields. This property cascades to child containers. + */ + /** + * @cfg {String} buttonAlign Valid values are "left," "center" and "right" (defaults to "center") + */ + buttonAlign:'center', + + /** + * @cfg {Number} minButtonWidth Minimum width of all buttons in pixels (defaults to 75) + */ + minButtonWidth:75, + + /** + * @cfg {String} labelAlign Valid values are "left," "top" and "right" (defaults to "left"). + * This property cascades to child containers if not set. + */ + labelAlign:'left', + + /** + * @cfg {Boolean} monitorValid If true the form monitors its valid state client-side and + * fires a looping event with that state. This is required to bind buttons to the valid + * state using the config value formBind:true on the button. + */ + monitorValid : false, + + /** + * @cfg {Number} monitorPoll The milliseconds to poll valid state, ignored if monitorValid is not true (defaults to 200) + */ + monitorPoll : 200, + + /** + * @cfg {String} layout @hide + */ + layout: 'form', + + // private + initComponent :function(){ + this.form = this.createForm(); + + Ext.FormPanel.superclass.initComponent.call(this); + + this.addEvents( + /** + * @event clientvalidation + * If the monitorValid config option is true, this event fires repetitively to notify of valid state + * @param {Form} this + * @param {Boolean} valid true if the form has passed client-side validation + */ + 'clientvalidation' + ); + + this.relayEvents(this.form, ['beforeaction', 'actionfailed', 'actioncomplete']); + }, + + // private + createForm: function(){ + delete this.initialConfig.listeners; + return new Ext.form.BasicForm(null, this.initialConfig); + }, + + // private + initFields : function(){ + var f = this.form; + var formPanel = this; + var fn = function(c){ + if(c.doLayout && c != formPanel){ + Ext.applyIf(c, { + labelAlign: c.ownerCt.labelAlign, + labelWidth: c.ownerCt.labelWidth, + itemCls: c.ownerCt.itemCls + }); + if(c.items){ + c.items.each(fn); + } + }else if(c.isFormField){ + f.add(c); + } + } + this.items.each(fn); + }, + + // private + getLayoutTarget : function(){ + return this.form.el; + }, + + /** + * Provides access to the {@link Ext.form.BasicForm Form} which this Panel contains. + * @return {Ext.form.BasicForm} The {@link Ext.form.BasicForm Form} which this Panel contains. + */ + getForm : function(){ + return this.form; + }, + + // private + onRender : function(ct, position){ + this.initFields(); + + Ext.FormPanel.superclass.onRender.call(this, ct, position); + var o = { + tag: 'form', + method : this.method || 'POST', + id : this.formId || Ext.id() + }; + if(this.fileUpload) { + o.enctype = 'multipart/form-data'; + } + this.form.initEl(this.body.createChild(o)); + }, + + // private + beforeDestroy: function(){ + Ext.FormPanel.superclass.beforeDestroy.call(this); + Ext.destroy(this.form); + }, + + // private + initEvents : function(){ + Ext.FormPanel.superclass.initEvents.call(this); + + if(this.monitorValid){ // initialize after render + this.startMonitoring(); + } + }, + + /** + * Starts monitoring of the valid state of this form. Usually this is done by passing the config + * option "monitorValid" + */ + startMonitoring : function(){ + if(!this.bound){ + this.bound = true; + Ext.TaskMgr.start({ + run : this.bindHandler, + interval : this.monitorPoll || 200, + scope: this + }); + } + }, + + /** + * Stops monitoring of the valid state of this form + */ + stopMonitoring : function(){ + this.bound = false; + }, + + /** + * This is a proxy for the underlying BasicForm's {@link Ext.form.BasicForm#load} call. + * @param {Object} options The options to pass to the action (see {@link Ext.form.BasicForm#doAction} for details) + */ + load : function(){ + this.form.load.apply(this.form, arguments); + }, + + // private + onDisable : function(){ + Ext.FormPanel.superclass.onDisable.call(this); + if(this.form){ + this.form.items.each(function(){ + this.disable(); + }); + } + }, + + // private + onEnable : function(){ + Ext.FormPanel.superclass.onEnable.call(this); + if(this.form){ + this.form.items.each(function(){ + this.enable(); + }); + } + }, + + // private + bindHandler : function(){ + if(!this.bound){ + return false; // stops binding + } + var valid = true; + this.form.items.each(function(f){ + if(!f.isValid(true)){ + valid = false; + return false; + } + }); + if(this.buttons){ + for(var i = 0, len = this.buttons.length; i < len; i++){ + var btn = this.buttons[i]; + if(btn.formBind === true && btn.disabled === valid){ + btn.setDisabled(!valid); + } + } + } + this.fireEvent('clientvalidation', this, valid); + } +}); +Ext.reg('form', Ext.FormPanel); + +Ext.form.FormPanel = Ext.FormPanel; + Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Hidden.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Hidden.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Hidden.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,40 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.Hidden + * @extends Ext.form.Field + * A basic hidden field for storing hidden values in forms that need to be passed in the form submit. + * @constructor + * Create a new Hidden field. + * @param {Object} config Configuration options + */ +Ext.form.Hidden = Ext.extend(Ext.form.Field, { + // private + inputType : 'hidden', + + // private + onRender : function(){ + Ext.form.Hidden.superclass.onRender.apply(this, arguments); + }, + + // private + initEvents : function(){ + this.originalValue = this.getValue(); + }, + + // These are all private overrides + setSize : Ext.emptyFn, + setWidth : Ext.emptyFn, + setHeight : Ext.emptyFn, + setPosition : Ext.emptyFn, + setPagePosition : Ext.emptyFn, + markInvalid : Ext.emptyFn, + clearInvalid : Ext.emptyFn +}); +Ext.reg('hidden', Ext.form.Hidden); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/HtmlEditor.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/HtmlEditor.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/HtmlEditor.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,961 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.HtmlEditor + * @extends Ext.form.Field + * Provides a lightweight HTML Editor component. + *

        Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT + * supported by this editor.

        + * An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within + * any element that has display set to 'none' can cause problems in Safari and Firefox due to their default iframe reloading bugs. + */ + +Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { + /** + * @cfg {Boolean} enableFormat Enable the bold, italic and underline buttons (defaults to true) + */ + enableFormat : true, + /** + * @cfg {Boolean} enableFontSize Enable the increase/decrease font size buttons (defaults to true) + */ + enableFontSize : true, + /** + * @cfg {Boolean} enableColors Enable the fore/highlight color buttons (defaults to true) + */ + enableColors : true, + /** + * @cfg {Boolean} enableAlignments Enable the left, center, right alignment buttons (defaults to true) + */ + enableAlignments : true, + /** + * @cfg {Boolean} enableLists Enable the bullet and numbered list buttons. Not available in Safari. (defaults to true) + */ + enableLists : true, + /** + * @cfg {Boolean} enableSourceEdit Enable the switch to source edit button. Not available in Safari. (defaults to true) + */ + enableSourceEdit : true, + /** + * @cfg {Boolean} enableLinks Enable the create link button. Not available in Safari. (defaults to true) + */ + enableLinks : true, + /** + * @cfg {Boolean} enableFont Enable font selection. Not available in Safari. (defaults to true) + */ + enableFont : true, + /** + * @cfg {String} createLinkText The default text for the create link prompt + */ + createLinkText : 'Please enter the URL for the link:', + /** + * @cfg {String} defaultLinkValue The default value for the create link prompt (defaults to http:/ /) + */ + defaultLinkValue : 'http:/'+'/', + /** + * @cfg {Array} fontFamilies An array of available font families + */ + fontFamilies : [ + 'Arial', + 'Courier New', + 'Tahoma', + 'Times New Roman', + 'Verdana' + ], + defaultFont: 'tahoma', + + // private properties + validationEvent : false, + deferHeight: true, + initialized : false, + activated : false, + sourceEditMode : false, + onFocus : Ext.emptyFn, + iframePad:3, + hideMode:'offsets', + defaultAutoCreate : { + tag: "textarea", + style:"width:500px;height:300px;", + autocomplete: "off" + }, + + // private + initComponent : function(){ + this.addEvents( + /** + * @event initialize + * Fires when the editor is fully initialized (including the iframe) + * @param {HtmlEditor} this + */ + 'initialize', + /** + * @event activate + * Fires when the editor is first receives the focus. Any insertion must wait + * until after this event. + * @param {HtmlEditor} this + */ + 'activate', + /** + * @event beforesync + * Fires before the textarea is updated with content from the editor iframe. Return false + * to cancel the sync. + * @param {HtmlEditor} this + * @param {String} html + */ + 'beforesync', + /** + * @event beforepush + * Fires before the iframe editor is updated with content from the textarea. Return false + * to cancel the push. + * @param {HtmlEditor} this + * @param {String} html + */ + 'beforepush', + /** + * @event sync + * Fires when the textarea is updated with content from the editor iframe. + * @param {HtmlEditor} this + * @param {String} html + */ + 'sync', + /** + * @event push + * Fires when the iframe editor is updated with content from the textarea. + * @param {HtmlEditor} this + * @param {String} html + */ + 'push', + /** + * @event editmodechange + * Fires when the editor switches edit modes + * @param {HtmlEditor} this + * @param {Boolean} sourceEdit True if source edit, false if standard editing. + */ + 'editmodechange' + ) + }, + + createFontOptions : function(){ + var buf = [], fs = this.fontFamilies, ff, lc; + for(var i = 0, len = fs.length; i< len; i++){ + ff = fs[i]; + lc = ff.toLowerCase(); + buf.push( + '' + ); + } + return buf.join(''); + }, + /** + * Protected method that will not generally be called directly. It + * is called when the editor creates its toolbar. Override this method if you need to + * add custom toolbar buttons. + * @param {HtmlEditor} editor + */ + createToolbar : function(editor){ + + function btn(id, toggle, handler){ + return { + itemId : id, + cls : 'x-btn-icon x-edit-'+id, + enableToggle:toggle !== false, + scope: editor, + handler:handler||editor.relayBtnCmd, + clickEvent:'mousedown', + tooltip: editor.buttonTips[id] || undefined, + tabIndex:-1 + }; + } + + // build the toolbar + var tb = new Ext.Toolbar({ + renderTo:this.wrap.dom.firstChild + }); + + // stop form submits + tb.el.on('click', function(e){ + e.preventDefault(); + }); + + if(this.enableFont && !Ext.isSafari){ + this.fontSelect = tb.el.createChild({ + tag:'select', + cls:'x-font-select', + html: this.createFontOptions() + }); + this.fontSelect.on('change', function(){ + var font = this.fontSelect.dom.value; + this.relayCmd('fontname', font); + this.deferFocus(); + }, this); + tb.add( + this.fontSelect.dom, + '-' + ); + }; + + if(this.enableFormat){ + tb.add( + btn('bold'), + btn('italic'), + btn('underline') + ); + }; + + if(this.enableFontSize){ + tb.add( + '-', + btn('increasefontsize', false, this.adjustFont), + btn('decreasefontsize', false, this.adjustFont) + ); + }; + + if(this.enableColors){ + tb.add( + '-', { + itemId:'forecolor', + cls:'x-btn-icon x-edit-forecolor', + clickEvent:'mousedown', + tooltip: editor.buttonTips['forecolor'] || undefined, + tabIndex:-1, + menu : new Ext.menu.ColorMenu({ + allowReselect: true, + focus: Ext.emptyFn, + value:'000000', + plain:true, + selectHandler: function(cp, color){ + this.execCmd('forecolor', Ext.isSafari || Ext.isIE ? '#'+color : color); + this.deferFocus(); + }, + scope: this, + clickEvent:'mousedown' + }) + }, { + itemId:'backcolor', + cls:'x-btn-icon x-edit-backcolor', + clickEvent:'mousedown', + tooltip: editor.buttonTips['backcolor'] || undefined, + tabIndex:-1, + menu : new Ext.menu.ColorMenu({ + focus: Ext.emptyFn, + value:'FFFFFF', + plain:true, + allowReselect: true, + selectHandler: function(cp, color){ + if(Ext.isGecko){ + this.execCmd('useCSS', false); + this.execCmd('hilitecolor', color); + this.execCmd('useCSS', true); + this.deferFocus(); + }else{ + this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isSafari || Ext.isIE ? '#'+color : color); + this.deferFocus(); + } + }, + scope:this, + clickEvent:'mousedown' + }) + } + ); + }; + + if(this.enableAlignments){ + tb.add( + '-', + btn('justifyleft'), + btn('justifycenter'), + btn('justifyright') + ); + }; + + if(!Ext.isSafari){ + if(this.enableLinks){ + tb.add( + '-', + btn('createlink', false, this.createLink) + ); + }; + + if(this.enableLists){ + tb.add( + '-', + btn('insertorderedlist'), + btn('insertunorderedlist') + ); + } + if(this.enableSourceEdit){ + tb.add( + '-', + btn('sourceedit', true, function(btn){ + this.toggleSourceEdit(btn.pressed); + }) + ); + } + } + + this.tb = tb; + }, + + /** + * Protected method that will not generally be called directly. It + * is called when the editor initializes the iframe with HTML contents. Override this method if you + * want to change the initialization markup of the iframe (e.g. to add stylesheets). + */ + getDocMarkup : function(){ + return ''; + }, + + getEditorBody : function(){ + return this.doc.body || this.doc.documentElement; + }, + + // private + 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){ // fix IE 1px bogus margin + this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;') + } + this.wrap = this.el.wrap({ + cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'} + }); + + this.createToolbar(this); + + this.tb.items.each(function(item){ + if(item.itemId != 'sourceedit'){ + item.disable(); + } + }); + + var iframe = document.createElement('iframe'); + iframe.name = Ext.id(); + iframe.frameBorder = 'no'; + + iframe.src=(Ext.SSL_SECURE_URL || "javascript:false"); + + this.wrap.dom.appendChild(iframe); + + this.iframe = iframe; + + if(Ext.isIE){ + iframe.contentWindow.document.designMode = 'on'; + this.doc = iframe.contentWindow.document; + this.win = iframe.contentWindow; + } else { + this.doc = (iframe.contentDocument || window.frames[iframe.name].document); + this.win = window.frames[iframe.name]; + this.doc.designMode = 'on'; + } + this.doc.open(); + this.doc.write(this.getDocMarkup()) + this.doc.close(); + + var task = { // must defer to wait for browser to be ready + run : function(){ + if(this.doc.body || this.doc.readyState == 'complete'){ + Ext.TaskMgr.stop(task); + this.doc.designMode="on"; + this.initEditor.defer(10, this); + } + }, + interval : 10, + duration:10000, + scope: this + }; + Ext.TaskMgr.start(task); + + if(!this.width){ + this.setSize(this.el.getSize()); + } + }, + + // private + onResize : function(w, h){ + Ext.form.HtmlEditor.superclass.onResize.apply(this, arguments); + if(this.el && this.iframe){ + if(typeof w == 'number'){ + var aw = w - this.wrap.getFrameWidth('lr'); + this.el.setWidth(this.adjustWidth('textarea', aw)); + this.iframe.style.width = aw + 'px'; + } + if(typeof h == 'number'){ + var ah = h - this.wrap.getFrameWidth('tb') - this.tb.el.getHeight(); + this.el.setHeight(this.adjustWidth('textarea', ah)); + this.iframe.style.height = ah + 'px'; + if(this.doc){ + this.getEditorBody().style.height = (ah - (this.iframePad*2)) + 'px'; + } + } + } + }, + + /** + * Toggles the editor between standard and source edit mode. + * @param {Boolean} sourceEdit (optional) True for source edit, false for standard + */ + toggleSourceEdit : function(sourceEditMode){ + if(sourceEditMode === undefined){ + sourceEditMode = !this.sourceEditMode; + } + this.sourceEditMode = sourceEditMode === true; + var btn = this.tb.items.get('sourceedit'); + if(btn.pressed !== this.sourceEditMode){ + btn.toggle(this.sourceEditMode); + return; + } + if(this.sourceEditMode){ + this.tb.items.each(function(item){ + if(item.itemId != 'sourceedit'){ + item.disable(); + } + }); + this.syncValue(); + this.iframe.className = 'x-hidden'; + this.el.removeClass('x-hidden'); + this.el.dom.removeAttribute('tabIndex'); + this.el.focus(); + }else{ + if(this.initialized){ + this.tb.items.each(function(item){ + item.enable(); + }); + } + this.pushValue(); + this.iframe.className = ''; + this.el.addClass('x-hidden'); + this.el.dom.setAttribute('tabIndex', -1); + this.deferFocus(); + } + var lastSize = this.lastSize; + if(lastSize){ + delete this.lastSize; + this.setSize(lastSize); + } + this.fireEvent('editmodechange', this, this.sourceEditMode); + }, + + // private used internally + createLink : function(){ + var url = prompt(this.createLinkText, this.defaultLinkValue); + if(url && url != 'http:/'+'/'){ + this.relayCmd('createlink', url); + } + }, + + // private (for BoxComponent) + adjustSize : Ext.BoxComponent.prototype.adjustSize, + + // private (for BoxComponent) + getResizeEl : function(){ + return this.wrap; + }, + + // private (for BoxComponent) + getPositionEl : function(){ + return this.wrap; + }, + + // private + initEvents : function(){ + this.originalValue = this.getValue(); + }, + + /** + * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide + * @method + */ + markInvalid : Ext.emptyFn, + /** + * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide + * @method + */ + clearInvalid : Ext.emptyFn, + + setValue : function(v){ + Ext.form.HtmlEditor.superclass.setValue.call(this, v); + this.pushValue(); + }, + + /** + * Protected method that will not generally be called directly. If you need/want + * custom HTML cleanup, this is the method you should override. + * @param {String} html The HTML to be cleaned + * return {String} The cleaned HTML + */ + cleanHtml : function(html){ + html = String(html); + if(html.length > 5){ + if(Ext.isSafari){ // strip safari nonsense + html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, ''); + } + } + if(html == ' '){ + html = ''; + } + return html; + }, + + /** + * Protected method that will not generally be called directly. Syncs the contents + * of the editor iframe with the textarea. + */ + syncValue : function(){ + if(this.initialized){ + var bd = this.getEditorBody(); + var html = bd.innerHTML; + if(Ext.isSafari){ + var bs = bd.getAttribute('style'); // Safari puts text-align styles on the body element! + var m = bs.match(/text-align:(.*?);/i); + if(m && m[1]){ + html = '
        ' + html + '
        '; + } + } + html = this.cleanHtml(html); + if(this.fireEvent('beforesync', this, html) !== false){ + this.el.dom.value = html; + this.fireEvent('sync', this, html); + } + } + }, + + /** + * Protected method that will not generally be called directly. Pushes the value of the textarea + * into the iframe editor. + */ + pushValue : function(){ + if(this.initialized){ + var v = this.el.dom.value; + if(!this.activated && v.length < 1){ + v = ' '; + } + if(this.fireEvent('beforepush', this, v) !== false){ + this.getEditorBody().innerHTML = v; + this.fireEvent('push', this, v); + } + } + }, + + // private + deferFocus : function(){ + this.focus.defer(10, this); + }, + + // doc'ed in Field + focus : function(){ + if(this.win && !this.sourceEditMode){ + this.win.focus(); + }else{ + this.el.focus(); + } + }, + + // private + initEditor : function(){ + var dbody = this.getEditorBody(); + var ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat'); + ss['background-attachment'] = 'fixed'; // w3c + dbody.bgProperties = 'fixed'; // ie + Ext.DomHelper.applyStyles(dbody, ss); + Ext.EventManager.on(this.doc, { + 'mousedown': this.onEditorEvent, + 'dblclick': this.onEditorEvent, + 'click': this.onEditorEvent, + 'keyup': this.onEditorEvent, + buffer:100, + scope: this + }); + if(Ext.isGecko){ + Ext.EventManager.on(this.doc, 'keypress', this.applyCommand, this); + } + if(Ext.isIE || Ext.isSafari || Ext.isOpera){ + Ext.EventManager.on(this.doc, 'keydown', this.fixKeys, this); + } + this.initialized = true; + + this.fireEvent('initialize', this); + this.pushValue(); + }, + + // private + onDestroy : function(){ + if(this.rendered){ + this.tb.items.each(function(item){ + if(item.menu){ + item.menu.removeAll(); + if(item.menu.el){ + item.menu.el.destroy(); + } + } + item.destroy(); + }); + this.wrap.dom.innerHTML = ''; + this.wrap.remove(); + } + }, + + // private + onFirstFocus : function(){ + this.activated = true; + this.tb.items.each(function(item){ + item.enable(); + }); + if(Ext.isGecko){ // prevent silly gecko errors + this.win.focus(); + var s = this.win.getSelection(); + if(!s.focusNode || s.focusNode.nodeType != 3){ + var r = s.getRangeAt(0); + r.selectNodeContents(this.getEditorBody()); + r.collapse(true); + this.deferFocus(); + } + try{ + this.execCmd('useCSS', true); + this.execCmd('styleWithCSS', false); + }catch(e){} + } + this.fireEvent('activate', this); + }, + + // private + adjustFont: function(btn){ + var adjust = btn.itemId == 'increasefontsize' ? 1 : -1; + if(Ext.isSafari){ // safari + adjust *= 2; + } + var v = parseInt(this.doc.queryCommandValue('FontSize')|| 3, 10); + v = Math.max(1, v+adjust); + this.execCmd('FontSize', v + (Ext.isSafari ? 'px' : 0)); + }, + + onEditorEvent : function(e){ + this.updateToolbar(); + }, + + + /** + * Protected method that will not generally be called directly. It triggers + * a toolbar update by reading the markup state of the current selection in the editor. + */ + updateToolbar: function(){ + + if(!this.activated){ + this.onFirstFocus(); + return; + } + + var btns = this.tb.items.map, doc = this.doc; + + if(this.enableFont && !Ext.isSafari){ + var name = (this.doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase(); + if(name != this.fontSelect.dom.value){ + this.fontSelect.dom.value = name; + } + } + if(this.enableFormat){ + btns.bold.toggle(doc.queryCommandState('bold')); + btns.italic.toggle(doc.queryCommandState('italic')); + btns.underline.toggle(doc.queryCommandState('underline')); + } + if(this.enableAlignments){ + btns.justifyleft.toggle(doc.queryCommandState('justifyleft')); + btns.justifycenter.toggle(doc.queryCommandState('justifycenter')); + btns.justifyright.toggle(doc.queryCommandState('justifyright')); + } + if(!Ext.isSafari && this.enableLists){ + btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist')); + btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist')); + } + + Ext.menu.MenuMgr.hideAll(); + + this.syncValue(); + }, + + // private + relayBtnCmd : function(btn){ + this.relayCmd(btn.itemId); + }, + + /** + * Executes a Midas editor command on the editor document and performs necessary focus and + * toolbar updates. This should only be called after the editor is initialized. + * @param {String} cmd The Midas command + * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null) + */ + relayCmd : function(cmd, value){ + this.win.focus(); + this.execCmd(cmd, value); + this.updateToolbar(); + this.deferFocus(); + }, + + /** + * Executes a Midas editor command directly on the editor document. + * For visual commands, you should use {@link #relayCmd} instead. + * This should only be called after the editor is initialized. + * @param {String} cmd The Midas command + * @param {String/Boolean} value (optional) The value to pass to the command (defaults to null) + */ + execCmd : function(cmd, value){ + this.doc.execCommand(cmd, false, value === undefined ? null : value); + this.syncValue(); + }, + + // private + applyCommand : function(e){ + if(e.ctrlKey){ + var c = e.getCharCode(), cmd; + if(c > 0){ + c = String.fromCharCode(c); + switch(c){ + case 'b': + cmd = 'bold'; + break; + case 'i': + cmd = 'italic'; + break; + case 'u': + cmd = 'underline'; + break; + } + if(cmd){ + this.win.focus(); + this.execCmd(cmd); + this.deferFocus(); + e.preventDefault(); + } + } + } + }, + + /** + * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated + * to insert text. + * @param {String} text + */ + insertAtCursor : function(text){ + if(!this.activated){ + return; + } + if(Ext.isIE){ + this.win.focus(); + var r = this.doc.selection.createRange(); + if(r){ + r.collapse(true); + r.pasteHTML(text); + this.syncValue(); + this.deferFocus(); + } + }else if(Ext.isGecko || Ext.isOpera){ + this.win.focus(); + this.execCmd('InsertHTML', text); + this.deferFocus(); + }else if(Ext.isSafari){ + this.execCmd('InsertText', text); + this.deferFocus(); + } + }, + + // private + fixKeys : function(){ // load time branching for fastest keydown performance + if(Ext.isIE){ + return function(e){ + var k = e.getKey(), r; + if(k == e.TAB){ + e.stopEvent(); + r = this.doc.selection.createRange(); + if(r){ + r.collapse(true); + r.pasteHTML('    '); + this.deferFocus(); + } + }else if(k == e.ENTER){ + r = this.doc.selection.createRange(); + if(r){ + var target = r.parentElement(); + if(!target || target.tagName.toLowerCase() != 'li'){ + e.stopEvent(); + r.pasteHTML('
        '); + r.collapse(false); + r.select(); + } + } + } + }; + }else if(Ext.isOpera){ + return function(e){ + var k = e.getKey(); + if(k == e.TAB){ + e.stopEvent(); + this.win.focus(); + this.execCmd('InsertHTML','    '); + this.deferFocus(); + } + }; + }else if(Ext.isSafari){ + return function(e){ + var k = e.getKey(); + if(k == e.TAB){ + e.stopEvent(); + this.execCmd('InsertText','\t'); + this.deferFocus(); + } + }; + } + }(), + + /** + * Returns the editor's toolbar. This is only available after the editor has been rendered. + * @return {Ext.Toolbar} + */ + getToolbar : function(){ + return this.tb; + }, + + /** + * Object collection of toolbar tooltips for the buttons in the editor. The key + * is the command id associated with that button and the value is a valid QuickTips object. + * For example: +
        
        +{
        +    bold : {
        +        title: 'Bold (Ctrl+B)',
        +        text: 'Make the selected text bold.',
        +        cls: 'x-html-editor-tip'
        +    },
        +    italic : {
        +        title: 'Italic (Ctrl+I)',
        +        text: 'Make the selected text italic.',
        +        cls: 'x-html-editor-tip'
        +    },
        +    ...
        +
        + * @type Object + */ + buttonTips : { + bold : { + title: 'Bold (Ctrl+B)', + text: 'Make the selected text bold.', + cls: 'x-html-editor-tip' + }, + italic : { + title: 'Italic (Ctrl+I)', + text: 'Make the selected text italic.', + cls: 'x-html-editor-tip' + }, + underline : { + title: 'Underline (Ctrl+U)', + text: 'Underline the selected text.', + cls: 'x-html-editor-tip' + }, + increasefontsize : { + title: 'Grow Text', + text: 'Increase the font size.', + cls: 'x-html-editor-tip' + }, + decreasefontsize : { + title: 'Shrink Text', + text: 'Decrease the font size.', + cls: 'x-html-editor-tip' + }, + backcolor : { + title: 'Text Highlight Color', + text: 'Change the background color of the selected text.', + cls: 'x-html-editor-tip' + }, + forecolor : { + title: 'Font Color', + text: 'Change the color of the selected text.', + cls: 'x-html-editor-tip' + }, + justifyleft : { + title: 'Align Text Left', + text: 'Align text to the left.', + cls: 'x-html-editor-tip' + }, + justifycenter : { + title: 'Center Text', + text: 'Center text in the editor.', + cls: 'x-html-editor-tip' + }, + justifyright : { + title: 'Align Text Right', + text: 'Align text to the right.', + cls: 'x-html-editor-tip' + }, + insertunorderedlist : { + title: 'Bullet List', + text: 'Start a bulleted list.', + cls: 'x-html-editor-tip' + }, + insertorderedlist : { + title: 'Numbered List', + text: 'Start a numbered list.', + cls: 'x-html-editor-tip' + }, + createlink : { + title: 'Hyperlink', + text: 'Make the selected text a hyperlink.', + cls: 'x-html-editor-tip' + }, + sourceedit : { + title: 'Source Edit', + text: 'Switch to source editing mode.', + cls: 'x-html-editor-tip' + } + } + + // hide stuff that is not compatible + /** + * @event blur + * @hide + */ + /** + * @event change + * @hide + */ + /** + * @event focus + * @hide + */ + /** + * @event specialkey + * @hide + */ + /** + * @cfg {String} fieldClass @hide + */ + /** + * @cfg {String} focusClass @hide + */ + /** + * @cfg {String} autoCreate @hide + */ + /** + * @cfg {String} inputType @hide + */ + /** + * @cfg {String} invalidClass @hide + */ + /** + * @cfg {String} invalidText @hide + */ + /** + * @cfg {String} msgFx @hide + */ + /** + * @cfg {String} validateOnBlur @hide + */ +}); +Ext.reg('htmleditor', Ext.form.HtmlEditor); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/NumberField.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/NumberField.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/NumberField.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,143 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.NumberField + * @extends Ext.form.TextField + * Numeric text field that provides automatic keystroke filtering and numeric validation. + * @constructor + * Creates a new NumberField + * @param {Object} config Configuration options + */ +Ext.form.NumberField = Ext.extend(Ext.form.TextField, { + /** + * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field x-form-num-field") + */ + fieldClass: "x-form-field x-form-num-field", + /** + * @cfg {Boolean} allowDecimals False to disallow decimal values (defaults to true) + */ + allowDecimals : true, + /** + * @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.') + */ + decimalSeparator : ".", + /** + * @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2) + */ + decimalPrecision : 2, + /** + * @cfg {Boolean} allowNegative False to prevent entering a negative sign (defaults to true) + */ + allowNegative : true, + /** + * @cfg {Number} minValue The minimum allowed value (defaults to Number.NEGATIVE_INFINITY) + */ + minValue : Number.NEGATIVE_INFINITY, + /** + * @cfg {Number} maxValue The maximum allowed value (defaults to Number.MAX_VALUE) + */ + maxValue : Number.MAX_VALUE, + /** + * @cfg {String} minText Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is {minValue}") + */ + minText : "The minimum value for this field is {0}", + /** + * @cfg {String} maxText Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is {maxValue}") + */ + maxText : "The maximum value for this field is {0}", + /** + * @cfg {String} nanText Error text to display if the value is not a valid number. For example, this can happen + * if a valid character like '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number") + */ + nanText : "{0} is not a valid number", + /** + * @cfg {String} baseChars The base set of characters to evaluate as valid numbers (defaults to '0123456789'). + */ + baseChars : "0123456789", + + // private + initEvents : function(){ + Ext.form.NumberField.superclass.initEvents.call(this); + var allowed = this.baseChars+''; + if(this.allowDecimals){ + allowed += this.decimalSeparator; + } + if(this.allowNegative){ + allowed += "-"; + } + this.stripCharsRe = new RegExp('[^'+allowed+']', 'gi'); + var keyPress = function(e){ + var k = e.getKey(); + if(!Ext.isIE && (e.isSpecialKey() || k == e.BACKSPACE || k == e.DELETE)){ + return; + } + var c = e.getCharCode(); + if(allowed.indexOf(String.fromCharCode(c)) === -1){ + e.stopEvent(); + } + }; + this.el.on("keypress", keyPress, this); + }, + + // private + validateValue : function(value){ + if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){ + return false; + } + if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid + return true; + } + value = String(value).replace(this.decimalSeparator, "."); + if(isNaN(value)){ + this.markInvalid(String.format(this.nanText, value)); + return false; + } + var num = this.parseValue(value); + if(num < this.minValue){ + this.markInvalid(String.format(this.minText, this.minValue)); + return false; + } + if(num > this.maxValue){ + this.markInvalid(String.format(this.maxText, this.maxValue)); + return false; + } + return true; + }, + + getValue : function(){ + return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this))); + }, + + setValue : function(v){ + Ext.form.NumberField.superclass.setValue.call(this, String(parseFloat(v)).replace(".", this.decimalSeparator)); + }, + + // private + parseValue : function(value){ + value = parseFloat(String(value).replace(this.decimalSeparator, ".")); + return isNaN(value) ? '' : value; + }, + + // private + 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(v){ + this.setValue(this.fixPrecision(v)); + } + } +}); +Ext.reg('numberfield', Ext.form.NumberField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Radio.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Radio.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/Radio.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,40 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.Radio + * @extends Ext.form.Checkbox + * Single radio field. Same as Checkbox, but provided as a convenience for automatically setting the input type. + * Radio grouping is handled automatically by the browser if you give each radio in a group the same name. + * @constructor + * Creates a new Radio + * @param {Object} config Configuration options + */ +Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { + inputType: 'radio', + + /** + * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide + * @method + */ + markInvalid : Ext.emptyFn, + /** + * Overridden and disabled. The editor element does not support standard valid/invalid marking. @hide + * @method + */ + clearInvalid : Ext.emptyFn, + + /** + * If this radio is part of a group, it will return the selected value + * @return {String} + */ + getGroupValue : function(){ + return this.el.up('form').child('input[name='+this.el.dom.name+']:checked', true).value; + } +}); +Ext.reg('radio', Ext.form.Radio); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TextArea.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TextArea.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TextArea.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,116 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.TextArea + * @extends Ext.form.TextField + * Multiline text field. Can be used as a direct replacement for traditional textarea fields, plus adds + * support for auto-sizing. + * @constructor + * Creates a new TextArea + * @param {Object} config Configuration options + */ +Ext.form.TextArea = Ext.extend(Ext.form.TextField, { + /** + * @cfg {Number} growMin The minimum height to allow when grow = true (defaults to 60) + */ + growMin : 60, + /** + * @cfg {Number} growMax The maximum height to allow when grow = true (defaults to 1000) + */ + growMax: 1000, + growAppend : ' \n ', + growPad : 0, + + enterIsSpecial : false, + + /** + * @cfg {Boolean} preventScrollbars True to prevent scrollbars from appearing regardless of how much text is + * in the field (equivalent to setting overflow: hidden, defaults to false) + */ + preventScrollbars: false, + /** + * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to + * {tag: "textarea", style: "width:100px;height:60px;", autocomplete: "off"}) + */ + + // private + onRender : function(ct, position){ + if(!this.el){ + this.defaultAutoCreate = { + tag: "textarea", + style:"width:100px;height:60px;", + autocomplete: "off" + }; + } + Ext.form.TextArea.superclass.onRender.call(this, ct, position); + if(this.grow){ + this.textSizeEl = Ext.DomHelper.append(document.body, { + tag: "pre", cls: "x-form-grow-sizer" + }); + if(this.preventScrollbars){ + this.el.setStyle("overflow", "hidden"); + } + this.el.setHeight(this.growMin); + } + }, + + onDestroy : function(){ + if(this.textSizeEl){ + Ext.removeNode(this.textSizeEl); + } + Ext.form.TextArea.superclass.onDestroy.call(this); + }, + + fireKey : function(e){ + if(e.isSpecialKey() && (this.enterIsSpecial || (e.getKey() != e.ENTER || e.hasModifier()))){ + this.fireEvent("specialkey", this, e); + } + }, + + // private + onKeyUp : function(e){ + if(!e.isNavKeyPress() || e.getKey() == e.ENTER){ + this.autoSize(); + } + }, + + /** + * Automatically grows the field to accomodate the height of the text up to the maximum field height allowed. + * This only takes effect if grow = true, and fires the autosize event if the height changes. + */ + autoSize : function(){ + if(!this.grow || !this.textSizeEl){ + return; + } + var el = this.el; + var v = el.dom.value; + var ts = this.textSizeEl; + ts.innerHTML = ''; + ts.appendChild(document.createTextNode(v)); + v = ts.innerHTML; + + Ext.fly(ts).setWidth(this.el.getWidth()); + if(v.length < 1){ + v = "  "; + }else{ + if(Ext.isIE){ + v = v.replace(/\n/g, '

         

        '); + } + v += this.growAppend; + } + ts.innerHTML = v; + var h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin)+this.growPad); + if(h != this.lastHeight){ + this.lastHeight = h; + this.el.setHeight(h); + this.fireEvent("autosize", this, h); + } + } +}); +Ext.reg('textarea', Ext.form.TextArea); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TextField.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TextField.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TextField.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,319 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.TextField + * @extends Ext.form.Field + * Basic text field. Can be used as a direct replacement for traditional text inputs, or as the base + * class for more sophisticated input controls (like {@link Ext.form.TextArea} and {@link Ext.form.ComboBox}). + * @constructor + * Creates a new TextField + * @param {Object} config Configuration options + */ +Ext.form.TextField = Ext.extend(Ext.form.Field, { + /** + * @cfg {String} vtypeText A custom error message to display in place of the default message provided + * for the {@link #vtype} currently set for this field (defaults to ''). Only applies if vtype is set, else ignored. + */ + /** + * @cfg {Boolean} grow True if this field should automatically grow and shrink to its content + */ + grow : false, + /** + * @cfg {Number} growMin The minimum width to allow when grow = true (defaults to 30) + */ + growMin : 30, + /** + * @cfg {Number} growMax The maximum width to allow when grow = true (defaults to 800) + */ + growMax : 800, + /** + * @cfg {String} vtype A validation type name as defined in {@link Ext.form.VTypes} (defaults to null) + */ + vtype : null, + /** + * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that don't match + * (defaults to null) + */ + maskRe : null, + /** + * @cfg {Boolean} disableKeyFilter True to disable input keystroke filtering (defaults to false) + */ + disableKeyFilter : false, + /** + * @cfg {Boolean} allowBlank False to validate that the value length > 0 (defaults to true) + */ + allowBlank : true, + /** + * @cfg {Number} minLength Minimum input field length required (defaults to 0) + */ + minLength : 0, + /** + * @cfg {Number} maxLength Maximum input field length allowed (defaults to Number.MAX_VALUE) + */ + maxLength : Number.MAX_VALUE, + /** + * @cfg {String} minLengthText Error text to display if the minimum length validation fails (defaults to + * "The minimum length for this field is {minLength}") + */ + minLengthText : "The minimum length for this field is {0}", + /** + * @cfg {String} maxLengthText Error text to display if the maximum length validation fails (defaults to + * "The maximum length for this field is {maxLength}") + */ + maxLengthText : "The maximum length for this field is {0}", + /** + * @cfg {Boolean} selectOnFocus True to automatically select any existing field text when the field receives + * input focus (defaults to false) + */ + selectOnFocus : false, + /** + * @cfg {String} blankText Error text to display if the allow blank validation fails (defaults to "This field is required") + */ + blankText : "This field is required", + /** + * @cfg {Function} validator A custom validation function to be called during field validation (defaults to null). + * If available, this function will be called only after the basic validators all return true, and will be passed the + * current field value and expected to return boolean true if the value is valid or a string error message if invalid. + */ + validator : null, + /** + * @cfg {RegExp} regex A JavaScript RegExp object to be tested against the field value during validation (defaults to null). + * If available, this regex will be evaluated only after the basic validators all return true, and will be passed the + * current field value. If the test fails, the field will be marked invalid using {@link #regexText}. + */ + regex : null, + /** + * @cfg {String} regexText The error text to display if {@link #regex} is used and the test fails during + * validation (defaults to "") + */ + regexText : "", + /** + * @cfg {String} emptyText The default text to display in an empty field (defaults to null). + */ + emptyText : null, + /** + * @cfg {String} emptyClass The CSS class to apply to an empty field to style the {@link #emptyText} (defaults to + * 'x-form-empty-field'). This class is automatically added and removed as needed depending on the current field value. + */ + emptyClass : 'x-form-empty-field', + + initComponent : function(){ + Ext.form.TextField.superclass.initComponent.call(this); + this.addEvents( + /** + * @event autosize + * Fires when the autosize function is triggered. The field may or may not have actually changed size + * according to the default logic, but this event provides a hook for the developer to apply additional + * logic at runtime to resize the field if needed. + * @param {Ext.form.Field} this This text field + * @param {Number} width The new field width + */ + 'autosize' + ); + }, + + // private + initEvents : function(){ + Ext.form.TextField.superclass.initEvents.call(this); + if(this.validationEvent == 'keyup'){ + this.validationTask = new Ext.util.DelayedTask(this.validate, this); + this.el.on('keyup', this.filterValidation, this); + } + else if(this.validationEvent !== false){ + this.el.on(this.validationEvent, this.validate, this, {buffer: this.validationDelay}); + } + if(this.selectOnFocus || this.emptyText){ + this.on("focus", this.preFocus, this); + if(this.emptyText){ + this.on('blur', this.postBlur, this); + this.applyEmptyText(); + } + } + if(this.maskRe || (this.vtype && this.disableKeyFilter !== true && (this.maskRe = Ext.form.VTypes[this.vtype+'Mask']))){ + this.el.on("keypress", this.filterKeys, this); + } + if(this.grow){ + this.el.on("keyup", this.onKeyUp, this, {buffer:50}); + this.el.on("click", this.autoSize, this); + } + }, + + processValue : function(value){ + if(this.stripCharsRe){ + var newValue = value.replace(this.stripCharsRe, ''); + if(newValue !== value){ + this.setRawValue(newValue); + return newValue; + } + } + return value; + }, + + filterValidation : function(e){ + if(!e.isNavKeyPress()){ + this.validationTask.delay(this.validationDelay); + } + }, + + // private + onKeyUp : function(e){ + if(!e.isNavKeyPress()){ + this.autoSize(); + } + }, + + /** + * Resets the current field value to the originally-loaded value and clears any validation messages. + * Also adds emptyText and emptyClass if the original value was blank. + */ + reset : function(){ + Ext.form.TextField.superclass.reset.call(this); + this.applyEmptyText(); + }, + + applyEmptyText : function(){ + if(this.rendered && this.emptyText && this.getRawValue().length < 1){ + this.setRawValue(this.emptyText); + this.el.addClass(this.emptyClass); + } + }, + + // private + preFocus : function(){ + if(this.emptyText){ + if(this.el.dom.value == this.emptyText){ + this.setRawValue(''); + } + this.el.removeClass(this.emptyClass); + } + if(this.selectOnFocus){ + this.el.dom.select(); + } + }, + + // private + postBlur : function(){ + this.applyEmptyText(); + }, + + // private + filterKeys : function(e){ + var k = e.getKey(); + if(!Ext.isIE && (e.isNavKeyPress() || k == e.BACKSPACE || (k == e.DELETE && e.button == -1))){ + return; + } + var c = e.getCharCode(), cc = String.fromCharCode(c); + if(Ext.isIE && (e.isSpecialKey() || !cc)){ + return; + } + if(!this.maskRe.test(cc)){ + e.stopEvent(); + } + }, + + setValue : function(v){ + if(this.emptyText && this.el && v !== undefined && v !== null && v !== ''){ + this.el.removeClass(this.emptyClass); + } + Ext.form.TextField.superclass.setValue.apply(this, arguments); + this.applyEmptyText(); + this.autoSize(); + }, + + /** + * Validates a value according to the field's validation rules and marks the field as invalid + * if the validation fails + * @param {Mixed} value The value to validate + * @return {Boolean} True if the value is valid, else false + */ + validateValue : function(value){ + if(value.length < 1 || value === this.emptyText){ // if it's blank + if(this.allowBlank){ + this.clearInvalid(); + return true; + }else{ + this.markInvalid(this.blankText); + return false; + } + } + if(value.length < this.minLength){ + this.markInvalid(String.format(this.minLengthText, this.minLength)); + return false; + } + if(value.length > this.maxLength){ + this.markInvalid(String.format(this.maxLengthText, this.maxLength)); + return false; + } + if(this.vtype){ + var vt = Ext.form.VTypes; + if(!vt[this.vtype](value, this)){ + this.markInvalid(this.vtypeText || vt[this.vtype +'Text']); + return false; + } + } + if(typeof this.validator == "function"){ + var msg = this.validator(value); + if(msg !== true){ + this.markInvalid(msg); + return false; + } + } + if(this.regex && !this.regex.test(value)){ + this.markInvalid(this.regexText); + return false; + } + return true; + }, + + /** + * Selects text in this field + * @param {Number} start (optional) The index where the selection should start (defaults to 0) + * @param {Number} end (optional) The index where the selection should end (defaults to the text length) + */ + selectText : function(start, end){ + var v = this.getRawValue(); + if(v.length > 0){ + start = start === undefined ? 0 : start; + end = end === undefined ? v.length : end; + var d = this.el.dom; + if(d.setSelectionRange){ + d.setSelectionRange(start, end); + }else if(d.createTextRange){ + var range = d.createTextRange(); + range.moveStart("character", start); + range.moveEnd("character", v.length-end); + range.select(); + } + } + }, + + /** + * Automatically grows the field to accomodate the width of the text up to the maximum field width allowed. + * This only takes effect if grow = true, and fires the autosize event. + */ + autoSize : function(){ + if(!this.grow || !this.rendered){ + return; + } + if(!this.metrics){ + this.metrics = Ext.util.TextMetrics.createInstance(this.el); + } + var el = this.el; + var v = el.dom.value; + var d = document.createElement('div'); + d.appendChild(document.createTextNode(v)); + v = d.innerHTML; + d = null; + v += " "; + var w = Math.min(this.growMax, Math.max(this.metrics.getWidth(v) + /* add extra padding */ 10, this.growMin)); + this.el.setWidth(w); + this.fireEvent("autosize", this, w); + } +}); +Ext.reg('textfield', Ext.form.TextField); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TimeField.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TimeField.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TimeField.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,144 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.TimeField + * @extends Ext.form.ComboBox + * Provides a time input field with a time dropdown and automatic time validation. +* @constructor +* Create a new TimeField +* @param {Object} config + */ +Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { + /** + * @cfg {Date/String} minValue + * The minimum allowed time. Can be either a Javascript date object or a string date in a + * valid format (defaults to null). + */ + minValue : null, + /** + * @cfg {Date/String} maxValue + * The maximum allowed time. Can be either a Javascript date object or a string date in a + * valid format (defaults to null). + */ + maxValue : null, + /** + * @cfg {String} minText + * The error text to display when the date in the cell is before minValue (defaults to + * 'The time in this field must be equal to or after {0}'). + */ + minText : "The time in this field must be equal to or after {0}", + /** + * @cfg {String} maxText + * The error text to display when the time is after maxValue (defaults to + * 'The time in this field must be equal to or before {0}'). + */ + maxText : "The time in this field must be equal to or before {0}", + /** + * @cfg {String} invalidText + * The error text to display when the time in the field is invalid (defaults to + * '{value} is not a valid time - it must be in the format {format}'). + */ + invalidText : "{0} is not a valid time", + /** + * @cfg {String} format + * The default date format string which can be overriden for localization support. The format must be + * valid according to {@link Date#parseDate} (defaults to 'm/d/y'). + */ + format : "g:i A", + /** + * @cfg {String} altFormats + * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined + * format (defaults to 'm/d/Y|m-d-y|m-d-Y|m/d|m-d|d'). + */ + 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", + /** + * @cfg {Number} increment + * The number of minutes between each time value in the list (defaults to 15). + */ + increment: 15, + + // private override + mode: 'local', + // private override + triggerAction: 'all', + // private override + typeAhead: false, + + // private + initComponent : function(){ + Ext.form.TimeField.superclass.initComponent.call(this); + + if(typeof this.minValue == "string"){ + this.minValue = this.parseDate(this.minValue); + } + if(typeof this.maxValue == "string"){ + this.maxValue = this.parseDate(this.maxValue); + } + + if(!this.store){ + var min = this.parseDate(this.minValue); + if(!min){ + min = new Date().clearTime(); + } + var max = this.parseDate(this.maxValue); + if(!max){ + max = new Date().clearTime().add('mi', (24 * 60) - 1); + } + var times = []; + while(min <= max){ + times.push([min.dateFormat(this.format)]); + min = min.add('mi', this.increment); + } + this.store = new Ext.data.SimpleStore({ + fields: ['text'], + data : times + }); + this.displayField = 'text'; + } + }, + + // inherited docs + getValue : function(){ + var v = Ext.form.TimeField.superclass.getValue.call(this); + return this.formatDate(this.parseDate(v)) || ''; + }, + + // inherited docs + setValue : function(value){ + Ext.form.TimeField.superclass.setValue.call(this, this.formatDate(this.parseDate(value))); + }, + + // private overrides + validateValue : Ext.form.DateField.prototype.validateValue, + parseDate : Ext.form.DateField.prototype.parseDate, + formatDate : Ext.form.DateField.prototype.formatDate, + + // private + beforeBlur : function(){ + var v = this.parseDate(this.getRawValue()); + if(v){ + this.setValue(v.dateFormat(this.format)); + } + } + + /** + * @cfg {Boolean} grow @hide + */ + /** + * @cfg {Number} growMin @hide + */ + /** + * @cfg {Number} growMax @hide + */ + /** + * @hide + * @method autoSize + */ +}); +Ext.reg('timefield', Ext.form.TimeField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TriggerField.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TriggerField.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/TriggerField.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,267 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.TriggerField + * @extends Ext.form.TextField + * Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default). + * The trigger has no default action, so you must assign a function to implement the trigger click handler by + * overriding {@link #onTriggerClick}. You can create a TriggerField directly, as it renders exactly like a combobox + * for which you can provide a custom implementation. For example: + *
        
        +var trigger = new Ext.form.TriggerField();
        +trigger.onTriggerClick = myTriggerFn;
        +trigger.applyToMarkup('my-field');
        +
        + * + * However, in general you will most likely want to use TriggerField as the base class for a reusable component. + * {@link Ext.form.DateField} and {@link Ext.form.ComboBox} are perfect examples of this. + * @cfg {String} triggerClass An additional CSS class used to style the trigger button. The trigger will always get the + * class 'x-form-trigger' by default and triggerClass will be appended if specified. + * @constructor + * Create a new TriggerField. + * @param {Object} config Configuration options (valid {@Ext.form.TextField} config options will also be applied + * to the base TextField) + */ +Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { + /** + * @cfg {String} triggerClass A CSS class to apply to the trigger + */ + /** + * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to + * {tag: "input", type: "text", size: "16", autocomplete: "off"}) + */ + defaultAutoCreate : {tag: "input", type: "text", size: "16", autocomplete: "off"}, + /** + * @cfg {Boolean} hideTrigger True to hide the trigger element and display only the base text field (defaults to false) + */ + hideTrigger:false, + + /** + * @hide + * @method autoSize + */ + autoSize: Ext.emptyFn, + // private + monitorTab : true, + // private + deferHeight : true, + // private + mimicing : false, + + // private + onResize : function(w, h){ + Ext.form.TriggerField.superclass.onResize.call(this, w, h); + if(typeof w == 'number'){ + this.el.setWidth(this.adjustWidth('input', w - this.trigger.getWidth())); + } + this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); + }, + + // private + adjustSize : Ext.BoxComponent.prototype.adjustSize, + + // private + getResizeEl : function(){ + return this.wrap; + }, + + // private + getPositionEl : function(){ + return this.wrap; + }, + + // private + alignErrorIcon : function(){ + this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]); + }, + + // private + onRender : function(ct, position){ + Ext.form.TriggerField.superclass.onRender.call(this, ct, position); + this.wrap = this.el.wrap({cls: "x-form-field-wrap"}); + this.trigger = this.wrap.createChild(this.triggerConfig || + {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}); + if(this.hideTrigger){ + this.trigger.setDisplayed(false); + } + this.initTrigger(); + if(!this.width){ + this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); + } + }, + + // private + initTrigger : function(){ + this.trigger.on("click", this.onTriggerClick, this, {preventDefault:true}); + this.trigger.addClassOnOver('x-form-trigger-over'); + this.trigger.addClassOnClick('x-form-trigger-click'); + }, + + // private + onDestroy : function(){ + if(this.trigger){ + this.trigger.removeAllListeners(); + this.trigger.remove(); + } + if(this.wrap){ + this.wrap.remove(); + } + Ext.form.TriggerField.superclass.onDestroy.call(this); + }, + + // private + onFocus : function(){ + Ext.form.TriggerField.superclass.onFocus.call(this); + if(!this.mimicing){ + this.wrap.addClass('x-trigger-wrap-focus'); + this.mimicing = true; + Ext.get(Ext.isIE ? document.body : document).on("mousedown", this.mimicBlur, this, {delay: 10}); + if(this.monitorTab){ + this.el.on("keydown", this.checkTab, this); + } + } + }, + + // private + checkTab : function(e){ + if(e.getKey() == e.TAB){ + this.triggerBlur(); + } + }, + + // private + onBlur : function(){ + // do nothing + }, + + // private + mimicBlur : function(e){ + if(!this.wrap.contains(e.target) && this.validateBlur(e)){ + this.triggerBlur(); + } + }, + + // private + triggerBlur : function(){ + this.mimicing = false; + Ext.get(Ext.isIE ? document.body : document).un("mousedown", this.mimicBlur); + if(this.monitorTab){ + this.el.un("keydown", this.checkTab, this); + } + this.beforeBlur(); + this.wrap.removeClass('x-trigger-wrap-focus'); + Ext.form.TriggerField.superclass.onBlur.call(this); + }, + + beforeBlur : Ext.emptyFn, + + // private + // This should be overriden by any subclass that needs to check whether or not the field can be blurred. + validateBlur : function(e){ + return true; + }, + + // private + onDisable : function(){ + Ext.form.TriggerField.superclass.onDisable.call(this); + if(this.wrap){ + this.wrap.addClass('x-item-disabled'); + } + }, + + // private + onEnable : function(){ + Ext.form.TriggerField.superclass.onEnable.call(this); + if(this.wrap){ + this.wrap.removeClass('x-item-disabled'); + } + }, + + + // private + onShow : function(){ + if(this.wrap){ + this.wrap.dom.style.display = ''; + this.wrap.dom.style.visibility = 'visible'; + } + }, + + // private + onHide : function(){ + this.wrap.dom.style.display = 'none'; + }, + + /** + * The function that should handle the trigger's click event. This method does nothing by default until overridden + * by an implementing function. + * @method + * @param {EventObject} e + */ + onTriggerClick : Ext.emptyFn + + /** + * @cfg {Boolean} grow @hide + */ + /** + * @cfg {Number} growMin @hide + */ + /** + * @cfg {Number} growMax @hide + */ +}); + +// TwinTriggerField is not a public class to be used directly. It is meant as an abstract base class +// to be extended by an implementing class. For an example of implementing this class, see the custom +// SearchField implementation here: http://extjs.com/deploy/ext/examples/form/custom.html +Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, { + initComponent : function(){ + Ext.form.TwinTriggerField.superclass.initComponent.call(this); + + this.triggerConfig = { + tag:'span', cls:'x-form-twin-triggers', cn:[ + {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.trigger1Class}, + {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.trigger2Class} + ]}; + }, + + getTrigger : function(index){ + return this.triggers[index]; + }, + + initTrigger : function(){ + var ts = this.trigger.select('.x-form-trigger', true); + this.wrap.setStyle('overflow', 'hidden'); + var triggerField = this; + ts.each(function(t, all, index){ + t.hide = function(){ + var w = triggerField.wrap.getWidth(); + this.dom.style.display = 'none'; + triggerField.el.setWidth(w-triggerField.trigger.getWidth()); + }; + t.show = function(){ + var w = triggerField.wrap.getWidth(); + this.dom.style.display = ''; + triggerField.el.setWidth(w-triggerField.trigger.getWidth()); + }; + var triggerIndex = 'Trigger'+(index+1); + + if(this['hide'+triggerIndex]){ + t.dom.style.display = 'none'; + } + t.on("click", this['on'+triggerIndex+'Click'], this, {preventDefault:true}); + t.addClassOnOver('x-form-trigger-over'); + t.addClassOnClick('x-form-trigger-click'); + }, this); + this.triggers = ts.elements; + }, + + onTrigger1Click : Ext.emptyFn, + onTrigger2Click : Ext.emptyFn +}); +Ext.reg('trigger', Ext.form.TriggerField); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/VTypes.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/VTypes.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/form/VTypes.js 4 Dec 2007 02:48:58 -0000 1.1 @@ -0,0 +1,90 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.VTypes + * Overridable validation definitions. The validations provided are basic and intended to be easily customizable and extended. + * @singleton + */ +Ext.form.VTypes = function(){ + // closure these in so they are only created once. + var alpha = /^[a-zA-Z_]+$/; + var alphanum = /^[a-zA-Z0-9_]+$/; + var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/; + var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i; + + // All these messages and functions are configurable + return { + /** + * The function used to validate email addresses + * @param {String} value The email address + */ + 'email' : function(v){ + return email.test(v); + }, + /** + * The error text to display when the email validation function returns false + * @type String + */ + 'emailText' : 'This field should be an e-mail address in the format "user@domain.com"', + /** + * The keystroke filter mask to be applied on email input + * @type RegExp + */ + 'emailMask' : /[a-z0-9_\.\-@]/i, + + /** + * The function used to validate URLs + * @param {String} value The URL + */ + 'url' : function(v){ + return url.test(v); + }, + /** + * The error text to display when the url validation function returns false + * @type String + */ + 'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"', + + /** + * The function used to validate alpha values + * @param {String} value The value + */ + 'alpha' : function(v){ + return alpha.test(v); + }, + /** + * The error text to display when the alpha validation function returns false + * @type String + */ + 'alphaText' : 'This field should only contain letters and _', + /** + * The keystroke filter mask to be applied on alpha input + * @type RegExp + */ + 'alphaMask' : /[a-z_]/i, + + /** + * The function used to validate alphanumeric values + * @param {String} value The value + */ + 'alphanum' : function(v){ + return alphanum.test(v); + }, + /** + * The error text to display when the alphanumeric validation function returns false + * @type String + */ + 'alphanumText' : 'This field should only contain letters, numbers and _', + /** + * The keystroke filter mask to be applied on alphanumeric input + * @type RegExp + */ + 'alphanumMask' : /[a-z0-9_]/i + }; +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/AbstractSelectionModel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/AbstractSelectionModel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/AbstractSelectionModel.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,49 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.AbstractSelectionModel + * @extends Ext.util.Observable + * Abstract base class for grid SelectionModels. It provides the interface that should be + * implemented by descendant classes. This class should not be directly instantiated. + * @constructor + */ +Ext.grid.AbstractSelectionModel = function(){ + this.locked = false; + Ext.grid.AbstractSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.AbstractSelectionModel, Ext.util.Observable, { + /** @ignore Called by the grid automatically. Do not call directly. */ + init : function(grid){ + this.grid = grid; + this.initEvents(); + }, + + /** + * Locks the selections. + */ + lock : function(){ + this.locked = true; + }, + + /** + * Unlocks the selections. + */ + unlock : function(){ + this.locked = false; + }, + + /** + * Returns true if the selections are locked. + * @return {Boolean} + */ + isLocked : function(){ + return this.locked; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/CellSelectionModel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/CellSelectionModel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/CellSelectionModel.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,252 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.CellSelectionModel + * @extends Ext.grid.AbstractSelectionModel + * This class provides the basic implementation for single cell selection in a grid. The object stored + * as the selection and returned by {@link getSelectedCell} contains the following properties: + *
          + *
        • record : Ext.data.record

          The {@link Ext.data.Record Record} + * which provides the data for the row containing the selection

        • + *
        • cell : Ext.data.record

          An object containing the + * following properties: + *

            + *
          • rowIndex : Number

            The index of the selected row

          • + *
          • cellIndex : Number

            The index of the selected cell
            + * Note that due to possible column reordering, the cellIndex should not be used as an index into + * the Record's data. Instead, the name of the selected field should be determined + * in order to retrieve the data value from the record by name:

            
            +    var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
            +    var data = record.get(fieldName);
            +

          • + *

        • + *
        + * @constructor + * @param {Object} config The object containing the configuration of this model. + */ +Ext.grid.CellSelectionModel = function(config){ + Ext.apply(this, config); + + this.selection = null; + + this.addEvents( + /** + * @event beforecellselect + * Fires before a cell is selected. + * @param {SelectionModel} this + * @param {Number} rowIndex The selected row index + * @param {Number} colIndex The selected cell index + */ + "beforecellselect", + /** + * @event cellselect + * Fires when a cell is selected. + * @param {SelectionModel} this + * @param {Number} rowIndex The selected row index + * @param {Number} colIndex The selected cell index + */ + "cellselect", + /** + * @event selectionchange + * Fires when the active selection changes. + * @param {SelectionModel} this + * @param {Object} selection null for no selection or an object (o) with two properties +
          +
        • o.record: the record object for the row the selection is in
        • +
        • o.cell: An array of [rowIndex, columnIndex]
        • +
        + */ + "selectionchange" + ); + + Ext.grid.CellSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.CellSelectionModel, Ext.grid.AbstractSelectionModel, { + + /** @ignore */ + initEvents : function(){ + this.grid.on("cellmousedown", this.handleMouseDown, this); + this.grid.getGridEl().on(Ext.isIE ? "keydown" : "keypress", this.handleKeyDown, this); + var view = this.grid.view; + view.on("refresh", this.onViewChange, this); + view.on("rowupdated", this.onRowUpdated, this); + view.on("beforerowremoved", this.clearSelections, this); + view.on("beforerowsinserted", this.clearSelections, this); + if(this.grid.isEditor){ + this.grid.on("beforeedit", this.beforeEdit, this); + } + }, + + //private + beforeEdit : function(e){ + this.select(e.row, e.column, false, true, e.record); + }, + + //private + onRowUpdated : function(v, index, r){ + if(this.selection && this.selection.record == r){ + v.onCellSelect(index, this.selection.cell[1]); + } + }, + + //private + onViewChange : function(){ + this.clearSelections(true); + }, + + /** + * Returns the currently selected cell,. + * @return {Object} The selected cell or null if none selected. + */ + getSelectedCell : function(){ + return this.selection ? this.selection.cell : null; + }, + + /** + * Clears all selections. + * @param {Boolean} true to prevent the gridview from being notified about the change. + */ + clearSelections : function(preventNotify){ + var s = this.selection; + if(s){ + if(preventNotify !== true){ + this.grid.view.onCellDeselect(s.cell[0], s.cell[1]); + } + this.selection = null; + this.fireEvent("selectionchange", this, null); + } + }, + + /** + * Returns true if there is a selection. + * @return {Boolean} + */ + hasSelection : function(){ + return this.selection ? true : false; + }, + + /** @ignore */ + handleMouseDown : function(g, row, cell, e){ + if(e.button !== 0 || this.isLocked()){ + return; + }; + this.select(row, cell); + }, + + /** + * Selects a cell. + * @param {Number} rowIndex + * @param {Number} collIndex + */ + select : function(rowIndex, colIndex, preventViewNotify, preventFocus, /*internal*/ r){ + if(this.fireEvent("beforecellselect", this, rowIndex, colIndex) !== false){ + this.clearSelections(); + r = r || this.grid.store.getAt(rowIndex); + this.selection = { + record : r, + cell : [rowIndex, colIndex] + }; + if(!preventViewNotify){ + var v = this.grid.getView(); + v.onCellSelect(rowIndex, colIndex); + if(preventFocus !== true){ + v.focusCell(rowIndex, colIndex); + } + } + this.fireEvent("cellselect", this, rowIndex, colIndex); + this.fireEvent("selectionchange", this, this.selection); + } + }, + + //private + isSelectable : function(rowIndex, colIndex, cm){ + return !cm.isHidden(colIndex); + }, + + /** @ignore */ + handleKeyDown : function(e){ + if(!e.isNavKeyPress()){ + return; + } + var g = this.grid, s = this.selection; + if(!s){ + e.stopEvent(); + var cell = g.walkCells(0, 0, 1, this.isSelectable, this); + if(cell){ + this.select(cell[0], cell[1]); + } + return; + } + var sm = this; + var walk = function(row, col, step){ + return g.walkCells(row, col, step, sm.isSelectable, sm); + }; + var k = e.getKey(), r = s.cell[0], c = s.cell[1]; + var newCell; + + switch(k){ + case e.TAB: + if(e.shiftKey){ + newCell = walk(r, c-1, -1); + }else{ + newCell = walk(r, c+1, 1); + } + break; + case e.DOWN: + newCell = walk(r+1, c, 1); + break; + case e.UP: + newCell = walk(r-1, c, -1); + break; + case e.RIGHT: + newCell = walk(r, c+1, 1); + break; + case e.LEFT: + newCell = walk(r, c-1, -1); + break; + case e.ENTER: + if(g.isEditor && !g.editing){ + g.startEditing(r, c); + e.stopEvent(); + return; + } + break; + }; + if(newCell){ + this.select(newCell[0], newCell[1]); + e.stopEvent(); + } + }, + + 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, ed = g.activeEditor; + if(k == e.TAB){ + if(e.shiftKey){ + newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this); + }else{ + newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); + } + e.stopEvent(); + }else if(k == e.ENTER){ + ed.completeEdit(); + e.stopEvent(); + }else if(k == e.ESC){ + e.stopEvent(); + ed.cancelEdit(); + } + if(newCell){ + g.startEditing(newCell[0], newCell[1]); + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/CheckboxSelectionModel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/CheckboxSelectionModel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/CheckboxSelectionModel.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,86 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.CheckboxSelectionModel + * @extends Ext.grid.RowSelectionModel + * A custom selection model that renders a column of checkboxes that can be toggled to select or deselect rows. + * @constructor + * @param {Object} config The configuration options + */ +Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { + /** + * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the checkbox column + * (defaults to '<div class="x-grid3-hd-checker"> </div>'). The default CSS class of 'x-grid3-hd-checker' + * displays a checkbox in the header and provides support for automatic check all/none behavior on header click. + * This string can be replaced by any valid HTML fragment, including a simple text string (e.g., 'Select Rows'), but + * the automatic check all/none behavior will only work if the 'x-grid3-hd-checker' class is supplied. + */ + header: '
         
        ', + /** + * @cfg {Number} width The default width in pixels of the checkbox column (defaults to 20). + */ + width: 20, + /** + * @cfg {Boolean} sortable True if the checkbox column is sortable (defaults to false). + */ + sortable: false, + + // private + fixed:true, + dataIndex: '', + id: 'checker', + + // private + initEvents : function(){ + Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this); + this.grid.on('render', function(){ + var view = this.grid.getView(); + view.mainBody.on('mousedown', this.onMouseDown, this); + Ext.fly(view.innerHd).on('mousedown', this.onHdMouseDown, this); + + }, this); + }, + + // private + onMouseDown : function(e, t){ + if(t.className == 'x-grid3-row-checker'){ + e.stopEvent(); + var row = e.getTarget('.x-grid3-row'); + if(row){ + var index = row.rowIndex; + if(this.isSelected(index)){ + this.deselectRow(index); + }else{ + this.selectRow(index, true); + } + } + } + }, + + // private + onHdMouseDown : function(e, t){ + if(t.className == 'x-grid3-hd-checker'){ + e.stopEvent(); + var hd = Ext.fly(t.parentNode); + var isChecked = hd.hasClass('x-grid3-hd-checker-on'); + if(isChecked){ + hd.removeClass('x-grid3-hd-checker-on'); + this.clearSelections(); + }else{ + hd.addClass('x-grid3-hd-checker-on'); + this.selectAll(); + } + } + }, + + // private + renderer : function(v, p, record){ + return '
         
        '; + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnDD.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnDD.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnDD.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,219 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +// private +// This is a support class used internally by the Grid components +Ext.grid.HeaderDragZone = function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + this.ddGroup = "gridHeader" + this.grid.getGridEl().id; + Ext.grid.HeaderDragZone.superclass.constructor.call(this, hd); + if(hd2){ + this.setHandleElId(Ext.id(hd)); + this.setOuterHandleElId(Ext.id(hd2)); + } + this.scroll = false; +}; +Ext.extend(Ext.grid.HeaderDragZone, Ext.dd.DragZone, { + maxDragWidth: 120, + getDragData : function(e){ + var t = Ext.lib.Event.getTarget(e); + var h = this.view.findHeaderCell(t); + if(h){ + return {ddel: h.firstChild, header:h}; + } + return false; + }, + + onInitDrag : function(e){ + this.view.headersDisabled = true; + var clone = this.dragData.ddel.cloneNode(true); + clone.id = Ext.id(); + clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px"; + this.proxy.update(clone); + return true; + }, + + afterValidDrop : function(){ + var v = this.view; + setTimeout(function(){ + v.headersDisabled = false; + }, 50); + }, + + afterInvalidDrop : function(){ + var v = this.view; + setTimeout(function(){ + v.headersDisabled = false; + }, 50); + } +}); + +// private +// This is a support class used internally by the Grid components +Ext.grid.HeaderDropZone = function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + // split the proxies so they don't interfere with mouse events + this.proxyTop = Ext.DomHelper.append(document.body, { + cls:"col-move-top", html:" " + }, true); + this.proxyBottom = Ext.DomHelper.append(document.body, { + cls:"col-move-bottom", html:" " + }, true); + this.proxyTop.hide = this.proxyBottom.hide = function(){ + this.setLeftTop(-100,-100); + this.setStyle("visibility", "hidden"); + }; + this.ddGroup = "gridHeader" + this.grid.getGridEl().id; + // temporarily disabled + //Ext.dd.ScrollManager.register(this.view.scroller.dom); + Ext.grid.HeaderDropZone.superclass.constructor.call(this, grid.getGridEl().dom); +}; +Ext.extend(Ext.grid.HeaderDropZone, Ext.dd.DropZone, { + proxyOffsets : [-4, -9], + fly: Ext.Element.fly, + + getTargetFromEvent : function(e){ + var t = Ext.lib.Event.getTarget(e); + var cindex = this.view.findCellIndex(t); + if(cindex !== false){ + return this.view.getHeaderCell(cindex); + } + }, + + nextVisible : function(h){ + var v = this.view, cm = this.grid.colModel; + h = h.nextSibling; + while(h){ + if(!cm.isHidden(v.getCellIndex(h))){ + return h; + } + h = h.nextSibling; + } + return null; + }, + + prevVisible : function(h){ + var v = this.view, cm = this.grid.colModel; + h = h.prevSibling; + while(h){ + if(!cm.isHidden(v.getCellIndex(h))){ + return h; + } + h = h.prevSibling; + } + return null; + }, + + positionIndicator : function(h, n, e){ + var x = Ext.lib.Event.getPageX(e); + var r = Ext.lib.Dom.getRegion(n.firstChild); + var px, pt, py = r.top + this.proxyOffsets[1]; + if((r.right - x) <= (r.right-r.left)/2){ + px = r.right+this.view.borderWidth; + pt = "after"; + }else{ + px = r.left; + pt = "before"; + } + var oldIndex = this.view.getCellIndex(h); + var newIndex = this.view.getCellIndex(n); + + if(this.grid.colModel.isFixed(newIndex)){ + return false; + } + + var locked = this.grid.colModel.isLocked(newIndex); + + if(pt == "after"){ + newIndex++; + } + if(oldIndex < newIndex){ + newIndex--; + } + if(oldIndex == newIndex && (locked == this.grid.colModel.isLocked(oldIndex))){ + return false; + } + px += this.proxyOffsets[0]; + this.proxyTop.setLeftTop(px, py); + this.proxyTop.show(); + if(!this.bottomOffset){ + this.bottomOffset = this.view.mainHd.getHeight(); + } + this.proxyBottom.setLeftTop(px, py+this.proxyTop.dom.offsetHeight+this.bottomOffset); + this.proxyBottom.show(); + return pt; + }, + + onNodeEnter : function(n, dd, e, data){ + if(data.header != n){ + this.positionIndicator(data.header, n, e); + } + }, + + onNodeOver : function(n, dd, e, data){ + var result = false; + if(data.header != n){ + result = this.positionIndicator(data.header, n, e); + } + if(!result){ + this.proxyTop.hide(); + this.proxyBottom.hide(); + } + return result ? this.dropAllowed : this.dropNotAllowed; + }, + + onNodeOut : function(n, dd, e, data){ + this.proxyTop.hide(); + this.proxyBottom.hide(); + }, + + onNodeDrop : function(n, dd, e, data){ + var h = data.header; + if(h != n){ + var cm = this.grid.colModel; + var x = Ext.lib.Event.getPageX(e); + var r = Ext.lib.Dom.getRegion(n.firstChild); + var pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before"; + var oldIndex = this.view.getCellIndex(h); + var newIndex = this.view.getCellIndex(n); + var locked = cm.isLocked(newIndex); + if(pt == "after"){ + newIndex++; + } + if(oldIndex < newIndex){ + newIndex--; + } + if(oldIndex == newIndex && (locked == cm.isLocked(oldIndex))){ + return false; + } + cm.setLocked(oldIndex, locked, true); + cm.moveColumn(oldIndex, newIndex); + this.grid.fireEvent("columnmove", oldIndex, newIndex); + return true; + } + return false; + } +}); + + +Ext.grid.GridView.ColumnDragZone = function(grid, hd){ + Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this, grid, hd, null); + this.proxy.el.addClass('x-grid3-col-dd'); +}; + +Ext.extend(Ext.grid.GridView.ColumnDragZone, Ext.grid.HeaderDragZone, { + handleMouseDown : function(e){ + + }, + + callHandleMouseDown : function(e){ + Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnModel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnModel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnModel.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,533 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.ColumnModel + * @extends Ext.util.Observable + * This is the default implementation of a ColumnModel used by the Grid. This class is initialized + * with an Array of column config objects. + *

        + * An individual column's config object defines the header string, the {@link Ext.data.Record} + * field the column draws its data from, an otional rendering function to provide customized + * data formatting, and the ability to apply a CSS class to all cells in a column through its + * {@link #id} config option.
        + *
        Usage:
        +
        
        + var colModel = new Ext.grid.ColumnModel([
        +	{header: "Ticker", width: 60, sortable: true},
        +	{header: "Company Name", width: 150, sortable: true},
        +	{header: "Market Cap.", width: 100, sortable: true},
        +	{header: "$ Sales", width: 100, sortable: true, renderer: money},
        +	{header: "Employees", width: 100, sortable: true, resizable: false}
        + ]);
        + 
        + *

        + * The config options listed for this class are options which may appear in each + * individual column definition. + * @constructor + * @param {Object} config An Array of column config objects. See this class's + * config objects for details. +*/ +Ext.grid.ColumnModel = function(config){ + /** + * The config passed into the constructor + * @property {Array} config + */ + this.setConfig(config, true); + /** + * The width of columns which have no width specified (defaults to 100) + * @type Number + */ + this.defaultWidth = 100; + + /** + * Default sortable of columns which have no sortable specified (defaults to false) + * @type Boolean + */ + this.defaultSortable = false; + + this.addEvents( + /** + * @event widthchange + * Fires when the width of a column changes. + * @param {ColumnModel} this + * @param {Number} columnIndex The column index + * @param {Number} newWidth The new width + */ + "widthchange", + /** + * @event headerchange + * Fires when the text of a header changes. + * @param {ColumnModel} this + * @param {Number} columnIndex The column index + * @param {String} newText The new header text + */ + "headerchange", + /** + * @event hiddenchange + * Fires when a column is hidden or "unhidden". + * @param {ColumnModel} this + * @param {Number} columnIndex The column index + * @param {Boolean} hidden true if hidden, false otherwise + */ + "hiddenchange", + /** + * @event columnmoved + * Fires when a column is moved. + * @param {ColumnModel} this + * @param {Number} oldIndex + * @param {Number} newIndex + */ + "columnmoved", + // deprecated - to be removed + "columnlockchange", + /** + * @event configchanged + * Fires when the configuration is changed + * @param {ColumnModel} this + */ + "configchange" + ); + Ext.grid.ColumnModel.superclass.constructor.call(this); +}; +Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { + /** + * @cfg {String} id (optional) Defaults to the column's initial ordinal position. + * A name which identifies this column. The id is used to create a CSS class name which + * is applied to all table cells (including headers) in that column. The class name + * takes the form of

        x-grid3-td-id
        + *

        + * Header cells will also recieve this class name, but will also have the class x-grid3-hd, + * so to target header cells, use CSS selectors such as:
        .x-grid3-hd.x-grid3-td-id
        + * The {@link Ext.grid.Grid#autoExpandColumn} grid config option references the column + * via this identifier. + */ + /** + * @cfg {String} header The header text to display in the Grid view. + */ + /** + * @cfg {String} dataIndex (optional) The name of the field in the grid's {@link Ext.data.Store}'s + * {@link Ext.data.Record} definition from which to draw the column's value. If not + * specified, the column's index is used as an index into the Record's data Array. + */ + /** + * @cfg {Number} width (optional) The initial width in pixels of the column. Using this + * instead of {@link Ext.grid.Grid#autoSizeColumns} is more efficient. + */ + /** + * @cfg {Boolean} sortable (optional) True if sorting is to be allowed on this column. + * Defaults to the value of the {@link #defaultSortable} property. + * Whether local/remote sorting is used is specified in {@link Ext.data.Store#remoteSort}. + */ + /** + * @cfg {Boolean} fixed (optional) True if the column width cannot be changed. Defaults to false. + */ + /** + * @cfg {Boolean} resizable (optional) False to disable column resizing. Defaults to true. + */ + /** + * @cfg {Boolean} hidden (optional) True to hide the column. Defaults to false. + */ + /** + * @cfg {Function} renderer (optional) A function used to generate HTML markup for a cell + * given the cell's data value. See {@link #setRenderer}. If not specified, the + * default renderer uses the raw data value. + */ + /** + * @cfg {String} align (optional) Set the CSS text-align property of the column. Defaults to undefined. + */ + /** + * @cfg {Boolean} hideable (optional) Specify as false to prevent the user from hiding this column. Defaults to true. + */ + /** + * @cfg {Ext.form.Field} editor (optional) The {@link Ext.form.Field} to use when editing values in this column if + * editing is supported by the grid. + */ + + /** + * Returns the id of the column at the specified index. + * @param {Number} index The column index + * @return {String} the id + */ + getColumnId : function(index){ + return this.config[index].id; + }, + + /** + * Reconfigures this column model + * @param {Array} config Array of Column configs + */ + setConfig : function(config, initial){ + if(!initial){ // cleanup + delete this.totalWidth; + for(var i = 0, len = this.config.length; i < len; i++){ + var c = this.config[i]; + if(c.editor){ + c.editor.destroy(); + } + } + } + this.config = config; + this.lookup = {}; + // if no id, create one + for(var i = 0, len = config.length; i < len; i++){ + var c = config[i]; + if(typeof c.renderer == "string"){ + c.renderer = Ext.util.Format[c.renderer]; + } + if(typeof c.id == "undefined"){ + c.id = i; + } + if(c.editor && c.editor.isFormField){ + c.editor = new Ext.grid.GridEditor(c.editor); + } + this.lookup[c.id] = c; + } + if(!initial){ + this.fireEvent('configchange', this); + } + }, + + /** + * Returns the column for a specified id. + * @param {String} id The column id + * @return {Object} the column + */ + getColumnById : function(id){ + return this.lookup[id]; + }, + + /** + * Returns the index for a specified column id. + * @param {String} id The column id + * @return {Number} the index, or -1 if not found + */ + getIndexById : function(id){ + for(var i = 0, len = this.config.length; i < len; i++){ + if(this.config[i].id == id){ + return i; + } + } + return -1; + }, + + // private + moveColumn : function(oldIndex, newIndex){ + var c = this.config[oldIndex]; + this.config.splice(oldIndex, 1); + this.config.splice(newIndex, 0, c); + this.dataMap = null; + this.fireEvent("columnmoved", this, oldIndex, newIndex); + }, + + // deprecated - to be removed + isLocked : function(colIndex){ + return this.config[colIndex].locked === true; + }, + + // deprecated - to be removed + setLocked : function(colIndex, value, suppressEvent){ + if(this.isLocked(colIndex) == value){ + return; + } + this.config[colIndex].locked = value; + if(!suppressEvent){ + this.fireEvent("columnlockchange", this, colIndex, value); + } + }, + + // deprecated - to be removed + getTotalLockedWidth : function(){ + var totalWidth = 0; + for(var i = 0; i < this.config.length; i++){ + if(this.isLocked(i) && !this.isHidden(i)){ + this.totalWidth += this.getColumnWidth(i); + } + } + return totalWidth; + }, + + // deprecated - to be removed + getLockedCount : function(){ + for(var i = 0, len = this.config.length; i < len; i++){ + if(!this.isLocked(i)){ + return i; + } + } + }, + + /** + * Returns the number of columns. + * @return {Number} + */ + getColumnCount : function(visibleOnly){ + if(visibleOnly === true){ + var c = 0; + for(var i = 0, len = this.config.length; i < len; i++){ + if(!this.isHidden(i)){ + c++; + } + } + return c; + } + return this.config.length; + }, + + /** + * Returns the column configs that return true by the passed function that is called with (columnConfig, index) + * @param {Function} fn + * @param {Object} scope (optional) + * @return {Array} result + */ + getColumnsBy : function(fn, scope){ + var r = []; + for(var i = 0, len = this.config.length; i < len; i++){ + var c = this.config[i]; + if(fn.call(scope||this, c, i) === true){ + r[r.length] = c; + } + } + return r; + }, + + /** + * Returns true if the specified column is sortable. + * @param {Number} col The column index + * @return {Boolean} + */ + isSortable : function(col){ + if(typeof this.config[col].sortable == "undefined"){ + return this.defaultSortable; + } + return this.config[col].sortable; + }, + + /** + * Returns the rendering (formatting) function defined for the column. + * @param {Number} col The column index. + * @return {Function} The function used to render the cell. See {@link #setRenderer}. + */ + getRenderer : function(col){ + if(!this.config[col].renderer){ + return Ext.grid.ColumnModel.defaultRenderer; + } + return this.config[col].renderer; + }, + + /** + * Sets the rendering (formatting) function for a column. See {@link Ext.util.Format} for some + * default formatting functions. + * @param {Number} col The column index + * @param {Function} fn The function to use to process the cell's raw data + * to return HTML markup for the grid view. The render function is called with + * the following parameters:
          + *
        • value : Object

          The data value for the cell.

        • + *
        • metadata : Object

          An object in which you may set the following attributes:

            + *
          • css : String

            A CSS class name to add to the cell's TD element.

          • + *
          • attr : String

            An HTML attribute definition string to apply to the data container element within the table cell + * (e.g. 'style="color:red;"').

        • + *
        • record : Ext.data.record

          The {@link Ext.data.Record} from which the data was extracted.

        • + *
        • rowIndex : Number

          Row index

        • + *
        • colIndex : Number

          Column index

        • + *
        • store : Ext.data.Store

          The {@link Ext.data.Store} object from which the Record was extracted.

        + */ + setRenderer : function(col, fn){ + this.config[col].renderer = fn; + }, + + /** + * Returns the width for the specified column. + * @param {Number} col The column index + * @return {Number} + */ + getColumnWidth : function(col){ + return this.config[col].width || this.defaultWidth; + }, + + /** + * Sets the width for a column. + * @param {Number} col The column index + * @param {Number} width The new width + */ + setColumnWidth : function(col, width, suppressEvent){ + this.config[col].width = width; + this.totalWidth = null; + if(!suppressEvent){ + this.fireEvent("widthchange", this, col, width); + } + }, + + /** + * Returns the total width of all columns. + * @param {Boolean} includeHidden True to include hidden column widths + * @return {Number} + */ + getTotalWidth : function(includeHidden){ + if(!this.totalWidth){ + this.totalWidth = 0; + for(var i = 0, len = this.config.length; i < len; i++){ + if(includeHidden || !this.isHidden(i)){ + this.totalWidth += this.getColumnWidth(i); + } + } + } + return this.totalWidth; + }, + + /** + * Returns the header for the specified column. + * @param {Number} col The column index + * @return {String} + */ + getColumnHeader : function(col){ + return this.config[col].header; + }, + + /** + * Sets the header for a column. + * @param {Number} col The column index + * @param {String} header The new header + */ + setColumnHeader : function(col, header){ + this.config[col].header = header; + this.fireEvent("headerchange", this, col, header); + }, + + /** + * Returns the tooltip for the specified column. + * @param {Number} col The column index + * @return {String} + */ + getColumnTooltip : function(col){ + return this.config[col].tooltip; + }, + /** + * Sets the tooltip for a column. + * @param {Number} col The column index + * @param {String} tooltip The new tooltip + */ + setColumnTooltip : function(col, tooltip){ + this.config[col].tooltip = tooltip; + }, + + /** + * Returns the dataIndex for the specified column. + * @param {Number} col The column index + * @return {Number} + */ + getDataIndex : function(col){ + return this.config[col].dataIndex; + }, + + /** + * Sets the dataIndex for a column. + * @param {Number} col The column index + * @param {Number} dataIndex The new 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++){ + if(c[i].dataIndex == dataIndex){ + return i; + } + } + return -1; + }, + + /** + * Returns true if the cell is editable. + * @param {Number} colIndex The column index + * @param {Number} rowIndex The row index + * @return {Boolean} + */ + isCellEditable : function(colIndex, rowIndex){ + return (this.config[colIndex].editable || (typeof this.config[colIndex].editable == "undefined" && this.config[colIndex].editor)) ? true : false; + }, + + /** + * Returns the editor defined for the cell/column. + * @param {Number} colIndex The column index + * @param {Number} rowIndex The row index + * @return {Object} + */ + getCellEditor : function(colIndex, rowIndex){ + return this.config[colIndex].editor; + }, + + /** + * Sets if a column is editable. + * @param {Number} col The column index + * @param {Boolean} editable True if the column is editable + */ + setEditable : function(col, editable){ + this.config[col].editable = editable; + }, + + + /** + * Returns true if the column is hidden. + * @param {Number} colIndex The column index + * @return {Boolean} + */ + isHidden : function(colIndex){ + return this.config[colIndex].hidden; + }, + + + /** + * Returns true if the column width cannot be changed + */ + isFixed : function(colIndex){ + return this.config[colIndex].fixed; + }, + + /** + * Returns true if the column can be resized + * @return {Boolean} + */ + isResizable : function(colIndex){ + return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true; + }, + /** + * Sets if a column is hidden. + * @param {Number} colIndex The column index + * @param {Boolean} hidden True if the column is hidden + */ + setHidden : function(colIndex, hidden){ + var c = this.config[colIndex]; + if(c.hidden !== hidden){ + c.hidden = hidden; + this.totalWidth = null; + this.fireEvent("hiddenchange", this, colIndex, hidden); + } + }, + + /** + * Sets the editor for a column. + * @param {Number} col The column index + * @param {Object} editor The editor object + */ + setEditor : function(col, editor){ + this.config[col].editor = editor; + } +}); + +// private +Ext.grid.ColumnModel.defaultRenderer = function(value){ + if(typeof value == "string" && value.length < 1){ + return " "; + } + return value; +}; + +// Alias for backwards compatibility +Ext.grid.DefaultColumnModel = Ext.grid.ColumnModel; Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnSplitDD.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnSplitDD.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/ColumnSplitDD.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,64 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +// private +// This is a support class used internally by the Grid components +Ext.grid.SplitDragZone = function(grid, hd, hd2){ + this.grid = grid; + this.view = grid.getView(); + this.proxy = this.view.resizeProxy; + Ext.grid.SplitDragZone.superclass.constructor.call(this, hd, + "gridSplitters" + this.grid.getGridEl().id, { + dragElId : Ext.id(this.proxy.dom), resizeFrame:false + }); + this.setHandleElId(Ext.id(hd)); + this.setOuterHandleElId(Ext.id(hd2)); + this.scroll = false; +}; +Ext.extend(Ext.grid.SplitDragZone, Ext.dd.DDProxy, { + fly: Ext.Element.fly, + + b4StartDrag : function(x, y){ + this.view.headersDisabled = true; + this.proxy.setHeight(this.view.mainWrap.getHeight()); + var w = this.cm.getColumnWidth(this.cellIndex); + var minw = Math.max(w-this.grid.minColumnWidth, 0); + this.resetConstraints(); + this.setXConstraint(minw, 1000); + this.setYConstraint(0, 0); + this.minX = x - minw; + this.maxX = x + 1000; + this.startPos = x; + Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); + }, + + + handleMouseDown : function(e){ + ev = Ext.EventObject.setEvent(e); + var t = this.fly(ev.getTarget()); + if(t.hasClass("x-grid-split")){ + this.cellIndex = this.view.getCellIndex(t.dom); + this.split = t.dom; + this.cm = this.grid.colModel; + if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){ + Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this, arguments); + } + } + }, + + endDrag : function(e){ + this.view.headersDisabled = false; + var endX = Math.max(this.minX, Ext.lib.Event.getPageX(e)); + var diff = endX - this.startPos; + this.view.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); + }, + + autoOffset : function(){ + this.setDelta(0,0); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/EditorGrid.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/EditorGrid.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/EditorGrid.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,212 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.EditorGridPanel + * @extends Ext.grid.GridPanel + * Class for creating and editable grid. + + * @constructor + */ +Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { + /** + * @cfg {Number} clicksToEdit + * The number of clicks on a cell required to display the cell's editor (defaults to 2) + */ + clicksToEdit: 2, + + // private + isEditor : true, + // private + detectEdit: false, + + /** + * @cfg {Boolean} trackMouseOver @hide + */ + // private + trackMouseOver: false, // causes very odd FF errors + + // private + initComponent : function(){ + Ext.grid.EditorGridPanel.superclass.initComponent.call(this); + + if(!this.selModel){ + this.selModel = new Ext.grid.CellSelectionModel(); + } + + this.activeEditor = null; + + this.addEvents( + /** + * @event beforeedit + * Fires before cell editing is triggered. The edit event object has the following properties
        + *
          + *
        • grid - This grid
        • + *
        • record - The record being edited
        • + *
        • field - The field name being edited
        • + *
        • value - The value for the field being edited.
        • + *
        • row - The grid row index
        • + *
        • column - The grid column index
        • + *
        • cancel - Set this to true to cancel the edit or return false from your handler.
        • + *
        + * @param {Object} e An edit event (see above for description) + */ + "beforeedit", + /** + * @event afteredit + * Fires after a cell is edited.
        + *
          + *
        • grid - This grid
        • + *
        • record - The record being edited
        • + *
        • field - The field name being edited
        • + *
        • value - The value being set
        • + *
        • originalValue - The original value for the field, before the edit.
        • + *
        • row - The grid row index
        • + *
        • column - The grid column index
        • + *
        + * @param {Object} e An edit event (see above for description) + */ + "afteredit", + /** + * @event validateedit + * Fires after a cell is edited, but before the value is set in the record. Return false + * to cancel the change. The edit event object has the following properties
        + *
          + *
        • grid - This grid
        • + *
        • record - The record being edited
        • + *
        • field - The field name being edited
        • + *
        • value - The value being set
        • + *
        • originalValue - The original value for the field, before the edit.
        • + *
        • row - The grid row index
        • + *
        • column - The grid column index
        • + *
        • cancel - Set this to true to cancel the edit or return false from your handler.
        • + *
        + * @param {Object} e An edit event (see above for description) + */ + "validateedit" + ); + }, + + // private + initEvents : function(){ + Ext.grid.EditorGridPanel.superclass.initEvents.call(this); + + this.on("bodyscroll", this.stopEditing, this); + + if(this.clicksToEdit == 1){ + this.on("cellclick", this.onCellDblClick, this); + }else { + if(this.clicksToEdit == 'auto' && this.view.mainBody){ + this.view.mainBody.on("mousedown", this.onAutoEditClick, this); + } + this.on("celldblclick", this.onCellDblClick, this); + } + this.getGridEl().addClass("xedit-grid"); + }, + + // private + onCellDblClick : function(g, row, col){ + this.startEditing(row, col); + }, + + // private + onAutoEditClick : function(e, t){ + var row = this.view.findRowIndex(t); + var col = this.view.findCellIndex(t); + if(row !== false && col !== false){ + if(this.selModel.getSelectedCell){ // cell sm + var sc = this.selModel.getSelectedCell(); + if(sc && sc.cell[0] === row && sc.cell[1] === col){ + this.startEditing(row, col); + } + }else{ + if(this.selModel.isSelected(row)){ + this.startEditing(row, col); + } + } + } + }, + + // private + onEditComplete : function(ed, value, startValue){ + this.editing = false; + this.activeEditor = null; + ed.un("specialkey", this.selModel.onEditorKey, this.selModel); + if(String(value) !== String(startValue)){ + var r = ed.record; + var field = this.colModel.getDataIndex(ed.col); + var e = { + grid: this, + record: r, + field: field, + originalValue: startValue, + value: value, + row: ed.row, + column: ed.col, + cancel:false + }; + if(this.fireEvent("validateedit", e) !== false && !e.cancel){ + r.set(field, e.value); + delete e.cancel; + this.fireEvent("afteredit", e); + } + } + this.view.focusCell(ed.row, ed.col); + }, + + /** + * Starts editing the specified for the specified row/column + * @param {Number} rowIndex + * @param {Number} colIndex + */ + startEditing : function(row, col){ + this.stopEditing(); + if(this.colModel.isCellEditable(col, row)){ + this.view.ensureVisible(row, col, true); + var r = this.store.getAt(row); + var field = this.colModel.getDataIndex(col); + var e = { + grid: this, + record: r, + field: field, + value: r.data[field], + row: row, + column: col, + cancel:false + }; + if(this.fireEvent("beforeedit", e) !== false && !e.cancel){ + this.editing = true; + var ed = this.colModel.getCellEditor(col, row); + if(!ed.rendered){ + ed.render(this.view.getEditorParent(ed)); + } + (function(){ // complex but required for focus issues in safari, ie and opera + ed.row = row; + ed.col = col; + ed.record = r; + ed.on("complete", this.onEditComplete, this, {single: true}); + ed.on("specialkey", this.selModel.onEditorKey, this.selModel); + this.activeEditor = ed; + var v = r.data[field]; + ed.startEdit(this.view.getCell(row, col), v); + }).defer(50, this); + } + } + }, + + /** + * Stops any active editing + */ + stopEditing : function(){ + if(this.activeEditor){ + this.activeEditor.completeEdit(); + } + this.activeEditor = null; + } +}); +Ext.reg('editorgrid', Ext.grid.EditorGridPanel); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridDD.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridDD.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridDD.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,67 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +// private +// This is a support class used internally by the Grid components +Ext.grid.GridDragZone = function(grid, config){ + this.view = grid.getView(); + Ext.grid.GridDragZone.superclass.constructor.call(this, this.view.mainBody.dom, config); + if(this.view.lockedBody){ + this.setHandleElId(Ext.id(this.view.mainBody.dom)); + this.setOuterHandleElId(Ext.id(this.view.lockedBody.dom)); + } + this.scroll = false; + this.grid = grid; + this.ddel = document.createElement('div'); + this.ddel.className = 'x-grid-dd-wrap'; +}; + +Ext.extend(Ext.grid.GridDragZone, Ext.dd.DragZone, { + ddGroup : "GridDD", + + getDragData : function(e){ + var t = Ext.lib.Event.getTarget(e); + var rowIndex = this.view.findRowIndex(t); + if(rowIndex !== false){ + var sm = this.grid.selModel; + if(!sm.isSelected(rowIndex) || e.hasModifier()){ + sm.handleMouseDown(this.grid, rowIndex, e); + } + return {grid: this.grid, ddel: this.ddel, rowIndex: rowIndex, selections:sm.getSelections()}; + } + return false; + }, + + onInitDrag : function(e){ + var data = this.dragData; + this.ddel.innerHTML = this.grid.getDragDropText(); + this.proxy.update(this.ddel); + // fire start drag? + }, + + afterRepair : function(){ + this.dragging = false; + }, + + getRepairXY : function(e, data){ + return false; + }, + + onEndDrag : function(data, e){ + // fire end drag? + }, + + onValidDrop : function(dd, e, id){ + // fire drag drop? + this.hideProxy(); + }, + + beforeInvalidDrop : function(e, id){ + + } +}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridEditor.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridEditor.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridEditor.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,23 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +// private +// This is a support class used internally by the Grid components +Ext.grid.GridEditor = function(field, config){ + Ext.grid.GridEditor.superclass.constructor.call(this, field, config); + field.monitorTab = false; +}; + +Ext.extend(Ext.grid.GridEditor, Ext.Editor, { + alignment: "tl-tl", + autoSize: "width", + hideEl : false, + cls: "x-small-editor x-grid-editor", + shim:false, + shadow:false +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridPanel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridPanel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridPanel.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,694 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.GridPanel + * @extends Ext.Panel + * This class represents the primary interface of a component based grid control. + *

        Usage: + *
        var grid = new Ext.grid.GridPanel({
        +    store: new Ext.data.Store({
        +        reader: reader,
        +        data: xg.dummyData
        +    }),
        +    columns: [
        +        {id:'company', header: "Company", width: 200, sortable: true, dataIndex: 'company'},
        +        {header: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
        +        {header: "Change", width: 120, sortable: true, dataIndex: 'change'},
        +        {header: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
        +        {header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
        +    ],
        +    viewConfig: {
        +        forceFit: true
        +    },
        +    sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
        +    width:600,
        +    height:300,
        +    frame:true,
        +    title:'Framed with Checkbox Selection and Horizontal Scrolling',
        +    iconCls:'icon-grid'
        +});
        + * Note: Although this class inherits many configuration options from base classes, some of them + * (such as autoScroll, layout, items, etc) won't function as they do with the base Panel class.
        + *
        + * To access the data in a Grid, it is necessary to use the data model encapsulated + * by the {@link #store Store}. See the {@link #cellclick} event. + * @constructor + * @param {Object} config The config object + */ +Ext.grid.GridPanel = Ext.extend(Ext.Panel, { + /** + * @cfg {Ext.data.Store} store The {@link Ext.data.Store} the grid should use as its data source (required). + */ + /** + * @cfg {Object} cm Shorthand for {@link #colModel}. + */ + /** + * @cfg {Object} colModel The {@link Ext.grid.ColumnModel} to use when rendering the grid (required). + */ + /** + * @cfg {Object} sm Shorthand for {@link #selModel}. + */ + /** + * @cfg {Object} selModel Any subclass of AbstractSelectionModel that will provide the selection model for + * the grid (defaults to {@link Ext.grid.RowSelectionModel} if not specified). + */ + /** + * @cfg {Array} columns An array of columns to auto create a ColumnModel + */ + /** + * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if autoHeight is not on. + */ + /** + * @cfg {Boolean} disableSelection True to disable selections in the grid (defaults to false). - ignored a SelectionModel is specified + */ + /** + * @cfg {Boolean} enableColumnMove False to turn off column reordering via drag drop (defaults to true). + */ + /** + * @cfg {Boolean} enableColumnResize False to turn off column resizing for the whole grid (defaults to true). + */ + /** + * @cfg {Object} viewConfig A config object that will be applied to the grid's UI view. Any of + * the config options available for {@link Ext.grid.GridView} can be specified here. + */ + + /** + * Configures the text in the drag proxy (defaults to "{0} selected row(s)"). + * {0} is replaced with the number of selected rows. + * @type String + */ + ddText : "{0} selected row{1}", + /** + * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to 25. + */ + minColumnWidth : 25, + /** + * @cfg {Boolean} monitorWindowResize True to autoSize the grid when the window resizes. Defaults to true. + */ + monitorWindowResize : true, + //deprecated + maxRowsToMeasure : 0, + /** + * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is true. + */ + trackMouseOver : true, + /** + * @cfg {Boolean} enableDragDrop True to enable drag and drop of rows. + */ + enableDragDrop : false, + /** + * @cfg {Boolean} enableColumnMove True to enable drag and drop reorder of columns. + */ + enableColumnMove : true, + /** + * @cfg {Boolean} enableColumnHide True to enable hiding of columns with the header context menu. + */ + enableColumnHide : true, + /** + * @cfg {Boolean} enableHdMenu True to enable the drop down button for menu in the headers. + */ + enableHdMenu : true, + /** + * @cfg {Boolean} enableRowHeightSync True to manually sync row heights across locked and not locked rows. + */ + enableRowHeightSync : false, + /** + * @cfg {Boolean} stripeRows True to stripe the rows. Default is false. + */ + stripeRows : false, + /** + * @cfg {String} autoExpandColumn The id of a column in this grid that should expand to fill unused space. This id can not be 0. + */ + autoExpandColumn : false, + /** + * @cfg {Number} autoExpandMin The minimum width the autoExpandColumn can have (if enabled). + * defaults to 50. + */ + autoExpandMin : 50, + /** + * @cfg {Number} autoExpandMax The maximum width the autoExpandColumn can have (if enabled). Defaults to 1000. + */ + autoExpandMax : 1000, + /** + * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set before a call to render(). + */ + view : null, + /** + * @cfg {Object} loadMask An {@link Ext.LoadMask} config or true to mask the grid while loading (defaults to false). + */ + loadMask : false, + + // private + rendered : false, + // private + viewReady: false, + // private + stateEvents: ["columnmove", "columnresize", "sortchange"], + + // private + initComponent : function(){ + Ext.grid.GridPanel.superclass.initComponent.call(this); + + // override any provided value since it isn't valid + // and is causing too many bug reports ;) + this.autoScroll = false; + + if(this.columns && (this.columns instanceof Array)){ + this.colModel = new Ext.grid.ColumnModel(this.columns); + delete this.columns; + } + + // check and correct shorthanded configs + if(this.ds){ + this.store = this.ds; + delete this.ds; + } + if(this.cm){ + this.colModel = this.cm; + delete this.cm; + } + if(this.sm){ + this.selModel = this.sm; + delete this.sm; + } + this.store = Ext.StoreMgr.lookup(this.store); + + this.addEvents( + // raw events + /** + * @event click + * The raw click event for the entire grid. + * @param {Ext.EventObject} e + */ + "click", + /** + * @event dblclick + * The raw dblclick event for the entire grid. + * @param {Ext.EventObject} e + */ + "dblclick", + /** + * @event contextmenu + * The raw contextmenu event for the entire grid. + * @param {Ext.EventObject} e + */ + "contextmenu", + /** + * @event mousedown + * The raw mousedown event for the entire grid. + * @param {Ext.EventObject} e + */ + "mousedown", + /** + * @event mouseup + * The raw mouseup event for the entire grid. + * @param {Ext.EventObject} e + */ + "mouseup", + /** + * @event mouseover + * The raw mouseover event for the entire grid. + * @param {Ext.EventObject} e + */ + "mouseover", + /** + * @event mouseout + * The raw mouseout event for the entire grid. + * @param {Ext.EventObject} e + */ + "mouseout", + /** + * @event keypress + * The raw keypress event for the entire grid. + * @param {Ext.EventObject} e + */ + "keypress", + /** + * @event keydown + * The raw keydown event for the entire grid. + * @param {Ext.EventObject} e + */ + "keydown", + + // custom events + /** + * @event cellmousedown + * Fires before a cell is clicked + * @param {Grid} this + * @param {Number} rowIndex + * @param {Number} columnIndex + * @param {Ext.EventObject} e + */ + "cellmousedown", + /** + * @event rowmousedown + * Fires before a row is clicked + * @param {Grid} this + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + "rowmousedown", + /** + * @event headermousedown + * Fires before a header is clicked + * @param {Grid} this + * @param {Number} columnIndex + * @param {Ext.EventObject} e + */ + "headermousedown", + + /** + * @event cellclick + * Fires when a cell is clicked. + * The data for the cell is drawn from the {@link Ext.data.Record Record} + * for this row. To access the data in the listener function use the + * following technique: + *
        
        +    function(grid, rowIndex, columnIndex, e) {
        +        var record = grid.getStore().getAt(rowIndex);  // Get the Record
        +        var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name
        +        var data = record.get(fieldName);
        +    }
        +
        + * @param {Grid} this + * @param {Number} rowIndex + * @param {Number} columnIndex + * @param {Ext.EventObject} e + */ + "cellclick", + /** + * @event celldblclick + * Fires when a cell is double clicked + * @param {Grid} this + * @param {Number} rowIndex + * @param {Number} columnIndex + * @param {Ext.EventObject} e + */ + "celldblclick", + /** + * @event rowclick + * Fires when a row is clicked + * @param {Grid} this + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + "rowclick", + /** + * @event rowdblclick + * Fires when a row is double clicked + * @param {Grid} this + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + "rowdblclick", + /** + * @event headerclick + * Fires when a header is clicked + * @param {Grid} this + * @param {Number} columnIndex + * @param {Ext.EventObject} e + */ + "headerclick", + /** + * @event headerdblclick + * Fires when a header cell is double clicked + * @param {Grid} this + * @param {Number} columnIndex + * @param {Ext.EventObject} e + */ + "headerdblclick", + /** + * @event rowcontextmenu + * Fires when a row is right clicked + * @param {Grid} this + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + "rowcontextmenu", + /** + * @event cellcontextmenu + * Fires when a cell is right clicked + * @param {Grid} this + * @param {Number} rowIndex + * @param {Number} cellIndex + * @param {Ext.EventObject} e + */ + "cellcontextmenu", + /** + * @event headercontextmenu + * Fires when a header is right clicked + * @param {Grid} this + * @param {Number} columnIndex + * @param {Ext.EventObject} e + */ + "headercontextmenu", + /** + * @event bodyscroll + * Fires when the body element is scrolled + * @param {Number} scrollLeft + * @param {Number} scrollTop + */ + "bodyscroll", + /** + * @event columnresize + * Fires when the user resizes a column + * @param {Number} columnIndex + * @param {Number} newSize + */ + "columnresize", + /** + * @event columnmove + * Fires when the user moves a column + * @param {Number} oldIndex + * @param {Number} newIndex + */ + "columnmove", + /** + * @event sortchange + * Fires when the grid's store sort changes + * @param {Grid} this + * @param {Object} sortInfo An object with the keys field and direction + */ + "sortchange" + ); + }, + + // private + onRender : function(ct, position){ + Ext.grid.GridPanel.superclass.onRender.apply(this, arguments); + + var c = this.body; + + this.el.addClass('x-grid-panel'); + + var view = this.getView(); + view.init(this); + + c.on("mousedown", this.onMouseDown, this); + c.on("click", this.onClick, this); + c.on("dblclick", this.onDblClick, this); + c.on("contextmenu", this.onContextMenu, this); + c.on("keydown", this.onKeyDown, this); + + this.relayEvents(c, ["mousedown","mouseup","mouseover","mouseout","keypress"]); + + this.getSelectionModel().init(this); + this.view.render(); + }, + + // private + initEvents : function(){ + Ext.grid.GridPanel.superclass.initEvents.call(this); + + if(this.loadMask){ + this.loadMask = new Ext.LoadMask(this.bwrap, + Ext.apply({store:this.store}, this.loadMask)); + } + }, + + initStateEvents : function(){ + Ext.grid.GridPanel.superclass.initStateEvents.call(this); + this.colModel.on('hiddenchange', this.saveState, this, {delay: 100}); + }, + + applyState : function(state){ + var cm = this.colModel; + var cs = state.columns; + if(cs){ + for(var i = 0, len = cs.length; i < len; i++){ + var s = cs[i]; + var c = cm.getColumnById(s.id); + if(c){ + c.hidden = s.hidden; + c.width = s.width; + var oldIndex = cm.getIndexById(s.id); + if(oldIndex != i){ + cm.moveColumn(oldIndex, i); + } + } + } + } + if(state.sort){ + this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction); + } + }, + + getState : function(){ + var o = {columns: []}; + for(var i = 0, c; c = this.colModel.config[i]; i++){ + o.columns[i] = { + id: c.id, + width: c.width + }; + if(c.hidden){ + o.columns[i].hidden = true; + } + } + var ss = this.store.getSortState(); + if(ss){ + o.sort = ss; + } + return o; + }, + + // private + afterRender : function(){ + Ext.grid.GridPanel.superclass.afterRender.call(this); + this.view.layout(); + this.viewReady = true; + }, + + /** + * Reconfigures the grid to use a different Store and Column Model. + * The View will be bound to the new objects and refreshed. + * @param {Ext.data.Store} store The new {@link Ext.data.Store} object + * @param {Ext.grid.ColumnModel} colModel The new {@link Ext.grid.ColumnModel} object + */ + reconfigure : function(store, colModel){ + if(this.loadMask){ + this.loadMask.destroy(); + this.loadMask = new Ext.LoadMask(this.bwrap, + Ext.apply({store:store}, this.initialConfig.loadMask)); + } + this.view.bind(store, colModel); + this.store = store; + this.colModel = colModel; + if(this.rendered){ + this.view.refresh(true); + } + }, + + // private + onKeyDown : function(e){ + this.fireEvent("keydown", e); + }, + + // private + onDestroy : function(){ + if(this.rendered){ + if(this.loadMask){ + this.loadMask.destroy(); + } + var c = this.body; + c.removeAllListeners(); + this.view.destroy(); + c.update(""); + } + this.colModel.purgeListeners(); + Ext.grid.GridPanel.superclass.onDestroy.call(this); + }, + + // private + processEvent : function(name, e){ + this.fireEvent(name, e); + var t = e.getTarget(); + var v = this.view; + var header = v.findHeaderIndex(t); + if(header !== false){ + this.fireEvent("header" + name, this, header, e); + }else{ + var row = v.findRowIndex(t); + var cell = v.findCellIndex(t); + if(row !== false){ + this.fireEvent("row" + name, this, row, e); + if(cell !== false){ + this.fireEvent("cell" + name, this, row, cell, e); + } + } + } + }, + + // private + onClick : function(e){ + this.processEvent("click", e); + }, + + // private + onMouseDown : function(e){ + this.processEvent("mousedown", e); + }, + + // private + onContextMenu : function(e, t){ + this.processEvent("contextmenu", e); + }, + + // private + onDblClick : function(e){ + this.processEvent("dblclick", e); + }, + + // private + walkCells : function(row, col, step, fn, scope){ + var cm = this.colModel, clen = cm.getColumnCount(); + var ds = this.store, rlen = ds.getCount(), first = true; + if(step < 0){ + if(col < 0){ + row--; + first = false; + } + while(row >= 0){ + if(!first){ + col = clen-1; + } + first = false; + while(col >= 0){ + if(fn.call(scope || this, row, col, cm) === true){ + return [row, col]; + } + col--; + } + row--; + } + } else { + if(col >= clen){ + row++; + first = false; + } + while(row < rlen){ + if(!first){ + col = 0; + } + first = false; + while(col < clen){ + if(fn.call(scope || this, row, col, cm) === true){ + return [row, col]; + } + col++; + } + row++; + } + } + return null; + }, + + // private + getSelections : function(){ + return this.selModel.getSelections(); + }, + + // private + onResize : function(){ + Ext.grid.GridPanel.superclass.onResize.apply(this, arguments); + if(this.viewReady){ + this.view.layout(); + } + }, + + /** + * Returns the grid's underlying element. + * @return {Element} The element + */ + getGridEl : function(){ + return this.body; + }, + + // private for compatibility, overridden by editor grid + stopEditing : function(){}, + + /** + * Returns the grid's SelectionModel. + * @return {SelectionModel} The selection model + */ + getSelectionModel : function(){ + if(!this.selModel){ + this.selModel = new Ext.grid.RowSelectionModel( + this.disableSelection ? {selectRow: Ext.emptyFn} : null); + } + return this.selModel; + }, + + /** + * Returns the grid's data store. + * @return {DataSource} The store + */ + getStore : function(){ + return this.store; + }, + + /** + * Returns the grid's ColumnModel. + * @return {ColumnModel} The column model + */ + getColumnModel : function(){ + return this.colModel; + }, + + /** + * Returns the grid's GridView object. + * @return {GridView} The grid view + */ + getView : function(){ + if(!this.view){ + this.view = new Ext.grid.GridView(this.viewConfig); + } + return this.view; + }, + /** + * Called to get grid's drag proxy text, by default returns this.ddText. + * @return {String} The text + */ + getDragDropText : function(){ + var count = this.selModel.getCount(); + return String.format(this.ddText, count, count == 1 ? '' : 's'); + } + + /** @cfg {String/Number} activeItem @hide */ + /** @cfg {Boolean} autoDestroy @hide */ + /** @cfg {Object/String/Function} autoLoad @hide */ + /** @cfg {Boolean} autoWidth @hide */ + /** @cfg {Boolean/Number} bufferResize @hide */ + /** @cfg {String} defaultType @hide */ + /** @cfg {Object} defaults @hide */ + /** @cfg {Boolean} hideBorders @hide */ + /** @cfg {Mixed} items @hide */ + /** @cfg {String} layout @hide */ + /** @cfg {Object} layoutConfig @hide */ + /** @cfg {Boolean} monitorResize @hide */ + /** @property items @hide */ + /** @method add @hide */ + /** @method cascade @hide */ + /** @method doLayout @hide */ + /** @method find @hide */ + /** @method findBy @hide */ + /** @method findById @hide */ + /** @method findByType @hide */ + /** @method getComponent @hide */ + /** @method getLayout @hide */ + /** @method getUpdater @hide */ + /** @method insert @hide */ + /** @method load @hide */ + /** @method remove @hide */ + /** @event add @hide */ + /** @event afterLayout @hide */ + /** @event beforeadd @hide */ + /** @event beforeremove @hide */ + /** @event remove @hide */ +}); +Ext.reg('grid', Ext.grid.GridPanel); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridView.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridView.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GridView.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,1550 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.GridView + * @extends Ext.util.Observable + *

        This class encapsulates the user interface of an {@link Ext.grid.GridPanel}. + * Methods of this class may be used to access user interface elements to enable + * special display effects. Do not change the DOM structure of the user interface.

        + *

        This class does not provide ways to manipulate the underlying data. The data + * model of a Grid is held in an {@link Ext.data.Store}.

        + * @constructor + * @param {Object} config + */ +Ext.grid.GridView = function(config){ + Ext.apply(this, config); + // These events are only used internally by the grid components + this.addEvents( + /** + * @event beforerowremoved + * Internal UI Event. Fired before a row is removed. + * @param {Ext.grid.GridView} view + * @param {Number} rowIndex The index of the row to be removed. + * @param {Ext.data.Record} record The Record to be removed + */ + "beforerowremoved", + /** + * @event beforerowsinserted + * Internal UI Event. Fired before rows are inserted. + * @param {Ext.grid.GridView} view + * @param {Number} firstRow The index of the first row to be inserted. + * @param {Number} lastRow The index of the last row to be inserted. + */ + "beforerowsinserted", + /** + * @event beforerefresh + * Internal UI Event. Fired before the view is refreshed. + * @param {Ext.grid.GridView} view + */ + "beforerefresh", + /** + * @event rowremoved + * Internal UI Event. Fired after a row is removed. + * @param {Ext.grid.GridView} view + * @param {Number} rowIndex The index of the row that was removed. + * @param {Ext.data.Record} record The Record that was removed + */ + "rowremoved", + /** + * @event rowsinserted + * Internal UI Event. Fired after rows are inserted. + * @param {Ext.grid.GridView} view + * @param {Number} firstRow The index of the first inserted. + * @param {Number} lastRow The index of the last row inserted. + */ + "rowsinserted", + /** + * @event rowupdated + * Internal UI Event. Fired after a row has been updated. + * @param {Ext.grid.GridView} view + * @param {Number} firstRow The index of the row updated. + * @param {Ext.data.record} record The Record backing the row updated. + */ + "rowupdated", + /** + * @event refresh + * Internal UI Event. Fired after the GridView's body has been refreshed. + * @param {Ext.grid.GridView} view + */ + "refresh" + ); + Ext.grid.GridView.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.GridView, Ext.util.Observable, { + /** + * Override this function to apply custom CSS classes to rows during rendering. You can also supply custom + * parameters to the row template for the current row to customize how it is rendered using the rowParams + * parameter. This function should return the CSS class name (or empty string '' for none) that will be added + * to the row's wrapping div. To apply multiple class names, simply return them space-delimited within the string + * (e.g., 'my-class another-class'). + * @param {Record} record The {@link Ext.data.Record} corresponding to the current row + * @param {Number} index The row index + * @param {Object} rowParams A config object that is passed to the row template during rendering that allows + * customization of various aspects of a body row, if applicable. Note that this object will only be applied if + * {@link #enableRowBody} = true, otherwise it will be ignored. The object may contain any of these properties:
          + *
        • body : String
          An HTML fragment to be rendered as the cell's body content (defaults to '').
        • + *
        • bodyStyle : String
          A CSS style string that will be applied to the row's TR style attribute (defaults to '').
        • + *
        • cols : Number
          The column count to apply to the body row's TD colspan attribute (defaults to the current + * column count of the grid).
        • + *
        + * @param {Store} store The {@link Ext.data.Store} this grid is bound to + * @method getRowClass + * @return {String} a CSS class name to add to the row. + */ + /** + * @cfg {Boolean} enableRowBody True to add a second TR element per row that can be used to provide a row body + * that spans beneath the data row. Use the {@link #getRowClass} method's rowParams config to customize the row body. + */ + /** + * @cfg {String} emptyText Default text to display in the grid body when no rows are available (defaults to ''). + */ + /** + * The amount of space to reserve for the scrollbar (defaults to 19 pixels) + * @type Number + */ + scrollOffset: 19, + /** + * @cfg {Boolean} autoFill True to auto expand the columns to fit the grid when the grid is created. + */ + autoFill: false, + /** + * @cfg {Boolean} forceFit True to auto expand/contract the size of the columns to fit the grid width and prevent horizontal scrolling. + */ + forceFit: false, + /** + * The CSS classes applied to a header when it is sorted. (defaults to ["sort-asc", "sort-desc"]) + * @type Array + */ + sortClasses : ["sort-asc", "sort-desc"], + /** + * The text displayed in the "Sort Ascending" menu item + * @type String + */ + sortAscText : "Sort Ascending", + /** + * The text displayed in the "Sort Descending" menu item + * @type String + */ + sortDescText : "Sort Descending", + /** + * The text displayed in the "Columns" menu item + * @type String + */ + columnsText : "Columns", + + // private + borderWidth: 2, + + /* -------------------------------- UI Specific ----------------------------- */ + + // private + initTemplates : function(){ + var ts = this.templates || {}; + if(!ts.master){ + ts.master = new Ext.Template( + '
        ', + '
        ', + '
        {header}
        ', + '
        {body}
        ', + "
        ", + '
         
        ', + '
         
        ', + "
        " + ); + } + + if(!ts.header){ + ts.header = new Ext.Template( + '', + '{cells}', + "
        " + ); + } + + if(!ts.hcell){ + ts.hcell = new Ext.Template( + '
        ', this.grid.enableHdMenu ? '' : '', + '{value}', + "
        " + ); + } + + if(!ts.body){ + ts.body = new Ext.Template('{rows}'); + } + + if(!ts.row){ + ts.row = new Ext.Template( + '
        ', + '{cells}', + (this.enableRowBody ? '' : ''), + '
        {body}
        ' + ); + } + + if(!ts.cell){ + ts.cell = new Ext.Template( + '', + '
        {value}
        ', + "" + ); + } + + for(var k in ts){ + var t = ts[k]; + if(t && typeof t.compile == 'function' && !t.compiled){ + t.disableFormats = true; + t.compile(); + } + } + + this.templates = ts; + + this.tdClass = 'x-grid3-cell'; + this.cellSelector = 'td.x-grid3-cell'; + this.hdCls = 'x-grid3-hd'; + this.rowSelector = 'div.x-grid3-row'; + this.colRe = new RegExp("x-grid3-td-([^\\s]+)", ""); + }, + + // private + fly : function(el){ + if(!this._flyweight){ + this._flyweight = new Ext.Element.Flyweight(document.body); + } + this._flyweight.dom = el; + return this._flyweight; + }, + + // private + getEditorParent : function(ed){ + return this.scroller.dom; + }, + + // private + initElements : function(){ + var E = Ext.Element; + + var el = this.grid.getGridEl().dom.firstChild; + var cs = el.childNodes; + + this.el = new E(el); + + this.mainWrap = new E(cs[0]); + this.mainHd = new E(this.mainWrap.dom.firstChild); + this.innerHd = this.mainHd.dom.firstChild; + this.scroller = new E(this.mainWrap.dom.childNodes[1]); + if(this.forceFit){ + this.scroller.setStyle('overflow-x', 'hidden'); + } + this.mainBody = new E(this.scroller.dom.firstChild); + + this.focusEl = new E(this.scroller.dom.childNodes[1]); + this.focusEl.swallowEvent("click", true); + + this.resizeMarker = new E(cs[1]); + this.resizeProxy = new E(cs[2]); + }, + + // private + getRows : function(){ + return this.hasRows() ? this.mainBody.dom.childNodes : []; + }, + + // finder methods, used with delegation + + // private + findCell : function(el){ + if(!el){ + return false; + } + return this.fly(el).findParent(this.cellSelector, 3); + }, + + // private + findCellIndex : function(el, requiredCls){ + var cell = this.findCell(el); + if(cell && (!requiredCls || this.fly(cell).hasClass(requiredCls))){ + return this.getCellIndex(cell); + } + return false; + }, + + // private + getCellIndex : function(el){ + if(el){ + var m = el.className.match(this.colRe); + if(m && m[1]){ + return this.cm.getIndexById(m[1]); + } + } + return false; + }, + + // private + findHeaderCell : function(el){ + var cell = this.findCell(el); + return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null; + }, + + // private + findHeaderIndex : function(el){ + return this.findCellIndex(el, this.hdCls); + }, + + // private + findRow : function(el){ + if(!el){ + return false; + } + return this.fly(el).findParent(this.rowSelector, 10); + }, + + // private + findRowIndex : function(el){ + var r = this.findRow(el); + return r ? r.rowIndex : false; + }, + + // getter methods for fetching elements dynamically in the grid + +/** + * Return the <TR> HtmlElement which represents a Grid row for the specified index. + * @param {Number} index The row index + * @return {HtmlElement} The <TR> element. + */ + getRow : function(row){ + return this.getRows()[row]; + }, + +/** + * Returns the grid's <TD> HtmlElement at the specified coordinates. + * @param {Number} row The row index in which to find the cell. + * @param {Number} col The column index of the cell. + * @return {HtmlElement} The <TD> at the specified coordinates. + */ + getCell : function(row, col){ + return this.getRow(row).getElementsByTagName('td')[col]; + }, + +/** + * Return the <TD> HtmlElement which represents the Grid's header cell for the specified column index. + * @param {Number} index The column index + * @return {HtmlElement} The <TD> element. + */ + getHeaderCell : function(index){ + return this.mainHd.dom.getElementsByTagName('td')[index]; + }, + + // manipulating elements + + // private - use getRowClass to apply custom row classes + addRowClass : function(row, cls){ + var r = this.getRow(row); + if(r){ + this.fly(r).addClass(cls); + } + }, + + // private + removeRowClass : function(row, cls){ + var r = this.getRow(row); + if(r){ + this.fly(r).removeClass(cls); + } + }, + + // private + removeRow : function(row){ + Ext.removeNode(this.getRow(row)); + }, + + // private + removeRows : function(firstRow, lastRow){ + var bd = this.mainBody.dom; + for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + Ext.removeNode(bd.childNodes[firstRow]); + } + }, + + // scrolling stuff + + // private + getScrollState : function(){ + var sb = this.scroller.dom; + return {left: sb.scrollLeft, top: sb.scrollTop}; + }, + + // private + restoreScroll : function(state){ + var sb = this.scroller.dom; + sb.scrollLeft = state.left; + sb.scrollTop = state.top; + }, + + /** + * Scrolls the grid to the top + */ + scrollToTop : function(){ + this.scroller.dom.scrollTop = 0; + this.scroller.dom.scrollLeft = 0; + }, + + // private + syncScroll : function(){ + var mb = this.scroller.dom; + this.innerHd.scrollLeft = mb.scrollLeft; + this.innerHd.scrollLeft = mb.scrollLeft; // second time for IE (1/2 time first fails, other browsers ignore) + this.grid.fireEvent("bodyscroll", mb.scrollLeft, mb.scrollTop); + }, + + // private + updateSortIcon : function(col, dir){ + var sc = this.sortClasses; + var hds = this.mainHd.select('td').removeClass(sc); + hds.item(col).addClass(sc[dir == "DESC" ? 1 : 0]); + }, + + // private + updateAllColumnWidths : function(){ + var tw = this.getTotalWidth(); + var clen = this.cm.getColumnCount(); + var ws = []; + for(var i = 0; i < clen; i++){ + ws[i] = this.getColumnWidth(i); + } + + this.innerHd.firstChild.firstChild.style.width = tw; + + for(var i = 0; i < clen; i++){ + var hd = this.getHeaderCell(i); + hd.style.width = ws[i]; + } + + var ns = this.getRows(); + for(var i = 0, len = ns.length; i < len; i++){ + ns[i].style.width = tw; + ns[i].firstChild.style.width = tw; + var row = ns[i].firstChild.rows[0]; + for(var j = 0; j < clen; j++){ + row.childNodes[j].style.width = ws[j]; + } + } + + this.onAllColumnWidthsUpdated(ws, tw); + }, + + // private + updateColumnWidth : function(col, width){ + var w = this.getColumnWidth(col); + var tw = this.getTotalWidth(); + + this.innerHd.firstChild.firstChild.style.width = tw; + var hd = this.getHeaderCell(col); + hd.style.width = w; + + var ns = this.getRows(); + for(var i = 0, len = ns.length; i < len; i++){ + ns[i].style.width = tw; + ns[i].firstChild.style.width = tw; + ns[i].firstChild.rows[0].childNodes[col].style.width = w; + } + + this.onColumnWidthUpdated(col, w, tw); + }, + + // private + updateColumnHidden : function(col, hidden){ + var tw = this.getTotalWidth(); + + this.innerHd.firstChild.firstChild.style.width = tw; + + var display = hidden ? 'none' : ''; + + var hd = this.getHeaderCell(col); + hd.style.display = display; + + var ns = this.getRows(); + for(var i = 0, len = ns.length; i < len; i++){ + ns[i].style.width = tw; + ns[i].firstChild.style.width = tw; + ns[i].firstChild.rows[0].childNodes[col].style.display = display; + } + + this.onColumnHiddenUpdated(col, hidden, tw); + + delete this.lastViewWidth; // force recalc + this.layout(); + }, + + // private + doRender : function(cs, rs, ds, startRow, colCount, stripe){ + var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1; + var tstyle = 'width:'+this.getTotalWidth()+';'; + // buffers + var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r; + for(var j = 0, len = rs.length; j < len; j++){ + r = rs[j]; cb = []; + var rowIndex = (j+startRow); + for(var i = 0; i < colCount; i++){ + c = cs[i]; + p.id = c.id; + p.css = i == 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); + p.attr = p.cellAttr = ""; + p.value = c.renderer(r.data[c.name], p, r, rowIndex, i, ds); + p.style = c.style; + if(p.value == undefined || p.value === "") p.value = " "; + if(r.dirty && typeof r.modified[c.name] !== 'undefined'){ + p.css += ' x-grid3-dirty-cell'; + } + cb[cb.length] = ct.apply(p); + } + var alt = []; + if(stripe && ((rowIndex+1) % 2 == 0)){ + alt[0] = "x-grid3-row-alt"; + } + if(r.dirty){ + alt[1] = " x-grid3-dirty-row"; + } + rp.cols = colCount; + if(this.getRowClass){ + alt[2] = this.getRowClass(r, rowIndex, rp, ds); + } + rp.alt = alt.join(" "); + rp.cells = cb.join(""); + buf[buf.length] = rt.apply(rp); + } + return buf.join(""); + }, + + // private + processRows : function(startRow, skipStripe){ + if(this.ds.getCount() < 1){ + return; + } + skipStripe = skipStripe || !this.grid.stripeRows; + startRow = startRow || 0; + var rows = this.getRows(); + var cls = ' x-grid3-row-alt '; + for(var i = startRow, len = rows.length; i < len; i++){ + var row = rows[i]; + row.rowIndex = i; + if(!skipStripe){ + var isAlt = ((i+1) % 2 == 0); + var hasAlt = (' '+row.className + ' ').indexOf(cls) != -1; + if(isAlt == hasAlt){ + continue; + } + if(isAlt){ + row.className += " x-grid3-row-alt"; + }else{ + row.className = row.className.replace("x-grid3-row-alt", ""); + } + } + } + }, + + // private + renderUI : function(){ + + var header = this.renderHeaders(); + var body = this.templates.body.apply({rows:''}); + + + var html = this.templates.master.apply({ + body: body, + header: header + }); + + var g = this.grid; + + g.getGridEl().dom.innerHTML = html; + + this.initElements(); + + + this.mainBody.dom.innerHTML = this.renderRows(); + this.processRows(0, true); + + + // get mousedowns early + Ext.fly(this.innerHd).on("click", this.handleHdDown, this); + this.mainHd.on("mouseover", this.handleHdOver, this); + this.mainHd.on("mouseout", this.handleHdOut, this); + this.mainHd.on("mousemove", this.handleHdMove, this); + + this.scroller.on('scroll', this.syncScroll, this); + if(g.enableColumnResize !== false){ + this.splitone = new Ext.grid.GridView.SplitDragZone(g, this.mainHd.dom); + } + + if(g.enableColumnMove){ + this.columnDrag = new Ext.grid.GridView.ColumnDragZone(g, this.innerHd); + this.columnDrop = new Ext.grid.HeaderDropZone(g, this.mainHd.dom); + } + + if(g.enableHdMenu !== false){ + if(g.enableColumnHide !== false){ + this.colMenu = new Ext.menu.Menu({id:g.id + "-hcols-menu"}); + this.colMenu.on("beforeshow", this.beforeColMenuShow, this); + this.colMenu.on("itemclick", this.handleHdMenuClick, this); + } + this.hmenu = new Ext.menu.Menu({id: g.id + "-hctx"}); + this.hmenu.add( + {id:"asc", text: this.sortAscText, cls: "xg-hmenu-sort-asc"}, + {id:"desc", text: this.sortDescText, cls: "xg-hmenu-sort-desc"} + ); + if(g.enableColumnHide !== false){ + this.hmenu.add('-', + {id:"columns", text: this.columnsText, menu: this.colMenu, iconCls: 'x-cols-icon'} + ); + } + this.hmenu.on("itemclick", this.handleHdMenuClick, this); + + //g.on("headercontextmenu", this.handleHdCtx, this); + } + + if(g.enableDragDrop || g.enableDrag){ + var dd = new Ext.grid.GridDragZone(g, { + ddGroup : g.ddGroup || 'GridDD' + }); + } + + this.updateHeaderSortState(); + + }, + + // private + layout : function(){ + if(!this.mainBody){ + return; // not rendered + } + var g = this.grid; + var c = g.getGridEl(), cm = this.cm, + expandCol = g.autoExpandColumn, + gv = this; + + var csize = c.getSize(true); + var vw = csize.width; + + if(vw < 20 || csize.height < 20){ // display: none? + return; + } + + if(g.autoHeight){ + this.scroller.dom.style.overflow = 'visible'; + }else{ + this.el.setSize(csize.width, csize.height); + + var hdHeight = this.mainHd.getHeight(); + var vh = csize.height - (hdHeight); + + this.scroller.setSize(vw, vh); + if(this.innerHd){ + this.innerHd.style.width = (vw)+'px'; + } + } + if(this.forceFit){ + if(this.lastViewWidth != vw){ + this.fitColumns(false, false); + this.lastViewWidth = vw; + } + }else { + this.autoExpand(); + } + this.onLayout(vw, vh); + }, + + // template functions for subclasses and plugins + // these functions include precalculated values + onLayout : function(vw, vh){ + // do nothing + }, + + onColumnWidthUpdated : function(col, w, tw){ + // template method + }, + + onAllColumnWidthsUpdated : function(ws, tw){ + // template method + }, + + onColumnHiddenUpdated : function(col, hidden, tw){ + // template method + }, + + updateColumnText : function(col, text){ + // template method + }, + + afterMove : function(colIndex){ + // template method + }, + + /* ----------------------------------- Core Specific -------------------------------------------*/ + // private + init: function(grid){ + this.grid = grid; + + this.initTemplates(); + this.initData(grid.store, grid.colModel); + this.initUI(grid); + }, + + // private + getColumnId : function(index){ + return this.cm.getColumnId(index); + }, + + // private + renderHeaders : function(){ + var cm = this.cm, ts = this.templates; + var ct = ts.hcell; + + var cb = [], sb = [], p = {}; + + for(var i = 0, len = cm.getColumnCount(); i < len; i++){ + p.id = cm.getColumnId(i); + p.value = cm.getColumnHeader(i) || ""; + p.style = this.getColumnStyle(i, true); + if(cm.config[i].align == 'right'){ + p.istyle = 'padding-right:16px'; + } + cb[cb.length] = ct.apply(p); + } + return ts.header.apply({cells: cb.join(""), tstyle:'width:'+this.getTotalWidth()+';'}); + }, + + // private + beforeUpdate : function(){ + this.grid.stopEditing(); + }, + + // private + updateHeaders : function(){ + this.innerHd.firstChild.innerHTML = this.renderHeaders(); + }, + + /** + * Focuses the specified row.. + * @param {Number} row The row index + */ + focusRow : function(row){ + this.focusCell(row, 0, false); + }, + + /** + * Focuses the specified cell. + * @param {Number} row The row index + * @param {Number} col The column index + */ + focusCell : function(row, col, hscroll){ + var el = this.ensureVisible(row, col, hscroll); + if(el){ + this.focusEl.alignTo(el, "tl-tl"); + if(Ext.isGecko){ + this.focusEl.focus(); + }else{ + this.focusEl.focus.defer(1, this.focusEl); + } + } + }, + + // private + ensureVisible : function(row, col, hscroll){ + if(typeof row != "number"){ + row = row.rowIndex; + } + if(row < 0 || row >= this.ds.getCount()){ + return; + } + col = (col !== undefined ? col : 0); + + var rowEl = this.getRow(row), cellEl; + if(!(hscroll === false && col === 0)){ + while(this.cm.isHidden(col)){ + col++; + } + cellEl = this.getCell(row, col); + } + if(!rowEl){ + return; + } + + var c = this.scroller.dom; + + var ctop = 0; + var p = rowEl, stop = this.el.dom; + while(p && p != stop){ + ctop += p.offsetTop; + p = p.offsetParent; + } + ctop -= this.mainHd.dom.offsetHeight; + + var cbot = ctop + rowEl.offsetHeight; + + var ch = c.clientHeight; + var stop = parseInt(c.scrollTop, 10); + var sbot = stop + ch; + + if(ctop < stop){ + c.scrollTop = ctop; + }else if(cbot > sbot){ + c.scrollTop = cbot-ch; + } + + if(hscroll !== false){ + var cleft = parseInt(cellEl.offsetLeft, 10); + var cright = cleft + cellEl.offsetWidth; + + var sleft = parseInt(c.scrollLeft, 10); + var sright = sleft + c.clientWidth; + if(cleft < sleft){ + c.scrollLeft = cleft; + }else if(cright > sright){ + c.scrollLeft = cright-c.clientWidth; + } + } + return cellEl || rowEl; + }, + + // private + insertRows : function(dm, firstRow, lastRow, isUpdate){ + if(firstRow === 0 && lastRow == dm.getCount()-1){ + this.refresh(); + }else{ + if(!isUpdate){ + this.fireEvent("beforerowsinserted", this, firstRow, lastRow); + } + var html = this.renderRows(firstRow, lastRow); + var before = this.getRow(firstRow); + if(before){ + Ext.DomHelper.insertHtml('beforeBegin', before, html); + }else{ + Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); + } + if(!isUpdate){ + this.fireEvent("rowsinserted", this, firstRow, lastRow); + this.processRows(firstRow); + } + } + }, + + // private + deleteRows : function(dm, firstRow, lastRow){ + if(dm.getRowCount()<1){ + this.refresh(); + }else{ + this.fireEvent("beforerowsdeleted", this, firstRow, lastRow); + + this.removeRows(firstRow, lastRow); + + this.processRows(firstRow); + this.fireEvent("rowsdeleted", this, firstRow, lastRow); + } + }, + + // private + getColumnStyle : function(col, isHeader){ + var style = !isHeader ? (this.cm.config[col].css || '') : ''; + style += 'width:'+this.getColumnWidth(col)+';'; + if(this.cm.isHidden(col)){ + style += 'display:none;'; + } + var align = this.cm.config[col].align; + if(align){ + style += 'text-align:'+align+';'; + } + return style; + }, + + // private + getColumnWidth : function(col){ + var w = this.cm.getColumnWidth(col); + if(typeof w == 'number'){ + return (Ext.isBorderBox ? w : (w-this.borderWidth > 0 ? w-this.borderWidth:0)) + 'px'; + } + return w; + }, + + // private + getTotalWidth : function(){ + return this.cm.getTotalWidth()+'px'; + }, + + // private + fitColumns : function(preventRefresh, onlyExpand, omitColumn){ + var cm = this.cm, leftOver, dist, i; + var tw = cm.getTotalWidth(false); + var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; + + if(aw < 20){ // not initialized, so don't screw up the default widths + return; + } + var extra = aw - tw; + + if(extra === 0){ + return false; + } + + var vc = cm.getColumnCount(true); + var ac = vc-(typeof omitColumn == 'number' ? 1 : 0); + if(ac === 0){ + ac = 1; + omitColumn = undefined; + } + var colCount = cm.getColumnCount(); + var cols = []; + var extraCol = 0; + var width = 0; + var w; + for (i = 0; i < colCount; i++){ + if(!cm.isHidden(i) && !cm.isFixed(i) && i !== omitColumn){ + w = cm.getColumnWidth(i); + cols.push(i); + extraCol = i; + cols.push(w); + width += w; + } + } + var frac = (aw - cm.getTotalWidth())/width; + while (cols.length){ + w = cols.pop(); + i = cols.pop(); + cm.setColumnWidth(i, Math.max(this.grid.minColumnWidth, Math.floor(w + w*frac)), true); + } + + if((tw = cm.getTotalWidth(false)) > aw){ + var adjustCol = ac != vc ? omitColumn : extraCol; + cm.setColumnWidth(adjustCol, Math.max(1, + cm.getColumnWidth(adjustCol)- (tw-aw)), true); + } + + if(preventRefresh !== true){ + this.updateAllColumnWidths(); + } + + + return true; + }, + + // private + autoExpand : function(preventUpdate){ + var g = this.grid, cm = this.cm; + if(!this.userResized && g.autoExpandColumn){ + var tw = cm.getTotalWidth(false); + var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; + if(tw != aw){ + var ci = cm.getIndexById(g.autoExpandColumn); + var currentWidth = cm.getColumnWidth(ci); + var cw = Math.min(Math.max(((aw-tw)+currentWidth), g.autoExpandMin), g.autoExpandMax); + if(cw != currentWidth){ + cm.setColumnWidth(ci, cw, true); + if(preventUpdate !== true){ + this.updateColumnWidth(ci, cw); + } + } + } + + } + }, + + // private + getColumnData : function(){ + // build a map for all the columns + var cs = [], cm = this.cm, colCount = cm.getColumnCount(); + for(var i = 0; i < colCount; i++){ + var name = cm.getDataIndex(i); + cs[i] = { + name : (typeof name == 'undefined' ? this.ds.fields.get(i).name : name), + renderer : cm.getRenderer(i), + id : cm.getColumnId(i), + style : this.getColumnStyle(i) + }; + } + return cs; + }, + + // private + renderRows : function(startRow, endRow){ + // pull in all the crap needed to render rows + var g = this.grid, cm = g.colModel, ds = g.store, stripe = g.stripeRows; + var colCount = cm.getColumnCount(); + + if(ds.getCount() < 1){ + return ""; + } + + var cs = this.getColumnData(); + + startRow = startRow || 0; + endRow = typeof endRow == "undefined"? ds.getCount()-1 : endRow; + + // records to render + var rs = ds.getRange(startRow, endRow); + + return this.doRender(cs, rs, ds, startRow, colCount, stripe); + }, + + // private + renderBody : function(){ + var markup = this.renderRows(); + return this.templates.body.apply({rows: markup}); + }, + + // private + refreshRow : function(record){ + var ds = this.ds, index; + if(typeof record == 'number'){ + index = record; + record = ds.getAt(index); + }else{ + index = ds.indexOf(record); + } + var cls = []; + this.insertRows(ds, index, index, true); + this.getRow(index).rowIndex = index; + this.onRemove(ds, record, index+1, true); + this.fireEvent("rowupdated", this, index, record); + }, + + /** + * Refreshs the grid UI + * @param {Boolean} headersToo (optional) True to also refresh the headers + */ + refresh : function(headersToo){ + this.fireEvent("beforerefresh", this); + this.grid.stopEditing(); + + var result = this.renderBody(); + this.mainBody.update(result); + + if(headersToo === true){ + this.updateHeaders(); + this.updateHeaderSortState(); + } + this.processRows(0, true); + this.layout(); + this.applyEmptyText(); + this.fireEvent("refresh", this); + }, + + // private + applyEmptyText : function(){ + if(this.emptyText && !this.hasRows()){ + this.mainBody.update('
        ' + this.emptyText + '
        '); + } + }, + + // private + updateHeaderSortState : function(){ + var state = this.ds.getSortState(); + if(!state){ + return; + } + if(!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)){ + this.grid.fireEvent('sortchange', this.grid, state); + } + this.sortState = state; + var sortColumn = this.cm.findColumnIndex(state.field); + if(sortColumn != -1){ + var sortDir = state.direction; + this.updateSortIcon(sortColumn, sortDir); + } + }, + + // private + destroy : function(){ + if(this.colMenu){ + this.colMenu.removeAll(); + Ext.menu.MenuMgr.unregister(this.colMenu); + this.colMenu.getEl().remove(); + delete this.colMenu; + } + if(this.hmenu){ + this.hmenu.removeAll(); + Ext.menu.MenuMgr.unregister(this.hmenu); + this.hmenu.getEl().remove(); + delete this.hmenu; + } + if(this.grid.enableColumnMove){ + var dds = Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; + if(dds){ + for(var dd in dds){ + if(!dds[dd].config.isTarget && dds[dd].dragElId){ + var elid = dds[dd].dragElId; + dds[dd].unreg(); + Ext.get(elid).remove(); + } else if(dds[dd].config.isTarget){ + dds[dd].proxyTop.remove(); + dds[dd].proxyBottom.remove(); + dds[dd].unreg(); + } + if(Ext.dd.DDM.locationCache[dd]){ + delete Ext.dd.DDM.locationCache[dd]; + } + } + delete Ext.dd.DDM.ids['gridHeader' + this.grid.getGridEl().id]; + } + } + + Ext.destroy(this.resizeMarker, this.resizeProxy); + + this.initData(null, null); + Ext.EventManager.removeResizeListener(this.onWindowResize, this); + }, + + // private + onDenyColumnHide : function(){ + + }, + + // private + render : function(){ + + var cm = this.cm; + var colCount = cm.getColumnCount(); + + if(this.grid.monitorWindowResize === true){ + Ext.EventManager.onWindowResize(this.onWindowResize, this, true); + } + + if(this.autoFill){ + this.fitColumns(true, true); + }else if(this.forceFit){ + this.fitColumns(true, false); + }else if(this.grid.autoExpandColumn){ + this.autoExpand(true); + } + + this.renderUI(); + + //this.refresh(); + }, + + // private + onWindowResize : function(){ + if(!this.grid.monitorWindowResize || this.grid.autoHeight){ + return; + } + this.layout(); + }, + + /* --------------------------------- Model Events and Handlers --------------------------------*/ + // private + initData : function(ds, cm){ + if(this.ds){ + this.ds.un("load", this.onLoad, this); + this.ds.un("datachanged", this.onDataChange, this); + this.ds.un("add", this.onAdd, this); + this.ds.un("remove", this.onRemove, this); + this.ds.un("update", this.onUpdate, this); + this.ds.un("clear", this.onClear, this); + } + if(ds){ + ds.on("load", this.onLoad, this); + ds.on("datachanged", this.onDataChange, this); + ds.on("add", this.onAdd, this); + ds.on("remove", this.onRemove, this); + ds.on("update", this.onUpdate, this); + ds.on("clear", this.onClear, this); + } + this.ds = ds; + + if(this.cm){ + this.cm.un("configchange", this.onColConfigChange, this); + this.cm.un("widthchange", this.onColWidthChange, this); + this.cm.un("headerchange", this.onHeaderChange, this); + this.cm.un("hiddenchange", this.onHiddenChange, this); + this.cm.un("columnmoved", this.onColumnMove, this); + this.cm.un("columnlockchange", this.onColumnLock, this); + } + if(cm){ + cm.on("configchange", this.onColConfigChange, this); + cm.on("widthchange", this.onColWidthChange, this); + cm.on("headerchange", this.onHeaderChange, this); + cm.on("hiddenchange", this.onHiddenChange, this); + cm.on("columnmoved", this.onColumnMove, this); + cm.on("columnlockchange", this.onColumnLock, this); + } + this.cm = cm; + }, + + // private + onDataChange : function(){ + this.refresh(); + this.updateHeaderSortState(); + }, + + // private + onClear : function(){ + this.refresh(); + }, + + // private + onUpdate : function(ds, record){ + this.refreshRow(record); + }, + + // private + onAdd : function(ds, records, index){ + this.insertRows(ds, index, index + (records.length-1)); + }, + + // private + onRemove : function(ds, record, index, isUpdate){ + if(isUpdate !== true){ + this.fireEvent("beforerowremoved", this, index, record); + } + this.removeRow(index); + if(isUpdate !== true){ + this.processRows(index); + this.applyEmptyText(); + this.fireEvent("rowremoved", this, index, record); + } + }, + + // private + onLoad : function(){ + this.scrollToTop(); + }, + + // private + onColWidthChange : function(cm, col, width){ + this.updateColumnWidth(col, width); + }, + + // private + onHeaderChange : function(cm, col, text){ + this.updateHeaders(); + }, + + // private + onHiddenChange : function(cm, col, hidden){ + this.updateColumnHidden(col, hidden); + }, + + // private + onColumnMove : function(cm, oldIndex, newIndex){ + this.indexMap = null; + var s = this.getScrollState(); + this.refresh(true); + this.restoreScroll(s); + this.afterMove(newIndex); + }, + + // private + onColConfigChange : function(){ + delete this.lastViewWidth; + this.indexMap = null; + this.refresh(true); + }, + + /* -------------------- UI Events and Handlers ------------------------------ */ + // private + initUI : function(grid){ + grid.on("headerclick", this.onHeaderClick, this); + + if(grid.trackMouseOver){ + grid.on("mouseover", this.onRowOver, this); + grid.on("mouseout", this.onRowOut, this); + } + }, + + // private + initEvents : function(){ + + }, + + // private + onHeaderClick : function(g, index){ + if(this.headersDisabled || !this.cm.isSortable(index)){ + return; + } + g.stopEditing(); + g.store.sort(this.cm.getDataIndex(index)); + }, + + // private + onRowOver : function(e, t){ + var row; + if((row = this.findRowIndex(t)) !== false){ + this.addRowClass(row, "x-grid3-row-over"); + } + }, + + // private + onRowOut : function(e, t){ + var row; + if((row = this.findRowIndex(t)) !== false && row !== this.findRowIndex(e.getRelatedTarget())){ + this.removeRowClass(row, "x-grid3-row-over"); + } + }, + + // private + handleWheel : function(e){ + e.stopPropagation(); + }, + + // private + onRowSelect : function(row){ + this.addRowClass(row, "x-grid3-row-selected"); + }, + + // private + onRowDeselect : function(row){ + this.removeRowClass(row, "x-grid3-row-selected"); + }, + + // private + onCellSelect : function(row, col){ + var cell = this.getCell(row, col); + if(cell){ + this.fly(cell).addClass("x-grid3-cell-selected"); + } + }, + + // private + onCellDeselect : function(row, col){ + var cell = this.getCell(row, col); + if(cell){ + this.fly(cell).removeClass("x-grid3-cell-selected"); + } + }, + + // private + onColumnSplitterMoved : function(i, w){ + this.userResized = true; + var cm = this.grid.colModel; + cm.setColumnWidth(i, w, true); + + if(this.forceFit){ + this.fitColumns(true, false, i); + this.updateAllColumnWidths(); + }else{ + this.updateColumnWidth(i, w); + } + + this.grid.fireEvent("columnresize", i, w); + }, + + // private + handleHdMenuClick : function(item){ + var index = this.hdCtxIndex; + var cm = this.cm, ds = this.ds; + switch(item.id){ + case "asc": + ds.sort(cm.getDataIndex(index), "ASC"); + break; + case "desc": + ds.sort(cm.getDataIndex(index), "DESC"); + break; + default: + index = cm.getIndexById(item.id.substr(4)); + if(index != -1){ + if(item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1){ + this.onDenyColumnHide(); + return false; + } + cm.setHidden(index, item.checked); + } + } + return true; + }, + + // private + isHideableColumn : function(c){ + return !c.hidden && !c.fixed; + }, + + // private + beforeColMenuShow : function(){ + var cm = this.cm, colCount = cm.getColumnCount(); + this.colMenu.removeAll(); + for(var i = 0; i < colCount; i++){ + if(cm.config[i].fixed !== true && cm.config[i].hideable !== false){ + this.colMenu.add(new Ext.menu.CheckItem({ + id: "col-"+cm.getColumnId(i), + text: cm.getColumnHeader(i), + checked: !cm.isHidden(i), + hideOnClick:false, + disabled: cm.config[i].hideable === false + })); + } + } + }, + + // private + handleHdDown : function(e, t){ + if(Ext.fly(t).hasClass('x-grid3-hd-btn')){ + e.stopEvent(); + var hd = this.findHeaderCell(t); + Ext.fly(hd).addClass('x-grid3-hd-menu-open'); + var index = this.getCellIndex(hd); + this.hdCtxIndex = index; + var ms = this.hmenu.items, cm = this.cm; + ms.get("asc").setDisabled(!cm.isSortable(index)); + ms.get("desc").setDisabled(!cm.isSortable(index)); + this.hmenu.on("hide", function(){ + Ext.fly(hd).removeClass('x-grid3-hd-menu-open'); + }, this, {single:true}); + this.hmenu.show(t, "tl-bl?"); + } + }, + + // private + handleHdOver : function(e, t){ + var hd = this.findHeaderCell(t); + if(hd && !this.headersDisabled){ + this.activeHd = hd; + this.activeHdIndex = this.getCellIndex(hd); + var fly = this.fly(hd); + this.activeHdRegion = fly.getRegion(); + if(this.cm.isSortable(this.activeHdIndex) && !this.cm.isFixed(this.activeHdIndex)){ + fly.addClass("x-grid3-hd-over"); + this.activeHdBtn = fly.child('.x-grid3-hd-btn'); + if(this.activeHdBtn){ + this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px'; + } + } + } + }, + + // private + handleHdMove : function(e, t){ + if(this.activeHd && !this.headersDisabled){ + var hw = this.splitHandleWidth || 5; + var r = this.activeHdRegion; + var x = e.getPageX(); + var ss = this.activeHd.style; + if(x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){ + if(Ext.isSafari){ + ss.cursor = 'e-resize';// col-resize not always supported + }else{ + ss.cursor = 'col-resize'; + } + }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){ + if(Ext.isSafari){ + ss.cursor = 'w-resize'; // col-resize not always supported + }else{ + ss.cursor = 'col-resize'; + } + }else{ + ss.cursor = ''; + } + } + }, + + // private + handleHdOut : function(e, t){ + var hd = this.findHeaderCell(t); + if(hd && (!Ext.isIE || !e.within(hd, true))){ + this.activeHd = null; + this.fly(hd).removeClass("x-grid3-hd-over"); + hd.style.cursor = ''; + } + }, + + // private + hasRows : function(){ + var fc = this.mainBody.dom.firstChild; + return fc && fc.className != 'x-grid-empty'; + }, + + // back compat + bind : function(d, c){ + this.initData(d, c); + } +}); + + +// private +// This is a support class used internally by the Grid components +Ext.grid.GridView.SplitDragZone = function(grid, hd){ + this.grid = grid; + this.view = grid.getView(); + this.marker = this.view.resizeMarker; + this.proxy = this.view.resizeProxy; + Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd, + "gridSplitters" + this.grid.getGridEl().id, { + dragElId : Ext.id(this.proxy.dom), resizeFrame:false + }); + this.scroll = false; + this.hw = this.view.splitHandleWidth || 5; +}; +Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { + + b4StartDrag : function(x, y){ + this.view.headersDisabled = true; + var h = this.view.mainWrap.getHeight(); + this.marker.setHeight(h); + this.marker.show(); + this.marker.alignTo(this.view.getHeaderCell(this.cellIndex), 'tl-tl', [-2, 0]); + this.proxy.setHeight(h); + var w = this.cm.getColumnWidth(this.cellIndex); + var minw = Math.max(w-this.grid.minColumnWidth, 0); + this.resetConstraints(); + this.setXConstraint(minw, 1000); + this.setYConstraint(0, 0); + this.minX = x - minw; + this.maxX = x + 1000; + this.startPos = x; + Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); + }, + + + handleMouseDown : function(e){ + var t = this.view.findHeaderCell(e.getTarget()); + if(t){ + var xy = this.view.fly(t).getXY(), x = xy[0], y = xy[1]; + var exy = e.getXY(), ex = exy[0], ey = exy[1]; + var w = t.offsetWidth, adjust = false; + if((ex - x) <= this.hw){ + adjust = -1; + }else if((x+w) - ex <= this.hw){ + adjust = 0; + } + if(adjust !== false){ + this.cm = this.grid.colModel; + var ci = this.view.getCellIndex(t); + if(adjust == -1){ + while(this.cm.isHidden(ci+adjust)){ + --adjust; + if(ci+adjust < 0){ + return; + } + } + } + this.cellIndex = ci+adjust; + this.split = t.dom; + if(this.cm.isResizable(this.cellIndex) && !this.cm.isFixed(this.cellIndex)){ + Ext.grid.GridView.SplitDragZone.superclass.handleMouseDown.apply(this, arguments); + } + }else if(this.view.columnDrag){ + this.view.columnDrag.callHandleMouseDown(e); + } + } + }, + + endDrag : function(e){ + this.marker.hide(); + var v = this.view; + var endX = Math.max(this.minX, e.getPageX()); + var diff = endX - this.startPos; + v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); + setTimeout(function(){ + v.headersDisabled = false; + }, 50); + }, + + autoOffset : function(){ + this.setDelta(0,0); + } +}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GroupingView.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GroupingView.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/GroupingView.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,452 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.GroupingView + * @extends Ext.grid.GridView + * Adds the ability for single level grouping to the grid. + *
        var grid = new Ext.grid.GridPanel({
        +    // A groupingStore is required for a GroupingView
        +    store: new Ext.data.GroupingStore({
        +        reader: reader,
        +        data: xg.dummyData,
        +        sortInfo:{field: 'company', direction: "ASC"},
        +        groupField:'industry'
        +    }),
        +
        +    columns: [
        +        {id:'company',header: "Company", width: 60, sortable: true, dataIndex: 'company'},
        +        {header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
        +        {header: "Change", width: 20, sortable: true, dataIndex: 'change', renderer: Ext.util.Format.usMoney},
        +        {header: "Industry", width: 20, sortable: true, dataIndex: 'industry'},
        +        {header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
        +    ],
        +
        +    view: new Ext.grid.GroupingView({
        +        forceFit:true,
        +        // custom grouping text template to display the number of items per group
        +        groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
        +    }),
        +
        +    frame:true,
        +    width: 700,
        +    height: 450,
        +    collapsible: true,
        +    animCollapse: false,
        +    title: 'Grouping Example',
        +    iconCls: 'icon-grid',
        +    renderTo: document.body
        +});
        + * @constructor + * @param {Object} config + */ +Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, { + /** + * @cfg {Boolean} hideGroupedColumn True to hide the column that is currently grouped + */ + hideGroupedColumn:false, + /** + * @cfg {Boolean} showGroupName True to display the name for each set of grouped rows (defaults to false) + */ + showGroupName:true, + /** + * @cfg {Boolean} startCollapsed True to start all groups collapsed + */ + startCollapsed:false, + /** + * @cfg {Boolean} enableGrouping False to disable grouping functionality (defaults to true) + */ + enableGrouping:true, + /** + * @cfg {Boolean} enableGroupingMenu True to enable the grouping control in the column menu + */ + enableGroupingMenu:true, + /** + * @cfg {Boolean} enableNoGroups True to allow the user to turn off grouping + */ + enableNoGroups:true, + /** + * @cfg {String} emptyGroupText The text to display when there is an empty group value + */ + emptyGroupText : '(None)', + /** + * @cfg {Boolean} ignoreAdd True to skip refreshing the view when new rows are added (defaults to false) + */ + ignoreAdd: false, + /** + * @cfg {String} groupTextTpl The template used to render the group text + */ + groupTextTpl : '{text}', + + // private + gidSeed : 1000, + + // private + initTemplates : function(){ + Ext.grid.GroupingView.superclass.initTemplates.call(this); + this.state = {}; + + var sm = this.grid.getSelectionModel(); + sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect', + this.onBeforeRowSelect, this); + + if(!this.startGroup){ + this.startGroup = new Ext.XTemplate( + '
        ', + '
        ', this.groupTextTpl ,'
        ', + '
        ' + ); + } + this.startGroup.compile(); + this.endGroup = '
        '; + }, + + // private + findGroup : function(el){ + return Ext.fly(el).up('.x-grid-group', this.mainBody.dom); + }, + + // private + getGroups : function(){ + return this.hasRows() ? this.mainBody.dom.childNodes : []; + }, + + // private + onAdd : function(){ + if(this.enableGrouping && !this.ignoreAdd){ + var ss = this.getScrollState(); + this.refresh(); + this.restoreScroll(ss); + }else if(!this.enableGrouping){ + Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments); + } + }, + + // private + onRemove : function(ds, record, index, isUpdate){ + Ext.grid.GroupingView.superclass.onRemove.apply(this, arguments); + var g = document.getElementById(record._groupId); + if(g && g.childNodes[1].childNodes.length < 1){ + Ext.removeNode(g); + } + this.applyEmptyText(); + }, + + // private + refreshRow : function(record){ + if(this.ds.getCount()==1){ + this.refresh(); + }else{ + this.isUpdating = true; + Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments); + this.isUpdating = false; + } + }, + + // private + beforeMenuShow : function(){ + var field = this.getGroupField(); + var g = this.hmenu.items.get('groupBy'); + if(g){ + g.setDisabled(this.cm.config[this.hdCtxIndex].groupable === false); + } + var s = this.hmenu.items.get('showGroups'); + if(s){ + s.setChecked(!!field); + } + }, + + // private + renderUI : function(){ + Ext.grid.GroupingView.superclass.renderUI.call(this); + this.mainBody.on('mousedown', this.interceptMouse, this); + + if(this.enableGroupingMenu && this.hmenu){ + this.hmenu.add('-',{ + id:'groupBy', + text: this.groupByText, + handler: this.onGroupByClick, + scope: this, + iconCls:'x-group-by-icon' + }); + if(this.enableNoGroups){ + this.hmenu.add({ + id:'showGroups', + text: this.showGroupsText, + checked: true, + checkHandler: this.onShowGroupsClick, + scope: this + }); + } + this.hmenu.on('beforeshow', this.beforeMenuShow, this); + } + }, + + // private + onGroupByClick : function(){ + this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); + }, + + // private + onShowGroupsClick : function(mi, checked){ + if(checked){ + this.onGroupByClick(); + }else{ + this.grid.store.clearGrouping(); + } + }, + + /** + * Toggles the specified group if no value is passed, otherwise sets the expanded state of the group to the value passed. + * @param {String} groupId The groupId assigned to the group (see getGroupId) + * @param {Boolean} expanded (optional) + */ + toggleGroup : function(group, expanded){ + this.grid.stopEditing(); + group = Ext.getDom(group); + var gel = Ext.fly(group); + expanded = expanded !== undefined ? + expanded : gel.hasClass('x-grid-group-collapsed'); + + this.state[gel.dom.id] = expanded; + gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed'); + }, + + /** + * Toggles all groups if no value is passed, otherwise sets the expanded state of all groups to the value passed. + * @param {Boolean} expanded (optional) + */ + toggleAllGroups : function(expanded){ + var groups = this.getGroups(); + for(var i = 0, len = groups.length; i < len; i++){ + this.toggleGroup(groups[i], expanded); + } + }, + + /** + * Expands all grouped rows. + */ + expandAllGroups : function(){ + this.toggleAllGroups(true); + }, + + /** + * Collapses all grouped rows. + */ + collapseAllGroups : function(){ + this.toggleAllGroups(false); + }, + + // private + interceptMouse : function(e){ + var hd = e.getTarget('.x-grid-group-hd', this.mainBody); + if(hd){ + e.stopEvent(); + this.toggleGroup(hd.parentNode); + } + }, + + // private + getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){ + var g = groupRenderer ? groupRenderer(v, {}, r, rowIndex, colIndex, ds) : String(v); + if(g === ''){ + g = this.cm.config[colIndex].emptyGroupText || this.emptyGroupText; + } + return g; + }, + + // private + getGroupField : function(){ + return this.grid.store.getGroupState(); + }, + + // private + renderRows : function(){ + var groupField = this.getGroupField(); + var eg = !!groupField; + // if they turned off grouping and the last grouped field is hidden + if(this.hideGroupedColumn) { + var colIndex = this.cm.findColumnIndex(groupField); + if(!eg && this.lastGroupField !== undefined) { + this.mainBody.update(''); + this.cm.setHidden(this.cm.findColumnIndex(this.lastGroupField), false); + delete this.lastGroupField; + }else if (eg && this.lastGroupField === undefined) { + this.lastGroupField = groupField; + this.cm.setHidden(colIndex, true); + }else if (eg && this.lastGroupField !== undefined && groupField !== this.lastGroupField) { + this.mainBody.update(''); + var oldIndex = this.cm.findColumnIndex(this.lastGroupField); + this.cm.setHidden(oldIndex, false); + this.lastGroupField = groupField; + this.cm.setHidden(colIndex, true); + } + } + return Ext.grid.GroupingView.superclass.renderRows.apply( + this, arguments); + }, + + // private + doRender : function(cs, rs, ds, startRow, colCount, stripe){ + if(rs.length < 1){ + return ''; + } + var groupField = this.getGroupField(); + var colIndex = this.cm.findColumnIndex(groupField); + + this.enableGrouping = !!groupField; + + if(!this.enableGrouping || this.isUpdating){ + return Ext.grid.GroupingView.superclass.doRender.apply( + this, arguments); + } + var gstyle = 'width:'+this.getTotalWidth()+';'; + + var gidPrefix = this.grid.getGridEl().id; + var cfg = this.cm.config[colIndex]; + var groupRenderer = cfg.groupRenderer || cfg.renderer; + var cls = this.startCollapsed ? 'x-grid-group-collapsed' : ''; + var prefix = this.showGroupName ? + (cfg.groupName || cfg.header)+': ' : ''; + + var groups = [], curGroup, i, len, gid; + for(i = 0, len = rs.length; i < len; i++){ + var rowIndex = startRow + i; + var r = rs[i], + gvalue = r.data[groupField], + g = this.getGroup(gvalue, r, groupRenderer, rowIndex, colIndex, ds); + if(!curGroup || curGroup.group != g){ + gid = gidPrefix + '-gp-' + groupField + '-' + g; + var gcls = cls ? cls : (this.state[gid] === false ? 'x-grid-group-collapsed' : ''); + curGroup = { + group: g, + gvalue: gvalue, + text: prefix + g, + groupId: gid, + startRow: rowIndex, + rs: [r], + cls: gcls, + style: gstyle + }; + groups.push(curGroup); + }else{ + curGroup.rs.push(r); + } + r._groupId = gid; + } + + var buf = []; + for(i = 0, len = groups.length; i < len; i++){ + var g = groups[i]; + this.doGroupStart(buf, g, cs, ds, colCount); + buf[buf.length] = Ext.grid.GroupingView.superclass.doRender.call( + this, cs, g.rs, ds, g.startRow, colCount, stripe); + + this.doGroupEnd(buf, g, cs, ds, colCount); + } + return buf.join(''); + }, + + /** + * Dynamically tries to determine the groupId of a specific value + * @param {String} value + * @return {String} The group id + */ + getGroupId : function(value){ + var gidPrefix = this.grid.getGridEl().id; + var groupField = this.getGroupField(); + var colIndex = this.cm.findColumnIndex(groupField); + var cfg = this.cm.config[colIndex]; + var groupRenderer = cfg.groupRenderer || cfg.renderer; + var gtext = this.getGroup(value, {data:{}}, groupRenderer, 0, colIndex, this.ds); + return gidPrefix + '-gp-' + groupField + '-' + value; + }, + + // private + doGroupStart : function(buf, g, cs, ds, colCount){ + buf[buf.length] = this.startGroup.apply(g); + }, + + // private + doGroupEnd : function(buf, g, cs, ds, colCount){ + buf[buf.length] = this.endGroup; + }, + + // private + getRows : function(){ + if(!this.enableGrouping){ + return Ext.grid.GroupingView.superclass.getRows.call(this); + } + var r = []; + var g, gs = this.getGroups(); + for(var i = 0, len = gs.length; i < len; i++){ + g = gs[i].childNodes[1].childNodes; + for(var j = 0, jlen = g.length; j < jlen; j++){ + r[r.length] = g[j]; + } + } + return r; + }, + + // private + updateGroupWidths : function(){ + if(!this.enableGrouping || !this.hasRows()){ + return; + } + var tw = Math.max(this.cm.getTotalWidth(), this.el.dom.offsetWidth-this.scrollOffset) +'px'; + var gs = this.getGroups(); + for(var i = 0, len = gs.length; i < len; i++){ + gs[i].firstChild.style.width = tw; + } + }, + + // private + onColumnWidthUpdated : function(col, w, tw){ + this.updateGroupWidths(); + }, + + // private + onAllColumnWidthsUpdated : function(ws, tw){ + this.updateGroupWidths(); + }, + + // private + onColumnHiddenUpdated : function(col, hidden, tw){ + this.updateGroupWidths(); + }, + + // private + onLayout : function(){ + this.updateGroupWidths(); + }, + + // private + onBeforeRowSelect : function(sm, rowIndex){ + if(!this.enableGrouping){ + return; + } + var row = this.getRow(rowIndex); + if(row && !row.offsetParent){ + var g = this.findGroup(row); + this.toggleGroup(g, true); + } + }, + + /** + * @cfg {String} groupByText Text displayed in the grid header menu for grouping by a column + * (defaults to 'Group By This Field'). + */ + groupByText: 'Group By This Field', + /** + * @cfg {String} showGroupsText Text displayed in the grid header for enabling/disabling grouping + * (defaults to 'Show in Groups'). + */ + showGroupsText: 'Show in Groups' +}); +// private +Ext.grid.GroupingView.GROUP_ID = 1000; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/PropertyGrid.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/PropertyGrid.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/PropertyGrid.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,364 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.PropertyRecord + * A specific {@link Ext.data.Record} type that represents a name/value pair and is made to work with the + * {@link Ext.grid.PropertyGrid}. Typically, PropertyRecords do not need to be created directly as they can be + * created implicitly by simply using the appropriate data configs either via the {@link Ext.grid.PropertyGrid#source} + * config property or by calling {@link Ext.grid.PropertyGrid#setSource}. However, if the need arises, these records + * can also be created explicitly as shwon below. Example usage: + *
        
        +var rec = new Ext.grid.PropertyRecord({
        +    name: 'Birthday',
        +    value: new Date(Date.parse('05/26/1972'))
        +});
        +// Add record to an already populated grid
        +grid.store.addSorted(rec);
        +
        + * @constructor + * @param {Object} config A data object in the format: {name: [name], value: [value]}. The specified value's type + * will be read automatically by the grid to determine the type of editor to use when displaying it. + */ +Ext.grid.PropertyRecord = Ext.data.Record.create([ + {name:'name',type:'string'}, 'value' +]); + +/** + * @class Ext.grid.PropertyStore + * @extends Ext.util.Observable + * A custom wrapper for the {@link Ext.grid.PropertyGrid}'s {@link Ext.data.Store}. This class handles the mapping + * between the custom data source objects supported by the grid and the {@link Ext.grid.PropertyRecord} format + * required for compatibility with the underlying store. Generally this class should not need to be used directly -- + * the grid's data should be accessed from the underlying store via the {@link #store} property. + * @constructor + * @param {Ext.grid.Grid} grid The grid this store will be bound to + * @param {Object} source The source data config object + */ +Ext.grid.PropertyStore = function(grid, source){ + this.grid = grid; + this.store = new Ext.data.Store({ + recordType : Ext.grid.PropertyRecord + }); + this.store.on('update', this.onUpdate, this); + if(source){ + this.setSource(source); + } + Ext.grid.PropertyStore.superclass.constructor.call(this); +}; +Ext.extend(Ext.grid.PropertyStore, Ext.util.Observable, { + // protected - should only be called by the grid. Use grid.setSource instead. + setSource : function(o){ + this.source = o; + this.store.removeAll(); + var data = []; + for(var k in o){ + if(this.isEditableValue(o[k])){ + data.push(new Ext.grid.PropertyRecord({name: k, value: o[k]}, k)); + } + } + this.store.loadRecords({records: data}, {}, true); + }, + + // private + onUpdate : function(ds, record, type){ + if(type == Ext.data.Record.EDIT){ + var v = record.data['value']; + var oldValue = record.modified['value']; + if(this.grid.fireEvent('beforepropertychange', this.source, record.id, v, oldValue) !== false){ + this.source[record.id] = v; + record.commit(); + this.grid.fireEvent('propertychange', this.source, record.id, v, oldValue); + }else{ + record.reject(); + } + } + }, + + // private + getProperty : function(row){ + return this.store.getAt(row); + }, + + // private + isEditableValue: function(val){ + if(val && val instanceof Date){ + return true; + }else if(typeof val == 'object' || typeof val == 'function'){ + return false; + } + return true; + }, + + // private + setValue : function(prop, value){ + this.source[prop] = value; + this.store.getById(prop).set('value', value); + }, + + // protected - should only be called by the grid. Use grid.getSource instead. + getSource : function(){ + return this.source; + } +}); + +/** + * @class Ext.grid.PropertyColumnModel + * @extends Ext.grid.ColumnModel + * A custom column model for the {@link Ext.grid.PropertyGrid}. Generally it should not need to be used directly. + * @constructor + * @param {Ext.grid.Grid} grid The grid this store will be bound to + * @param {Object} source The source data config object + */ +Ext.grid.PropertyColumnModel = function(grid, store){ + this.grid = grid; + var g = Ext.grid; + g.PropertyColumnModel.superclass.constructor.call(this, [ + {header: this.nameText, width:50, sortable: true, dataIndex:'name', id: 'name'}, + {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value'} + ]); + this.store = store; + this.bselect = Ext.DomHelper.append(document.body, { + tag: 'select', cls: 'x-grid-editor x-hide-display', children: [ + {tag: 'option', value: 'true', html: 'true'}, + {tag: 'option', value: 'false', html: 'false'} + ] + }); + var f = Ext.form; + + var bfield = new f.Field({ + el:this.bselect, + bselect : this.bselect, + autoShow: true, + getValue : function(){ + return this.bselect.value == 'true'; + } + }); + this.editors = { + 'date' : new g.GridEditor(new f.DateField({selectOnFocus:true})), + 'string' : new g.GridEditor(new f.TextField({selectOnFocus:true})), + 'number' : new g.GridEditor(new f.NumberField({selectOnFocus:true, style:'text-align:left;'})), + 'boolean' : new g.GridEditor(bfield) + }; + this.renderCellDelegate = this.renderCell.createDelegate(this); + this.renderPropDelegate = this.renderProp.createDelegate(this); +}; + +Ext.extend(Ext.grid.PropertyColumnModel, Ext.grid.ColumnModel, { + // private - strings used for locale support + nameText : 'Name', + valueText : 'Value', + dateFormat : 'm/j/Y', + + // private + renderDate : function(dateVal){ + return dateVal.dateFormat(this.dateFormat); + }, + + // private + renderBool : function(bVal){ + return bVal ? 'true' : 'false'; + }, + + // private + isCellEditable : function(colIndex, rowIndex){ + return colIndex == 1; + }, + + // private + getRenderer : function(col){ + return col == 1 ? + this.renderCellDelegate : this.renderPropDelegate; + }, + + // private + renderProp : function(v){ + return this.getPropertyName(v); + }, + + // private + renderCell : function(val){ + var rv = val; + if(val instanceof Date){ + rv = this.renderDate(val); + }else if(typeof val == 'boolean'){ + rv = this.renderBool(val); + } + return Ext.util.Format.htmlEncode(rv); + }, + + // private + getPropertyName : function(name){ + var pn = this.grid.propertyNames; + return pn && pn[name] ? pn[name] : name; + }, + + // private + getCellEditor : function(colIndex, rowIndex){ + var p = this.store.getProperty(rowIndex); + var n = p.data['name'], val = p.data['value']; + if(this.grid.customEditors[n]){ + return this.grid.customEditors[n]; + } + if(val instanceof Date){ + return this.editors['date']; + }else if(typeof val == 'number'){ + return this.editors['number']; + }else if(typeof val == 'boolean'){ + return this.editors['boolean']; + }else{ + return this.editors['string']; + } + } +}); + +/** + * @class Ext.grid.PropertyGrid + * @extends Ext.grid.EditorGridPanel + * A specialized grid implementation intended to mimic the traditional property grid as typically seen in + * development IDEs. Each row in the grid represents a property of some object, and the data is stored + * as a set of name/value pairs in {@link Ext.grid.PropertyRecord}s. Example usage: + *
        
        +var grid = new Ext.grid.PropertyGrid({
        +    title: 'Properties Grid',
        +    autoHeight: true,
        +    width: 300,
        +    renderTo: 'grid-ct',
        +    source: {
        +        "(name)": "My Object",
        +        "Created": new Date(Date.parse('10/15/2006')),
        +        "Available": false,
        +        "Version": .01,
        +        "Description": "A test object"
        +    }
        +});
        +
        + * @constructor + * @param {Object} config The grid config object + */ +Ext.grid.PropertyGrid = Ext.extend(Ext.grid.EditorGridPanel, { + /** + * @cfg {Object} source A data object to use as the data source of the grid (see {@link #setSource} for details). + */ + /** + * @cfg {Object} customEditors An object containing name/value pairs of custom editor type definitions that allow + * the grid to support additional types of editable fields. By default, the grid supports strongly-typed editing + * of strings, dates, numbers and booleans using built-in form editors, but any custom type can be supported and + * associated with a custom input control by specifying a custom editor. The name of the editor + * type should correspond with the name of the property that will use the editor. Example usage: + *
        
        +var grid = new Ext.grid.PropertyGrid({
        +    ...
        +    customEditors: {
        +        'Start Time': new Ext.grid.GridEditor(new Ext.form.TimeField({selectOnFocus:true}))
        +    },
        +    source: {
        +        'Start Time': '10:00 AM'
        +    }
        +});
        +
        + */ + + // private config overrides + enableColLock:false, + enableColumnMove:false, + stripeRows:false, + trackMouseOver: false, + clicksToEdit:1, + enableHdMenu : false, + viewConfig : { + forceFit:true + }, + + // private + initComponent : function(){ + this.customEditors = this.customEditors || {}; + this.lastEditRow = null; + var store = new Ext.grid.PropertyStore(this); + this.propStore = store; + var cm = new Ext.grid.PropertyColumnModel(this, store); + store.store.sort('name', 'ASC'); + this.addEvents( + /** + * @event beforepropertychange + * Fires before a property value changes. Handlers can return false to cancel the property change + * (this will internally call {@link Ext.data.Record#reject} on the property's record). + * @param {Object} source The source data object for the grid (corresponds to the same object passed in + * as the {@link #source} config property). + * @param {String} recordId The record's id in the data store + * @param {Mixed} value The current edited property value + * @param {Mixed} oldValue The original property value prior to editing + */ + 'beforepropertychange', + /** + * @event propertychange + * Fires after a property value has changed. + * @param {Object} source The source data object for the grid (corresponds to the same object passed in + * as the {@link #source} config property). + * @param {String} recordId The record's id in the data store + * @param {Mixed} value The current edited property value + * @param {Mixed} oldValue The original property value prior to editing + */ + 'propertychange' + ); + this.cm = cm; + this.ds = store.store; + Ext.grid.PropertyGrid.superclass.initComponent.call(this); + + this.selModel.on('beforecellselect', function(sm, rowIndex, colIndex){ + if(colIndex === 0){ + this.startEditing.defer(200, this, [rowIndex, 1]); + return false; + } + }, this); + }, + + // private + onRender : function(){ + Ext.grid.PropertyGrid.superclass.onRender.apply(this, arguments); + + this.getGridEl().addClass('x-props-grid'); + }, + + // private + afterRender: function(){ + Ext.grid.PropertyGrid.superclass.afterRender.apply(this, arguments); + if(this.source){ + this.setSource(this.source); + } + }, + + /** + * Sets the source data object containing the property data. The data object can contain one or more name/value + * pairs representing all of the properties of an object to display in the grid, and this data will automatically + * be loaded into the grid's {@link #store}. If the grid already contains data, this method will replace any + * existing data. See also the {@link #source} config value. Example usage: + *
        
        +grid.setSource({
        +    "(name)": "My Object",
        +    "Created": new Date(Date.parse('10/15/2006')),
        +    "Available": false,
        +    "Version": .01,
        +    "Description": "A test object"
        +});
        +
        + * @param {Object} source The data object + */ + setSource : function(source){ + this.propStore.setSource(source); + }, + + /** + * Gets the source data object containing the property data. See {@link #setSource} for details regarding the + * format of the data object. + * @return {Object} The data object + */ + getSource : function(){ + return this.propStore.getSource(); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/RowNumberer.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/RowNumberer.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/RowNumberer.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,61 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.grid.RowNumberer + * This is a utility class that can be passed into a {@link Ext.grid.ColumnModel} as a column config that provides + * an automatic row numbering column. + *
        Usage:
        +
        
        + // This is a typical column config with the first column providing row numbers
        + var colModel = new Ext.grid.ColumnModel([
        +    new Ext.grid.RowNumberer(),
        +    {header: "Name", width: 80, sortable: true},
        +    {header: "Code", width: 50, sortable: true},
        +    {header: "Description", width: 200, sortable: true}
        + ]);
        + 
        + * @constructor + * @param {Object} config The configuration options +*/ +Ext.grid.RowNumberer = function(config){ + Ext.apply(this, config); + if(this.rowspan){ + this.renderer = this.renderer.createDelegate(this); + } +}; + +Ext.grid.RowNumberer.prototype = { + /** + * @cfg {String} header Any valid text or HTML fragment to display in the header cell for the row + * number column (defaults to ''). + */ + header: "", + /** + * @cfg {Number} width The default width in pixels of the row number column (defaults to 23). + */ + width: 23, + /** + * @cfg {Boolean} sortable True if the row number column is sortable (defaults to false). + */ + sortable: false, + + // private + fixed:true, + dataIndex: '', + id: 'numberer', + rowspan: undefined, + + // private + renderer : function(v, p, record, rowIndex){ + if(this.rowspan){ + p.cellAttr = 'rowspan="'+this.rowspan+'"'; + } + return rowIndex+1; + } +}; \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/RowSelectionModel.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/RowSelectionModel.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/grid/RowSelectionModel.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,474 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + @class Ext.grid.RowSelectionModel + * @extends Ext.grid.AbstractSelectionModel + * The default SelectionModel used by {@link Ext.grid.Grid}. + * It supports multiple selections and keyboard selection/navigation. The objects stored + * as selections and returned by {@link #getSelected}, and {@link #getSelections} are + * the {@link Ext.data.Record Record}s which provide the data for the selected rows. + * @constructor + * @param {Object} config + */ +Ext.grid.RowSelectionModel = function(config){ + Ext.apply(this, config); + this.selections = new Ext.util.MixedCollection(false, function(o){ + return o.id; + }); + + this.last = false; + this.lastActive = false; + + this.addEvents( + /** + * @event selectionchange + * Fires when the selection changes + * @param {SelectionModel} this + */ + "selectionchange", + /** + * @event beforerowselect + * Fires when a row is being selected, return false to cancel. + * @param {SelectionModel} this + * @param {Number} rowIndex The index to be selected + * @param {Boolean} keepExisting False if other selections will be cleared + * @param {Record} record The record to be selected + */ + "beforerowselect", + /** + * @event rowselect + * Fires when a row is selected. + * @param {SelectionModel} this + * @param {Number} rowIndex The selected index + * @param {Ext.data.Record} r The selected record + */ + "rowselect", + /** + * @event rowdeselect + * Fires when a row is deselected. + * @param {SelectionModel} this + * @param {Number} rowIndex + * @param {Record} record + */ + "rowdeselect" + ); + + Ext.grid.RowSelectionModel.superclass.constructor.call(this); +}; + +Ext.extend(Ext.grid.RowSelectionModel, Ext.grid.AbstractSelectionModel, { + /** + * @cfg {Boolean} singleSelect + * True to allow selection of only one row at a time (defaults to false) + */ + singleSelect : false, + + // private + initEvents : function(){ + + if(!this.grid.enableDragDrop && !this.grid.enableDrag){ + this.grid.on("rowmousedown", this.handleMouseDown, this); + }else{ // allow click to work like normal + this.grid.on("rowclick", function(grid, rowIndex, e) { + if(e.button === 0 && !e.shiftKey && !e.ctrlKey) { + this.selectRow(rowIndex, false); + grid.view.focusRow(rowIndex); + } + }, this); + } + + this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), { + "up" : function(e){ + if(!e.shiftKey){ + this.selectPrevious(e.shiftKey); + }else if(this.last !== false && this.lastActive !== false){ + var last = this.last; + this.selectRange(this.last, this.lastActive-1); + this.grid.getView().focusRow(this.lastActive); + if(last !== false){ + this.last = last; + } + }else{ + this.selectFirstRow(); + } + }, + "down" : function(e){ + if(!e.shiftKey){ + this.selectNext(e.shiftKey); + }else if(this.last !== false && this.lastActive !== false){ + var last = this.last; + this.selectRange(this.last, this.lastActive+1); + this.grid.getView().focusRow(this.lastActive); + if(last !== false){ + this.last = last; + } + }else{ + this.selectFirstRow(); + } + }, + scope: this + }); + + var view = this.grid.view; + view.on("refresh", this.onRefresh, this); + view.on("rowupdated", this.onRowUpdated, this); + view.on("rowremoved", this.onRemove, this); + }, + + // private + onRefresh : function(){ + var ds = this.grid.store, index; + var s = this.getSelections(); + this.clearSelections(true); + for(var i = 0, len = s.length; i < len; i++){ + var r = s[i]; + if((index = ds.indexOfId(r.id)) != -1){ + this.selectRow(index, true); + } + } + if(s.length != this.selections.getCount()){ + this.fireEvent("selectionchange", this); + } + }, + + // private + onRemove : function(v, index, r){ + if(this.selections.remove(r) !== false){ + this.fireEvent('selectionchange', this); + } + }, + + // private + onRowUpdated : function(v, index, r){ + if(this.isSelected(r)){ + v.onRowSelect(index); + } + }, + + /** + * Select records. + * @param {Array} records The records to select + * @param {Boolean} keepExisting (optional) True to keep existing selections + */ + selectRecords : function(records, keepExisting){ + if(!keepExisting){ + this.clearSelections(); + } + var ds = this.grid.store; + for(var i = 0, len = records.length; i < len; i++){ + this.selectRow(ds.indexOf(records[i]), true); + } + }, + + /** + * Gets the number of selected rows. + * @return {Number} + */ + getCount : function(){ + return this.selections.length; + }, + + /** + * Selects the first row in the grid. + */ + selectFirstRow : function(){ + this.selectRow(0); + }, + + /** + * Select the last row. + * @param {Boolean} keepExisting (optional) True to keep existing selections + */ + selectLastRow : function(keepExisting){ + this.selectRow(this.grid.store.getCount() - 1, keepExisting); + }, + + /** + * Selects the row immediately following the last selected row. + * @param {Boolean} keepExisting (optional) True to keep existing selections + */ + selectNext : function(keepExisting){ + if(this.hasNext()){ + this.selectRow(this.last+1, keepExisting); + this.grid.getView().focusRow(this.last); + } + }, + + /** + * Selects the row that precedes the last selected row. + * @param {Boolean} keepExisting (optional) True to keep existing selections + */ + selectPrevious : function(keepExisting){ + if(this.hasPrevious()){ + this.selectRow(this.last-1, keepExisting); + this.grid.getView().focusRow(this.last); + } + }, + + /** + * Returns true if there is a next record to select + * @return {Boolean} + */ + hasNext : function(){ + return this.last !== false && (this.last+1) < this.grid.store.getCount(); + }, + + /** + * Returns true if there is a previous record to select + * @return {Boolean} + */ + hasPrevious : function(){ + return !!this.last; + }, + + + /** + * Returns the selected records + * @return {Array} Array of selected records + */ + getSelections : function(){ + return [].concat(this.selections.items); + }, + + /** + * Returns the first selected record. + * @return {Record} + */ + getSelected : function(){ + return this.selections.itemAt(0); + }, + + /** + * Calls the passed function with each selection. If the function returns false, iteration is + * stopped and this function returns false. Otherwise it returns true. + * @param {Function} fn + * @param {Object} scope (optional) + * @return {Boolean} true if all selections were iterated + */ + each : function(fn, scope){ + var s = this.getSelections(); + for(var i = 0, len = s.length; i < len; i++){ + if(fn.call(scope || this, s[i], i) === false){ + return false; + } + } + return true; + }, + + /** + * Clears all selections. + */ + clearSelections : function(fast){ + if(this.locked) return; + if(fast !== true){ + var ds = this.grid.store; + var s = this.selections; + s.each(function(r){ + this.deselectRow(ds.indexOfId(r.id)); + }, this); + s.clear(); + }else{ + this.selections.clear(); + } + this.last = false; + }, + + + /** + * Selects all rows. + */ + selectAll : function(){ + if(this.locked) return; + this.selections.clear(); + for(var i = 0, len = this.grid.store.getCount(); i < len; i++){ + this.selectRow(i, true); + } + }, + + /** + * Returns True if there is a selection. + * @return {Boolean} + */ + hasSelection : function(){ + return this.selections.length > 0; + }, + + /** + * Returns True if the specified row is selected. + * @param {Number/Record} record The record or index of the record to check + * @return {Boolean} + */ + isSelected : function(index){ + var r = typeof index == "number" ? this.grid.store.getAt(index) : index; + return (r && this.selections.key(r.id) ? true : false); + }, + + /** + * Returns True if the specified record id is selected. + * @param {String} id The id of record to check + * @return {Boolean} + */ + isIdSelected : function(id){ + return (this.selections.key(id) ? true : false); + }, + + // private + handleMouseDown : function(g, rowIndex, e){ + if(e.button !== 0 || this.isLocked()){ + return; + }; + var view = this.grid.getView(); + if(e.shiftKey && this.last !== false){ + var last = this.last; + this.selectRange(last, rowIndex, e.ctrlKey); + this.last = last; // reset the last + view.focusRow(rowIndex); + }else{ + var isSelected = this.isSelected(rowIndex); + if(e.ctrlKey && isSelected){ + this.deselectRow(rowIndex); + }else if(!isSelected || this.getCount() > 1){ + this.selectRow(rowIndex, e.ctrlKey || e.shiftKey); + view.focusRow(rowIndex); + } + } + }, + + /** + * Selects multiple rows. + * @param {Array} rows Array of the indexes of the row to select + * @param {Boolean} keepExisting (optional) True to keep existing selections + */ + selectRows : function(rows, keepExisting){ + if(!keepExisting){ + this.clearSelections(); + } + for(var i = 0, len = rows.length; i < len; i++){ + this.selectRow(rows[i], true); + } + }, + + /** + * Selects a range of rows. All rows in between startRow and endRow are also selected. + * @param {Number} startRow The index of the first row in the range + * @param {Number} endRow The index of the last row in the range + * @param {Boolean} keepExisting (optional) True to retain existing selections + */ + selectRange : function(startRow, endRow, keepExisting){ + if(this.locked) return; + if(!keepExisting){ + this.clearSelections(); + } + if(startRow <= endRow){ + for(var i = startRow; i <= endRow; i++){ + this.selectRow(i, true); + } + }else{ + for(var i = startRow; i >= endRow; i--){ + this.selectRow(i, true); + } + } + }, + + /** + * Deselects a range of rows. All rows in between startRow and endRow are also deselected. + * @param {Number} startRow The index of the first row in the range + * @param {Number} endRow The index of the last row in the range + */ + deselectRange : function(startRow, endRow, preventViewNotify){ + if(this.locked) return; + for(var i = startRow; i <= endRow; i++){ + this.deselectRow(i, preventViewNotify); + } + }, + + /** + * Selects a row. + * @param {Number} row The index of the row to select + * @param {Boolean} keepExisting (optional) True to keep existing selections + */ + selectRow : function(index, keepExisting, preventViewNotify){ + if(this.locked || (index < 0 || index >= this.grid.store.getCount())) return; + var r = this.grid.store.getAt(index); + if(r && this.fireEvent("beforerowselect", this, index, keepExisting, r) !== false){ + if(!keepExisting || this.singleSelect){ + this.clearSelections(); + } + this.selections.add(r); + this.last = this.lastActive = index; + if(!preventViewNotify){ + this.grid.getView().onRowSelect(index); + } + this.fireEvent("rowselect", this, index, r); + this.fireEvent("selectionchange", this); + } + }, + + /** + * Deselects a row. + * @param {Number} row The index of the row to deselect + */ + deselectRow : function(index, preventViewNotify){ + if(this.locked) return; + if(this.last == index){ + this.last = false; + } + if(this.lastActive == index){ + this.lastActive = false; + } + var r = this.grid.store.getAt(index); + if(r){ + this.selections.remove(r); + if(!preventViewNotify){ + this.grid.getView().onRowDeselect(index); + } + this.fireEvent("rowdeselect", this, index, r); + this.fireEvent("selectionchange", this); + } + }, + + // private + restoreLast : function(){ + if(this._last){ + this.last = this._last; + } + }, + + // private + acceptsNav : function(row, col, cm){ + return !cm.isHidden(col) && cm.isCellEditable(col, row); + }, + + // private + onEditorKey : function(field, e){ + var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor; + if(k == e.TAB){ + e.stopEvent(); + ed.completeEdit(); + if(e.shiftKey){ + newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this); + }else{ + newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); + } + }else if(k == e.ENTER){ + e.stopEvent(); + ed.completeEdit(); + if(e.shiftKey){ + newCell = g.walkCells(ed.row-1, ed.col, -1, this.acceptsNav, this); + }else{ + newCell = g.walkCells(ed.row+1, ed.col, 1, this.acceptsNav, this); + } + }else if(k == e.ESC){ + ed.cancelEdit(); + } + if(newCell){ + g.startEditing(newCell[0], newCell[1]); + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Adapter.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Adapter.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Adapter.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,59 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.Adapter + * @extends Ext.menu.BaseItem + * A base utility class that adapts a non-menu component so that it can be wrapped by a menu item and added to a menu. + * It provides basic rendering, activation management and enable/disable logic required to work in menus. + * @constructor + * Creates a new Adapter + * @param {Ext.Component} component The component being adapted to render into a menu + * @param {Object} config Configuration options + */ +Ext.menu.Adapter = function(component, config){ + Ext.menu.Adapter.superclass.constructor.call(this, config); + this.component = component; +}; +Ext.extend(Ext.menu.Adapter, Ext.menu.BaseItem, { + // private + canActivate : true, + + // private + onRender : function(container, position){ + this.component.render(container); + this.el = this.component.getEl(); + }, + + // private + activate : function(){ + if(this.disabled){ + return false; + } + this.component.focus(); + this.fireEvent("activate", this); + return true; + }, + + // private + deactivate : function(){ + this.fireEvent("deactivate", this); + }, + + // private + disable : function(){ + this.component.disable(); + Ext.menu.Adapter.superclass.disable.call(this); + }, + + // private + enable : function(){ + this.component.enable(); + Ext.menu.Adapter.superclass.enable.call(this); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/BaseItem.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/BaseItem.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/BaseItem.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,155 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.BaseItem + * @extends Ext.Component + * The base class for all items that render into menus. BaseItem provides default rendering, activated state + * management and base configuration options shared by all menu components. + * @constructor + * Creates a new BaseItem + * @param {Object} config Configuration options + */ +Ext.menu.BaseItem = function(config){ + Ext.menu.BaseItem.superclass.constructor.call(this, config); + + this.addEvents( + /** + * @event click + * Fires when this item is clicked + * @param {Ext.menu.BaseItem} this + * @param {Ext.EventObject} e + */ + 'click', + /** + * @event activate + * Fires when this item is activated + * @param {Ext.menu.BaseItem} this + */ + 'activate', + /** + * @event deactivate + * Fires when this item is deactivated + * @param {Ext.menu.BaseItem} this + */ + 'deactivate' + ); + + if(this.handler){ + this.on("click", this.handler, this.scope); + } +}; + +Ext.extend(Ext.menu.BaseItem, Ext.Component, { + /** + * @cfg {Function} handler + * A function that will handle the click event of this menu item (defaults to undefined) + */ + /** + * @cfg {Object} scope + * The scope in which the handler function will be called. + */ + /** + * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to false) + */ + canActivate : false, + /** + * @cfg {String} activeClass The CSS class to use when the item becomes activated (defaults to "x-menu-item-active") + */ + activeClass : "x-menu-item-active", + /** + * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to true) + */ + hideOnClick : true, + /** + * @cfg {Number} hideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 100) + */ + hideDelay : 100, + + // private + ctype: "Ext.menu.BaseItem", + + // private + actionMode : "container", + + // private + render : function(container, parentMenu){ + this.parentMenu = parentMenu; + Ext.menu.BaseItem.superclass.render.call(this, container); + this.container.menuItemId = this.id; + }, + + // private + onRender : function(container, position){ + this.el = Ext.get(this.el); + container.dom.appendChild(this.el.dom); + }, + + /** + * Sets the function that will handle click events for this item (equivalent to passing in the {@link #handler} + * config property). If an existing handler is already registered, it will be unregistered for you. + * @param {Function} handler The function that should be called on click + * @param {Object} scope The scope that should be passed to the handler + */ + setHandler : function(handler, scope){ + if(this.handler){ + this.un("click", this.handler, this.scope); + } + this.on("click", this.handler = handler, this.scope = scope); + }, + + // private + onClick : function(e){ + if(!this.disabled && this.fireEvent("click", this, e) !== false + && this.parentMenu.fireEvent("itemclick", this, e) !== false){ + this.handleClick(e); + }else{ + e.stopEvent(); + } + }, + + // private + activate : function(){ + if(this.disabled){ + return false; + } + var li = this.container; + li.addClass(this.activeClass); + this.region = li.getRegion().adjust(2, 2, -2, -2); + this.fireEvent("activate", this); + return true; + }, + + // private + deactivate : function(){ + this.container.removeClass(this.activeClass); + this.fireEvent("deactivate", this); + }, + + // private + shouldDeactivate : function(e){ + return !this.region || !this.region.contains(e.getPoint()); + }, + + // private + handleClick : function(e){ + if(this.hideOnClick){ + this.parentMenu.hide.defer(this.hideDelay, this.parentMenu, [true]); + } + }, + + // private + expandMenu : function(autoActivate){ + // do nothing + }, + + // private + hideMenu : function(){ + // do nothing + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/CheckItem.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/CheckItem.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/CheckItem.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,114 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.CheckItem + * @extends Ext.menu.Item + * Adds a menu item that contains a checkbox by default, but can also be part of a radio group. + * @constructor + * Creates a new CheckItem + * @param {Object} config Configuration options + */ +Ext.menu.CheckItem = function(config){ + Ext.menu.CheckItem.superclass.constructor.call(this, config); + this.addEvents( + /** + * @event beforecheckchange + * Fires before the checked value is set, providing an opportunity to cancel if needed + * @param {Ext.menu.CheckItem} this + * @param {Boolean} checked The new checked value that will be set + */ + "beforecheckchange" , + /** + * @event checkchange + * Fires after the checked value has been set + * @param {Ext.menu.CheckItem} this + * @param {Boolean} checked The checked value that was set + */ + "checkchange" + ); + /** + * A function that handles the checkchange event. The function is undefined by default, but if an implementation + * is provided, it will be called automatically when the checkchange event fires. + * @param {Ext.menu.CheckItem} this + * @param {Boolean} checked The checked value that was set + * @method checkHandler + */ + if(this.checkHandler){ + this.on('checkchange', this.checkHandler, this.scope); + } + Ext.menu.MenuMgr.registerCheckable(this); +}; +Ext.extend(Ext.menu.CheckItem, Ext.menu.Item, { + /** + * @cfg {String} group + * All check items with the same group name will automatically be grouped into a single-select + * radio button group (defaults to '') + */ + /** + * @cfg {String} itemCls The default CSS class to use for check items (defaults to "x-menu-item x-menu-check-item") + */ + itemCls : "x-menu-item x-menu-check-item", + /** + * @cfg {String} groupClass The default CSS class to use for radio group check items (defaults to "x-menu-group-item") + */ + groupClass : "x-menu-group-item", + + /** + * @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false). Note that + * if this checkbox is part of a radio group (group = true) only the last item in the group that is + * initialized with checked = true will be rendered as checked. + */ + checked: false, + + // private + ctype: "Ext.menu.CheckItem", + + // private + onRender : function(c){ + Ext.menu.CheckItem.superclass.onRender.apply(this, arguments); + if(this.group){ + this.el.addClass(this.groupClass); + } + if(this.checked){ + this.checked = false; + this.setChecked(true, true); + } + }, + + // private + destroy : function(){ + Ext.menu.MenuMgr.unregisterCheckable(this); + Ext.menu.CheckItem.superclass.destroy.apply(this, arguments); + }, + + /** + * Set the checked state of this item + * @param {Boolean} checked The new checked value + * @param {Boolean} suppressEvent (optional) True to prevent the checkchange event from firing (defaults to false) + */ + setChecked : function(state, suppressEvent){ + if(this.checked != state && this.fireEvent("beforecheckchange", this, state) !== false){ + if(this.container){ + this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked"); + } + this.checked = state; + if(suppressEvent !== true){ + this.fireEvent("checkchange", this, state); + } + } + }, + + // private + handleClick : function(e){ + if(!this.disabled && !(this.checked && this.group)){// disable unselect on radio item + this.setChecked(!this.checked); + } + Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/ColorItem.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/ColorItem.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/ColorItem.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,26 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.ColorItem + * @extends Ext.menu.Adapter + * A menu item that wraps the {@link Ext.ColorPalette} component. + * @constructor + * Creates a new ColorItem + * @param {Object} config Configuration options + */ +Ext.menu.ColorItem = function(config){ + Ext.menu.ColorItem.superclass.constructor.call(this, new Ext.ColorPalette(config), config); + /** The Ext.ColorPalette object @type Ext.ColorPalette */ + this.palette = this.component; + this.relayEvents(this.palette, ["select"]); + if(this.selectHandler){ + this.on('select', this.selectHandler, this.scope); + } +}; +Ext.extend(Ext.menu.ColorItem, Ext.menu.Adapter); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/ColorMenu.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/ColorMenu.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/ColorMenu.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,34 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.ColorMenu + * @extends Ext.menu.Menu + * A menu containing a {@link Ext.menu.ColorItem} component (which provides a basic color picker). + * @constructor + * Creates a new ColorMenu + * @param {Object} config Configuration options + */ +Ext.menu.ColorMenu = function(config){ + Ext.menu.ColorMenu.superclass.constructor.call(this, config); + this.plain = true; + var ci = new Ext.menu.ColorItem(config); + this.add(ci); + /** + * The {@link Ext.ColorPalette} instance for this ColorMenu + * @type ColorPalette + */ + this.palette = ci.palette; + /** + * @event select + * @param {ColorPalette} palette + * @param {String} color + */ + this.relayEvents(ci, ["select"]); +}; +Ext.extend(Ext.menu.ColorMenu, Ext.menu.Menu); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/DateItem.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/DateItem.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/DateItem.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,37 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.DateItem + * @extends Ext.menu.Adapter + * A menu item that wraps the {@link Ext.DatPicker} component. + * @constructor + * Creates a new DateItem + * @param {Object} config Configuration options + */ +Ext.menu.DateItem = function(config){ + Ext.menu.DateItem.superclass.constructor.call(this, new Ext.DatePicker(config), config); + /** The Ext.DatePicker object @type Ext.DatePicker */ + this.picker = this.component; + this.addEvents('select'); + + this.picker.on("render", function(picker){ + picker.getEl().swallowEvent("click"); + picker.container.addClass("x-menu-date-item"); + }); + + this.picker.on("select", this.onSelect, this); +}; + +Ext.extend(Ext.menu.DateItem, Ext.menu.Adapter, { + // private + onSelect : function(picker, date){ + this.fireEvent("select", this, date, picker); + Ext.menu.DateItem.superclass.handleClick.call(this); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/DateMenu.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/DateMenu.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/DateMenu.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,42 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.DateMenu + * @extends Ext.menu.Menu + * A menu containing a {@link Ext.menu.DateItem} component (which provides a date picker). + * @constructor + * Creates a new DateMenu + * @param {Object} config Configuration options + */ +Ext.menu.DateMenu = function(config){ + Ext.menu.DateMenu.superclass.constructor.call(this, config); + this.plain = true; + var di = new Ext.menu.DateItem(config); + this.add(di); + /** + * The {@link Ext.DatePicker} instance for this DateMenu + * @type DatePicker + */ + this.picker = di.picker; + /** + * @event select + * @param {DatePicker} picker + * @param {Date} date + */ + this.relayEvents(di, ["select"]); + + this.on('beforeshow', function(){ + if(this.picker){ + this.picker.hideMonthPicker(true); + } + }, this); +}; +Ext.extend(Ext.menu.DateMenu, Ext.menu.Menu, { + cls:'x-date-menu' +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Item.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Item.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Item.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,176 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.Item + * @extends Ext.menu.BaseItem + * A base class for all menu items that require menu-related functionality (like sub-menus) and are not static + * display items. Item extends the base functionality of {@link Ext.menu.BaseItem} by adding menu-specific + * activation and click handling. + * @constructor + * Creates a new Item + * @param {Object} config Configuration options + */ +Ext.menu.Item = function(config){ + Ext.menu.Item.superclass.constructor.call(this, config); + if(this.menu){ + this.menu = Ext.menu.MenuMgr.get(this.menu); + } +}; +Ext.extend(Ext.menu.Item, Ext.menu.BaseItem, { + /** + * @cfg {String} icon The path to an icon to display in this item (defaults to Ext.BLANK_IMAGE_URL). If + * icon is specified {@link #iconCls} should not be. + */ + /** + * @cfg {String} iconCls A CSS class that specifies a background image that will be used as the icon for + * this item (defaults to ''). If iconCls is specified {@link #icon} should not be. + */ + /** + * @cfg {String} text The text to display in this item (defaults to ''). + */ + /** + * @cfg {String} href The href attribute to use for the underlying anchor link (defaults to '#'). + */ + /** + * @cfg {String} hrefTarget The target attribute to use for the underlying anchor link (defaults to ''). + */ + /** + * @cfg {String} itemCls The default CSS class to use for menu items (defaults to 'x-menu-item') + */ + itemCls : "x-menu-item", + /** + * @cfg {Boolean} canActivate True if this item can be visually activated (defaults to true) + */ + canActivate : true, + /** + * @cfg {Number} showDelay Length of time in milliseconds to wait before showing this item (defaults to 200) + */ + showDelay: 200, + // doc'd in BaseItem + hideDelay: 200, + + // private + ctype: "Ext.menu.Item", + + // private + onRender : function(container, position){ + var el = document.createElement("a"); + el.hideFocus = true; + el.unselectable = "on"; + el.href = this.href || "#"; + if(this.hrefTarget){ + el.target = this.hrefTarget; + } + el.className = this.itemCls + (this.menu ? " x-menu-item-arrow" : "") + (this.cls ? " " + this.cls : ""); + el.innerHTML = String.format( + '{1}', + this.icon || Ext.BLANK_IMAGE_URL, this.text, this.iconCls || ''); + this.el = el; + Ext.menu.Item.superclass.onRender.call(this, container, position); + }, + + /** + * Sets the text to display in this menu item + * @param {String} text The text to display + */ + setText : function(text){ + this.text = text; + if(this.rendered){ + this.el.update(String.format( + '{1}', + this.icon || Ext.BLANK_IMAGE_URL, this.text, this.iconCls || '')); + this.parentMenu.autoWidth(); + } + }, + + /** + * Sets the CSS class to apply to the item's icon element + * @param {String} cls The CSS class to apply + */ + setIconClass : function(cls){ + var oldCls = this.iconCls; + this.iconCls = cls; + if(this.rendered){ + this.el.child('img.x-menu-item-icon').replaceClass(oldCls, this.iconCls); + } + }, + + // private + handleClick : function(e){ + if(!this.href){ // if no link defined, stop the event automatically + e.stopEvent(); + } + Ext.menu.Item.superclass.handleClick.apply(this, arguments); + }, + + // private + activate : function(autoExpand){ + if(Ext.menu.Item.superclass.activate.apply(this, arguments)){ + this.focus(); + if(autoExpand){ + this.expandMenu(); + } + } + return true; + }, + + // private + shouldDeactivate : function(e){ + if(Ext.menu.Item.superclass.shouldDeactivate.call(this, e)){ + if(this.menu && this.menu.isVisible()){ + return !this.menu.getEl().getRegion().contains(e.getPoint()); + } + return true; + } + return false; + }, + + // private + deactivate : function(){ + Ext.menu.Item.superclass.deactivate.apply(this, arguments); + this.hideMenu(); + }, + + // private + expandMenu : function(autoActivate){ + if(!this.disabled && this.menu){ + clearTimeout(this.hideTimer); + delete this.hideTimer; + if(!this.menu.isVisible() && !this.showTimer){ + this.showTimer = this.deferExpand.defer(this.showDelay, this, [autoActivate]); + }else if (this.menu.isVisible() && autoActivate){ + this.menu.tryActivate(0, 1); + } + } + }, + + // private + deferExpand : function(autoActivate){ + delete this.showTimer; + this.menu.show(this.container, this.parentMenu.subMenuAlign || "tl-tr?", this.parentMenu); + if(autoActivate){ + this.menu.tryActivate(0, 1); + } + }, + + // private + hideMenu : function(){ + clearTimeout(this.showTimer); + delete this.showTimer; + if(!this.hideTimer && this.menu && this.menu.isVisible()){ + this.hideTimer = this.deferHide.defer(this.hideDelay, this); + } + }, + + // private + deferHide : function(){ + delete this.hideTimer; + this.menu.hide(); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Menu.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Menu.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Menu.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,551 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.Menu + * @extends Ext.util.Observable + * A menu object. This is the container to which you add all other menu items. Menu can also serve a as a base class + * when you want a specialzed menu based off of another component (like {@link Ext.menu.DateMenu} for example). + * @constructor + * Creates a new Menu + * @param {Object} config Configuration options + */ +Ext.menu.Menu = function(config){ + if(config instanceof Array){ + config = {items:config}; + } + Ext.apply(this, config); + this.id = this.id || Ext.id(); + this.addEvents( + /** + * @event beforeshow + * Fires before this menu is displayed + * @param {Ext.menu.Menu} this + */ + 'beforeshow', + /** + * @event beforehide + * Fires before this menu is hidden + * @param {Ext.menu.Menu} this + */ + 'beforehide', + /** + * @event show + * Fires after this menu is displayed + * @param {Ext.menu.Menu} this + */ + 'show', + /** + * @event hide + * Fires after this menu is hidden + * @param {Ext.menu.Menu} this + */ + 'hide', + /** + * @event click + * Fires when this menu is clicked (or when the enter key is pressed while it is active) + * @param {Ext.menu.Menu} this + * @param {Ext.menu.Item} menuItem The menu item that was clicked + * @param {Ext.EventObject} e + */ + 'click', + /** + * @event mouseover + * Fires when the mouse is hovering over this menu + * @param {Ext.menu.Menu} this + * @param {Ext.EventObject} e + * @param {Ext.menu.Item} menuItem The menu item that was clicked + */ + 'mouseover', + /** + * @event mouseout + * Fires when the mouse exits this menu + * @param {Ext.menu.Menu} this + * @param {Ext.EventObject} e + * @param {Ext.menu.Item} menuItem The menu item that was clicked + */ + 'mouseout', + /** + * @event itemclick + * Fires when a menu item contained in this menu is clicked + * @param {Ext.menu.BaseItem} baseItem The BaseItem that was clicked + * @param {Ext.EventObject} e + */ + 'itemclick' + ); + Ext.menu.MenuMgr.register(this); + Ext.menu.Menu.superclass.constructor.call(this); + var mis = this.items; + this.items = new Ext.util.MixedCollection(); + if(mis){ + this.add.apply(this, mis); + } +}; + +Ext.extend(Ext.menu.Menu, Ext.util.Observable, { + /** + * @cfg {Object} defaults + * A config object that will be applied to all items added to this container either via the {@link #items} + * config or via the {@link #add} method. The defaults config can contain any number of + * name/value property pairs to be added to each item, and should be valid for the types of items + * being added to the menu. + */ + /** + * @cfg {Mixed} items + * An array of items to be added to this menu. See {@link #add} for a list of valid item types. + */ + /** + * @cfg {Number} minWidth The minimum width of the menu in pixels (defaults to 120) + */ + minWidth : 120, + /** + * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" + * for bottom-right shadow (defaults to "sides") + */ + shadow : "sides", + /** + * @cfg {String} subMenuAlign The {@link Ext.Element#alignTo} anchor position value to use for submenus of + * this menu (defaults to "tl-tr?") + */ + subMenuAlign : "tl-tr?", + /** + * @cfg {String} defaultAlign The default {@link Ext.Element#alignTo) anchor position value for this menu + * relative to its element of origin (defaults to "tl-bl?") + */ + defaultAlign : "tl-bl?", + /** + * @cfg {Boolean} allowOtherMenus True to allow multiple menus to be displayed at the same time (defaults to false) + */ + allowOtherMenus : false, + + hidden:true, + + createEl : function(){ + return new Ext.Layer({ + cls: "x-menu", + shadow:this.shadow, + constrain: false, + parentEl: this.parentEl || document.body, + zindex:15000 + }); + }, + + // private + render : function(){ + if(this.el){ + return; + } + var el = this.el = this.createEl(); + + this.keyNav = new Ext.menu.MenuNav(this); + + if(this.plain){ + el.addClass("x-menu-plain"); + } + if(this.cls){ + el.addClass(this.cls); + } + // generic focus element + this.focusEl = el.createChild({ + tag: "a", cls: "x-menu-focus", href: "#", onclick: "return false;", tabIndex:"-1" + }); + var ul = el.createChild({tag: "ul", cls: "x-menu-list"}); + ul.on("click", this.onClick, this); + ul.on("mouseover", this.onMouseOver, this); + ul.on("mouseout", this.onMouseOut, this); + this.items.each(function(item){ + var li = document.createElement("li"); + li.className = "x-menu-list-item"; + ul.dom.appendChild(li); + item.render(li, this); + }, this); + this.ul = ul; + this.autoWidth(); + }, + + // private + autoWidth : function(){ + var el = this.el, ul = this.ul; + if(!el){ + return; + } + var w = this.width; + if(w){ + el.setWidth(w); + }else if(Ext.isIE){ + el.setWidth(this.minWidth); + var t = el.dom.offsetWidth; // force recalc + el.setWidth(ul.getWidth()+el.getFrameWidth("lr")); + } + }, + + // private + delayAutoWidth : function(){ + if(this.el){ + if(!this.awTask){ + this.awTask = new Ext.util.DelayedTask(this.autoWidth, this); + } + this.awTask.delay(20); + } + }, + + // private + findTargetItem : function(e){ + var t = e.getTarget(".x-menu-list-item", this.ul, true); + if(t && t.menuItemId){ + return this.items.get(t.menuItemId); + } + }, + + // private + onClick : function(e){ + var t; + if(t = this.findTargetItem(e)){ + t.onClick(e); + this.fireEvent("click", this, t, e); + } + }, + + // private + setActiveItem : function(item, autoExpand){ + if(item != this.activeItem){ + if(this.activeItem){ + this.activeItem.deactivate(); + } + this.activeItem = item; + item.activate(autoExpand); + }else if(autoExpand){ + item.expandMenu(); + } + }, + + // private + tryActivate : function(start, step){ + var items = this.items; + for(var i = start, len = items.length; i >= 0 && i < len; i+= step){ + var item = items.get(i); + if(!item.disabled && item.canActivate){ + this.setActiveItem(item, false); + return item; + } + } + return false; + }, + + // private + onMouseOver : function(e){ + var t; + if(t = this.findTargetItem(e)){ + if(t.canActivate && !t.disabled){ + this.setActiveItem(t, true); + } + } + this.fireEvent("mouseover", this, e, t); + }, + + // private + onMouseOut : function(e){ + var t; + if(t = this.findTargetItem(e)){ + if(t == this.activeItem && t.shouldDeactivate(e)){ + this.activeItem.deactivate(); + delete this.activeItem; + } + } + this.fireEvent("mouseout", this, e, t); + }, + + /** + * Read-only. Returns true if the menu is currently displayed, else false. + * @type Boolean + */ + isVisible : function(){ + return this.el && !this.hidden; + }, + + /** + * Displays this menu relative to another element + * @param {Mixed} element The element to align to + * @param {String} position (optional) The {@link Ext.Element#alignTo} anchor position to use in aligning to + * the element (defaults to this.defaultAlign) + * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined) + */ + show : function(el, pos, parentMenu){ + this.parentMenu = parentMenu; + if(!this.el){ + this.render(); + } + this.fireEvent("beforeshow", this); + this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign), parentMenu, false); + }, + + /** + * Displays this menu at a specific xy position + * @param {Array} xyPosition Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based) + * @param {Ext.menu.Menu} parentMenu (optional) This menu's parent menu, if applicable (defaults to undefined) + */ + showAt : function(xy, parentMenu, /* private: */_e){ + this.parentMenu = parentMenu; + if(!this.el){ + this.render(); + } + if(_e !== false){ + this.fireEvent("beforeshow", this); + xy = this.el.adjustForConstraints(xy); + } + this.el.setXY(xy); + this.el.show(); + this.hidden = false; + this.focus(); + this.fireEvent("show", this); + }, + + + + focus : function(){ + if(!this.hidden){ + this.doFocus.defer(50, this); + } + }, + + doFocus : function(){ + if(!this.hidden){ + this.focusEl.focus(); + } + }, + + /** + * Hides this menu and optionally all parent menus + * @param {Boolean} deep (optional) True to hide all parent menus recursively, if any (defaults to false) + */ + hide : function(deep){ + if(this.el && this.isVisible()){ + this.fireEvent("beforehide", this); + if(this.activeItem){ + this.activeItem.deactivate(); + this.activeItem = null; + } + this.el.hide(); + this.hidden = true; + this.fireEvent("hide", this); + } + if(deep === true && this.parentMenu){ + this.parentMenu.hide(true); + } + }, + + /** + * Addds one or more items of any type supported by the Menu class, or that can be converted into menu items. + * Any of the following are valid: + *
          + *
        • Any menu item object based on {@link Ext.menu.Item}
        • + *
        • An HTMLElement object which will be converted to a menu item
        • + *
        • A menu item config object that will be created as a new menu item
        • + *
        • A string, which can either be '-' or 'separator' to add a menu separator, otherwise + * it will be converted into a {@link Ext.menu.TextItem} and added
        • + *
        + * Usage: + *
        
        +// Create the menu
        +var menu = new Ext.menu.Menu();
        +
        +// Create a menu item to add by reference
        +var menuItem = new Ext.menu.Item({ text: 'New Item!' });
        +
        +// Add a bunch of items at once using different methods.
        +// Only the last item added will be returned.
        +var item = menu.add(
        +    menuItem,                // add existing item by ref
        +    'Dynamic Item',          // new TextItem
        +    '-',                     // new separator
        +    { text: 'Config Item' }  // new item by config
        +);
        +
        + * @param {Mixed} args One or more menu items, menu item configs or other objects that can be converted to menu items + * @return {Ext.menu.Item} The menu item that was added, or the last one if multiple items were added + */ + add : function(){ + var a = arguments, l = a.length, item; + for(var i = 0; i < l; i++){ + var el = a[i]; + if(el.render){ // some kind of Item + item = this.addItem(el); + }else if(typeof el == "string"){ // string + if(el == "separator" || el == "-"){ + item = this.addSeparator(); + }else{ + item = this.addText(el); + } + }else if(el.tagName || el.el){ // element + item = this.addElement(el); + }else if(typeof el == "object"){ // must be menu item config? + Ext.applyIf(el, this.defaults); + item = this.addMenuItem(el); + } + } + return item; + }, + + /** + * Returns this menu's underlying {@link Ext.Element} object + * @return {Ext.Element} The element + */ + getEl : function(){ + if(!this.el){ + this.render(); + } + return this.el; + }, + + /** + * Adds a separator bar to the menu + * @return {Ext.menu.Item} The menu item that was added + */ + addSeparator : function(){ + return this.addItem(new Ext.menu.Separator()); + }, + + /** + * Adds an {@link Ext.Element} object to the menu + * @param {Mixed} el The element or DOM node to add, or its id + * @return {Ext.menu.Item} The menu item that was added + */ + addElement : function(el){ + return this.addItem(new Ext.menu.BaseItem(el)); + }, + + /** + * Adds an existing object based on {@link Ext.menu.Item} to the menu + * @param {Ext.menu.Item} item The menu item to add + * @return {Ext.menu.Item} The menu item that was added + */ + addItem : function(item){ + this.items.add(item); + if(this.ul){ + var li = document.createElement("li"); + li.className = "x-menu-list-item"; + this.ul.dom.appendChild(li); + item.render(li, this); + this.delayAutoWidth(); + } + return item; + }, + + /** + * Creates a new {@link Ext.menu.Item} based an the supplied config object and adds it to the menu + * @param {Object} config A MenuItem config object + * @return {Ext.menu.Item} The menu item that was added + */ + addMenuItem : function(config){ + if(!(config instanceof Ext.menu.Item)){ + if(typeof config.checked == "boolean"){ // must be check menu item config? + config = new Ext.menu.CheckItem(config); + }else{ + config = new Ext.menu.Item(config); + } + } + return this.addItem(config); + }, + + /** + * Creates a new {@link Ext.menu.TextItem} with the supplied text and adds it to the menu + * @param {String} text The text to display in the menu item + * @return {Ext.menu.Item} The menu item that was added + */ + addText : function(text){ + return this.addItem(new Ext.menu.TextItem(text)); + }, + + /** + * Inserts an existing object based on {@link Ext.menu.Item} to the menu at a specified index + * @param {Number} index The index in the menu's list of current items where the new item should be inserted + * @param {Ext.menu.Item} item The menu item to add + * @return {Ext.menu.Item} The menu item that was added + */ + insert : function(index, item){ + this.items.insert(index, item); + if(this.ul){ + var li = document.createElement("li"); + li.className = "x-menu-list-item"; + this.ul.dom.insertBefore(li, this.ul.dom.childNodes[index]); + item.render(li, this); + this.delayAutoWidth(); + } + return item; + }, + + /** + * Removes an {@link Ext.menu.Item} from the menu and destroys the object + * @param {Ext.menu.Item} item The menu item to remove + */ + remove : function(item){ + this.items.removeKey(item.id); + item.destroy(); + }, + + /** + * Removes and destroys all items in the menu + */ + removeAll : function(){ + var f; + while(f = this.items.first()){ + this.remove(f); + } + } +}); + +// MenuNav is a private utility class used internally by the Menu +Ext.menu.MenuNav = function(menu){ + Ext.menu.MenuNav.superclass.constructor.call(this, menu.el); + this.scope = this.menu = menu; +}; + +Ext.extend(Ext.menu.MenuNav, Ext.KeyNav, { + doRelay : function(e, h){ + var k = e.getKey(); + if(!this.menu.activeItem && e.isNavKeyPress() && k != e.SPACE && k != e.RETURN){ + this.menu.tryActivate(0, 1); + return false; + } + return h.call(this.scope || this, e, this.menu); + }, + + up : function(e, m){ + if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){ + m.tryActivate(m.items.length-1, -1); + } + }, + + down : function(e, m){ + if(!m.tryActivate(m.items.indexOf(m.activeItem)+1, 1)){ + m.tryActivate(0, 1); + } + }, + + right : function(e, m){ + if(m.activeItem){ + m.activeItem.expandMenu(true); + } + }, + + left : function(e, m){ + m.hide(); + if(m.parentMenu && m.parentMenu.activeItem){ + m.parentMenu.activeItem.activate(); + } + }, + + enter : function(e, m){ + if(m.activeItem){ + e.stopPropagation(); + m.activeItem.onClick(e); + m.fireEvent("click", this, m.activeItem); + return true; + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/MenuMgr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/MenuMgr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/MenuMgr.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,210 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.MenuMgr + * Provides a common registry of all menu items on a page so that they can be easily accessed by id. + * @singleton + */ +Ext.menu.MenuMgr = function(){ + var menus, active, groups = {}, attached = false, lastShow = new Date(); + + // private - called when first menu is created + function init(){ + menus = {}; + active = new Ext.util.MixedCollection(); + Ext.getDoc().addKeyListener(27, function(){ + if(active.length > 0){ + hideAll(); + } + }); + } + + // private + function hideAll(){ + if(active && active.length > 0){ + var c = active.clone(); + c.each(function(m){ + m.hide(); + }); + } + } + + // private + function onHide(m){ + active.remove(m); + if(active.length < 1){ + Ext.getDoc().un("mousedown", onMouseDown); + attached = false; + } + } + + // private + function onShow(m){ + var last = active.last(); + lastShow = new Date(); + active.add(m); + if(!attached){ + Ext.getDoc().on("mousedown", onMouseDown); + attached = true; + } + if(m.parentMenu){ + m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3); + m.parentMenu.activeChild = m; + }else if(last && last.isVisible()){ + m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3); + } + } + + // private + function onBeforeHide(m){ + if(m.activeChild){ + m.activeChild.hide(); + } + if(m.autoHideTimer){ + clearTimeout(m.autoHideTimer); + delete m.autoHideTimer; + } + } + + // private + function onBeforeShow(m){ + var pm = m.parentMenu; + if(!pm && !m.allowOtherMenus){ + hideAll(); + }else if(pm && pm.activeChild){ + pm.activeChild.hide(); + } + } + + // private + function onMouseDown(e){ + if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu")){ + hideAll(); + } + } + + // private + function onBeforeCheck(mi, state){ + if(state){ + var g = groups[mi.group]; + for(var i = 0, l = g.length; i < l; i++){ + if(g[i] != mi){ + g[i].setChecked(false); + } + } + } + } + + return { + + /** + * Hides all menus that are currently visible + */ + hideAll : function(){ + hideAll(); + }, + + // private + register : function(menu){ + if(!menus){ + init(); + } + menus[menu.id] = menu; + menu.on("beforehide", onBeforeHide); + menu.on("hide", onHide); + menu.on("beforeshow", onBeforeShow); + menu.on("show", onShow); + var g = menu.group; + if(g && menu.events["checkchange"]){ + if(!groups[g]){ + groups[g] = []; + } + groups[g].push(menu); + menu.on("checkchange", onCheck); + } + }, + + /** + * Returns a {@link Ext.menu.Menu} object + * @param {String/Object} menu The string menu id, an existing menu object reference, or a Menu config that will + * be used to generate and return a new Menu instance. + * @return {Ext.menu.Menu} The specified menu + */ + get : function(menu){ + if(typeof menu == "string"){ // menu id + return menus[menu]; + }else if(menu.events){ // menu instance + return menu; + }else if(typeof menu.length == 'number'){ // array of menu items? + return new Ext.menu.Menu({items:menu}); + }else{ // otherwise, must be a config + return new Ext.menu.Menu(menu); + } + }, + + // private + unregister : function(menu){ + delete menus[menu.id]; + menu.un("beforehide", onBeforeHide); + menu.un("hide", onHide); + menu.un("beforeshow", onBeforeShow); + menu.un("show", onShow); + var g = menu.group; + if(g && menu.events["checkchange"]){ + groups[g].remove(menu); + menu.un("checkchange", onCheck); + } + }, + + // private + registerCheckable : function(menuItem){ + var g = menuItem.group; + if(g){ + if(!groups[g]){ + groups[g] = []; + } + groups[g].push(menuItem); + menuItem.on("beforecheckchange", onBeforeCheck); + } + }, + + // private + unregisterCheckable : function(menuItem){ + var g = menuItem.group; + if(g){ + groups[g].remove(menuItem); + menuItem.un("beforecheckchange", onBeforeCheck); + } + }, + + getCheckedItem : function(groupId){ + var g = groups[groupId]; + if(g){ + for(var i = 0, l = g.length; i < l; i++){ + if(g[i].checked){ + return g[i]; + } + } + } + return null; + }, + + setCheckedItem : function(groupId, itemId){ + var g = groups[groupId]; + if(g){ + for(var i = 0, l = g.length; i < l; i++){ + if(g[i].id == itemId){ + g[i].setChecked(true); + } + } + } + return null; + } + }; +}(); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Separator.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Separator.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/Separator.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,40 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.Separator + * @extends Ext.menu.BaseItem + * Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will + * add one of these by using "-" in you call to add() or in your items config rather than creating one directly. + * @constructor + * @param {Object} config Configuration options + */ +Ext.menu.Separator = function(config){ + Ext.menu.Separator.superclass.constructor.call(this, config); +}; + +Ext.extend(Ext.menu.Separator, Ext.menu.BaseItem, { + /** + * @cfg {String} itemCls The default CSS class to use for separators (defaults to "x-menu-sep") + */ + itemCls : "x-menu-sep", + /** + * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false) + */ + hideOnClick : false, + + // private + onRender : function(li){ + var s = document.createElement("span"); + s.className = this.itemCls; + s.innerHTML = " "; + this.el = s; + li.addClass("x-menu-sep-li"); + Ext.menu.Separator.superclass.onRender.apply(this, arguments); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/TextItem.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/TextItem.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/menu/TextItem.js 4 Dec 2007 02:48:59 -0000 1.1 @@ -0,0 +1,43 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.menu.TextItem + * @extends Ext.menu.BaseItem + * Adds a static text string to a menu, usually used as either a heading or group separator. + * @constructor + * Creates a new TextItem + * @param {String} text The text to display + */ +Ext.menu.TextItem = function(text){ + this.text = text; + Ext.menu.TextItem.superclass.constructor.call(this); +}; + +Ext.extend(Ext.menu.TextItem, Ext.menu.BaseItem, { + /** + * @cfg {String} text The text to display for this item (defaults to '') + */ + /** + * @cfg {Boolean} hideOnClick True to hide the containing menu after this item is clicked (defaults to false) + */ + hideOnClick : false, + /** + * @cfg {String} itemCls The default CSS class to use for text items (defaults to "x-menu-text") + */ + itemCls : "x-menu-text", + + // private + onRender : function(){ + var s = document.createElement("span"); + s.className = this.itemCls; + s.innerHTML = this.text; + this.el = s; + Ext.menu.TextItem.superclass.onRender.apply(this, arguments); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/QuickTip.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/QuickTip.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/QuickTip.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,178 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.QuickTip + * @extends Ext.ToolTip + * A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global + * {@link Ext.QuickTips} instance. See the QuickTips class header for additional usage details and examples. + * @constructor + * Create a new Tip + * @param {Object} config The configuration options + */ +Ext.QuickTip = Ext.extend(Ext.ToolTip, { + /** + * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to associate with this quicktip (defaults to the document). + */ + /** + * @cfg {Boolean} interceptTitles True to automatically use the element's DOM title value if available (defaults to false). + */ + interceptTitles : false, + + // private + tagConfig : { + namespace : "ext", + attribute : "qtip", + width : "qwidth", + target : "target", + title : "qtitle", + hide : "hide", + cls : "qclass", + align : "qalign" + }, + + // private + initComponent : function(){ + this.target = this.target || Ext.getDoc(); + this.targets = this.targets || {}; + Ext.QuickTip.superclass.initComponent.call(this); + }, + + /** + * Configures a new quick tip instance and assigns it to a target element. The following config values are + * supported (for example usage, see the {@link Ext.QuickTips} class header): + *
          + *
        • autoHide
        • + *
        • cls
        • + *
        • dismissDelay (overrides the singleton value)
        • + *
        • target (required)
        • + *
        • text (required)
        • + *
        • title
        • + *
        • width
        + * @param {Object} config The config object + */ + register : function(config){ + var cs = config instanceof Array ? config : arguments; + for(var i = 0, len = cs.length; i < len; i++){ + var c = cs[i]; + var target = c.target; + if(target){ + if(target instanceof Array){ + for(var j = 0, jlen = target.length; j < jlen; j++){ + this.targets[Ext.id(target[j])] = c; + } + } else{ + this.targets[Ext.id(target)] = c; + } + } + } + }, + + /** + * Removes this quick tip from its element and destroys it. + * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed. + */ + unregister : function(el){ + delete this.targets[Ext.id(el)]; + }, + + // private + onTargetOver : function(e){ + if(this.disabled){ + return; + } + this.targetXY = e.getXY(); + var t = e.getTarget(); + if(!t || t.nodeType !== 1 || t == document || t == document.body){ + return; + } + if(this.activeTarget && t == this.activeTarget.el){ + this.clearTimer('hide'); + this.show(); + return; + } + if(t && this.targets[t.id]){ + this.activeTarget = this.targets[t.id]; + this.activeTarget.el = t; + this.delayShow(); + return; + } + var ttp, et = Ext.fly(t), cfg = this.tagConfig; + var ns = cfg.namespace; + if(this.interceptTitles && t.title){ + ttp = t.title; + t.qtip = ttp; + t.removeAttribute("title"); + e.preventDefault(); + } else{ + ttp = t.qtip || et.getAttributeNS(ns, cfg.attribute); + } + if(ttp){ + var autoHide = et.getAttributeNS(ns, cfg.hide); + this.activeTarget = { + el: t, + text: ttp, + width: et.getAttributeNS(ns, cfg.width), + autoHide: autoHide != "user" && autoHide !== 'false', + title: et.getAttributeNS(ns, cfg.title), + cls: et.getAttributeNS(ns, cfg.cls), + align: et.getAttributeNS(ns, cfg.align) + }; + this.delayShow(); + } + }, + + // private + onTargetOut : function(e){ + this.clearTimer('show'); + if(this.autoHide !== false){ + this.delayHide(); + } + }, + + // inherit docs + showAt : function(xy){ + var t = this.activeTarget; + if(t){ + if(!this.rendered){ + this.render(Ext.getBody()); + } + if(t.width){ + this.setWidth(t.width); + this.measureWidth = false; + } else{ + this.measureWidth = true; + } + this.setTitle(t.title || ''); + this.body.update(t.text); + this.autoHide = t.autoHide; + this.dismissDelay = t.dismissDelay || this.dismissDelay; + if(this.lastCls){ + this.el.removeClass(this.lastCls); + delete this.lastCls; + } + if(t.cls){ + this.el.addClass(t.cls); + this.lastCls = t.cls; + } + if(t.align){ // TODO: this doesn't seem to work consistently + xy = this.el.getAlignToXY(t.el, t.align); + this.constrainPosition = false; + } else{ + this.constrainPosition = true; + } + } + Ext.QuickTip.superclass.showAt.call(this, xy); + }, + + // inherit docs + hide: function(){ + delete this.activeTarget; + Ext.QuickTip.superclass.hide.call(this); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/QuickTips.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/QuickTips.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/QuickTips.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,151 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.QuickTips + *

        Provides attractive and customizable tooltips for any element. The QuickTips + * singleton is used to configure and manage tooltips globally for multiple elements + * in a generic manner. To create individual tooltips with maximum customizability, + * you should consider either {@link Ext.Tip} or {@link Ext.ToolTip}.

        + *

        Quicktips can be configured via tag attributes directly in markup, or by + * registering quick tips programmatically via the {@link #register} method.

        + *

        The singleton's instance of {@link Ext.QuickTip} is available via + * {@link #getQuickTip}, and supports all the methods, and all the all the + * configuration properties of Ext.QuickTip. These settings will apply to all + * tooltips shown by the singleton.

        + *

        Below is the summary of the configuration properties which can be used. + * For detailed descriptions see {@link #getQuickTip}

        + *

        QuickTips singleton configs (all are optional)

        + *
        • dismissDelay
        • + *
        • hideDelay
        • + *
        • maxWidth
        • + *
        • minWidth
        • + *
        • showDelay
        • + *
        • trackMouse
        + *

        Target element configs (optional unless otherwise noted)

        + *
        • autoHide
        • + *
        • cls
        • + *
        • dismissDelay (overrides singleton value)
        • + *
        • target (required)
        • + *
        • text (required)
        • + *
        • title
        • + *
        • width
        + *

        Here is an example showing how some of these config options could be used:

        + *
        
        +// Init the singleton.  Any tag-based quick tips will start working.
        +Ext.QuickTips.init();
        +
        +// Apply a set of config properties to the singleton
        +Ext.apply(Ext.QuickTips.getQuickTip(), {
        +    maxWidth: 200,
        +    minWidth: 100,
        +    showDelay: 50,
        +    trackMouse: true
        +});
        +
        +// Manually register a quick tip for a specific element
        +q.register({
        +    target: 'my-div',
        +    title: 'My Tooltip',
        +    text: 'This tooltip was added in code',
        +    width: 100,
        +    dismissDelay: 20
        +});
        +
        + *

        To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with + * the ext: namespace. The HTML element itself is automatically set as the quick tip target. Here is the summary + * of supported attributes (optional unless otherwise noted):

        + *
        • hide: Specifying "user" is equivalent to setting autoHide = false. Any other value will be the + * same as autoHide = true.
        • + *
        • qclass: A CSS class to be applied to the quick tip (equivalent to the 'cls' target element config).
        • + *
        • qtip (required): The quick tip text (equivalent to the 'text' target element config).
        • + *
        • qtitle: The quick tip title (equivalent to the 'title' target element config).
        • + *
        • qwidth: The quick tip width (equivalent to the 'width' target element config).
        + *

        Here is an example of configuring an HTML element to display a tooltip from markup:

        + *
        
        +// Add a quick tip to an HTML button
        +<input type="button" value="OK" ext:qtitle="OK Button" ext:qwidth="100"
        +     ext:qtip="This is a quick tip from markup!"></input>
        +
        + * @singleton + */ +Ext.QuickTips = function(){ + var tip, locks = []; + return { + /** + * Initialize the global QuickTips instance and prepare any quick tips. + */ + init : function(){ + if(!tip){ + tip = new Ext.QuickTip({elements:'header,body'}); + } + }, + + /** + * Enable quick tips globally. + */ + enable : function(){ + if(tip){ + locks.pop(); + if(locks.length < 1){ + tip.enable(); + } + } + }, + + /** + * Disable quick tips globally. + */ + disable : function(){ + if(tip){ + tip.disable(); + } + locks.push(1); + }, + + /** + * Returns true if quick tips are enabled, else false. + * @return {Boolean} + */ + isEnabled : function(){ + return tip && !tip.disabled; + }, + + /** + * Gets the global QuickTips instance. + */ + getQuickTip : function(){ + return tip; + }, + + /** + * Configures a new quick tip instance and assigns it to a target element. See + * {@link Ext.QuickTip#register} for details. + * @param {Object} config The config object + */ + register : function(){ + tip.register.apply(tip, arguments); + }, + + /** + * Removes any registered quick tip from the target element and destroys it. + * @param {String/HTMLElement/Element} el The element from which the quick tip is to be removed. + */ + unregister : function(){ + tip.unregister.apply(tip, arguments); + }, + + /** + * Alias of {@link #register}. + * @param {Object} config The config object + */ + tips :function(){ + tip.register.apply(tip, arguments); + } + } +}(); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/Tip.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/Tip.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/Tip.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,141 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.Tip + * @extends Ext.Panel + * This is the base class for {@link Ext.QuickTip} and {@link Ext.Tooltip} that provides the basic layout and + * positioning that all tip-based classes require. This class can be used directly for simple, statically-positioned + * tips that are displayed programmatically, or it can be extended to provide custom tip implementations. + * @constructor + * Create a new Tip + * @param {Object} config The configuration options + */ +Ext.Tip = Ext.extend(Ext.Panel, { + /** + * @cfg {Boolean} closable True to render a close tool button into the tooltip header (defaults to false). + */ + /** + * @cfg {Number} minWidth The minimum width of the tip in pixels (defaults to 40). + */ + minWidth : 40, + /** + * @cfg {Number} maxWidth The maximum width of the tip in pixels (defaults to 300). + */ + maxWidth : 300, + /** + * @cfg {Boolean/String} shadow True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" + * for bottom-right shadow (defaults to "sides"). + */ + shadow : "sides", + /** + * @cfg {String} defaultAlign Experimental. The default {@link Ext.Element#alignTo} anchor position value + * for this tip relative to its element of origin (defaults to "tl-bl?"). + */ + defaultAlign : "tl-bl?", + autoRender: true, + quickShowInterval : 250, + + // private panel overrides + frame:true, + hidden:true, + baseCls: 'x-tip', + floating:{shadow:true,shim:true,useDisplay:true,constrain:false}, + autoHeight:true, + + // private + initComponent : function(){ + Ext.Tip.superclass.initComponent.call(this); + if(this.closable && !this.title){ + this.elements += ',header'; + } + }, + + // private + afterRender : function(){ + Ext.Tip.superclass.afterRender.call(this); + if(this.closable){ + this.addTool({ + id: 'close', + handler: this.hide, + scope: this + }); + } + }, + + /** + * Shows this tip at the specified XY position. Example usage: + *
        
        +// Show the tip at x:50 and y:100
        +tip.showAt([50,100]);
        +
        + * @param {Array} xy An array containing the x and y coordinates + */ + showAt : function(xy){ + Ext.Tip.superclass.show.call(this); + if(this.measureWidth !== false && (!this.initialConfig || typeof this.initialConfig.width != 'number')){ + var bw = this.body.getTextWidth(); + if(this.title){ + bw = Math.max(bw, this.header.child('span').getTextWidth(this.title)); + } + bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr"); + this.setWidth(bw.constrain(this.minWidth, this.maxWidth)); + } + if(this.constrainPosition){ + xy = this.el.adjustForConstraints(xy); + } + this.setPagePosition(xy[0], xy[1]); + }, + + /** + * Experimental. Shows this tip at a position relative to another element using a standard {@link Ext.Element#alignTo} + * anchor position value. Example usage: + *
        
        +// Show the tip at the default position ('tl-br?')
        +tip.showBy('my-el');
        +
        +// Show the tip's top-left corner anchored to the element's top-right corner
        +tip.showBy('my-el', 'tl-tr');
        +
        + * @param {Mixed} el An HTMLElement, Ext.Element or string id of the target element to align to + * @param {String} position (optional) A valid {@link Ext.Element#alignTo} anchor position (defaults to 'tl-br?' or + * {@link #defaultAlign} if specified). + */ + showBy : function(el, pos){ + if(!this.rendered){ + this.render(Ext.getBody()); + } + this.showAt(this.el.getAlignToXY(el, pos || this.defaultAlign)); + }, + + initDraggable : function(){ + this.dd = new Ext.Tip.DD(this, typeof this.draggable == 'boolean' ? null : this.draggable); + this.header.addClass('x-tip-draggable'); + } +}); + +// private - custom Tip DD implementation +Ext.Tip.DD = function(tip, config){ + Ext.apply(this, config); + this.tip = tip; + Ext.Tip.DD.superclass.constructor.call(this, tip.el.id, 'WindowDD-'+tip.id); + this.setHandleElId(tip.header.id); + this.scroll = false; +}; + +Ext.extend(Ext.Tip.DD, Ext.dd.DD, { + moveOnly:true, + scroll:false, + headerOffsets:[100, 25], + startDrag : function(){ + this.tip.el.disableShadow(); + }, + endDrag : function(e){ + this.tip.el.enableShadow(true); + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/ToolTip.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/ToolTip.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tips/ToolTip.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,207 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.ToolTip + * @extends Ext.Tip + * A standard tooltip implementation for providing additional information when hovering over a target element. + * @constructor + * Create a new Tooltip + * @param {Object} config The configuration options + */ +Ext.ToolTip = Ext.extend(Ext.Tip, { + /** + * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to associate with this tooltip. + */ + /** + * @cfg {Boolean} autoHide True to automatically hide the tooltip after the mouse exits the target element + * or after the {@link #dismissDelay} has expired if set (defaults to true). If {@link closable} = true a close + * tool button will be rendered into the tooltip header. + */ + /** + * @cfg {Number} showDelay Delay in milliseconds before the tooltip displays after the mouse enters the + * target element (defaults to 500) + */ + showDelay: 500, + /** + * @cfg {Number} hideDelay Delay in milliseconds after the mouse exits the target element but before the + * tooltip actually hides (defaults to 200). Set to 0 for the tooltip to hide immediately. + */ + hideDelay: 200, + /** + * @cfg {Number} dismissDelay Delay in milliseconds before the tooltip automatically hides (defaults to 5000). + * To disable automatic hiding, set dismissDelay = 0. + */ + dismissDelay: 5000, + /** + * @cfg {Array} mouseOffset An XY offset from the mouse position where the tooltip should be shown (defaults to [15,18]). + */ + mouseOffset: [15,18], + /** + * @cfg {Boolean} trackMouse True to have the tooltip follow the mouse as it moves over the target element (defaults to false). + */ + trackMouse : false, + constrainPosition: true, + + // private + initComponent: function(){ + Ext.ToolTip.superclass.initComponent.call(this); + this.lastActive = new Date(); + this.initTarget(); + }, + + // private + initTarget : function(){ + if(this.target){ + this.target = Ext.get(this.target); + this.target.on('mouseover', this.onTargetOver, this); + this.target.on('mouseout', this.onTargetOut, this); + this.target.on('mousemove', this.onMouseMove, this); + } + }, + + // private + onMouseMove : function(e){ + this.targetXY = e.getXY(); + if(!this.hidden && this.trackMouse){ + this.setPagePosition(this.getTargetXY()); + } + }, + + // private + getTargetXY : function(){ + return [this.targetXY[0]+this.mouseOffset[0], this.targetXY[1]+this.mouseOffset[1]]; + }, + + // private + onTargetOver : function(e){ + if(this.disabled || e.within(this.target.dom, true)){ + return; + } + this.clearTimer('hide'); + this.targetXY = e.getXY(); + this.delayShow(); + }, + + // private + delayShow : function(){ + if(this.hidden && !this.showTimer){ + if(this.lastActive.getElapsed() < this.quickShowInterval){ + this.show(); + }else{ + this.showTimer = this.show.defer(this.showDelay, this); + } + }else if(!this.hidden && this.autoHide !== false){ + this.show(); + } + }, + + // private + onTargetOut : function(e){ + if(this.disabled || e.within(this.target.dom, true)){ + return; + } + this.clearTimer('show'); + if(this.autoHide !== false){ + this.delayHide(); + } + }, + + // private + delayHide : function(){ + if(!this.hidden && !this.hideTimer){ + this.hideTimer = this.hide.defer(this.hideDelay, this); + } + }, + + /** + * Hides this tooltip if visible. + */ + hide: function(){ + this.clearTimer('dismiss'); + this.lastActive = new Date(); + Ext.ToolTip.superclass.hide.call(this); + }, + + /** + * Shows this tooltip at the current event target XY position. + */ + show : function(){ + this.showAt(this.getTargetXY()); + }, + + // inherit docs + showAt : function(xy){ + this.lastActive = new Date(); + this.clearTimers(); + Ext.ToolTip.superclass.showAt.call(this, xy); + if(this.dismissDelay && this.autoHide !== false){ + this.dismissTimer = this.hide.defer(this.dismissDelay, this); + } + }, + + // private + clearTimer : function(name){ + name = name + 'Timer'; + clearTimeout(this[name]); + delete this[name]; + }, + + // private + clearTimers : function(){ + this.clearTimer('show'); + this.clearTimer('dismiss'); + this.clearTimer('hide'); + }, + + // private + onShow : function(){ + Ext.ToolTip.superclass.onShow.call(this); + Ext.getDoc().on('mousedown', this.onDocMouseDown, this); + }, + + // private + onHide : function(){ + Ext.ToolTip.superclass.onHide.call(this); + Ext.getDoc().un('mousedown', this.onDocMouseDown, this); + }, + + // private + onDocMouseDown : function(e){ + if(this.autoHide !== false && !e.within(this.el.dom)){ + this.disable(); + this.enable.defer(100, this); + } + }, + + // private + onDisable : function(){ + this.clearTimers(); + this.hide(); + }, + + // private + adjustPosition : function(x, y){ + // keep the position from being under the mouse + var ay = this.targetXY[1], h = this.getSize().height; + if(this.constrainPosition && y <= ay && (y+h) >= ay){ + y = ay-h-5; + } + return {x : x, y: y}; + }, + + // private + onDestroy : function(){ + Ext.ToolTip.superclass.onDestroy.call(this); + if(this.target){ + this.target.un('mouseover', this.onTargetOver, this); + this.target.un('mouseout', this.onTargetOut, this); + this.target.un('mousemove', this.onMouseMove, this); + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tree/TreeDragZone.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tree/TreeDragZone.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tree/TreeDragZone.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,76 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.tree.TreeDragZone + * @extends Ext.dd.DragZone + * @constructor + * @param {String/HTMLElement/Element} tree The {@link Ext.tree.TreePanel} for which to enable dragging + * @param {Object} config + */ +if(Ext.dd.DragZone){ +Ext.tree.TreeDragZone = function(tree, config){ + Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.getTreeEl(), config); + /** + * The TreePanel for this drag zone + * @type Ext.tree.TreePanel + * @property + */ + this.tree = tree; +}; + +Ext.extend(Ext.tree.TreeDragZone, Ext.dd.DragZone, { + /** + * @cfg {String} ddGroup + * A named drag drop group to which this object belongs. If a group is specified, then this object will only + * interact with other drag drop objects in the same group (defaults to 'TreeDD'). + */ + ddGroup : "TreeDD", + + // private + onBeforeDrag : function(data, e){ + var n = data.node; + return n && n.draggable && !n.disabled; + }, + + // private + onInitDrag : function(e){ + var data = this.dragData; + this.tree.getSelectionModel().select(data.node); + this.tree.eventModel.disable(); + this.proxy.update(""); + data.node.ui.appendDDGhost(this.proxy.ghost.dom); + this.tree.fireEvent("startdrag", this.tree, data.node, e); + }, + + // private + getRepairXY : function(e, data){ + return data.node.ui.getDDRepairXY(); + }, + + // private + onEndDrag : function(data, e){ + this.tree.eventModel.enable.defer(100, this.tree.eventModel); + this.tree.fireEvent("enddrag", this.tree, data.node, e); + }, + + // private + onValidDrop : function(dd, e, id){ + this.tree.fireEvent("dragdrop", this.tree, this.dragData.node, dd, e); + this.hideProxy(); + }, + + // private + beforeInvalidDrop : function(e, id){ + // this scrolls the original position back into view + var sm = this.tree.getSelectionModel(); + sm.clearSelections(); + sm.select(this.dragData.node); + } +}); +} \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tree/TreeNode.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tree/TreeNode.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/widgets/tree/TreeNode.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,509 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/** + * @class Ext.tree.TreeNode + * @extends Ext.data.Node + * @cfg {String} text The text for this node + * @cfg {Boolean} expanded true to start the node expanded + * @cfg {Boolean} allowDrag False to make this node undraggable if {@link #draggable} = true (defaults to true) + * @cfg {Boolean} allowDrop False if this node cannot have child nodes dropped on it (defaults to true) + * @cfg {Boolean} disabled true to start the node disabled + * @cfg {String} icon The path to an icon for the node. The preferred way to do this + * is to use the cls or iconCls attributes and add the icon via a CSS background image. + * @cfg {String} cls A css class to be added to the node + * @cfg {String} iconCls A css class to be added to the nodes icon element for applying css background images + * @cfg {String} href URL of the link used for the node (defaults to #) + * @cfg {String} hrefTarget target frame for the link + * @cfg {String} qtip An Ext QuickTip for the node + * @cfg {Boolean} expandable If set to true, the node will always show a plus/minus icon, even when empty + * @cfg {String} qtipCfg An Ext QuickTip config for the node (used instead of qtip) + * @cfg {Boolean} singleClickExpand True for single click expand on this node + * @cfg {Function} uiProvider A UI class to use for this node (defaults to Ext.tree.TreeNodeUI) + * @cfg {Boolean} checked True to render a checked checkbox for this node, false to render an unchecked checkbox + * (defaults to undefined with no checkbox rendered) + * @cfg {Boolean} draggable True to make this node draggable (defaults to false) + * @cfg {Boolean} isTarget False to not allow this node to act as a drop target (defaults to true) + * @cfg {Boolean} allowChildren False to not allow this node to have child nodes (defaults to true) + * @constructor + * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node + */ +Ext.tree.TreeNode = function(attributes){ + attributes = attributes || {}; + if(typeof attributes == "string"){ + attributes = {text: attributes}; + } + this.childrenRendered = false; + this.rendered = false; + Ext.tree.TreeNode.superclass.constructor.call(this, attributes); + this.expanded = attributes.expanded === true; + this.isTarget = attributes.isTarget !== false; + this.draggable = attributes.draggable !== false && attributes.allowDrag !== false; + this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false; + + /** + * Read-only. The text for this node. To change it use setText(). + * @type String + */ + this.text = attributes.text; + /** + * True if this node is disabled. + * @type Boolean + */ + this.disabled = attributes.disabled === true; + + this.addEvents( + /** + * @event textchange + * Fires when the text for this node is changed + * @param {Node} this This node + * @param {String} text The new text + * @param {String} oldText The old text + */ + "textchange", + /** + * @event beforeexpand + * Fires before this node is expanded, return false to cancel. + * @param {Node} this This node + * @param {Boolean} deep + * @param {Boolean} anim + */ + "beforeexpand", + /** + * @event beforecollapse + * Fires before this node is collapsed, return false to cancel. + * @param {Node} this This node + * @param {Boolean} deep + * @param {Boolean} anim + */ + "beforecollapse", + /** + * @event expand + * Fires when this node is expanded + * @param {Node} this This node + */ + "expand", + /** + * @event disabledchange + * Fires when the disabled status of this node changes + * @param {Node} this This node + * @param {Boolean} disabled + */ + "disabledchange", + /** + * @event collapse + * Fires when this node is collapsed + * @param {Node} this This node + */ + "collapse", + /** + * @event beforeclick + * Fires before click processing. Return false to cancel the default action. + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + "beforeclick", + /** + * @event click + * Fires when this node is clicked + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + "click", + /** + * @event checkchange + * Fires when a node with a checkbox's checked property changes + * @param {Node} this This node + * @param {Boolean} checked + */ + "checkchange", + /** + * @event dblclick + * Fires when this node is double clicked + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + "dblclick", + /** + * @event contextmenu + * Fires when this node is right clicked + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + "contextmenu", + /** + * @event beforechildrenrendered + * Fires right before the child nodes for this node are rendered + * @param {Node} this This node + */ + "beforechildrenrendered" + ); + + var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI; + + /** + * Read-only. The UI for this node + * @type TreeNodeUI + */ + this.ui = new uiClass(this); +}; +Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { + preventHScroll: true, + /** + * Returns true if this node is expanded + * @return {Boolean} + */ + isExpanded : function(){ + return this.expanded; + }, + +/** + * Returns the UI object for this node. + * @return {TreeNodeUI} The object which is providing the user interface for this tree + * node. Unless otherwise specified in the {@link #uiProvider}, this will be an instance + * of {@link Ext.tree.TreeNodeUI} + */ + getUI : function(){ + return this.ui; + }, + + // private override + setFirstChild : function(node){ + var of = this.firstChild; + Ext.tree.TreeNode.superclass.setFirstChild.call(this, node); + if(this.childrenRendered && of && node != of){ + of.renderIndent(true, true); + } + if(this.rendered){ + this.renderIndent(true, true); + } + }, + + // private override + setLastChild : function(node){ + var ol = this.lastChild; + Ext.tree.TreeNode.superclass.setLastChild.call(this, node); + if(this.childrenRendered && ol && node != ol){ + ol.renderIndent(true, true); + } + if(this.rendered){ + this.renderIndent(true, true); + } + }, + + // these methods are overridden to provide lazy rendering support + // private override + appendChild : function(){ + var node = Ext.tree.TreeNode.superclass.appendChild.apply(this, arguments); + if(node && this.childrenRendered){ + node.render(); + } + this.ui.updateExpandIcon(); + return node; + }, + + // private override + removeChild : function(node){ + this.ownerTree.getSelectionModel().unselect(node); + Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments); + // if it's been rendered remove dom node + if(this.childrenRendered){ + node.ui.remove(); + } + if(this.childNodes.length < 1){ + this.collapse(false, false); + }else{ + this.ui.updateExpandIcon(); + } + if(!this.firstChild && !this.isHiddenRoot()) { + this.childrenRendered = false; + } + return node; + }, + + // private override + insertBefore : function(node, refNode){ + var newNode = Ext.tree.TreeNode.superclass.insertBefore.apply(this, arguments); + if(newNode && refNode && this.childrenRendered){ + node.render(); + } + this.ui.updateExpandIcon(); + return newNode; + }, + + /** + * Sets the text for this node + * @param {String} text + */ + setText : function(text){ + var oldText = this.text; + this.text = text; + this.attributes.text = text; + if(this.rendered){ // event without subscribing + this.ui.onTextChange(this, text, oldText); + } + this.fireEvent("textchange", this, text, oldText); + }, + + /** + * Triggers selection of this node + */ + select : function(){ + this.getOwnerTree().getSelectionModel().select(this); + }, + + /** + * Triggers deselection of this node + */ + unselect : function(){ + this.getOwnerTree().getSelectionModel().unselect(this); + }, + + /** + * Returns true if this node is selected + * @return {Boolean} + */ + isSelected : function(){ + return this.getOwnerTree().getSelectionModel().isSelected(this); + }, + + /** + * Expand this node. + * @param {Boolean} deep (optional) True to expand all children as well + * @param {Boolean} anim (optional) false to cancel the default animation + * @param {Function} callback (optional) A callback to be called when + * expanding this node completes (does not wait for deep expand to complete). + * Called with 1 parameter, this node. + */ + expand : function(deep, anim, callback){ + if(!this.expanded){ + if(this.fireEvent("beforeexpand", this, deep, anim) === false){ + return; + } + if(!this.childrenRendered){ + this.renderChildren(); + } + this.expanded = true; + if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){ + this.ui.animExpand(function(){ + this.fireEvent("expand", this); + if(typeof callback == "function"){ + callback(this); + } + if(deep === true){ + this.expandChildNodes(true); + } + }.createDelegate(this)); + return; + }else{ + this.ui.expand(); + this.fireEvent("expand", this); + if(typeof callback == "function"){ + callback(this); + } + } + }else{ + if(typeof callback == "function"){ + callback(this); + } + } + if(deep === true){ + this.expandChildNodes(true); + } + }, + + isHiddenRoot : function(){ + return this.isRoot && !this.getOwnerTree().rootVisible; + }, + + /** + * Collapse this node. + * @param {Boolean} deep (optional) True to collapse all children as well + * @param {Boolean} anim (optional) false to cancel the default animation + */ + collapse : function(deep, anim){ + if(this.expanded && !this.isHiddenRoot()){ + if(this.fireEvent("beforecollapse", this, deep, anim) === false){ + return; + } + this.expanded = false; + if((this.getOwnerTree().animate && anim !== false) || anim){ + this.ui.animCollapse(function(){ + this.fireEvent("collapse", this); + if(deep === true){ + this.collapseChildNodes(true); + } + }.createDelegate(this)); + return; + }else{ + this.ui.collapse(); + this.fireEvent("collapse", this); + } + } + if(deep === true){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].collapse(true, false); + } + } + }, + + // private + delayedExpand : function(delay){ + if(!this.expandProcId){ + this.expandProcId = this.expand.defer(delay, this); + } + }, + + // private + cancelExpand : function(){ + if(this.expandProcId){ + clearTimeout(this.expandProcId); + } + this.expandProcId = false; + }, + + /** + * Toggles expanded/collapsed state of the node + */ + toggle : function(){ + if(this.expanded){ + this.collapse(); + }else{ + this.expand(); + } + }, + + /** + * Ensures all parent nodes are expanded, and if necessary, scrolls + * the node into view. + */ + ensureVisible : function(callback){ + var tree = this.getOwnerTree(); + tree.expandPath(this.parentNode.getPath(), false, function(){ + tree.getTreeEl().scrollChildIntoView(this.ui.anchor); + Ext.callback(callback); + }.createDelegate(this)); + }, + + /** + * Expand all child nodes + * @param {Boolean} deep (optional) true if the child nodes should also expand their child nodes + */ + expandChildNodes : function(deep){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].expand(deep); + } + }, + + /** + * Collapse all child nodes + * @param {Boolean} deep (optional) true if the child nodes should also collapse their child nodes + */ + collapseChildNodes : function(deep){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++) { + cs[i].collapse(deep); + } + }, + + /** + * Disables this node + */ + disable : function(){ + this.disabled = true; + this.unselect(); + if(this.rendered && this.ui.onDisableChange){ // event without subscribing + this.ui.onDisableChange(this, true); + } + this.fireEvent("disabledchange", this, true); + }, + + /** + * Enables this node + */ + enable : function(){ + this.disabled = false; + if(this.rendered && this.ui.onDisableChange){ // event without subscribing + this.ui.onDisableChange(this, false); + } + this.fireEvent("disabledchange", this, false); + }, + + // private + renderChildren : function(suppressEvent){ + if(suppressEvent !== false){ + this.fireEvent("beforechildrenrendered", this); + } + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].render(true); + } + this.childrenRendered = true; + }, + + // private + sort : function(fn, scope){ + Ext.tree.TreeNode.superclass.sort.apply(this, arguments); + if(this.childrenRendered){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].render(true); + } + } + }, + + // private + render : function(bulkRender){ + this.ui.render(bulkRender); + if(!this.rendered){ + // make sure it is registered + this.getOwnerTree().registerNode(this); + this.rendered = true; + if(this.expanded){ + this.expanded = false; + this.expand(false, false); + } + } + }, + + // private + renderIndent : function(deep, refresh){ + if(refresh){ + this.ui.childIndent = null; + } + this.ui.renderIndent(); + if(deep === true && this.childrenRendered){ + var cs = this.childNodes; + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].renderIndent(true, refresh); + } + } + }, + + beginUpdate : function(){ + this.childrenRendered = false; + }, + + endUpdate : function(){ + if(this.expanded){ + this.renderChildren(); + } + }, + + destroy : function(){ + for(var i = 0,l = this.childNodes.length; i < l; i++){ + this.childNodes[i].destroy(); + } + this.childNodes = null; + if(this.ui.destroy){ + this.ui.destroy(); + } + } +}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/animation.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/animation.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/animation.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,1366 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* +Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.2.0 +*/ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +*/ + +/** + * The animation module provides allows effects to be added to HTMLElements. + * @module animation + * @requires yahoo, event, dom + */ + +/** + * + * Base animation class that provides the interface for building animated effects. + *

        Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);

        + * @class Anim + * @namespace YAHOO.util + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + +YAHOO.util.Anim = function(el, attributes, duration, method) { + if (el) { + this.init(el, attributes, duration, method); + } +}; + +YAHOO.util.Anim.prototype = { + /** + * Provides a readable name for the Anim instance. + * @method toString + * @return {String} + */ + toString: function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Anim " + id); + }, + + patterns: { // cached for performance + noNegatives: /width|height|opacity|padding/i, // keep at zero or above + offsetAttribute: /^((width|height)|(top|left))$/, // use offsetValue as default + defaultUnit: /width|height|top$|bottom$|left$|right$/i, // use 'px' by default + offsetUnit: /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset + }, + + /** + * Returns the value computed by the animation's "method". + * @method doMethod + * @param {String} attr The name of the attribute. + * @param {Number} start The value this attribute should start from for this animation. + * @param {Number} end The value this attribute should end at for this animation. + * @return {Number} The Value to be applied to the attribute. + */ + doMethod: function(attr, start, end) { + return this.method(this.currentFrame, start, end - start, this.totalFrames); + }, + + /** + * Applies a value to an attribute. + * @method setAttribute + * @param {String} attr The name of the attribute. + * @param {Number} val The value to be applied to the attribute. + * @param {String} unit The unit ('px', '%', etc.) of the value. + */ + setAttribute: function(attr, val, unit) { + if ( this.patterns.noNegatives.test(attr) ) { + val = (val > 0) ? val : 0; + } + + YAHOO.util.Dom.setStyle(this.getEl(), attr, val + unit); + }, + + /** + * Returns current value of the attribute. + * @method getAttribute + * @param {String} attr The name of the attribute. + * @return {Number} val The current value of the attribute. + */ + getAttribute: function(attr) { + var el = this.getEl(); + var val = YAHOO.util.Dom.getStyle(el, attr); + + if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) { + return parseFloat(val); + } + + var a = this.patterns.offsetAttribute.exec(attr) || []; + var pos = !!( a[3] ); // top or left + var box = !!( a[2] ); // width or height + + // use offsets for width/height and abs pos top/left + if ( box || (YAHOO.util.Dom.getStyle(el, 'position') == 'absolute' && pos) ) { + val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)]; + } else { // default to zero for other 'auto' + val = 0; + } + + return val; + }, + + /** + * Returns the unit to use when none is supplied. + * @method getDefaultUnit + * @param {attr} attr The name of the attribute. + * @return {String} The default unit to be used. + */ + getDefaultUnit: function(attr) { + if ( this.patterns.defaultUnit.test(attr) ) { + return 'px'; + } + + return ''; + }, + + /** + * Sets the actual values to be used during the animation. Should only be needed for subclass use. + * @method setRuntimeAttribute + * @param {Object} attr The attribute object + * @private + */ + setRuntimeAttribute: function(attr) { + var start; + var end; + var attributes = this.attributes; + + this.runtimeAttributes[attr] = {}; + + var isset = function(prop) { + return (typeof prop !== 'undefined'); + }; + + if ( !isset(attributes[attr]['to']) && !isset(attributes[attr]['by']) ) { + return false; // note return; nothing to animate to + } + + start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr); + + // To beats by, per SMIL 2.1 spec + if ( isset(attributes[attr]['to']) ) { + end = attributes[attr]['to']; + } else if ( isset(attributes[attr]['by']) ) { + if (start.constructor == Array) { + end = []; + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + attributes[attr]['by'][i]; + } + } else { + end = start + attributes[attr]['by']; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + + // set units if needed + this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ? attributes[attr]['unit'] : this.getDefaultUnit(attr); + }, + + /** + * Constructor for Anim instance. + * @method init + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + init: function(el, attributes, duration, method) { + /** + * Whether or not the animation is running. + * @property isAnimated + * @private + * @type Boolean + */ + var isAnimated = false; + + /** + * A Date object that is created when the animation begins. + * @property startTime + * @private + * @type Date + */ + var startTime = null; + + /** + * The number of frames this animation was able to execute. + * @property actualFrames + * @private + * @type Int + */ + var actualFrames = 0; + + /** + * The element to be animated. + * @property el + * @private + * @type HTMLElement + */ + el = YAHOO.util.Dom.get(el); + + /** + * The collection of attributes to be animated. + * Each attribute must have at least a "to" or "by" defined in order to animate. + * If "to" is supplied, the animation will end with the attribute at that value. + * If "by" is supplied, the animation will end at that value plus its starting value. + * If both are supplied, "to" is used, and "by" is ignored. + * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values). + * @property attributes + * @type Object + */ + this.attributes = attributes || {}; + + /** + * The length of the animation. Defaults to "1" (second). + * @property duration + * @type Number + */ + this.duration = duration || 1; + + /** + * The method that will provide values to the attribute(s) during the animation. + * Defaults to "YAHOO.util.Easing.easeNone". + * @property method + * @type Function + */ + this.method = method || YAHOO.util.Easing.easeNone; + + /** + * Whether or not the duration should be treated as seconds. + * Defaults to true. + * @property useSeconds + * @type Boolean + */ + this.useSeconds = true; // default to seconds + + /** + * The location of the current animation on the timeline. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property currentFrame + * @type Int + */ + this.currentFrame = 0; + + /** + * The total number of frames to be executed. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property totalFrames + * @type Int + */ + this.totalFrames = YAHOO.util.AnimMgr.fps; + + + /** + * Returns a reference to the animated element. + * @method getEl + * @return {HTMLElement} + */ + this.getEl = function() { return el; }; + + /** + * Checks whether the element is currently animated. + * @method isAnimated + * @return {Boolean} current value of isAnimated. + */ + this.isAnimated = function() { + return isAnimated; + }; + + /** + * Returns the animation start time. + * @method getStartTime + * @return {Date} current value of startTime. + */ + this.getStartTime = function() { + return startTime; + }; + + this.runtimeAttributes = {}; + + + + /** + * Starts the animation by registering it with the animation manager. + * @method animate + */ + this.animate = function() { + if ( this.isAnimated() ) { + return false; + } + + this.currentFrame = 0; + + this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration; + + YAHOO.util.AnimMgr.registerElement(this); + }; + + /** + * Stops the animation. Normally called by AnimMgr when animation completes. + * @method stop + * @param {Boolean} finish (optional) If true, animation will jump to final frame. + */ + this.stop = function(finish) { + if (finish) { + this.currentFrame = this.totalFrames; + this._onTween.fire(); + } + YAHOO.util.AnimMgr.stop(this); + }; + + var onStart = function() { + this.onStart.fire(); + + this.runtimeAttributes = {}; + for (var attr in this.attributes) { + this.setRuntimeAttribute(attr); + } + + isAnimated = true; + actualFrames = 0; + startTime = new Date(); + }; + + /** + * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s). + * @private + */ + + var onTween = function() { + var data = { + duration: new Date() - this.getStartTime(), + currentFrame: this.currentFrame + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', currentFrame: ' + data.currentFrame + ); + }; + + this.onTween.fire(data); + + var runtimeAttributes = this.runtimeAttributes; + + for (var attr in runtimeAttributes) { + this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + } + + actualFrames += 1; + }; + + var onComplete = function() { + var actual_duration = (new Date() - startTime) / 1000 ; + + var data = { + duration: actual_duration, + frames: actualFrames, + fps: actualFrames / actual_duration + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', frames: ' + data.frames + + ', fps: ' + data.fps + ); + }; + + isAnimated = false; + actualFrames = 0; + this.onComplete.fire(data); + }; + + /** + * Custom event that fires after onStart, useful in subclassing + * @private + */ + this._onStart = new YAHOO.util.CustomEvent('_start', this, true); + + /** + * Custom event that fires when animation begins + * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction) + * @event onStart + */ + this.onStart = new YAHOO.util.CustomEvent('start', this); + + /** + * Custom event that fires between each frame + * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction) + * @event onTween + */ + this.onTween = new YAHOO.util.CustomEvent('tween', this); + + /** + * Custom event that fires after onTween + * @private + */ + this._onTween = new YAHOO.util.CustomEvent('_tween', this, true); + + /** + * Custom event that fires when animation ends + * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction) + * @event onComplete + */ + this.onComplete = new YAHOO.util.CustomEvent('complete', this); + /** + * Custom event that fires after onComplete + * @private + */ + this._onComplete = new YAHOO.util.CustomEvent('_complete', this, true); + + this._onStart.subscribe(onStart); + this._onTween.subscribe(onTween); + this._onComplete.subscribe(onComplete); + } +}; + +/** + * Handles animation queueing and threading. + * Used by Anim and subclasses. + * @class AnimMgr + * @namespace YAHOO.util + */ +YAHOO.util.AnimMgr = new function() { + /** + * Reference to the animation Interval. + * @property thread + * @private + * @type Int + */ + var thread = null; + + /** + * The current queue of registered animation objects. + * @property queue + * @private + * @type Array + */ + var queue = []; + + /** + * The number of active animations. + * @property tweenCount + * @private + * @type Int + */ + var tweenCount = 0; + + /** + * Base frame rate (frames per second). + * Arbitrarily high for better x-browser calibration (slower browsers drop more frames). + * @property fps + * @type Int + * + */ + this.fps = 1000; + + /** + * Interval delay in milliseconds, defaults to fastest possible. + * @property delay + * @type Int + * + */ + this.delay = 1; + + /** + * Adds an animation instance to the animation queue. + * All animation instances must be registered in order to animate. + * @method registerElement + * @param {object} tween The Anim instance to be be registered + */ + this.registerElement = function(tween) { + queue[queue.length] = tween; + tweenCount += 1; + tween._onStart.fire(); + this.start(); + }; + + /** + * removes an animation instance from the animation queue. + * All animation instances must be registered in order to animate. + * @method unRegister + * @param {object} tween The Anim instance to be be registered + * @param {Int} index The index of the Anim instance + * @private + */ + this.unRegister = function(tween, index) { + tween._onComplete.fire(); + index = index || getIndex(tween); + if (index != -1) { + queue.splice(index, 1); + } + + tweenCount -= 1; + if (tweenCount <= 0) { + this.stop(); + } + }; + + /** + * Starts the animation thread. + * Only one thread can run at a time. + * @method start + */ + this.start = function() { + if (thread === null) { + thread = setInterval(this.run, this.delay); + } + }; + + /** + * Stops the animation thread or a specific animation instance. + * @method stop + * @param {object} tween A specific Anim instance to stop (optional) + * If no instance given, Manager stops thread and all animations. + */ + this.stop = function(tween) { + if (!tween) { + clearInterval(thread); + + for (var i = 0, len = queue.length; i < len; ++i) { + if ( queue[0].isAnimated() ) { + this.unRegister(queue[0], 0); + } + } + + queue = []; + thread = null; + tweenCount = 0; + } + else { + this.unRegister(tween); + } + }; + + /** + * Called per Interval to handle each animation frame. + * @method run + */ + this.run = function() { + for (var i = 0, len = queue.length; i < len; ++i) { + var tween = queue[i]; + if ( !tween || !tween.isAnimated() ) { continue; } + + if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null) + { + tween.currentFrame += 1; + + if (tween.useSeconds) { + correctFrame(tween); + } + tween._onTween.fire(); + } + else { YAHOO.util.AnimMgr.stop(tween, i); } + } + }; + + var getIndex = function(anim) { + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[i] == anim) { + return i; // note return; + } + } + return -1; + }; + + /** + * On the fly frame correction to keep animation on time. + * @method correctFrame + * @private + * @param {Object} tween The Anim instance being corrected. + */ + var correctFrame = function(tween) { + var frames = tween.totalFrames; + var frame = tween.currentFrame; + var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames); + var elapsed = (new Date() - tween.getStartTime()); + var tweak = 0; + + if (elapsed < tween.duration * 1000) { // check if falling behind + tweak = Math.round((elapsed / expected - 1) * tween.currentFrame); + } else { // went over duration, so jump to end + tweak = frames - (frame + 1); + } + if (tweak > 0 && isFinite(tweak)) { // adjust if needed + if (tween.currentFrame + tweak >= frames) {// dont go past last frame + tweak = frames - (frame + 1); + } + + tween.currentFrame += tweak; + } + }; +}; +/** + * Used to calculate Bezier splines for any number of control points. + * @class Bezier + * @namespace YAHOO.util + * + */ +YAHOO.util.Bezier = new function() { + /** + * Get the current position of the animated element based on t. + * Each point is an array of "x" and "y" values (0 = x, 1 = y) + * At least 2 points are required (start and end). + * First point is start. Last point is end. + * Additional control points are optional. + * @method getPosition + * @param {Array} points An array containing Bezier points + * @param {Number} t A number between 0 and 1 which is the basis for determining current position + * @return {Array} An array containing int x and y member data + */ + this.getPosition = function(points, t) { + var n = points.length; + var tmp = []; + + for (var i = 0; i < n; ++i){ + tmp[i] = [points[i][0], points[i][1]]; // save input + } + + for (var j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; +}; +(function() { +/** + * Anim subclass for color transitions. + *

        Usage: var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut); Color values can be specified with either 112233, #112233, + * [255,255,255], or rgb(255,255,255)

        + * @class ColorAnim + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @constructor + * @extends YAHOO.util.Anim + * @param {HTMLElement | String} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + YAHOO.util.ColorAnim = function(el, attributes, duration, method) { + YAHOO.util.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + YAHOO.extend(YAHOO.util.ColorAnim, YAHOO.util.Anim); + + // shorthand + var Y = YAHOO.util; + var superclass = Y.ColorAnim.superclass; + var proto = Y.ColorAnim.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("ColorAnim " + id); + }; + + proto.patterns.color = /color$/i; + proto.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i; + proto.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i; + proto.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i; + proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; // need rgba for safari + + /** + * Attempts to parse the given string and return a 3-tuple. + * @method parseColor + * @param {String} s The string to parse. + * @return {Array} The 3-tuple of rgb values. + */ + proto.parseColor = function(s) { + if (s.length == 3) { return s; } + + var c = this.patterns.hex.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ]; + } + + c = this.patterns.rgb.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ]; + } + + c = this.patterns.hex3.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ]; + } + + return null; + }; + + proto.getAttribute = function(attr) { + var el = this.getEl(); + if ( this.patterns.color.test(attr) ) { + var val = YAHOO.util.Dom.getStyle(el, attr); + + if (this.patterns.transparent.test(val)) { // bgcolor default + var parent = el.parentNode; // try and get from an ancestor + val = Y.Dom.getStyle(parent, attr); + + while (parent && this.patterns.transparent.test(val)) { + parent = parent.parentNode; + val = Y.Dom.getStyle(parent, attr); + if (parent.tagName.toUpperCase() == 'HTML') { + val = '#fff'; + } + } + } + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val; + + if ( this.patterns.color.test(attr) ) { + val = []; + for (var i = 0, len = start.length; i < len; ++i) { + val[i] = superclass.doMethod.call(this, attr, start[i], end[i]); + } + + val = 'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')'; + } + else { + val = superclass.doMethod.call(this, attr, start, end); + } + + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + superclass.setRuntimeAttribute.call(this, attr); + + if ( this.patterns.color.test(attr) ) { + var attributes = this.attributes; + var start = this.parseColor(this.runtimeAttributes[attr].start); + var end = this.parseColor(this.runtimeAttributes[attr].end); + // fix colors if going "by" + if ( typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined' ) { + end = this.parseColor(attributes[attr].by); + + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + end[i]; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + } + }; +})(); +/* +TERMS OF USE - EASING EQUATIONS +Open source under the BSD License. +Copyright 2001 Robert Penner All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * Singleton that determines how an animation proceeds from start to end. + * @class Easing + * @namespace YAHOO.util +*/ + +YAHOO.util.Easing = { + + /** + * Uniform speed between points. + * @method easeNone + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeNone: function (t, b, c, d) { + return c*t/d + b; + }, + + /** + * Begins slowly and accelerates towards end. (quadratic) + * @method easeIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeIn: function (t, b, c, d) { + return c*(t/=d)*t + b; + }, + + /** + * Begins quickly and decelerates towards end. (quadratic) + * @method easeOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOut: function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + + /** + * Begins slowly and decelerates towards end. (quadratic) + * @method easeBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBoth: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t + b; + } + + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + + /** + * Begins slowly and accelerates towards end. (quartic) + * @method easeInStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeInStrong: function (t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + + /** + * Begins quickly and decelerates towards end. (quartic) + * @method easeOutStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOutStrong: function (t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + + /** + * Begins slowly and decelerates towards end. (quartic) + * @method easeBothStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBothStrong: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t*t*t + b; + } + + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + + /** + * Snap in elastic effect. + * @method elasticIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + + elasticIn: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + + /** + * Snap out elastic effect. + * @method elasticOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticOut: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p / 4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + + /** + * Snap both elastic effect. + * @method elasticBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticBoth: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + + if ( (t /= d/2) == 2 ) { + return b+c; + } + + if (!p) { + p = d*(.3*1.5); + } + + if ( !a || a < Math.abs(c) ) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + if (t < 1) { + return -.5*(a*Math.pow(2,10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + } + return a*Math.pow(2,-10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + + + /** + * Backtracks slightly, then reverses direction and moves to end. + * @method backIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backIn: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + + /** + * Overshoots end, then reverses and comes back to end. + * @method backOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backOut: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + + /** + * Backtracks slightly, then reverses direction, overshoots end, + * then reverses and comes back to end. + * @method backBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backBoth: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + + if ((t /= d/2 ) < 1) { + return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + } + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + + /** + * Bounce off of start. + * @method bounceIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceIn: function (t, b, c, d) { + return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b; + }, + + /** + * Bounces off end. + * @method bounceOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceOut: function (t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + }, + + /** + * Bounces off start and end. + * @method bounceBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceBoth: function (t, b, c, d) { + if (t < d/2) { + return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b; + } + return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}; + +(function() { +/** + * Anim subclass for moving elements along a path defined by the "points" + * member of "attributes". All "points" are arrays with x, y coordinates. + *

        Usage: var myAnim = new YAHOO.util.Motion(el, { points: { to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);

        + * @class Motion + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @extends YAHOO.util.Anim + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + YAHOO.util.Motion = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + YAHOO.util.Motion.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + YAHOO.extend(YAHOO.util.Motion, YAHOO.util.ColorAnim); + + // shorthand + var Y = YAHOO.util; + var superclass = Y.Motion.superclass; + var proto = Y.Motion.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Motion " + id); + }; + + proto.patterns.points = /^points$/i; + + proto.setAttribute = function(attr, val, unit) { + if ( this.patterns.points.test(attr) ) { + unit = unit || 'px'; + superclass.setAttribute.call(this, 'left', val[0], unit); + superclass.setAttribute.call(this, 'top', val[1], unit); + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; + + proto.getAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var val = [ + superclass.getAttribute.call(this, 'left'), + superclass.getAttribute.call(this, 'top') + ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if ( this.patterns.points.test(attr) ) { + var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100; + val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t); + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var el = this.getEl(); + var attributes = this.attributes; + var start; + var control = attributes['points']['control'] || []; + var end; + var i, len; + + if (control.length > 0 && !(control[0] instanceof Array) ) { // could be single point or array of points + control = [control]; + } else { // break reference to attributes.points.control + var tmp = []; + for (i = 0, len = control.length; i< len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + } + + if (Y.Dom.getStyle(el, 'position') == 'static') { // default to relative + Y.Dom.setStyle(el, 'position', 'relative'); + } + + if ( isset(attributes['points']['from']) ) { + Y.Dom.setXY(el, attributes['points']['from']); // set position to from point + } + else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to current position + + start = this.getAttribute('points'); // get actual top & left + + // TO beats BY, per SMIL 2.1 spec + if ( isset(attributes['points']['to']) ) { + end = translateValues.call(this, attributes['points']['to'], start); + + var pageXY = Y.Dom.getXY(this.getEl()); + for (i = 0, len = control.length; i < len; ++i) { + control[i] = translateValues.call(this, control[i], start); + } + + + } else if ( isset(attributes['points']['by']) ) { + end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ]; + + for (i = 0, len = control.length; i < len; ++i) { + control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; + } + } + + this.runtimeAttributes[attr] = [start]; + + if (control.length > 0) { + this.runtimeAttributes[attr] = this.runtimeAttributes[attr].concat(control); + } + + this.runtimeAttributes[attr][this.runtimeAttributes[attr].length] = end; + } + else { + superclass.setRuntimeAttribute.call(this, attr); + } + }; + + var translateValues = function(val, start) { + var pageXY = Y.Dom.getXY(this.getEl()); + val = [ val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1] ]; + + return val; + }; + + var isset = function(prop) { + return (typeof prop !== 'undefined'); + }; +})(); +(function() { +/** + * Anim subclass for scrolling elements to a position defined by the "scroll" + * member of "attributes". All "scroll" members are arrays with x, y scroll positions. + *

        Usage: var myAnim = new YAHOO.util.Scroll(el, { scroll: { to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);

        + * @class Scroll + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @extends YAHOO.util.Anim + * @constructor + * @param {String or HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + YAHOO.util.Scroll = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + YAHOO.util.Scroll.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + YAHOO.extend(YAHOO.util.Scroll, YAHOO.util.ColorAnim); + + // shorthand + var Y = YAHOO.util; + var superclass = Y.Scroll.superclass; + var proto = Y.Scroll.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Scroll " + id); + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if (attr == 'scroll') { + val = [ + this.method(this.currentFrame, start[0], end[0] - start[0], this.totalFrames), + this.method(this.currentFrame, start[1], end[1] - start[1], this.totalFrames) + ]; + + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.getAttribute = function(attr) { + var val = null; + var el = this.getEl(); + + if (attr == 'scroll') { + val = [ el.scrollLeft, el.scrollTop ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.setAttribute = function(attr, val, unit) { + var el = this.getEl(); + + if (attr == 'scroll') { + el.scrollLeft = val[0]; + el.scrollTop = val[1]; + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; +})(); +YAHOO.register("animation", YAHOO.util.Anim, {version: "2.2.0", build: "127"}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/connection.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/connection.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/connection.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,1062 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* +Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.2.0 +*/ +/** + * The Connection Manager provides a simplified interface to the XMLHttpRequest + * object. It handles cross-browser instantiantion of XMLHttpRequest, negotiates the + * interactive states and server response, returning the results to a pre-defined + * callback you create. + * + * @namespace YAHOO.util + * @module connection + * @requires yahoo + */ + +/** + * The Connection Manager singleton provides methods for creating and managing + * asynchronous transactions. + * + * @class Connect + */ + +YAHOO.util.Connect = +{ + /** + * @description Array of MSFT ActiveX ids for XMLHttpRequest. + * @property _msxml_progid + * @private + * @static + * @type array + */ + _msxml_progid:[ + 'MSXML2.XMLHTTP.3.0', + 'MSXML2.XMLHTTP', + 'Microsoft.XMLHTTP' + ], + + /** + * @description Object literal of HTTP header(s) + * @property _http_header + * @private + * @static + * @type object + */ + _http_headers:{}, + + /** + * @description Determines if HTTP headers are set. + * @property _has_http_headers + * @private + * @static + * @type boolean + */ + _has_http_headers:false, + + /** + * @description Determines if a default header of + * Content-Type of 'application/x-www-form-urlencoded' + * will be added to any client HTTP headers sent for POST + * transactions. + * @property _use_default_post_header + * @private + * @static + * @type boolean + */ + _use_default_post_header:true, + + /** + * @description Determines if a default header of + * Content-Type of 'application/x-www-form-urlencoded' + * will be added to client HTTP headers sent for POST + * transactions. + * @property _default_post_header + * @private + * @static + * @type boolean + */ + _default_post_header:'application/x-www-form-urlencoded', + + /** + * @description Determines if a default header of + * 'X-Requested-With: XMLHttpRequest' + * will be added to each transaction. + * @property _use_default_xhr_header + * @private + * @static + * @type boolean + */ + _use_default_xhr_header:true, + + /** + * @description The default header value for the label + * "X-Requested-With". This is sent with each + * transaction, by default, to identify the + * request as being made by YUI Connection Manager. + * @property _default_xhr_header + * @private + * @static + * @type boolean + */ + _default_xhr_header:'XMLHttpRequest', + + /** + * @description Determines if custom, default headers + * are set for each transaction. + * @property _has_default_header + * @private + * @static + * @type boolean + */ + _has_default_headers:true, + + /** + * @description Determines if custom, default headers + * are set for each transaction. + * @property _has_default_header + * @private + * @static + * @type boolean + */ + _default_headers:{}, + + /** + * @description Property modified by setForm() to determine if the data + * should be submitted as an HTML form. + * @property _isFormSubmit + * @private + * @static + * @type boolean + */ + _isFormSubmit:false, + + /** + * @description Property modified by setForm() to determine if a file(s) + * upload is expected. + * @property _isFileUpload + * @private + * @static + * @type boolean + */ + _isFileUpload:false, + + /** + * @description Property modified by setForm() to set a reference to the HTML + * form node if the desired action is file upload. + * @property _formNode + * @private + * @static + * @type object + */ + _formNode:null, + + /** + * @description Property modified by setForm() to set the HTML form data + * for each transaction. + * @property _sFormData + * @private + * @static + * @type string + */ + _sFormData:null, + + /** + * @description Collection of polling references to the polling mechanism in handleReadyState. + * @property _poll + * @private + * @static + * @type object + */ + _poll:{}, + + /** + * @description Queue of timeout values for each transaction callback with a defined timeout value. + * @property _timeOut + * @private + * @static + * @type object + */ + _timeOut:{}, + + /** + * @description The polling frequency, in milliseconds, for HandleReadyState. + * when attempting to determine a transaction's XHR readyState. + * The default is 50 milliseconds. + * @property _polling_interval + * @private + * @static + * @type int + */ + _polling_interval:50, + + /** + * @description A transaction counter that increments the transaction id for each transaction. + * @property _transaction_id + * @private + * @static + * @type int + */ + _transaction_id:0, + + /** + * @description Member to add an ActiveX id to the existing xml_progid array. + * In the event(unlikely) a new ActiveX id is introduced, it can be added + * without internal code modifications. + * @method setProgId + * @public + * @static + * @param {string} id The ActiveX id to be added to initialize the XHR object. + * @return void + */ + setProgId:function(id) + { + this._msxml_progid.unshift(id); + }, + + /** + * @description Member to enable or disable the default POST header. + * @method setDefaultPostHeader + * @public + * @static + * @param {boolean} b Set and use default header - true or false . + * @return void + */ + setDefaultPostHeader:function(b) + { + this._use_default_post_header = b; + }, + + /** + * @description Member to enable or disable the default POST header. + * @method setDefaultXhrHeader + * @public + * @static + * @param {boolean} b Set and use default header - true or false . + * @return void + */ + setDefaultXhrHeader:function(b) + { + this._use_default_xhr_header = b; + }, + + /** + * @description Member to modify the default polling interval. + * @method setPollingInterval + * @public + * @static + * @param {int} i The polling interval in milliseconds. + * @return void + */ + setPollingInterval:function(i) + { + if(typeof i == 'number' && isFinite(i)){ + this._polling_interval = i; + } + }, + + /** + * @description Instantiates a XMLHttpRequest object and returns an object with two properties: + * the XMLHttpRequest instance and the transaction id. + * @method createXhrObject + * @private + * @static + * @param {int} transactionId Property containing the transaction id for this transaction. + * @return object + */ + createXhrObject:function(transactionId) + { + var obj,http; + try + { + // Instantiates XMLHttpRequest in non-IE browsers and assigns to http. + http = new XMLHttpRequest(); + // Object literal with http and tId properties + obj = { conn:http, tId:transactionId }; + } + catch(e) + { + for(var i=0; i= 200 && httpStatus < 300){ + responseObject = this.createResponseObject(o, callback.argument); + if(callback.success){ + if(!callback.scope){ + callback.success(responseObject); + } + else{ + // If a scope property is defined, the callback will be fired from + // the context of the object. + callback.success.apply(callback.scope, [responseObject]); + } + } + } + else{ + switch(httpStatus){ + // The following cases are wininet.dll error codes that may be encountered. + case 12002: // Server timeout + case 12029: // 12029 to 12031 correspond to dropped connections. + case 12030: + case 12031: + case 12152: // Connection closed by server. + case 13030: // See above comments for variable status. + responseObject = this.createExceptionObject(o.tId, callback.argument, (isAbort?isAbort:false)); + if(callback.failure){ + if(!callback.scope){ + callback.failure(responseObject); + } + else{ + callback.failure.apply(callback.scope, [responseObject]); + } + } + break; + default: + responseObject = this.createResponseObject(o, callback.argument); + if(callback.failure){ + if(!callback.scope){ + callback.failure(responseObject); + } + else{ + callback.failure.apply(callback.scope, [responseObject]); + } + } + } + } + + this.releaseObject(o); + responseObject = null; + }, + + /** + * @description This method evaluates the server response, creates and returns the results via + * its properties. Success and failure cases will differ in the response + * object's property values. + * @method createResponseObject + * @private + * @static + * @param {object} o The connection object + * @param {callbackArg} callbackArg The user-defined argument or arguments to be passed to the callback + * @return {object} + */ + createResponseObject:function(o, callbackArg) + { + var obj = {}; + var headerObj = {}; + + try + { + var headerStr = o.conn.getAllResponseHeaders(); + var header = headerStr.split('\n'); + for(var i=0; i'); + + // IE will throw a security exception in an SSL environment if the + // iframe source is undefined. + if(typeof secureUri == 'boolean'){ + io.src = 'javascript:false'; + } + else if(typeof secureURI == 'string'){ + // Deprecated + io.src = secureUri; + } + } + else{ + var io = document.createElement('iframe'); + io.id = frameId; + io.name = frameId; + } + + io.style.position = 'absolute'; + io.style.top = '-1000px'; + io.style.left = '-1000px'; + + document.body.appendChild(io); + }, + + /** + * @description Parses the POST data and creates hidden form elements + * for each key-value, and appends them to the HTML form object. + * @method appendPostData + * @private + * @static + * @param {string} postData The HTTP POST data + * @return {array} formElements Collection of hidden fields. + */ + appendPostData:function(postData) + { + var formElements = []; + var postMessage = postData.split('&'); + for(var i=0; i < postMessage.length; i++){ + var delimitPos = postMessage[i].indexOf('='); + if(delimitPos != -1){ + formElements[i] = document.createElement('input'); + formElements[i].type = 'hidden'; + formElements[i].name = postMessage[i].substring(0,delimitPos); + formElements[i].value = postMessage[i].substring(delimitPos+1); + this._formNode.appendChild(formElements[i]); + } + } + + return formElements; + }, + + /** + * @description Uploads HTML form, including files/attachments, to the + * iframe created in createFrame. + * @method uploadFile + * @private + * @static + * @param {int} id The transaction id. + * @param {object} callback - User-defined callback object. + * @param {string} uri Fully qualified path of resource. + * @return {void} + */ + uploadFile:function(id, callback, uri, postData){ + + // Each iframe has an id prefix of "yuiIO" followed + // by the unique transaction id. + var frameId = 'yuiIO' + id; + var uploadEncoding = 'multipart/form-data'; + var io = document.getElementById(frameId); + + // Initialize the HTML form properties in case they are + // not defined in the HTML form. + this._formNode.action = uri; + this._formNode.method = 'POST'; + this._formNode.target = frameId; + + if(this._formNode.encoding){ + // IE does not respect property enctype for HTML forms. + // Instead it uses the property - "encoding". + this._formNode.encoding = uploadEncoding; + } + else{ + this._formNode.enctype = uploadEncoding; + } + + + if(postData){ + var oElements = this.appendPostData(postData); + } + + this._formNode.submit(); + + if(oElements && oElements.length > 0){ + for(var i=0; i < oElements.length; i++){ + this._formNode.removeChild(oElements[i]); + } + } + + // Reset HTML form status properties. + this.resetFormState(); + + // Create the upload callback handler that fires when the iframe + // receives the load event. Subsequently, the event handler is detached + // and the iframe removed from the document. + + var uploadCallback = function() + { + var obj = {}; + obj.tId = id; + obj.argument = callback.argument; + + try + { + obj.responseText = io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null; + obj.responseXML = io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document; + } + catch(e){} + + if(callback && callback.upload){ + if(!callback.scope){ + callback.upload(obj); + } + else{ + callback.upload.apply(callback.scope, [obj]); + } + } + + if(YAHOO.util.Event){ + YAHOO.util.Event.removeListener(io, "load", uploadCallback); + } + else if(window.detachEvent){ + io.detachEvent('onload', uploadCallback); + } + else{ + io.removeEventListener('load', uploadCallback, false); + } + setTimeout( + function(){ + document.body.removeChild(io); + }, 100); + }; + + + // Bind the onload handler to the iframe to detect the file upload response. + if(YAHOO.util.Event){ + YAHOO.util.Event.addListener(io, "load", uploadCallback); + } + else if(window.attachEvent){ + io.attachEvent('onload', uploadCallback); + } + else{ + io.addEventListener('load', uploadCallback, false); + } + }, + + /** + * @description Method to terminate a transaction, if it has not reached readyState 4. + * @method abort + * @public + * @static + * @param {object} o The connection object returned by asyncRequest. + * @param {object} callback User-defined callback object. + * @param {string} isTimeout boolean to indicate if abort was a timeout. + * @return {boolean} + */ + abort:function(o, callback, isTimeout) + { + if(this.isCallInProgress(o)){ + o.conn.abort(); + window.clearInterval(this._poll[o.tId]); + delete this._poll[o.tId]; + if(isTimeout){ + delete this._timeOut[o.tId]; + } + + this.handleTransactionResponse(o, callback, true); + + return true; + } + else{ + return false; + } + }, + + /** + * Public method to check if the transaction is still being processed. + * + * @method isCallInProgress + * @public + * @static + * @param {object} o The connection object returned by asyncRequest + * @return {boolean} + */ + isCallInProgress:function(o) + { + // if the XHR object assigned to the transaction has not been dereferenced, + // then check its readyState status. Otherwise, return false. + if(o.conn){ + return o.conn.readyState != 4 && o.conn.readyState != 0; + } + else{ + //The XHR object has been destroyed. + return false; + } + }, + + /** + * @description Dereference the XHR instance and the connection object after the transaction is completed. + * @method releaseObject + * @private + * @static + * @param {object} o The connection object + * @return {void} + */ + releaseObject:function(o) + { + //dereference the XHR instance. + o.conn = null; + //dereference the connection object. + o = null; + } +}; +YAHOO.register("connection", YAHOO.widget.Module, {version: "2.2.0", build: "127"}); \ No newline at end of file Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/dom.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/dom.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/dom.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,909 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* +Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.2.0 +*/ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +*/ + +/** + * The dom module provides helper methods for manipulating Dom elements. + * @module dom + * + */ + +(function() { + var Y = YAHOO.util, // internal shorthand + getStyle, // for load time browser branching + setStyle, // ditto + id_counter = 0, // for use with generateId + propertyCache = {}; // for faster hyphen converts + + // brower detection + var ua = navigator.userAgent.toLowerCase(), + isOpera = (ua.indexOf('opera') > -1), + isSafari = (ua.indexOf('safari') > -1), + isGecko = (!isOpera && !isSafari && ua.indexOf('gecko') > -1), + isIE = (!isOpera && ua.indexOf('msie') > -1); + + // regex cache + var patterns = { + HYPHEN: /(-[a-z])/i + }; + + + var toCamel = function(property) { + if ( !patterns.HYPHEN.test(property) ) { + return property; // no hyphens + } + + if (propertyCache[property]) { // already converted + return propertyCache[property]; + } + + while( patterns.HYPHEN.exec(property) ) { + property = property.replace(RegExp.$1, + RegExp.$1.substr(1).toUpperCase()); + } + + propertyCache[property] = property; + return property; + //return property.replace(/-([a-z])/gi, function(m0, m1) {return m1.toUpperCase()}) // cant use function as 2nd arg yet due to safari bug + }; + + // branching at load instead of runtime + if (document.defaultView && document.defaultView.getComputedStyle) { // W3C DOM method + getStyle = function(el, property) { + var value = null; + + var computed = document.defaultView.getComputedStyle(el, ''); + if (computed) { // test computed before touching for safari + value = computed[toCamel(property)]; + } + + return el.style[property] || value; + }; + } else if (document.documentElement.currentStyle && isIE) { // IE method + getStyle = function(el, property) { + switch( toCamel(property) ) { + case 'opacity' :// IE opacity uses filter + var val = 100; + try { // will error if no DXImageTransform + val = el.filters['DXImageTransform.Microsoft.Alpha'].opacity; + + } catch(e) { + try { // make sure its in the document + val = el.filters('alpha').opacity; + } catch(e) { + } + } + return val / 100; + break; + default: + // test currentStyle before touching + var value = el.currentStyle ? el.currentStyle[property] : null; + return ( el.style[property] || value ); + } + }; + } else { // default to inline only + getStyle = function(el, property) { return el.style[property]; }; + } + + if (isIE) { + setStyle = function(el, property, val) { + switch (property) { + case 'opacity': + if ( typeof el.style.filter == 'string' ) { // in case not appended + el.style.filter = 'alpha(opacity=' + val * 100 + ')'; + + if (!el.currentStyle || !el.currentStyle.hasLayout) { + el.style.zoom = 1; // when no layout or cant tell + } + } + break; + default: + el.style[property] = val; + } + }; + } else { + setStyle = function(el, property, val) { + el.style[property] = val; + }; + } + + /** + * Provides helper methods for DOM elements. + * @namespace YAHOO.util + * @class Dom + */ + YAHOO.util.Dom = { + /** + * Returns an HTMLElement reference. + * @method get + * @param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements. + * @return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements. + */ + get: function(el) { + if (!el) { return null; } // nothing to work with + + if (typeof el != 'string' && !(el instanceof Array) ) { // assuming HTMLElement or HTMLCollection, so pass back as is + return el; + } + + if (typeof el == 'string') { // ID + return document.getElementById(el); + } + else { // array of ID's and/or elements + var collection = []; + for (var i = 0, len = el.length; i < len; ++i) { + collection[collection.length] = Y.Dom.get(el[i]); + } + + return collection; + } + + return null; // safety, should never happen + }, + + /** + * Normalizes currentStyle and ComputedStyle. + * @method getStyle + * @param {String | HTMLElement |Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements. + * @param {String} property The style property whose value is returned. + * @return {String | Array} The current value of the style property for the element(s). + */ + getStyle: function(el, property) { + property = toCamel(property); + + var f = function(element) { + return getStyle(element, property); + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Wrapper for setting style properties of HTMLElements. Normalizes "opacity" across modern browsers. + * @method setStyle + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements. + * @param {String} property The style property to be set. + * @param {String} val The value to apply to the given property. + */ + setStyle: function(el, property, val) { + property = toCamel(property); + + var f = function(element) { + setStyle(element, property, val); + + }; + + Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Gets the current position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method getXY + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements + * @return {Array} The XY position of the element(s) + */ + getXY: function(el) { + var f = function(el) { + + // has to be part of document to have pageXY + if (el.parentNode === null || el.offsetParent === null || + this.getStyle(el, 'display') == 'none') { + return false; + } + + var parentNode = null; + var pos = []; + var box; + + if (el.getBoundingClientRect) { // IE + box = el.getBoundingClientRect(); + var doc = document; + if ( !this.inDocument(el) && parent.document != document) {// might be in a frame, need to get its scroll + doc = parent.document; + + if ( !this.isAncestor(doc.documentElement, el) ) { + return false; + } + + } + + var scrollTop = Math.max(doc.documentElement.scrollTop, doc.body.scrollTop); + var scrollLeft = Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft); + + return [box.left + scrollLeft, box.top + scrollTop]; + } + else { // safari, opera, & gecko + pos = [el.offsetLeft, el.offsetTop]; + parentNode = el.offsetParent; + if (parentNode != el) { + while (parentNode) { + pos[0] += parentNode.offsetLeft; + pos[1] += parentNode.offsetTop; + parentNode = parentNode.offsetParent; + } + } + if (isSafari && this.getStyle(el, 'position') == 'absolute' ) { // safari doubles in some cases + pos[0] -= document.body.offsetLeft; + pos[1] -= document.body.offsetTop; + } + } + + if (el.parentNode) { parentNode = el.parentNode; } + else { parentNode = null; } + + while (parentNode && parentNode.tagName.toUpperCase() != 'BODY' && parentNode.tagName.toUpperCase() != 'HTML') + { // account for any scrolled ancestors + if (Y.Dom.getStyle(parentNode, 'display') != 'inline') { // work around opera inline scrollLeft/Top bug + pos[0] -= parentNode.scrollLeft; + pos[1] -= parentNode.scrollTop; + } + + if (parentNode.parentNode) { + parentNode = parentNode.parentNode; + } else { parentNode = null; } + } + + + return pos; + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Gets the current X position of an element based on page coordinates. The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method getX + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements + * @return {String | Array} The X position of the element(s) + */ + getX: function(el) { + var f = function(el) { + return Y.Dom.getXY(el)[0]; + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Gets the current Y position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method getY + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements + * @return {String | Array} The Y position of the element(s) + */ + getY: function(el) { + var f = function(el) { + return Y.Dom.getXY(el)[1]; + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Set the position of an html element in page coordinates, regardless of how the element is positioned. + * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method setXY + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements + * @param {Array} pos Contains X & Y values for new position (coordinates are page-based) + * @param {Boolean} noRetry By default we try and set the position a second time if the first fails + */ + setXY: function(el, pos, noRetry) { + var f = function(el) { + var style_pos = this.getStyle(el, 'position'); + if (style_pos == 'static') { // default to relative + this.setStyle(el, 'position', 'relative'); + style_pos = 'relative'; + } + + var pageXY = this.getXY(el); + if (pageXY === false) { // has to be part of doc to have pageXY + return false; + } + + var delta = [ // assuming pixels; if not we will have to retry + parseInt( this.getStyle(el, 'left'), 10 ), + parseInt( this.getStyle(el, 'top'), 10 ) + ]; + + if ( isNaN(delta[0]) ) {// in case of 'auto' + delta[0] = (style_pos == 'relative') ? 0 : el.offsetLeft; + } + if ( isNaN(delta[1]) ) { // in case of 'auto' + delta[1] = (style_pos == 'relative') ? 0 : el.offsetTop; + } + + if (pos[0] !== null) { el.style.left = pos[0] - pageXY[0] + delta[0] + 'px'; } + if (pos[1] !== null) { el.style.top = pos[1] - pageXY[1] + delta[1] + 'px'; } + + if (!noRetry) { + var newXY = this.getXY(el); + + // if retry is true, try one more time if we miss + if ( (pos[0] !== null && newXY[0] != pos[0]) || + (pos[1] !== null && newXY[1] != pos[1]) ) { + this.setXY(el, pos, true); + } + } + + }; + + Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Set the X position of an html element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method setX + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements. + * @param {Int} x The value to use as the X coordinate for the element(s). + */ + setX: function(el, x) { + Y.Dom.setXY(el, [x, null]); + }, + + /** + * Set the Y position of an html element in page coordinates, regardless of how the element is positioned. + * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false). + * @method setY + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements. + * @param {Int} x To use as the Y coordinate for the element(s). + */ + setY: function(el, y) { + Y.Dom.setXY(el, [null, y]); + }, + + /** + * Returns the region position of the given element. + * The element must be part of the DOM tree to have a region (display:none or elements not appended return false). + * @method getRegion + * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements. + * @return {Region | Array} A Region or array of Region instances containing "top, left, bottom, right" member data. + */ + getRegion: function(el) { + var f = function(el) { + var region = new Y.Region.getRegion(el); + return region; + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Returns the width of the client (viewport). + * @method getClientWidth + * @deprecated Now using getViewportWidth. This interface left intact for back compat. + * @return {Int} The width of the viewable area of the page. + */ + getClientWidth: function() { + return Y.Dom.getViewportWidth(); + }, + + /** + * Returns the height of the client (viewport). + * @method getClientHeight + * @deprecated Now using getViewportHeight. This interface left intact for back compat. + * @return {Int} The height of the viewable area of the page. + */ + getClientHeight: function() { + return Y.Dom.getViewportHeight(); + }, + + /** + * Returns a array of HTMLElements with the given class. + * For optimized performance, include a tag and/or root node when possible. + * @method getElementsByClassName + * @param {String} className The class name to match against + * @param {String} tag (optional) The tag name of the elements being collected + * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point + * @return {Array} An array of elements that have the given class name + */ + getElementsByClassName: function(className, tag, root) { + var method = function(el) { return Y.Dom.hasClass(el, className); }; + return Y.Dom.getElementsBy(method, tag, root); + }, + + /** + * Determines whether an HTMLElement has the given className. + * @method hasClass + * @param {String | HTMLElement | Array} el The element or collection to test + * @param {String} className the class name to search for + * @return {Boolean | Array} A boolean value or array of boolean values + */ + hasClass: function(el, className) { + var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)'); + + var f = function(el) { + return re.test(el['className']); + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Adds a class name to a given element or collection of elements. + * @method addClass + * @param {String | HTMLElement | Array} el The element or collection to add the class to + * @param {String} className the class name to add to the class attribute + */ + addClass: function(el, className) { + var f = function(el) { + if (this.hasClass(el, className)) { return; } // already present + + + el['className'] = [el['className'], className].join(' '); + }; + + Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Removes a class name from a given element or collection of elements. + * @method removeClass + * @param {String | HTMLElement | Array} el The element or collection to remove the class from + * @param {String} className the class name to remove from the class attribute + */ + removeClass: function(el, className) { + var re = new RegExp('(?:^|\\s+)' + className + '(?:\\s+|$)', 'g'); + + var f = function(el) { + if (!this.hasClass(el, className)) { return; } // not present + + + var c = el['className']; + el['className'] = c.replace(re, ' '); + if ( this.hasClass(el, className) ) { // in case of multiple adjacent + this.removeClass(el, className); + } + + }; + + Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Replace a class with another class for a given element or collection of elements. + * If no oldClassName is present, the newClassName is simply added. + * @method replaceClass + * @param {String | HTMLElement | Array} el The element or collection to remove the class from + * @param {String} oldClassName the class name to be replaced + * @param {String} newClassName the class name that will be replacing the old class name + */ + replaceClass: function(el, oldClassName, newClassName) { + if (oldClassName === newClassName) { // avoid infinite loop + return false; + } + + var re = new RegExp('(?:^|\\s+)' + oldClassName + '(?:\\s+|$)', 'g'); + + var f = function(el) { + + if ( !this.hasClass(el, oldClassName) ) { + this.addClass(el, newClassName); // just add it if nothing to replace + return; // note return + } + + el['className'] = el['className'].replace(re, ' ' + newClassName + ' '); + + if ( this.hasClass(el, oldClassName) ) { // in case of multiple adjacent + this.replaceClass(el, oldClassName, newClassName); + } + }; + + Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Generates a unique ID + * @method generateId + * @param {String | HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present). + * @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen"). + * @return {String | Array} The generated ID, or array of generated IDs (or original ID if already present on an element) + */ + generateId: function(el, prefix) { + prefix = prefix || 'yui-gen'; + el = el || {}; + + var f = function(el) { + if (el) { + el = Y.Dom.get(el); + } else { + el = {}; // just generating ID in this case + } + + if (!el.id) { + el.id = prefix + id_counter++; + } // dont override existing + + + return el.id; + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy. + * @method isAncestor + * @param {String | HTMLElement} haystack The possible ancestor + * @param {String | HTMLElement} needle The possible descendent + * @return {Boolean} Whether or not the haystack is an ancestor of needle + */ + isAncestor: function(haystack, needle) { + haystack = Y.Dom.get(haystack); + if (!haystack || !needle) { return false; } + + var f = function(needle) { + if (haystack.contains && !isSafari) { // safari "contains" is broken + return haystack.contains(needle); + } + else if ( haystack.compareDocumentPosition ) { + return !!(haystack.compareDocumentPosition(needle) & 16); + } + else { // loop up and test each parent + var parent = needle.parentNode; + + while (parent) { + if (parent == haystack) { + return true; + } + else if (!parent.tagName || parent.tagName.toUpperCase() == 'HTML') { + return false; + } + + parent = parent.parentNode; + } + return false; + } + }; + + return Y.Dom.batch(needle, f, Y.Dom, true); + }, + + /** + * Determines whether an HTMLElement is present in the current document. + * @method inDocument + * @param {String | HTMLElement} el The element to search for + * @return {Boolean} Whether or not the element is present in the current document + */ + inDocument: function(el) { + var f = function(el) { + return this.isAncestor(document.documentElement, el); + }; + + return Y.Dom.batch(el, f, Y.Dom, true); + }, + + /** + * Returns a array of HTMLElements that pass the test applied by supplied boolean method. + * For optimized performance, include a tag and/or root node when possible. + * @method getElementsBy + * @param {Function} method - A boolean method for testing elements which receives the element as its only argument. + + * @param {String} tag (optional) The tag name of the elements being collected + * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point + * @return {Array} Array of HTMLElements + */ + getElementsBy: function(method, tag, root) { + tag = tag || '*'; + + var nodes = []; + + if (root) { + root = Y.Dom.get(root); + if (!root) { // if no root node, then no children + return nodes; + } + } else { + root = document; + } + + var elements = root.getElementsByTagName(tag); + + if ( !elements.length && (tag == '*' && root.all) ) { + elements = root.all; // IE < 6 + } + + for (var i = 0, len = elements.length; i < len; ++i) { + if ( method(elements[i]) ) { nodes[nodes.length] = elements[i]; } + } + + + return nodes; + }, + + /** + * Returns an array of elements that have had the supplied method applied. + * The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) ). + * @method batch + * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method to + * @param {Function} method The method to apply to the element(s) + * @param {Any} o (optional) An optional arg that is passed to the supplied method + * @param {Boolean} override (optional) Whether or not to override the scope of "method" with "o" + * @return {HTMLElement | Array} The element(s) with the method applied + */ + batch: function(el, method, o, override) { + var id = el; + el = Y.Dom.get(el); + + var scope = (override) ? o : window; + + if (!el || el.tagName || !el.length) { // is null or not a collection (tagName for SELECT and others that can be both an element and a collection) + if (!el) { + return false; + } + return method.call(scope, el, o); + } + + var collection = []; + + for (var i = 0, len = el.length; i < len; ++i) { + if (!el[i]) { + id = el[i]; + } + collection[collection.length] = method.call(scope, el[i], o); + } + + return collection; + }, + + /** + * Returns the height of the document. + * @method getDocumentHeight + * @return {Int} The height of the actual document (which includes the body and its margin). + */ + getDocumentHeight: function() { + var scrollHeight = (document.compatMode != 'CSS1Compat') ? document.body.scrollHeight : document.documentElement.scrollHeight; + + var h = Math.max(scrollHeight, Y.Dom.getViewportHeight()); + return h; + }, + + /** + * Returns the width of the document. + * @method getDocumentWidth + * @return {Int} The width of the actual document (which includes the body and its margin). + */ + getDocumentWidth: function() { + var scrollWidth = (document.compatMode != 'CSS1Compat') ? document.body.scrollWidth : document.documentElement.scrollWidth; + var w = Math.max(scrollWidth, Y.Dom.getViewportWidth()); + return w; + }, + + /** + * Returns the current height of the viewport. + * @method getViewportHeight + * @return {Int} The height of the viewable area of the page (excludes scrollbars). + */ + getViewportHeight: function() { + var height = self.innerHeight; // Safari, Opera + var mode = document.compatMode; + + if ( (mode || isIE) && !isOpera ) { // IE, Gecko + height = (mode == 'CSS1Compat') ? + document.documentElement.clientHeight : // Standards + document.body.clientHeight; // Quirks + } + + return height; + }, + + /** + * Returns the current width of the viewport. + * @method getViewportWidth + * @return {Int} The width of the viewable area of the page (excludes scrollbars). + */ + + getViewportWidth: function() { + var width = self.innerWidth; // Safari + var mode = document.compatMode; + + if (mode || isIE) { // IE, Gecko, Opera + width = (mode == 'CSS1Compat') ? + document.documentElement.clientWidth : // Standards + document.body.clientWidth; // Quirks + } + return width; + } + }; +})(); +/** + * A region is a representation of an object on a grid. It is defined + * by the top, right, bottom, left extents, so is rectangular by default. If + * other shapes are required, this class could be extended to support it. + * @namespace YAHOO.util + * @class Region + * @param {Int} t the top extent + * @param {Int} r the right extent + * @param {Int} b the bottom extent + * @param {Int} l the left extent + * @constructor + */ +YAHOO.util.Region = function(t, r, b, l) { + + /** + * The region's top extent + * @property top + * @type Int + */ + this.top = t; + + /** + * The region's top extent as index, for symmetry with set/getXY + * @property 1 + * @type Int + */ + this[1] = t; + + /** + * The region's right extent + * @property right + * @type int + */ + this.right = r; + + /** + * The region's bottom extent + * @property bottom + * @type Int + */ + this.bottom = b; + + /** + * The region's left extent + * @property left + * @type Int + */ + this.left = l; + + /** + * The region's left extent as index, for symmetry with set/getXY + * @property 0 + * @type Int + */ + this[0] = l; +}; + +/** + * Returns true if this region contains the region passed in + * @method contains + * @param {Region} region The region to evaluate + * @return {Boolean} True if the region is contained with this region, + * else false + */ +YAHOO.util.Region.prototype.contains = function(region) { + return ( region.left >= this.left && + region.right <= this.right && + region.top >= this.top && + region.bottom <= this.bottom ); + +}; + +/** + * Returns the area of the region + * @method getArea + * @return {Int} the region's area + */ +YAHOO.util.Region.prototype.getArea = function() { + return ( (this.bottom - this.top) * (this.right - this.left) ); +}; + +/** + * Returns the region where the passed in region overlaps with this one + * @method intersect + * @param {Region} region The region that intersects + * @return {Region} The overlap region, or null if there is no overlap + */ +YAHOO.util.Region.prototype.intersect = function(region) { + var t = Math.max( this.top, region.top ); + var r = Math.min( this.right, region.right ); + var b = Math.min( this.bottom, region.bottom ); + var l = Math.max( this.left, region.left ); + + if (b >= t && r >= l) { + return new YAHOO.util.Region(t, r, b, l); + } else { + return null; + } +}; + +/** + * Returns the region representing the smallest region that can contain both + * the passed in region and this region. + * @method union + * @param {Region} region The region that to create the union with + * @return {Region} The union region + */ +YAHOO.util.Region.prototype.union = function(region) { + var t = Math.min( this.top, region.top ); + var r = Math.max( this.right, region.right ); + var b = Math.max( this.bottom, region.bottom ); + var l = Math.min( this.left, region.left ); + + return new YAHOO.util.Region(t, r, b, l); +}; + +/** + * toString + * @method toString + * @return string the region properties + */ +YAHOO.util.Region.prototype.toString = function() { + return ( "Region {" + + "top: " + this.top + + ", right: " + this.right + + ", bottom: " + this.bottom + + ", left: " + this.left + + "}" ); +}; + +/** + * Returns a region that is occupied by the DOM element + * @method getRegion + * @param {HTMLElement} el The element + * @return {Region} The region that the element occupies + * @static + */ +YAHOO.util.Region.getRegion = function(el) { + var p = YAHOO.util.Dom.getXY(el); + + var t = p[1]; + var r = p[0] + el.offsetWidth; + var b = p[1] + el.offsetHeight; + var l = p[0]; + + return new YAHOO.util.Region(t, r, b, l); +}; + +///////////////////////////////////////////////////////////////////////////// + + +/** + * A point is a region that is special in that it represents a single point on + * the grid. + * @namespace YAHOO.util + * @class Point + * @param {Int} x The X position of the point + * @param {Int} y The Y position of the point + * @constructor + * @extends YAHOO.util.Region + */ +YAHOO.util.Point = function(x, y) { + if (x instanceof Array) { // accept output from Dom.getXY + y = x[1]; + x = x[0]; + } + + /** + * The X position of the point, which is also the right, left and index zero (for Dom.getXY symmetry) + * @property x + * @type Int + */ + + this.x = this.right = this.left = this[0] = x; + + /** + * The Y position of the point, which is also the top, bottom and index one (for Dom.getXY symmetry) + * @property y + * @type Int + */ + this.y = this.top = this.bottom = this[1] = y; +}; + +YAHOO.util.Point.prototype = new YAHOO.util.Region(); + +YAHOO.register("dom", YAHOO.util.Dom, {version: "2.2.0", build: "127"}); Index: openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/event.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/event.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ajaxhelper/www/resources/ext2/source/yui/event.js 4 Dec 2007 02:49:00 -0000 1.1 @@ -0,0 +1,2062 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@extjs.com + * + * http://extjs.com/license + */ + +/* +Copyright (c) 2007, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.2.0 +*/ +/** + * The Event Utility provides utilities for managing DOM Events and tools + * for building event systems + * + * @module event + * @title Event Utility + * @namespace YAHOO.util + * @requires yahoo + */ + +// The first instance of Event will win if it is loaded more than once. +// @TODO this needs to be changed so that only the state data that needs to +// be preserved is kept, while methods are overwritten/added as needed. +// This means that the module pattern can't be used. +if (!YAHOO.util.Event) { + +/** + * The event utility provides functions to add and remove event listeners, + * event cleansing. It also tries to automatically remove listeners it + * registers during the unload event. + * + * @class Event + * @static + */ + YAHOO.util.Event = function() { + + /** + * True after the onload event has fired + * @property loadComplete + * @type boolean + * @static + * @private + */ + var loadComplete = false; + + /** + * Cache of wrapped listeners + * @property listeners + * @type array + * @static + * @private + */ + var listeners = []; + + /** + * User-defined unload function that will be fired before all events + * are detached + * @property unloadListeners + * @type array + * @static + * @private + */ + var unloadListeners = []; + + /** + * Cache of DOM0 event handlers to work around issues with DOM2 events + * in Safari + * @property legacyEvents + * @static + * @private + */ + var legacyEvents = []; + + /** + * Listener stack for DOM0 events + * @property legacyHandlers + * @static + * @private + */ + var legacyHandlers = []; + + /** + * The number of times to poll after window.onload. This number is + * increased if additional late-bound handlers are requested after + * the page load. + * @property retryCount + * @static + * @private + */ + var retryCount = 0; + + /** + * onAvailable listeners + * @property onAvailStack + * @static + * @private + */ + var onAvailStack = []; + + /** + * Lookup table for legacy events + * @property legacyMap + * @static + * @private + */ + var legacyMap = []; + + /** + * Counter for auto id generation + * @property counter + * @static + * @private + */ + var counter = 0; + + /** + * addListener/removeListener can throw errors in unexpected scenarios. + * These errors are suppressed, the method returns false, and this property + * is set + * @property lastError + * @type Error + */ + var lastError = null; + + return { + + /** + * The number of times we should look for elements that are not + * in the DOM at the time the event is requested after the document + * has been loaded. The default is 200@amp;50 ms, so it will poll + * for 10 seconds or until all outstanding handlers are bound + * (whichever comes first). + * @property POLL_RETRYS + * @type int + * @static + * @final + */ + POLL_RETRYS: 200, + + /** + * The poll interval in milliseconds + * @property POLL_INTERVAL + * @type int + * @static + * @final + */ + POLL_INTERVAL: 20, + + /** + * Element to bind, int constant + * @property EL + * @type int + * @static + * @final + */ + EL: 0, + + /** + * Type of event, int constant + * @property TYPE + * @type int + * @static + * @final + */ + TYPE: 1, + + /** + * Function to execute, int constant + * @property FN + * @type int + * @static + * @final + */ + FN: 2, + + /** + * Function wrapped for scope correction and cleanup, int constant + * @property WFN + * @type int + * @static + * @final + */ + WFN: 3, + + /** + * Object passed in by the user that will be returned as a + * parameter to the callback, int constant + * @property OBJ + * @type int + * @static + * @final + */ + OBJ: 3, + + /** + * Adjusted scope, either the element we are registering the event + * on or the custom object passed in by the listener, int constant + * @property ADJ_SCOPE + * @type int + * @static + * @final + */ + ADJ_SCOPE: 4, + + /** + * Safari detection is necessary to work around the preventDefault + * bug that makes it so you can't cancel a href click from the + * handler. Since this function has been used outside of this + * utility, it was changed to detect all KHTML browser to be more + * friendly towards the non-Safari browsers that share the engine. + * Internally, the preventDefault bug detection now uses the + * webkit property. + * @property isSafari + * @private + * @static + * @deprecated + */ + isSafari: (/KHTML/gi).test(navigator.userAgent), + + /** + * If WebKit is detected, we keep track of the version number of + * the engine. + * Safari 1.3.2 (312.6): 312.8.1 <-- currently the latest + * available on Mac OSX 10.3. + * Safari 2.0.2: 416 <-- hasOwnProperty introduced + * Safari 2.0.4: 418 <-- preventDefault fixed (I believe) + * Safari 2.0.4 (419.3): 418.9.1 <-- current release + * + * http://developer.apple.com/internet/safari/uamatrix.html + * @property webkit + */ + webkit: function() { + var v=navigator.userAgent.match(/AppleWebKit\/([^ ]*)/); + if (v&&v[1]) { + return v[1]; + } + return null; + }(), + + /** + * IE detection needed to properly calculate pageX and pageY. + * capabilities checking didn't seem to work because another + * browser that does not provide the properties have the values + * calculated in a different manner than IE. + * @property isIE + * @private + * @static + */ + isIE: (!this.webkit && !navigator.userAgent.match(/opera/gi) && + navigator.userAgent.match(/msie/gi)), + + /** + * poll handle + * @property _interval + * @private + */ + _interval: null, + + /** + * @method startInterval + * @static + * @private + */ + startInterval: function() { + if (!this._interval) { + var self = this; + var callback = function() { self._tryPreloadAttach(); }; + this._interval = setInterval(callback, this.POLL_INTERVAL); + // this.timeout = setTimeout(callback, i); + } + }, + + /** + * Executes the supplied callback when the item with the supplied + * id is found. This is meant to be used to execute behavior as + * soon as possible as the page loads. If you use this after the + * initial page load it will poll for a fixed time for the element. + * The number of times it will poll and the frequency are + * configurable. By default it will poll for 10 seconds. + * + * @method onAvailable + * + * @param {string} p_id the id of the element to look for. + * @param {function} p_fn what to execute when the element is found. + * @param {object} p_obj an optional object to be passed back as + * a parameter to p_fn. + * @param {boolean} p_override If set to true, p_fn will execute + * in the scope of p_obj + * + * @static + */ + onAvailable: function(p_id, p_fn, p_obj, p_override) { + onAvailStack.push( { id: p_id, + fn: p_fn, + obj: p_obj, + override: p_override, + checkReady: false } ); + + retryCount = this.POLL_RETRYS; + this.startInterval(); + }, + + /** + * Works the same way as onAvailable, but additionally checks the + * state of sibling elements to determine if the content of the + * available element is safe to modify. + * + * @method onContentReady + * + * @param {string} p_id the id of the element to look for. + * @param {function} p_fn what to execute when the element is ready. + * @param {object} p_obj an optional object to be passed back as + * a parameter to p_fn. + * @param {boolean} p_override If set to true, p_fn will execute + * in the scope of p_obj + * + * @static + */ + onContentReady: function(p_id, p_fn, p_obj, p_override) { + onAvailStack.push( { id: p_id, + fn: p_fn, + obj: p_obj, + override: p_override, + checkReady: true } ); + + retryCount = this.POLL_RETRYS; + this.startInterval(); + }, + + /** + * Appends an event handler + * + * @method addListener + * + * @param {Object} el The html element to assign the + * event to + * @param {String} sType The type of event to append + * @param {Function} fn The method the event invokes + * @param {Object} obj An arbitrary object that will be + * passed as a parameter to the handler + * @param {boolean} override If true, the obj passed in becomes + * the execution scope of the listener + * @return {boolean} True if the action was successful or defered, + * false if one or more of the elements + * could not have the listener attached, + * or if the operation throws an exception. + * @static + */ + addListener: function(el, sType, fn, obj, override) { + + + if (!fn || !fn.call) { + return false; + } + + // The el argument can be an array of elements or element ids. + if ( this._isValidCollection(el)) { + var ok = true; + for (var i=0,len=el.length; i