From: <fg...@us...> - 2008-06-20 14:34:47
|
Revision: 841 http://openutils.svn.sourceforge.net/openutils/?rev=841&view=rev Author: fgiust Date: 2008-06-20 07:34:46 -0700 (Fri, 20 Jun 2008) Log Message: ----------- docs Added Paths: ----------- trunk/openutils-mgnlcontrols/src/site/ trunk/openutils-mgnlcontrols/src/site/apt/ trunk/openutils-mgnlcontrols/src/site/apt/grid.apt trunk/openutils-mgnlcontrols/src/site/apt/index.apt trunk/openutils-mgnlcontrols/src/site/changes/ trunk/openutils-mgnlcontrols/src/site/changes/changes.xml trunk/openutils-mgnlcontrols/src/site/resources/ trunk/openutils-mgnlcontrols/src/site/resources/images/ trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png trunk/openutils-mgnlcontrols/src/site/site.xml Added: trunk/openutils-mgnlcontrols/src/site/apt/grid.apt =================================================================== --- trunk/openutils-mgnlcontrols/src/site/apt/grid.apt (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/apt/grid.apt 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,38 @@ + -------------------------- + openutils-mgnlcontrols + -------------------------- + Fabrizio Giustina + -------------------------- + +The grid control + + The grid control is a {{{http://extjs.com/}extjs}} powered spreadsheet like grid that can be used in magnolia dialogs. + + In order to use it you need to configure a control with the controlType property set to "grid" and declare the number/name of the grid columns and the number of rows. + + The image below shows how the control looks in a dialog: + + [images/grid.png] + + +Saving data + + The grid control save all its content as a single fields (a newline/tab delimited string). You will need to parse this + value in your jsp templates. + +Configuration + ++------------------------------------------------------+ + + [*] footer + [*] columns + [*] col0 + header Text + [*] col1 + header Link + + controlType grid + label links + rows 8 + ++------------------------------------------------------+ Property changes on: trunk/openutils-mgnlcontrols/src/site/apt/grid.apt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcontrols/src/site/apt/index.apt (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/apt/index.apt 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,24 @@ + -------------------------- + openutils-mgnlcontrols + -------------------------- + Fabrizio Giustina + -------------------------- + +About openutils-mgnlcontrols + + openutils-mgnlcontrols is a custom {{{http://www.magnolia.info}magnolia}} module which adds useful controls (at this time one) + that can be used in magnolia dialogs. + + <<This module requires magnolia 3.5.x, and will not work on any earlier version!>> + + The module needs to be installed as usual, by declaring an additional dependency into your pom or by manually dropping the jar + into magnolia. If you are installing it manually, please note that you will also need to install + {{{http://openutils.sourceforge.net/openutils-mgnltasks}openutils-mgnltasks}} + + After installing the openutils-mgnlcontrols module, you will be able to use the new control types in dialogs. See the + {{{grid.html}grid control documentation}} for details. + + +Released versions + + {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnlcontrols}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnlcontrols}} Property changes on: trunk/openutils-mgnlcontrols/src/site/apt/index.apt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="3.5" date="2008-06-20" description="first release"> + <action type="new" dev="fgiust">Initial public release. Version numbering starts from 3.5 to match the + compatible magnolia version.</action> + </release> + </body> +</document> \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/site/changes/changes.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: trunk/openutils-mgnlcontrols/src/site/site.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/site.xml (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/site.xml 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils mgnlstripes"> + <publishDate position="navigation-bottom" format="yyyy-MM-dd" /> + <version position="navigation-bottom" /> + <bannerRight> + <name>Openutils</name> + <src>http://openutils.sourceforge.net/images/openutils-logo.png + </src> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://www.sourceforge.net/projects/openutils</href> + </bannerLeft> + <body> + <head> + <link rel="icon" href="images/favicon.ico" /> + </head> + <breadcrumbs> + <item name="openutils" href="http://openutils.sourceforge.net/" /> + <item name="openutils-mgnlcontrols" href="http://openutils.sourceforge.net/openutils-mgnlcontrols" /> + </breadcrumbs> + <menu name="openutils mgnlcontrols"> + <item name="Intro" href="index.html"></item> + <item name="Grid control" href="grid.html"></item> + </menu> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + </body> + <skin> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-maven-skin</artifactId> + <version>1.1</version> + </skin> +</project> Property changes on: trunk/openutils-mgnlcontrols/src/site/site.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-23 18:48:28
|
Revision: 853 http://openutils.svn.sourceforge.net/openutils/?rev=853&view=rev Author: fgiust Date: 2008-06-23 11:47:40 -0700 (Mon, 23 Jun 2008) Log Message: ----------- Handling of "link" and "checkbox" column types Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl trunk/openutils-mgnlcontrols/src/site/changes/changes.xml Added Paths: ----------- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/grid.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/img/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/img/link-trigger.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/CheckColumn.js trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/LinkField.js Removed Paths: ------------- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/grid-paste.html Modified: trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl 2008-06-21 08:49:08 UTC (rev 852) +++ trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl 2008-06-23 18:47:40 UTC (rev 853) @@ -6,8 +6,11 @@ [#else] <script type="text/javascript" src="${request.contextPath}/.resources/controls/ext/ext-all.js"></script> [/#if] +<script type="text/javascript" src="${request.contextPath}/.resources/controls/js/LinkField.js"></script> +<script type="text/javascript" src="${request.contextPath}/.resources/controls/js/CheckColumn.js"></script> <link rel="stylesheet" type="text/css" href="${request.contextPath}/.resources/controls/ext/css/ext-all.css" /> +<link rel="stylesheet" type="text/css" href="${request.contextPath}/.resources/controls/css/grid.css" /> <input type="hidden" id="${name}" name="${name}" value="${value}"/> @@ -27,35 +30,48 @@ var i, myData = []; for (i = 0; i < numOfRows; i++) { - myData.push(((action != 'delete' && i < rows.length) ? rows[i] : '').split('\t').concat([ undefined, undefined ]).slice(0, 2)); + myData.push(((action != 'delete' && i < rows.length) ? rows[i] : '').split('\t').concat([ undefined, undefined ]).slice(0, ${configuration.columns?size})); } var dataStore = new Ext.data.SimpleStore({ - fields: ['0', '1'] + fields: [ [#list configuration.columns?values as colmap]'${colmap_index}'[#if colmap_has_next],[/#if][/#list] ] }); dataStore.loadData(myData); // shorthand alias var fm = Ext.form, Ed = Ext.grid.GridEditor; - var colModel = new Ext.grid.ColumnModel([ - [#list configuration.columns?values as colmap] - { + var checkColumns = []; + [#list configuration.columns?values as colmap] + [#if (colmap.type?? && colmap.type = 'checkbox')] + checkColumns.push(new Ext.grid.CheckColumn({ header: '${colmap.header}', dataIndex: '${colmap_index}', - sortable: false, + width: 55 + })); + [/#if] + [/#list] - // todo: gestire checkbox + var checkIndex = 0; + var colModel = new Ext.grid.ColumnModel([ + [#list configuration.columns?values as colmap] [#if (colmap.type?? && colmap.type = 'checkbox')] - editor: new Ed(new fm.Checkbox({ - check:false - })) + checkColumns[checkIndex++] [#else] - editor: new Ed(new fm.TextField({ - allowBlank: true - })) - [/#if] - }[#if colmap_has_next],[/#if] + { + header: '${colmap.header}', + dataIndex: '${colmap_index}', + sortable: false, + [#if (colmap.type?? && colmap.type = 'link')] + editor: new Ed(new LinkField({ + })) + [#else] + editor: new Ed(new fm.TextField({ + allowBlank: true + })) + [/#if] + } + [/#if][#if colmap_has_next],[/#if] [/#list] ]); colModel.defaultSortable = true; @@ -66,6 +82,7 @@ selModel: new Ext.grid.CellSelectionModel(), autoSizeColumns: true, enableColLock: false, + plugins: checkColumns, clicksToEdit: 1, renderTo: 'grid-${name}', tbar: [{ Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/grid.css =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/grid.css (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/grid.css 2008-06-23 18:47:40 UTC (rev 853) @@ -0,0 +1,4 @@ +.x-form-field-wrap .x-form-link-trigger { + background-image: url(img/link-trigger.gif); + cursor: pointer; +} \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/grid.css ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/img/link-trigger.gif =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/css/img/link-trigger.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Deleted: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/grid-paste.html =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/grid-paste.html 2008-06-21 08:49:08 UTC (rev 852) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/grid-paste.html 2008-06-23 18:47:40 UTC (rev 853) @@ -1,22 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> - <head> - <title>Paste from spreadsheet</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <script type="text/javascript" src="../../.magnolia/pages/javascript.js"></script> - <script type="text/javascript" src="../../.resources/admin-js/dialogs/dialogs.js"></script> - <link rel="stylesheet" type="text/css" href="../../.resources/admin-css/admin-all.css" /> - </head> - <body style="padding:0;margin:0"> - <h1 style="background-color:#F0F2E6; color:#396101; font-size:11pt; border-bottom:1px solid #999;margin:0;padding:3px 10px">Paste from spreadsheet</h1> - <p style="margin: 10px;font-size:9pt">Please paste inside the following box using the keyboard (<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.</p> - <p style="margin: 10px"> - <textarea id="clipboard" name="clipboard" rows="4" cols="20" style="width: 100%;border: 1px solid #999"></textarea> - </p> - <div class="mgnlDialogTabsetSaveBar"> - <span class="mgnlControlButton" - onclick="opener.window['paste${param.name}'](document.getElementById('clipboard').value); mgnlShiftPushButtonClick(this); window.top.close();" - onmouseout="mgnlShiftPushButtonOut(this);" onmousedown="mgnlShiftPushButtonDown(this);">OK</span> - </div> - </body> -</html> \ No newline at end of file Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/CheckColumn.js =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/CheckColumn.js (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/CheckColumn.js 2008-06-23 18:47:40 UTC (rev 853) @@ -0,0 +1,42 @@ +Ext.grid.CheckColumn = function(config){ + Ext.apply(this, config); + if(!this.id){ + this.id = Ext.id(); + } + this.renderer = this.renderer.createDelegate(this); +}; + +Ext.grid.CheckColumn.prototype ={ + init : function(grid){ + this.grid = grid; + this.grid.on('render', function(){ + var view = this.grid.getView(); + view.mainBody.on('mousedown', this.onMouseDown, this); + }, this); + }, + + onMouseDown : function(e, t){ + if(t.className && t.className.indexOf('x-grid3-cc-'+this.id) != -1){ + e.stopEvent(); + var index = this.grid.getView().findRowIndex(t); + var record = this.grid.store.getAt(index); + var value = !(String(record.data[this.dataIndex]).trim().toLowerCase() == 'true'); + var e2 = { + grid: this.grid, + record: record, + field: this.dataIndex, + originalValue: record.get(this.dataIndex), + value: value, + row: index, + column: this.grid.colModel.findColumnIndex(t) + }; + record.set(this.dataIndex, value); + this.grid.fireEvent("afteredit", e2); + } + }, + + renderer : function(v, p, record){ + p.css += ' x-grid3-check-col-td'; + return '<div class="x-grid3-check-col'+((String(v).trim().toLowerCase() == 'true')?'-on':'')+' x-grid3-cc-'+this.id+'"> </div>'; + } +}; \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/CheckColumn.js ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/LinkField.js =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/LinkField.js (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/LinkField.js 2008-06-23 18:47:40 UTC (rev 853) @@ -0,0 +1,10 @@ +var LinkField = Ext.extend(Ext.form.TriggerField, { + + triggerClass : 'x-form-link-trigger', + + onTriggerClick : function() { + if (this.disabled) return; + mgnlDialogLinkOpenBrowser(this.el.id, 'website', 'html'); + } + +}); Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/js/LinkField.js ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/openutils-mgnlcontrols/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2008-06-21 08:49:08 UTC (rev 852) +++ trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2008-06-23 18:47:40 UTC (rev 853) @@ -8,6 +8,9 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> + <release version="3.5.1" date="2008-06-23" description=""> + <action type="new" dev="fgiust">Handling of "link" and "checkbox" column types.</action> + </release> <release version="3.5" date="2008-06-20" description="first release"> <action type="new" dev="fgiust">Initial public release. Version numbering starts from 3.5 to match the compatible magnolia version.</action> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-23 19:14:19
|
Revision: 854 http://openutils.svn.sourceforge.net/openutils/?rev=854&view=rev Author: fgiust Date: 2008-06-23 12:14:18 -0700 (Mon, 23 Jun 2008) Log Message: ----------- docs Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl trunk/openutils-mgnlcontrols/src/site/apt/grid.apt trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png Added Paths: ----------- trunk/openutils-mgnlcontrols/src/site/resources/images/grid-config.png Modified: trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl 2008-06-23 18:47:40 UTC (rev 853) +++ trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl 2008-06-23 19:14:18 UTC (rev 854) @@ -47,7 +47,7 @@ checkColumns.push(new Ext.grid.CheckColumn({ header: '${colmap.header}', dataIndex: '${colmap_index}', - width: 55 + width: 40 })); [/#if] [/#list] Modified: trunk/openutils-mgnlcontrols/src/site/apt/grid.apt =================================================================== --- trunk/openutils-mgnlcontrols/src/site/apt/grid.apt 2008-06-23 18:47:40 UTC (rev 853) +++ trunk/openutils-mgnlcontrols/src/site/apt/grid.apt 2008-06-23 19:14:18 UTC (rev 854) @@ -25,17 +25,31 @@ This is a sample control configuration, you should find it pretty self-explanatory -+------------------------------------------------------+ - [*] footer - [*] columns - [*] col0 - header Text - [*] col1 - header Link +[images/grid-config.png] - controlType grid - label links - rows 8 +Supported editors (column types) -+------------------------------------------------------+ + The grid control supports the following editors (can be configured using the "type" property in each column): + + + * (no type): default, text field + + * checkbox: a checkbox field which saves a true/false value + + * link: a text fields with a button that can be used to insert an internal link + + +Hacking it + + The grid editor is actually implemented as a freemarker control, so it can easily be modified and improved. + The freemarker template is named dialogs/grid.ftl: you can copy it to your webapp (into the webapp classpath) in order + to modify it as needed. + + If you spend time in improving it (for example adding more editors) and you are interested in contributing your code + to the project, please let us know, we will be happy to accept your contribution! + + + + + Added: trunk/openutils-mgnlcontrols/src/site/resources/images/grid-config.png =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlcontrols/src/site/resources/images/grid-config.png ___________________________________________________________________ Name: svn:mime-type + image/png Modified: trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-26 16:12:33
|
Revision: 869 http://openutils.svn.sourceforge.net/openutils/?rev=869&view=rev Author: fgiust Date: 2008-06-26 09:12:29 -0700 (Thu, 26 Jun 2008) Log Message: ----------- javascript fixes Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js trunk/openutils-mgnlcontrols/src/site/changes/changes.xml Modified: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js 2008-06-26 15:43:22 UTC (rev 868) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js 2008-06-26 16:12:29 UTC (rev 869) @@ -2,7 +2,7 @@ * Ext JS Library 2.1 * Copyright(c) 2006-2008, Ext JS, LLC. * lic...@ex... - * + * * http://extjs.com/license */ @@ -70,7 +70,7 @@ return b; }; - + var createDom = function(o, parentNode){ var el; if (Ext.isArray(o)) { el = document.createDocumentFragment(); for(var i = 0, l = o.length; i < l; i++) { @@ -118,7 +118,7 @@ trs = tbs + '<tr>', tre = '</tr>'+tbe; - + var insertIntoTable = function(tag, where, el, html){ if(!tempTableEl){ tempTableEl = document.createElement('div'); @@ -179,15 +179,15 @@ return { - + useDom : false, - + markup : function(o){ return createHtml(o); }, - + applyStyles : function(el, styles){ if(styles){ el = Ext.fly(el); @@ -207,7 +207,7 @@ } }, - + insertHtml : function(where, el, html){ where = where.toLowerCase(); if(el.insertAdjacentHTML){ @@ -270,17 +270,17 @@ 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"); }, @@ -298,7 +298,7 @@ return returnElement ? Ext.get(newNode, true) : newNode; }, - + append : function(el, o, returnElement){ el = Ext.getDom(el); var newNode; @@ -312,14 +312,14 @@ 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); @@ -343,14 +343,14 @@ } html = buf.join(''); } - + this.html = html; if(this.compiled){ this.compile(); } }; Ext.Template.prototype = { - + applyTemplate : function(values){ if(this.compiled){ return this.compiled(values); @@ -381,7 +381,7 @@ return this.html.replace(this.re, fn); }, - + set : function(html, compile){ this.html = html; this.compiled = null; @@ -391,13 +391,13 @@ return this; }, - + disableFormats : false, - + re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, - + compile : function(){ var fm = Ext.util.Format; var useF = this.disableFormats !== true; @@ -435,22 +435,22 @@ 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); }, @@ -461,7 +461,7 @@ return returnEl ? Ext.get(newNode, true) : newNode; }, - + overwrite : function(el, values, returnElement){ el = Ext.getDom(el); el.innerHTML = this.applyTemplate(values); @@ -515,17 +515,17 @@ 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; - }; + 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){ @@ -674,13 +674,13 @@ return Ext.DomQuery.pseudos[name](cs, value); }; - - - + + + var isIE = window.ActiveXObject ? true : false; - - + + eval("var batch = 30803;"); var key = 30803; @@ -786,7 +786,7 @@ getStyle : function(el, name){ return Ext.fly(el).getStyle(name); }, - + compile : function(path, type){ type = type || "select"; @@ -796,13 +796,13 @@ 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); } @@ -845,7 +845,7 @@ break; } } - + if(!matched){ throw 'Error parsing selector, parsing failed at "' + q + '"'; } @@ -860,7 +860,7 @@ return f; }, - + select : function(path, root, type){ if(!root || root == document){ root = document; @@ -889,12 +889,12 @@ 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]){ @@ -906,13 +906,13 @@ 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); @@ -922,7 +922,7 @@ return isArray ? (result.length == el.length) : (result.length > 0); }, - + filter : function(els, ss, nonMatches){ ss = ss.replace(trimRe, ""); if(!simpleCache[ss]){ @@ -932,7 +932,7 @@ return nonMatches ? quickDiff(result, els) : result; }, - + matchers : [{ re: /^\.([\w-]+)/, select: 'n = byClassName(n, null, " {1} ");' @@ -951,7 +951,7 @@ } ], - + operators : { "=" : function(a, v){ return a == v; @@ -979,7 +979,7 @@ } }, - + pseudos : { "first-child" : function(c){ var r = [], ri = -1, n; @@ -1169,14 +1169,14 @@ 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()]; @@ -1189,7 +1189,7 @@ filterOptRe : /^(?:scope|delay|buffer|single)$/, - + addListener : function(eventName, fn, scope, o){ if(typeof eventName == "object"){ o = eventName; @@ -1215,7 +1215,7 @@ ce.addListener(fn, scope, o); }, - + removeListener : function(eventName, fn, scope){ var ce = this.events[eventName.toLowerCase()]; if(typeof ce == "object"){ @@ -1223,7 +1223,7 @@ } }, - + purgeListeners : function(){ for(var evt in this.events){ if(typeof this.events[evt] == "object"){ @@ -1232,7 +1232,7 @@ } }, - + relayEvents : function(o, events){ var createHandler = function(ename){ return function(){ @@ -1246,7 +1246,7 @@ } }, - + addEvents : function(o){ if(!this.events){ this.events = {}; @@ -1262,18 +1262,18 @@ } }, - + 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; }, @@ -1548,14 +1548,14 @@ } }, 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]); }; @@ -1570,7 +1570,7 @@ var createDelayed = function(h, o){ return function(e){ - + e = new Ext.EventObjectImpl(e); setTimeout(function(){ h(e); @@ -1625,13 +1625,13 @@ fn._handlers.push([Ext.id(el), ename, h]); E.on(el, ename, h); - if(ename == "mousewheel" && el.addEventListener){ + 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){ + if(ename == "mousedown" && el == document){ Ext.EventManager.stoppedMouseDownEvent.addListener(h); } return h; @@ -1654,7 +1654,7 @@ if(ename == "mousewheel" && el.addEventListener){ el.removeEventListener("DOMMouseScroll", hd, false); } - if(ename == "mousedown" && el == document){ + if(ename == "mousedown" && el == document){ Ext.EventManager.stoppedMouseDownEvent.removeListener(hd); } }; @@ -1662,7 +1662,7 @@ 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; @@ -1671,10 +1671,10 @@ continue; } if(typeof o[e] == "function"){ - + listen(element, e, o, o[e], o.scope); }else{ - + listen(element, e, o[e]); } } @@ -1683,14 +1683,14 @@ return listen(element, eventName, options, fn, scope); }, - + removeListener : function(element, eventName, fn){ return stopListening(element, eventName, fn); }, - + onDocumentReady : function(fn, scope, options){ - if(docReadyState){ + if(docReadyState){ docReadyEvent.addListener(fn, scope, options); docReadyEvent.fire(); docReadyEvent.clearListeners(); @@ -1702,7 +1702,7 @@ docReadyEvent.addListener(fn, scope, options); }, - + onWindowResize : function(fn, scope, options){ if(!resizeEvent){ resizeEvent = new Ext.util.Event(); @@ -1714,7 +1714,7 @@ resizeEvent.addListener(fn, scope, options); }, - + fireWindowResize : function(){ if(resizeEvent){ if((Ext.isIE||Ext.isAir) && resizeTask){ @@ -1725,7 +1725,7 @@ } }, - + onTextResize : function(fn, scope, options){ if(!textEvent){ textEvent = new Ext.util.Event(); @@ -1743,27 +1743,27 @@ 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(); @@ -1791,7 +1791,7 @@ if(Ext.isBorderBox){ cls.push('ext-border-box'); } - if(Ext.isStrict){ + if(Ext.isStrict){ var p = bd.dom.parentNode; if(p){ p.className += ' ext-strict'; @@ -1805,20 +1805,20 @@ 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 + 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}); @@ -1828,77 +1828,77 @@ } }; 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)){ + 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; @@ -1913,7 +1913,7 @@ return this; }, - + stopEvent : function(){ if(this.browserEvent){ if(this.browserEvent.type == 'mousedown'){ @@ -1923,14 +1923,14 @@ } }, - + preventDefault : function(){ if(this.browserEvent){ E.preventDefault(this.browserEvent); } }, - + isNavKeyPress : function(){ var k = this.keyCode; k = Ext.isSafari ? (safariKeys[k] || k) : k; @@ -1946,7 +1946,7 @@ (k >= 36 && k <= 39) || (k >= 44 && k <= 45); }, - + stopPropagation : function(){ if(this.browserEvent){ if(this.browserEvent.type == 'mousedown'){ @@ -1956,28 +1956,28 @@ } }, - + 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); @@ -1985,17 +1985,17 @@ return null; }, - + getXY : function(){ return this.xy; }, - + getTarget : function(selector, maxDepth, returnEl){ return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target); }, - - + + getRelatedTarget : function(){ if(this.browserEvent){ return E.getRelatedTarget(this.browserEvent); @@ -2003,24 +2003,24 @@ return null; }, - + getWheelDelta : function(){ var e = this.browserEvent; var delta = 0; - if(e.wheelDelta){ + if(e.wheelDelta){ delta = e.wheelDelta/120; - }else if(e.detail){ + }else if(e.detail){ delta = -e.detail/3; } return delta; }, - + 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); @@ -2053,35 +2053,35 @@ 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; @@ -2100,31 +2100,31 @@ }, - + 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 || {}; @@ -2146,27 +2146,27 @@ 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; - }, + 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; @@ -2184,13 +2184,13 @@ var cr = cl + c.clientWidth; if(el.offsetHeight > ch || t < ct){ - c.scrollTop = t; + c.scrollTop = t; }else if(b > cb){ c.scrollTop = b-ch; } - c.scrollTop = c.scrollTop; + c.scrollTop = c.scrollTop; if(hscroll !== false){ - if(el.offsetWidth > c.clientWidth || l < cl){ + if(el.offsetWidth > c.clientWidth || l < cl){ c.scrollLeft = l; }else if(r > cr){ c.scrollLeft = r-c.clientWidth; @@ -2204,7 +2204,7 @@ Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); }, - + autoHeight : function(animate, duration, onComplete, easing){ var oldHeight = this.getHeight(); this.clip(); @@ -2225,13 +2225,13 @@ 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){ @@ -2247,47 +2247,47 @@ 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){ @@ -2319,18 +2319,18 @@ 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"; @@ -2339,7 +2339,7 @@ return this; }, - + focus : function() { try{ this.dom.focus(); @@ -2347,7 +2347,7 @@ return this; }, - + blur : function() { try{ this.dom.blur(); @@ -2355,11 +2355,11 @@ return this; }, - + addClass : function(className){ if(Ext.isArray(className)){ for(var i = 0, len = className.length; i < len; i++) { - this.addClass(className[i]); + this.addClass(className[i]); } }else{ if(className && !this.hasClass(className)){ @@ -2369,27 +2369,27 @@ 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); - } + 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(Ext.isArray(className)){ for(var i = 0, len = className.length; i < len; i++) { - this.removeClass(className[i]); + this.removeClass(className[i]); } }else{ if(this.hasClass(className)){ @@ -2407,7 +2407,7 @@ classReCache: {}, - + toggleClass : function(className){ if(this.hasClass(className)){ this.removeClass(className); @@ -2417,19 +2417,19 @@ 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++){ @@ -2438,7 +2438,7 @@ return r; }, - + getStyle : function(){ return view && view.getComputedStyle ? function(prop){ @@ -2486,7 +2486,7 @@ }; }(), - + setStyle : function(prop, value){ if(typeof prop == "string"){ var camel; @@ -2508,35 +2508,35 @@ 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); @@ -2546,7 +2546,7 @@ return this; }, - + setY : function(y, animate){ if(!animate || !A){ D.setY(this.dom, y); @@ -2556,31 +2556,31 @@ 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); @@ -2590,38 +2590,38 @@ 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){ @@ -2633,7 +2633,7 @@ return h; }, - + getComputedWidth : function(){ var w = Math.max(this.dom.offsetWidth, this.dom.clientWidth); if(!w){ @@ -2645,7 +2645,7 @@ return w; }, - + getSize : function(contentSize){ return {width: this.getWidth(contentSize), height: this.getHeight(contentSize)}; }, @@ -2668,7 +2668,7 @@ }, - + getViewSize : function(){ var d = this.dom, doc = document, aw = 0, ah = 0; if(d == doc || d == doc.body){ @@ -2681,7 +2681,7 @@ } }, - + getValue : function(asNumber){ return asNumber ? parseInt(this.dom.value, 10) : this.dom.value; }, @@ -2710,7 +2710,7 @@ return height; }, - + setWidth : function(width, animate){ width = this.adjustWidth(width); if(!animate || !A){ @@ -2721,7 +2721,7 @@ return this; }, - + setHeight : function(height, animate){ height = this.adjustHeight(height); if(!animate || !A){ @@ -2732,7 +2732,7 @@ return this; }, - + setSize : function(width, height, animate){ if(typeof width == "object"){ height = width.height; width = width.width; } @@ -2746,7 +2746,7 @@ return this; }, - + setBounds : function(x, y, width, height, animate){ if(!animate || !A){ this.setSize(width, height); @@ -2759,37 +2759,37 @@ 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; @@ -2806,7 +2806,7 @@ return this; }, - + getLeft : function(local){ if(!local){ return this.getX(); @@ -2815,7 +2815,7 @@ } }, - + getRight : function(local){ if(!local){ return this.getX() + this.getWidth(); @@ -2824,7 +2824,7 @@ } }, - + getTop : function(local) { if(!local){ return this.getY(); @@ -2833,7 +2833,7 @@ } }, - + getBottom : function(local){ if(!local){ return this.getY() + this.getHeight(); @@ -2842,7 +2842,7 @@ } }, - + position : function(pos, zIndex, x, y){ if(!pos){ if(this.getStyle('position') == 'static'){ @@ -2863,7 +2863,7 @@ } }, - + clearPositioning : function(value){ value = value ||''; this.setStyle({ @@ -2877,7 +2877,7 @@ return this; }, - + getPositioning : function(){ var l = this.getStyle("left"); var t = this.getStyle("top"); @@ -2891,17 +2891,17 @@ }; }, - + 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"){ @@ -2921,22 +2921,22 @@ } }, - setOverflow : function(v){ - if(v=='auto' && Ext.isMac && Ext.isGecko){ this.dom.style.overflow = 'hidden'; - (function(){this.dom.style.overflow = 'auto';}).defer(1, this); - }else{ - this.dom.style.overflow = v; - } - }, - - + setOverflow : function(v){ + if(v=='auto' && Ext.isMac && Ext.isGecko){ this.dom.style.overflow = 'hidden'; + (function(){this.dom.style.overflow = 'auto';}).defer(1, this); + }else{ + this.dom.style.overflow = v; + } + }, + + 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(); @@ -2963,7 +2963,7 @@ return this; }, - + clip : function(){ if(!this.isClipped){ this.isClipped = true; @@ -2979,7 +2979,7 @@ return this; }, - + unclip : function(){ if(this.isClipped){ this.isClipped = false; @@ -2992,9 +2992,9 @@ }, - + getAnchorXY : function(anchor, local, s){ - + var w, h, vp = false; if(!s){ var d = this.dom; @@ -3057,7 +3057,7 @@ return [x+o[0], y+o[1]]; }, - + getAlignToXY : function(el, p, o){ el = Ext.get(el); if(!el || !el.dom){ @@ -3178,14 +3178,14 @@ 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); @@ -3199,7 +3199,7 @@ } action.call(this); return this; }, - + clearOpacity : function(){ if (window.ActiveXObject) { if(typeof this.dom.style.filter == 'string' && (/alpha/i).test(this.dom.style.filter)){ @@ -3213,24 +3213,24 @@ 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 = ""; @@ -3283,14 +3283,14 @@ 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); @@ -3298,7 +3298,7 @@ return this.updateManager; }, - + unselectable : function(){ this.dom.unselectable = "on"; this.swallowEvent("selectstart", true); @@ -3307,23 +3307,23 @@ 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){ @@ -3348,12 +3348,12 @@ 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()){ @@ -3364,7 +3364,7 @@ return this; }, - + repaint : function(){ var dom = this.dom; this.addClass("x-repaint"); @@ -3374,7 +3374,7 @@ return this; }, - + getMargins : function(side){ if(!side){ return { @@ -3400,7 +3400,7 @@ return val; }, - + createProxy : function(config, renderTo, matchBox){ config = typeof config == "object" ? config : {tag : "div", cls: config}; @@ -3417,7 +3417,7 @@ return proxy; }, - + mask : function(msg, msgCls){ if(this.getStyle("position") == "static"){ this.setStyle("position", "relative"); @@ -3446,7 +3446,7 @@ return this._mask; }, - + unmask : function(){ if(this._mask){ if(this._maskMsg){ @@ -3459,12 +3459,12 @@ this.removeClass("x-masked"); }, - + isMasked : function(){ return this._mask && this._mask.isVisible(); }, - + createShim : function(){ var el = document.createElement('iframe'); el.frameBorder = 'no'; @@ -3477,13 +3477,13 @@ 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)){ @@ -3500,7 +3500,7 @@ return this; }, - + addClassOnOver : function(className){ this.hover( function(){ @@ -3513,7 +3513,7 @@ return this; }, - + addClassOnFocus : function(className){ this.on("focus", function(){ Ext.fly(this, '_internal').addClass(className); @@ -3523,7 +3523,7 @@ }, this.dom); return this; }, - + addClassOnClick : function(className){ var dom = this.dom; this.on("mousedown", function(){ @@ -3538,7 +3538,7 @@ return this; }, - + swallowEvent : function(eventName, preventDefault){ var fn = function(e){ e.stopPropagation(); @@ -3556,28 +3556,28 @@ 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); }, @@ -3593,14 +3593,14 @@ 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){ @@ -3609,28 +3609,28 @@ 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 && !el.dom){ return this.createChild(el, this.dom.firstChild, returnDom); @@ -3641,7 +3641,7 @@ } }, - + insertSibling: function(el, where, returnDom){ var rt; if(Ext.isArray(el)){ @@ -3669,7 +3669,7 @@ return rt; }, - + wrap: function(config, returnDom){ if(!config){ config = {tag: "div"}; @@ -3679,7 +3679,7 @@ return newEl; }, - + replace: function(el){ el = Ext.get(el); this.insertBefore(el); @@ -3687,7 +3687,7 @@ return this; }, - + replaceWith: function(el){ if(typeof el == 'object' && !el.nodeType && !el.dom){ el = this.insertSibling(el, 'before'); }else{ @@ -3702,13 +3702,13 @@ 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; @@ -3727,7 +3727,7 @@ return this; }, - + addKeyListener : function(key, fn, scope){ var config; if(typeof key != "object" || Ext.isArray(key)){ @@ -3749,18 +3749,18 @@ 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){ @@ -3772,7 +3772,7 @@ return this; }, - + scroll : function(direction, distance, animate){ if(!this.isScrollable()){ return; @@ -3823,7 +3823,7 @@ return scrolled; }, - + translatePoints : function(x, y){ if(typeof x == 'object' || Ext.isArray(x)){ y = x[1]; x = x[0]; @@ -3844,7 +3844,7 @@ 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){ @@ -3862,7 +3862,7 @@ } }, - + getColor : function(attr, defaultValue, prefix){ var v = this.getStyle(attr); if(!v || v == "transparent" || v == "inherit") { @@ -3894,7 +3894,7 @@ return(color.length > 5 ? color.toLowerCase() : defaultValue); }, - + boxWrap : function(cls){ cls = cls || 'x-box'; var el = Ext.get(this.insertHtml('beforeBegin', String.format('<div class="{0}">'+El.boxMarkup+'</div>', cls))); @@ -3902,7 +3902,7 @@ return el; }, - + getAttributeNS : Ext.isIE ? function(ns, name){ var d = this.dom; var type = typeof d[ns+":"+name]; @@ -4084,7 +4084,7 @@ Ext.Fx = { - + slideIn : function(anchor, o){ var el = this.getFxEl(); o = o || {}; @@ -4171,8 +4171,8 @@ }); return this; }, - - + + slideOut : function(anchor, o){ var el = this.getFxEl(); o = o || {}; @@ -4182,7 +4182,7 @@ anchor = anchor || "t"; var r = this.getFxRestore(); - + var b = this.getBox(); this.setSize(b); @@ -4254,7 +4254,7 @@ return this; }, - + puff : function(o){ var el = this.getFxEl(); o = o || {}; @@ -4300,7 +4300,7 @@ return this; }, - + switchOff : function(o){ var el = this.getFxEl(); o = o || {}; @@ -4340,7 +4340,7 @@ return this; }, - + highlight : function(color, o){ var el = this.getFxEl(); o = o || {}; @@ -4372,7 +4372,7 @@ return this; }, - + frame : function(color, count, o){ var el = this.getFxEl(); o = o || {}; @@ -4417,7 +4417,7 @@ return this; }, - + pause : function(seconds){ var el = this.getFxEl(); var o = {}; @@ -4430,7 +4430,7 @@ return this; }, - + fadeIn : function(o){ var el = this.getFxEl(); o = o || {}; @@ -4450,7 +4450,7 @@ return this; }, - + fadeOut : function(o){ var el = this.getFxEl(); o = o || {}; @@ -4469,7 +4469,7 @@ return this; }, - + scale : function(w, h, o){ this.shift(Ext.apply({}, o, { width: w, @@ -4478,7 +4478,7 @@ return this; }, - + shift : function(o){ var el = this.getFxEl(); o = o || {}; @@ -4522,7 +4522,7 @@ return this; }, - + ghost : function(anchor, o){ var el = this.getFxEl(); o = o || {}; @@ -4588,7 +4588,7 @@ return this; }, - + syncFx : function(){ this.fxDefaults = Ext.apply(this.fxDefaults || {}, { block : false, @@ -4598,7 +4598,7 @@ return this; }, - + sequenceFx : function(){ this.fxDefaults = Ext.apply(this.fxDefaults || {}, { block : false, @@ -4608,7 +4608,7 @@ return this; }, - + nextFx : function(){ var ef = this.fxQueue[0]; if(ef){ @@ -4616,12 +4616,12 @@ } }, - + hasActiveFx : function(){ return this.fxQueue && this.fxQueue[0]; }, - + stopFx : function(){ if(this.hasActiveFx()){ var cur = this.fxQueue[0]; @@ -4632,7 +4632,7 @@ return this; }, - + beforeFx : function(o){ if(this.hasActiveFx() && !o.concurrent){ if(o.stopFx){ @@ -4644,13 +4644,13 @@ return true; }, - + hasFxBlock : function(){ var q = this.fxQueue; return q && q[0] && q[0].block; }, - + queueFx : function(o, fn){ if(!this.fxQueue){ this.fxQueue = []; @@ -4671,7 +4671,7 @@ return this; }, - + fxWrap : function(pos, o, vis){ var wrap; if(!o.wrap || !(wrap = Ext.get(o.wrap))){ @@ -4696,7 +4696,7 @@ return wrap; }, - + fxUnwrap : function(wrap, pos, o){ this.clearPositioning(); this.setPositioning(pos); @@ -4706,13 +4706,13 @@ } }, - + 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); @@ -4730,11 +4730,11 @@ } }, - + getFxEl : function(){ return Ext.get(this.dom); }, - + fxanim : function(args, opt, animType, defaultDur, defaultEase, cb){ animType = animType || 'run'; opt = opt || {}; @@ -4771,19 +4771,19 @@ 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]); + 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){ @@ -4798,11 +4798,11 @@ 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); + Ext.Element.prototype[fn].apply(els[i], args); } return this; }, - + add : function(els){ if(typeof els == "string"){ this.addElements(Ext.Element.selectorFunction(els)); @@ -4813,7 +4813,7 @@ } return this; }, - + each : function(fn, scope){ var els = this.elements; for(var i = 0, len = els.length; i < len; i++){ @@ -4824,38 +4824,38 @@ 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(Ext.isArray(el)){ for(var i = 0, len = el.length; i < len; i++){ @@ -4878,7 +4878,7 @@ return this; }, - + replaceElement : function(el, replacement, domReplace){ var index = typeof el == 'number' ? el : this.indexOf(el); if(index !== -1){ @@ -4891,7 +4891,7 @@ return this; }, - + clear : function(){ this.elements = []; } @@ -4936,11 +4936,11 @@ 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); + Ext.Element.prototype[fn].apply(el, args); } return this; }, - + item : function(index){ if(!this.elements[index]){ return null; @@ -4949,7 +4949,7 @@ return this.el; }, - + addListener : function(eventName, handler, scope, opt){ var els = this.elements; for(var i = 0, len = els.length; i < len; i++) { @@ -4958,13 +4958,13 @@ 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){ + if(fn.call(scope || el, el, this, i) === false){ break; } } @@ -5015,30 +5015,30 @@ 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; @@ -5111,7 +5111,7 @@ } }, - + isLoading : function(transId){ if(transId){ return Ext.lib.Ajax.isCallInProgress(transId); @@ -5120,7 +5120,7 @@ } }, - + abort : function(transId){ if(transId || this.isLoading()){ Ext.lib.Ajax.abort(transId || this.transId); @@ -5230,26 +5230,26 @@ Ext.Ajax = new Ext.data.Connection({ - - - - - - - - - - - - - - + + + + + + + + + + + + + + autoAbort : false, - + serializeForm : function(form){ return Ext.lib.Ajax.serializeForm(form); } @@ -5260,59 +5260,59 @@ 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.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 cfg, callerScope; - if(typeof url == "object"){ + if(typeof url == "object"){ cfg = url; url = cfg.url; params = params || cfg.params; @@ -5356,7 +5356,7 @@ } }, - + formUpdate : function(form, url, reset, callback){ if(this.fireEvent("beforeupdate", this.el, form, url) !== false){ if(typeof url == "function"){ @@ -5381,7 +5381,7 @@ } }, - + refresh : function(callback){ if(this.defaultUrl == null){ return; @@ -5389,7 +5389,7 @@ this.update(this.defaultUrl, null, callback, true); }, - + startAutoRefresh : function(interval, url, params, callback, refreshNow){ if(refreshNow){ this.update(url || this.defaultUrl, params, callback, true); @@ -5400,7 +5400,7 @@ this.autoRefreshProcId = setInterval(this.update.createDelegate(this, [url || this.defaultUrl, params, callback, true]), interval*1000); }, - + stopAutoRefresh : function(){ if(this.autoRefreshProcId){ clearInterval(this.autoRefreshProcId); @@ -5408,23 +5408,23 @@ } }, - + isAutoRefreshing : function(){ return this.autoRefreshProcId ? true : false; }, - - + + showLoading : function(){ if(this.showLoadIndicator){ this.el.update(this.indicatorText); } }, - + processSuccess : function(response){ this.transaction = null; if(response.argument.form && response.argument.reset){ - try{ + try{ response.argument.form.reset(); }catch(e){} } @@ -5437,7 +5437,7 @@ } }, - + updateComplete : function(response){ this.fireEvent("update", this.el, response); if(typeof response.argument.callback == "function"){ @@ -5445,7 +5445,7 @@ } }, - + processFailure : function(response){ this.transaction = null; this.fireEvent("failure", this.el, response); @@ -5454,29 +5454,29 @@ } }, - + 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); @@ -5487,17 +5487,17 @@ Ext.Updater.defaults = { - + timeout : 30, - + loadScripts : false, - + sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false"), - + disableCaching : false, - + showLoadIndicator : true, - + indicatorText : '<div class="loading-indicator">Loading...</div>' }; @@ -5511,7 +5511,7 @@ Ext.Updater.BasicRenderer = function(){}; Ext.Updater.BasicRenderer.prototype = { - + render : function(el, response, updateManager, callback){ el.update(response.responseText, updateManager.loadScripts, callback); } @@ -5597,13 +5597,13 @@ code.push(e == "T" ? "'T'" : Date.getFormatCode(e)); } return code.join(" + "); }, - + U: "Math.round(this.getTime() / 1000)" } Date.getFormatCode = function(character) { var f = Date.formatCodes[character]; - + if (f) { f = Ext.type(f) == 'function'? f() : f; Date.formatCodes[character] = f; } @@ -5679,7 +5679,7 @@ }; Date.parseCodes = { - + d: { g:1, c:"d = parseInt(results[{0}], 10);\n", @@ -5852,7 +5852,7 @@ if (p) { p = Ext.type(p) == 'function'? p() : p; - Date.parseCodes[character] = p; + Date.parseCodes[character] = p; if (p.c) { p.c = String.format(p.c, currentGroup); } @@ -6106,7 +6106,7 @@ fn.apply(scope, args || []); } }; - + this.delay = function(delay, newFn, newScope, newArgs){ if(id && delay != d){ this.cancel(); @@ -6121,7 +6121,7 @@ } }; - + this.cancel = function(){ if(id){ clearInterval(id); @@ -6185,7 +6185,7 @@ } }; - + this.start = function(task){ tasks.push(task); task.taskStartTime = new Date().getTime(); @@ -6195,13 +6195,13 @@ return task; }; - + this.stop = function(task){ removeTa... [truncated message content] |